@enablerr-ui/detail 0.2.748 → 0.2.749
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.748");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 _(){}function C(e){return e()}function E(){return Object.create(null)}function I(e){e.forEach(C)}function A(e){return"function"==typeof e}function v(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function S(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return _;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function b(e){return null==e?"":e}function $(e,t){e.appendChild(t)}function T(e,t,n){e.insertBefore(t,n||null)}function N(e){e.parentNode.removeChild(e)}function R(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function D(e){return document.createElement(e)}function O(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function M(e){return document.createTextNode(e)}function k(){return M(" ")}function x(){return M("")}function B(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function P(e){return function(t){return t.preventDefault(),e.call(this,t)}}function L(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function F(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function V(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function U(e,t){e.value=null==t?"":t}function H(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function z(e,t,n){e.classList[n?"add":"remove"](t)}let W;function G(e){W=e}function X(){if(!W)throw new Error("Function called outside component initialization");return W}function q(e){X().$$.on_mount.push(e)}function j(e){X().$$.on_destroy.push(e)}function Y(){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 Z(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const K=[],Q=[],J=[],ee=[],te=Promise.resolve();let ne=!1;function re(){ne||(ne=!0,te.then(ce))}function ie(){return re(),te}function oe(e){J.push(e)}function se(e){ee.push(e)}let ae=!1;const le=new Set;function ce(){if(!ae){ae=!0;do{for(let e=0;e<K.length;e+=1){const t=K[e];G(t),de(t.$$)}for(G(null),K.length=0;Q.length;)Q.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];le.has(t)||(le.add(t),t())}J.length=0}while(K.length);for(;ee.length;)ee.pop()();ne=!1,ae=!1,le.clear()}}function de(e){if(null!==e.fragment){e.update(),I(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(oe)}}const ue=new Set;let he;function fe(){he={r:0,c:[],p:he}}function me(){he.r||I(he.c),he=he.p}function ge(e,t){e&&e.i&&(ue.delete(e),e.i(t))}function pe(e,t,n,r){if(e&&e.o){if(ue.has(e))return;ue.add(e),he&&he.c.push((()=>{ue.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function we(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&&(fe(),pe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),me())})):t.block.d(1),a.c(),ge(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&ce()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{G(n),r(t.then,1,t.value,e),G(null)}),(e=>{if(G(n),r(t.catch,2,t.error,e),G(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function ye(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 _e="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ce(e,t){pe(e,1,1,(()=>{t.delete(e.key)}))}function Ee(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||oe((()=>{const t=o.map(C).filter(A);s?s.push(...t):I(t),e.$$.on_mount=[]})),a.forEach(oe)}function ve(e,t){const n=e.$$;null!==n.fragment&&(I(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=W;G(e);const l=e.$$={fragment:null,ctx:null,props:o,update:_,not_equal:i,bound:E(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:E(),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]&&(K.push(e),re(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,I(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(N)}else l.fragment&&l.fragment.c();t.intro&&ge(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),ce()}G(a)}class be{$destroy(){ve(this,1),this.$destroy=_}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function $e(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("line"),i=O("line"),F(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"),F(r,"x1","12"),F(r,"y1","9"),F(r,"x2","12"),F(r,"y2","13"),F(i,"x1","12"),F(i,"y1","17"),F(i,"x2","12.01"),F(i,"y2","17"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Te(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 Ne extends be{constructor(e){super(),Se(this,e,Te,$e,v,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("circle"),r=O("polyline"),i=O("line"),F(n,"cx","12"),F(n,"cy","12"),F(n,"r","10"),F(r,"points","8 12 12 16 16 12"),F(i,"x1","12"),F(i,"y1","8"),F(i,"x2","12"),F(i,"y2","16"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function De(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 Oe extends be{constructor(e){super(),Se(this,e,De,Re,v,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("circle"),F(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"),F(r,"cx","12"),F(r,"cy","13"),F(r,"r","4"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-camera "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function ke(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class xe extends be{constructor(e){super(),Se(this,e,ke,Me,v,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),F(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),F(r,"points","22 4 12 14.01 9 11.01"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function Pe(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 Le extends be{constructor(e){super(),Se(this,e,Pe,Be,v,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,r;return{c(){t=O("svg"),n=O("path"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",r="feather feather-command "+e[2])},m(e,r){T(e,t,r),$(t,n)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&F(t,"class",r)},i:_,o:_,d(e){e&&N(t)}}}function Ve(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 Ue extends be{constructor(e){super(),Se(this,e,Ve,Fe,v,{size:0,strokeWidth:1,class:2})}}function He(e){let t,n,r,i;return{c(){t=O("svg"),n=O("polyline"),r=O("path"),F(n,"points","9 10 4 15 9 20"),F(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(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 We extends be{constructor(e){super(),Se(this,e,ze,He,v,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("line"),i=O("line"),F(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),F(r,"x1","18"),F(r,"y1","9"),F(r,"x2","12"),F(r,"y2","15"),F(i,"x1","12"),F(i,"y1","9"),F(i,"x2","18"),F(i,"y2","15"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-delete "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(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,Ge,v,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),i=O("line"),F(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),F(r,"points","15 3 21 3 21 9"),F(i,"x1","10"),F(i,"y1","14"),F(i,"x2","21"),F(i,"y2","3"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-external-link "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Ye(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 Ze extends be{constructor(e){super(),Se(this,e,Ye,je,v,{size:0,strokeWidth:1,class:2})}}function Ke(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("circle"),r=O("line"),i=O("path"),F(n,"cx","12"),F(n,"cy","12"),F(n,"r","10"),F(r,"x1","2"),F(r,"y1","12"),F(r,"x2","22"),F(r,"y2","12"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-globe "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Qe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Je extends be{constructor(e){super(),Se(this,e,Qe,Ke,v,{size:0,strokeWidth:1,class:2})}}function et(e){let t,n,r,i,o,s,a,l;return{c(){t=O("svg"),n=O("line"),r=O("line"),i=O("line"),o=O("line"),s=O("line"),a=O("line"),F(n,"x1","8"),F(n,"y1","6"),F(n,"x2","21"),F(n,"y2","6"),F(r,"x1","8"),F(r,"y1","12"),F(r,"x2","21"),F(r,"y2","12"),F(i,"x1","8"),F(i,"y1","18"),F(i,"x2","21"),F(i,"y2","18"),F(o,"x1","3"),F(o,"y1","6"),F(o,"x2","3.01"),F(o,"y2","6"),F(s,"x1","3"),F(s,"y1","12"),F(s,"x2","3.01"),F(s,"y2","12"),F(a,"x1","3"),F(a,"y1","18"),F(a,"x2","3.01"),F(a,"y2","18"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",l="feather feather-list "+e[2])},m(e,l){T(e,t,l),$(t,n),$(t,r),$(t,i),$(t,o),$(t,s),$(t,a)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&F(t,"class",l)},i:_,o:_,d(e){e&&N(t)}}}function tt(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 nt extends be{constructor(e){super(),Se(this,e,tt,et,v,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),F(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"),F(r,"points","22,6 12,13 2,6"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-mail "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function it(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ot extends be{constructor(e){super(),Se(this,e,it,rt,v,{size:0,strokeWidth:1,class:2})}}function st(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("circle"),F(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),F(r,"cx","12"),F(r,"cy","10"),F(r,"r","3"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function at(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 lt extends be{constructor(e){super(),Se(this,e,at,st,v,{size:0,strokeWidth:1,class:2})}}function ct(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("polyline"),r=O("line"),i=O("path"),F(n,"points","23 7 23 1 17 1"),F(r,"x1","16"),F(r,"y1","8"),F(r,"x2","23"),F(r,"y2","1"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function dt(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 ut extends be{constructor(e){super(),Se(this,e,dt,ct,v,{size:0,strokeWidth:1,class:2})}}function ht(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("polyline"),r=O("path"),i=O("rect"),F(n,"points","6 9 6 2 18 2 18 9"),F(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"),F(i,"x","6"),F(i,"y","14"),F(i,"width","12"),F(i,"height","8"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-printer "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function ft(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 mt extends be{constructor(e){super(),Se(this,e,ft,ht,v,{size:0,strokeWidth:1,class:2})}}function gt(e){let t,n,r,i;return{c(){t=O("svg"),n=O("circle"),r=O("line"),F(n,"cx","11"),F(n,"cy","11"),F(n,"r","8"),F(r,"x1","21"),F(r,"y1","21"),F(r,"x2","16.65"),F(r,"y2","16.65"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-search "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function pt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class wt extends be{constructor(e){super(),Se(this,e,pt,gt,v,{size:0,strokeWidth:1,class:2})}}const{document:yt}=_e;function _t(e){e[45]=e[46].items}function Ct(e,t,n){const r=e.slice();return r[47]=t[n],r[49]=n,r}function Et(e,t,n){const r=e.slice();return r[50]=t[n],r}function It(e,t,n){const r=e.slice();return r[50]=t[n],r}function At(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function vt(e){let t,n,r,i,o,s;_t(e);let a=e[5]?.length&&St(e),l=e[45]?.length&&$t(e),c=e[5]?.length&&Rt(e);return{c(){a&&a.c(),t=k(),n=D("div"),r=D("table"),l&&l.c(),i=k(),o=D("tbody"),c&&c.c(),F(r,"striped",""),F(r,"class","svelte-v0ogws"),F(n,"class","eList svelte-v0ogws")},m(e,d){a&&a.m(e,d),T(e,t,d),T(e,n,d),$(n,r),l&&l.m(r,null),$(r,i),$(r,o),c&&c.m(o,null),s=!0},p(e,n){_t(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&ge(a,1)):(a=St(e),a.c(),ge(a,1),a.m(t.parentNode,t)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me()),e[45]?.length?l?l.p(e,n):(l=$t(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&ge(c,1)):(c=Rt(e),c.c(),ge(c,1),c.m(o,null)):c&&(fe(),pe(c,1,1,(()=>{c=null})),me())},i(e){s||(ge(a),ge(c),s=!0)},o(e){pe(a),pe(c),s=!1},d(e){a&&a.d(e),e&&N(t),e&&N(n),l&&l.d(),c&&c.d()}}}function St(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&bt(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}),Q.push((()=>Ee(i,"value",f))),i.$on("input",e[14]),l=new qe({props:{size:"18"}}),{c(){h&&h.c(),t=k(),n=D("div"),r=M("Suchen: "),Ie(i.$$.fragment),s=k(),a=D("span"),Ie(l.$$.fragment),F(a,"class","feather pointer svelte-v0ogws"),H(n,"margin-bottom","1em"),H(n,"position","relative")},m(o,f){h&&h.m(o,f),T(o,t,f),T(o,n,f),$(n,r),Ae(i,n,null),$(n,s),$(n,a),Ae(l,a,null),c=!0,d||(u=B(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&ge(h,1):(h=bt(e),h.c(),ge(h,1),h.m(t.parentNode,t)):h&&(fe(),pe(h,1,1,(()=>{h=null})),me());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],se((()=>o=!1))),i.$set(r)},i(e){c||(ge(h),ge(i.$$.fragment,e),ge(l.$$.fragment,e),c=!0)},o(e){pe(h),pe(i.$$.fragment,e),pe(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&N(t),e&&N(n),ve(i),ve(l),d=!1,u()}}}function bt(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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $t(e){let t,n,r,i=e[4]&&e[0]&&Tt(),o=e[45],s=[];for(let t=0;t<o.length;t+=1)s[t]=Nt(It(e,o,t));return{c(){t=D("thead"),n=D("tr"),i&&i.c(),r=k();for(let e=0;e<s.length;e+=1)s[e].c();F(n,"class","svelte-v0ogws"),F(t,"class","svelte-v0ogws")},m(e,o){T(e,t,o),$(t,n),i&&i.m(n,null),$(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=Tt(),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=It(e,o,r);s[r]?s[r].p(i,t):(s[r]=Nt(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&&N(t),i&&i.d(),R(s,e)}}}function Tt(e){let t;return{c(){t=D("th"),F(t,"class","svelte-v0ogws")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Nt(e){let t,n,r=e[50]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-v0ogws")},m(e,r){T(e,t,r),$(t,n)},p(e,t){4&t[0]&&r!==(r=e[50]?.designation+"")&&V(n,r)},d(e){e&&N(t)}}}function Rt(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=Ct(e,o,t),a=s(n);i.set(a,r[t]=kt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);T(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],fe(),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 _=new Set,C=new Set;function E(e){ge(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)||_.has(r)?E(t):C.has(i)?h--:y.get(r)>y.get(i)?(C.add(r),E(t)):(_.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)E(p[f-1]);return p}(r,n,s,1,e,o,i,t.parentNode,Ce,kt,t,Ct),me())},i(e){if(!n){for(let e=0;e<o.length;e+=1)ge(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)pe(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&N(t)}}}function Dt(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Ot(e),l=e[45],c=[];for(let t=0;t<l.length;t+=1)c[t]=Mt(Et(e,l,t));return{c(){t=D("tr"),a&&a.c(),n=k();for(let e=0;e<c.length;e+=1)c[e].c();r=k(),F(t,"class","pointer svelte-v0ogws"),z(t,"active",e[47]._id===e[1])},m(l,d){T(l,t,d),a&&a.m(t,null),$(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);$(t,r),i=!0,o||(s=B(t,"click",L((function(){A(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]&&ge(a,1)):(a=Ot(e),a.c(),ge(a,1),a.m(t,n)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me()),10276&o[0]){let n;for(l=e[45],n=0;n<l.length;n+=1){const i=Et(e,l,n);c[n]?c[n].p(i,o):(c[n]=Mt(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]&&z(t,"active",e[47]._id===e[1])},i(e){i||(ge(a),i=!0)},o(e){pe(a),i=!1},d(e){e&&N(t),a&&a.d(),R(c,e),o=!1,s()}}}function Ot(e){let t,n,r,i,o;return n=new Ze({props:{size:"18"}}),{c(){t=D("td"),Ie(n.$$.fragment),F(t,"class","editRow svelte-v0ogws"),H(t,"color","#326173")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",L((function(){A(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Mt(e){let t,n,r,i=e[11](e[47],e[50])+"";return{c(){t=D("td"),n=M(i),F(t,"class",r=b(e[50].type)+" svelte-v0ogws")},m(e,r){T(e,t,r),$(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[47],e[50])+"")&&V(n,i),4&o[0]&&r!==(r=b(e[50].type)+" svelte-v0ogws")&&F(t,"class",r)},d(e){e&&N(t)}}}function kt(e,t){let n,r,i,o=t[15](t[47],t[45],t[3]),s=o&&Dt(t);return{key:e,first:null,c(){n=x(),s&&s.c(),r=x(),this.first=n},m(e,t){T(e,n,t),s&&s.m(e,t),T(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]&&ge(s,1)):(s=Dt(t),s.c(),ge(s,1),s.m(r.parentNode,r)):s&&(fe(),pe(s,1,1,(()=>{s=null})),me())},i(e){i||(ge(s),i=!0)},o(e){pe(s),i=!1},d(e){e&&N(n),s&&s.d(e),e&&N(r)}}}function xt(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Bt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:xt,then:vt,catch:At,value:46,blocks:[,,,]};return we(n=e[2]&&e[13](),i),{c(){t=x(),i.block.c()},m(e,n){T(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]())&&we(n,i)||ye(i,e,r)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),i.block.d(e),i.token=null,i=null}}}const Pt=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 Lt(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=Y(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;S(e,f,(e=>o(33,s=e)));let g,w,y,_,{inputList:C}=i,{eventId:E}=i,{prevEventId:I}=i,{className:A}=i,{rowId:v}=i,{filterForReady:b=!1}=i,{refStatus:$}=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=A+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));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(A),U=async(e,n)=>{if($)return o(18,$=[].concat($)),e.filter((e=>!!$.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(I){const n=await t.getEvent(I);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===A)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 _d(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 wd(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&&(Cd(t.class,e.eventId),o(2,k=!o(2,k=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,C=e.inputList),"eventId"in e&&o(21,E=e.eventId),"prevEventId"in e&&o(22,I=e.prevEventId),"className"in e&&o(23,A=e.className),"rowId"in e&&o(1,v=e.rowId),"filterForReady"in e&&o(24,b=e.filterForReady),"refStatus"in e&&o(18,$=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,v,k,x,g,y,P,d,h,f,B,F,(e,t)=>n=>{o(19,O=!0);const r=L?e:_[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=_=H(w.displaySort,await C||await gd(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||!b&&!$||o(5,y=await U(y,w));const{display:c}=w;let d=await Pt(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=_.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")},$,O,C,E,I,A,b,N,R,D,M,function(e){x=e,o(3,x)}]}class Ft extends be{constructor(e){var t;super(),yt.getElementById("svelte-v0ogws-style")||((t=D("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}",$(yt.head,t)),Se(this,e,Lt,Bt,v,{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 Vt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ut(e){let t,n,r=e[41]&&Ht(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[41]?r?(r.p(e,n),8&n[0]&&ge(r,1)):(r=Ht(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Ht(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[Qt]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function zt(e){let t,n;return t=new Id({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){A(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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wt(e){let t,n,r,i,o,s,a;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const l=[Xt,Gt],c=[];function d(e,t){return e[16]?0:1}return r=d(e),i=c[r]=l[r](e),s=new Ft({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=k(),i.c(),o=k(),Ie(s.$$.fragment)},m(e,i){Ae(t,e,i),T(e,n,i),c[r].m(e,i),T(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):(fe(),pe(c[u],1,1,(()=>{c[u]=null})),me(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),ge(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||(ge(t.$$.fragment,e),ge(i),ge(s.$$.fragment,e),a=!0)},o(e){pe(t.$$.fragment,e),pe(i),pe(s.$$.fragment,e),a=!1},d(e){ve(t,e),e&&N(n),c[r].d(e),e&&N(o),ve(s,e)}}}function Gt(e){let t,n,r,i;n=new e[23]({props:{outline:!0,$$slots:{default:[qt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let o=e[25]&&e[10]&&jt(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o&&o.c(),F(t,"class","form--buttons svelte-jb5mrh")},m(e,s){T(e,t,s),Ae(n,t,null),$(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]&&ge(o,1)):(o=jt(e),o.c(),ge(o,1),o.m(t,null)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){i||(ge(n.$$.fragment,e),ge(o),i=!0)},o(e){pe(n.$$.fragment,e),pe(o),i=!1},d(e){e&&N(t),ve(n),o&&o.d()}}}function Xt(e){let t,n,r,i,o,s,a=e[19]&&Zt(e);return r=new e[23]({props:{outline:!0,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),r.$on("click",e[28]),o=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){a&&a.c(),t=k(),n=D("div"),Ie(r.$$.fragment),i=k(),Ie(o.$$.fragment),F(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),T(e,t,l),T(e,n,l),Ae(r,n,null),T(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[19]?a?(a.p(e,n),524288&n[0]&&ge(a,1)):(a=Zt(e),a.c(),ge(a,1),a.m(t.parentNode,t)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me());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||(ge(a),ge(r.$$.fragment,e),ge(o.$$.fragment,e),s=!0)},o(e){pe(a),pe(r.$$.fragment,e),pe(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&N(t),e&&N(n),ve(r),e&&N(i),ve(o,e)}}}function qt(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function jt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Yt]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yt(e){let t;return{c(){t=M("Neu")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Zt(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kt(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Qt(e){let t,n,r,i;const o=[Wt,zt],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=x()},m(e,n){s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r))},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){s[t].d(e),e&&N(r)}}}function Jt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function en(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Ut,catch:Vt,value:41,blocks:[,,,]};return we(n=e[26](e[3]),i),{c(){t=x(),i.block.c()},m(e,n){T(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]))&&we(n,i)||ye(i,e,r)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),i.block.d(e),i.token=null,i=null}}}function tn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=Y(),{currentTasks:d}=u;S(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:_=!1}=n,{showEdit:C=!0}=n,{deList:E}=n,{newAllowed:I=!0}=n,{prevEventId:A}=n,{inputSearch:v}=n,b=f.id;f.class;let $,T,N,R,D,O,M,k="",x=!1,B=!1;h??=f.identity.designation;const P=!i?.length||i.find((e=>e===b));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,_=e.selectionFields),"showEdit"in e&&r(8,C=e.showEdit),"deList"in e&&r(9,E=e.deList),"newAllowed"in e&&r(10,I=e.newAllowed),"prevEventId"in e&&r(11,A=e.prevEventId),"inputSearch"in e&&r(12,v=e.inputSearch)},[h,m,f,g,p,w,y,_,C,E,I,A,v,k,x,$,N,D,O,M,B,o,s,a,d,P,async e=>{if(!e)return!1;const n=await gd(f.class,f.id);if(T=_&&_?.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"),C||l("back")},()=>{r(20,B=!0),r(14,x=!1),l("back")},()=>{r(20,B=!0),r(1,m=!1),r(15,$=!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,$=!!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){Z(e,t)}]}class nn extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=D("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}",$(document.head,t)),Se(this,e,tn,en,v,{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:rn}=_e;function on(e){e[28]=e[30].list,e[29]=e[30].items}function sn(e,t,n){const r=e.slice();return r[31]=t[n],r}function an(e,t,n){const r=e.slice();return r[34]=t[n],r}function ln(e,t,n){const r=e.slice();return r[34]=t[n],r}function cn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function dn(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[25](t)}on(e),n=new e[7]({props:{outline:!0,$$slots:{default:[un]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=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]=hn(ln(e,o,t));return{c(){t=D("thead"),n=D("tr"),r=D("th"),i=k();for(let e=0;e<s.length;e+=1)s[e].c();F(r,"class","svelte-14hcfjl"),F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,o){T(e,t,o),$(t,n),$(n,r),$(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=ln(e,o,r);s[r]?s[r].p(i,t):(s[r]=hn(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&&N(t),R(s,e)}}}(e),I=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=gn(sn(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=sn(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=gn(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){on(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],se((()=>a=!1))),s.$set(i),e[29]?.length&&E.p(e,t),e[28]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),ge(I),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(I),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function un(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function hn(e){let t,n,r=e[34]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function fn(e){let t,n,r,i,o,s,a,l;r=new Ze({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=mn(an(e,c,t));return{c(){t=D("tr"),n=D("td"),Ie(r.$$.fragment),i=k();for(let e=0;e<d.length;e+=1)d[e].c();o=k(),F(n,"class","editRow svelte-14hcfjl"),F(t,"class","pointer svelte-14hcfjl"),z(t,"active",e[31]._id===e[0])},m(c,u){T(c,t,u),$(t,n),Ae(r,n,null),$(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);$(t,o),s=!0,a||(l=B(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=an(e,c,n);d[n]?d[n].p(i,r):(d[n]=mn(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]&&z(t,"active",e[31]._id===e[0])},i(e){s||(ge(r.$$.fragment,e),s=!0)},o(e){pe(r.$$.fragment,e),s=!1},d(e){e&&N(t),ve(r),R(d,e),a=!1,l()}}}function mn(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function gn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&fn(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(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]&&ge(i,1)):(i=fn(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function pn(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function wn(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:pn,then:dn,catch:cn,value:30,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function yn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[wn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _n(e,n,i){const o=Y(),{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:_}=n,{recordId:C}=n,{filter:E}=n,{multiValues:I}=n,A="",v=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const S=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(g);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await b;e.eventId===t.id&&Cd(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,_=e.viewValue),"recordId"in e&&i(21,C=e.recordId),"filter"in e&&i(22,E=e.filter),"multiValues"in e&&i(23,I=e.multiValues)},[w,A,o,s,a,l,d,u,v,S,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let n=[];if(h.lookup){const e="."+f+"#"+h.lookup,r=document.querySelector(e);let i=r?.value||C;if(I.has(h.lookup)){const e=I.get(h.lookup)[0];e&&(n=await t.getSectionView(h.name,{[h.lookup]:e},!0))}else if(i&&24===i.toString().length){const e=await _d(h.lookup,i);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||C};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)),E&&(n=n.filter((e=>e._id!=E)))}const r=e.display;return{list:n,items:await Pt(r,e,n)}},({detail:{value:e}})=>{i(1,A=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(S(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,A="")},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,I,()=>o("back"),function(e){A=e,i(1,A)}]}class Cn extends be{constructor(e){var t;super(),rn.getElementById("svelte-14hcfjl-style")||((t=D("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}",$(rn.head,t)),Se(this,e,_n,yn,v,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:En}=_e;function In(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function An(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;function E(t){e[47](t)}function I(t){e[48](t)}let A={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]&&(A.value=e[2]);void 0!==e[24]&&(A.overwrite=e[24]);n=new o({props:A}),Q.push((()=>Ee(n,"value",E))),Q.push((()=>Ee(n,"overwrite",I))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const v=[Sn,vn],S=[];function R(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(a=R(e))&&(l=S[a]=v[a](e));let O=(!e[3]||e[15]||e[16])&&bn(e);function M(t){e[49](t)}let P={class:"tModal",noClickaway:!0,$$slots:{default:[Rn]},$$scope:{ctx:e}};void 0!==e[18]&&(P.open=e[18]);m=new e[26]({props:P}),Q.push((()=>Ee(m,"open",M)));let L=e[19]&&Dn(e);return{c(){t=D("div"),Ie(n.$$.fragment),s=k(),l&&l.c(),c=k(),d=D("input"),h=k(),O&&O.c(),f=k(),Ie(m.$$.fragment),p=k(),L&&L.c(),w=x(),F(d,"class",u=b(e[8]||e[9])+" svelte-jox15l"),F(d,"id",e[5]),F(d,"name",e[5]),d.value=e[0],d.hidden=!0,H(t,"position","relative")},m(r,i){T(r,t,i),Ae(n,t,null),$(t,s),~a&&S[a].m(t,null),$(t,c),$(t,d),$(t,h),O&&O.m(t,null),T(r,f,i),Ae(m,r,i),T(r,p,i),L&&L.m(r,i),T(r,w,i),y=!0,_||(C=B(t,"keydown",e[33]),_=!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],se((()=>r=!1))),!i&&16777216&o[0]&&(i=!0,s.overwrite=e[24],se((()=>i=!1))),n.$set(s);let h=a;a=R(e),a===h?~a&&S[a].p(e,o):(l&&(fe(),pe(S[h],1,1,(()=>{S[h]=null})),me()),~a?(l=S[a],l?l.p(e,o):(l=S[a]=v[a](e),l.c()),ge(l,1),l.m(t,c)):l=null),(!y||768&o[0]&&u!==(u=b(e[8]||e[9])+" svelte-jox15l"))&&F(d,"class",u),(!y||32&o[0])&&F(d,"id",e[5]),(!y||32&o[0])&&F(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?O?(O.p(e,o),98312&o[0]&&ge(O,1)):(O=bn(e),O.c(),ge(O,1),O.m(t,null)):O&&(fe(),pe(O,1,1,(()=>{O=null})),me());const f={};13008593&o[0]|1073741824&o[1]&&(f.$$scope={dirty:o,ctx:e}),!g&&262144&o[0]&&(g=!0,f.open=e[18],se((()=>g=!1))),m.$set(f),e[19]?L?(L.p(e,o),524288&o[0]&&ge(L,1)):(L=Dn(e),L.c(),ge(L,1),L.m(w.parentNode,w)):L&&(fe(),pe(L,1,1,(()=>{L=null})),me())},i(e){y||(ge(n.$$.fragment,e),ge(l),ge(O),ge(m.$$.fragment,e),ge(L),y=!0)},o(e){pe(n.$$.fragment,e),pe(l),pe(O),pe(m.$$.fragment,e),pe(L),y=!1},d(e){e&&N(t),ve(n),~a&&S[a].d(),O&&O.d(),e&&N(f),ve(m,e),e&&N(p),L&&L.d(e),e&&N(w),_=!1,C()}}}(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,t){e[60]&&r.p(e,t)},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function vn(e){let t,n,r,i,o;return n=new Ze({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[38]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Sn(e){let t,n,r,i,o;return n=new wt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=[B(t,"click",e[32](!0)),B(t,"choose",e[35])],i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,I(o)}}}function bn(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[37]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function $n(e){let t,n,r,i;const o=[Nn,Tn],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=x()},m(e,n){s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r))},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){s[t].d(e),e&&N(r)}}}function Tn(e){let t,n;return t=new nn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Nn(e){let t,n;return t=new Cn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Rn(e){let t,n,r=e[18]&&$n(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[18]?r?(r.p(e,n),262144&n[0]&&ge(r,1)):(r=$n(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Dn(e){let t,n,r;function i(t){e[50](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}};return void 0!==e[19]&&(o.open=e[19]),t=new e[26]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function On(e){let t,n;return t=new Id({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[On]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function kn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function xn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:kn,then:An,catch:In,value:60,blocks:[,,,]};return we(e[31](),r),{c(){t=x(),r.block.c()},m(e,i){T(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){ye(r,e=t,n)},i(e){n||(ge(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}n=!1},d(e){e&&N(t),r.block.d(e),r.token=null,r=null}}}function Bn(e,n,r){let o,s,a;S(e,i,(e=>r(46,o=e)));const l=Y(),{Dialog:d,Modal:h}=c,{currentTasks:f,loggedIn:m}=u;S(e,f,(e=>r(52,s=e))),S(e,m,(e=>r(53,a=e)));let{id:g}=n,{item:p}=n,{value:y=""}=n,{multiValues:_}=n,{desc:C=""}=n,{noForm:E=!1}=n,{classId:I}=n,{eventId:A}=n,{recordId:v}=n,{withRefValue:b=!1}=n,{refValue:$=""}=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,X,q=!1,j=!0,Z=!0,K=!0;D||=v&&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,C=w(z,e)),l("setRefDesc",C.split(" •")[0]),l("change",{value:y,description:C}),l("task",{row:e,eventId:z.id}))},te=()=>{r(18,q=!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,_=e.multiValues),"desc"in e&&r(2,C=e.desc),"noForm"in e&&r(8,E=e.noForm),"classId"in e&&r(9,I=e.classId),"eventId"in e&&r(10,A=e.eventId),"recordId"in e&&r(11,v=e.recordId),"withRefValue"in e&&r(39,b=e.withRefValue),"refValue"in e&&r(40,$=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]&&b&&r(0,y=$),131137&e.$$.dirty[0]|8192&e.$$.dirty[1]&&y&&z&&Promise.resolve(pd(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,C,R,x,g,p,_,E,I,A,v,O,M,B,P,F,z,q,U,H,G,j,Z,K,d,h,f,m,V,Q,async()=>{try{const e=await t.getEvent(A);if(X="report"===e.output.type,r(23,Z=!p.asInput),r(22,j=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(A)),A&&v&&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,$=e),r(39,b=!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,q=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(p.lookup||x&&!p.constraint||y)&&r(18,q=!0)},async e=>{const n=()=>{r(18,q=!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,()=>{(X||G)&&(F?l("change",{value:y,delete:!0}):(r(0,y=""),r(2,C=""),r(24,K=!0),l("change",{value:y,description:C}),l("task",{row:{_task:{event:z.id,_id:!1}}})))},async()=>{if(!y)return;const e=await pd(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)},b,$,D,T,k,L,W,o,function(e){C=e,r(2,C)},function(e){K=e,r(24,K)},function(e){q=e,r(18,q)},function(e){U=e,r(19,U)}]}class Pn extends be{constructor(e){var t;super(),En.getElementById("svelte-jox15l-style")||((t=D("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}",$(En.head,t)),Se(this,e,Bn,xn,v,{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 Ln(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Fn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Vn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Hn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Un(e){let t,n;return t=new Pn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hn(e){let t,n,r,i,o,s,a;n=new nt({props:{size:"18"}});let l=e[0],c=[];for(let t=0;t<l.length;t+=1)c[t]=Un(Ln(e,l,t));const d=e=>pe(c[e],1,1,(()=>{c[e]=null}));return{c(){t=D("span"),Ie(n.$$.fragment),r=k();for(let e=0;e<c.length;e+=1)c[e].c();i=x(),F(t,"class","feather pointer")},m(l,d){T(l,t,d),Ae(n,t,null),T(l,r,d);for(let e=0;e<c.length;e+=1)c[e].m(l,d);T(l,i,d),o=!0,s||(a=B(t,"click",(function(){A(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=Ln(e,l,t);c[t]?(c[t].p(r,n),ge(c[t],1)):(c[t]=Un(r),c[t].c(),ge(c[t],1),c[t].m(i.parentNode,i))}for(fe(),t=l.length;t<c.length;t+=1)d(t);me()}},i(e){if(!o){ge(n.$$.fragment,e);for(let e=0;e<l.length;e+=1)ge(c[e]);o=!0}},o(e){pe(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)pe(c[e]);o=!1},d(e){e&&N(t),ve(n),e&&N(r),R(c,e),e&&N(i),s=!1,a()}}}function zn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Wn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Xn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Gn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Xn(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[Gn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new Ft({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=D("div"),Ie(n.$$.fragment),r=k(),Ie(i.$$.fragment),F(t,"class","form--buttons")},m(e,s){T(e,t,s),Ae(n,t,null),T(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||(ge(n.$$.fragment,e),ge(i.$$.fragment,e),o=!0)},o(e){pe(n.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){e&&N(t),ve(n),e&&N(r),ve(i,e)}}}function qn(e){let t,n,r=e[13]&&Wn(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&ge(r,1)):(r=Wn(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function jn(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:zn,then:Vn,catch:Fn,value:36,blocks:[,,,]};function s(t){e[33](t)}we(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[qn]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),Q.push((()=>Ee(n,"open",s))),{c(){o.block.c(),t=k(),Ie(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,T(e,t,r),Ae(n,e,r),i=!0},p(t,i){ye(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],se((()=>r=!1))),n.$set(s)},i(e){i||(ge(o.block),ge(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}pe(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&N(t),ve(n,e)}}}function Yn(e,n,r){const i=Y(),{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:_}=n,{withRefValue:C=!1}=n,{refValue:E=""}=n,{required:I}=n,{disabled:A}=n,{readonly:v}=n,{praefix:S}=n,{selectionFields:b}=n,{formnovalidate:$}=n,{selection:T}=n,{deList:N}=n,{isTemplate:R}=n,{noList:D=!1}=n,O=!1;const M=f.properties.multi.filter;A=!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,_=e.recordId),"withRefValue"in e&&r(26,C=e.withRefValue),"refValue"in e&&r(27,E=e.refValue),"required"in e&&r(9,I=e.required),"disabled"in e&&r(1,A=e.disabled),"readonly"in e&&r(10,v=e.readonly),"praefix"in e&&r(11,S=e.praefix),"selectionFields"in e&&r(28,b=e.selectionFields),"formnovalidate"in e&&r(12,$=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,A,h,f,g,p,w,y,_,I,v,S,$,O,d,u,o,s,a,l,async()=>{r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await gd(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,C,E,b,T,N,R,D,function(e){O=e,r(13,O)}]}class Zn extends be{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=D("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",$(document.head,t)),Se(this,e,Yn,jn,v,{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 Kn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Jn(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(Qn);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{Kn.lastIndex=s;const o=Kn.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 er(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:tr}=_e;function nr(e,t,n){const r=e.slice();return r[17]=t[n],r}function rr(e,t,n){const r=e.slice();return r[20]=t[n],r}function ir(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function or(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]=ar(rr(e,m,t));const p=e=>pe(g[e],1,1,(()=>{g[e]=null}));let w=e[0].list&&lr(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[dr]},$$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:[ur]},$$scope:{ctx:e}}}),{c(){t=D("form"),n=D("input"),i=k();for(let e=0;e<g.length;e+=1)g[e].c();o=k(),w&&w.c(),s=k(),a=D("div"),Ie(l.$$.fragment),c=k(),Ie(d.$$.fragment),F(n,"class",b(e[6])+" svelte-1phofh5"),F(n,"name","_id"),F(n,"type","hidden"),n.value=r=e[1]._id||"",F(t,"class","fTask svelte-1phofh5"),F(t,"id",e[6]),F(a,"class","form--buttons svelte-1phofh5")},m(r,m){T(r,t,m),$(t,n),$(t,i);for(let e=0;e<g.length;e+=1)g[e].m(t,null);$(t,o),w&&w.m(t,null),T(r,s,m),T(r,a,m),Ae(l,a,null),$(a,c),Ae(d,a,null),u=!0,h||(f=[B(t,"keydown",e[8]),B(t,"submit",P(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=rr(e,m,n);g[n]?(g[n].p(r,i),ge(g[n],1)):(g[n]=ar(r),g[n].c(),ge(g[n],1),g[n].m(t,o))}for(fe(),n=m.length;n<g.length;n+=1)p(n);me()}e[0].list?w?(w.p(e,i),1&i&&ge(w,1)):(w=lr(e),w.c(),ge(w,1),w.m(t,null)):w&&(fe(),pe(w,1,1,(()=>{w=null})),me());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)ge(g[e]);ge(w),ge(l.$$.fragment,e),ge(d.$$.fragment,e),u=!0}},o(e){g=g.filter(Boolean);for(let e=0;e<g.length;e+=1)pe(g[e]);pe(w),pe(l.$$.fragment,e),pe(d.$$.fragment,e),u=!1},d(e){e&&N(t),R(g,e),w&&w.d(),e&&N(s),e&&N(a),ve(l),ve(d),h=!1,I(f)}}}function sr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ar(e){let t,n,r=mr(!0,e[20]),i=r&&sr(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(e,t,r),n=!0},p(e,n){1&n&&(r=mr(!0,e[20])),r?i?(i.p(e,n),1&n&&ge(i,1)):(i=sr(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function lr(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=cr(nr(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=nr(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=cr(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function cr(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new br({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=k(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),T(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||(ge(t.$$.fragment,e),ge(r.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!1},d(e){ve(t,e),e&&N(n),ve(r,e)}}}function dr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function ur(e){let t;return{c(){t=M("Speichern")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function hr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function fr(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:hr,then:or,catch:ir,value:16,blocks:[,,,]};return we(e[7](),i),{c(){t=k(),n=D("section"),i.block.c(),tr.title="Vorgaben",F(n,"class","sTask svelte-1phofh5")},m(e,o){T(e,t,o),T(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){ye(i,e=t,n)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),e&&N(n),i.block.d(),i.token=null,i=null}}}const mr=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function gr(e,r,o){let l,d,u;S(e,a,(e=>o(11,d=e))),S(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(),_=!1;const C=()=>window.history.back(),E=(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 Jn(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=_)},[p,w,_,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,_=!0),d.role?.length&&p.authorization?.length){const e=p.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,_||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},C,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]=E(o.item,e)}else n[t]=E(p.items,e)})),await t.saveTemplate(p.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),C()}]}const{document:pr}=_e;function wr(e,t,n){const r=e.slice();return r[28]=t[n],r}function yr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _r(e){let t,n,r=mr(e[7],e[28]),i=r&&yr(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(e,t,r),n=!0},p(e,n){130&n[0]&&(r=mr(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&ge(i,1)):(i=yr(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function Cr(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=_r(wr(e,i,t));const s=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){t=D("div");for(let e=0;e<o.length;e+=1)o[e].c();F(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){T(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=wr(e,i,n);o[n]?(o[n].p(r,a),ge(o[n],1)):(o[n]=_r(r),o[n].c(),ge(o[n],1),o[n].m(t,null))}for(fe(),n=i.length;n<o.length;n+=1)s(n);me()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&F(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)ge(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);r=!1},d(e){e&&N(t),R(o,e)}}}function Er(e){let t,n,r=e[13](e[9])+"";return{c(){t=D("span"),n=M(r)},m(e,r){T(e,t,r),$(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&V(n,r)},d(e){e&&N(t)}}}function Ir(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[Er]},$$scope:{ctx:e}}}),n.$on("click",(function(){A(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=D("div"),Ie(n.$$.fragment),F(t,"class","accordion svelte-148ktt9"),F(t,"slot","handle")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Ar(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Ir,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Cr,({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function vr(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[Ar]},$$scope:{ctx:e}}}),{c(){t=D("div"),Ie(n.$$.fragment),F(t,"class","formList")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Sr(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:_={}}=n,{isTemplate:C=!1}=n,{currency:E}=n,{update:I=!1}=n,A=new Map;const v={};let S=d[a.name]||{};d[a.name]=S;const b=e=>v[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),$=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,_=e.template),"isTemplate"in e&&r(7,C=e.isTemplate),"currency"in e&&r(8,E=e.currency),"update"in e&&r(20,I=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&I&&d&&r(9,S=d[a.name]||{})},[d,a,u,h,f,w,y,C,E,S,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?b(t.name):"boolean"===t.type?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&&(v[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,S=d[t])},e=>t=>{(()=>{const e=_[a.name]||{};for(const t in e)_[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=_[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach($)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if(A.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&&A.set(e,o[0])},()=>{setTimeout((()=>{Array.from(A).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,_,I,function(t){Z(e,t)}]}class br extends be{constructor(e){var t;super(),pr.getElementById("svelte-148ktt9-style")||((t=D("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}}",$(pr.head,t)),Se(this,e,Sr,vr,v,{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:$r}=_e;function Tr(e){e[0]=e[23].list,e[22]=e[23].items}function Nr(e,t,n){const r=e.slice();return r[24]=t[n],r}function Rr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Dr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Or(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Mr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[19](t)}Tr(e),n=new e[7]({props:{outline:!0,$$slots:{default:[kr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=xr(Dr(e,r,t));return{c(){t=D("thead"),n=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(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=Dr(e,r,o);i[o]?i[o].p(s,t):(i[o]=xr(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&&N(t),R(i,e)}}}(e),I=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Lr(Nr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);T(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=Nr(e,n,o);r[o]?r[o].p(s,i):(r[o]=Lr(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){R(r,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){Tr(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],se((()=>a=!1))),s.$set(i),e[22]?.length&&E.p(e,t),e[0]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function kr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function xr(e){let t,n,r=e[27]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function Br(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Pr(Rr(e,r,t));return{c(){t=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=k(),F(t,"class","pointer svelte-14hcfjl")},m(e,r){T(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);$(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=Rr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Pr(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&&N(t),R(i,e)}}}function Pr(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function Lr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Br(e);return{c(){r&&r.c(),t=x()},m(e,n){r&&r.m(e,n),T(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=Br(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&N(t)}}}function Fr(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Vr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Fr,then:Mr,catch:Or,value:23,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function Ur(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Vr]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hr(e,n,r){const i=Y(),{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 _=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},C=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,_,e=>()=>i("choose",{row:e}),async()=>{const e=await C,t=e.display;let n=await Pt(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(_(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 zr extends be{constructor(e){var t;super(),$r.getElementById("svelte-14hcfjl-style")||((t=D("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}",$($r.head,t)),Se(this,e,Hr,Ur,v,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Wr}=_e;function Gr(e,t,n){const r=e.slice();return r[11]=t[n],r}function Xr(e,t,n){const r=e.slice();return r[3]=t[n],r}function qr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function jr(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=Jr(Xr(e,i,t));const s=e=>pe(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&ei(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=k(),a&&a.c(),n=x()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);T(e,t,i),a&&a.m(e,i),T(e,n,i),r=!0},p(e,r){if(5161959&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=Xr(e,i,n);o[n]?(o[n].p(s,r),ge(o[n],1)):(o[n]=Jr(s),o[n].c(),ge(o[n],1),o[n].m(t.parentNode,t))}for(fe(),n=i.length;n<o.length;n+=1)s(n);me()}e[7].list?a?(a.p(e,r),128&r[0]&&ge(a,1)):(a=ei(e),a.c(),ge(a,1),a.m(n.parentNode,n)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me())},i(e){if(!r){for(let e=0;e<i.length;e+=1)ge(o[e]);ge(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);pe(a),r=!1},d(e){R(o,e),e&&N(t),a&&a.d(e),e&&N(n)}}}function Yr(e){let t,n,r,i;const o=[Kr,Zr],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=x()},m(e,n){~t&&s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){~t&&s[t].d(e),e&&N(r)}}}function Zr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kr(e){let t,n,r,i;n=new Ia({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]);let o=e[1]&&Qr(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o&&o.c(),H(t,"padding-top",".25em"),H(t,"background-color","lightyellow"),H(t,"position","relative")},m(e,s){T(e,t,s),Ae(n,t,null),$(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]&&ge(o,1)):(o=Qr(e),o.c(),ge(o,1),o.m(t,null)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){i||(ge(n.$$.fragment,e),ge(o),i=!0)},o(e){pe(n.$$.fragment,e),pe(o),i=!1},d(e){e&&N(t),ve(n),o&&o.d()}}}function Qr(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[22]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Jr(e){let t,n,r="list"!==e[3].type&&Yr(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&ge(r,1)):(r=Yr(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function ei(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=ni(Gr(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=Gr(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=ni(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function ti(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new br({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=k(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),T(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||(ge(t.$$.fragment,e),ge(r.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!1},d(e){ve(t,e),e&&N(n),ve(r,e)}}}function ni(e){let t,n,r="array"!==e[11].type&&ti(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&ge(r,1)):(r=ti(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function ri(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ii(e){let t,n;return t=new zr({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function oi(e){let t,n,r=e[10]&&ii(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&ge(r,1)):(r=ii(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function si(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:ri,then:jr,catch:qr,value:52,blocks:[,,,]};function l(t){e[28](t)}we(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[oi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),Q.push((()=>Ee(i,"open",l))),{c(){a.block.c(),t=k(),Ie(n.$$.fragment),r=k(),Ie(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,T(e,t,o),Ae(n,e,o),T(e,r,o),Ae(i,e,o),s=!0},p(t,n){ye(a,e=t,n);const r={};3352&n[0]|67108864&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],se((()=>o=!1))),i.$set(r)},i(e){s||(ge(a.block),ge(n.$$.fragment,e),ge(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){pe(a.blocks[e])}pe(n.$$.fragment,e),pe(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&N(t),ve(n,e),e&&N(r),ve(i,e)}}}function ai(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=Y();let l,d,u,h,f,{required:m}=n,{disabled:g}=n,{readonly:p}=n,{id:w}=n,{item:y}=n,{value:_}=n,{refValue:C}=n,{currency:E}=n,I={},A=[],v=[],S={},b=new Map,$=!1,T="";const N=y.checkOn,R=_,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(".");A.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},O=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{v.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{v.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},M=async e=>{const t=A.filter((t=>t.refObj===e));if(t?.length){r(9,S={});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&&I[n];const u=I[n];u&&i&&(c=(await _d(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,S[t]="",S))}}};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 A)e.add(t.refObj||u);Array.from(e).forEach((e=>M(e)))})(),x())},x=()=>{setTimeout((()=>{Array.from(b).forEach((([e,t])=>{I[e]||r(6,I[e]=t._id,I)}))}),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,$=!0)):(r(1,_=""),r(23,C=""),a("setRefValue",C))},P=()=>{r(10,$=!1)},L=()=>{r(1,_=""),r(23,C=_),r(6,I={}),a("setRefValue",C)};return e.$$set=e=>{"required"in e&&r(24,m=e.required),"disabled"in e&&r(0,g=e.disabled),"readonly"in e&&r(25,p=e.readonly),"id"in e&&r(26,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,_=e.value),"refValue"in e&&r(23,C=e.refValue),"currency"in e&&r(2,E=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&r(0,g=g||p),134217840&e.$$.dirty[0]&&I&&a("safeReference",{record:I,class:u,event:h,taskId:f})},[g,_,E,y,u,h,I,l,d,S,$,T,i,s,N,R,async()=>{try{if(_){const e=await t.getTask(y.refClass,_);delete e._task,r(6,I=e),r(27,f=(await t.getTaskByDocId(e._id))._id)}else r(6,I={})}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,I[t]=n,I),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,I[e]=[],I);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,I[e]=o,I)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(b.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&b.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,_=n[0]._id),r(23,C=_),a("setRefValue",C),r(6,I=n[0])),P()},P,L,C,m,p,w,f,function(e){$=e,r(10,$)}]}class li extends be{constructor(e){var t;super(),Wr.getElementById("svelte-16mo2c-style")||((t=D("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",$(Wr.head,t)),Se(this,e,ai,si,v,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ci(e){let t,n,r,i=e[11]&&function(e){let t,n;return{c(){t=D("span"),n=M(e[4]),F(t,"class","item")},m(e,r){T(e,t,r),$(t,n)},p(e,t){16&t[0]&&V(n,e[4])},d(e){e&&N(t)}}}(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Oe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Übernehmen"),F(t,"class","pointer feather svelte-1fuww0c")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[17]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=k(),o&&o.c(),n=x()},m(e,s){i&&i.m(e,s),T(e,t,s),o&&o.m(e,s),T(e,n,s),r=!0},p(e,t){e[11]&&i.p(e,t),e[14]&&o.p(e,t)},i(e){r||(ge(o),r=!0)},o(e){pe(o),r=!1},d(e){i&&i.d(e),e&&N(t),o&&o.d(e),e&&N(n)}}}function di(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:[ci]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=D("div"),Ie(n.$$.fragment),H(t,"position","relative"),H(t,"max-width","10em")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ui(e,t,r){let i;const o=Y(),{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")),_=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===l.name?.split("-")[0]))||l.properties?.currency,C=Number("1.1").toLocaleString(y.id).substring(1,2),{properties:E={}}=l;let{min:I,max:A,step:v,pattern:S,decimals:b=0,unit:$="",placeholder:T,hint:N,readonly:R,negative:D,required:O=!1,transfer:M}=E;R=!0===R||void 0;S||(S=b?`[0-9]+([${C}][0-9]{1,${b}})?`:"[0-9]*"),D&&(S="-?"+S);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(C,".")).toFixed(b).toString().replace(".",C)),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,S,R,i,s,y,_,v,T,M,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{R||Number(d.toString().replace(C,"."))||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 hi extends be{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=D("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",$(document.head,t)),Se(this,e,ui,di,v,{id:0,item:18,value:19,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:fi}=_e;function mi(e){e[33]=e[35].list,e[34]=e[35].items}function gi(e,t,n){const r=e.slice();return r[36]=t[n],r[38]=n,r}function pi(e,t,n){const r=e.slice();return r[39]=t[n],r[41]=n,r}function wi(e,t,n){const r=e.slice();return r[39]=t[n],r}function yi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function _i(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y,_;mi(e),n=new e[8]({props:{outline:!0,$$slots:{default:[Ci]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let C=!e[1]&&Ei(e);function E(t){e[31](t)}let I={id:e[11]};void 0!==e[2]&&(I.value=e[2]),a=new e[6]({props:I}),Q.push((()=>Ee(a,"value",E))),a.$on("input",e[14]),u=new qe({props:{size:"18"}});let A=e[34]?.length&&function(e){let t,n,r,i,o=!e[1]&&Ai(e),s=e[34],a=[];for(let t=0;t<s.length;t+=1)a[t]=vi(wi(e,s,t));return{c(){t=D("thead"),n=D("tr"),o&&o.c(),r=k();for(let e=0;e<a.length;e+=1)a[e].c();F(n,"class","svelte-1m010ne"),F(t,"class","svelte-1m010ne")},m(e,s){T(e,t,s),$(t,n),o&&o.m(n,null),$(n,r);for(let e=0;e<a.length;e+=1)a[e].m(n,null);i=!0},p(e,t){if(e[1]?o&&(fe(),pe(o,1,1,(()=>{o=null})),me()):o?(o.p(e,t),2&t[0]&&ge(o,1)):(o=Ai(e),o.c(),ge(o,1),o.m(n,r)),8192&t[0]){let r;for(s=e[34],r=0;r<s.length;r+=1){const i=wi(e,s,r);a[r]?a[r].p(i,t):(a[r]=vi(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||(ge(o),i=!0)},o(e){pe(o),i=!1},d(e){e&&N(t),o&&o.d(),R(a,e)}}}(e),v=e[33]?.length&&function(e){let t,n,r=e[33],i=[];for(let t=0;t<r.length;t+=1)i[t]=Ni(gi(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(e,t,r),n=!0},p(e,n){if(569359&n[0]){let s;for(r=e[33],s=0;s<r.length;s+=1){const o=gi(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=Ni(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),C&&C.c(),i=k(),o=D("div"),s=M("Suchen: "),Ie(a.$$.fragment),c=k(),d=D("span"),Ie(u.$$.fragment),h=k(),f=D("div"),m=D("table"),A&&A.c(),g=k(),p=D("tbody"),v&&v.c(),F(t,"class","form--buttons svelte-1m010ne"),F(d,"class","feather pointer svelte-1m010ne"),H(o,"margin-bottom","1em"),H(o,"position","relative"),F(m,"striped",""),F(m,"class","svelte-1m010ne"),F(f,"class","eList svelte-1m010ne")},m(l,E){T(l,t,E),Ae(n,t,null),$(t,r),C&&C.m(t,null),T(l,i,E),T(l,o,E),$(o,s),Ae(a,o,null),$(o,c),$(o,d),Ae(u,d,null),T(l,h,E),T(l,f,E),$(f,m),A&&A.m(m,null),$(m,g),$(m,p),v&&v.m(p,null),w=!0,y||(_=B(d,"click",e[16]),y=!0)},p(e,r){mi(e);const i={};8192&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[1]?C&&(fe(),pe(C,1,1,(()=>{C=null})),me()):C?(C.p(e,r),2&r[0]&&ge(C,1)):(C=Ei(e),C.c(),ge(C,1),C.m(t,null));const o={};!l&&4&r[0]&&(l=!0,o.value=e[2],se((()=>l=!1))),a.$set(o),e[34]?.length&&A.p(e,r),e[33]?.length&&v.p(e,r)},i(e){w||(ge(n.$$.fragment,e),ge(C),ge(a.$$.fragment,e),ge(u.$$.fragment,e),ge(A),ge(v),w=!0)},o(e){pe(n.$$.fragment,e),pe(C),pe(a.$$.fragment,e),pe(u.$$.fragment,e),pe(A),pe(v),w=!1},d(e){e&&N(t),ve(n),C&&C.d(),e&&N(i),e&&N(o),ve(a),ve(u),e&&N(h),e&&N(f),A&&A.d(),v&&v.d(),y=!1,_()}}}function Ci(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ei(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[Ii]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};8192&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ii(e){let t;return{c(){t=M("Bestätigen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ai(e){let t,n,r,i,o;return n=new Le({props:{size:"20"}}),{c(){t=D("th"),Ie(n.$$.fragment),F(t,"class","svelte-1m010ne")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[18](e[33])),i=!0)},p(t,n){e=t},i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function vi(e){let t,n,r=e[39]+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-1m010ne")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function Si(e){let t,n,r,i,o,s,a,l=e[0],c=$i(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=Ti(pi(e,d,t));return{c(){t=D("tr"),c.c(),n=k();for(let e=0;e<u.length;e+=1)u[e].c();r=k(),F(t,"style",i=e[1]?"cursor: default;":"cursor: zoom-in;"),F(t,"title","übernimmt den Wert direkt"),F(t,"class","svelte-1m010ne"),z(t,"active",e[0].includes(Array.isArray(e[36])?e[36][0]:e[36]))},m(i,l){T(i,t,l),c.m(t,null),$(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);$(t,r),o=!0,s||(a=B(t,"click",e[19](e[36])),s=!0)},p(s,a){if(e=s,1&a[0]&&v(l,l=e[0])?(fe(),pe(c,1,1,_),me(),c=$i(e),c.c(),ge(c),c.m(t,n)):c.p(e,a),8200&a[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const i=pi(e,d,n);u[n]?u[n].p(i,a):(u[n]=Ti(i),u[n].c(),u[n].m(t,r))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!o||2&a[0]&&i!==(i=e[1]?"cursor: default;":"cursor: zoom-in;"))&&F(t,"style",i),8193&a[0]&&z(t,"active",e[0].includes(Array.isArray(e[36])?e[36][0]:e[36]))},i(e){o||(ge(c),o=!0)},o(e){pe(c),o=!1},d(e){e&&N(t),c.d(e),R(u,e),s=!1,a()}}}function bi(e){let t,n,r;return n=new e[10]({props:{name:e[12],data:e[38],checked:e[0].includes(Array.isArray(e[36])?e[36][0]:e[36]),round:!0}}),{c(){t=D("td"),Ie(n.$$.fragment),F(t,"title","Wählt den Wert aus"),F(t,"class","svelte-1m010ne")},m(e,i){T(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[36])?e[36][0]:e[36])),n.$set(r)},i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function $i(e){let t,n,r=!e[1]&&bi(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[1]?r&&(fe(),pe(r,1,1,(()=>{r=null})),me()):r?(r.p(e,n),2&n[0]&&ge(r,1)):(r=bi(e),r.c(),ge(r,1),r.m(t.parentNode,t))},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Ti(e){let t,n,r=(Array.isArray(e[36])?e[36][e[41]]:e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=D("td"),n=M(r),F(t,"class","svelte-1m010ne")},m(e,r){T(e,t,r),$(t,n)},p(e,t){8&t[0]&&r!==(r=(Array.isArray(e[36])?e[36][e[41]]:e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&V(n,r)},d(e){e&&N(t)}}}function Ni(e){let t,n,r=e[15](e[36],e[2]),i=r&&Si(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(e,t,r),n=!0},p(e,n){4&n[0]&&(r=e[15](e[36],e[2])),r?i?(i.p(e,n),4&n[0]&&ge(i,1)):(i=Si(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function Ri(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Di(e){let t,n,r,i;t=new e[9]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ri,then:_i,catch:yi,value:35,blocks:[,,,]};return we(e[13](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function Oi(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Di]},$$scope:{ctx:e}}}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p(e,n){const r={};15&n[0]|8192&n[1]&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mi(e,n,r){const i=Y(),{Loading:o,TextField:s,Dialog:a,Button:l,Divider:d,Checkbox:u}=c;let{classId:h}=n,{id:f}=n,{selection:m}=n,{refDoc:g}=n,{tableName:p}=n,{idName:w}=n,{target:y}=n,{view:_}=n,{unique:C}=n,{uniqueView:E}=n,{status:I}=n,{single:A}=n;m||=[];let v="",S=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",b=[];const $=p+w+y+"checkbox",T=(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(21,h=e.classId),"id"in e&&r(22,f=e.id),"selection"in e&&r(0,m=e.selection),"refDoc"in e&&r(23,g=e.refDoc),"tableName"in e&&r(24,p=e.tableName),"idName"in e&&r(25,w=e.idName),"target"in e&&r(20,y=e.target),"view"in e&&r(26,_=e.view),"unique"in e&&r(27,C=e.unique),"uniqueView"in e&&r(28,E=e.uniqueView),"status"in e&&r(29,I=e.status),"single"in e&&r(1,A=e.single)},[m,A,v,b,i,o,s,a,l,d,u,S,$,async()=>{let e=[],n=[],i={};if(r(3,b=[]),w)if(_){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[w]:f},I&&(i.$or=[{status:!0},{[n]:o}]),e=await t.getSectionView(p,i),e=e.sort(((e,t)=>{const r=e=>(e[n]||"z").toString()+e[y];return T(r(e),r(t))}))}}else E?f&&(i={[w]:f,status:!0},Object.entries(E).map((([e,t])=>{t?.length&&(i[e]={$in:t}),n.push(e)})),e=await t.getSectionView(p,i),e=e.sort(((e,t)=>{const n=e=>(m.includes(e[y])?"0-":"1-")+e[y];return T(n(e),n(t))})),r(3,b=e.map((e=>{const t=[e[y]];return n.map((n=>t.push(e[n]))),t})))):C?(e=await t.getSection(p,w,f,C),e=e.sort(((e,t)=>T(e,t)))):(e=await t.getSection(p,w,f,!1,I),e=e.sort(((e,t)=>{const n=e=>(m.includes(e[y])?"0-":"1-")+e[y];return T(n(e),n(t))})));else i={},f&&!Array.isArray(f)&&(i._id=f),e=await t.getSectionView(p,i);const o=await t.getSchemaByClass(p),s=[];if(g){const t=o.items[0].name,n=o.items[1].name,i=o.list[0].name,s=e.find((e=>e[t]===g));e=s?s[i]:[],r(20,y=n)}let a;return e.map((e=>{let t=e[y];if(t||p!==y||(r(20,y=o.items[0].name),t=e[y]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else g&&(t=o.list[0].item.map((t=>e[t.name]||""))),s.push(t||[])})),a=g?o.list[0].item.map((e=>e.designation)):[o.items.find((e=>e.name===y))?.designation],n=n.map((e=>o.items.find((t=>t.name===e))?.designation)),{list:g?s:s.flat(),items:[...a,...n]}},({detail:{value:e}})=>{r(2,v=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(2,v="")},e=>()=>{const t=document.getElementsByName($),n=[];t.forEach(((t,r)=>{t.checked&&n.push(e[+t.attributes.data.value])})),i("choose",{list:n})},e=>()=>{document.getElementsByName($).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,m=m.includes(t)?m.filter((e=>e!==t)):m.concat(t)),i("choose",{list:m}))}},y,h,f,g,p,w,_,C,E,I,()=>i("back"),function(e){v=e,r(2,v)}]}class ki extends be{constructor(e){var t;super(),fi.getElementById("svelte-1m010ne-style")||((t=D("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}",$(fi.head,t)),Se(this,e,Mi,Oi,v,{classId:21,id:22,selection:0,refDoc:23,tableName:24,idName:25,target:20,view:26,unique:27,uniqueView:28,status:29,single:1},[-1,-1])}}const{document:xi}=_e;function Bi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=D("span"),n=M("("),r=M(s),i=M(")"),F(t,"class",o=b(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&V(r,s),2&n[0]&&o!==(o=b(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&F(t,"class",o)},d(e){e&&N(t)}}}function Pi(e){let t;return{c(){t=D("div"),F(t,"class","load-more-options"),F(t,"slot","load-more-options-message")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Li(e){let t,n,r,i;const o=[Ui,Vi,Fi],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=x()},m(e,n){~t&&s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){~t&&s[t].d(e),e&&N(r)}}}function Fi(e){let t,n,r,i,o;return n=new Oe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Übernehmen"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[26]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Vi(e){let t,n,r,i,o;return n=new Ue({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title",e[17].title||"Generieren"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[25]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Ui(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Löschen"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[27]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Hi(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[zi]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function zi(e){let t,n;return t=new ki({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],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.target=e[4].name),t.$set(r)},i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wi(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Bi(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:Gi,minSearchLength:"3",$$slots:{"load-more-options-message":[Pi]},$$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}),Q.push((()=>Ee(r,"selection",u))),Q.push((()=>Ee(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Li(e),g=e[10]&&Hi(e);return{c(){t=D("div"),d&&d.c(),n=k(),Ie(r.$$.fragment),s=k(),m&&m.c(),a=k(),g&&g.c(),l=x(),H(t,"position","relative")},m(e,i){T(e,t,i),d&&d.m(t,null),$(t,n),Ae(r,t,null),$(t,s),m&&m.m(t,null),T(e,a,i),g&&g.m(e,i),T(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Bi(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],se((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],se((()=>o=!1))),r.$set(a),e[1]?m&&(fe(),pe(m,1,1,(()=>{m=null})),me()):m?(m.p(e,s),2&s[0]&&ge(m,1)):(m=Li(e),m.c(),ge(m,1),m.m(t,null)),e[10]?g?(g.p(e,s),1024&s[0]&&ge(g,1)):(g=Hi(e),g.c(),ge(g,1),g.m(l.parentNode,l)):g&&(fe(),pe(g,1,1,(()=>{g=null})),me())},i(e){c||(ge(r.$$.fragment,e),ge(m),ge(g),c=!0)},o(e){pe(r.$$.fragment,e),pe(m),pe(g),c=!1},d(e){e&&N(t),d&&d.d(),ve(r),m&&m.d(),e&&N(a),g&&g.d(e),e&&N(l)}}}async function*Gi(e){yield[{name:e}]}function Xi(e,n,r){const i=Y(),{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:_}=n,{notifyList:C}=n;const{properties:E={}}=d;let{placeholder:I,hint:A,readonly:v,required:S=!1,lookup:b="",view:$=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:O}=E;const[M,k]=b.split(":");let x=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=v,m&&(I="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:b,name:d.name,value:n})};q((async()=>{i("multi",{view:T.view,lookup:b,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!v&&b&&e.addEventListener("focus",L)}));const L=()=>{if(b){document.getElementById(l).blur();const e=_||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:b,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:_||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,_=e.reqQuantity),"notifyList"in e&&r(34,C=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,S=S&&!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)})(C)},[h,m,a,l,d,u,S,B,I,N,x,o,s,v,b,$,T,R,D,O,M,k,P,F,V,()=>{const e=u[R.itemQuantity]||_;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===$)return U();const e=_||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,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 qi extends be{constructor(e){var t;super(),xi.getElementById("svelte-1rbaejz-style")||((t=D("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}",$(xi.head,t)),Se(this,e,Xi,Wi,v,{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])}}const{document:ji}=_e;function Yi(e){e[26]=e[28].list,e[27]=e[28].items}function Zi(e,t,n){const r=e.slice();return r[29]=t[n],r}function Ki(e,t,n){const r=e.slice();return r[32]=t[n],r}function Qi(e,t,n){const r=e.slice();return r[32]=t[n],r}function Ji(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function eo(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[23](t)}Yi(e),n=new e[7]({props:{outline:!0,$$slots:{default:[to]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=no(Qi(e,r,t));return{c(){t=D("thead"),n=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(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=Qi(e,r,o);i[o]?i[o].p(s,t):(i[o]=no(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&N(t),R(i,e)}}}(e),I=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=oo(Zi(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);T(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=Zi(e,n,o);r[o]?r[o].p(s,i):(r[o]=oo(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){R(r,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){Yi(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],se((()=>a=!1))),s.$set(i),e[27]?.length&&E.p(e,t),e[26]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function to(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function no(e){let t,n,r=e[32]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function ro(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=io(Ki(e,r,t));return{c(){t=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=k(),F(t,"class","pointer svelte-14hcfjl"),z(t,"active",e[29]._id===e[0])},m(e,r){T(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);$(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=Ki(e,r,s);i[s]?i[s].p(a,o):(i[s]=io(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]&&z(t,"active",e[29]._id===e[0])},d(e){e&&N(t),R(i,e)}}}function io(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function oo(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&ro(e);return{c(){r&&r.c(),t=x()},m(e,n){r&&r.m(e,n),T(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=ro(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&N(t)}}}function so(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ao(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:so,then:eo,catch:Ji,value:28,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function lo(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ao]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function co(e,n,i){const o=Y(),{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:_}=n,{recordId:C}=n,{filter:E}=n,I="",A=g+Math.floor(9e3*Math.random()+1e3).toString()+"search";const v=(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(f);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&&Cd(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,_=e.viewValue),"recordId"in e&&i(20,C=e.recordId),"filter"in e&&i(21,E=e.filter)},[w,I,o,s,a,l,d,u,A,v,e=>()=>o("choose",{row:e}),async()=>{const e=await S,n="."+g+"#"+y;document.querySelector(n);let r={[y]:_},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),E&&(i=i.filter((e=>e._id!=E)));const o=e.display;return{list:i,items:await Pt(o,e,i)}},({detail:{value:e}})=>{i(1,I=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(v(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,I="")},h,f,g,y,_,C,E,()=>o("back"),function(e){I=e,i(1,I)}]}class uo extends be{constructor(e){var t;super(),ji.getElementById("svelte-14hcfjl-style")||((t=D("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}",$(ji.head,t)),Se(this,e,co,lo,v,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ho(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function fo(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),Q.push((()=>Ee(n,"value",s)));let l=!e[6]&&mo(e);return{c(){t=D("div"),Ie(n.$$.fragment),i=k(),l&&l.c(),H(t,"position","relative")},m(e,r){T(e,t,r),Ae(n,t,null),$(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],se((()=>r=!1))),n.$set(o),e[6]?l&&(fe(),pe(l,1,1,(()=>{l=null})),me()):l?(l.p(e,i),64&i&&ge(l,1)):(l=mo(e),l.c(),ge(l,1),l.m(t,null))},i(e){o||(ge(n.$$.fragment,e),ge(l),o=!0)},o(e){pe(n.$$.fragment,e),pe(l),o=!1},d(e){e&&N(t),ve(n),l&&l.d()}}}function mo(e){let t,n,r,i,o;return n=new wt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-wbrqzu")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[17]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function go(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function po(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[wo]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function wo(e){let t,n;return t=new uo({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function yo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:go,then:fo,catch:ho,value:27,blocks:[,,,]};we(e[16](),i);let o=e[8]&&po(e);return{c(){i.block.c(),t=k(),o&&o.c(),n=x()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,T(e,t,s),o&&o.m(e,s),T(e,n,s),r=!0},p(t,[r]){ye(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&ge(o,1)):(o=po(e),o.c(),ge(o,1),o.m(n.parentNode,n)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){r||(ge(i.block),ge(o),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}pe(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&N(t),o&&o.d(e),e&&N(n)}}}function _o(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:_,required:C=!1,view:E}=g,I=!1;const A=()=>{n(8,I=!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,I,p,r,i,w,_,C,E,async()=>(n(9,p=l[E.selection]),!0),()=>{n(8,I=!0)},({detail:e})=>{n(0,d=e.row[E.value?E.value:"_id"]),A()},A,m,function(e){d=e,n(0,d)},function(e){I=e,n(8,I)}]}class Co extends be{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=D("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",$(document.head,t)),Se(this,e,_o,yo,v,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Eo(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Io(e){let t;return{c(){t=D("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ao(e){let t;return{c(){t=D("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function vo(e){let t,n,r,i,o=e[12]+"";return{c(){t=D("option"),n=M(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){T(e,t,r),$(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&V(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&&N(t)}}}function So(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Ao:Io}let r=n(e),i=r(e);return{c(){i.c(),t=x()},m(e,n){i.m(e,n),T(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&&N(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=vo(Eo(e,a,t));return{c(){t=D("select"),s&&s.c(),n=x();for(let e=0;e<l.length;e+=1)l[e].c();F(t,"class",r=b(e[3]||e[4])+" svelte-5xpzvo"),F(t,"id",e[2]),F(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){T(r,t,a),s&&s.m(t,null),$(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=B(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=Eo(e,a,r);l[r]?l[r].p(i,n):(l[r]=vo(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=b(e[3]||e[4])+" svelte-5xpzvo")&&F(t,"class",r),4&n&&F(t,"id",e[2]),4&n&&F(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:_,o:_,d(e){e&&N(t),s&&s.d(),R(l,e),i=!1,o()}}}function bo(e,t,n){const r=Y();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 $o extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=D("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}",$(document.head,t)),Se(this,e,bo,So,v,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function To(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=D("input"),r=k(),Ie(i.$$.fragment),F(t,"type","string"),F(t,"class",n=e[2]||e[3]),F(t,"id",e[1]),F(t,"name",e[1]),t.hidden=!0},m(n,l){T(n,t,l),U(t,e[0]),T(n,r,l),Ae(i,n,l),o=!0,s||(a=B(t,"input",e[12]),s=!0)},p(e,[r]){(!o||12&r&&n!==(n=e[2]||e[3]))&&F(t,"class",n),(!o||2&r)&&F(t,"id",e[1]),(!o||2&r)&&F(t,"name",e[1]),1&r&&U(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||(ge(i.$$.fragment,e),o=!0)},o(e){pe(i.$$.fragment,e),o=!1},d(e){e&&N(t),e&&N(r),ve(i,e),s=!1,a()}}}function No(e,t,n){const r=Y(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{noForm:d=!1}=t,{classId:u}=t,{readonly:h}=t,{disabled:f}=t,{required:m}=t,{notifyList:g}=t;o||(o=void 0),a.properties;const p=e=>{r("change",{value:e})};return e.$$set=e=>{"value"in e&&n(0,o=e.value),"id"in e&&n(1,s=e.id),"item"in e&&n(9,a=e.item),"record"in e&&n(10,l=e.record),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId),"readonly"in e&&n(4,h=e.readonly),"disabled"in e&&n(5,f=e.disabled),"required"in e&&n(6,m=e.required),"notifyList"in e&&n(11,g=e.notifyList)},e.$$.update=()=>{if(2048&e.$$.dirty&&(async()=>{const e=a.properties?.value?.formula;e?.operator&&r("formula",{item:a})})(),1585&e.$$.dirty&&l&&l[a.name])try{f||h||n(0,o=er(l[a.name],o))}catch{}},[o,s,d,u,h,f,m,i,({detail:e})=>{n(0,o=er(e.value,o)),p(o)},a,l,g,function(){o=this.value,n(0,o),n(10,l),n(9,a),n(5,f),n(4,h)}]}class Ro extends be{constructor(e){super(),Se(this,e,No,To,v,{value:0,id:1,item:9,record:10,noForm:2,classId:3,readonly:4,disabled:5,required:6,notifyList:11})}}function Do(e){let t;return{c(){t=M("Stunden")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Oo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Do]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mo(e){let t;return{c(){t=M("Minuten")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function ko(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Mo]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function xo(e){let t;return{c(){t=M("Jetzt")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Bo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[xo]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Po(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":[Bo],"minutes-label":[ko],"hours-label":[Oo]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=D("input"),r=k(),Ie(i.$$.fragment),o=k(),Ie(s.$$.fragment),F(t,"type","string"),F(t,"class",n=e[2]||e[3]),F(t,"id",e[1]),F(t,"name",e[1]),t.hidden=!0},m(n,d){T(n,t,d),U(t,e[0]),T(n,r,d),Ae(i,n,d),T(n,o,d),Ae(s,n,d),a=!0,l||(c=B(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&F(t,"class",n),(!a||2&r)&&F(t,"id",e[1]),(!a||2&r)&&F(t,"name",e[1]),1&r&&U(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||(ge(i.$$.fragment,e),ge(s.$$.fragment,e),a=!0)},o(e){pe(i.$$.fragment,e),pe(s.$$.fragment,e),a=!1},d(e){e&&N(t),e&&N(r),ve(i,e),e&&N(o),ve(s,e),l=!1,c()}}}function Lo(e,t,n){const r=Y(),{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=er(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class Fo extends be{constructor(e){super(),Se(this,e,Lo,Po,v,{value:0,id:1,noForm:2,classId:3})}}function Vo(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=D("input"),o=k(),s=D("input"),d=k(),Ie(u.$$.fragment),h=M(" /\n"),Ie(f.$$.fragment),F(t,"type","string"),F(t,"class",n=e[1]||e[2]),F(t,"id",r=e[0]+"_from"),F(t,"name",i=e[0]+"_from"),t.hidden=!0,F(s,"type","string"),F(s,"class",a=e[1]||e[2]),F(s,"id",l=e[0]+"_to"),F(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){T(n,t,r),U(t,e[7]),T(n,o,r),T(n,s,r),U(s,e[8]),T(n,d,r),Ae(u,n,r),T(n,h,r),Ae(f,n,r),m=!0,g||(p=[B(t,"input",e[13]),B(s,"input",e[14])],g=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&F(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&F(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&F(t,"name",i),128&o&&U(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&F(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&F(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&F(s,"name",c),256&o&&U(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||(ge(u.$$.fragment,e),ge(f.$$.fragment,e),m=!0)},o(e){pe(u.$$.fragment,e),pe(f.$$.fragment,e),m=!1},d(e){e&&N(t),e&&N(o),e&&N(s),e&&N(d),ve(u,e),e&&N(h),ve(f,e),g=!1,I(p)}}}function Uo(e,t,n){const r=Y(),{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=er(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=er(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 Ho extends be{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=D("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",$(document.head,t)),Se(this,e,Uo,Vo,v,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zo(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:Wo,placeholder:Go,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=D("div"),Ie(n.$$.fragment),H(t,"max-width","4em")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}const Wo="([01][0-9]|2[0-3]):([0-5][0-9])",Go="";function Xo(e,t,n){const r=Y(),{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 qo extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=D("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",$(document.head,t)),Se(this,e,Xo,zo,v,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:jo}=_e;function Yo(e,t,n){const r=e.slice();return r[16]=t[n],r}function Zo(e,t,n){const r=e.slice();return r[19]=t[n],r[21]=n,r}function Ko(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Qo(e){let t,n,r=e[15],i=[];for(let t=0;t<r.length;t+=1)i[t]=es(Yo(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=Yo(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=es(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function Jo(e){let t,n,r=e[2](e[16],e[19])+"",i=e[21]&&function(){let e;return{c(){e=M(", ")},m(t,n){T(t,e,n)},d(t){t&&N(e)}}}();return{c(){t=D("span"),i&&i.c(),n=M(r),F(t,"class","lookupValue")},m(e,r){T(e,t,r),i&&i.m(t,null),$(t,n)},p(e,t){1&t&&r!==(r=e[2](e[16],e[19])+"")&&V(n,r)},d(e){e&&N(t),i&&i.d()}}}function es(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]=Jo(Zo(e,c,t));return i=new Ze({props:{size:"18"}}),{c(){t=D("div");for(let e=0;e<d.length;e+=1)d[e].c();n=k(),r=D("span"),Ie(i.$$.fragment),o=k(),F(r,"class","feather pointer svelte-1r8jgd4"),F(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){T(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);$(t,n),$(t,r),Ae(i,r,null),$(t,o),s=!0,a||(l=B(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=Zo(e,c,r);d[r]?d[r].p(o,i):(d[r]=Jo(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||(ge(i.$$.fragment,e),s=!0)},o(e){pe(i.$$.fragment,e),s=!1},d(e){e&&N(t),R(d,e),ve(i),a=!1,l()}}}function ts(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ns(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ts,then:Qo,catch:Ko,value:15,blocks:[,,,]};return we(e[1](),r),{c(){t=D("div"),r.block.c(),F(t,"class","lookup svelte-1r8jgd4")},m(e,i){T(e,t,i),r.block.m(t,r.anchor=null),r.mount=()=>t,r.anchor=null,n=!0},p(t,[n]){ye(r,e=t,n)},i(e){n||(ge(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}n=!1},d(e){e&&N(t),r.block.d(),r.token=null,r=null}}}function rs(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=()=>{ie().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 is extends be{constructor(e){var t;super(),jo.getElementById("svelte-1r8jgd4-style")||((t=D("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}",$(jo.head,t)),Se(this,e,rs,ns,v,{id:4,item:5,praefix:6,record:7})}}function os(e){let t,n,r;return n=new lt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ss(e){let t,n,r,i,o;return n=new lt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[9]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(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[12]);const a=[ss,os],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}const ls=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 cs(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 ls(e);window.open(t,"_blank")},f,m,function(t){Z(e,t)}]}class ds extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,cs,as,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function us(e){let t,n,r;return n=new Je({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function hs(e){let t,n,r,i,o;return n=new Je({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[9]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function fs(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=[hs,us],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}function ms(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){Z(e,t)}]}class gs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,ms,fs,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function ps(e){let t,n,r;return n=new ut({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ws(e){let t,n,r,i,o;return n=new ut({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[11]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function ys(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=[ws,ps],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(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,{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){Z(e,t)}]}class Cs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,_s,ys,v,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Es(e){let t,n,r;return n=new ot({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Is(e){let t,n,r,i,o;return n=new ot({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[11]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function As(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=[Is,Es],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}function vs(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){Z(e,t)}]}class Ss extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,vs,As,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const bs=["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 $s(e){let t;return{c(){t=D("textarea"),F(t,"id",e[0]),H(t,"visibility","hidden")},m(n,r){T(n,t,r),e[18](t)},p(e,n){1&n&&F(t,"id",e[0])},d(n){n&&N(t),e[18](null)}}}function Ts(e){let t;return{c(){t=D("div"),F(t,"id",e[0])},m(n,r){T(n,t,r),e[17](t)},p(e,n){1&n&&F(t,"id",e[0])},d(n){n&&N(t),e[17](null)}}}function Ns(e){let t;function n(e,t){return e[1]?Ts:$s}let r=n(e),i=r(e);return{c(){t=D("div"),i.c(),F(t,"class",e[2])},m(n,r){T(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&&F(t,"class",e[2])},i:_,o:_,d(n){n&&N(t),i.d(),e[19](null)}}}const Rs=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Ds=(()=>{let e={listeners:[],scriptId:Rs("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 Os(e,t,n){var r;let i,o,s,{id:a=Rs("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;const C=Y(),E=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},I=()=>{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)=>{bs.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,C),"function"==typeof f.setup&&f.setup(e)}});n(4,o.style.visibility="",o),E().init(e)};return q((()=>{if(null!==E())I();else{const e=h||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Ds.load(i.ownerDocument,e,(()=>{I()}))}})),j((()=>{var e;s&&(null===(e=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!==_&&(n(16,_=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,_,function(e){Q[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){Q[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){Q[e?"unshift":"push"]((()=>{i=e,n(3,i)}))}]}class Ms extends be{constructor(e){super(),Se(this,e,Os,Ns,v,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function ks(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 Ms({props:c}),Q.push((()=>Ee(n,"value",l))),{c(){t=D("div"),Ie(n.$$.fragment),i=k(),o=D("input"),F(o,"class",s=e[1]||e[2]),F(o,"id",e[3]),F(o,"name",e[3]),o.value=e[0],o.hidden=!0,H(t,"min-height","10em"),H(t,"margin-top","-1em")},m(e,r){T(e,t,r),Ae(n,t,null),$(t,i),$(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],se((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&F(o,"class",s),(!a||8&t)&&F(o,"id",e[3]),(!a||8&t)&&F(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(ge(n.$$.fragment,e),a=!0)},o(e){pe(n.$$.fragment,e),a=!1},d(e){e&&N(t),ve(n)}}}function xs(e){let t,n,r=e[6]&&ks(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&ge(r,1)):(r=ks(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Bs(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 Ps extends be{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=D("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}",$(document.head,t)),Se(this,e,Bs,xs,v,{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.749");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 _(){}function C(e){return e()}function E(){return Object.create(null)}function I(e){e.forEach(C)}function A(e){return"function"==typeof e}function v(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function S(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return _;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function b(e){return null==e?"":e}function $(e,t){e.appendChild(t)}function T(e,t,n){e.insertBefore(t,n||null)}function N(e){e.parentNode.removeChild(e)}function R(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function D(e){return document.createElement(e)}function O(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function M(e){return document.createTextNode(e)}function k(){return M(" ")}function x(){return M("")}function B(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function P(e){return function(t){return t.preventDefault(),e.call(this,t)}}function L(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function F(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function V(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function U(e,t){e.value=null==t?"":t}function H(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function z(e,t,n){e.classList[n?"add":"remove"](t)}let W;function G(e){W=e}function X(){if(!W)throw new Error("Function called outside component initialization");return W}function q(e){X().$$.on_mount.push(e)}function j(e){X().$$.on_destroy.push(e)}function Y(){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 Z(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const K=[],Q=[],J=[],ee=[],te=Promise.resolve();let ne=!1;function re(){ne||(ne=!0,te.then(ce))}function ie(){return re(),te}function oe(e){J.push(e)}function se(e){ee.push(e)}let ae=!1;const le=new Set;function ce(){if(!ae){ae=!0;do{for(let e=0;e<K.length;e+=1){const t=K[e];G(t),de(t.$$)}for(G(null),K.length=0;Q.length;)Q.pop()();for(let e=0;e<J.length;e+=1){const t=J[e];le.has(t)||(le.add(t),t())}J.length=0}while(K.length);for(;ee.length;)ee.pop()();ne=!1,ae=!1,le.clear()}}function de(e){if(null!==e.fragment){e.update(),I(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(oe)}}const ue=new Set;let he;function fe(){he={r:0,c:[],p:he}}function me(){he.r||I(he.c),he=he.p}function ge(e,t){e&&e.i&&(ue.delete(e),e.i(t))}function pe(e,t,n,r){if(e&&e.o){if(ue.has(e))return;ue.add(e),he&&he.c.push((()=>{ue.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function we(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&&(fe(),pe(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),me())})):t.block.d(1),a.c(),ge(a,1),a.m(t.mount(),t.anchor),l=!0),t.block=a,t.blocks&&(t.blocks[r]=a),l&&ce()}if((i=e)&&"object"==typeof i&&"function"==typeof i.then){const n=X();if(e.then((e=>{G(n),r(t.then,1,t.value,e),G(null)}),(e=>{if(G(n),r(t.catch,2,t.error,e),G(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}var i}function ye(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 _e="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ce(e,t){pe(e,1,1,(()=>{t.delete(e.key)}))}function Ee(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||oe((()=>{const t=o.map(C).filter(A);s?s.push(...t):I(t),e.$$.on_mount=[]})),a.forEach(oe)}function ve(e,t){const n=e.$$;null!==n.fragment&&(I(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=W;G(e);const l=e.$$={fragment:null,ctx:null,props:o,update:_,not_equal:i,bound:E(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:t.context||[]),callbacks:E(),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]&&(K.push(e),re(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],l.update(),c=!0,I(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(N)}else l.fragment&&l.fragment.c();t.intro&&ge(e.$$.fragment),Ae(e,t.target,t.anchor,t.customElement),ce()}G(a)}class be{$destroy(){ve(this,1),this.$destroy=_}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function $e(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("line"),i=O("line"),F(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"),F(r,"x1","12"),F(r,"y1","9"),F(r,"x2","12"),F(r,"y2","13"),F(i,"x1","12"),F(i,"y1","17"),F(i,"x2","12.01"),F(i,"y2","17"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-alert-triangle "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-alert-triangle "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Te(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 Ne extends be{constructor(e){super(),Se(this,e,Te,$e,v,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("circle"),r=O("polyline"),i=O("line"),F(n,"cx","12"),F(n,"cy","12"),F(n,"r","10"),F(r,"points","8 12 12 16 16 12"),F(i,"x1","12"),F(i,"y1","8"),F(i,"x2","12"),F(i,"y2","16"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-arrow-down-circle "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-arrow-down-circle "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function De(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 Oe extends be{constructor(e){super(),Se(this,e,De,Re,v,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("circle"),F(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"),F(r,"cx","12"),F(r,"cy","13"),F(r,"r","4"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-camera "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-camera "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function ke(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class xe extends be{constructor(e){super(),Se(this,e,ke,Me,v,{size:0,strokeWidth:1,class:2})}}function Be(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),F(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),F(r,"points","22 4 12 14.01 9 11.01"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-check-circle "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-check-circle "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function Pe(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 Le extends be{constructor(e){super(),Se(this,e,Pe,Be,v,{size:0,strokeWidth:1,class:2})}}function Fe(e){let t,n,r;return{c(){t=O("svg"),n=O("path"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",r="feather feather-command "+e[2])},m(e,r){T(e,t,r),$(t,n)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-command "+e[2])&&F(t,"class",r)},i:_,o:_,d(e){e&&N(t)}}}function Ve(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 Ue extends be{constructor(e){super(),Se(this,e,Ve,Fe,v,{size:0,strokeWidth:1,class:2})}}function He(e){let t,n,r,i;return{c(){t=O("svg"),n=O("polyline"),r=O("path"),F(n,"points","9 10 4 15 9 20"),F(r,"d","M20 4v7a4 4 0 0 1-4 4H4"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-corner-down-left "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-corner-down-left "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(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 We extends be{constructor(e){super(),Se(this,e,ze,He,v,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("line"),i=O("line"),F(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),F(r,"x1","18"),F(r,"y1","9"),F(r,"x2","12"),F(r,"y2","15"),F(i,"x1","12"),F(i,"y1","9"),F(i,"x2","18"),F(i,"y2","15"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-delete "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-delete "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(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,Ge,v,{size:0,strokeWidth:1,class:2})}}function je(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),i=O("line"),F(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),F(r,"points","15 3 21 3 21 9"),F(i,"x1","10"),F(i,"y1","14"),F(i,"x2","21"),F(i,"y2","3"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-external-link "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-external-link "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Ye(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 Ze extends be{constructor(e){super(),Se(this,e,Ye,je,v,{size:0,strokeWidth:1,class:2})}}function Ke(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("circle"),r=O("line"),i=O("path"),F(n,"cx","12"),F(n,"cy","12"),F(n,"r","10"),F(r,"x1","2"),F(r,"y1","12"),F(r,"x2","22"),F(r,"y2","12"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-globe "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-globe "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function Qe(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class Je extends be{constructor(e){super(),Se(this,e,Qe,Ke,v,{size:0,strokeWidth:1,class:2})}}function et(e){let t,n,r,i,o,s,a,l;return{c(){t=O("svg"),n=O("line"),r=O("line"),i=O("line"),o=O("line"),s=O("line"),a=O("line"),F(n,"x1","8"),F(n,"y1","6"),F(n,"x2","21"),F(n,"y2","6"),F(r,"x1","8"),F(r,"y1","12"),F(r,"x2","21"),F(r,"y2","12"),F(i,"x1","8"),F(i,"y1","18"),F(i,"x2","21"),F(i,"y2","18"),F(o,"x1","3"),F(o,"y1","6"),F(o,"x2","3.01"),F(o,"y2","6"),F(s,"x1","3"),F(s,"y1","12"),F(s,"x2","3.01"),F(s,"y2","12"),F(a,"x1","3"),F(a,"y1","18"),F(a,"x2","3.01"),F(a,"y2","18"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",l="feather feather-list "+e[2])},m(e,l){T(e,t,l),$(t,n),$(t,r),$(t,i),$(t,o),$(t,s),$(t,a)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&l!==(l="feather feather-list "+e[2])&&F(t,"class",l)},i:_,o:_,d(e){e&&N(t)}}}function tt(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 nt extends be{constructor(e){super(),Se(this,e,tt,et,v,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("polyline"),F(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"),F(r,"points","22,6 12,13 2,6"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-mail "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-mail "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function it(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class ot extends be{constructor(e){super(),Se(this,e,it,rt,v,{size:0,strokeWidth:1,class:2})}}function st(e){let t,n,r,i;return{c(){t=O("svg"),n=O("path"),r=O("circle"),F(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),F(r,"cx","12"),F(r,"cy","10"),F(r,"r","3"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-map-pin "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-map-pin "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function at(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 lt extends be{constructor(e){super(),Se(this,e,at,st,v,{size:0,strokeWidth:1,class:2})}}function ct(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("polyline"),r=O("line"),i=O("path"),F(n,"points","23 7 23 1 17 1"),F(r,"x1","16"),F(r,"y1","8"),F(r,"x2","23"),F(r,"y2","1"),F(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"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-phone-outgoing "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-phone-outgoing "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function dt(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 ut extends be{constructor(e){super(),Se(this,e,dt,ct,v,{size:0,strokeWidth:1,class:2})}}function ht(e){let t,n,r,i,o;return{c(){t=O("svg"),n=O("polyline"),r=O("path"),i=O("rect"),F(n,"points","6 9 6 2 18 2 18 9"),F(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"),F(i,"x","6"),F(i,"y","14"),F(i,"width","12"),F(i,"height","8"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",o="feather feather-printer "+e[2])},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-printer "+e[2])&&F(t,"class",o)},i:_,o:_,d(e){e&&N(t)}}}function ft(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 mt extends be{constructor(e){super(),Se(this,e,ft,ht,v,{size:0,strokeWidth:1,class:2})}}function gt(e){let t,n,r,i;return{c(){t=O("svg"),n=O("circle"),r=O("line"),F(n,"cx","11"),F(n,"cy","11"),F(n,"r","8"),F(r,"x1","21"),F(r,"y1","21"),F(r,"x2","16.65"),F(r,"y2","16.65"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width",e[0]),F(t,"height",e[0]),F(t,"fill","none"),F(t,"viewBox","0 0 24 24"),F(t,"stroke","currentColor"),F(t,"stroke-width",e[1]),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class",i="feather feather-search "+e[2])},m(e,i){T(e,t,i),$(t,n),$(t,r)},p(e,[n]){1&n&&F(t,"width",e[0]),1&n&&F(t,"height",e[0]),2&n&&F(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-search "+e[2])&&F(t,"class",i)},i:_,o:_,d(e){e&&N(t)}}}function pt(e,t,n){let{size:r="100%"}=t,{strokeWidth:i=2}=t,{class:o=""}=t;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),e.$$set=e=>{"size"in e&&n(0,r=e.size),"strokeWidth"in e&&n(1,i=e.strokeWidth),"class"in e&&n(2,o=e.class)},[r,i,o]}class wt extends be{constructor(e){super(),Se(this,e,pt,gt,v,{size:0,strokeWidth:1,class:2})}}const{document:yt}=_e;function _t(e){e[45]=e[46].items}function Ct(e,t,n){const r=e.slice();return r[47]=t[n],r[49]=n,r}function Et(e,t,n){const r=e.slice();return r[50]=t[n],r}function It(e,t,n){const r=e.slice();return r[50]=t[n],r}function At(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function vt(e){let t,n,r,i,o,s;_t(e);let a=e[5]?.length&&St(e),l=e[45]?.length&&$t(e),c=e[5]?.length&&Rt(e);return{c(){a&&a.c(),t=k(),n=D("div"),r=D("table"),l&&l.c(),i=k(),o=D("tbody"),c&&c.c(),F(r,"striped",""),F(r,"class","svelte-v0ogws"),F(n,"class","eList svelte-v0ogws")},m(e,d){a&&a.m(e,d),T(e,t,d),T(e,n,d),$(n,r),l&&l.m(r,null),$(r,i),$(r,o),c&&c.m(o,null),s=!0},p(e,n){_t(e),e[5]?.length?a?(a.p(e,n),32&n[0]&&ge(a,1)):(a=St(e),a.c(),ge(a,1),a.m(t.parentNode,t)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me()),e[45]?.length?l?l.p(e,n):(l=$t(e),l.c(),l.m(r,i)):l&&(l.d(1),l=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&ge(c,1)):(c=Rt(e),c.c(),ge(c,1),c.m(o,null)):c&&(fe(),pe(c,1,1,(()=>{c=null})),me())},i(e){s||(ge(a),ge(c),s=!0)},o(e){pe(a),pe(c),s=!1},d(e){a&&a.d(e),e&&N(t),e&&N(n),l&&l.d(),c&&c.d()}}}function St(e){let t,n,r,i,o,s,a,l,c,d,u,h=e[6]&&bt(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}),Q.push((()=>Ee(i,"value",f))),i.$on("input",e[14]),l=new qe({props:{size:"18"}}),{c(){h&&h.c(),t=k(),n=D("div"),r=M("Suchen: "),Ie(i.$$.fragment),s=k(),a=D("span"),Ie(l.$$.fragment),F(a,"class","feather pointer svelte-v0ogws"),H(n,"margin-bottom","1em"),H(n,"position","relative")},m(o,f){h&&h.m(o,f),T(o,t,f),T(o,n,f),$(n,r),Ae(i,n,null),$(n,s),$(n,a),Ae(l,a,null),c=!0,d||(u=B(a,"click",e[16]),d=!0)},p(e,n){e[6]?h?64&n[0]&&ge(h,1):(h=bt(e),h.c(),ge(h,1),h.m(t.parentNode,t)):h&&(fe(),pe(h,1,1,(()=>{h=null})),me());const r={};!o&&8&n[0]&&(o=!0,r.value=e[3],se((()=>o=!1))),i.$set(r)},i(e){c||(ge(h),ge(i.$$.fragment,e),ge(l.$$.fragment,e),c=!0)},o(e){pe(h),pe(i.$$.fragment,e),pe(l.$$.fragment,e),c=!1},d(e){h&&h.d(e),e&&N(t),e&&N(n),ve(i),ve(l),d=!1,u()}}}function bt(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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function $t(e){let t,n,r,i=e[4]&&e[0]&&Tt(),o=e[45],s=[];for(let t=0;t<o.length;t+=1)s[t]=Nt(It(e,o,t));return{c(){t=D("thead"),n=D("tr"),i&&i.c(),r=k();for(let e=0;e<s.length;e+=1)s[e].c();F(n,"class","svelte-v0ogws"),F(t,"class","svelte-v0ogws")},m(e,o){T(e,t,o),$(t,n),i&&i.m(n,null),$(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=Tt(),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=It(e,o,r);s[r]?s[r].p(i,t):(s[r]=Nt(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&&N(t),i&&i.d(),R(s,e)}}}function Tt(e){let t;return{c(){t=D("th"),F(t,"class","svelte-v0ogws")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Nt(e){let t,n,r=e[50]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-v0ogws")},m(e,r){T(e,t,r),$(t,n)},p(e,t){4&t[0]&&r!==(r=e[50]?.designation+"")&&V(n,r)},d(e){e&&N(t)}}}function Rt(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=Ct(e,o,t),a=s(n);i.set(a,r[t]=kt(a,n))}return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,i){for(let t=0;t<r.length;t+=1)r[t].m(e,i);T(e,t,i),n=!0},p(e,n){178239&n[0]&&(o=e[5],fe(),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 _=new Set,C=new Set;function E(e){ge(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)||_.has(r)?E(t):C.has(i)?h--:y.get(r)>y.get(i)?(C.add(r),E(t)):(_.add(i),h--):(l(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||l(t,s)}for(;f;)E(p[f-1]);return p}(r,n,s,1,e,o,i,t.parentNode,Ce,kt,t,Ct),me())},i(e){if(!n){for(let e=0;e<o.length;e+=1)ge(r[e]);n=!0}},o(e){for(let e=0;e<r.length;e+=1)pe(r[e]);n=!1},d(e){for(let t=0;t<r.length;t+=1)r[t].d(e);e&&N(t)}}}function Dt(e){let t,n,r,i,o,s,a=e[4]&&e[0]&&Ot(e),l=e[45],c=[];for(let t=0;t<l.length;t+=1)c[t]=Mt(Et(e,l,t));return{c(){t=D("tr"),a&&a.c(),n=k();for(let e=0;e<c.length;e+=1)c[e].c();r=k(),F(t,"class","pointer svelte-v0ogws"),z(t,"active",e[47]._id===e[1])},m(l,d){T(l,t,d),a&&a.m(t,null),$(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);$(t,r),i=!0,o||(s=B(t,"click",L((function(){A(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]&&ge(a,1)):(a=Ot(e),a.c(),ge(a,1),a.m(t,n)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me()),10276&o[0]){let n;for(l=e[45],n=0;n<l.length;n+=1){const i=Et(e,l,n);c[n]?c[n].p(i,o):(c[n]=Mt(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]&&z(t,"active",e[47]._id===e[1])},i(e){i||(ge(a),i=!0)},o(e){pe(a),i=!1},d(e){e&&N(t),a&&a.d(),R(c,e),o=!1,s()}}}function Ot(e){let t,n,r,i,o;return n=new Ze({props:{size:"18"}}),{c(){t=D("td"),Ie(n.$$.fragment),F(t,"class","editRow svelte-v0ogws"),H(t,"color","#326173")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",L((function(){A(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),i=!0)},p(t,n){e=t},i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Mt(e){let t,n,r,i=e[11](e[47],e[50])+"";return{c(){t=D("td"),n=M(i),F(t,"class",r=b(e[50].type)+" svelte-v0ogws")},m(e,r){T(e,t,r),$(t,n)},p(e,o){36&o[0]&&i!==(i=e[11](e[47],e[50])+"")&&V(n,i),4&o[0]&&r!==(r=b(e[50].type)+" svelte-v0ogws")&&F(t,"class",r)},d(e){e&&N(t)}}}function kt(e,t){let n,r,i,o=t[15](t[47],t[45],t[3]),s=o&&Dt(t);return{key:e,first:null,c(){n=x(),s&&s.c(),r=x(),this.first=n},m(e,t){T(e,n,t),s&&s.m(e,t),T(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]&&ge(s,1)):(s=Dt(t),s.c(),ge(s,1),s.m(r.parentNode,r)):s&&(fe(),pe(s,1,1,(()=>{s=null})),me())},i(e){i||(ge(s),i=!0)},o(e){pe(s),i=!1},d(e){e&&N(n),s&&s.d(e),e&&N(r)}}}function xt(e){let t,n;return t=new e[7]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Bt(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:xt,then:vt,catch:At,value:46,blocks:[,,,]};return we(n=e[2]&&e[13](),i),{c(){t=x(),i.block.c()},m(e,n){T(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]())&&we(n,i)||ye(i,e,r)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),i.block.d(e),i.token=null,i=null}}}const Pt=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 Lt(e,i,o){let s;let a=JSON.parse(n.getItem("Locale")).id;const l=Y(),{Loading:d,TextField:h}=c,{currentTasks:f}=u;S(e,f,(e=>o(33,s=e)));let g,w,y,_,{inputList:C}=i,{eventId:E}=i,{prevEventId:I}=i,{className:A}=i,{rowId:v}=i,{filterForReady:b=!1}=i,{refStatus:$}=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=A+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));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(A),U=async(e,n)=>{if($)return o(18,$=[].concat($)),e.filter((e=>!!$.find((t=>e._task.status===t))));if("Information"===n.state.task)return e;if(I){const n=await t.getEvent(I);if("report"===n?.output?.type)return e;if(n?.input?.class?.length&&n.input.class[0].name===A)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 _d(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 wd(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&&(Cd(t.class,e.eventId),o(2,k=!o(2,k=!1)))}));return e.$$set=e=>{"inputList"in e&&o(20,C=e.inputList),"eventId"in e&&o(21,E=e.eventId),"prevEventId"in e&&o(22,I=e.prevEventId),"className"in e&&o(23,A=e.className),"rowId"in e&&o(1,v=e.rowId),"filterForReady"in e&&o(24,b=e.filterForReady),"refStatus"in e&&o(18,$=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,v,k,x,g,y,P,d,h,f,B,F,(e,t)=>n=>{o(19,O=!0);const r=L?e:_[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=_=H(w.displaySort,await C||await gd(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||!b&&!$||o(5,y=await U(y,w));const{display:c}=w;let d=await Pt(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=_.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")},$,O,C,E,I,A,b,N,R,D,M,function(e){x=e,o(3,x)}]}class Ft extends be{constructor(e){var t;super(),yt.getElementById("svelte-v0ogws-style")||((t=D("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}",$(yt.head,t)),Se(this,e,Lt,Bt,v,{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 Vt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Ut(e){let t,n,r=e[41]&&Ht(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[41]?r?(r.p(e,n),8&n[0]&&ge(r,1)):(r=Ht(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Ht(e){let t,n;return t=new e[21]({props:{title:e[16]?"Auswahl":e[0],class:"eList "+(e[14]?"form":""),$$slots:{default:[Qt]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function zt(e){let t,n;return t=new Id({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){A(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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wt(e){let t,n,r,i,o,s,a;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const l=[Xt,Gt],c=[];function d(e,t){return e[16]?0:1}return r=d(e),i=c[r]=l[r](e),s=new Ft({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=k(),i.c(),o=k(),Ie(s.$$.fragment)},m(e,i){Ae(t,e,i),T(e,n,i),c[r].m(e,i),T(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):(fe(),pe(c[u],1,1,(()=>{c[u]=null})),me(),i=c[r],i?i.p(e,n):(i=c[r]=l[r](e),i.c()),ge(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||(ge(t.$$.fragment,e),ge(i),ge(s.$$.fragment,e),a=!0)},o(e){pe(t.$$.fragment,e),pe(i),pe(s.$$.fragment,e),a=!1},d(e){ve(t,e),e&&N(n),c[r].d(e),e&&N(o),ve(s,e)}}}function Gt(e){let t,n,r,i;n=new e[23]({props:{outline:!0,$$slots:{default:[qt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let o=e[25]&&e[10]&&jt(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o&&o.c(),F(t,"class","form--buttons svelte-jb5mrh")},m(e,s){T(e,t,s),Ae(n,t,null),$(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]&&ge(o,1)):(o=jt(e),o.c(),ge(o,1),o.m(t,null)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){i||(ge(n.$$.fragment,e),ge(o),i=!0)},o(e){pe(n.$$.fragment,e),pe(o),i=!1},d(e){e&&N(t),ve(n),o&&o.d()}}}function Xt(e){let t,n,r,i,o,s,a=e[19]&&Zt(e);return r=new e[23]({props:{outline:!0,$$slots:{default:[Kt]},$$scope:{ctx:e}}}),r.$on("click",e[28]),o=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){a&&a.c(),t=k(),n=D("div"),Ie(r.$$.fragment),i=k(),Ie(o.$$.fragment),F(n,"class","form--buttons svelte-jb5mrh")},m(e,l){a&&a.m(e,l),T(e,t,l),T(e,n,l),Ae(r,n,null),T(e,i,l),Ae(o,e,l),s=!0},p(e,n){e[19]?a?(a.p(e,n),524288&n[0]&&ge(a,1)):(a=Zt(e),a.c(),ge(a,1),a.m(t.parentNode,t)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me());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||(ge(a),ge(r.$$.fragment,e),ge(o.$$.fragment,e),s=!0)},o(e){pe(a),pe(r.$$.fragment,e),pe(o.$$.fragment,e),s=!1},d(e){a&&a.d(e),e&&N(t),e&&N(n),ve(r),e&&N(i),ve(o,e)}}}function qt(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function jt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Yt]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Yt(e){let t;return{c(){t=M("Neu")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Zt(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kt(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Qt(e){let t,n,r,i;const o=[Wt,zt],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=x()},m(e,n){s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r))},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){s[t].d(e),e&&N(r)}}}function Jt(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function en(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Jt,then:Ut,catch:Vt,value:41,blocks:[,,,]};return we(n=e[26](e[3]),i),{c(){t=x(),i.block.c()},m(e,n){T(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]))&&we(n,i)||ye(i,e,r)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),i.block.d(e),i.token=null,i=null}}}function tn(e,n,r){let i;const{Dialog:o,Divider:s,Button:a}=c,l=Y(),{currentTasks:d}=u;S(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:_=!1}=n,{showEdit:C=!0}=n,{deList:E}=n,{newAllowed:I=!0}=n,{prevEventId:A}=n,{inputSearch:v}=n,b=f.id;f.class;let $,T,N,R,D,O,M,k="",x=!1,B=!1;h??=f.identity.designation;const P=!i?.length||i.find((e=>e===b));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,_=e.selectionFields),"showEdit"in e&&r(8,C=e.showEdit),"deList"in e&&r(9,E=e.deList),"newAllowed"in e&&r(10,I=e.newAllowed),"prevEventId"in e&&r(11,A=e.prevEventId),"inputSearch"in e&&r(12,v=e.inputSearch)},[h,m,f,g,p,w,y,_,C,E,I,A,v,k,x,$,N,D,O,M,B,o,s,a,d,P,async e=>{if(!e)return!1;const n=await gd(f.class,f.id);if(T=_&&_?.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"),C||l("back")},()=>{r(20,B=!0),r(14,x=!1),l("back")},()=>{r(20,B=!0),r(1,m=!1),r(15,$=!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,$=!!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){Z(e,t)}]}class nn extends be{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=D("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}",$(document.head,t)),Se(this,e,tn,en,v,{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:rn}=_e;function on(e){e[28]=e[30].list,e[29]=e[30].items}function sn(e,t,n){const r=e.slice();return r[31]=t[n],r}function an(e,t,n){const r=e.slice();return r[34]=t[n],r}function ln(e,t,n){const r=e.slice();return r[34]=t[n],r}function cn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function dn(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[25](t)}on(e),n=new e[7]({props:{outline:!0,$$slots:{default:[un]},$$scope:{ctx:e}}}),n.$on("click",e[24]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=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]=hn(ln(e,o,t));return{c(){t=D("thead"),n=D("tr"),r=D("th"),i=k();for(let e=0;e<s.length;e+=1)s[e].c();F(r,"class","svelte-14hcfjl"),F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,o){T(e,t,o),$(t,n),$(n,r),$(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=ln(e,o,r);s[r]?s[r].p(i,t):(s[r]=hn(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&&N(t),R(s,e)}}}(e),I=e[28]?.length&&function(e){let t,n,r=e[28],i=[];for(let t=0;t<r.length;t+=1)i[t]=gn(sn(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=sn(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=gn(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){on(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],se((()=>a=!1))),s.$set(i),e[29]?.length&&E.p(e,t),e[28]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),ge(I),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(I),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function un(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function hn(e){let t,n,r=e[34]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function fn(e){let t,n,r,i,o,s,a,l;r=new Ze({props:{size:"18"}});let c=e[29],d=[];for(let t=0;t<c.length;t+=1)d[t]=mn(an(e,c,t));return{c(){t=D("tr"),n=D("td"),Ie(r.$$.fragment),i=k();for(let e=0;e<d.length;e+=1)d[e].c();o=k(),F(n,"class","editRow svelte-14hcfjl"),F(t,"class","pointer svelte-14hcfjl"),z(t,"active",e[31]._id===e[0])},m(c,u){T(c,t,u),$(t,n),Ae(r,n,null),$(t,i);for(let e=0;e<d.length;e+=1)d[e].m(t,null);$(t,o),s=!0,a||(l=B(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=an(e,c,n);d[n]?d[n].p(i,r):(d[n]=mn(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]&&z(t,"active",e[31]._id===e[0])},i(e){s||(ge(r.$$.fragment,e),s=!0)},o(e){pe(r.$$.fragment,e),s=!1},d(e){e&&N(t),ve(r),R(d,e),a=!1,l()}}}function mn(e){let t,n,r,i,o=e[9](e[31],e[34])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[31]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function gn(e){let t,n,r=e[13](e[31],e[29],e[1]),i=r&&fn(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(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]&&ge(i,1)):(i=fn(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function pn(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function wn(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:pn,then:dn,catch:cn,value:30,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function yn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[wn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _n(e,n,i){const o=Y(),{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:_}=n,{recordId:C}=n,{filter:E}=n,{multiValues:I}=n,A="",v=f+Math.floor(9e3*Math.random()+1e3).toString()+"search";const S=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},b=t.getSchemaByClass(g);q((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)})),r.subscribe((async e=>{if(!e)return;const t=await b;e.eventId===t.id&&Cd(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,_=e.viewValue),"recordId"in e&&i(21,C=e.recordId),"filter"in e&&i(22,E=e.filter),"multiValues"in e&&i(23,I=e.multiValues)},[w,A,o,s,a,l,d,u,v,S,e=>()=>o("choose",{row:e}),async()=>{const e=await b;let n=[];if(h.lookup){const e="."+f+"#"+h.lookup,r=document.querySelector(e);let i=r?.value||C;if(I.has(h.lookup)){const e=I.get(h.lookup)[0];e&&(n=await t.getSectionView(h.name,{[h.lookup]:e},!0))}else if(i&&24===i.toString().length){const e=await _d(h.lookup,i);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||C};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)),E&&(n=n.filter((e=>e._id!=E)))}const r=e.display;return{list:n,items:await Pt(r,e,n)}},({detail:{value:e}})=>{i(1,A=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(S(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,A="")},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,I,()=>o("back"),function(e){A=e,i(1,A)}]}class Cn extends be{constructor(e){var t;super(),rn.getElementById("svelte-14hcfjl-style")||((t=D("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}",$(rn.head,t)),Se(this,e,_n,yn,v,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22,multiValues:23},[-1,-1])}}const{document:En}=_e;function In(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function An(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;function E(t){e[47](t)}function I(t){e[48](t)}let A={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]&&(A.value=e[2]);void 0!==e[24]&&(A.overwrite=e[24]);n=new o({props:A}),Q.push((()=>Ee(n,"value",E))),Q.push((()=>Ee(n,"overwrite",I))),n.$on("click",e[32]()),n.$on("onFocus",e[32](e[29]));const v=[Sn,vn],S=[];function R(e,t){return!e[3]||e[15]?0:e[21]&&e[0]?1:-1}~(a=R(e))&&(l=S[a]=v[a](e));let O=(!e[3]||e[15]||e[16])&&bn(e);function M(t){e[49](t)}let P={class:"tModal",noClickaway:!0,$$slots:{default:[Rn]},$$scope:{ctx:e}};void 0!==e[18]&&(P.open=e[18]);m=new e[26]({props:P}),Q.push((()=>Ee(m,"open",M)));let L=e[19]&&Dn(e);return{c(){t=D("div"),Ie(n.$$.fragment),s=k(),l&&l.c(),c=k(),d=D("input"),h=k(),O&&O.c(),f=k(),Ie(m.$$.fragment),p=k(),L&&L.c(),w=x(),F(d,"class",u=b(e[8]||e[9])+" svelte-jox15l"),F(d,"id",e[5]),F(d,"name",e[5]),d.value=e[0],d.hidden=!0,H(t,"position","relative")},m(r,i){T(r,t,i),Ae(n,t,null),$(t,s),~a&&S[a].m(t,null),$(t,c),$(t,d),$(t,h),O&&O.m(t,null),T(r,f,i),Ae(m,r,i),T(r,p,i),L&&L.m(r,i),T(r,w,i),y=!0,_||(C=B(t,"keydown",e[33]),_=!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],se((()=>r=!1))),!i&&16777216&o[0]&&(i=!0,s.overwrite=e[24],se((()=>i=!1))),n.$set(s);let h=a;a=R(e),a===h?~a&&S[a].p(e,o):(l&&(fe(),pe(S[h],1,1,(()=>{S[h]=null})),me()),~a?(l=S[a],l?l.p(e,o):(l=S[a]=v[a](e),l.c()),ge(l,1),l.m(t,c)):l=null),(!y||768&o[0]&&u!==(u=b(e[8]||e[9])+" svelte-jox15l"))&&F(d,"class",u),(!y||32&o[0])&&F(d,"id",e[5]),(!y||32&o[0])&&F(d,"name",e[5]),(!y||1&o[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[15]||e[16]?O?(O.p(e,o),98312&o[0]&&ge(O,1)):(O=bn(e),O.c(),ge(O,1),O.m(t,null)):O&&(fe(),pe(O,1,1,(()=>{O=null})),me());const f={};13008593&o[0]|1073741824&o[1]&&(f.$$scope={dirty:o,ctx:e}),!g&&262144&o[0]&&(g=!0,f.open=e[18],se((()=>g=!1))),m.$set(f),e[19]?L?(L.p(e,o),524288&o[0]&&ge(L,1)):(L=Dn(e),L.c(),ge(L,1),L.m(w.parentNode,w)):L&&(fe(),pe(L,1,1,(()=>{L=null})),me())},i(e){y||(ge(n.$$.fragment,e),ge(l),ge(O),ge(m.$$.fragment,e),ge(L),y=!0)},o(e){pe(n.$$.fragment,e),pe(l),pe(O),pe(m.$$.fragment,e),pe(L),y=!1},d(e){e&&N(t),ve(n),~a&&S[a].d(),O&&O.d(),e&&N(f),ve(m,e),e&&N(p),L&&L.d(e),e&&N(w),_=!1,C()}}}(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,t){e[60]&&r.p(e,t)},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function vn(e){let t,n,r,i,o;return n=new Ze({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[38]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Sn(e){let t,n,r,i,o;return n=new wt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=[B(t,"click",e[32](!0)),B(t,"choose",e[35])],i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,I(o)}}}function bn(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 pointer svelte-jox15l")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[37]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function $n(e){let t,n,r,i;const o=[Nn,Tn],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=x()},m(e,n){s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?s[t].p(e,i):(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me(),n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r))},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){s[t].d(e),e&&N(r)}}}function Tn(e){let t,n;return t=new nn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Nn(e){let t,n;return t=new Cn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Rn(e){let t,n,r=e[18]&&$n(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[18]?r?(r.p(e,n),262144&n[0]&&ge(r,1)):(r=$n(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Dn(e){let t,n,r;function i(t){e[50](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}};return void 0!==e[19]&&(o.open=e[19]),t=new e[26]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function On(e){let t,n;return t=new Id({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mn(e){let t,n;return t=new e[25]({props:{title:e[20],$$slots:{default:[On]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function kn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function xn(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:kn,then:An,catch:In,value:60,blocks:[,,,]};return we(e[31](),r),{c(){t=x(),r.block.c()},m(e,i){T(e,t,i),r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,n=!0},p(t,n){ye(r,e=t,n)},i(e){n||(ge(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}n=!1},d(e){e&&N(t),r.block.d(e),r.token=null,r=null}}}function Bn(e,n,r){let o,s,a;S(e,i,(e=>r(46,o=e)));const l=Y(),{Dialog:d,Modal:h}=c,{currentTasks:f,loggedIn:m}=u;S(e,f,(e=>r(52,s=e))),S(e,m,(e=>r(53,a=e)));let{id:g}=n,{item:p}=n,{value:y=""}=n,{multiValues:_}=n,{desc:C=""}=n,{noForm:E=!1}=n,{classId:I}=n,{eventId:A}=n,{recordId:v}=n,{withRefValue:b=!1}=n,{refValue:$=""}=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,X,q=!1,j=!0,Z=!0,K=!0;D||=v&&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,C=w(z,e)),l("setRefDesc",C.split(" •")[0]),l("change",{value:y,description:C}),l("task",{row:e,eventId:z.id}))},te=()=>{r(18,q=!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,_=e.multiValues),"desc"in e&&r(2,C=e.desc),"noForm"in e&&r(8,E=e.noForm),"classId"in e&&r(9,I=e.classId),"eventId"in e&&r(10,A=e.eventId),"recordId"in e&&r(11,v=e.recordId),"withRefValue"in e&&r(39,b=e.withRefValue),"refValue"in e&&r(40,$=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]&&b&&r(0,y=$),131137&e.$$.dirty[0]|8192&e.$$.dirty[1]&&y&&z&&Promise.resolve(pd(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,C,R,x,g,p,_,E,I,A,v,O,M,B,P,F,z,q,U,H,G,j,Z,K,d,h,f,m,V,Q,async()=>{try{const e=await t.getEvent(A);if(X="report"===e.output.type,r(23,Z=!p.asInput),r(22,j=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(A)),A&&v&&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,$=e),r(39,b=!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,q=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(p.lookup||x&&!p.constraint||y)&&r(18,q=!0)},async e=>{const n=()=>{r(18,q=!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,()=>{(X||G)&&(F?l("change",{value:y,delete:!0}):(r(0,y=""),r(2,C=""),r(24,K=!0),l("change",{value:y,description:C}),l("task",{row:{_task:{event:z.id,_id:!1}}})))},async()=>{if(!y)return;const e=await pd(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)},b,$,D,T,k,L,W,o,function(e){C=e,r(2,C)},function(e){K=e,r(24,K)},function(e){q=e,r(18,q)},function(e){U=e,r(19,U)}]}class Pn extends be{constructor(e){var t;super(),En.getElementById("svelte-jox15l-style")||((t=D("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}",$(En.head,t)),Se(this,e,Bn,xn,v,{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 Ln(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function Fn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Vn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Hn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Un(e){let t,n;return t=new Pn({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hn(e){let t,n,r,i,o,s,a;n=new nt({props:{size:"18"}});let l=e[0],c=[];for(let t=0;t<l.length;t+=1)c[t]=Un(Ln(e,l,t));const d=e=>pe(c[e],1,1,(()=>{c[e]=null}));return{c(){t=D("span"),Ie(n.$$.fragment),r=k();for(let e=0;e<c.length;e+=1)c[e].c();i=x(),F(t,"class","feather pointer")},m(l,d){T(l,t,d),Ae(n,t,null),T(l,r,d);for(let e=0;e<c.length;e+=1)c[e].m(l,d);T(l,i,d),o=!0,s||(a=B(t,"click",(function(){A(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=Ln(e,l,t);c[t]?(c[t].p(r,n),ge(c[t],1)):(c[t]=Un(r),c[t].c(),ge(c[t],1),c[t].m(i.parentNode,i))}for(fe(),t=l.length;t<c.length;t+=1)d(t);me()}},i(e){if(!o){ge(n.$$.fragment,e);for(let e=0;e<l.length;e+=1)ge(c[e]);o=!0}},o(e){pe(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)pe(c[e]);o=!1},d(e){e&&N(t),ve(n),e&&N(r),R(c,e),e&&N(i),s=!1,a()}}}function zn(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Wn(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Xn]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Gn(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Xn(e){let t,n,r,i,o;return n=new e[19]({props:{outline:!0,$$slots:{default:[Gn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),i=new Ft({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=D("div"),Ie(n.$$.fragment),r=k(),Ie(i.$$.fragment),F(t,"class","form--buttons")},m(e,s){T(e,t,s),Ae(n,t,null),T(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||(ge(n.$$.fragment,e),ge(i.$$.fragment,e),o=!0)},o(e){pe(n.$$.fragment,e),pe(i.$$.fragment,e),o=!1},d(e){e&&N(t),ve(n),e&&N(r),ve(i,e)}}}function qn(e){let t,n,r=e[13]&&Wn(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[13]?r?(r.p(e,n),8192&n[0]&&ge(r,1)):(r=Wn(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function jn(e){let t,n,r,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:zn,then:Vn,catch:Fn,value:36,blocks:[,,,]};function s(t){e[33](t)}we(e[20](),o);let a={class:"tModal",noClickaway:!0,$$slots:{default:[qn]},$$scope:{ctx:e}};return void 0!==e[13]&&(a.open=e[13]),n=new e[17]({props:a}),Q.push((()=>Ee(n,"open",s))),{c(){o.block.c(),t=k(),Ie(n.$$.fragment)},m(e,r){o.block.m(e,o.anchor=r),o.mount=()=>t.parentNode,o.anchor=t,T(e,t,r),Ae(n,e,r),i=!0},p(t,i){ye(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],se((()=>r=!1))),n.$set(s)},i(e){i||(ge(o.block),ge(n.$$.fragment,e),i=!0)},o(e){for(let e=0;e<3;e+=1){pe(o.blocks[e])}pe(n.$$.fragment,e),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&N(t),ve(n,e)}}}function Yn(e,n,r){const i=Y(),{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:_}=n,{withRefValue:C=!1}=n,{refValue:E=""}=n,{required:I}=n,{disabled:A}=n,{readonly:v}=n,{praefix:S}=n,{selectionFields:b}=n,{formnovalidate:$}=n,{selection:T}=n,{deList:N}=n,{isTemplate:R}=n,{noList:D=!1}=n,O=!1;const M=f.properties.multi.filter;A=!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,_=e.recordId),"withRefValue"in e&&r(26,C=e.withRefValue),"refValue"in e&&r(27,E=e.refValue),"required"in e&&r(9,I=e.required),"disabled"in e&&r(1,A=e.disabled),"readonly"in e&&r(10,v=e.readonly),"praefix"in e&&r(11,S=e.praefix),"selectionFields"in e&&r(28,b=e.selectionFields),"formnovalidate"in e&&r(12,$=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,A,h,f,g,p,w,y,_,I,v,S,$,O,d,u,o,s,a,l,async()=>{r(14,d=await t.getSchemaByClass(f.refClass))},async()=>{let e=await gd(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,C,E,b,T,N,R,D,function(e){O=e,r(13,O)}]}class Zn extends be{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=D("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",$(document.head,t)),Se(this,e,Yn,jn,v,{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 Kn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Jn(e,t,n){const r=Math.floor((new Date).getFullYear()/100);let i=!1;if(""===e)return null;const o=t.split(Qn);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{Kn.lastIndex=s;const o=Kn.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 er(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:tr}=_e;function nr(e,t,n){const r=e.slice();return r[17]=t[n],r}function rr(e,t,n){const r=e.slice();return r[20]=t[n],r}function ir(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function or(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]=ar(rr(e,m,t));const p=e=>pe(g[e],1,1,(()=>{g[e]=null}));let w=e[0].list&&lr(e);return l=new e[5]({props:{outline:!0,$$slots:{default:[dr]},$$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:[ur]},$$scope:{ctx:e}}}),{c(){t=D("form"),n=D("input"),i=k();for(let e=0;e<g.length;e+=1)g[e].c();o=k(),w&&w.c(),s=k(),a=D("div"),Ie(l.$$.fragment),c=k(),Ie(d.$$.fragment),F(n,"class",b(e[6])+" svelte-1phofh5"),F(n,"name","_id"),F(n,"type","hidden"),n.value=r=e[1]._id||"",F(t,"class","fTask svelte-1phofh5"),F(t,"id",e[6]),F(a,"class","form--buttons svelte-1phofh5")},m(r,m){T(r,t,m),$(t,n),$(t,i);for(let e=0;e<g.length;e+=1)g[e].m(t,null);$(t,o),w&&w.m(t,null),T(r,s,m),T(r,a,m),Ae(l,a,null),$(a,c),Ae(d,a,null),u=!0,h||(f=[B(t,"keydown",e[8]),B(t,"submit",P(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=rr(e,m,n);g[n]?(g[n].p(r,i),ge(g[n],1)):(g[n]=ar(r),g[n].c(),ge(g[n],1),g[n].m(t,o))}for(fe(),n=m.length;n<g.length;n+=1)p(n);me()}e[0].list?w?(w.p(e,i),1&i&&ge(w,1)):(w=lr(e),w.c(),ge(w,1),w.m(t,null)):w&&(fe(),pe(w,1,1,(()=>{w=null})),me());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)ge(g[e]);ge(w),ge(l.$$.fragment,e),ge(d.$$.fragment,e),u=!0}},o(e){g=g.filter(Boolean);for(let e=0;e<g.length;e+=1)pe(g[e]);pe(w),pe(l.$$.fragment,e),pe(d.$$.fragment,e),u=!1},d(e){e&&N(t),R(g,e),w&&w.d(),e&&N(s),e&&N(a),ve(l),ve(d),h=!1,I(f)}}}function sr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ar(e){let t,n,r=mr(!0,e[20]),i=r&&sr(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(e,t,r),n=!0},p(e,n){1&n&&(r=mr(!0,e[20])),r?i?(i.p(e,n),1&n&&ge(i,1)):(i=sr(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function lr(e){let t,n,r=e[0].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=cr(nr(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=nr(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=cr(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function cr(e){let t,n,r,i;return t=new e[4]({props:{text:e[17].designation}}),r=new br({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=k(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),T(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||(ge(t.$$.fragment,e),ge(r.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!1},d(e){ve(t,e),e&&N(n),ve(r,e)}}}function dr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function ur(e){let t;return{c(){t=M("Speichern")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function hr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function fr(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:hr,then:or,catch:ir,value:16,blocks:[,,,]};return we(e[7](),i),{c(){t=k(),n=D("section"),i.block.c(),tr.title="Vorgaben",F(n,"class","sTask svelte-1phofh5")},m(e,o){T(e,t,o),T(e,n,o),i.block.m(n,i.anchor=null),i.mount=()=>n,i.anchor=null,r=!0},p(t,[n]){ye(i,e=t,n)},i(e){r||(ge(i.block),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}r=!1},d(e){e&&N(t),e&&N(n),i.block.d(),i.token=null,i=null}}}const mr=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function gr(e,r,o){let l,d,u;S(e,a,(e=>o(11,d=e))),S(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(),_=!1;const C=()=>window.history.back(),E=(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 Jn(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=_)},[p,w,_,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,_=!0),d.role?.length&&p.authorization?.length){const e=p.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));o(2,_||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},C,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]=E(o.item,e)}else n[t]=E(p.items,e)})),await t.saveTemplate(p.class,n),s.success("Die Vorgaben wurden gespeichert.",2e3),C()}]}const{document:pr}=_e;function wr(e,t,n){const r=e.slice();return r[28]=t[n],r}function yr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function _r(e){let t,n,r=mr(e[7],e[28]),i=r&&yr(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(e,t,r),n=!0},p(e,n){130&n[0]&&(r=mr(e[7],e[28])),r?i?(i.p(e,n),130&n[0]&&ge(i,1)):(i=yr(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function Cr(e){let t,n,r,i=e[1].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=_r(wr(e,i,t));const s=e=>pe(o[e],1,1,(()=>{o[e]=null}));return{c(){t=D("div");for(let e=0;e<o.length;e+=1)o[e].c();F(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){T(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=wr(e,i,n);o[n]?(o[n].p(r,a),ge(o[n],1)):(o[n]=_r(r),o[n].c(),ge(o[n],1),o[n].m(t,null))}for(fe(),n=i.length;n<o.length;n+=1)s(n);me()}(!r||6&a[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&F(t,"id",n)},i(e){if(!r){for(let e=0;e<i.length;e+=1)ge(o[e]);r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);r=!1},d(e){e&&N(t),R(o,e)}}}function Er(e){let t,n,r=e[13](e[9])+"";return{c(){t=D("span"),n=M(r)},m(e,r){T(e,t,r),$(t,n)},p(e,t){512&t[0]&&r!==(r=e[13](e[9])+"")&&V(n,r)},d(e){e&&N(t)}}}function Ir(e){let t,n,r;return n=new e[10]({props:{$$slots:{default:[Er]},$$scope:{ctx:e}}}),n.$on("click",(function(){A(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=D("div"),Ie(n.$$.fragment),F(t,"class","accordion svelte-148ktt9"),F(t,"slot","handle")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Ar(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[Ir,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[Cr,({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function vr(e){let t,n,r;return n=new e[11]({props:{$$slots:{default:[Ar]},$$scope:{ctx:e}}}),{c(){t=D("div"),Ie(n.$$.fragment),F(t,"class","formList")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Sr(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:_={}}=n,{isTemplate:C=!1}=n,{currency:E}=n,{update:I=!1}=n,A=new Map;const v={};let S=d[a.name]||{};d[a.name]=S;const b=e=>v[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),$=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,_=e.template),"isTemplate"in e&&r(7,C=e.isTemplate),"currency"in e&&r(8,E=e.currency),"update"in e&&r(20,I=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&I&&d&&r(9,S=d[a.name]||{})},[d,a,u,h,f,w,y,C,E,S,i,o,s,e=>l.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?b(t.name):"boolean"===t.type?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&&(v[n]=e.desc);const i=d[t];r(0,d[t]={...i,[n]:e.value},d),r(9,S=d[t])},e=>t=>{(()=>{const e=_[a.name]||{};for(const t in e)_[a.name][t]&&!d[a.name][t]&&r(0,d[a.name][t]=_[a.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${a.name} > div.form-field:last-child`,i=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${a.name} textarea`;Array.from(document.querySelectorAll(e)).forEach($)})).then((()=>i.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:n,value:r}})=>{if(A.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&&A.set(e,o[0])},()=>{setTimeout((()=>{Array.from(A).forEach((([e,t])=>{d[a.name][e]||r(0,d[a.name][e]=t._id,d)}))}),500)},l,_,I,function(t){Z(e,t)}]}class br extends be{constructor(e){var t;super(),pr.getElementById("svelte-148ktt9-style")||((t=D("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}}",$(pr.head,t)),Se(this,e,Sr,vr,v,{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:$r}=_e;function Tr(e){e[0]=e[23].list,e[22]=e[23].items}function Nr(e,t,n){const r=e.slice();return r[24]=t[n],r}function Rr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Dr(e,t,n){const r=e.slice();return r[27]=t[n],r}function Or(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Mr(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[19](t)}Tr(e),n=new e[7]({props:{outline:!0,$$slots:{default:[kr]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=e[22]?.length&&function(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=xr(Dr(e,r,t));return{c(){t=D("thead"),n=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(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=Dr(e,r,o);i[o]?i[o].p(s,t):(i[o]=xr(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&&N(t),R(i,e)}}}(e),I=e[0]?.length&&function(e){let t,n=e[0],r=[];for(let t=0;t<n.length;t+=1)r[t]=Lr(Nr(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);T(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=Nr(e,n,o);r[o]?r[o].p(s,i):(r[o]=Lr(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){R(r,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){Tr(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],se((()=>a=!1))),s.$set(i),e[22]?.length&&E.p(e,t),e[0]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function kr(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function xr(e){let t,n,r=e[27]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function Br(e){let t,n,r=e[22],i=[];for(let t=0;t<r.length;t+=1)i[t]=Pr(Rr(e,r,t));return{c(){t=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=k(),F(t,"class","pointer svelte-14hcfjl")},m(e,r){T(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);$(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[22],s=0;s<r.length;s+=1){const a=Rr(e,r,s);i[s]?i[s].p(a,o):(i[s]=Pr(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&&N(t),R(i,e)}}}function Pr(e){let t,n,r,i,o=e[9](e[24],e[27])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[24]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function Lr(e){let t,n=e[13](e[24],e[22],e[1]),r=n&&Br(e);return{c(){r&&r.c(),t=x()},m(e,n){r&&r.m(e,n),T(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=Br(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&N(t)}}}function Fr(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Vr(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Fr,then:Mr,catch:Or,value:23,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function Ur(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Vr]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Hr(e,n,r){const i=Y(),{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 _=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?p(n):m(e[`_${t.name}`]||e[t.name]||"")},C=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,_,e=>()=>i("choose",{row:e}),async()=>{const e=await C,t=e.display;let n=await Pt(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(_(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 zr extends be{constructor(e){var t;super(),$r.getElementById("svelte-14hcfjl-style")||((t=D("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}",$($r.head,t)),Se(this,e,Hr,Ur,v,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Wr}=_e;function Gr(e,t,n){const r=e.slice();return r[11]=t[n],r}function Xr(e,t,n){const r=e.slice();return r[3]=t[n],r}function qr(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function jr(e){let t,n,r,i=e[7].items,o=[];for(let t=0;t<i.length;t+=1)o[t]=Jr(Xr(e,i,t));const s=e=>pe(o[e],1,1,(()=>{o[e]=null}));let a=e[7].list&&ei(e);return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=k(),a&&a.c(),n=x()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);T(e,t,i),a&&a.m(e,i),T(e,n,i),r=!0},p(e,r){if(5161959&r[0]){let n;for(i=e[7].items,n=0;n<i.length;n+=1){const s=Xr(e,i,n);o[n]?(o[n].p(s,r),ge(o[n],1)):(o[n]=Jr(s),o[n].c(),ge(o[n],1),o[n].m(t.parentNode,t))}for(fe(),n=i.length;n<o.length;n+=1)s(n);me()}e[7].list?a?(a.p(e,r),128&r[0]&&ge(a,1)):(a=ei(e),a.c(),ge(a,1),a.m(n.parentNode,n)):a&&(fe(),pe(a,1,1,(()=>{a=null})),me())},i(e){if(!r){for(let e=0;e<i.length;e+=1)ge(o[e]);ge(a),r=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)pe(o[e]);pe(a),r=!1},d(e){R(o,e),e&&N(t),a&&a.d(e),e&&N(n)}}}function Yr(e){let t,n,r,i;const o=[Kr,Zr],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=x()},m(e,n){~t&&s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){~t&&s[t].d(e),e&&N(r)}}}function Zr(e){let t,n;return t=new Ia({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Kr(e){let t,n,r,i;n=new Ia({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]);let o=e[1]&&Qr(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o&&o.c(),H(t,"padding-top",".25em"),H(t,"background-color","lightyellow"),H(t,"position","relative")},m(e,s){T(e,t,s),Ae(n,t,null),$(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]&&ge(o,1)):(o=Qr(e),o.c(),ge(o,1),o.m(t,null)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){i||(ge(n.$$.fragment,e),ge(o),i=!0)},o(e){pe(n.$$.fragment,e),pe(o),i=!1},d(e){e&&N(t),ve(n),o&&o.d()}}}function Qr(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 pointer svelte-16mo2c")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[22]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Jr(e){let t,n,r="list"!==e[3].type&&Yr(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){"list"!==e[3].type?r?(r.p(e,n),128&n[0]&&ge(r,1)):(r=Yr(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function ei(e){let t,n,r=e[7].list,i=[];for(let t=0;t<r.length;t+=1)i[t]=ni(Gr(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=Gr(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=ni(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function ti(e){let t,n,r,i;return t=new e[12]({props:{text:e[11].designation}}),r=new br({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=k(),Ie(r.$$.fragment)},m(e,o){Ae(t,e,o),T(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||(ge(t.$$.fragment,e),ge(r.$$.fragment,e),i=!0)},o(e){pe(t.$$.fragment,e),pe(r.$$.fragment,e),i=!1},d(e){ve(t,e),e&&N(n),ve(r,e)}}}function ni(e){let t,n,r="array"!==e[11].type&&ti(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){"array"!==e[11].type?r?(r.p(e,n),128&n[0]&&ge(r,1)):(r=ti(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function ri(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ii(e){let t,n;return t=new zr({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function oi(e){let t,n,r=e[10]&&ii(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[10]?r?(r.p(e,n),1024&n[0]&&ge(r,1)):(r=ii(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function si(e){let t,n,r,i,o,s,a={ctx:e,current:null,token:null,hasCatch:!1,pending:ri,then:jr,catch:qr,value:52,blocks:[,,,]};function l(t){e[28](t)}we(e[16](),a),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[oi]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),i=new e[13]({props:c}),Q.push((()=>Ee(i,"open",l))),{c(){a.block.c(),t=k(),Ie(n.$$.fragment),r=k(),Ie(i.$$.fragment)},m(e,o){a.block.m(e,a.anchor=o),a.mount=()=>t.parentNode,a.anchor=t,T(e,t,o),Ae(n,e,o),T(e,r,o),Ae(i,e,o),s=!0},p(t,n){ye(a,e=t,n);const r={};3352&n[0]|67108864&n[1]&&(r.$$scope={dirty:n,ctx:e}),!o&&1024&n[0]&&(o=!0,r.open=e[10],se((()=>o=!1))),i.$set(r)},i(e){s||(ge(a.block),ge(n.$$.fragment,e),ge(i.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){pe(a.blocks[e])}pe(n.$$.fragment,e),pe(i.$$.fragment,e),s=!1},d(e){a.block.d(e),a.token=null,a=null,e&&N(t),ve(n,e),e&&N(r),ve(i,e)}}}function ai(e,n,r){const{Divider:i,FormField:o,Modal:s}=c,a=Y();let l,d,u,h,f,{required:m}=n,{disabled:g}=n,{readonly:p}=n,{id:w}=n,{item:y}=n,{value:_}=n,{refValue:C}=n,{currency:E}=n,I={},A=[],v=[],S={},b=new Map,$=!1,T="";const N=y.checkOn,R=_,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(".");A.push({action:e,itemName:t.name,refObj:r,refName:i,op:t.properties[e].invert?"!":""})}))},O=()=>{l.items.filter((e=>e.lookup)).forEach((e=>{v.push({name:e.name,lookup:e.lookup})})),l.items.filter((e=>e.properties?.lookup)).forEach((e=>{v.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},M=async e=>{const t=A.filter((t=>t.refObj===e));if(t?.length){r(9,S={});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&&I[n];const u=I[n];u&&i&&(c=(await _d(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,S[t]="",S))}}};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 A)e.add(t.refObj||u);Array.from(e).forEach((e=>M(e)))})(),x())},x=()=>{setTimeout((()=>{Array.from(b).forEach((([e,t])=>{I[e]||r(6,I[e]=t._id,I)}))}),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,$=!0)):(r(1,_=""),r(23,C=""),a("setRefValue",C))},P=()=>{r(10,$=!1)},L=()=>{r(1,_=""),r(23,C=_),r(6,I={}),a("setRefValue",C)};return e.$$set=e=>{"required"in e&&r(24,m=e.required),"disabled"in e&&r(0,g=e.disabled),"readonly"in e&&r(25,p=e.readonly),"id"in e&&r(26,w=e.id),"item"in e&&r(3,y=e.item),"value"in e&&r(1,_=e.value),"refValue"in e&&r(23,C=e.refValue),"currency"in e&&r(2,E=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&r(0,g=g||p),134217840&e.$$.dirty[0]&&I&&a("safeReference",{record:I,class:u,event:h,taskId:f})},[g,_,E,y,u,h,I,l,d,S,$,T,i,s,N,R,async()=>{try{if(_){const e=await t.getTask(y.refClass,_);delete e._task,r(6,I=e),r(27,f=(await t.getTaskByDocId(e._id))._id)}else r(6,I={})}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,I[t]=n,I),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,I[e]=[],I);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,I[e]=o,I)}}},async({detail:{className:e,itemName:n,value:r}})=>{if(b.has(e))return;if(!0!==r&&(r=(r=[].concat(r)).some((e=>e===u))),!r)return;const i={[n]:!0},o=await t.getSectionView(e,i);o?.length&&b.set(e,o[0])},async({detail:e})=>{const n=await t.getSectionView(u,{_id:e.row._id});n?.length&&(r(1,_=n[0]._id),r(23,C=_),a("setRefValue",C),r(6,I=n[0])),P()},P,L,C,m,p,w,f,function(e){$=e,r(10,$)}]}class li extends be{constructor(e){var t;super(),Wr.getElementById("svelte-16mo2c-style")||((t=D("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",$(Wr.head,t)),Se(this,e,ai,si,v,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ci(e){let t,n,r,i=e[11]&&function(e){let t,n;return{c(){t=D("span"),n=M(e[4]),F(t,"class","item")},m(e,r){T(e,t,r),$(t,n)},p(e,t){16&t[0]&&V(n,e[4])},d(e){e&&N(t)}}}(e),o=e[14]&&function(e){let t,n,r,i,o;return n=new Oe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Übernehmen"),F(t,"class","pointer feather svelte-1fuww0c")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[17]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}(e);return{c(){i&&i.c(),t=k(),o&&o.c(),n=x()},m(e,s){i&&i.m(e,s),T(e,t,s),o&&o.m(e,s),T(e,n,s),r=!0},p(e,t){e[11]&&i.p(e,t),e[14]&&o.p(e,t)},i(e){r||(ge(o),r=!0)},o(e){pe(o),r=!1},d(e){i&&i.d(e),e&&N(t),o&&o.d(e),e&&N(n)}}}function di(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:[ci]},$$scope:{ctx:e}}}),n.$on("change",e[15]),n.$on("focus",e[16]),{c(){t=D("div"),Ie(n.$$.fragment),H(t,"position","relative"),H(t,"max-width","10em")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ui(e,t,r){let i;const o=Y(),{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")),_=["price","amount","amountValue","taxValue","total","__total"].find((e=>e===l.name?.split("-")[0]))||l.properties?.currency,C=Number("1.1").toLocaleString(y.id).substring(1,2),{properties:E={}}=l;let{min:I,max:A,step:v,pattern:S,decimals:b=0,unit:$="",placeholder:T,hint:N,readonly:R,negative:D,required:O=!1,transfer:M}=E;R=!0===R||void 0;S||(S=b?`[0-9]+([${C}][0-9]{1,${b}})?`:"[0-9]*"),D&&(S="-?"+S);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(C,".")).toFixed(b).toString().replace(".",C)),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,S,R,i,s,y,_,v,T,M,({detail:e})=>o("blur",{value:e.value}),({detail:e})=>{R||Number(d.toString().replace(C,"."))||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 hi extends be{constructor(e){var t;super(),document.getElementById("svelte-1fuww0c-style")||((t=D("style")).id="svelte-1fuww0c-style",t.textContent=".feather.svelte-1fuww0c{position:absolute;top:0.75em;right:-1em;color:#4300b0}",$(document.head,t)),Se(this,e,ui,di,v,{id:0,item:18,value:19,noForm:1,classId:2,disabled:3,formnovalidate:20,currency:4,praefix:21,notifyList:22},[-1,-1])}}const{document:fi}=_e;function mi(e){e[34]=e[36].list,e[35]=e[36].items}function gi(e,t,n){const r=e.slice();return r[37]=t[n],r[39]=n,r}function pi(e,t,n){const r=e.slice();return r[40]=t[n],r[42]=n,r}function wi(e,t,n){const r=e.slice();return r[40]=t[n],r}function yi(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function _i(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y,_;mi(e),n=new e[9]({props:{outline:!0,$$slots:{default:[Ci]},$$scope:{ctx:e}}}),n.$on("click",e[31]);let C=!e[2]&&Ei(e);function E(t){e[32](t)}let I={id:e[12]};void 0!==e[3]&&(I.value=e[3]),a=new e[7]({props:I}),Q.push((()=>Ee(a,"value",E))),a.$on("input",e[15]),u=new qe({props:{size:"18"}});let A=e[35]?.length&&function(e){let t,n,r,i,o=!e[2]&&Ai(e),s=e[35],a=[];for(let t=0;t<s.length;t+=1)a[t]=vi(wi(e,s,t));return{c(){t=D("thead"),n=D("tr"),o&&o.c(),r=k();for(let e=0;e<a.length;e+=1)a[e].c();F(n,"class","svelte-1m010ne"),F(t,"class","svelte-1m010ne")},m(e,s){T(e,t,s),$(t,n),o&&o.m(n,null),$(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&&(fe(),pe(o,1,1,(()=>{o=null})),me()):o?(o.p(e,t),4&t[0]&&ge(o,1)):(o=Ai(e),o.c(),ge(o,1),o.m(n,r)),16384&t[0]){let r;for(s=e[35],r=0;r<s.length;r+=1){const i=wi(e,s,r);a[r]?a[r].p(i,t):(a[r]=vi(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||(ge(o),i=!0)},o(e){pe(o),i=!1},d(e){e&&N(t),o&&o.d(),R(a,e)}}}(e),v=e[34]?.length&&function(e){let t,n,r=e[34],i=[];for(let t=0;t<r.length;t+=1)i[t]=Ni(gi(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=gi(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=Ni(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),C&&C.c(),i=k(),o=D("div"),s=M("Suchen: "),Ie(a.$$.fragment),c=k(),d=D("span"),Ie(u.$$.fragment),h=k(),f=D("div"),m=D("table"),A&&A.c(),g=k(),p=D("tbody"),v&&v.c(),F(t,"class","form--buttons svelte-1m010ne"),F(d,"class","feather pointer svelte-1m010ne"),H(o,"margin-bottom","1em"),H(o,"position","relative"),F(m,"striped",""),F(m,"class","svelte-1m010ne"),F(f,"class","eList svelte-1m010ne")},m(l,E){T(l,t,E),Ae(n,t,null),$(t,r),C&&C.m(t,null),T(l,i,E),T(l,o,E),$(o,s),Ae(a,o,null),$(o,c),$(o,d),Ae(u,d,null),T(l,h,E),T(l,f,E),$(f,m),A&&A.m(m,null),$(m,g),$(m,p),v&&v.m(p,null),w=!0,y||(_=B(d,"click",e[17]),y=!0)},p(e,r){mi(e);const i={};16384&r[1]&&(i.$$scope={dirty:r,ctx:e}),n.$set(i),e[2]?C&&(fe(),pe(C,1,1,(()=>{C=null})),me()):C?(C.p(e,r),4&r[0]&&ge(C,1)):(C=Ei(e),C.c(),ge(C,1),C.m(t,null));const o={};!l&&8&r[0]&&(l=!0,o.value=e[3],se((()=>l=!1))),a.$set(o),e[35]?.length&&A.p(e,r),e[34]?.length&&v.p(e,r)},i(e){w||(ge(n.$$.fragment,e),ge(C),ge(a.$$.fragment,e),ge(u.$$.fragment,e),ge(A),ge(v),w=!0)},o(e){pe(n.$$.fragment,e),pe(C),pe(a.$$.fragment,e),pe(u.$$.fragment,e),pe(A),pe(v),w=!1},d(e){e&&N(t),ve(n),C&&C.d(),e&&N(i),e&&N(o),ve(a),ve(u),e&&N(h),e&&N(f),A&&A.d(),v&&v.d(),y=!1,_()}}}function Ci(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ei(e){let t,n;return t=new e[9]({props:{disabled:!e[34].length,filled:!0,$$slots:{default:[Ii]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Ii(e){let t;return{c(){t=M("Bestätigen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ai(e){let t,n,r,i,o;return n=new Le({props:{size:"20"}}),{c(){t=D("th"),Ie(n.$$.fragment),F(t,"class","svelte-1m010ne")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[19](e[34])),i=!0)},p(t,n){e=t},i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function vi(e){let t,n,r=e[40]+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-1m010ne")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function Si(e){let t,n,r,i,o,s,a,l=e[0],c=$i(e),d=e[35],u=[];for(let t=0;t<d.length;t+=1)u[t]=Ti(pi(e,d,t));return{c(){t=D("tr"),c.c(),n=k();for(let e=0;e<u.length;e+=1)u[e].c();r=k(),F(t,"style",i=e[2]?"cursor: default;":"cursor: zoom-in;"),F(t,"title","übernimmt den Wert direkt"),F(t,"class","svelte-1m010ne"),z(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},m(i,l){T(i,t,l),c.m(t,null),$(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);$(t,r),o=!0,s||(a=B(t,"click",e[20](e[37])),s=!0)},p(s,a){if(e=s,1&a[0]&&v(l,l=e[0])?(fe(),pe(c,1,1,_),me(),c=$i(e),c.c(),ge(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=pi(e,d,n);u[n]?u[n].p(i,a):(u[n]=Ti(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;"))&&F(t,"style",i),16385&a[0]&&z(t,"active",e[0].includes(Array.isArray(e[37])?e[37][0]:e[37]))},i(e){o||(ge(c),o=!0)},o(e){pe(c),o=!1},d(e){e&&N(t),c.d(e),R(u,e),s=!1,a()}}}function bi(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=D("td"),Ie(n.$$.fragment),F(t,"title","Wählt den Wert aus"),F(t,"class","svelte-1m010ne")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function $i(e){let t,n,r=!e[2]&&bi(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,n){e[2]?r&&(fe(),pe(r,1,1,(()=>{r=null})),me()):r?(r.p(e,n),4&n[0]&&ge(r,1)):(r=bi(e),r.c(),ge(r,1),r.m(t.parentNode,t))},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Ti(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=D("td"),n=M(r),F(t,"class","svelte-1m010ne")},m(e,r){T(e,t,r),$(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])+"")&&V(n,r)},d(e){e&&N(t)}}}function Ni(e){let t,n,r=e[16](e[37],e[3]),i=r&&Si(e);return{c(){i&&i.c(),t=x()},m(e,r){i&&i.m(e,r),T(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]&&ge(i,1)):(i=Si(e),i.c(),ge(i,1),i.m(t.parentNode,t)):i&&(fe(),pe(i,1,1,(()=>{i=null})),me())},i(e){n||(ge(i),n=!0)},o(e){pe(i),n=!1},d(e){i&&i.d(e),e&&N(t)}}}function Ri(e){let t,n;return t=new e[6]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Di(e){let t,n,r,i;t=new e[10]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:Ri,then:_i,catch:yi,value:36,blocks:[,,,]};return we(e[14](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function Oi(e){let t,n;return t=new e[8]({props:{title:e[1]||"Auswahl",class:"eList",$$slots:{default:[Di]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mi(e,n,r){const i=Y(),{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:_}=n,{view:C}=n,{unique:E}=n,{uniqueView:I}=n,{status:A}=n,{single:v}=n;g||=[];let S="",b=h+Math.floor(9e3*Math.random()+1e3).toString()+"search",$=[];const T=w+y+_+"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(b)?.focus()}),200)}));return e.$$set=e=>{"classId"in e&&r(22,h=e.classId),"id"in e&&r(23,f=e.id),"designation"in e&&r(1,m=e.designation),"selection"in e&&r(0,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,_=e.target),"view"in e&&r(27,C=e.view),"unique"in e&&r(28,E=e.unique),"uniqueView"in e&&r(29,I=e.uniqueView),"status"in e&&r(30,A=e.status),"single"in e&&r(2,v=e.single)},[g,m,v,S,$,i,o,s,a,l,d,u,b,T,async()=>{let e=[],n=[],i={};if(r(4,$=[]),y)if(C){if(f){const n=h.split("-")[1].slice(0,-4),r="input."+h+"[name='_id']",o=document.querySelector(r).value;i={[y]:f},A&&(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[_];return N(r(e),r(t))}))}}else I?f&&(i={[y]:f,status:!0},Object.entries(I).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[_])?"0-":"1-")+e[_];return N(n(e),n(t))})),r(4,$=e.map((e=>{const t=[e[_]];return n.map((n=>t.push(e[n]))),t})))):E?(e=await t.getSection(w,y,f,E),e=e.sort(((e,t)=>N(e,t)))):(e=await t.getSection(w,y,f,!1,A),e=e.sort(((e,t)=>{const n=e=>(g.includes(e[_])?"0-":"1-")+e[_];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,_=n)}let a;return e.map((e=>{let t=e[_];if(t||w!==_||(r(21,_=o.items[0].name),t=e[_]),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===_))?.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,S=e)},(e,t)=>{if(!t)return!0;return!!(Array.isArray(e)?e.join(" "):e).toLowerCase().includes(t.toLowerCase())},()=>{r(3,S="")},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;v?i("choose",{list:[].concat(t)}):(r(0,g=g.includes(t)?g.filter((e=>e!==t)):g.concat(t)),i("choose",{list:g}))}},_,h,f,p,w,y,C,E,I,A,()=>i("back"),function(e){S=e,r(3,S)}]}class ki extends be{constructor(e){var t;super(),fi.getElementById("svelte-1m010ne-style")||((t=D("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}",$(fi.head,t)),Se(this,e,Mi,Oi,v,{classId:22,id:23,designation:1,selection:0,refDoc:24,tableName:25,idName:26,target:21,view:27,unique:28,uniqueView:29,status:30,single:2},[-1,-1])}}const{document:xi}=_e;function Bi(e){let t,n,r,i,o,s=e[7].length+"";return{c(){t=D("span"),n=M("("),r=M(s),i=M(")"),F(t,"class",o=b(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,o){T(e,t,o),$(t,n),$(t,r),$(t,i)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&V(r,s),2&n[0]&&o!==(o=b(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&F(t,"class",o)},d(e){e&&N(t)}}}function Pi(e){let t;return{c(){t=D("div"),F(t,"class","load-more-options"),F(t,"slot","load-more-options-message")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Li(e){let t,n,r,i;const o=[Ui,Vi,Fi],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=x()},m(e,n){~t&&s[t].m(e,n),T(e,r,n),i=!0},p(e,i){let l=t;t=a(e),t===l?~t&&s[t].p(e,i):(n&&(fe(),pe(s[l],1,1,(()=>{s[l]=null})),me()),~t?(n=s[t],n?n.p(e,i):(n=s[t]=o[t](e),n.c()),ge(n,1),n.m(r.parentNode,r)):n=null)},i(e){i||(ge(n),i=!0)},o(e){pe(n),i=!1},d(e){~t&&s[t].d(e),e&&N(r)}}}function Fi(e){let t,n,r,i,o;return n=new Oe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Übernehmen"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[26]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Vi(e){let t,n,r,i,o;return n=new Ue({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title",e[17].title||"Generieren"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[25]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Ui(e){let t,n,r,i,o;return n=new qe({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"title","Löschen"),F(t,"class","feather pointer svelte-1rbaejz")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[27]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function Hi(e){let t,n,r;function i(t){e[37](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[zi]},$$scope:{ctx:e}};return void 0!==e[10]&&(o.open=e[10]),t=new e[11]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function zi(e){let t,n;return t=new ki({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Wi(e){let t,n,r,i,o,s,a,l,c,d=!e[16].single&&e[7]?.length&&Bi(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:Gi,minSearchLength:"3",$$slots:{"load-more-options-message":[Pi]},$$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}),Q.push((()=>Ee(r,"selection",u))),Q.push((()=>Ee(r,"maxOptions",h))),r.$on("change",e[22]);let m=!e[1]&&Li(e),g=e[10]&&Hi(e);return{c(){t=D("div"),d&&d.c(),n=k(),Ie(r.$$.fragment),s=k(),m&&m.c(),a=k(),g&&g.c(),l=x(),H(t,"position","relative")},m(e,i){T(e,t,i),d&&d.m(t,null),$(t,n),Ae(r,t,null),$(t,s),m&&m.m(t,null),T(e,a,i),g&&g.m(e,i),T(e,l,i),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Bi(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],se((()=>i=!1))),!o&&512&s[0]&&(o=!0,a.maxOptions=e[9],se((()=>o=!1))),r.$set(a),e[1]?m&&(fe(),pe(m,1,1,(()=>{m=null})),me()):m?(m.p(e,s),2&s[0]&&ge(m,1)):(m=Li(e),m.c(),ge(m,1),m.m(t,null)),e[10]?g?(g.p(e,s),1024&s[0]&&ge(g,1)):(g=Hi(e),g.c(),ge(g,1),g.m(l.parentNode,l)):g&&(fe(),pe(g,1,1,(()=>{g=null})),me())},i(e){c||(ge(r.$$.fragment,e),ge(m),ge(g),c=!0)},o(e){pe(r.$$.fragment,e),pe(m),pe(g),c=!1},d(e){e&&N(t),d&&d.d(),ve(r),m&&m.d(),e&&N(a),g&&g.d(e),e&&N(l)}}}async function*Gi(e){yield[{name:e}]}function Xi(e,n,r){const i=Y(),{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:_}=n,{notifyList:C}=n;const{properties:E={}}=d;let{placeholder:I,hint:A,readonly:v,required:S=!1,lookup:b="",view:$=!1,multi:T,max:N=1e3,generate:R=!1,status:D=!0,refDoc:O}=E;const[M,k]=b.split(":");let x=!1,B=h.map&&h.map((e=>({name:e})))||[];m||=v,m&&(I="");const P=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),r(7,B=t.map((e=>({name:e.trim()}))));const n=B.map((e=>e.name));i("blur",{value:n}),i("multi",{view:T.view,lookup:b,name:d.name,value:n})};q((async()=>{i("multi",{view:T.view,lookup:b,name:d.name,value:h});const e=document.getElementById(l);e.classList.add(a),!v&&b&&e.addEventListener("focus",L)}));const L=()=>{if(b){document.getElementById(l).blur();const e=_||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:b,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:_||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,_=e.reqQuantity),"notifyList"in e&&r(34,C=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,S=S&&!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)})(C)},[h,m,a,l,d,u,S,B,I,N,x,o,s,v,b,$,T,R,D,O,M,k,P,F,V,()=>{const e=u[R.itemQuantity]||_;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===$)return U();const e=_||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,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 qi extends be{constructor(e){var t;super(),xi.getElementById("svelte-1rbaejz-style")||((t=D("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}",$(xi.head,t)),Se(this,e,Xi,Wi,v,{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])}}const{document:ji}=_e;function Yi(e){e[26]=e[28].list,e[27]=e[28].items}function Zi(e,t,n){const r=e.slice();return r[29]=t[n],r}function Ki(e,t,n){const r=e.slice();return r[32]=t[n],r}function Qi(e,t,n){const r=e.slice();return r[32]=t[n],r}function Ji(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function eo(e){let t,n,r,i,o,s,a,l,c,d,u,h,f,m,g,p,w,y;function _(t){e[23](t)}Yi(e),n=new e[7]({props:{outline:!0,$$slots:{default:[to]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let C={id:e[8]};void 0!==e[1]&&(C.value=e[1]),s=new e[6]({props:C}),Q.push((()=>Ee(s,"value",_))),s.$on("input",e[12]),d=new qe({props:{size:"18"}});let E=e[27]?.length&&function(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=no(Qi(e,r,t));return{c(){t=D("thead"),n=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();F(n,"class","svelte-14hcfjl"),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(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=Qi(e,r,o);i[o]?i[o].p(s,t):(i[o]=no(s),i[o].c(),i[o].m(n,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=r.length}},d(e){e&&N(t),R(i,e)}}}(e),I=e[26]?.length&&function(e){let t,n=e[26],r=[];for(let t=0;t<n.length;t+=1)r[t]=oo(Zi(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=x()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);T(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=Zi(e,n,o);r[o]?r[o].p(s,i):(r[o]=oo(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){R(r,e),e&&N(t)}}}(e);return{c(){t=D("div"),Ie(n.$$.fragment),r=k(),i=D("div"),o=M("Suchen: "),Ie(s.$$.fragment),l=k(),c=D("span"),Ie(d.$$.fragment),u=k(),h=D("div"),f=D("table"),E&&E.c(),m=k(),g=D("tbody"),I&&I.c(),F(t,"class","form--buttons svelte-14hcfjl"),F(c,"class","feather pointer svelte-14hcfjl"),H(i,"margin-bottom","1em"),H(i,"position","relative"),F(f,"striped",""),F(f,"class","svelte-14hcfjl"),F(h,"class","eList svelte-14hcfjl")},m(a,_){T(a,t,_),Ae(n,t,null),T(a,r,_),T(a,i,_),$(i,o),Ae(s,i,null),$(i,l),$(i,c),Ae(d,c,null),T(a,u,_),T(a,h,_),$(h,f),E&&E.m(f,null),$(f,m),$(f,g),I&&I.m(g,null),p=!0,w||(y=B(c,"click",e[14]),w=!0)},p(e,t){Yi(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],se((()=>a=!1))),s.$set(i),e[27]?.length&&E.p(e,t),e[26]?.length&&I.p(e,t)},i(e){p||(ge(n.$$.fragment,e),ge(s.$$.fragment,e),ge(d.$$.fragment,e),p=!0)},o(e){pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),p=!1},d(e){e&&N(t),ve(n),e&&N(r),e&&N(i),ve(s),ve(d),e&&N(u),e&&N(h),E&&E.d(),I&&I.d(),w=!1,y()}}}function to(e){let t;return{c(){t=M("Abbrechen")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function no(e){let t,n,r=e[32]?.designation+"";return{c(){t=D("th"),n=M(r),F(t,"class","svelte-14hcfjl")},m(e,r){T(e,t,r),$(t,n)},p:_,d(e){e&&N(t)}}}function ro(e){let t,n,r=e[27],i=[];for(let t=0;t<r.length;t+=1)i[t]=io(Ki(e,r,t));return{c(){t=D("tr");for(let e=0;e<i.length;e+=1)i[e].c();n=k(),F(t,"class","pointer svelte-14hcfjl"),z(t,"active",e[29]._id===e[0])},m(e,r){T(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);$(t,n)},p(e,o){if(3584&o[0]){let s;for(r=e[27],s=0;s<r.length;s+=1){const a=Ki(e,r,s);i[s]?i[s].p(a,o):(i[s]=io(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]&&z(t,"active",e[29]._id===e[0])},d(e){e&&N(t),R(i,e)}}}function io(e){let t,n,r,i,o=e[9](e[29],e[32])+"";return{c(){t=D("td"),n=M(o),F(t,"class","svelte-14hcfjl")},m(o,s){T(o,t,s),$(t,n),r||(i=B(t,"click",L(e[10](e[29]))),r=!0)},p(t,n){e=t},d(e){e&&N(t),r=!1,i()}}}function oo(e){let t,n=e[13](e[29],e[27],e[1]),r=n&&ro(e);return{c(){r&&r.c(),t=x()},m(e,n){r&&r.m(e,n),T(e,t,n)},p(e,i){2&i[0]&&(n=e[13](e[29],e[27],e[1])),n?r?r.p(e,i):(r=ro(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&N(t)}}}function so(e){let t,n;return t=new e[5]({}),{c(){Ie(t.$$.fragment)},m(e,r){Ae(t,e,r),n=!0},p:_,i(e){n||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function ao(e){let t,n,r,i;t=new e[4]({});let o={ctx:e,current:null,token:null,hasCatch:!1,pending:so,then:eo,catch:Ji,value:28,blocks:[,,,]};return we(e[11](),o),{c(){Ie(t.$$.fragment),n=k(),r=x(),o.block.c()},m(e,s){Ae(t,e,s),T(e,n,s),T(e,r,s),o.block.m(e,o.anchor=s),o.mount=()=>r.parentNode,o.anchor=r,i=!0},p(t,n){ye(o,e=t,n)},i(e){i||(ge(t.$$.fragment,e),ge(o.block),i=!0)},o(e){pe(t.$$.fragment,e);for(let e=0;e<3;e+=1){pe(o.blocks[e])}i=!1},d(e){ve(t,e),e&&N(n),e&&N(r),o.block.d(e),o.token=null,o=null}}}function lo(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[ao]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function co(e,n,i){const o=Y(),{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:_}=n,{recordId:C}=n,{filter:E}=n,I="",A=g+Math.floor(9e3*Math.random()+1e3).toString()+"search";const v=(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(f);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&&Cd(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,_=e.viewValue),"recordId"in e&&i(20,C=e.recordId),"filter"in e&&i(21,E=e.filter)},[w,I,o,s,a,l,d,u,A,v,e=>()=>o("choose",{row:e}),async()=>{const e=await S,n="."+g+"#"+y;document.querySelector(n);let r={[y]:_},i=[];r[y]&&(i=await t.getSectionView(e.class,r,!0)),E&&(i=i.filter((e=>e._id!=E)));const o=e.display;return{list:i,items:await Pt(o,e,i)}},({detail:{value:e}})=>{i(1,I=e)},(e,t,n)=>{if(!n)return!0;for(const r of t)if(v(e,r)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,I="")},h,f,g,y,_,C,E,()=>o("back"),function(e){I=e,i(1,I)}]}class uo extends be{constructor(e){var t;super(),ji.getElementById("svelte-14hcfjl-style")||((t=D("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}",$(ji.head,t)),Se(this,e,co,lo,v,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ho(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function fo(e){let t,n,r,i,o;function s(t){e[21](t)}let a={id:e[2],name:e[3].name,inputClass:e[5]||e[1],disabled:e[6],formnovalidate:e[7],readonly:e[13],pattern:e[12],required:e[14],style:"padding-left:2em;"};void 0!==e[0]&&(a.value=e[0]),n=new e[10]({props:a}),Q.push((()=>Ee(n,"value",s)));let l=!e[6]&&mo(e);return{c(){t=D("div"),Ie(n.$$.fragment),i=k(),l&&l.c(),H(t,"position","relative")},m(e,r){T(e,t,r),Ae(n,t,null),$(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],se((()=>r=!1))),n.$set(o),e[6]?l&&(fe(),pe(l,1,1,(()=>{l=null})),me()):l?(l.p(e,i),64&i&&ge(l,1)):(l=mo(e),l.c(),ge(l,1),l.m(t,null))},i(e){o||(ge(n.$$.fragment,e),ge(l),o=!0)},o(e){pe(n.$$.fragment,e),pe(l),o=!1},d(e){e&&N(t),ve(n),l&&l.d()}}}function mo(e){let t,n,r,i,o;return n=new wt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-wbrqzu")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[17]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function go(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function po(e){let t,n,r;function i(t){e[22](t)}let o={class:"tModal",noClickaway:!0,$$slots:{default:[wo]},$$scope:{ctx:e}};return void 0!==e[8]&&(o.open=e[8]),t=new e[11]({props:o}),Q.push((()=>Ee(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],se((()=>n=!1))),t.$set(i)},i(e){r||(ge(t.$$.fragment,e),r=!0)},o(e){pe(t.$$.fragment,e),r=!1},d(e){ve(t,e)}}}function wo(e){let t,n;return t=new uo({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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function yo(e){let t,n,r,i={ctx:e,current:null,token:null,hasCatch:!1,pending:go,then:fo,catch:ho,value:27,blocks:[,,,]};we(e[16](),i);let o=e[8]&&po(e);return{c(){i.block.c(),t=k(),o&&o.c(),n=x()},m(e,s){i.block.m(e,i.anchor=s),i.mount=()=>t.parentNode,i.anchor=t,T(e,t,s),o&&o.m(e,s),T(e,n,s),r=!0},p(t,[r]){ye(i,e=t,r),e[8]?o?(o.p(e,r),256&r&&ge(o,1)):(o=po(e),o.c(),ge(o,1),o.m(n.parentNode,n)):o&&(fe(),pe(o,1,1,(()=>{o=null})),me())},i(e){r||(ge(i.block),ge(o),r=!0)},o(e){for(let e=0;e<3;e+=1){pe(i.blocks[e])}pe(o),r=!1},d(e){i.block.d(e),i.token=null,i=null,e&&N(t),o&&o.d(e),e&&N(n)}}}function _o(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:_,required:C=!1,view:E}=g,I=!1;const A=()=>{n(8,I=!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,I,p,r,i,w,_,C,E,async()=>(n(9,p=l[E.selection]),!0),()=>{n(8,I=!0)},({detail:e})=>{n(0,d=e.row[E.value?E.value:"_id"]),A()},A,m,function(e){d=e,n(0,d)},function(e){I=e,n(8,I)}]}class Co extends be{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=D("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",$(document.head,t)),Se(this,e,_o,yo,v,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function Eo(e,t,n){const r=e.slice();return r[12]=t[n][0],r[13]=t[n][1],r}function Io(e){let t;return{c(){t=D("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Ao(e){let t;return{c(){t=D("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function vo(e){let t,n,r,i,o=e[12]+"";return{c(){t=D("option"),n=M(o),t.__value=r=e[13],t.value=t.__value,t.selected=i=e[0]==e[13]},m(e,r){T(e,t,r),$(t,n)},p(e,s){64&s&&o!==(o=e[12]+"")&&V(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&&N(t)}}}function So(e){let t,n,r,i,o,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?Ao:Io}let r=n(e),i=r(e);return{c(){i.c(),t=x()},m(e,n){i.m(e,n),T(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&&N(t)}}}(e),a=e[6],l=[];for(let t=0;t<a.length;t+=1)l[t]=vo(Eo(e,a,t));return{c(){t=D("select"),s&&s.c(),n=x();for(let e=0;e<l.length;e+=1)l[e].c();F(t,"class",r=b(e[3]||e[4])+" svelte-5xpzvo"),F(t,"id",e[2]),F(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(r,a){T(r,t,a),s&&s.m(t,null),$(t,n);for(let e=0;e<l.length;e+=1)l[e].m(t,null);i||(o=B(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=Eo(e,a,r);l[r]?l[r].p(i,n):(l[r]=vo(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=b(e[3]||e[4])+" svelte-5xpzvo")&&F(t,"class",r),4&n&&F(t,"id",e[2]),4&n&&F(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:_,o:_,d(e){e&&N(t),s&&s.d(),R(l,e),i=!1,o()}}}function bo(e,t,n){const r=Y();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 $o extends be{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=D("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}",$(document.head,t)),Se(this,e,bo,So,v,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function To(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=D("input"),r=k(),Ie(i.$$.fragment),F(t,"type","string"),F(t,"class",n=e[2]||e[3]),F(t,"id",e[1]),F(t,"name",e[1]),t.hidden=!0},m(n,l){T(n,t,l),U(t,e[0]),T(n,r,l),Ae(i,n,l),o=!0,s||(a=B(t,"input",e[12]),s=!0)},p(e,[r]){(!o||12&r&&n!==(n=e[2]||e[3]))&&F(t,"class",n),(!o||2&r)&&F(t,"id",e[1]),(!o||2&r)&&F(t,"name",e[1]),1&r&&U(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||(ge(i.$$.fragment,e),o=!0)},o(e){pe(i.$$.fragment,e),o=!1},d(e){e&&N(t),e&&N(r),ve(i,e),s=!1,a()}}}function No(e,t,n){const r=Y(),{DatePicker:i}=c;let{value:o}=t,{id:s}=t,{item:a}=t,{record:l}=t,{noForm:d=!1}=t,{classId:u}=t,{readonly:h}=t,{disabled:f}=t,{required:m}=t,{notifyList:g}=t;o||(o=void 0),a.properties;const p=e=>{r("change",{value:e})};return e.$$set=e=>{"value"in e&&n(0,o=e.value),"id"in e&&n(1,s=e.id),"item"in e&&n(9,a=e.item),"record"in e&&n(10,l=e.record),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId),"readonly"in e&&n(4,h=e.readonly),"disabled"in e&&n(5,f=e.disabled),"required"in e&&n(6,m=e.required),"notifyList"in e&&n(11,g=e.notifyList)},e.$$.update=()=>{if(2048&e.$$.dirty&&(async()=>{const e=a.properties?.value?.formula;e?.operator&&r("formula",{item:a})})(),1585&e.$$.dirty&&l&&l[a.name])try{f||h||n(0,o=er(l[a.name],o))}catch{}},[o,s,d,u,h,f,m,i,({detail:e})=>{n(0,o=er(e.value,o)),p(o)},a,l,g,function(){o=this.value,n(0,o),n(10,l),n(9,a),n(5,f),n(4,h)}]}class Ro extends be{constructor(e){super(),Se(this,e,No,To,v,{value:0,id:1,item:9,record:10,noForm:2,classId:3,readonly:4,disabled:5,required:6,notifyList:11})}}function Do(e){let t;return{c(){t=M("Stunden")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Oo(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Do]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Mo(e){let t;return{c(){t=M("Minuten")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function ko(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Mo]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function xo(e){let t;return{c(){t=M("Jetzt")},m(e,n){T(e,t,n)},d(e){e&&N(t)}}}function Bo(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[xo]},$$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||(ge(t.$$.fragment,e),n=!0)},o(e){pe(t.$$.fragment,e),n=!1},d(e){ve(t,e)}}}function Po(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":[Bo],"minutes-label":[ko],"hours-label":[Oo]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=D("input"),r=k(),Ie(i.$$.fragment),o=k(),Ie(s.$$.fragment),F(t,"type","string"),F(t,"class",n=e[2]||e[3]),F(t,"id",e[1]),F(t,"name",e[1]),t.hidden=!0},m(n,d){T(n,t,d),U(t,e[0]),T(n,r,d),Ae(i,n,d),T(n,o,d),Ae(s,n,d),a=!0,l||(c=B(t,"input",e[9]),l=!0)},p(e,[r]){(!a||12&r&&n!==(n=e[2]||e[3]))&&F(t,"class",n),(!a||2&r)&&F(t,"id",e[1]),(!a||2&r)&&F(t,"name",e[1]),1&r&&U(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||(ge(i.$$.fragment,e),ge(s.$$.fragment,e),a=!0)},o(e){pe(i.$$.fragment,e),pe(s.$$.fragment,e),a=!1},d(e){e&&N(t),e&&N(r),ve(i,e),e&&N(o),ve(s,e),l=!1,c()}}}function Lo(e,t,n){const r=Y(),{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=er(e.value,a)),h(a)},function(){a=this.value,n(0,a)}]}class Fo extends be{constructor(e){super(),Se(this,e,Lo,Po,v,{value:0,id:1,noForm:2,classId:3})}}function Vo(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=D("input"),o=k(),s=D("input"),d=k(),Ie(u.$$.fragment),h=M(" /\n"),Ie(f.$$.fragment),F(t,"type","string"),F(t,"class",n=e[1]||e[2]),F(t,"id",r=e[0]+"_from"),F(t,"name",i=e[0]+"_from"),t.hidden=!0,F(s,"type","string"),F(s,"class",a=e[1]||e[2]),F(s,"id",l=e[0]+"_to"),F(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,r){T(n,t,r),U(t,e[7]),T(n,o,r),T(n,s,r),U(s,e[8]),T(n,d,r),Ae(u,n,r),T(n,h,r),Ae(f,n,r),m=!0,g||(p=[B(t,"input",e[13]),B(s,"input",e[14])],g=!0)},p(e,[o]){(!m||6&o&&n!==(n=e[1]||e[2]))&&F(t,"class",n),(!m||1&o&&r!==(r=e[0]+"_from"))&&F(t,"id",r),(!m||1&o&&i!==(i=e[0]+"_from"))&&F(t,"name",i),128&o&&U(t,e[7]),(!m||6&o&&a!==(a=e[1]||e[2]))&&F(s,"class",a),(!m||1&o&&l!==(l=e[0]+"_to"))&&F(s,"id",l),(!m||1&o&&c!==(c=e[0]+"_to"))&&F(s,"name",c),256&o&&U(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||(ge(u.$$.fragment,e),ge(f.$$.fragment,e),m=!0)},o(e){pe(u.$$.fragment,e),pe(f.$$.fragment,e),m=!1},d(e){e&&N(t),e&&N(o),e&&N(s),e&&N(d),ve(u,e),e&&N(h),ve(f,e),g=!1,I(p)}}}function Uo(e,t,n){const r=Y(),{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=er(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=er(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 Ho extends be{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=D("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",$(document.head,t)),Se(this,e,Uo,Vo,v,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zo(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:Wo,placeholder:Go,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=D("div"),Ie(n.$$.fragment),H(t,"max-width","4em")},m(e,i){T(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||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}const Wo="([01][0-9]|2[0-3]):([0-5][0-9])",Go="";function Xo(e,t,n){const r=Y(),{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 qo extends be{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=D("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",$(document.head,t)),Se(this,e,Xo,zo,v,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:jo}=_e;function Yo(e,t,n){const r=e.slice();return r[16]=t[n],r}function Zo(e,t,n){const r=e.slice();return r[19]=t[n],r[21]=n,r}function Ko(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function Qo(e){let t,n,r=e[15],i=[];for(let t=0;t<r.length;t+=1)i[t]=es(Yo(e,r,t));const o=e=>pe(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=x()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);T(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=Yo(e,r,s);i[s]?(i[s].p(o,n),ge(i[s],1)):(i[s]=es(o),i[s].c(),ge(i[s],1),i[s].m(t.parentNode,t))}for(fe(),s=r.length;s<i.length;s+=1)o(s);me()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)ge(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)pe(i[e]);n=!1},d(e){R(i,e),e&&N(t)}}}function Jo(e){let t,n,r=e[2](e[16],e[19])+"",i=e[21]&&function(){let e;return{c(){e=M(", ")},m(t,n){T(t,e,n)},d(t){t&&N(e)}}}();return{c(){t=D("span"),i&&i.c(),n=M(r),F(t,"class","lookupValue")},m(e,r){T(e,t,r),i&&i.m(t,null),$(t,n)},p(e,t){1&t&&r!==(r=e[2](e[16],e[19])+"")&&V(n,r)},d(e){e&&N(t),i&&i.d()}}}function es(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]=Jo(Zo(e,c,t));return i=new Ze({props:{size:"18"}}),{c(){t=D("div");for(let e=0;e<d.length;e+=1)d[e].c();n=k(),r=D("span"),Ie(i.$$.fragment),o=k(),F(r,"class","feather pointer svelte-1r8jgd4"),F(t,"class","lookupItem svelte-1r8jgd4")},m(c,u){T(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);$(t,n),$(t,r),Ae(i,r,null),$(t,o),s=!0,a||(l=B(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=Zo(e,c,r);d[r]?d[r].p(o,i):(d[r]=Jo(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||(ge(i.$$.fragment,e),s=!0)},o(e){pe(i.$$.fragment,e),s=!1},d(e){e&&N(t),R(d,e),ve(i),a=!1,l()}}}function ts(e){return{c:_,m:_,p:_,i:_,o:_,d:_}}function ns(e){let t,n,r={ctx:e,current:null,token:null,hasCatch:!1,pending:ts,then:Qo,catch:Ko,value:15,blocks:[,,,]};return we(e[1](),r),{c(){t=D("div"),r.block.c(),F(t,"class","lookup svelte-1r8jgd4")},m(e,i){T(e,t,i),r.block.m(t,r.anchor=null),r.mount=()=>t,r.anchor=null,n=!0},p(t,[n]){ye(r,e=t,n)},i(e){n||(ge(r.block),n=!0)},o(e){for(let e=0;e<3;e+=1){pe(r.blocks[e])}n=!1},d(e){e&&N(t),r.block.d(),r.token=null,r=null}}}function rs(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=()=>{ie().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 is extends be{constructor(e){var t;super(),jo.getElementById("svelte-1r8jgd4-style")||((t=D("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}",$(jo.head,t)),Se(this,e,rs,ns,v,{id:4,item:5,praefix:6,record:7})}}function os(e){let t,n,r;return n=new lt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ss(e){let t,n,r,i,o;return n=new lt({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[9]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(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[12]);const a=[ss,os],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}const ls=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 cs(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 ls(e);window.open(t,"_blank")},f,m,function(t){Z(e,t)}]}class ds extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,cs,as,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function us(e){let t,n,r;return n=new Je({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function hs(e){let t,n,r,i,o;return n=new Je({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[9]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function fs(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=[hs,us],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}function ms(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){Z(e,t)}]}class gs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,ms,fs,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function ps(e){let t,n,r;return n=new ut({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function ws(e){let t,n,r,i,o;return n=new ut({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[11]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function ys(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=[ws,ps],l=[];function c(e,t){return e[9]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(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,{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){Z(e,t)}]}class Cs extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,_s,ys,v,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function Es(e){let t,n,r;return n=new ot({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather2 svelte-9up2nn")},m(e,i){T(e,t,i),Ae(n,t,null),r=!0},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n)}}}function Is(e){let t,n,r,i,o;return n=new ot({props:{size:"18"}}),{c(){t=D("span"),Ie(n.$$.fragment),F(t,"class","feather pointer svelte-9up2nn")},m(s,a){T(s,t,a),Ae(n,t,null),r=!0,i||(o=B(t,"click",e[11]),i=!0)},p:_,i(e){r||(ge(n.$$.fragment,e),r=!0)},o(e){pe(n.$$.fragment,e),r=!1},d(e){e&&N(t),ve(n),i=!1,o()}}}function As(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=[Is,Es],l=[];function c(e,t){return e[7]?0:1}return i=c(e),o=l[i]=a[i](e),{c(){t=D("div"),Ie(n.$$.fragment),r=k(),o.c(),H(t,"position","relative")},m(e,o){T(e,t,o),Ae(n,t,null),$(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):(fe(),pe(l[d],1,1,(()=>{l[d]=null})),me(),o=l[i],o?o.p(e,r):(o=l[i]=a[i](e),o.c()),ge(o,1),o.m(t,null))},i(e){s||(ge(n.$$.fragment,e),ge(o),s=!0)},o(e){pe(n.$$.fragment,e),pe(o),s=!1},d(e){e&&N(t),ve(n),l[i].d()}}}function vs(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){Z(e,t)}]}class Ss extends be{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=D("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}",$(document.head,t)),Se(this,e,vs,As,v,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const bs=["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 $s(e){let t;return{c(){t=D("textarea"),F(t,"id",e[0]),H(t,"visibility","hidden")},m(n,r){T(n,t,r),e[18](t)},p(e,n){1&n&&F(t,"id",e[0])},d(n){n&&N(t),e[18](null)}}}function Ts(e){let t;return{c(){t=D("div"),F(t,"id",e[0])},m(n,r){T(n,t,r),e[17](t)},p(e,n){1&n&&F(t,"id",e[0])},d(n){n&&N(t),e[17](null)}}}function Ns(e){let t;function n(e,t){return e[1]?Ts:$s}let r=n(e),i=r(e);return{c(){t=D("div"),i.c(),F(t,"class",e[2])},m(n,r){T(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&&F(t,"class",e[2])},i:_,o:_,d(n){n&&N(t),i.d(),e[19](null)}}}const Rs=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Ds=(()=>{let e={listeners:[],scriptId:Rs("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 Os(e,t,n){var r;let i,o,s,{id:a=Rs("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;const C=Y(),E=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},I=()=>{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)=>{bs.forEach((n=>{e.on(n,(r=>{t(n.toLowerCase(),{eventName:n,event:r,editor:e})}))}))})(e,C),"function"==typeof f.setup&&f.setup(e)}});n(4,o.style.visibility="",o),E().init(e)};return q((()=>{if(null!==E())I();else{const e=h||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Ds.load(i.ownerDocument,e,(()=>{I()}))}})),j((()=>{var e;s&&(null===(e=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!==_&&(n(16,_=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,_,function(e){Q[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){Q[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){Q[e?"unshift":"push"]((()=>{i=e,n(3,i)}))}]}class Ms extends be{constructor(e){super(),Se(this,e,Os,Ns,v,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function ks(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 Ms({props:c}),Q.push((()=>Ee(n,"value",l))),{c(){t=D("div"),Ie(n.$$.fragment),i=k(),o=D("input"),F(o,"class",s=e[1]||e[2]),F(o,"id",e[3]),F(o,"name",e[3]),o.value=e[0],o.hidden=!0,H(t,"min-height","10em"),H(t,"margin-top","-1em")},m(e,r){T(e,t,r),Ae(n,t,null),$(t,i),$(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],se((()=>r=!1))),n.$set(i),(!a||6&t&&s!==(s=e[1]||e[2]))&&F(o,"class",s),(!a||8&t)&&F(o,"id",e[3]),(!a||8&t)&&F(o,"name",e[3]),(!a||1&t&&o.value!==e[0])&&(o.value=e[0])},i(e){a||(ge(n.$$.fragment,e),a=!0)},o(e){pe(n.$$.fragment,e),a=!1},d(e){e&&N(t),ve(n)}}}function xs(e){let t,n,r=e[6]&&ks(e);return{c(){r&&r.c(),t=x()},m(e,i){r&&r.m(e,i),T(e,t,i),n=!0},p(e,[n]){e[6]?r?(r.p(e,n),64&n&&ge(r,1)):(r=ks(e),r.c(),ge(r,1),r.m(t.parentNode,t)):r&&(fe(),pe(r,1,1,(()=>{r=null})),me())},i(e){n||(ge(r),n=!0)},o(e){pe(r),n=!1},d(e){r&&r.d(e),e&&N(t)}}}function Bs(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 Ps extends be{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=D("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}",$(document.head,t)),Se(this,e,Bs,xs,v,{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
|