@enablerr-ui/detail 0.2.661 → 0.2.663

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 CHANGED
@@ -1,5 +1,5 @@
1
- System.register(["@enablerr-ui/form","@enablerr-ui/layout","@enablerr-ui/auth","@enablerr-ui/task"],(function(e){"use strict";var t,n,i,o,r,s,l,a,c,d,u,m;return{setters:[function(e){t=e.Storage,n=e.Request,i=e.task_notification,o=e.currentRoles,r=e.TextArea,s=e.toasts,l=e.settings,a=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){m=e.taskClipboard}],execute:function(){e("version","0.2.661");const f=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},h=e=>e?"(ja)":"(nein)",$=(e,t)=>{const n={...t};return(e.display?.reduce(((t,i)=>{let[o,r]=i.split(".");if(e.list?.find((({name:e})=>e===o))&&r&&void 0!==n[o]){const e=`${o}_${r}`;n[e]=n[o][r],o=e}return t.find((e=>e===o))||t.push(o),t}),[]).map((e=>"boolean"==typeof n[e]?h(n[e]):f(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&h(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},g=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function v(){}function y(e){return e()}function w(){return Object.create(null)}function b(e){e.forEach(y)}function x(e){return"function"==typeof e}function k(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function I(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return v;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function _(e){return null==e?"":e}function S(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function L(e){return document.createElement(e)}function j(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function q(e){return document.createTextNode(e)}function D(){return q(" ")}function F(){return q("")}function T(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function z(e){return function(t){return t.preventDefault(),e.call(this,t)}}function A(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function M(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function P(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function V(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function U(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){U().$$.on_mount.push(e)}function G(e){U().$$.on_destroy.push(e)}function Q(){const e=U();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach((t=>{t.call(e,o)}))}}}function Y(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],K=[],Z=[],X=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ae))}function ie(){return ne(),ee}function oe(e){Z.push(e)}function re(e){X.push(e)}let se=!1;const le=new Set;function ae(){if(!se){se=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];R(t),ce(t.$$)}for(R(null),J.length=0;K.length;)K.pop()();for(let e=0;e<Z.length;e+=1){const t=Z[e];le.has(t)||(le.add(t),t())}Z.length=0}while(J.length);for(;X.length;)X.pop()();te=!1,se=!1,le.clear()}}function ce(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(oe)}}const de=new Set;let ue;function me(){ue={r:0,c:[],p:ue}}function fe(){ue.r||b(ue.c),ue=ue.p}function pe(e,t){e&&e.i&&(de.delete(e),e.i(t))}function he(e,t,n,i){if(e&&e.o){if(de.has(e))return;de.add(e),ue&&ue.c.push((()=>{de.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function $e(e,t){const n=t.token={};function i(e,i,o,r){if(t.token!==n)return;t.resolved=r;let s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=r);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(me(),he(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),fe())})):t.block.d(1),l.c(),pe(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[i]=l),a&&ae()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=U();if(e.then((e=>{R(n),i(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),i(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}var o}function ge(e,t,n){const i=t.slice(),{resolved:o}=e;e.current===e.then&&(i[e.value]=o),e.current===e.catch&&(i[e.error]=o),e.block.p(i,n)}const ve="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ye(e,t){he(e,1,1,(()=>{t.delete(e.key)}))}function we(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function be(e){e&&e.c()}function xe(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:s,after_update:l}=e.$$;o&&o.m(t,n),i||oe((()=>{const t=r.map(y).filter(x);s?s.push(...t):b(t),e.$$.on_mount=[]})),l.forEach(oe)}function ke(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ie(e,t,n,i,o,r,s=[-1]){const l=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:v,not_equal:o,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:w(),dirty:s,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return a.ctx&&o(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(J.push(e),ne(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!i&&i(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(E)}else a.fragment&&a.fragment.c();t.intro&&pe(e.$$.fragment),xe(e,t.target,t.anchor,t.customElement),ae()}R(l)}class _e{$destroy(){ke(this,1),this.$destroy=v}$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 Se(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("line"),o=j("line"),M(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"),M(i,"x1","12"),M(i,"y1","9"),M(i,"x2","12"),M(i,"y2","13"),M(o,"x1","12"),M(o,"y1","17"),M(o,"x2","12.01"),M(o,"y2","17"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ce(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ee extends _e{constructor(e){super(),Ie(this,e,Ce,Se,k,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("circle"),i=j("polyline"),o=j("line"),M(n,"cx","12"),M(n,"cy","12"),M(n,"r","10"),M(i,"points","8 12 12 16 16 12"),M(o,"x1","12"),M(o,"y1","8"),M(o,"x2","12"),M(o,"y2","16"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Le(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class je extends _e{constructor(e){super(),Ie(this,e,Le,Ne,k,{size:0,strokeWidth:1,class:2})}}function qe(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),M(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),M(i,"points","22 4 12 14.01 9 11.01"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function De(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Fe extends _e{constructor(e){super(),Ie(this,e,De,qe,k,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i;return{c(){t=j("svg"),n=j("path"),M(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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),S(t,n)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&M(t,"class",i)},i:v,o:v,d(e){e&&E(t)}}}function ze(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ae extends _e{constructor(e){super(),Ie(this,e,ze,Te,k,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,i,o;return{c(){t=j("svg"),n=j("polyline"),i=j("path"),M(n,"points","9 10 4 15 9 20"),M(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function Be(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Oe extends _e{constructor(e){super(),Ie(this,e,Be,Me,k,{size:0,strokeWidth:1,class:2})}}function Pe(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("line"),o=j("line"),M(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),M(i,"x1","18"),M(i,"y1","9"),M(i,"x2","12"),M(i,"y2","15"),M(o,"x1","12"),M(o,"y1","9"),M(o,"x2","18"),M(o,"y2","15"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ve(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class We extends _e{constructor(e){super(),Ie(this,e,Ve,Pe,k,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),o=j("line"),M(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),M(i,"points","15 3 21 3 21 9"),M(o,"x1","10"),M(o,"y1","14"),M(o,"x2","21"),M(o,"y2","3"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ue(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class He extends _e{constructor(e){super(),Ie(this,e,Ue,Re,k,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("circle"),i=j("line"),o=j("path"),M(n,"cx","12"),M(n,"cy","12"),M(n,"r","10"),M(i,"x1","2"),M(i,"y1","12"),M(i,"x2","22"),M(i,"y2","12"),M(o,"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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Qe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ye extends _e{constructor(e){super(),Ie(this,e,Qe,Ge,k,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r,s,l,a;return{c(){t=j("svg"),n=j("line"),i=j("line"),o=j("line"),r=j("line"),s=j("line"),l=j("line"),M(n,"x1","8"),M(n,"y1","6"),M(n,"x2","21"),M(n,"y2","6"),M(i,"x1","8"),M(i,"y1","12"),M(i,"x2","21"),M(i,"y2","12"),M(o,"x1","8"),M(o,"y1","18"),M(o,"x2","21"),M(o,"y2","18"),M(r,"x1","3"),M(r,"y1","6"),M(r,"x2","3.01"),M(r,"y2","6"),M(s,"x1","3"),M(s,"y1","12"),M(s,"x2","3.01"),M(s,"y2","12"),M(l,"x1","3"),M(l,"y1","18"),M(l,"x2","3.01"),M(l,"y2","18"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",a="feather feather-list "+e[2])},m(e,a){C(e,t,a),S(t,n),S(t,i),S(t,o),S(t,r),S(t,s),S(t,l)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&a!==(a="feather feather-list "+e[2])&&M(t,"class",a)},i:v,o:v,d(e){e&&E(t)}}}function Ke(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ze extends _e{constructor(e){super(),Ie(this,e,Ke,Je,k,{size:0,strokeWidth:1,class:2})}}function Xe(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),M(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"),M(i,"points","22,6 12,13 2,6"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function et(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class tt extends _e{constructor(e){super(),Ie(this,e,et,Xe,k,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("circle"),M(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),M(i,"cx","12"),M(i,"cy","10"),M(i,"r","3"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function it(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ot extends _e{constructor(e){super(),Ie(this,e,it,nt,k,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("polyline"),i=j("line"),o=j("path"),M(n,"points","23 7 23 1 17 1"),M(i,"x1","16"),M(i,"y1","8"),M(i,"x2","23"),M(i,"y2","1"),M(o,"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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function st(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class lt extends _e{constructor(e){super(),Ie(this,e,st,rt,k,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("polyline"),i=j("path"),o=j("rect"),M(n,"points","6 9 6 2 18 2 18 9"),M(i,"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"),M(o,"x","6"),M(o,"y","14"),M(o,"width","12"),M(o,"height","8"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function ct(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class dt extends _e{constructor(e){super(),Ie(this,e,ct,at,k,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,i,o;return{c(){t=j("svg"),n=j("circle"),i=j("line"),M(n,"cx","11"),M(n,"cy","11"),M(n,"r","8"),M(i,"x1","21"),M(i,"y1","21"),M(i,"x2","16.65"),M(i,"y2","16.65"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function mt(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ft extends _e{constructor(e){super(),Ie(this,e,mt,ut,k,{size:0,strokeWidth:1,class:2})}}const{document:pt}=ve;function ht(e){e[45]=e[46].items}function $t(e,t,n){const i=e.slice();return i[47]=t[n],i[49]=n,i}function gt(e,t,n){const i=e.slice();return i[50]=t[n],i}function vt(e,t,n){const i=e.slice();return i[50]=t[n],i}function yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function wt(e){let t,n,i,o,r,s;ht(e);let l=e[5]?.length&&bt(e),a=e[45]?.length&&kt(e),c=e[5]?.length&&St(e);return{c(){l&&l.c(),t=D(),n=L("div"),i=L("table"),a&&a.c(),o=D(),r=L("tbody"),c&&c.c(),M(i,"striped",""),M(i,"class","svelte-v0ogws"),M(n,"class","eList svelte-v0ogws")},m(e,d){l&&l.m(e,d),C(e,t,d),C(e,n,d),S(n,i),a&&a.m(i,null),S(i,o),S(i,r),c&&c.m(r,null),s=!0},p(e,n){ht(e),e[5]?.length?l?(l.p(e,n),32&n[0]&&pe(l,1)):(l=bt(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[45]?.length?a?a.p(e,n):(a=kt(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=St(e),c.c(),pe(c,1),c.m(r,null)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(l),pe(c),s=!0)},o(e){he(l),he(c),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),a&&a.d(),c&&c.d()}}}function bt(e){let t,n,i,o,r,s,l,a,c,d,u,m=e[6]&&xt(e);function f(t){e[29](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>we(o,"value",f))),o.$on("input",e[14]),a=new We({props:{size:"18"}}),{c(){m&&m.c(),t=D(),n=L("div"),i=q("Suchen: "),be(o.$$.fragment),s=D(),l=L("span"),be(a.$$.fragment),M(l,"class","feather pointer svelte-v0ogws"),P(n,"margin-bottom","1em"),P(n,"position","relative")},m(r,f){m&&m.m(r,f),C(r,t,f),C(r,n,f),S(n,i),xe(o,n,null),S(n,s),S(n,l),xe(a,l,null),c=!0,d||(u=T(l,"click",e[16]),d=!0)},p(e,n){e[6]?m?64&n[0]&&pe(m,1):(m=xt(e),m.c(),pe(m,1),m.m(t.parentNode,t)):m&&(me(),he(m,1,1,(()=>{m=null})),fe());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],re((()=>r=!1))),o.$set(i)},i(e){c||(pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(m),he(o.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&E(t),e&&E(n),ke(o),ke(a),d=!1,u()}}}function xt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function kt(e){let t,n,i,o=e[4]&&e[0]&&It(),r=e[45],s=[];for(let t=0;t<r.length;t+=1)s[t]=_t(vt(e,r,t));return{c(){t=L("thead"),n=L("tr"),o&&o.c(),i=D();for(let e=0;e<s.length;e+=1)s[e].c();M(n,"class","svelte-v0ogws"),M(t,"class","svelte-v0ogws")},m(e,r){C(e,t,r),S(t,n),o&&o.m(n,null),S(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=It(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[45],i=0;i<r.length;i+=1){const o=vt(e,r,i);s[i]?s[i].p(o,t):(s[i]=_t(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),o&&o.d(),N(s,e)}}}function It(e){let t;return{c(){t=L("th"),M(t,"class","svelte-v0ogws")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _t(e){let t,n,i=e[50]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,t){4&t[0]&&i!==(i=e[50]?.designation+"")&&B(n,i)},d(e){e&&E(t)}}}function St(e){let t,n,i=[],o=new Map,r=e[5];const s=e=>e[47]._id;for(let t=0;t<r.length;t+=1){let n=$t(e,r,t),l=s(n);o.set(l,i[t]=Lt(l,n))}return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);C(e,t,o),n=!0},p(e,n){178239&n[0]&&(r=e[5],me(),i=function(e,t,n,i,o,r,s,l,a,c,d,u){let m=e.length,f=r.length,p=m;const h={};for(;p--;)h[e[p].key]=p;const $=[],g=new Map,v=new Map;for(p=f;p--;){const e=u(o,r,p),l=n(e);let a=s.get(l);a?i&&a.p(e,t):(a=c(l,e),a.c()),g.set(l,$[p]=a),l in h&&v.set(l,Math.abs(p-h[l]))}const y=new Set,w=new Set;function b(e){pe(e,1),e.m(l,d),s.set(e.key,e),d=e.first,f--}for(;m&&f;){const t=$[f-1],n=e[m-1],i=t.key,o=n.key;t===n?(d=t.first,m--,f--):g.has(o)?!s.has(i)||y.has(i)?b(t):w.has(o)?m--:v.get(i)>v.get(o)?(w.add(i),b(t)):(y.add(o),m--):(a(n,s),m--)}for(;m--;){const t=e[m];g.has(t.key)||a(t,s)}for(;f;)b($[f-1]);return $}(i,n,s,1,e,r,o,t.parentNode,ye,Lt,t,$t),fe())},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){for(let e=0;e<i.length;e+=1)he(i[e]);n=!1},d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&E(t)}}}function Ct(e){let t,n,i,o,r,s,l=e[4]&&e[0]&&Et(e),a=e[45],c=[];for(let t=0;t<a.length;t+=1)c[t]=Nt(gt(e,a,t));return{c(){t=L("tr"),l&&l.c(),n=D();for(let e=0;e<c.length;e+=1)c[e].c();i=D(),M(t,"class","pointer svelte-v0ogws"),V(t,"active",e[47]._id===e[1])},m(a,d){C(a,t,d),l&&l.m(t,null),S(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);S(t,i),o=!0,r||(s=T(t,"click",A((function(){x(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),r=!0)},p(o,r){if((e=o)[4]&&e[0]?l?(l.p(e,r),17&r[0]&&pe(l,1)):(l=Et(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),10276&r[0]){let n;for(a=e[45],n=0;n<a.length;n+=1){const o=gt(e,a,n);c[n]?c[n].p(o,r):(c[n]=Nt(o),c[n].c(),c[n].m(t,i))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}34&r[0]&&V(t,"active",e[47]._id===e[1])},i(e){o||(pe(l),o=!0)},o(e){he(l),o=!1},d(e){e&&E(t),l&&l.d(),N(c,e),r=!1,s()}}}function Et(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("td"),be(n.$$.fragment),M(t,"class","editRow svelte-v0ogws"),P(t,"color","#326173")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",A((function(){x(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Nt(e){let t,n,i,o=e[11](e[47],e[50])+"";return{c(){t=L("td"),n=q(o),M(t,"class",i=_(e[50].type)+" svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,r){36&r[0]&&o!==(o=e[11](e[47],e[50])+"")&&B(n,o),4&r[0]&&i!==(i=_(e[50].type)+" svelte-v0ogws")&&M(t,"class",i)},d(e){e&&E(t)}}}function Lt(e,t){let n,i,o,r=t[15](t[47],t[45],t[3]),s=r&&Ct(t);return{key:e,first:null,c(){n=F(),s&&s.c(),i=F(),this.first=n},m(e,t){C(e,n,t),s&&s.m(e,t),C(e,i,t),o=!0},p(e,n){t=e,44&n[0]&&(r=t[15](t[47],t[45],t[3])),r?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=Ct(t),s.c(),pe(s,1),s.m(i.parentNode,i)):s&&(me(),he(s,1,1,(()=>{s=null})),fe())},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(n),s&&s.d(e),e&&E(i)}}}function jt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function qt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:jt,then:wt,catch:yt,value:46,blocks:[,,,]};return $e(n=e[2]&&e[13](),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,4&i[0]&&n!==(n=e[2]&&e[13]())&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}const Dt=e("getDisplayItems",((e,t,n)=>{if(!e)return;let i=[];return e.forEach((e=>{if("_total"===e)return void i.push({name:"_total",designation:"Betrag",type:"number"});const[o,r]=e.split(".");let s=t.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));s&&(s={...s},s.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[s.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),s||(s=t.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(s)})),i.length?i:t.items}));function Ft(e,o,r){let s;let l=JSON.parse(t.getItem("Locale")).id;const a=Q(),{Loading:d,TextField:m}=c,{currentTasks:p}=u;I(e,p,(e=>r(33,s=e)));let $,g,v,y,{inputList:w}=o,{eventId:b}=o,{prevEventId:x}=o,{className:k}=o,{rowId:_}=o,{filterForReady:S=!1}=o,{refStatus:C}=o,{showEdit:E=!1}=o,{praefix:N=""}=o,{selectionFields:L=!1}=o,{deList:j}=o,{stopAggregation:q=!1}=o,{inputSearch:D=""}=o,F=!0,T=D,z=k+Math.floor(9e3*Math.random()+1e3).toString()+"search",A=!1,M=!0;const B=(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[i,o]=t.name.split("_");try{n=e[i][0][o],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n=Number(n)?n.toLocaleString(l,{minimumFractionDigits:t.properties?.decimals||0,maximumFractionDigits:t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?h(n):f(e[`_${t.name}`]||n||"")},O=n.getSchemaByClass(k),P=async(e,t)=>{if(C)return r(18,C=[].concat(C)),e.filter((e=>!!C.find((t=>e._task.status===t))));if("Information"===t.state.task)return e;if(x){const t=await n.getEvent(x);if("report"===t?.output?.type)return e;if(t?.input?.class?.length&&t.input.class[0].name===k)return"Information"===t.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))},V=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],i=new Intl.Collator(l,{numeric:!0});return t.sort(((e,t)=>i.compare(e[n],t[n])))}return t},W=async e=>{let t,i=0;M=!1;const o=e=>new Promise((t=>setTimeout(t,e)));for(;i++<200&&!q&&!(t=await R(e));)await o(500);r(6,A=!1),q&&n.readTasksByAggregationId(e,!0),t&&(r(5,v=V(g.displaySort,t.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),M=!0}),100))},R=async e=>await n.readTasksByAggregationId(e),U=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[s,l]=n.split("."),a=o?.get(N),c=a&&await Oa(s,a);if(!c)return e;const d=c[l];return d?.length?d.map((n=>{let i=e?.find((e=>e._id===n[t]))||{};i={...i};for(const e in i)n[e]&&(i[e]=n[e]);for(const e in n)n[e]&&(i[e]=n[e]);return Ma(r+i._id.toString(),i),i})):e};H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(z)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await O;e.eventId===t.id&&(Pa(t.class,e.eventId),r(2,F=!r(2,F=!1)))}));return e.$$set=e=>{"inputList"in e&&r(20,w=e.inputList),"eventId"in e&&r(21,b=e.eventId),"prevEventId"in e&&r(22,x=e.prevEventId),"className"in e&&r(23,k=e.className),"rowId"in e&&r(1,_=e.rowId),"filterForReady"in e&&r(24,S=e.filterForReady),"refStatus"in e&&r(18,C=e.refStatus),"showEdit"in e&&r(0,E=e.showEdit),"praefix"in e&&r(25,N=e.praefix),"selectionFields"in e&&r(26,L=e.selectionFields),"deList"in e&&r(27,j=e.deList),"stopAggregation"in e&&r(19,q=e.stopAggregation),"inputSearch"in e&&r(28,D=e.inputSearch)},[E,_,F,T,$,v,A,d,m,p,z,B,(e,t)=>n=>{r(19,q=!0);const i=M?e:y[t];a("choose",{row:i})},async()=>{g=await O,r(4,$=(e=>!s?.length||!!s.find((t=>t===e)))(g.id)),r(5,v=y=V(g.displaySort,await w||await za(g.class,g.id))),500===v?.length&&(r(6,A=!0),n.getTasksList(g.id,!1,!0).then((({aggregationId:e})=>W(e))));let e,t=!1,i="";const o=L&&L?.find((e=>g.class===e.refClass.split(":")[0])),l=o?.value?.get&&o.value.get(N);if(l){const[s,a]=o.refClass.split(":");g.class===s&&r(5,v=await U(v,s,a,o)),t=o.parentClass?.find((e=>"quantity"===e.name)),i=o.className,e=await n.getCountedSection(i,a.split(".")[0],l,s,"quantity")}r(0,E&&=!o),o||!S&&!C||r(5,v=await P(v,g));const{display:c}=g;let d=Dt(c,g,v);return!E&&t?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),r(5,v=v.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!v.find((t=>t._id===e._id))){const t=y.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,v.push(t)}})),a("init",v)):j&&r(5,v=v.filter((e=>!j.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{r(3,T=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let i=!1;for(const o of t){const t=B(e,o).toLowerCase();!i&&t.includes(n)&&(i=!0)}return i},()=>{r(3,T="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},C,q,w,b,x,k,S,N,L,j,D,function(e){T=e,r(3,T)}]}class Tt extends _e{constructor(e){var t;super(),pt.getElementById("svelte-v0ogws-style")||((t=L("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}",S(pt.head,t)),Ie(this,e,Ft,qt,k,{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 zt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function At(e){let t,n,i=e[41]&&Mt(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[41]?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Mt(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Mt(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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65537&n[0]&&(i.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(i.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Bt(e){let t,n;return t=new Wa({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){x(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};4&i[0]&&(o.schema=e[2]),2&i[0]&&(o.recID=e[1]),32768&i[0]&&(o.readonly=e[15]),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ot(e){let t,n,i,o,r,s,l;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const a=[Vt,Pt],c=[];function d(e,t){return e[16]?0:1}return i=d(e),o=c[i]=a[i](e),s=new Tt({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(){be(t.$$.fragment),n=D(),o.c(),r=D(),be(s.$$.fragment)},m(e,o){xe(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),xe(s,e,o),l=!0},p(e,n){const l={};65536&n[0]&&(l.text=e[16]?"Zusätzliche Auswahl":""),t.$set(l);let u=i;i=d(e),i===u?c[i].p(e,n):(me(),he(c[u],1,1,(()=>{c[u]=null})),fe(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),pe(o,1),o.m(r.parentNode,r));const m={};4096&n[0]&&(m.inputSearch=e[12]),4&n[0]&&(m.eventId=e[2].id),4&n[0]&&(m.className=e[2].class),2048&n[0]&&(m.prevEventId=e[11]),16&n[0]&&(m.filterForReady=e[4]),32&n[0]&&(m.refStatus=e[5]),64&n[0]&&(m.praefix=e[6]),128&n[0]&&(m.selectionFields=e[7]),2&n[0]&&(m.rowId=e[1]),512&n[0]&&(m.deList=e[9]),1048576&n[0]&&(m.stopAggregation=e[20]),256&n[0]&&(m.showEdit=e[8]),s.$set(m)},i(e){l||(pe(t.$$.fragment,e),pe(o),pe(s.$$.fragment,e),l=!0)},o(e){he(t.$$.fragment,e),he(o),he(s.$$.fragment,e),l=!1},d(e){ke(t,e),e&&E(n),c[i].d(e),e&&E(r),ke(s,e)}}}function Pt(e){let t,n,i,o;n=new e[23]({props:{outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let r=e[25]&&e[10]&&Rt(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),M(t,"class","form--buttons svelte-jb5mrh")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};2048&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[25]&&e[10]?r?(r.p(e,i),1024&i[0]&&pe(r,1)):(r=Rt(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Vt(e){let t,n,i,o,r,s,l=e[19]&&Ht(e);return i=new e[23]({props:{outline:!0,$$slots:{default:[Gt]},$$scope:{ctx:e}}}),i.$on("click",e[28]),r=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){l&&l.c(),t=D(),n=L("div"),be(i.$$.fragment),o=D(),be(r.$$.fragment),M(n,"class","form--buttons svelte-jb5mrh")},m(e,a){l&&l.m(e,a),C(e,t,a),C(e,n,a),xe(i,n,null),C(e,o,a),xe(r,e,a),s=!0},p(e,n){e[19]?l?(l.p(e,n),524288&n[0]&&pe(l,1)):(l=Ht(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe());const o={};2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),r.$set(s)},i(e){s||(pe(l),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),ke(i),e&&E(o),ke(r,e)}}}function Wt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Rt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ut(e){let t;return{c(){t=q("Neu")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Ht(e){let t,n;return t=new fl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.item=e[17]),131072&n[0]&&(i.record={_id:"",[e[17].name]:""}),131072&n[0]&&(i.classId="sel_"+e[17].name),262144&n[0]&&(i.eventId=e[18]),524288&n[0]&&(i.deList=e[19]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Qt(e){let t,n,i,o;const r=[Ot,Bt],s=[];function l(e,t){return e[41].length&&!e[14]?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function Yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Yt,then:At,catch:zt,value:41,blocks:[,,,]};return $e(n=e[26](e[3]),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,8&i[0]&&n!==(n=e[26](e[3]))&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}function Kt(e,t,i){let o;const{Dialog:r,Divider:s,Button:l}=c,a=Q(),{currentTasks:d}=u;I(e,d,(e=>i(37,o=e)));let{title:m}=t,{schema:f}=t,{recID:p}=t,{isOpening:h=!0}=t,{filterForReady:$=!1}=t,{refStatus:g}=t,{praefix:v=""}=t,{selectionFields:y=!1}=t,{showEdit:w=!0}=t,{deList:b}=t,{newAllowed:x=!0}=t,{prevEventId:k}=t,{inputSearch:_}=t,S=f.id;f.class;let C,E,N,L,j,q,D,F="",T=!1,z=!1;m??=f.identity.designation;const A=!o?.length||o.find((e=>e===S));return e.$$set=e=>{"title"in e&&i(0,m=e.title),"schema"in e&&i(2,f=e.schema),"recID"in e&&i(1,p=e.recID),"isOpening"in e&&i(3,h=e.isOpening),"filterForReady"in e&&i(4,$=e.filterForReady),"refStatus"in e&&i(5,g=e.refStatus),"praefix"in e&&i(6,v=e.praefix),"selectionFields"in e&&i(7,y=e.selectionFields),"showEdit"in e&&i(8,w=e.showEdit),"deList"in e&&i(9,b=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,k=e.prevEventId),"inputSearch"in e&&i(12,_=e.inputSearch)},[m,p,f,h,$,g,v,y,w,b,x,k,_,F,T,C,N,j,q,D,z,r,s,l,d,A,async e=>{if(!e)return!1;const t=await za(f.class,f.id);if(E=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(16,N=E?.value?.get&&E.value.get(v)),N){L=E.refClass;const[e,t]=L.split(":"),[o]=t.split(".");i(17,j=E.parentClass.find((t=>t.name===e)));const r=await n.getSchemaByClass(j.refClass);i(18,q=r.id),i(13,F=E.parentClass.find((e=>e.name===o)).designation)}return t},()=>{i(14,T=!1),p||a("back"),w||a("back")},()=>{i(20,z=!0),i(14,T=!1),a("back")},()=>{i(20,z=!0),i(1,p=!1),i(15,C=!1),i(14,T=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,i]=t.split(".");let o=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));if(o){e[`${n}_${i}`]=e[n][i]}})),a("choose",{row:e})},({detail:e})=>{i(15,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(14,T=!0)},({detail:e})=>{N&&i(19,D=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Y(e,t)}]}class Zt extends _e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Kt,Jt,k,{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:Xt}=ve;function en(e){e[27]=e[29].list,e[28]=e[29].items}function tn(e,t,n){const i=e.slice();return i[30]=t[n],i}function nn(e,t,n){const i=e.slice();return i[33]=t[n],i}function on(e,t,n){const i=e.slice();return i[33]=t[n],i}function rn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function sn(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[24](t)}en(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[28]?.length&&function(e){let t,n,i,o,r=e[28],s=[];for(let t=0;t<r.length;t+=1)s[t]=an(on(e,r,t));return{c(){t=L("thead"),n=L("tr"),i=L("th"),o=D();for(let e=0;e<s.length;e+=1)s[e].c();M(i,"class","svelte-14hcfjl"),M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),S(t,n),S(n,i),S(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[28],i=0;i<r.length;i+=1){const o=on(e,r,i);s[i]?s[i].p(o,t):(s[i]=an(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),N(s,e)}}}(e),x=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=un(tn(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(44547&n[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const r=tn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=un(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){en(e);const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[28]?.length&&b.p(e,t),e[27]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(x),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),he(x),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function ln(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function an(e){let t,n,i=e[33]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function cn(e){let t,n,i,o,r,s,l,a;i=new He({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=dn(nn(e,c,t));return{c(){t=L("tr"),n=L("td"),be(i.$$.fragment),o=D();for(let e=0;e<d.length;e+=1)d[e].c();r=D(),M(n,"class","editRow svelte-14hcfjl"),M(t,"class","pointer svelte-14hcfjl"),V(t,"active",e[30]._id===e[0])},m(c,u){C(c,t,u),S(t,n),xe(i,n,null),S(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,r),s=!0,l||(a=T(n,"click",e[15](e[30])),l=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const o=nn(e,c,n);d[n]?d[n].p(o,i):(d[n]=dn(o),d[n].c(),d[n].m(t,r))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&i[0]&&V(t,"active",e[30]._id===e[0])},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){he(i.$$.fragment,e),s=!1},d(e){e&&E(t),ke(i),N(d,e),l=!1,a()}}}function dn(e){let t,n,i,o,r=e[9](e[30],e[33])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[30]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function un(e){let t,n,i=e[13](e[30],e[28],e[1]),o=i&&cn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){2&n[0]&&(i=e[13](e[30],e[28],e[1])),i?o?(o.p(e,n),2&n[0]&&pe(o,1)):(o=cn(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function mn(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function fn(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:mn,then:sn,catch:rn,value:29,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function pn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[fn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|128&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hn(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{classId:p}=t,{className:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass($);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Pa(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(16,m=e.item),"classId"in e&&o(17,p=e.classId),"className"in e&&o(18,$=e.className),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(19,v=e.viewName),"viewValue"in e&&o(20,y=e.viewValue),"recordId"in e&&o(21,w=e.recordId),"filter"in e&&o(22,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _;let t=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e),o=i?.value||w;if(o){const e=await Oa(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(t=await n.getSectionView(m.name,{_id:{$in:i}},!0))}}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||w};if(m.refItem){const e="."+p+"#"+m.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[m.refItem]:t.value},{[m.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}r[v]&&(t=await n.getSectionView(e.class,r,!0)),b&&(t=t.filter((e=>e._id!=b)))}const i=e.display;return{list:t,items:Dt(i,e,t)}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},e=>async()=>{const t=await n.getTaskByDocId(e._id),i=`/task/${t.event}/${t._id}/task?view=standalone`;window.open(i)},m,p,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class $n extends _e{constructor(e){var t;super(),Xt.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Xt.head,t)),Ie(this,e,hn,pn,k,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:gn}=ve;function vn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function yn(e){let t,n,i=e[58]&&function(e){let t,n,i,o,s,l,a,c,d,u,m,f,p,h,$,g,v,y,w;function b(t){e[45](t)}function x(t){e[46](t)}let k={class:"full-width",id:e[28],rows:"1",required:e[1],disabled:e[3],placeholder:e[29],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(k.value=e[2]);void 0!==e[23]&&(k.overwrite=e[23]);n=new r({props:k}),K.push((()=>we(n,"value",b))),K.push((()=>we(n,"overwrite",x))),n.$on("click",e[31]()),n.$on("onFocus",e[31](e[28]));const I=[bn,wn],N=[];function j(e,t){return!e[3]||e[14]?0:e[20]&&e[0]?1:-1}~(l=j(e))&&(a=N[l]=I[l](e));let q=(!e[3]||e[14]||e[15])&&xn(e);function z(t){e[47](t)}let A={class:"tModal",noClickaway:!0,$$slots:{default:[Sn]},$$scope:{ctx:e}};void 0!==e[17]&&(A.open=e[17]);p=new e[25]({props:A}),K.push((()=>we(p,"open",z)));let B=e[18]&&Cn(e);return{c(){t=L("div"),be(n.$$.fragment),s=D(),a&&a.c(),c=D(),d=L("input"),m=D(),q&&q.c(),f=D(),be(p.$$.fragment),$=D(),B&&B.c(),g=F(),M(d,"class",u=_(e[7]||e[8])+" svelte-jox15l"),M(d,"id",e[5]),M(d,"name",e[5]),d.value=e[0],d.hidden=!0,P(t,"position","relative")},m(i,o){C(i,t,o),xe(n,t,null),S(t,s),~l&&N[l].m(t,null),S(t,c),S(t,d),S(t,m),q&&q.m(t,null),C(i,f,o),xe(p,i,o),C(i,$,o),B&&B.m(i,o),C(i,g,o),v=!0,y||(w=T(t,"keydown",e[32]),y=!0)},p(e,r){const s={};2&r[0]&&(s.required=e[1]),8&r[0]&&(s.disabled=e[3]),!i&&4&r[0]&&(i=!0,s.value=e[2],re((()=>i=!1))),!o&&8388608&r[0]&&(o=!0,s.overwrite=e[23],re((()=>o=!1))),n.$set(s);let m=l;l=j(e),l===m?~l&&N[l].p(e,r):(a&&(me(),he(N[m],1,1,(()=>{N[m]=null})),fe()),~l?(a=N[l],a?a.p(e,r):(a=N[l]=I[l](e),a.c()),pe(a,1),a.m(t,c)):a=null),(!v||384&r[0]&&u!==(u=_(e[7]||e[8])+" svelte-jox15l"))&&M(d,"class",u),(!v||32&r[0])&&M(d,"id",e[5]),(!v||32&r[0])&&M(d,"name",e[5]),(!v||1&r[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[14]||e[15]?q?(q.p(e,r),49160&r[0]&&pe(q,1)):(q=xn(e),q.c(),pe(q,1),q.m(t,null)):q&&(me(),he(q,1,1,(()=>{q=null})),fe());const f={};6504273&r[0]|268435456&r[1]&&(f.$$scope={dirty:r,ctx:e}),!h&&131072&r[0]&&(h=!0,f.open=e[17],re((()=>h=!1))),p.$set(f),e[18]?B?(B.p(e,r),262144&r[0]&&pe(B,1)):(B=Cn(e),B.c(),pe(B,1),B.m(g.parentNode,g)):B&&(me(),he(B,1,1,(()=>{B=null})),fe())},i(e){v||(pe(n.$$.fragment,e),pe(a),pe(q),pe(p.$$.fragment,e),pe(B),v=!0)},o(e){he(n.$$.fragment,e),he(a),he(q),he(p.$$.fragment,e),he(B),v=!1},d(e){e&&E(t),ke(n),~l&&N[l].d(),q&&q.d(),e&&E(f),ke(p,e),e&&E($),B&&B.d(e),e&&E(g),y=!1,w()}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[58]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function wn(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[37]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bn(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=[T(t,"click",e[31](!0)),T(t,"choose",e[34])],o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,b(r)}}}function xn(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[36]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function kn(e){let t,n,i,o;const r=[_n,In],s=[];function l(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function In(e){let t,n;return t=new Zt({props:{title:e[6].designation,newAllowed:e[21],prevEventId:e[9],schema:e[16],recID:e[0],isOpening:e[17],filterForReady:e[22],refStatus:e[6].refStatus,selectionFields:e[12],deList:e[13],praefix:e[11],inputSearch:e[33]()}}),t.$on("choose",e[34]),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),2097152&n[0]&&(i.newAllowed=e[21]),512&n[0]&&(i.prevEventId=e[9]),65536&n[0]&&(i.schema=e[16]),1&n[0]&&(i.recID=e[0]),131072&n[0]&&(i.isOpening=e[17]),4194304&n[0]&&(i.filterForReady=e[22]),64&n[0]&&(i.refStatus=e[6].refStatus),4096&n[0]&&(i.selectionFields=e[12]),8192&n[0]&&(i.deList=e[13]),2048&n[0]&&(i.praefix=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _n(e){let t,n;return t=new $n({props:{item:e[6],className:e[16].class,classId:e[8],rowId:e[0],recordId:e[10],viewName:e[4],viewValue:""}}),t.$on("choose",e[34]),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),65536&n[0]&&(i.className=e[16].class),256&n[0]&&(i.classId=e[8]),1&n[0]&&(i.rowId=e[0]),1024&n[0]&&(i.recordId=e[10]),16&n[0]&&(i.viewName=e[4]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sn(e){let t,n,i=e[17]&&kn(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[17]?i?(i.p(e,n),131072&n[0]&&pe(i,1)):(i=kn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Cn(e){let t,n,i;function o(t){e[48](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Nn]},$$scope:{ctx:e}};return void 0!==e[18]&&(r.open=e[18]),t=new e[25]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};589825&i[0]|268435456&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&262144&i[0]&&(n=!0,o.open=e[18],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function En(e){let t,n;return t=new Wa({props:{schema:e[16],recID:e[0],readonly:!0}}),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.schema=e[16]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Nn(e){let t,n;return t=new e[24]({props:{title:e[19],$$slots:{default:[En]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[0]&&(i.title=e[19]),65537&n[0]|268435456&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ln(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function jn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:yn,catch:vn,value:58,blocks:[,,,]};return $e(e[30](),i),{c(){t=F(),i.block.c()},m(e,o){C(e,t,o),i.block.m(e,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t,n=!0},p(t,n){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(e),i.token=null,i=null}}}function qn(e,t,i){let r,s,l;I(e,o,(e=>i(44,r=e)));const a=Q(),{Dialog:d,Modal:m}=c,{currentTasks:f,loggedIn:p}=u;I(e,f,(e=>i(50,s=e))),I(e,p,(e=>i(51,l=e)));let{id:h}=t,{item:g}=t,{value:v=""}=t,{desc:y=""}=t,{noForm:w=!1}=t,{classId:b}=t,{eventId:x}=t,{recordId:k}=t,{withRefValue:_=!1}=t,{refValue:S=""}=t,{required:C}=t,{disabled:E}=t,{readonly:N}=t,{praefix:L}=t,{selectionFields:j}=t,{formnovalidate:q}=t,{selection:D}=t,{deList:F}=t,{isTemplate:T}=t,{noList:z=!1}=t,{multi:A=!1}=t;const M="comment_"+h;let B,O,P,V,W,R,U=!1,H=!0,G=!0,Y=!0;N||=k&&g.asInput,E||=N,!D&&g.selection&&1===g.selection.split(":").length&&(D=g.selection);const J=N||E||g.lookup||D&&!g.constraint?"":"Suchbegriff ⏎",K=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},Z=e=>{e&&(i(2,y=$(P,e)),a("setRefDesc",y.split(" •")[0]),a("change",{value:v,description:y}),a("task",{row:e,eventId:P.id}))},X=()=>{i(17,U=!1),i(18,B=!1)};return e.$$set=e=>{"id"in e&&i(5,h=e.id),"item"in e&&i(6,g=e.item),"value"in e&&i(0,v=e.value),"desc"in e&&i(2,y=e.desc),"noForm"in e&&i(7,w=e.noForm),"classId"in e&&i(8,b=e.classId),"eventId"in e&&i(9,x=e.eventId),"recordId"in e&&i(10,k=e.recordId),"withRefValue"in e&&i(38,_=e.withRefValue),"refValue"in e&&i(39,S=e.refValue),"required"in e&&i(1,C=e.required),"disabled"in e&&i(3,E=e.disabled),"readonly"in e&&i(40,N=e.readonly),"praefix"in e&&i(11,L=e.praefix),"selectionFields"in e&&i(12,j=e.selectionFields),"formnovalidate"in e&&i(41,q=e.formnovalidate),"selection"in e&&i(4,D=e.selection),"deList"in e&&i(13,F=e.deList),"isTemplate"in e&&i(14,T=e.isTemplate),"noList"in e&&i(42,z=e.noList),"multi"in e&&i(15,A=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|1024&e.$$.dirty[1]&&i(1,C=C&&!q),384&e.$$.dirty[1]&&_&&i(0,v=S),65601&e.$$.dirty[0]|2048&e.$$.dirty[1]&&v&&P&&Promise.resolve(Aa(g.refClass,P.id,v,!!g.lookup||z)).then(Z),65&e.$$.dirty[0]|12288&e.$$.dirty[1]&&v&&V&&g.name===V.input?.at(0)&&V.inputLookup?.length){const{domain:e}=V.inputLookup[0]||{};"user"===e&&(r.some((e=>V.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,E=!0))}65537&e.$$.dirty[0]&&!v&&P&&Z({})},[v,C,y,E,D,h,g,w,b,x,k,L,j,F,T,A,P,U,B,O,W,H,G,Y,d,m,f,p,M,J,async()=>{try{const e=await n.getEvent(x);if(R="report"===e.output.type,i(22,G=!g.asInput),i(21,H=e.output?.class[0].name!==g.refClass),i(16,P=await n.getSchemaByClass(g.refClass)),K(P),i(20,W=(e=>!s?.length||!!s.find((t=>t===e)))(P.id)),i(43,V=await n.getSchema(x)),x&&k&&v&&!E&&V.input?.find((e=>e===g.refClass))&&i(3,E=!0),g.properties?.query?.lookup){const{domain:e,value:t}=g.properties.query.lookup;if("user"===e){const e=l.user,o={[t]:e},s=await n.getSectionView(g.refClass,o);if(s?.length){const[{_id:e}]=s;e&&(i(39,S=e),i(38,_=!0))}r.some((e=>P.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,E=!0)}}return i(19,O=P.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if(!0===e&&i(17,U=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(g.lookup||D&&!g.constraint||v)&&i(17,U=!0)},e=>{13==e.which&&(e.preventDefault(),i(17,U=!0))},()=>{if(v)return"";const e=document.getElementById(M);return e?.value||""},({detail:e})=>{i(0,v=e.row._id),X()},X,()=>{(R||W)&&(A?a("change",{value:v,delete:!0}):(i(0,v=""),i(2,y=""),i(23,Y=!0),a("change",{value:v,description:y}),a("task",{row:{_task:{event:P.id,_id:!1}}})))},async()=>{if(!v)return;const e=await Aa(g.refClass,P.id,v);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},_,S,N,q,z,V,r,function(e){y=e,i(2,y)},function(e){Y=e,i(23,Y)},function(e){U=e,i(17,U)},function(e){B=e,i(18,B)}]}class Dn extends _e{constructor(e){var t;super(),gn.getElementById("svelte-jox15l-style")||((t=L("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}",S(gn.head,t)),Ie(this,e,qn,jn,k,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:9,recordId:10,withRefValue:38,refValue:39,required:1,disabled:3,readonly:40,praefix:11,selectionFields:12,formnovalidate:41,selection:4,deList:13,isTemplate:14,noList:42,multi:15},[-1,-1])}}function Fn(e,t,n){const i=e.slice();return i[37]=t[n],i[39]=n,i}function Tn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function zn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8191&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function An(e){let t,n;return t=new Dn({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.classId=e[6]),128&n[0]&&(i.eventId=e[7]),512&n[0]&&(i.required=e[9]),2&n[0]&&(i.disabled=e[1]),4096&n[0]&&(i.formnovalidate=e[12]),1024&n[0]&&(i.readonly=e[10]),4&n[0]&&(i.id=e[2]+"."+e[39]),8&n[0]&&(i.item=e[3]),16&n[0]&&(i.desc=e[4]),1&n[0]&&(i.value=e[37]),32&n[0]&&(i.noForm=e[5]),2048&n[0]&&(i.praefix=e[11]),256&n[0]&&(i.recordId=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mn(e){let t,n,i,o,r,s,l;n=new Ze({props:{size:"18"}});let a=e[0],c=[];for(let t=0;t<a.length;t+=1)c[t]=An(Fn(e,a,t));const d=e=>he(c[e],1,1,(()=>{c[e]=null}));return{c(){t=L("span"),be(n.$$.fragment),i=D();for(let e=0;e<c.length;e+=1)c[e].c();o=F(),M(t,"class","feather pointer")},m(a,d){C(a,t,d),xe(n,t,null),C(a,i,d);for(let e=0;e<c.length;e+=1)c[e].m(a,d);C(a,o,d),r=!0,s||(l=T(t,"click",(function(){x(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(a=e[0],t=0;t<a.length;t+=1){const i=Fn(e,a,t);c[t]?(c[t].p(i,n),pe(c[t],1)):(c[t]=An(i),c[t].c(),pe(c[t],1),c[t].m(o.parentNode,o))}for(me(),t=a.length;t<c.length;t+=1)d(t);fe()}},i(e){if(!r){pe(n.$$.fragment,e);for(let e=0;e<a.length;e+=1)pe(c[e]);r=!0}},o(e){he(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)he(c[e]);r=!1},d(e){e&&E(t),ke(n),e&&E(i),N(c,e),e&&E(o),s=!1,l()}}}function Bn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function On(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]&&(i.title=e[14].designation),49480&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Pn(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Vn(e){let t,n,i,o,r;return n=new e[19]({props:{outline:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),o=new Tt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),o.$on("choose",e[23]),o.$on("back",e[25]),{c(){t=L("div"),be(n.$$.fragment),i=D(),be(o.$$.fragment),M(t,"class","form--buttons")},m(e,s){C(e,t,s),xe(n,t,null),C(e,i,s),xe(o,e,s),r=!0},p(e,t){const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const r={};8&t[0]&&(r.item=e[3]),16384&t[0]&&(r.className=e[14].class),64&t[0]&&(r.classId=e[6]),32768&t[0]&&(r.rowId=e[15]),256&t[0]&&(r.recordId=e[8]),o.$set(r)},i(e){r||(pe(n.$$.fragment,e),pe(o.$$.fragment,e),r=!0)},o(e){he(n.$$.fragment,e),he(o.$$.fragment,e),r=!1},d(e){e&&E(t),ke(n),e&&E(i),ke(o,e)}}}function Wn(e){let t,n,i=e[13]&&On(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[13]?i?(i.p(e,n),8192&n[0]&&pe(i,1)):(i=On(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Rn(e){let t,n,i,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Bn,then:zn,catch:Tn,value:36,blocks:[,,,]};function s(t){e[33](t)}$e(e[20](),r);let l={class:"tModal",noClickaway:!0,$$slots:{default:[Wn]},$$scope:{ctx:e}};return void 0!==e[13]&&(l.open=e[13]),n=new e[17]({props:l}),K.push((()=>we(n,"open",s))),{c(){r.block.c(),t=D(),be(n.$$.fragment)},m(e,i){r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,C(e,t,i),xe(n,e,i),o=!0},p(t,o){ge(r,e=t,o);const s={};57672&o[0]|512&o[1]&&(s.$$scope={dirty:o,ctx:e}),!i&&8192&o[0]&&(i=!0,s.open=e[13],re((()=>i=!1))),n.$set(s)},i(e){o||(pe(r.block),pe(n.$$.fragment,e),o=!0)},o(e){for(let e=0;e<3;e+=1){he(r.blocks[e])}he(n.$$.fragment,e),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&E(t),ke(n,e)}}}function Un(e,t,i){const o=Q(),{Card:r,Modal:s,Dialog:l,Button:a}=c;let d,u,{id:m}=t,{item:f}=t,{values:p=[]}=t,{desc:h=""}=t,{noForm:$=!1}=t,{classId:g}=t,{eventId:v}=t,{recordId:y}=t,{withRefValue:w=!1}=t,{refValue:b=""}=t,{required:x}=t,{disabled:k}=t,{readonly:I}=t,{praefix:_}=t,{selectionFields:S}=t,{formnovalidate:C}=t,{selection:E}=t,{deList:N}=t,{isTemplate:L}=t,{noList:j=!1}=t,q=!1;const D=f.properties.multi.filter;k=!0;const F=()=>{i(13,q=!1)};return e.$$set=e=>{"id"in e&&i(2,m=e.id),"item"in e&&i(3,f=e.item),"values"in e&&i(0,p=e.values),"desc"in e&&i(4,h=e.desc),"noForm"in e&&i(5,$=e.noForm),"classId"in e&&i(6,g=e.classId),"eventId"in e&&i(7,v=e.eventId),"recordId"in e&&i(8,y=e.recordId),"withRefValue"in e&&i(26,w=e.withRefValue),"refValue"in e&&i(27,b=e.refValue),"required"in e&&i(9,x=e.required),"disabled"in e&&i(1,k=e.disabled),"readonly"in e&&i(10,I=e.readonly),"praefix"in e&&i(11,_=e.praefix),"selectionFields"in e&&i(28,S=e.selectionFields),"formnovalidate"in e&&i(12,C=e.formnovalidate),"selection"in e&&i(29,E=e.selection),"deList"in e&&i(30,N=e.deList),"isTemplate"in e&&i(31,L=e.isTemplate),"noList"in e&&i(32,j=e.noList)},[p,k,m,f,h,$,g,v,y,x,I,_,C,q,d,u,r,s,l,a,async()=>{i(14,d=await n.getSchemaByClass(f.refClass))},async()=>{let e=await za(d.class,d.id);if(D)for(const t in D)e=e.filter((e=>{const[n,i]=t.split(".");if(i||(i=n,n=""),n){if(e[n][0]&&e[n][0][i].length)return!0}else if(e[i])return!0;return!1}));return e},e=>()=>{i(13,q=!0),i(15,u=e)},({detail:e})=>{const t=e.row._id;p.find((e=>e===t))||i(0,p=p.concat(e.row._id)),F()},({detail:e})=>{e.delete&&i(0,p=p.filter((t=>t!==e.value))),e.value=p,o("change",e)},F,w,b,S,E,N,L,j,function(e){q=e,i(13,q)}]}class Hn extends _e{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=L("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",S(document.head,t)),Ie(this,e,Un,Rn,k,{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 Gn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Yn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Qn);let s=0,l=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)o=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;o=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Gn.lastIndex=s;const r=Gn.exec(e);if(null==r)return n;switch(t[l]){case"H":a.setHours(parseInt(r[0])+12*o);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*i+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}s+=r[0].length}l++}return isNaN(a.valueOf())?n:a}function Jn(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:Kn}=ve;function Zn(e,t,n){const i=e.slice();return i[17]=t[n],i}function Xn(e,t,n){const i=e.slice();return i[20]=t[n],i}function ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ti(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p=e[0].items,h=[];for(let t=0;t<p.length;t+=1)h[t]=ii(Xn(e,p,t));const $=e=>he(h[e],1,1,(()=>{h[e]=null}));let g=e[0].list&&oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[si]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[li]},$$scope:{ctx:e}}}),{c(){t=L("form"),n=L("input"),o=D();for(let e=0;e<h.length;e+=1)h[e].c();r=D(),g&&g.c(),s=D(),l=L("div"),be(a.$$.fragment),c=D(),be(d.$$.fragment),M(n,"class",_(e[6])+" svelte-1phofh5"),M(n,"name","_id"),M(n,"type","hidden"),n.value=i=e[1]._id||"",M(t,"class","fTask svelte-1phofh5"),M(t,"id",e[6]),M(l,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),S(t,n),S(t,o);for(let e=0;e<h.length;e+=1)h[e].m(t,null);S(t,r),g&&g.m(t,null),C(i,s,p),C(i,l,p),xe(a,l,null),S(l,c),xe(d,l,null),u=!0,m||(f=[T(t,"keydown",e[8]),T(t,"submit",z(e[10]))],m=!0)},p(e,o){if((!u||2&o&&i!==(i=e[1]._id||""))&&(n.value=i),75&o){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const i=Xn(e,p,n);h[n]?(h[n].p(i,o),pe(h[n],1)):(h[n]=ii(i),h[n].c(),pe(h[n],1),h[n].m(t,r))}for(me(),n=p.length;n<h.length;n+=1)$(n);fe()}e[0].list?g?(g.p(e,o),1&o&&pe(g,1)):(g=oi(e),g.c(),pe(g,1),g.m(t,null)):g&&(me(),he(g,1,1,(()=>{g=null})),fe());const s={};8388608&o&&(s.$$scope={dirty:o,ctx:e}),a.$set(s);const l={};4&o&&(l.disabled=e[2]),8388608&o&&(l.$$scope={dirty:o,ctx:e}),d.$set(l)},i(e){if(!u){for(let e=0;e<p.length;e+=1)pe(h[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){h=h.filter(Boolean);for(let e=0;e<h.length;e+=1)he(h[e]);he(g),he(a.$$.fragment,e),he(d.$$.fragment,e),u=!1},d(e){e&&E(t),N(h,e),g&&g.d(),e&&E(s),e&&E(l),ke(a),ke(d),m=!1,b(f)}}}function ni(e){let t,n;return t=new fl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.item=e[20]),1&n&&(i.selection=e[20].selection),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),1&n&&(i.eventId=e[0].id),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ii(e){let t,n,i=di(!0,e[20]),o=i&&ni(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){1&n&&(i=di(!0,e[20])),i?o?(o.p(e,n),1&n&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function oi(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zn(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(75&n){let s;for(i=e[0].list,s=0;s<i.length;s+=1){const r=Zn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=ri(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function ri(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};1&n&&(o.text=e[17].designation),t.$set(o);const r={};1&n&&(r.list=e[17]),1&n&&(r.eventId=e[0].id),1&n&&(r.schema=e[17].item),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function si(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function li(e){let t;return{c(){t=q("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ai(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ci(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:ti,catch:ei,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=D(),n=L("section"),o.block.c(),Kn.title="Vorgaben",M(n,"class","sTask svelte-1phofh5")},m(e,r){C(e,t,r),C(e,n,r),o.block.m(n,o.anchor=null),o.mount=()=>n,o.anchor=null,i=!0},p(t,[n]){ge(o,e=t,n)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),e&&E(n),o.block.d(),o.token=null,o=null}}}const di=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function ui(e,i,r){let a,d,u;I(e,l,(e=>r(11,d=e))),I(e,o,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,h=JSON.parse(t.getItem("Locale"));let{schema:$}=i,{record:g}=i,v="template-"+$.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const w=()=>window.history.back(),b=(e,t,n=!1)=>{const i=t.id,o=e.find((e=>e.name===i));let r=t.value;if(!n&&o&&o.properties?.multi&&(r=g[i]),r&&o&&o.type.startsWith("date"))try{return Yn(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};return e.$$set=e=>{"schema"in e&&r(0,$=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=y)},[$,g,y,a,m,f,v,async()=>{const e=await n.getEvent($.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,y=!0),d.role?.length&&$.authorization?.length){const e=$.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const t={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const n=e.id||e.name;if(n)if(n.includes(".")){const[i,o]=n.split("."),r=$.list.find((e=>e.name===i));t[n]=b(r.item,e)}else t[n]=b($.items,e)})),await n.saveTemplate($.class,t),s.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:mi}=ve;function fi(e,t,n){const i=e.slice();return i[28]=t[n],i}function pi(e){let t,n;return t=new fl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),2&n[0]&&(i.item=e[28]),2&n[0]&&(i.listName=e[1].name),8&n[0]&&(i.eventId=e[3]),1&n[0]&&(i.record=e[0]),16&n[0]&&(i.disabled=e[4]),32&n[0]&&(i.required=e[5]),256&n[0]&&(i.currency=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hi(e){let t,n,i=di(e[7],e[28]),o=i&&pi(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){130&n[0]&&(i=di(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&pe(o,1)):(o=pi(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function $i(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=hi(fi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));return{c(){t=L("div");for(let e=0;e<r.length;e+=1)r[e].c();M(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){C(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);i=!0},p(e,l){if(82367&l[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=fi(e,o,n);r[n]?(r[n].p(i,l),pe(r[n],1)):(r[n]=hi(i),r[n].c(),pe(r[n],1),r[n].m(t,null))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}(!i||6&l[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&M(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);i=!1},d(e){e&&E(t),N(r,e)}}}function gi(e){let t,n,i=e[13](e[9])+"";return{c(){t=L("span"),n=q(i)},m(e,i){C(e,t,i),S(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&B(n,i)},d(e){e&&E(t)}}}function vi(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[gi]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","accordion svelte-148ktt9"),M(t,"slot","handle")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(t,i){e=t;const o={};512&i[0]|1&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function yi(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[vi,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[$i,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.open=e[6]),134218687&n[0]|1&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function wi(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[yi]},$$scope:{ctx:e}}}),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","formList")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};1023&t[0]|1&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function bi(e,t,i){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:l}=t,{schema:a}=t,{record:d}=t,{classId:u}=t,{eventId:m}=t,{disabled:$}=t,{required:g}=t,{open:v=!1}=t,{template:y={}}=t,{isTemplate:w=!1}=t,{currency:b}=t,{update:x=!1}=t,k=new Map;const I={};let _=d[l.name]||{};d[l.name]=_;const S=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),C=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,l=e.list),"schema"in e&&i(18,a=e.schema),"record"in e&&i(0,d=e.record),"classId"in e&&i(2,u=e.classId),"eventId"in e&&i(3,m=e.eventId),"disabled"in e&&i(4,$=e.disabled),"required"in e&&i(5,g=e.required),"open"in e&&i(6,v=e.open),"template"in e&&i(19,y=e.template),"isTemplate"in e&&i(7,w=e.isTemplate),"currency"in e&&i(8,b=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[l.name]||{})},[d,l,u,m,$,g,v,w,b,_,o,r,s,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?h(e[t.name]):"date"===t.type?f(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(I[n]=e.desc);const o=d[t];i(0,d[t]={...o,[n]:e.value},d),i(9,_=d[t])},e=>t=>{(()=>{const e=y[l.name]||{};for(const t in e)y[l.name][t]&&!d[l.name][t]&&i(0,d[l.name][t]=y[l.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${l.name} > div.form-field:last-child`,o=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${l.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(C)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:t,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+l.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[l.name][e]||i(0,d[l.name][e]=t._id,d)}))}),500)},a,y,x,function(t){Y(e,t)}]}class xi extends _e{constructor(e){var t;super(),mi.getElementById("svelte-148ktt9-style")||((t=L("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}}",S(mi.head,t)),Ie(this,e,bi,wi,k,{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:ki}=ve;function Ii(e){e[0]=e[23].list,e[22]=e[23].items}function _i(e,t,n){const i=e.slice();return i[24]=t[n],i}function Si(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ci(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ni(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[19](t)}Ii(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Li]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ji(Ci(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[22],r=0;r<i.length;r+=1){const s=Ci(e,i,r);o[r]?o[r].p(s,t):(o[r]=ji(s),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}(e),x=e[0]?.length&&function(e){let t,n=e[0],i=[];for(let t=0;t<n.length;t+=1)i[t]=Fi(_i(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11778&o[0]){let r;for(n=e[0],r=0;r<n.length;r+=1){const s=_i(e,n,r);i[r]?i[r].p(s,o):(i[r]=Fi(s),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ii(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[22]?.length&&b.p(e,t),e[0]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Li(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ji(e){let t,n,i=e[27]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function qi(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=Di(Si(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),M(t,"class","pointer svelte-14hcfjl")},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[22],s=0;s<i.length;s+=1){const l=Si(e,i,s);o[s]?o[s].p(l,r):(o[s]=Di(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}function Di(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function Fi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&qi(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[24],e[22],e[1])),n?i?i.p(e,o):(i=qi(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function Ti(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function zi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ti,then:Ni,catch:Ei,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function Ai(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2&n[0]|2&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mi(e,t,i){const o=Q(),{Dialog:r,Divider:s,Loading:l,TextField:a,Button:d}=c;let{item:u}=t,{className:m}=t,{classId:p}=t,{list:$}=t,g="",v=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},w=n.getSchemaByClass(m);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&i(15,u=e.item),"className"in e&&i(16,m=e.className),"classId"in e&&i(17,p=e.classId),"list"in e&&i(0,$=e.list)},[$,g,o,r,s,l,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await w,t=e.display;let n=Dt(t,e,$);return{list:$,items:n}},({detail:{value:e}})=>{i(1,g=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(y(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,g="")},u,m,p,()=>o("back"),function(e){g=e,i(1,g)}]}class Bi extends _e{constructor(e){var t;super(),ki.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(ki.head,t)),Ie(this,e,Mi,Ai,k,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Oi}=ve;function Pi(e,t,n){const i=e.slice();return i[11]=t[n],i}function Vi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Wi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ri(e){let t,n,i,o=e[7].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yi(Vi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));let l=e[7].list&&Ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D(),l&&l.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),l&&l.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161959&i[0]){let n;for(o=e[7].items,n=0;n<o.length;n+=1){const s=Vi(e,o,n);r[n]?(r[n].p(s,i),pe(r[n],1)):(r[n]=Yi(s),r[n].c(),pe(r[n],1),r[n].m(t.parentNode,t))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}e[7].list?l?(l.p(e,i),128&i[0]&&pe(l,1)):(l=Ji(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe())},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);pe(l),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);he(l),i=!1},d(e){N(r,e),e&&E(t),l&&l.d(e),e&&E(n)}}}function Ui(e){let t,n,i,o;const r=[Gi,Hi],s=[];function l(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function Hi(e){let t,n;return t=new fl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};256&n[0]&&(i.classId=e[8]),128&n[0]&&(i.item=e[3]),64&n[0]&&(i.record=e[6]),129&n[0]&&(i.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(i.eventId=e[5]),4&n[0]&&(i.currency=e[2]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gi(e){let t,n,i,o;n=new fl({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 r=e[1]&&Qi(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),P(t,"padding-top",".25em"),P(t,"background-color","lightyellow"),P(t,"position","relative")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};256&i[0]&&(o.classId=e[8]),128&i[0]&&(o.item=e[3]),64&i[0]&&(o.record=e[6]),3&i[0]&&(o.disabled=e[0]||!!e[1]),32&i[0]&&(o.eventId=e[5]),4&i[0]&&(o.currency=e[2]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&pe(r,1)):(r=Qi(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Qi(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-16mo2c")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[22]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Yi(e){let t,n,i="list"!==e[3].type&&Ui(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[3].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ui(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Ji(e){let t,n,i=e[7].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Zi(Pi(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(485&n[0]){let s;for(i=e[7].list,s=0;s<i.length;s+=1){const r=Pi(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Zi(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Ki(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};128&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.list=e[11]),32&n[0]&&(r.eventId=e[5]),128&n[0]&&(r.schema=e[11].item),64&n[0]&&(r.record=e[6]),1&n[0]&&(r.disabled=e[0]),4&n[0]&&(r.currency=e[2]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Zi(e){let t,n,i="array"!==e[11].type&&Ki(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"array"!==e[11].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ki(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Xi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function eo(e){let t,n;return t=new Bi({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n[0]&&(i.item=e[3]),16&n[0]&&(i.className=e[4]),256&n[0]&&(i.classId=e[8]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function to(e){let t,n,i=e[10]&&eo(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[10]?i?(i.p(e,n),1024&n[0]&&pe(i,1)):(i=eo(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function no(e){let t,n,i,o,r,s,l={ctx:e,current:null,token:null,hasCatch:!1,pending:Xi,then:Ri,catch:Wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),l),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[to]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>we(o,"open",a))),{c(){l.block.c(),t=D(),be(n.$$.fragment),i=D(),be(o.$$.fragment)},m(e,r){l.block.m(e,l.anchor=r),l.mount=()=>t.parentNode,l.anchor=t,C(e,t,r),xe(n,e,r),C(e,i,r),xe(o,e,r),s=!0},p(t,n){ge(l,e=t,n);const i={};3352&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],re((()=>r=!1))),o.$set(i)},i(e){s||(pe(l.block),pe(n.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(n.$$.fragment,e),he(o.$$.fragment,e),s=!1},d(e){l.block.d(e),l.token=null,l=null,e&&E(t),ke(n,e),e&&E(i),ke(o,e)}}}function io(e,t,i){const{Divider:o,FormField:r,Modal:s}=c,l=Q();let a,d,u,m,f,{required:p}=t,{disabled:h}=t,{readonly:$}=t,{id:g}=t,{item:v}=t,{value:y}=t,{refValue:w}=t,{currency:b}=t,x={},k=[],I=[],_={},S=new Map,C=!1,E="";const N=v.checkOn,L=y,j=e=>{a.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");k.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))},q=()=>{a.items.filter((e=>e.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.lookup})})),a.items.filter((e=>e.properties?.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},D=async e=>{const t=k.filter((t=>t.refObj===e));if(t?.length){i(9,_={});for(const e of t){const{itemName:t,refObj:n,refName:o,op:r}=e;let{action:s}=e;if(!n)break;let l,a,c=!o&&x[n];const u=x[n];u&&o&&(c=(await Oa(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{l=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(l),a||(l=`#${d} .form-field.${t} .field input`,a=document.querySelector(l)),a&&c&&a.setAttribute(s,""),a&&!c&&a.removeAttribute(s)}),0)),"hidden"===s&&(l=`#${d} .form-field.${t}`,a=document.querySelector(l),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{F()}));const F=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 k)e.add(t.refObj||u);Array.from(e).forEach((e=>D(e)))})(),T())},T=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{x[e]||i(6,x[e]=t._id,x)}))}),250)},z=async e=>{if(!e.value)return void M();const t={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await n.getSectionView(u,t);o?.length?(i(11,E=o),i(10,C=!0)):(i(1,y=""),i(23,w=""),l("setRefValue",w))},A=()=>{i(10,C=!1)},M=()=>{i(1,y=""),i(23,w=y),i(6,x={}),l("setRefValue",w)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,h=e.disabled),"readonly"in e&&i(25,$=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(3,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,w=e.refValue),"currency"in e&&i(2,b=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,h=h||$),134217840&e.$$.dirty[0]&&x&&l("safeReference",{record:x,class:u,event:m,taskId:f})},[h,y,b,v,u,m,x,a,d,_,C,E,o,s,N,L,async()=>{try{if(y){const e=await n.getTask(v.refClass,y);delete e._task,i(6,x=e),i(27,f=(await n.getTaskByDocId(e._id))._id)}else i(6,x={})}catch{}return i(7,a=await n.getSchemaByClass(v.refClass)),i(8,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(4,u=a.class),a.identity.designation,i(5,m=a.id),["readonly","hidden","required"].map(j),q(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(6,x[t]=n,x),t===N)return z(e);D(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:t,lookup:o,view:r}=e,[s]=o.split(":"),l=(await n.getSectionView(s,{[r]:{$in:t}})).map((e=>e._id));for(const e of a.input.slice(1)){i(6,x[e]=[],x);const t=await n.getSchemaByClass(e);t.id;let o=await n.getTasks(t.id);if(o=o.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[s]))),o?.length){const t=o.map((e=>e._id)),r=await n.getSectionView(e,{_id:{$in:t}});for(const t of r)t[e]=t._id;i(6,x[e]=r,x)}}},async({detail:{className:e,itemName:t,value:i}})=>{if(S.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&S.set(e,r[0])},async({detail:e})=>{const t=await n.getSectionView(u,{_id:e.row._id});t?.length&&(i(1,y=t[0]._id),i(23,w=y),l("setRefValue",w),i(6,x=t[0])),A()},A,M,w,p,$,g,f,function(e){C=e,i(10,C)}]}class oo extends _e{constructor(e){var t;super(),Oi.getElementById("svelte-16mo2c-style")||((t=L("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",S(Oi.head,t)),Ie(this,e,io,no,k,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ro(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=L("span"),n=q(e[4]),M(t,"class","item")},m(e,i){C(e,t,i),S(t,n)},p(e,t){16&t[0]&&B(n,e[4])},d(e){e&&E(t)}}}(e);return{c(){n&&n.c(),t=F()},m(e,i){n&&n.m(e,i),C(e,t,i)},p(e,t){e[11]&&n.p(e,t)},d(e){n&&n.d(e),e&&E(t)}}}function so(e){let t,n,i;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:[ro]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=L("div"),be(n.$$.fragment),P(t,"position","relative"),P(t,"max-width","10em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};6&t[0]&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(i.id=e[0]),1&t[0]&&(i.name=e[0]),256&t[0]&&(i.value=e[8]),64&t[0]&&(i.pattern=e[6]),128&t[0]&&(i.readonly=e[7]),8&t[0]&&(i.disabled=e[3]),32&t[0]&&(i.required=e[5]),16&t[0]|2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function lo(e,n,i){let o;const r=Q(),{TextField:s}=c;let{id:l}=n,{item:a}=n,{value:d}=n,{noForm:u=!1}=n,{classId:m}=n,{disabled:f}=n,{formnovalidate:p}=n,{currency:h}=n,{praefix:$}=n,{notifyList:g}=n;const v=JSON.parse(t.getItem("Locale")),y=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),w=Number("1.1").toLocaleString(v.id).substring(1,2),{properties:b={}}=a;let{min:x,max:k,step:I,pattern:_,decimals:S=0,unit:C="",placeholder:E,hint:N,readonly:L,negative:j,required:q=!1}=b;L=!0===L||void 0;_||(_=S?`[0-9]+([${w}][0-9]{1,${S}})?`:"[0-9]*"),j&&(_="-?"+_);return e.$$set=e=>{"id"in e&&i(0,l=e.id),"item"in e&&i(16,a=e.item),"value"in e&&i(17,d=e.value),"noForm"in e&&i(1,u=e.noForm),"classId"in e&&i(2,m=e.classId),"disabled"in e&&i(3,f=e.disabled),"formnovalidate"in e&&i(18,p=e.formnovalidate),"currency"in e&&i(4,h=e.currency),"praefix"in e&&i(19,$=e.praefix),"notifyList"in e&&i(20,g=e.notifyList)},e.$$.update=()=>{262176&e.$$.dirty[0]&&i(5,q=q&&!p),131072&e.$$.dirty[0]&&i(8,o=Number(d.toString().replace(w,".")).toFixed(S).toString().replace(".",w)),1048576&e.$$.dirty[0]&&(async()=>{if(void 0===$)return;const e=a.properties?.value?.formula;"$multiply"===e?.operator&&r("formula",{item:a})})()},[l,u,m,f,h,q,_,L,o,s,v,y,I,E,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{L||Number(d.toString().replace(w,"."))||i(8,o="")},a,d,p,$,g]}class ao extends _e{constructor(e){super(),Ie(this,e,lo,so,k,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4,praefix:19,notifyList:20},[-1,-1])}}const{document:co}=ve;function uo(e){e[33]=e[35].list,e[34]=e[35].items}function mo(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function fo(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function po(e,t,n){const i=e.slice();return i[39]=t[n],i}function ho(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function $o(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v,y;uo(e),n=new e[8]({props:{outline:!0,$$slots:{default:[go]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let w=!e[1]&&vo(e);function b(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),l=new e[6]({props:x}),K.push((()=>we(l,"value",b))),l.$on("input",e[14]),u=new We({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&wo(e),s=e[34],l=[];for(let t=0;t<s.length;t+=1)l[t]=bo(po(e,s,t));return{c(){t=L("thead"),n=L("tr"),r&&r.c(),i=D();for(let e=0;e<l.length;e+=1)l[e].c();M(n,"class","svelte-1m010ne"),M(t,"class","svelte-1m010ne")},m(e,s){C(e,t,s),S(t,n),r&&r.m(n,null),S(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(me(),he(r,1,1,(()=>{r=null})),fe()):r?(r.p(e,t),2&t[0]&&pe(r,1)):(r=wo(e),r.c(),pe(r,1),r.m(n,i)),8192&t[0]){let i;for(s=e[34],i=0;i<s.length;i+=1){const o=po(e,s,i);l[i]?l[i].p(o,t):(l[i]=bo(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=s.length}},i(e){o||(pe(r),o=!0)},o(e){he(r),o=!1},d(e){e&&E(t),r&&r.d(),N(l,e)}}}(e),I=e[33]?.length&&function(e){let t,n,i=e[33],o=[];for(let t=0;t<i.length;t+=1)o[t]=So(mo(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(569359&n[0]){let s;for(i=e[33],s=0;s<i.length;s+=1){const r=mo(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=So(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),w&&w.c(),o=D(),r=L("div"),s=q("Suchen: "),be(l.$$.fragment),c=D(),d=L("span"),be(u.$$.fragment),m=D(),f=L("div"),p=L("table"),k&&k.c(),h=D(),$=L("tbody"),I&&I.c(),M(t,"class","form--buttons svelte-1m010ne"),M(d,"class","feather pointer svelte-1m010ne"),P(r,"margin-bottom","1em"),P(r,"position","relative"),M(p,"striped",""),M(p,"class","svelte-1m010ne"),M(f,"class","eList svelte-1m010ne")},m(a,b){C(a,t,b),xe(n,t,null),S(t,i),w&&w.m(t,null),C(a,o,b),C(a,r,b),S(r,s),xe(l,r,null),S(r,c),S(r,d),xe(u,d,null),C(a,m,b),C(a,f,b),S(f,p),k&&k.m(p,null),S(p,h),S(p,$),I&&I.m($,null),g=!0,v||(y=T(d,"click",e[16]),v=!0)},p(e,i){uo(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?w&&(me(),he(w,1,1,(()=>{w=null})),fe()):w?(w.p(e,i),2&i[0]&&pe(w,1)):(w=vo(e),w.c(),pe(w,1),w.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],re((()=>a=!1))),l.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(pe(n.$$.fragment,e),pe(w),pe(l.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!0)},o(e){he(n.$$.fragment,e),he(w),he(l.$$.fragment,e),he(u.$$.fragment,e),he(k),he(I),g=!1},d(e){e&&E(t),ke(n),w&&w.d(),e&&E(o),e&&E(r),ke(l),ke(u),e&&E(m),e&&E(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function go(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function vo(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[yo]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function yo(e){let t;return{c(){t=q("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wo(e){let t,n,i,o,r;return n=new Fe({props:{size:"20"}}),{c(){t=L("th"),be(n.$$.fragment),M(t,"class","svelte-1m010ne")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bo(e){let t,n,i=e[39]+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function xo(e){let t,n,i,o,r,s,l,a=e[0],c=Io(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=_o(fo(e,d,t));return{c(){t=L("tr"),c.c(),n=D();for(let e=0;e<u.length;e+=1)u[e].c();i=D(),M(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),M(t,"title","übernimmt den Wert direkt"),M(t,"class","svelte-1m010ne"),V(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),S(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);S(t,i),r=!0,s||(l=T(t,"click",e[19](e[36])),s=!0)},p(s,l){if(e=s,1&l[0]&&k(a,a=e[0])?(me(),he(c,1,1,v),fe(),c=Io(e),c.c(),pe(c),c.m(t,n)):c.p(e,l),8200&l[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=fo(e,d,n);u[n]?u[n].p(o,l):(u[n]=_o(o),u[n].c(),u[n].m(t,i))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!r||2&l[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&M(t,"style",o),8193&l[0]&&V(t,"active",e[0].includes(e[36]))},i(e){r||(pe(c),r=!0)},o(e){he(c),r=!1},d(e){e&&E(t),c.d(e),N(u,e),s=!1,l()}}}function ko(e){let t,n,i;return n=new e[10]({props:{name:e[12],data:e[38],checked:e[0].includes(e[36]),round:!0}}),{c(){t=L("td"),be(n.$$.fragment),M(t,"title","Wählt den Wert aus"),M(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};1&t[0]&&(i.checked=e[0].includes(e[36])),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Io(e){let t,n,i=!e[1]&&ko(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[1]?i&&(me(),he(i,1,1,(()=>{i=null})),fe()):i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=ko(e),i.c(),pe(i,1),i.m(t.parentNode,t))},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function _o(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=L("td"),n=q(i),M(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&B(n,i)},d(e){e&&E(t)}}}function So(e){let t,n,i=e[15](e[36],e[2]),o=i&&xo(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){4&n[0]&&(i=e[15](e[36],e[2])),i?o?(o.p(e,n),4&n[0]&&pe(o,1)):(o=xo(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function Co(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Eo(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Co,then:$o,catch:ho,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function No(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Eo]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};15&n[0]|8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lo(e,t,i){const o=Q(),{Loading:r,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=t,{id:f}=t,{selection:p}=t,{refDoc:h}=t,{tableName:$}=t,{idName:g}=t,{target:v}=t,{view:y}=t,{unique:w}=t,{uniqueView:b}=t,{status:x}=t,{single:k}=t;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const C=$+g+v+"checkbox",E=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&i(21,m=e.classId),"id"in e&&i(22,f=e.id),"selection"in e&&i(0,p=e.selection),"refDoc"in e&&i(23,h=e.refDoc),"tableName"in e&&i(24,$=e.tableName),"idName"in e&&i(25,g=e.idName),"target"in e&&i(20,v=e.target),"view"in e&&i(26,y=e.view),"unique"in e&&i(27,w=e.unique),"uniqueView"in e&&i(28,b=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,S,o,r,s,l,a,d,u,_,C,async()=>{let e=[],t=[],o={};if(i(3,S=[]),g)if(y){if(f){const t=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[t]:r}]),e=await n.getSectionView($,o),e=e.sort(((e,n)=>{const i=e=>(e[t]||"z").toString()+e[v];return E(i(e),i(n))}))}}else b?f&&(o={[g]:f,status:!0},Object.entries(b).map((([e,n])=>{n?.length&&(o[e]={$in:n}),t.push(e)})),e=await n.getSectionView($,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})),i(3,S=e.map((e=>{const n=[e[v]];return t.map((t=>n.push(e[t]))),n})))):w?(e=await n.getSection($,g,f,w),e=e.sort(((e,t)=>E(e,t)))):(e=await n.getSection($,g,f,!1,x),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})));else o={},f&&!Array.isArray(f)&&(o._id=f),e=await n.getSectionView($,o);const r=await n.getSchemaByClass($),s=[];if(h){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,s=e.find((e=>e[t]===h));e=s?s[o]:[],i(20,v=n)}e.map((e=>{let t=e[v];if(t||$!==v||(i(20,v=r.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else s.push(t||[])}));const l=r.items.find((e=>e.name===v))?.designation;return t=t.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:s.flat(),items:[l,...t]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(C),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(C).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?o("choose",{list:[].concat(e)}):(i(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),o("choose",{list:p})))},v,m,f,h,$,g,y,w,b,x,()=>o("back"),function(e){I=e,i(2,I)}]}class jo extends _e{constructor(e){var t;super(),co.getElementById("svelte-1m010ne-style")||((t=L("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}",S(co.head,t)),Ie(this,e,Lo,No,k,{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:qo}=ve;function Do(e){let t,n,i,o,r,s=e[7].length+"";return{c(){t=L("span"),n=q("("),i=q(s),o=q(")"),M(t,"class",r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&B(i,s),2&n[0]&&r!==(r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&M(t,"class",r)},d(e){e&&E(t)}}}function Fo(e){let t;return{c(){t=L("div"),M(t,"class","load-more-options"),M(t,"slot","load-more-options-message")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function To(e){let t,n,i,o;const r=[Mo,Ao,zo],s=[];function l(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=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function zo(e){let t,n,i,o,r;return n=new je({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title","Übernehmen"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[26]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Ao(e){let t,n,i,o,r;return n=new Ae({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title",e[17].title||"Generieren"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[25]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Mo(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title","Löschen"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[27]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Bo(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Oo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};53&i[0]|32768&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&1024&i[0]&&(n=!0,o.open=e[10],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Oo(e){let t,n;return t=new jo({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),1&n[0]&&(i.selection=e[0]),16&n[0]&&(i.unique=e[16].unique&&e[4].name),32&n[0]&&(i.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(i.id=e[5][e[21]||e[20]]),16&n[0]&&(i.target=e[4].name),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Po(e){let t,n,i,o,r,s,l,a,c,d=!e[16].single&&e[7]?.length&&Do(e);function u(t){e[35](t)}function m(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:Vo,minSearchLength:"3",$$slots:{"load-more-options-message":[Fo]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),i=new e[12]({props:f}),K.push((()=>we(i,"selection",u))),K.push((()=>we(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&To(e),h=e[10]&&Bo(e);return{c(){t=L("div"),d&&d.c(),n=D(),be(i.$$.fragment),s=D(),p&&p.c(),l=D(),h&&h.c(),a=F(),P(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),S(t,n),xe(i,t,null),S(t,s),p&&p.m(t,null),C(e,l,o),h&&h.m(e,o),C(e,a,o),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Do(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),32768&s[1]&&(l.$$scope={dirty:s,ctx:e}),!o&&128&s[0]&&(o=!0,l.selection=e[7],re((()=>o=!1))),!r&&512&s[0]&&(r=!0,l.maxOptions=e[9],re((()=>r=!1))),i.$set(l),e[1]?p&&(me(),he(p,1,1,(()=>{p=null})),fe()):p?(p.p(e,s),2&s[0]&&pe(p,1)):(p=To(e),p.c(),pe(p,1),p.m(t,null)),e[10]?h?(h.p(e,s),1024&s[0]&&pe(h,1)):(h=Bo(e),h.c(),pe(h,1),h.m(a.parentNode,a)):h&&(me(),he(h,1,1,(()=>{h=null})),fe())},i(e){c||(pe(i.$$.fragment,e),pe(p),pe(h),c=!0)},o(e){he(i.$$.fragment,e),he(p),he(h),c=!1},d(e){e&&E(t),d&&d.d(),ke(i),p&&p.d(),e&&E(l),h&&h.d(e),e&&E(a)}}}async function*Vo(e){yield[{name:e}]}function Wo(e,t,i){const o=Q(),{Modal:r,Autocomplete:s}=c;let{classId:l}=t,{id:a}=t,{item:d}=t,{record:u}=t,{value:m}=t,{noForm:f=!1}=t,{disabled:p}=t,{formnovalidate:h}=t,{numberInput:$}=t,{praefix:g}=t,{toDelete:v}=t,{reqQuantity:y}=t,{notifyList:w}=t;const{properties:b={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:S="",view:C=!1,multi:E,max:N=1e3,generate:L=!1,status:j=!0,refDoc:q}=b;const[D,F]=S.split(":");let T=!1,z=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");const A=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,z=t.map((e=>({name:e.trim()})))),o("blur",{value:z.map((e=>e.name))}),o("multi",{view:E.view,lookup:S,value:z.map((e=>e.name))})};H((async()=>{const e=document.getElementById(a);e.classList.add(l),!I&&S&&e.addEventListener("focus",M)}));const M=()=>{if(S){document.getElementById(a).blur();const e=y||N;(E.unique||z.length<e)&&i(10,T=!0)}},B=()=>{i(10,T&&=!1)},O=({detail:e})=>{i(7,z=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:E.view,lookup:S,name:d.name,value:e.list}),B()},P=async()=>{const e={[F]:u[F]},t=await n.getSectionView(D,e),i=Array.from({length:t.length},((e,n)=>t[n][d.name]));O({detail:{list:i}})},V=(e=!1)=>{if(p||!E.required)return;const t=E.maxItem;if(!t||E.unique)return;i(9,N=!1!==e?e:y||u[t]||0);const n=z?.length!=N,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"item"in e&&i(4,d=e.item),"record"in e&&i(5,u=e.record),"value"in e&&i(0,m=e.value),"noForm"in e&&i(28,f=e.noForm),"disabled"in e&&i(1,p=e.disabled),"formnovalidate"in e&&i(29,h=e.formnovalidate),"numberInput"in e&&i(30,$=e.numberInput),"praefix"in e&&i(31,g=e.praefix),"toDelete"in e&&i(32,v=e.toDelete),"reqQuantity"in e&&i(33,y=e.reqQuantity),"notifyList"in e&&i(34,w=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,z=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,z=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,z=[]),128&e.$$.dirty[0]&&z&&(i(0,m=z.map&&z.map((e=>e.name))||[]),V()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===E.maxItem&&V(n)})($),536870976&e.$$.dirty[0]&&i(6,_=_&&!h),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:t,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==t)return;let[s,l]=d.refItem.split(".");if(Array.isArray(r)){if(s=s.slice(0,-1),!r.length)return o("record",{itemName:"quantity",value:0}),void i(7,z=[]);const e={_id:{$in:r}},t=await n.getSectionView(s,e);let a=[];for(const e of t)e[l]&&(a=a.concat(e[l][0][d.name]));if(!a.length)return;o("record",{itemName:"quantity",value:a.length}),i(7,z=a.map((e=>({name:e})))),A({detail:{value:z}})}else{const e=await n.getTask(s,r);if(!e||!e[l])return;const t=e[l];if(!Array.isArray(t)&&!t.length)return;const a=t[g][d.name];o("record",{itemName:"quantity",value:a?.length||0}),i(7,z=a&&a.map((e=>({name:e}))))}setTimeout(V,250)})(w)},[m,p,l,a,d,u,_,z,x,N,T,r,s,I,S,C,E,L,j,q,D,F,A,B,O,()=>{const e=u[L.itemQuantity]||y;if(!e)return;const t=L.prefix||"",n=u[L.variable]||"",i=L.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));O({detail:{list:o}})},async()=>{if(!0===C)return P();const e=y||u[E.maxItem];if(!e)return;let t={};F&&(t={[F]:u[F]}),j&&(t.status=!0);const i=[].concat(u[E.view]||[]);i.length&&(t[E.view]={$in:i});const o=await n.getSectionView(D,t),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));O({detail:{list:r}})},()=>{O({detail:{list:[]}})},f,h,$,g,v,y,w,function(e){z=e,i(7,z),i(5,u),i(4,d),i(32,v)},function(e){N=e,i(9,N)},function(e){T=e,i(10,T)}]}class Ro extends _e{constructor(e){var t;super(),qo.getElementById("svelte-1rbaejz-style")||((t=L("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}",S(qo.head,t)),Ie(this,e,Wo,Po,k,{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:Uo}=ve;function Ho(e){e[26]=e[28].list,e[27]=e[28].items}function Go(e,t,n){const i=e.slice();return i[29]=t[n],i}function Qo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Yo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Jo(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ko(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[23](t)}Ho(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Xo(Yo(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[27],r=0;r<i.length;r+=1){const s=Yo(e,i,r);o[r]?o[r].p(s,t):(o[r]=Xo(s),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],i=[];for(let t=0;t<n.length;t+=1)i[t]=nr(Go(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11779&o[0]){let r;for(n=e[26],r=0;r<n.length;r+=1){const s=Go(e,n,r);i[r]?i[r].p(s,o):(i[r]=nr(s),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ho(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[27]?.length&&b.p(e,t),e[26]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Zo(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Xo(e){let t,n,i=e[32]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function er(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tr(Qo(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),M(t,"class","pointer svelte-14hcfjl"),V(t,"active",e[29]._id===e[0])},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const l=Qo(e,i,s);o[s]?o[s].p(l,r):(o[s]=tr(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}2049&r[0]&&V(t,"active",e[29]._id===e[0])},d(e){e&&E(t),N(o,e)}}}function tr(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function nr(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&er(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[29],e[27],e[1])),n?i?i.p(e,o):(i=er(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function ir(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function or(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ir,then:Ko,catch:Jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function rr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|64&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sr(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{className:p}=t,{classId:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass(p);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Pa(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(15,m=e.item),"className"in e&&o(16,p=e.className),"classId"in e&&o(17,$=e.classId),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(18,v=e.viewName),"viewValue"in e&&o(19,y=e.viewValue),"recordId"in e&&o(20,w=e.recordId),"filter"in e&&o(21,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,t="."+$+"#"+v;document.querySelector(t);let i={[v]:y},o=[];i[v]&&(o=await n.getSectionView(e.class,i,!0)),b&&(o=o.filter((e=>e._id!=b)));const r=e.display;return{list:o,items:Dt(r,e,o)}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},m,p,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class lr extends _e{constructor(e){var t;super(),Uo.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Uo.head,t)),Ie(this,e,sr,rr,k,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ar(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function cr(e){let t,n,i,o,r;function s(t){e[21](t)}let l={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]&&(l.value=e[0]),n=new e[10]({props:l}),K.push((()=>we(n,"value",s)));let a=!e[6]&&dr(e);return{c(){t=L("div"),be(n.$$.fragment),o=D(),a&&a.c(),P(t,"position","relative")},m(e,i){C(e,t,i),xe(n,t,null),S(t,o),a&&a.m(t,null),r=!0},p(e,o){const r={};4&o&&(r.id=e[2]),8&o&&(r.name=e[3].name),34&o&&(r.inputClass=e[5]||e[1]),64&o&&(r.disabled=e[6]),128&o&&(r.formnovalidate=e[7]),!i&&1&o&&(i=!0,r.value=e[0],re((()=>i=!1))),n.$set(r),e[6]?a&&(me(),he(a,1,1,(()=>{a=null})),fe()):a?(a.p(e,o),64&o&&pe(a,1)):(a=dr(e),a.c(),pe(a,1),a.m(t,null))},i(e){r||(pe(n.$$.fragment,e),pe(a),r=!0)},o(e){he(n.$$.fragment,e),he(a),r=!1},d(e){e&&E(t),ke(n),a&&a.d()}}}function dr(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-wbrqzu")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[17]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ur(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function mr(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[fr]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};268435994&i&&(o.$$scope={dirty:i,ctx:e}),!n&&256&i&&(n=!0,o.open=e[8],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function fr(e){let t,n;return t=new lr({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n&&(i.item=e[3]),8&n&&(i.className=e[3].refClass),2&n&&(i.classId=e[1]),16&n&&(i.recordId=e[4]._id),512&n&&(i.viewValue=e[9]),16&n&&(i.filter=e[4]._id),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function pr(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ur,then:cr,catch:ar,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&mr(e);return{c(){o.block.c(),t=D(),r&&r.c(),n=F()},m(e,s){o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,s),r&&r.m(e,s),C(e,n,s),i=!0},p(t,[i]){ge(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&pe(r,1)):(r=mr(e),r.c(),pe(r,1),r.m(n.parentNode,n)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){i||(pe(o.block),pe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}he(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&E(t),r&&r.d(e),e&&E(n)}}}function hr(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:s}=t,{item:l}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:h={}}=l;let $,{pattern:g,placeholder:v,readonly:y,required:w=!1,view:b}=h,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,r=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,l=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,r,s,l,a,u,m,f,x,$,i,o,g,y,w,b,async()=>(n(9,$=a[b.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[b.value?b.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class $r extends _e{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=L("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",S(document.head,t)),Ie(this,e,hr,pr,k,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function gr(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function vr(e){let t;return{c(){t=L("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function yr(e){let t;return{c(){t=L("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wr(e){let t,n,i,o,r=e[12]+"";return{c(){t=L("option"),n=q(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),S(t,n)},p(e,s){64&s&&r!==(r=e[12]+"")&&B(n,r),64&s&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&s&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&E(t)}}}function br(e){let t,n,i,o,r,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?yr:vr}let i=n(e),o=i(e);return{c(){o.c(),t=F()},m(e,n){o.m(e,n),C(e,t,n)},p(e,r){i!==(i=n(e))&&(o.d(1),o=i(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){o.d(e),e&&E(t)}}}(e),l=e[6],a=[];for(let t=0;t<l.length;t+=1)a[t]=wr(gr(e,l,t));return{c(){t=L("select"),s&&s.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();M(t,"class",i=_(e[3]||e[4])+" svelte-5xpzvo"),M(t,"id",e[2]),M(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,l){C(i,t,l),s&&s.m(t,null),S(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=T(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let i;for(l=e[6],i=0;i<l.length;i+=1){const o=gr(e,l,i);a[i]?a[i].p(o,n):(a[i]=wr(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=l.length}24&n&&i!==(i=_(e[3]||e[4])+" svelte-5xpzvo")&&M(t,"class",i),4&n&&M(t,"id",e[2]),4&n&&M(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:v,o:v,d(e){e&&E(t),s&&s.d(),N(a,e),o=!1,r()}}}function xr(e,t,n){const i=Q();let{id:o}=t,{item:r}=t,{value:s}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:m,readonly:f}=r.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===m&&(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,o=e.id),"item"in e&&n(10,r=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,l=e.noForm),"classId"in e&&n(4,a=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,o,l,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class kr extends _e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=L("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}",S(document.head,t)),Ie(this,e,xr,br,k,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Ir(e){let t;return{c(){t=q("Stunden")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _r(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sr(e){let t;return{c(){t=q("Minuten")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Cr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Sr]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Er(e){let t;return{c(){t=q("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Nr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Er]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lr(e){let t,n,i,o,r,s,l,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nr],"minutes-label":[Cr],"hours-label":[_r]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=L("input"),i=D(),be(o.$$.fragment),r=D(),be(s.$$.fragment),M(t,"type","string"),M(t,"class",n=e[2]||e[3]),M(t,"id",e[1]),M(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),O(t,e[0]),C(n,i,d),xe(o,n,d),C(n,r,d),xe(s,n,d),l=!0,a||(c=T(t,"input",e[9]),a=!0)},p(e,[i]){(!l||12&i&&n!==(n=e[2]||e[3]))&&M(t,"class",n),(!l||2&i)&&M(t,"id",e[1]),(!l||2&i)&&M(t,"name",e[1]),1&i&&O(t,e[0]);const r={};1&i&&(r.value=e[0]),o.$set(r);const a={};1&i&&(a.value=e[0]),4096&i&&(a.$$scope={dirty:i,ctx:e}),s.$set(a)},i(e){l||(pe(o.$$.fragment,e),pe(s.$$.fragment,e),l=!0)},o(e){he(o.$$.fragment,e),he(s.$$.fragment,e),l=!1},d(e){e&&E(t),e&&E(i),ke(o,e),e&&E(r),ke(s,e),a=!1,c()}}}function jr(e,t,n){const i=Q(),{Label:o,DatePicker:r,TimePicker:s}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>i("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,o,r,s,({detail:e})=>{var t,i;n(0,(t=e.value,i=l,l=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(l)},({detail:e})=>{n(0,l=Jn(e.value,l)),m(l)},function(){l=this.value,n(0,l)}]}class qr extends _e{constructor(e){super(),Ie(this,e,jr,Lr,k,{value:0,id:1,noForm:2,classId:3})}}function Dr(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$;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=L("input"),r=D(),s=L("input"),d=D(),be(u.$$.fragment),m=q(" /\n"),be(f.$$.fragment),M(t,"type","string"),M(t,"class",n=e[1]||e[2]),M(t,"id",i=e[0]+"_from"),M(t,"name",o=e[0]+"_from"),t.hidden=!0,M(s,"type","string"),M(s,"class",l=e[1]||e[2]),M(s,"id",a=e[0]+"_to"),M(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,i){C(n,t,i),O(t,e[7]),C(n,r,i),C(n,s,i),O(s,e[8]),C(n,d,i),xe(u,n,i),C(n,m,i),xe(f,n,i),p=!0,h||($=[T(t,"input",e[13]),T(s,"input",e[14])],h=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&M(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&M(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&M(t,"name",o),128&r&&O(t,e[7]),(!p||6&r&&l!==(l=e[1]||e[2]))&&M(s,"class",l),(!p||1&r&&a!==(a=e[0]+"_to"))&&M(s,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&M(s,"name",c),256&r&&O(s,e[8]);const d={};32&r&&(d.format=e[5]),8&r&&(d.required=e[3]),16&r&&(d.disabled=e[4]),128&r&&(d.value=e[7]),u.$set(d);const m={};64&r&&(m.format=e[6]),8&r&&(m.required=e[3]),16&r&&(m.disabled=e[4]),256&r&&(m.value=e[8]),f.$set(m)},i(e){p||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!0)},o(e){he(u.$$.fragment,e),he(f.$$.fragment,e),p=!1},d(e){e&&E(t),e&&E(r),e&&E(s),e&&E(d),ke(u,e),e&&E(m),ke(f,e),h=!1,b($)}}}function Fr(e,t,n){const i=Q(),{DatePicker:o}=c;let{value:r}=t,{id:s}=t,{noForm:l=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,h=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===h?.toString()&&(h=void 0),u&&(void 0===p&&(m=""),void 0===h&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,a=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[s,l,a,d,u,m,f,p,h,o,({detail:e})=>{n(7,p=Jn(e.value,p)),h&&p&&h.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,h=Jn(e.value,h)),h&&p&&h.valueOf()-p.valueOf()<0&&n(8,h=void 0),i("change",{value:h,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){h=this.value,n(8,h)}]}class Tr extends _e{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=L("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",S(document.head,t)),Ie(this,e,Fr,Dr,k,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zr(e){let t,n,i;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:Ar,placeholder:Mr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=L("div"),be(n.$$.fragment),P(t,"max-width","4em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,[t]){const i={};4&t&&(i.inputClass=e[2]),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),2&t&&(i.value=e[1]),8&t&&(i.readonly=e[3]),16&t&&(i.disabled=e[4]),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}const Ar="([01][0-9]|2[0-3]):([0-5][0-9])",Mr="";function Br(e,t,n){const i=Q(),{TextField:o}=c;let{id:r}=t,{item:s}=t,{value:l}=t,{inputClass:a}=t,{readonly:d}=t,{disabled:u}=t,{praefix:m}=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,r=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,l=e.value),"inputClass"in e&&n(2,a=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,m=e.praefix)},[r,l,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},s,m]}class Or extends _e{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=L("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",S(document.head,t)),Ie(this,e,Br,zr,k,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Pr}=ve;function Vr(e,t,n){const i=e.slice();return i[0]=t[n],i}function Wr(e,t,n){const i=e.slice();return i[17]=t[n],i[19]=n,i}function Rr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ur(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=Gr(Vr(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(14&n){let s;for(i=e[14],s=0;s<i.length;s+=1){const r=Vr(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Gr(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Hr(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"",o=e[19]&&function(){let e;return{c(){e=q(", ")},m(t,n){C(t,e,n)},d(t){t&&E(e)}}}();return{c(){t=L("span"),o&&o.c(),n=q(i),M(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),S(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"")&&B(n,i)},d(e){e&&E(t),o&&o.d()}}}function Gr(e){let t,n,i,o,r,s,l,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Hr(Wr(e,c,t));return o=new He({props:{size:"18"}}),{c(){t=L("div");for(let e=0;e<d.length;e+=1)d[e].c();n=D(),i=L("span"),be(o.$$.fragment),r=D(),M(i,"class","feather pointer svelte-1u646ni"),M(t,"class","lookupItem svelte-1u646ni")},m(c,u){C(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,n),S(t,i),xe(o,i,null),S(t,r),s=!0,l||(a=T(i,"click",e[3](e[0]._id)),l=!0)},p(i,o){if(e=i,6&o){let i;for(c=e[1],i=0;i<c.length;i+=1){const r=Wr(e,c,i);d[i]?d[i].p(r,o):(d[i]=Hr(r),d[i].c(),d[i].m(t,n))}for(;i<d.length;i+=1)d[i].d(1);d.length=c.length}},i(e){s||(pe(o.$$.fragment,e),s=!0)},o(e){he(o.$$.fragment,e),s=!1},d(e){e&&E(t),N(d,e),ke(o),l=!1,a()}}}function Qr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Yr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Qr,then:Ur,catch:Rr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=L("div"),i.block.c(),M(t,"class","lookup svelte-1u646ni")},m(e,o){C(e,t,o),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,n=!0},p(t,[n]){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(),i.token=null,i=null}}}function Jr(e,t,i){let{id:o}=t,{item:r}=t,{praefix:s}=t,{record:l}=t;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),h=()=>{ie().then((()=>{const e=document.querySelector("div.form-field."+r.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&i(4,o=e.id),"item"in e&&i(0,r=e.item),"praefix"in e&&i(5,s=e.praefix),"record"in e&&i(6,l=e.record)},[r,d,async()=>{let e=[];if(l._id){const t=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:l[u]||l._id};if(e=await n.getSectionView(f,o,t),!t){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===l._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||h(),e},e=>async()=>{const t=await n.getTaskByDocId(e);if(!t)return;const i=t._id,o=`/task/${t.event}/${i}/task?view=standalone`;window.open(o)},o,s,l]}class Kr extends _e{constructor(e){var t;super(),Pr.getElementById("svelte-1u646ni-style")||((t=L("style")).id="svelte-1u646ni-style",t.textContent=".feather.svelte-1u646ni{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1u646ni{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1u646ni{position:relative;margin-left:2em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}",S(Pr.head,t)),Ie(this,e,Jr,Yr,k,{id:4,item:0,praefix:5,record:6})}}function Zr(e){let t,n,i;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Xr(e){let t,n,i,o,r;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function es(e){let t,n,i,o,r,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 l=[Xr,Zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ts(e,t,i){const{TextField:o}=c;let{inputClass:r}=t,{disabled:s}=t,{formnovalidate:l}=t,{readonly:a}=t,{required:d}=t,{id:u}=t,{name:m}=t,{value:f}=t,{record:p}=t,{item:h}=t;return e.$$set=e=>{"inputClass"in e&&i(0,r=e.inputClass),"disabled"in e&&i(1,s=e.disabled),"formnovalidate"in e&&i(2,l=e.formnovalidate),"readonly"in e&&i(3,a=e.readonly),"required"in e&&i(4,d=e.required),"id"in e&&i(5,u=e.id),"name"in e&&i(6,m=e.name),"value"in e&&i(7,f=e.value),"record"in e&&i(10,p=e.record),"item"in e&&i(11,h=e.item)},[r,s,l,a,d,u,m,f,o,async()=>{if(!f)return;const e=m.includes(".")?p[m.split(".")[0]]:p,{street:t,houseNo:i,postcode:o,location:r,country:s}=e,l=[t&&i?t+" "+i:t,o&&r?o+" "+r:o||r||"",s&&(await n.getTask("country",s)).designation].filter((e=>!!e)).join(", "),a="https://bing.com/maps/default.aspx?where1="+encodeURIComponent(l);window.open(a,"_blank")},p,h,function(t){Y(e,t)}]}class ns extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ts,es,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function is(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function os(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function rs(e){let t,n,i,o,r,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 l=[os,is],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ss(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,l=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value)},[o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Y(e,t)}]}class ls extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ss,rs,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function as(e){let t,n,i;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function cs(e){let t,n,i,o,r;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ds(e){let t,n,i,o,r,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 l=[cs,as],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};4&i&&(s.inputClass=e[2]),1&i&&(s.pattern=e[0]),2&i&&(s.placeholder=e[1]),8&i&&(s.disabled=e[3]),16&i&&(s.formnovalidate=e[4]),32&i&&(s.readonly=e[5]),64&i&&(s.required=e[6]),128&i&&(s.id=e[7]),256&i&&(s.name=e[8]),512&i&&(s.value=e[9]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function us(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=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})",p||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,o=e.inputClass),"disabled"in e&&n(3,r=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,l=e.readonly),"required"in e&&n(6,a=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,m=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,p=e.placeholder)},[f,p,o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class ms extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,us,ds,k,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function fs(e){let t,n,i;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function ps(e){let t,n,i,o,r;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function hs(e){let t,n,i,o,r,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 l=[ps,fs],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),256&i&&(s.pattern=e[8]),512&i&&(s.placeholder=e[9]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function $s(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,l=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,p=e.placeholder)},[o,r,s,l,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class gs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,$s,hs,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const vs=["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 ys(e){let t;return{c(){t=L("textarea"),M(t,"id",e[0]),P(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&M(t,"id",e[0])},d(n){n&&E(t),e[18](null)}}}function ws(e){let t;return{c(){t=L("div"),M(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&M(t,"id",e[0])},d(n){n&&E(t),e[17](null)}}}function bs(e){let t;function n(e,t){return e[1]?ws:ys}let i=n(e),o=i(e);return{c(){t=L("div"),o.c(),M(t,"class",e[2])},m(n,i){C(n,t,i),o.m(t,null),e[19](t)},p(e,[r]){i===(i=n(e))&&o?o.p(e,r):(o.d(1),o=i(e),o&&(o.c(),o.m(t,null))),4&r&&M(t,"class",e[2])},i:v,o:v,d(n){n&&E(t),o.d(),e[19](null)}}}const xs=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let ks=(()=>{let e={listeners:[],scriptId:xs("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,i)=>{e.scriptLoaded?i():(e.listeners.push(i),e.injected||((t,n,i,o)=>{e.injected=!0;const r=n.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=i,r.onload=()=>{o()},n.head&&n.head.appendChild(r)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function Is(e,t,n){var i;let o,r,s,{id:l=xs("tinymce-svelte")}=t,{inline:a}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:m}=t,{conf:f={}}=t,{modelEvents:p="change input undo redo"}=t,{value:h=""}=t,{text:$=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=h,y=c;const w=Q(),b=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},x=()=>{const e=Object.assign(Object.assign({},f),{target:r,inline:void 0!==a?a:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,s=e),e.on("init",(()=>{e.setContent(h),e.on(p,(()=>{n(15,v=e.getContent()),v!==h&&(n(5,h=v),n(6,$=e.getContent({format:"text"})))}))})),((e,t)=>{vs.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,w),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),b().init(e)};return H((()=>{if(null!==b())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;ks.load(o.ownerDocument,e,(()=>{x()}))}})),G((()=>{var e;s&&(null===(e=b())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,l=e.id),"inline"in e&&n(1,a=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,m=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,p=e.modelEvents),"value"in e&&n(5,h=e.value),"text"in e&&n(6,$=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&v!==h&&(s.setContent(h),n(6,$=s.getContent({format:"text"}))),s&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=s.mode)||void 0===i?void 0:i.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[l,a,g,o,r,h,$,c,d,u,m,f,p,i,s,v,y,function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}class _s extends _e{constructor(e){super(),Ie(this,e,Is,bs,k,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Ss(e){let t,n,i,o,r,s,l;function a(t){e[7](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new _s({props:c}),K.push((()=>we(n,"value",a))),{c(){t=L("div"),be(n.$$.fragment),o=D(),r=L("input"),M(r,"class",s=e[1]||e[2]),M(r,"id",e[3]),M(r,"name",e[3]),r.value=e[0],r.hidden=!0,P(t,"min-height","10em"),P(t,"margin-top","-1em")},m(e,i){C(e,t,i),xe(n,t,null),S(t,o),S(t,r),l=!0},p(e,[t]){const o={};16&t&&(o.disabled=e[4]),32&t&&(o.readonly=e[5]),!i&&1&t&&(i=!0,o.value=e[0],re((()=>i=!1))),n.$set(o),(!l||6&t&&s!==(s=e[1]||e[2]))&&M(r,"class",s),(!l||8&t)&&M(r,"id",e[3]),(!l||8&t)&&M(r,"name",e[3]),(!l||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){l||(pe(n.$$.fragment,e),l=!0)},o(e){he(n.$$.fragment,e),l=!1},d(e){e&&E(t),ke(n)}}}function Cs(e,n,i){let o=JSON.parse(t.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let{value:r}=n,{noForm:s}=n,{classId:l}=n,{id:a}=n,{disabled:c}=n,{readonly:d}=n;const u={plugins:"advlist numlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:o};return e.$$set=e=>{"value"in e&&i(0,r=e.value),"noForm"in e&&i(1,s=e.noForm),"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"disabled"in e&&i(4,c=e.disabled),"readonly"in e&&i(5,d=e.readonly)},[r,s,l,a,c,d,u,function(e){r=e,i(0,r)}]}class Es extends _e{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Cs,Ss,k,{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,i,o,r,s,l,a,c,d,u,m;return{setters:[function(e){t=e.Storage,n=e.Request,i=e.task_notification,o=e.currentRoles,r=e.TextArea,s=e.toasts,l=e.settings,a=e.Page},function(e){c=e.getAttractions,d=e.PopOver},function(e){u=e.user},function(e){m=e.taskClipboard}],execute:function(){e("version","0.2.663");const f=e("checkDate",((e,t)=>"string"!=typeof e||e.length<20||!(t=e.split(" · "))?e:t.map((e=>2===e.split("T").length&&3===e.split("T")[0].split("-").length?new Date(e).toLocaleDateString():e)).filter((e=>!!e)).join(" · "))),p=e=>{try{return new Date(e).toLocaleString()}catch{return e}},h=e=>e?"(ja)":"(nein)",$=(e,t)=>{const n={...t};return(e.display?.reduce(((t,i)=>{let[o,r]=i.split(".");if(e.list?.find((({name:e})=>e===o))&&r&&void 0!==n[o]){const e=`${o}_${r}`;n[e]=n[o][r],o=e}return t.find((e=>e===o))||t.push(o),t}),[]).map((e=>"boolean"==typeof n[e]?h(n[e]):f(n["_"+e]||n[e])))||e.items.map((e=>"object"===e.type?t["_"+e.name]:"list"===e.type?"":("boolean"==typeof t[e.name]&&h(t[e.name]),t[e.name])))).map((e=>e?.toString().split(" · ").filter((e=>!!e)).join(" · "))).filter((e=>!!e)).join(" • ")},g=(e,t)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)??""}catch{return""}};function v(){}function y(e){return e()}function w(){return Object.create(null)}function b(e){e.forEach(y)}function x(e){return"function"==typeof e}function k(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function I(e,t,n){e.$$.on_destroy.push(function(e,...t){if(null==e)return v;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}(t,n))}function _(e){return null==e?"":e}function S(e,t){e.appendChild(t)}function C(e,t,n){e.insertBefore(t,n||null)}function E(e){e.parentNode.removeChild(e)}function N(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function L(e){return document.createElement(e)}function j(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function q(e){return document.createTextNode(e)}function D(){return q(" ")}function F(){return q("")}function T(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function z(e){return function(t){return t.preventDefault(),e.call(this,t)}}function A(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function M(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function O(e,t){e.value=null==t?"":t}function P(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function V(e,t,n){e.classList[n?"add":"remove"](t)}let W;function R(e){W=e}function U(){if(!W)throw new Error("Function called outside component initialization");return W}function H(e){U().$$.on_mount.push(e)}function G(e){U().$$.on_destroy.push(e)}function Q(){const e=U();return(t,n)=>{const i=e.$$.callbacks[t];if(i){const o=function(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}(t,n);i.slice().forEach((t=>{t.call(e,o)}))}}}function Y(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const J=[],K=[],Z=[],X=[],ee=Promise.resolve();let te=!1;function ne(){te||(te=!0,ee.then(ae))}function ie(){return ne(),ee}function oe(e){Z.push(e)}function re(e){X.push(e)}let se=!1;const le=new Set;function ae(){if(!se){se=!0;do{for(let e=0;e<J.length;e+=1){const t=J[e];R(t),ce(t.$$)}for(R(null),J.length=0;K.length;)K.pop()();for(let e=0;e<Z.length;e+=1){const t=Z[e];le.has(t)||(le.add(t),t())}Z.length=0}while(J.length);for(;X.length;)X.pop()();te=!1,se=!1,le.clear()}}function ce(e){if(null!==e.fragment){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(oe)}}const de=new Set;let ue;function me(){ue={r:0,c:[],p:ue}}function fe(){ue.r||b(ue.c),ue=ue.p}function pe(e,t){e&&e.i&&(de.delete(e),e.i(t))}function he(e,t,n,i){if(e&&e.o){if(de.has(e))return;de.add(e),ue&&ue.c.push((()=>{de.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function $e(e,t){const n=t.token={};function i(e,i,o,r){if(t.token!==n)return;t.resolved=r;let s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=r);const l=e&&(t.current=e)(s);let a=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==i&&e&&(me(),he(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),fe())})):t.block.d(1),l.c(),pe(l,1),l.m(t.mount(),t.anchor),a=!0),t.block=l,t.blocks&&(t.blocks[i]=l),a&&ae()}if((o=e)&&"object"==typeof o&&"function"==typeof o.then){const n=U();if(e.then((e=>{R(n),i(t.then,1,t.value,e),R(null)}),(e=>{if(R(n),i(t.catch,2,t.error,e),R(null),!t.hasCatch)throw e})),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}var o}function ge(e,t,n){const i=t.slice(),{resolved:o}=e;e.current===e.then&&(i[e.value]=o),e.current===e.catch&&(i[e.error]=o),e.block.p(i,n)}const ve="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ye(e,t){he(e,1,1,(()=>{t.delete(e.key)}))}function we(e,t,n){const i=e.$$.props[t];void 0!==i&&(e.$$.bound[i]=n,n(e.$$.ctx[i]))}function be(e){e&&e.c()}function xe(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:s,after_update:l}=e.$$;o&&o.m(t,n),i||oe((()=>{const t=r.map(y).filter(x);s?s.push(...t):b(t),e.$$.on_mount=[]})),l.forEach(oe)}function ke(e,t){const n=e.$$;null!==n.fragment&&(b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ie(e,t,n,i,o,r,s=[-1]){const l=W;R(e);const a=e.$$={fragment:null,ctx:null,props:r,update:v,not_equal:o,bound:w(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l?l.$$.context:t.context||[]),callbacks:w(),dirty:s,skip_bound:!1};let c=!1;if(a.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return a.ctx&&o(a.ctx[t],a.ctx[t]=r)&&(!a.skip_bound&&a.bound[t]&&a.bound[t](r),c&&function(e,t){-1===e.$$.dirty[0]&&(J.push(e),ne(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}(e,t)),n})):[],a.update(),c=!0,b(a.before_update),a.fragment=!!i&&i(a.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);a.fragment&&a.fragment.l(e),e.forEach(E)}else a.fragment&&a.fragment.c();t.intro&&pe(e.$$.fragment),xe(e,t.target,t.anchor,t.customElement),ae()}R(l)}class _e{$destroy(){ke(this,1),this.$destroy=v}$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 Se(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("line"),o=j("line"),M(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"),M(i,"x1","12"),M(i,"y1","9"),M(i,"x2","12"),M(i,"y2","13"),M(o,"x1","12"),M(o,"y1","17"),M(o,"x2","12.01"),M(o,"y2","17"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-alert-triangle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-alert-triangle "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ce(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ee extends _e{constructor(e){super(),Ie(this,e,Ce,Se,k,{size:0,strokeWidth:1,class:2})}}function Ne(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("circle"),i=j("polyline"),o=j("line"),M(n,"cx","12"),M(n,"cy","12"),M(n,"r","10"),M(i,"points","8 12 12 16 16 12"),M(o,"x1","12"),M(o,"y1","8"),M(o,"x2","12"),M(o,"y2","16"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-arrow-down-circle "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-arrow-down-circle "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Le(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class je extends _e{constructor(e){super(),Ie(this,e,Le,Ne,k,{size:0,strokeWidth:1,class:2})}}function qe(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),M(n,"d","M22 11.08V12a10 10 0 1 1-5.93-9.14"),M(i,"points","22 4 12 14.01 9 11.01"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-check-circle "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-check-circle "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function De(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Fe extends _e{constructor(e){super(),Ie(this,e,De,qe,k,{size:0,strokeWidth:1,class:2})}}function Te(e){let t,n,i;return{c(){t=j("svg"),n=j("path"),M(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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",i="feather feather-command "+e[2])},m(e,i){C(e,t,i),S(t,n)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&i!==(i="feather feather-command "+e[2])&&M(t,"class",i)},i:v,o:v,d(e){e&&E(t)}}}function ze(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ae extends _e{constructor(e){super(),Ie(this,e,ze,Te,k,{size:0,strokeWidth:1,class:2})}}function Me(e){let t,n,i,o;return{c(){t=j("svg"),n=j("polyline"),i=j("path"),M(n,"points","9 10 4 15 9 20"),M(i,"d","M20 4v7a4 4 0 0 1-4 4H4"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-corner-down-left "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-corner-down-left "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function Be(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Oe extends _e{constructor(e){super(),Ie(this,e,Be,Me,k,{size:0,strokeWidth:1,class:2})}}function Pe(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("line"),o=j("line"),M(n,"d","M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"),M(i,"x1","18"),M(i,"y1","9"),M(i,"x2","12"),M(i,"y2","15"),M(o,"x1","12"),M(o,"y1","9"),M(o,"x2","18"),M(o,"y2","15"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-delete "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-delete "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ve(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class We extends _e{constructor(e){super(),Ie(this,e,Ve,Pe,k,{size:0,strokeWidth:1,class:2})}}function Re(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),o=j("line"),M(n,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),M(i,"points","15 3 21 3 21 9"),M(o,"x1","10"),M(o,"y1","14"),M(o,"x2","21"),M(o,"y2","3"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-external-link "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-external-link "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Ue(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class He extends _e{constructor(e){super(),Ie(this,e,Ue,Re,k,{size:0,strokeWidth:1,class:2})}}function Ge(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("circle"),i=j("line"),o=j("path"),M(n,"cx","12"),M(n,"cy","12"),M(n,"r","10"),M(i,"x1","2"),M(i,"y1","12"),M(i,"x2","22"),M(i,"y2","12"),M(o,"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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-globe "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-globe "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function Qe(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ye extends _e{constructor(e){super(),Ie(this,e,Qe,Ge,k,{size:0,strokeWidth:1,class:2})}}function Je(e){let t,n,i,o,r,s,l,a;return{c(){t=j("svg"),n=j("line"),i=j("line"),o=j("line"),r=j("line"),s=j("line"),l=j("line"),M(n,"x1","8"),M(n,"y1","6"),M(n,"x2","21"),M(n,"y2","6"),M(i,"x1","8"),M(i,"y1","12"),M(i,"x2","21"),M(i,"y2","12"),M(o,"x1","8"),M(o,"y1","18"),M(o,"x2","21"),M(o,"y2","18"),M(r,"x1","3"),M(r,"y1","6"),M(r,"x2","3.01"),M(r,"y2","6"),M(s,"x1","3"),M(s,"y1","12"),M(s,"x2","3.01"),M(s,"y2","12"),M(l,"x1","3"),M(l,"y1","18"),M(l,"x2","3.01"),M(l,"y2","18"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",a="feather feather-list "+e[2])},m(e,a){C(e,t,a),S(t,n),S(t,i),S(t,o),S(t,r),S(t,s),S(t,l)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&a!==(a="feather feather-list "+e[2])&&M(t,"class",a)},i:v,o:v,d(e){e&&E(t)}}}function Ke(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class Ze extends _e{constructor(e){super(),Ie(this,e,Ke,Je,k,{size:0,strokeWidth:1,class:2})}}function Xe(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("polyline"),M(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"),M(i,"points","22,6 12,13 2,6"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-mail "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-mail "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function et(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class tt extends _e{constructor(e){super(),Ie(this,e,et,Xe,k,{size:0,strokeWidth:1,class:2})}}function nt(e){let t,n,i,o;return{c(){t=j("svg"),n=j("path"),i=j("circle"),M(n,"d","M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"),M(i,"cx","12"),M(i,"cy","10"),M(i,"r","3"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-map-pin "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-map-pin "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function it(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ot extends _e{constructor(e){super(),Ie(this,e,it,nt,k,{size:0,strokeWidth:1,class:2})}}function rt(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("polyline"),i=j("line"),o=j("path"),M(n,"points","23 7 23 1 17 1"),M(i,"x1","16"),M(i,"y1","8"),M(i,"x2","23"),M(i,"y2","1"),M(o,"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"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-phone-outgoing "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-phone-outgoing "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function st(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class lt extends _e{constructor(e){super(),Ie(this,e,st,rt,k,{size:0,strokeWidth:1,class:2})}}function at(e){let t,n,i,o,r;return{c(){t=j("svg"),n=j("polyline"),i=j("path"),o=j("rect"),M(n,"points","6 9 6 2 18 2 18 9"),M(i,"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"),M(o,"x","6"),M(o,"y","14"),M(o,"width","12"),M(o,"height","8"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",r="feather feather-printer "+e[2])},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&r!==(r="feather feather-printer "+e[2])&&M(t,"class",r)},i:v,o:v,d(e){e&&E(t)}}}function ct(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class dt extends _e{constructor(e){super(),Ie(this,e,ct,at,k,{size:0,strokeWidth:1,class:2})}}function ut(e){let t,n,i,o;return{c(){t=j("svg"),n=j("circle"),i=j("line"),M(n,"cx","11"),M(n,"cy","11"),M(n,"r","8"),M(i,"x1","21"),M(i,"y1","21"),M(i,"x2","16.65"),M(i,"y2","16.65"),M(t,"xmlns","http://www.w3.org/2000/svg"),M(t,"width",e[0]),M(t,"height",e[0]),M(t,"fill","none"),M(t,"viewBox","0 0 24 24"),M(t,"stroke","currentColor"),M(t,"stroke-width",e[1]),M(t,"stroke-linecap","round"),M(t,"stroke-linejoin","round"),M(t,"class",o="feather feather-search "+e[2])},m(e,o){C(e,t,o),S(t,n),S(t,i)},p(e,[n]){1&n&&M(t,"width",e[0]),1&n&&M(t,"height",e[0]),2&n&&M(t,"stroke-width",e[1]),4&n&&o!==(o="feather feather-search "+e[2])&&M(t,"class",o)},i:v,o:v,d(e){e&&E(t)}}}function mt(e,t,n){let{size:i="100%"}=t,{strokeWidth:o=2}=t,{class:r=""}=t;return"100%"!==i&&(i="x"===i.slice(-1)?i.slice(0,i.length-1)+"em":parseInt(i)+"px"),e.$$set=e=>{"size"in e&&n(0,i=e.size),"strokeWidth"in e&&n(1,o=e.strokeWidth),"class"in e&&n(2,r=e.class)},[i,o,r]}class ft extends _e{constructor(e){super(),Ie(this,e,mt,ut,k,{size:0,strokeWidth:1,class:2})}}const{document:pt}=ve;function ht(e){e[45]=e[46].items}function $t(e,t,n){const i=e.slice();return i[47]=t[n],i[49]=n,i}function gt(e,t,n){const i=e.slice();return i[50]=t[n],i}function vt(e,t,n){const i=e.slice();return i[50]=t[n],i}function yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function wt(e){let t,n,i,o,r,s;ht(e);let l=e[5]?.length&&bt(e),a=e[45]?.length&&kt(e),c=e[5]?.length&&St(e);return{c(){l&&l.c(),t=D(),n=L("div"),i=L("table"),a&&a.c(),o=D(),r=L("tbody"),c&&c.c(),M(i,"striped",""),M(i,"class","svelte-v0ogws"),M(n,"class","eList svelte-v0ogws")},m(e,d){l&&l.m(e,d),C(e,t,d),C(e,n,d),S(n,i),a&&a.m(i,null),S(i,o),S(i,r),c&&c.m(r,null),s=!0},p(e,n){ht(e),e[5]?.length?l?(l.p(e,n),32&n[0]&&pe(l,1)):(l=bt(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[45]?.length?a?a.p(e,n):(a=kt(e),a.c(),a.m(i,o)):a&&(a.d(1),a=null),e[5]?.length?c?(c.p(e,n),32&n[0]&&pe(c,1)):(c=St(e),c.c(),pe(c,1),c.m(r,null)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(l),pe(c),s=!0)},o(e){he(l),he(c),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),a&&a.d(),c&&c.d()}}}function bt(e){let t,n,i,o,r,s,l,a,c,d,u,m=e[6]&&xt(e);function f(t){e[29](t)}let p={id:e[10]};return void 0!==e[3]&&(p.value=e[3]),o=new e[8]({props:p}),K.push((()=>we(o,"value",f))),o.$on("input",e[14]),a=new We({props:{size:"18"}}),{c(){m&&m.c(),t=D(),n=L("div"),i=q("Suchen: "),be(o.$$.fragment),s=D(),l=L("span"),be(a.$$.fragment),M(l,"class","feather pointer svelte-v0ogws"),P(n,"margin-bottom","1em"),P(n,"position","relative")},m(r,f){m&&m.m(r,f),C(r,t,f),C(r,n,f),S(n,i),xe(o,n,null),S(n,s),S(n,l),xe(a,l,null),c=!0,d||(u=T(l,"click",e[16]),d=!0)},p(e,n){e[6]?m?64&n[0]&&pe(m,1):(m=xt(e),m.c(),pe(m,1),m.m(t.parentNode,t)):m&&(me(),he(m,1,1,(()=>{m=null})),fe());const i={};!r&&8&n[0]&&(r=!0,i.value=e[3],re((()=>r=!1))),o.$set(i)},i(e){c||(pe(m),pe(o.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(m),he(o.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){m&&m.d(e),e&&E(t),e&&E(n),ke(o),ke(a),d=!1,u()}}}function xt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function kt(e){let t,n,i,o=e[4]&&e[0]&&It(),r=e[45],s=[];for(let t=0;t<r.length;t+=1)s[t]=_t(vt(e,r,t));return{c(){t=L("thead"),n=L("tr"),o&&o.c(),i=D();for(let e=0;e<s.length;e+=1)s[e].c();M(n,"class","svelte-v0ogws"),M(t,"class","svelte-v0ogws")},m(e,r){C(e,t,r),S(t,n),o&&o.m(n,null),S(n,i);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(e[4]&&e[0]?o||(o=It(),o.c(),o.m(n,i)):o&&(o.d(1),o=null),8196&t[0]){let i;for(r=e[45],i=0;i<r.length;i+=1){const o=vt(e,r,i);s[i]?s[i].p(o,t):(s[i]=_t(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),o&&o.d(),N(s,e)}}}function It(e){let t;return{c(){t=L("th"),M(t,"class","svelte-v0ogws")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _t(e){let t,n,i=e[50]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,t){4&t[0]&&i!==(i=e[50]?.designation+"")&&B(n,i)},d(e){e&&E(t)}}}function St(e){let t,n,i=[],o=new Map,r=e[5];const s=e=>e[47]._id;for(let t=0;t<r.length;t+=1){let n=$t(e,r,t),l=s(n);o.set(l,i[t]=Lt(l,n))}return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,o){for(let t=0;t<i.length;t+=1)i[t].m(e,o);C(e,t,o),n=!0},p(e,n){178239&n[0]&&(r=e[5],me(),i=function(e,t,n,i,o,r,s,l,a,c,d,u){let m=e.length,f=r.length,p=m;const h={};for(;p--;)h[e[p].key]=p;const $=[],g=new Map,v=new Map;for(p=f;p--;){const e=u(o,r,p),l=n(e);let a=s.get(l);a?i&&a.p(e,t):(a=c(l,e),a.c()),g.set(l,$[p]=a),l in h&&v.set(l,Math.abs(p-h[l]))}const y=new Set,w=new Set;function b(e){pe(e,1),e.m(l,d),s.set(e.key,e),d=e.first,f--}for(;m&&f;){const t=$[f-1],n=e[m-1],i=t.key,o=n.key;t===n?(d=t.first,m--,f--):g.has(o)?!s.has(i)||y.has(i)?b(t):w.has(o)?m--:v.get(i)>v.get(o)?(w.add(i),b(t)):(y.add(o),m--):(a(n,s),m--)}for(;m--;){const t=e[m];g.has(t.key)||a(t,s)}for(;f;)b($[f-1]);return $}(i,n,s,1,e,r,o,t.parentNode,ye,Lt,t,$t),fe())},i(e){if(!n){for(let e=0;e<r.length;e+=1)pe(i[e]);n=!0}},o(e){for(let e=0;e<i.length;e+=1)he(i[e]);n=!1},d(e){for(let t=0;t<i.length;t+=1)i[t].d(e);e&&E(t)}}}function Ct(e){let t,n,i,o,r,s,l=e[4]&&e[0]&&Et(e),a=e[45],c=[];for(let t=0;t<a.length;t+=1)c[t]=Nt(gt(e,a,t));return{c(){t=L("tr"),l&&l.c(),n=D();for(let e=0;e<c.length;e+=1)c[e].c();i=D(),M(t,"class","pointer svelte-v0ogws"),V(t,"active",e[47]._id===e[1])},m(a,d){C(a,t,d),l&&l.m(t,null),S(t,n);for(let e=0;e<c.length;e+=1)c[e].m(t,null);S(t,i),o=!0,r||(s=T(t,"click",A((function(){x(e[12](e[47],e[49]))&&e[12](e[47],e[49]).apply(this,arguments)}))),r=!0)},p(o,r){if((e=o)[4]&&e[0]?l?(l.p(e,r),17&r[0]&&pe(l,1)):(l=Et(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),10276&r[0]){let n;for(a=e[45],n=0;n<a.length;n+=1){const o=gt(e,a,n);c[n]?c[n].p(o,r):(c[n]=Nt(o),c[n].c(),c[n].m(t,i))}for(;n<c.length;n+=1)c[n].d(1);c.length=a.length}34&r[0]&&V(t,"active",e[47]._id===e[1])},i(e){o||(pe(l),o=!0)},o(e){he(l),o=!1},d(e){e&&E(t),l&&l.d(),N(c,e),r=!1,s()}}}function Et(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("td"),be(n.$$.fragment),M(t,"class","editRow svelte-v0ogws"),P(t,"color","#326173")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",A((function(){x(e[17](e[47]))&&e[17](e[47]).apply(this,arguments)}))),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Nt(e){let t,n,i,o=e[11](e[47],e[50])+"";return{c(){t=L("td"),n=q(o),M(t,"class",i=_(e[50].type)+" svelte-v0ogws")},m(e,i){C(e,t,i),S(t,n)},p(e,r){36&r[0]&&o!==(o=e[11](e[47],e[50])+"")&&B(n,o),4&r[0]&&i!==(i=_(e[50].type)+" svelte-v0ogws")&&M(t,"class",i)},d(e){e&&E(t)}}}function Lt(e,t){let n,i,o,r=t[15](t[47],t[45],t[3]),s=r&&Ct(t);return{key:e,first:null,c(){n=F(),s&&s.c(),i=F(),this.first=n},m(e,t){C(e,n,t),s&&s.m(e,t),C(e,i,t),o=!0},p(e,n){t=e,44&n[0]&&(r=t[15](t[47],t[45],t[3])),r?s?(s.p(t,n),44&n[0]&&pe(s,1)):(s=Ct(t),s.c(),pe(s,1),s.m(i.parentNode,i)):s&&(me(),he(s,1,1,(()=>{s=null})),fe())},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(n),s&&s.d(e),e&&E(i)}}}function jt(e){let t,n;return t=new e[7]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function qt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:jt,then:wt,catch:yt,value:46,blocks:[,,,]};return $e(n=e[2]&&e[13](),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,4&i[0]&&n!==(n=e[2]&&e[13]())&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}const Dt=e("getDisplayItems",((e,t,n)=>{if(!e)return;let i=[];return e.forEach((e=>{if("_total"===e)return void i.push({name:"_total",designation:"Betrag",type:"number"});const[o,r]=e.split(".");let s=t.list?.find((e=>e.name===o))?.item.find((e=>e.name===r));s&&(s={...s},s.name=`${o}_${r}`,n=n.map((e=>(e[o]&&(e[s.name]=e["_"+o]?e["_"+o][r]:e[o][r]),e)))),s||(s=t.items.find((e=>e.name===o))),i.find((e=>e?.name===o))||i.push(s)})),i.length?i:t.items}));function Ft(e,o,r){let s;let l=JSON.parse(t.getItem("Locale")).id;const a=Q(),{Loading:d,TextField:m}=c,{currentTasks:p}=u;I(e,p,(e=>r(33,s=e)));let $,g,v,y,{inputList:w}=o,{eventId:b}=o,{prevEventId:x}=o,{className:k}=o,{rowId:_}=o,{filterForReady:S=!1}=o,{refStatus:C}=o,{showEdit:E=!1}=o,{praefix:N=""}=o,{selectionFields:L=!1}=o,{deList:j}=o,{stopAggregation:q=!1}=o,{inputSearch:D=""}=o,F=!0,T=D,z=k+Math.floor(9e3*Math.random()+1e3).toString()+"search",A=!1,M=!0;const B=(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[i,o]=t.name.split("_");try{n=e[i][0][o],Array.isArray(n)&&(n=n.join(", "))}catch{}}return"number"===t.type&&(n=Number(n)?n.toLocaleString(l,{minimumFractionDigits:t.properties?.decimals||0,maximumFractionDigits:t.decimals||0}):""),"number"===t.type?n:"boolean"==typeof n?h(n):f(e[`_${t.name}`]||n||"")},O=n.getSchemaByClass(k),P=async(e,t)=>{if(C)return r(18,C=[].concat(C)),e.filter((e=>!!C.find((t=>e._task.status===t))));if("Information"===t.state.task)return e;if(x){const t=await n.getEvent(x);if("report"===t?.output?.type)return e;if(t?.input?.class?.length&&t.input.class[0].name===k)return"Information"===t.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))},V=(e,t)=>{if(e){const n="string"==typeof e?e:Object.keys(e)[0],i=new Intl.Collator(l,{numeric:!0});return t.sort(((e,t)=>i.compare(e[n],t[n])))}return t},W=async e=>{let t,i=0;M=!1;const o=e=>new Promise((t=>setTimeout(t,e)));for(;i++<200&&!q&&!(t=await R(e));)await o(500);r(6,A=!1),q&&n.readTasksByAggregationId(e,!0),t&&(r(5,v=V(g.displaySort,t.data)),window.setTimeout((()=>{const e=document.querySelector("tr.active");e&&e.scrollIntoView({block:"end",behavior:"smooth"}),M=!0}),100))},R=async e=>await n.readTasksByAggregationId(e),U=async(e,t,n,i)=>{const{value:o,refClass:r}=i,[s,l]=n.split("."),a=o?.get(N),c=a&&await Pa(s,a);if(!c)return e;const d=c[l];return d?.length?d.map((n=>{let i=e?.find((e=>e._id===n[t]))||{};i={...i};for(const e in i)n[e]&&(i[e]=n[e]);for(const e in n)n[e]&&(i[e]=n[e]);return Ba(r+i._id.toString(),i),i})):e};H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(z)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await O;e.eventId===t.id&&(Va(t.class,e.eventId),r(2,F=!r(2,F=!1)))}));return e.$$set=e=>{"inputList"in e&&r(20,w=e.inputList),"eventId"in e&&r(21,b=e.eventId),"prevEventId"in e&&r(22,x=e.prevEventId),"className"in e&&r(23,k=e.className),"rowId"in e&&r(1,_=e.rowId),"filterForReady"in e&&r(24,S=e.filterForReady),"refStatus"in e&&r(18,C=e.refStatus),"showEdit"in e&&r(0,E=e.showEdit),"praefix"in e&&r(25,N=e.praefix),"selectionFields"in e&&r(26,L=e.selectionFields),"deList"in e&&r(27,j=e.deList),"stopAggregation"in e&&r(19,q=e.stopAggregation),"inputSearch"in e&&r(28,D=e.inputSearch)},[E,_,F,T,$,v,A,d,m,p,z,B,(e,t)=>n=>{r(19,q=!0);const i=M?e:y[t];a("choose",{row:i})},async()=>{g=await O,r(4,$=(e=>!s?.length||!!s.find((t=>t===e)))(g.id)),r(5,v=y=V(g.displaySort,await w||await Aa(g.class,g.id))),500===v?.length&&(r(6,A=!0),n.getTasksList(g.id,!1,!0).then((({aggregationId:e})=>W(e))));let e,t=!1,i="";const o=L&&L?.find((e=>g.class===e.refClass.split(":")[0])),l=o?.value?.get&&o.value.get(N);if(l){const[s,a]=o.refClass.split(":");g.class===s&&r(5,v=await U(v,s,a,o)),t=o.parentClass?.find((e=>"quantity"===e.name)),i=o.className,e=await n.getCountedSection(i,a.split(".")[0],l,s,"quantity")}r(0,E&&=!o),o||!S&&!C||r(5,v=await P(v,g));const{display:c}=g;let d=Dt(c,g,v);return!E&&t?(d=d.concat([{name:"quantity",designation:"h-Soll"},{name:"ist",designation:"h-Ist"}]),r(5,v=v.map((t=>{const n=e.find((e=>e._id===t._id));return n&&(t.ist=n.quantity.$numberDecimal),t}))),e.map((e=>{if(!v.find((t=>t._id===e._id))){const t=y.find((t=>t._id===e._id));t.ist=e.quantity.$numberDecimal,v.push(t)}})),a("init",v)):j&&r(5,v=v.filter((e=>!j.find((t=>t._id===e._id))))),{items:d}},({detail:{value:e}})=>{r(3,T=e)},(e,t,n)=>{if(!n)return!0;"string"!=typeof n&&(n=n.toString()),n=n.toLowerCase();let i=!1;for(const o of t){const t=B(e,o).toLowerCase();!i&&t.includes(n)&&(i=!0)}return i},()=>{r(3,T="")},e=>{window.open(`/task/${e._task.event}/${e._task._id}/task?view=standalone`,"_blank")},C,q,w,b,x,k,S,N,L,j,D,function(e){T=e,r(3,T)}]}class Tt extends _e{constructor(e){var t;super(),pt.getElementById("svelte-v0ogws-style")||((t=L("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}",S(pt.head,t)),Ie(this,e,Ft,qt,k,{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 zt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function At(e){let t,n,i=e[41]&&Mt(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[41]?i?(i.p(e,n),8&n[0]&&pe(i,1)):(i=Mt(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Mt(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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65537&n[0]&&(i.title=e[16]?"Auswahl":e[0]),16384&n[0]&&(i.class="eList "+(e[14]?"form":"")),2097150&n[0]|2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Bt(e){let t,n;return t=new Ra({props:{schema:e[2],recID:e[1],readonly:e[15]}}),t.$on("choose",(function(){x(e[30](e[41]))&&e[30](e[41]).apply(this,arguments)})),t.$on("back",e[27]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};4&i[0]&&(o.schema=e[2]),2&i[0]&&(o.recID=e[1]),32768&i[0]&&(o.readonly=e[15]),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ot(e){let t,n,i,o,r,s,l;t=new e[22]({props:{text:e[16]?"Zusätzliche Auswahl":""}});const a=[Vt,Pt],c=[];function d(e,t){return e[16]?0:1}return i=d(e),o=c[i]=a[i](e),s=new Tt({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(){be(t.$$.fragment),n=D(),o.c(),r=D(),be(s.$$.fragment)},m(e,o){xe(t,e,o),C(e,n,o),c[i].m(e,o),C(e,r,o),xe(s,e,o),l=!0},p(e,n){const l={};65536&n[0]&&(l.text=e[16]?"Zusätzliche Auswahl":""),t.$set(l);let u=i;i=d(e),i===u?c[i].p(e,n):(me(),he(c[u],1,1,(()=>{c[u]=null})),fe(),o=c[i],o?o.p(e,n):(o=c[i]=a[i](e),o.c()),pe(o,1),o.m(r.parentNode,r));const m={};4096&n[0]&&(m.inputSearch=e[12]),4&n[0]&&(m.eventId=e[2].id),4&n[0]&&(m.className=e[2].class),2048&n[0]&&(m.prevEventId=e[11]),16&n[0]&&(m.filterForReady=e[4]),32&n[0]&&(m.refStatus=e[5]),64&n[0]&&(m.praefix=e[6]),128&n[0]&&(m.selectionFields=e[7]),2&n[0]&&(m.rowId=e[1]),512&n[0]&&(m.deList=e[9]),1048576&n[0]&&(m.stopAggregation=e[20]),256&n[0]&&(m.showEdit=e[8]),s.$set(m)},i(e){l||(pe(t.$$.fragment,e),pe(o),pe(s.$$.fragment,e),l=!0)},o(e){he(t.$$.fragment,e),he(o),he(s.$$.fragment,e),l=!1},d(e){ke(t,e),e&&E(n),c[i].d(e),e&&E(r),ke(s,e)}}}function Pt(e){let t,n,i,o;n=new e[23]({props:{outline:!0,$$slots:{default:[Wt]},$$scope:{ctx:e}}}),n.$on("click",e[28]);let r=e[25]&&e[10]&&Rt(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),M(t,"class","form--buttons svelte-jb5mrh")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};2048&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[25]&&e[10]?r?(r.p(e,i),1024&i[0]&&pe(r,1)):(r=Rt(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Vt(e){let t,n,i,o,r,s,l=e[19]&&Ht(e);return i=new e[23]({props:{outline:!0,$$slots:{default:[Gt]},$$scope:{ctx:e}}}),i.$on("click",e[28]),r=new e[22]({props:{text:"Liste aus "+e[13]}}),{c(){l&&l.c(),t=D(),n=L("div"),be(i.$$.fragment),o=D(),be(r.$$.fragment),M(n,"class","form--buttons svelte-jb5mrh")},m(e,a){l&&l.m(e,a),C(e,t,a),C(e,n,a),xe(i,n,null),C(e,o,a),xe(r,e,a),s=!0},p(e,n){e[19]?l?(l.p(e,n),524288&n[0]&&pe(l,1)):(l=Ht(e),l.c(),pe(l,1),l.m(t.parentNode,t)):l&&(me(),he(l,1,1,(()=>{l=null})),fe());const o={};2048&n[1]&&(o.$$scope={dirty:n,ctx:e}),i.$set(o);const s={};8192&n[0]&&(s.text="Liste aus "+e[13]),r.$set(s)},i(e){s||(pe(l),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){l&&l.d(e),e&&E(t),e&&E(n),ke(i),e&&E(o),ke(r,e)}}}function Wt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Rt(e){let t,n;return t=new e[23]({props:{filled:!0,$$slots:{default:[Ut]},$$scope:{ctx:e}}}),t.$on("click",e[29]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ut(e){let t;return{c(){t=q("Neu")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Ht(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]&&(i.item=e[17]),131072&n[0]&&(i.record={_id:"",[e[17].name]:""}),131072&n[0]&&(i.classId="sel_"+e[17].name),262144&n[0]&&(i.eventId=e[18]),524288&n[0]&&(i.deList=e[19]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gt(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Qt(e){let t,n,i,o;const r=[Ot,Bt],s=[];function l(e,t){return e[41].length&&!e[14]?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function Yt(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Jt(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:Yt,then:At,catch:zt,value:41,blocks:[,,,]};return $e(n=e[26](e[3]),o),{c(){t=F(),o.block.c()},m(e,n){C(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,8&i[0]&&n!==(n=e[26](e[3]))&&$e(n,o)||ge(o,e,i)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),o.block.d(e),o.token=null,o=null}}}function Kt(e,t,i){let o;const{Dialog:r,Divider:s,Button:l}=c,a=Q(),{currentTasks:d}=u;I(e,d,(e=>i(37,o=e)));let{title:m}=t,{schema:f}=t,{recID:p}=t,{isOpening:h=!0}=t,{filterForReady:$=!1}=t,{refStatus:g}=t,{praefix:v=""}=t,{selectionFields:y=!1}=t,{showEdit:w=!0}=t,{deList:b}=t,{newAllowed:x=!0}=t,{prevEventId:k}=t,{inputSearch:_}=t,S=f.id;f.class;let C,E,N,L,j,q,D,F="",T=!1,z=!1;m??=f.identity.designation;const A=!o?.length||o.find((e=>e===S));return e.$$set=e=>{"title"in e&&i(0,m=e.title),"schema"in e&&i(2,f=e.schema),"recID"in e&&i(1,p=e.recID),"isOpening"in e&&i(3,h=e.isOpening),"filterForReady"in e&&i(4,$=e.filterForReady),"refStatus"in e&&i(5,g=e.refStatus),"praefix"in e&&i(6,v=e.praefix),"selectionFields"in e&&i(7,y=e.selectionFields),"showEdit"in e&&i(8,w=e.showEdit),"deList"in e&&i(9,b=e.deList),"newAllowed"in e&&i(10,x=e.newAllowed),"prevEventId"in e&&i(11,k=e.prevEventId),"inputSearch"in e&&i(12,_=e.inputSearch)},[m,p,f,h,$,g,v,y,w,b,x,k,_,F,T,C,N,j,q,D,z,r,s,l,d,A,async e=>{if(!e)return!1;const t=await Aa(f.class,f.id);if(E=y&&y?.find((e=>f.class===e.refClass.split(":")[0])),i(16,N=E?.value?.get&&E.value.get(v)),N){L=E.refClass;const[e,t]=L.split(":"),[o]=t.split(".");i(17,j=E.parentClass.find((t=>t.name===e)));const r=await n.getSchemaByClass(j.refClass);i(18,q=r.id),i(13,F=E.parentClass.find((e=>e.name===o)).designation)}return t},()=>{i(14,T=!1),p||a("back"),w||a("back")},()=>{i(20,z=!0),i(14,T=!1),a("back")},()=>{i(20,z=!0),i(1,p=!1),i(15,C=!1),i(14,T=!0)},e=>({detail:{row:e}})=>{let t=f.display;t&&t.length&&t.map((t=>{const[n,i]=t.split(".");let o=f.list?.find((e=>e.name===n))?.item.find((e=>e.name===i));if(o){e[`${n}_${i}`]=e[n][i]}})),a("choose",{row:e})},({detail:e})=>{i(15,C=!!e._task.visum||"Closed"===e._task.status),i(1,p=e._docId),i(14,T=!0)},({detail:e})=>{N&&i(19,D=e)},({detail:e})=>{if(!e.value)return;const t={_id:e.value};a("choose",{row:t})},function(t){Y(e,t)}]}class Zt extends _e{constructor(e){var t;super(),document.getElementById("svelte-jb5mrh-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Kt,Jt,k,{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:Xt}=ve;function en(e){e[27]=e[29].list,e[28]=e[29].items}function tn(e,t,n){const i=e.slice();return i[30]=t[n],i}function nn(e,t,n){const i=e.slice();return i[33]=t[n],i}function on(e,t,n){const i=e.slice();return i[33]=t[n],i}function rn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function sn(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[24](t)}en(e),n=new e[7]({props:{outline:!0,$$slots:{default:[ln]},$$scope:{ctx:e}}}),n.$on("click",e[23]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[28]?.length&&function(e){let t,n,i,o,r=e[28],s=[];for(let t=0;t<r.length;t+=1)s[t]=an(on(e,r,t));return{c(){t=L("thead"),n=L("tr"),i=L("th"),o=D();for(let e=0;e<s.length;e+=1)s[e].c();M(i,"class","svelte-14hcfjl"),M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,r){C(e,t,r),S(t,n),S(n,i),S(n,o);for(let e=0;e<s.length;e+=1)s[e].m(n,null)},p(e,t){if(2048&t[0]){let i;for(r=e[28],i=0;i<r.length;i+=1){const o=on(e,r,i);s[i]?s[i].p(o,t):(s[i]=an(o),s[i].c(),s[i].m(n,null))}for(;i<s.length;i+=1)s[i].d(1);s.length=r.length}},d(e){e&&E(t),N(s,e)}}}(e),x=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=un(tn(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(44547&n[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const r=tn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=un(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){en(e);const i={};128&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[28]?.length&&b.p(e,t),e[27]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),pe(x),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),he(x),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function ln(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function an(e){let t,n,i=e[33]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function cn(e){let t,n,i,o,r,s,l,a;i=new He({props:{size:"18"}});let c=e[28],d=[];for(let t=0;t<c.length;t+=1)d[t]=dn(nn(e,c,t));return{c(){t=L("tr"),n=L("td"),be(i.$$.fragment),o=D();for(let e=0;e<d.length;e+=1)d[e].c();r=D(),M(n,"class","editRow svelte-14hcfjl"),M(t,"class","pointer svelte-14hcfjl"),V(t,"active",e[30]._id===e[0])},m(c,u){C(c,t,u),S(t,n),xe(i,n,null),S(t,o);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,r),s=!0,l||(a=T(n,"click",e[15](e[30])),l=!0)},p(n,i){if(e=n,3584&i[0]){let n;for(c=e[28],n=0;n<c.length;n+=1){const o=nn(e,c,n);d[n]?d[n].p(o,i):(d[n]=dn(o),d[n].c(),d[n].m(t,r))}for(;n<d.length;n+=1)d[n].d(1);d.length=c.length}2049&i[0]&&V(t,"active",e[30]._id===e[0])},i(e){s||(pe(i.$$.fragment,e),s=!0)},o(e){he(i.$$.fragment,e),s=!1},d(e){e&&E(t),ke(i),N(d,e),l=!1,a()}}}function dn(e){let t,n,i,o,r=e[9](e[30],e[33])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[30]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function un(e){let t,n,i=e[13](e[30],e[28],e[1]),o=i&&cn(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){2&n[0]&&(i=e[13](e[30],e[28],e[1])),i?o?(o.p(e,n),2&n[0]&&pe(o,1)):(o=cn(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function mn(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function fn(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:mn,then:sn,catch:rn,value:29,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function pn(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[fn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|128&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hn(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{classId:p}=t,{className:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass($);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Va(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(16,m=e.item),"classId"in e&&o(17,p=e.classId),"className"in e&&o(18,$=e.className),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(19,v=e.viewName),"viewValue"in e&&o(20,y=e.viewValue),"recordId"in e&&o(21,w=e.recordId),"filter"in e&&o(22,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _;let t=[];if(m.lookup){const e="."+p+"#"+m.lookup,i=document.querySelector(e),o=i?.value||w;if(o){const e=await Pa(m.lookup,o);if(e){const i=e[m.name]?.map((e=>e[m.name]));i&&(t=await n.getSectionView(m.name,{_id:{$in:i}},!0))}}}else{const i="."+p+"#"+v.split(":")[0],o=document.querySelector(i);let r={[v]:o?.value||w};if(m.refItem){const e="."+p+"#"+m.refItem;try{const t=document.querySelector(e);if(t){const e={$or:[{[m.refItem]:t.value},{[m.refItem]:{$exists:!0,$eq:""}}]};r={...r,...e}}}catch{}}r[v]&&(t=await n.getSectionView(e.class,r,!0)),b&&(t=t.filter((e=>e._id!=b)))}const i=e.display;return{list:t,items:Dt(i,e,t)}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},e=>async()=>{const t=await n.getTaskByDocId(e._id),i=`/task/${t.event}/${t._id}/task?view=standalone`;window.open(i)},m,p,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class $n extends _e{constructor(e){var t;super(),Xt.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Xt.head,t)),Ie(this,e,hn,pn,k,{item:16,classId:17,className:18,rowId:0,viewName:19,viewValue:20,recordId:21,filter:22},[-1,-1])}}const{document:gn}=ve;function vn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function yn(e){let t,n,i=e[58]&&function(e){let t,n,i,o,s,l,a,c,d,u,m,f,p,h,$,g,v,y,w;function b(t){e[45](t)}function x(t){e[46](t)}let k={class:"full-width",id:e[28],rows:"1",required:e[1],disabled:e[3],placeholder:e[29],style:"height:2.8em; padding-left:2em;padding-right:2em;overflow-y:hidden; resize:none;"};void 0!==e[2]&&(k.value=e[2]);void 0!==e[23]&&(k.overwrite=e[23]);n=new r({props:k}),K.push((()=>we(n,"value",b))),K.push((()=>we(n,"overwrite",x))),n.$on("click",e[31]()),n.$on("onFocus",e[31](e[28]));const I=[bn,wn],N=[];function j(e,t){return!e[3]||e[14]?0:e[20]&&e[0]?1:-1}~(l=j(e))&&(a=N[l]=I[l](e));let q=(!e[3]||e[14]||e[15])&&xn(e);function z(t){e[47](t)}let A={class:"tModal",noClickaway:!0,$$slots:{default:[Sn]},$$scope:{ctx:e}};void 0!==e[17]&&(A.open=e[17]);p=new e[25]({props:A}),K.push((()=>we(p,"open",z)));let B=e[18]&&Cn(e);return{c(){t=L("div"),be(n.$$.fragment),s=D(),a&&a.c(),c=D(),d=L("input"),m=D(),q&&q.c(),f=D(),be(p.$$.fragment),$=D(),B&&B.c(),g=F(),M(d,"class",u=_(e[7]||e[8])+" svelte-jox15l"),M(d,"id",e[5]),M(d,"name",e[5]),d.value=e[0],d.hidden=!0,P(t,"position","relative")},m(i,o){C(i,t,o),xe(n,t,null),S(t,s),~l&&N[l].m(t,null),S(t,c),S(t,d),S(t,m),q&&q.m(t,null),C(i,f,o),xe(p,i,o),C(i,$,o),B&&B.m(i,o),C(i,g,o),v=!0,y||(w=T(t,"keydown",e[32]),y=!0)},p(e,r){const s={};2&r[0]&&(s.required=e[1]),8&r[0]&&(s.disabled=e[3]),!i&&4&r[0]&&(i=!0,s.value=e[2],re((()=>i=!1))),!o&&8388608&r[0]&&(o=!0,s.overwrite=e[23],re((()=>o=!1))),n.$set(s);let m=l;l=j(e),l===m?~l&&N[l].p(e,r):(a&&(me(),he(N[m],1,1,(()=>{N[m]=null})),fe()),~l?(a=N[l],a?a.p(e,r):(a=N[l]=I[l](e),a.c()),pe(a,1),a.m(t,c)):a=null),(!v||384&r[0]&&u!==(u=_(e[7]||e[8])+" svelte-jox15l"))&&M(d,"class",u),(!v||32&r[0])&&M(d,"id",e[5]),(!v||32&r[0])&&M(d,"name",e[5]),(!v||1&r[0]&&d.value!==e[0])&&(d.value=e[0]),!e[3]||e[14]||e[15]?q?(q.p(e,r),49160&r[0]&&pe(q,1)):(q=xn(e),q.c(),pe(q,1),q.m(t,null)):q&&(me(),he(q,1,1,(()=>{q=null})),fe());const f={};6504273&r[0]|268435456&r[1]&&(f.$$scope={dirty:r,ctx:e}),!h&&131072&r[0]&&(h=!0,f.open=e[17],re((()=>h=!1))),p.$set(f),e[18]?B?(B.p(e,r),262144&r[0]&&pe(B,1)):(B=Cn(e),B.c(),pe(B,1),B.m(g.parentNode,g)):B&&(me(),he(B,1,1,(()=>{B=null})),fe())},i(e){v||(pe(n.$$.fragment,e),pe(a),pe(q),pe(p.$$.fragment,e),pe(B),v=!0)},o(e){he(n.$$.fragment,e),he(a),he(q),he(p.$$.fragment,e),he(B),v=!1},d(e){e&&E(t),ke(n),~l&&N[l].d(),q&&q.d(),e&&E(f),ke(p,e),e&&E($),B&&B.d(e),e&&E(g),y=!1,w()}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[58]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function wn(e){let t,n,i,o,r;return n=new He({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[37]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bn(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=[T(t,"click",e[31](!0)),T(t,"choose",e[34])],o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,b(r)}}}function xn(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-jox15l")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[36]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function kn(e){let t,n,i,o;const r=[_n,In],s=[];function l(e,t){return e[6].lookup||e[4]&&!e[6].constraint?0:1}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function In(e){let t,n;return t=new Zt({props:{title:e[6].designation,newAllowed:e[21],prevEventId:e[9],schema:e[16],recID:e[0],isOpening:e[17],filterForReady:e[22],refStatus:e[6].refStatus,selectionFields:e[12],deList:e[13],praefix:e[11],inputSearch:e[33]()}}),t.$on("choose",e[34]),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.title=e[6].designation),2097152&n[0]&&(i.newAllowed=e[21]),512&n[0]&&(i.prevEventId=e[9]),65536&n[0]&&(i.schema=e[16]),1&n[0]&&(i.recID=e[0]),131072&n[0]&&(i.isOpening=e[17]),4194304&n[0]&&(i.filterForReady=e[22]),64&n[0]&&(i.refStatus=e[6].refStatus),4096&n[0]&&(i.selectionFields=e[12]),8192&n[0]&&(i.deList=e[13]),2048&n[0]&&(i.praefix=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _n(e){let t,n;return t=new $n({props:{item:e[6],className:e[16].class,classId:e[8],rowId:e[0],recordId:e[10],viewName:e[4],viewValue:""}}),t.$on("choose",e[34]),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.item=e[6]),65536&n[0]&&(i.className=e[16].class),256&n[0]&&(i.classId=e[8]),1&n[0]&&(i.rowId=e[0]),1024&n[0]&&(i.recordId=e[10]),16&n[0]&&(i.viewName=e[4]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sn(e){let t,n,i=e[17]&&kn(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[17]?i?(i.p(e,n),131072&n[0]&&pe(i,1)):(i=kn(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Cn(e){let t,n,i;function o(t){e[48](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Nn]},$$scope:{ctx:e}};return void 0!==e[18]&&(r.open=e[18]),t=new e[25]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};589825&i[0]|268435456&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&262144&i[0]&&(n=!0,o.open=e[18],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function En(e){let t,n;return t=new Ra({props:{schema:e[16],recID:e[0],readonly:!0}}),t.$on("back",e[35]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.schema=e[16]),1&n[0]&&(i.recID=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Nn(e){let t,n;return t=new e[24]({props:{title:e[19],$$slots:{default:[En]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[0]&&(i.title=e[19]),65537&n[0]|268435456&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ln(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function jn(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Ln,then:yn,catch:vn,value:58,blocks:[,,,]};return $e(e[30](),i),{c(){t=F(),i.block.c()},m(e,o){C(e,t,o),i.block.m(e,i.anchor=o),i.mount=()=>t.parentNode,i.anchor=t,n=!0},p(t,n){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(e),i.token=null,i=null}}}function qn(e,t,i){let r,s,l;I(e,o,(e=>i(44,r=e)));const a=Q(),{Dialog:d,Modal:m}=c,{currentTasks:f,loggedIn:p}=u;I(e,f,(e=>i(50,s=e))),I(e,p,(e=>i(51,l=e)));let{id:h}=t,{item:g}=t,{value:v=""}=t,{desc:y=""}=t,{noForm:w=!1}=t,{classId:b}=t,{eventId:x}=t,{recordId:k}=t,{withRefValue:_=!1}=t,{refValue:S=""}=t,{required:C}=t,{disabled:E}=t,{readonly:N}=t,{praefix:L}=t,{selectionFields:j}=t,{formnovalidate:q}=t,{selection:D}=t,{deList:F}=t,{isTemplate:T}=t,{noList:z=!1}=t,{multi:A=!1}=t;const M="comment_"+h;let B,O,P,V,W,R,U=!1,H=!0,G=!0,Y=!0;N||=k&&g.asInput,E||=N,!D&&g.selection&&1===g.selection.split(":").length&&(D=g.selection);const J=N||E||g.lookup||D&&!g.constraint?"":"Suchbegriff ⏎",K=async e=>{e.items.filter((e=>e.properties?.default)).forEach((t=>{a("defPrep",{className:e.class,itemName:t.name,value:t.properties.default})}))},Z=e=>{e&&(i(2,y=$(P,e)),a("setRefDesc",y.split(" •")[0]),a("change",{value:v,description:y}),a("task",{row:e,eventId:P.id}))},X=()=>{i(17,U=!1),i(18,B=!1)};return e.$$set=e=>{"id"in e&&i(5,h=e.id),"item"in e&&i(6,g=e.item),"value"in e&&i(0,v=e.value),"desc"in e&&i(2,y=e.desc),"noForm"in e&&i(7,w=e.noForm),"classId"in e&&i(8,b=e.classId),"eventId"in e&&i(9,x=e.eventId),"recordId"in e&&i(10,k=e.recordId),"withRefValue"in e&&i(38,_=e.withRefValue),"refValue"in e&&i(39,S=e.refValue),"required"in e&&i(1,C=e.required),"disabled"in e&&i(3,E=e.disabled),"readonly"in e&&i(40,N=e.readonly),"praefix"in e&&i(11,L=e.praefix),"selectionFields"in e&&i(12,j=e.selectionFields),"formnovalidate"in e&&i(41,q=e.formnovalidate),"selection"in e&&i(4,D=e.selection),"deList"in e&&i(13,F=e.deList),"isTemplate"in e&&i(14,T=e.isTemplate),"noList"in e&&i(42,z=e.noList),"multi"in e&&i(15,A=e.multi)},e.$$.update=()=>{if(2&e.$$.dirty[0]|1024&e.$$.dirty[1]&&i(1,C=C&&!q),384&e.$$.dirty[1]&&_&&i(0,v=S),65601&e.$$.dirty[0]|2048&e.$$.dirty[1]&&v&&P&&Promise.resolve(Ma(g.refClass,P.id,v,!!g.lookup||z)).then(Z),65&e.$$.dirty[0]|12288&e.$$.dirty[1]&&v&&V&&g.name===V.input?.at(0)&&V.inputLookup?.length){const{domain:e}=V.inputLookup[0]||{};"user"===e&&(r.some((e=>V.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,E=!0))}65537&e.$$.dirty[0]&&!v&&P&&Z({})},[v,C,y,E,D,h,g,w,b,x,k,L,j,F,T,A,P,U,B,O,W,H,G,Y,d,m,f,p,M,J,async()=>{try{const e=await n.getEvent(x);if(R="report"===e.output.type,i(22,G=!g.asInput),i(21,H=e.output?.class[0].name!==g.refClass),i(16,P=await n.getSchemaByClass(g.refClass)),K(P),i(20,W=(e=>!s?.length||!!s.find((t=>t===e)))(P.id)),i(43,V=await n.getSchema(x)),x&&k&&v&&!E&&V.input?.find((e=>e===g.refClass))&&i(3,E=!0),g.properties?.query?.lookup){const{domain:e,value:t}=g.properties.query.lookup;if("user"===e){const e=l.user,o={[t]:e},s=await n.getSectionView(g.refClass,o);if(s?.length){const[{_id:e}]=s;e&&(i(39,S=e),i(38,_=!0))}r.some((e=>P.authorization?.find((t=>t.role===e&&!t.constraint))))||i(3,E=!0)}}return i(19,O=P.identity.designation),!0}catch{return a("initFail",!0),!1}},e=>t=>{if(!0===e&&i(17,U=!0),e&&"BUTTON"===t.explicitOriginalTarget?.nodeName){const t=document.getElementById(e);return t?.blur()}(g.lookup||D&&!g.constraint||v)&&i(17,U=!0)},e=>{13==e.which&&(e.preventDefault(),i(17,U=!0))},()=>{if(v)return"";const e=document.getElementById(M);return e?.value||""},({detail:e})=>{i(0,v=e.row._id),X()},X,()=>{(R||W)&&(A?a("change",{value:v,delete:!0}):(i(0,v=""),i(2,y=""),i(23,Y=!0),a("change",{value:v,description:y}),a("task",{row:{_task:{event:P.id,_id:!1}}})))},async()=>{if(!v)return;const e=await Ma(g.refClass,P.id,v);if(!e._task)return;const t=e._task.task_id,n=`/task/${e._task.event}/${t}/task?view=standalone`;window.open(n)},_,S,N,q,z,V,r,function(e){y=e,i(2,y)},function(e){Y=e,i(23,Y)},function(e){U=e,i(17,U)},function(e){B=e,i(18,B)}]}class Dn extends _e{constructor(e){var t;super(),gn.getElementById("svelte-jox15l-style")||((t=L("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}",S(gn.head,t)),Ie(this,e,qn,jn,k,{id:5,item:6,value:0,desc:2,noForm:7,classId:8,eventId:9,recordId:10,withRefValue:38,refValue:39,required:1,disabled:3,readonly:40,praefix:11,selectionFields:12,formnovalidate:41,selection:4,deList:13,isTemplate:14,noList:42,multi:15},[-1,-1])}}function Fn(e,t,n){const i=e.slice();return i[37]=t[n],i[39]=n,i}function Tn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function zn(e){let t,n;return t=new e[16]({props:{outline:!0,$$slots:{default:[Mn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8191&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function An(e){let t,n;return t=new Dn({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.classId=e[6]),128&n[0]&&(i.eventId=e[7]),512&n[0]&&(i.required=e[9]),2&n[0]&&(i.disabled=e[1]),4096&n[0]&&(i.formnovalidate=e[12]),1024&n[0]&&(i.readonly=e[10]),4&n[0]&&(i.id=e[2]+"."+e[39]),8&n[0]&&(i.item=e[3]),16&n[0]&&(i.desc=e[4]),1&n[0]&&(i.value=e[37]),32&n[0]&&(i.noForm=e[5]),2048&n[0]&&(i.praefix=e[11]),256&n[0]&&(i.recordId=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mn(e){let t,n,i,o,r,s,l;n=new Ze({props:{size:"18"}});let a=e[0],c=[];for(let t=0;t<a.length;t+=1)c[t]=An(Fn(e,a,t));const d=e=>he(c[e],1,1,(()=>{c[e]=null}));return{c(){t=L("span"),be(n.$$.fragment),i=D();for(let e=0;e<c.length;e+=1)c[e].c();o=F(),M(t,"class","feather pointer")},m(a,d){C(a,t,d),xe(n,t,null),C(a,i,d);for(let e=0;e<c.length;e+=1)c[e].m(a,d);C(a,o,d),r=!0,s||(l=T(t,"click",(function(){x(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(a=e[0],t=0;t<a.length;t+=1){const i=Fn(e,a,t);c[t]?(c[t].p(i,n),pe(c[t],1)):(c[t]=An(i),c[t].c(),pe(c[t],1),c[t].m(o.parentNode,o))}for(me(),t=a.length;t<c.length;t+=1)d(t);fe()}},i(e){if(!r){pe(n.$$.fragment,e);for(let e=0;e<a.length;e+=1)pe(c[e]);r=!0}},o(e){he(n.$$.fragment,e),c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)he(c[e]);r=!1},d(e){e&&E(t),ke(n),e&&E(i),N(c,e),e&&E(o),s=!1,l()}}}function Bn(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function On(e){let t,n;return t=new e[18]({props:{title:e[14].designation,class:"eList",$$slots:{default:[Vn]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]&&(i.title=e[14].designation),49480&n[0]|512&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Pn(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Vn(e){let t,n,i,o,r;return n=new e[19]({props:{outline:!0,$$slots:{default:[Pn]},$$scope:{ctx:e}}}),n.$on("click",e[25]),o=new Tt({props:{item:e[3],className:e[14].class,classId:e[6],rowId:e[15],recordId:e[8],inputList:e[21]()}}),o.$on("choose",e[23]),o.$on("back",e[25]),{c(){t=L("div"),be(n.$$.fragment),i=D(),be(o.$$.fragment),M(t,"class","form--buttons")},m(e,s){C(e,t,s),xe(n,t,null),C(e,i,s),xe(o,e,s),r=!0},p(e,t){const i={};512&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const r={};8&t[0]&&(r.item=e[3]),16384&t[0]&&(r.className=e[14].class),64&t[0]&&(r.classId=e[6]),32768&t[0]&&(r.rowId=e[15]),256&t[0]&&(r.recordId=e[8]),o.$set(r)},i(e){r||(pe(n.$$.fragment,e),pe(o.$$.fragment,e),r=!0)},o(e){he(n.$$.fragment,e),he(o.$$.fragment,e),r=!1},d(e){e&&E(t),ke(n),e&&E(i),ke(o,e)}}}function Wn(e){let t,n,i=e[13]&&On(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[13]?i?(i.p(e,n),8192&n[0]&&pe(i,1)):(i=On(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Rn(e){let t,n,i,o,r={ctx:e,current:null,token:null,hasCatch:!1,pending:Bn,then:zn,catch:Tn,value:36,blocks:[,,,]};function s(t){e[33](t)}$e(e[20](),r);let l={class:"tModal",noClickaway:!0,$$slots:{default:[Wn]},$$scope:{ctx:e}};return void 0!==e[13]&&(l.open=e[13]),n=new e[17]({props:l}),K.push((()=>we(n,"open",s))),{c(){r.block.c(),t=D(),be(n.$$.fragment)},m(e,i){r.block.m(e,r.anchor=i),r.mount=()=>t.parentNode,r.anchor=t,C(e,t,i),xe(n,e,i),o=!0},p(t,o){ge(r,e=t,o);const s={};57672&o[0]|512&o[1]&&(s.$$scope={dirty:o,ctx:e}),!i&&8192&o[0]&&(i=!0,s.open=e[13],re((()=>i=!1))),n.$set(s)},i(e){o||(pe(r.block),pe(n.$$.fragment,e),o=!0)},o(e){for(let e=0;e<3;e+=1){he(r.blocks[e])}he(n.$$.fragment,e),o=!1},d(e){r.block.d(e),r.token=null,r=null,e&&E(t),ke(n,e)}}}function Un(e,t,i){const o=Q(),{Card:r,Modal:s,Dialog:l,Button:a}=c;let d,u,{id:m}=t,{item:f}=t,{values:p=[]}=t,{desc:h=""}=t,{noForm:$=!1}=t,{classId:g}=t,{eventId:v}=t,{recordId:y}=t,{withRefValue:w=!1}=t,{refValue:b=""}=t,{required:x}=t,{disabled:k}=t,{readonly:I}=t,{praefix:_}=t,{selectionFields:S}=t,{formnovalidate:C}=t,{selection:E}=t,{deList:N}=t,{isTemplate:L}=t,{noList:j=!1}=t,q=!1;const D=f.properties.multi.filter;k=!0;const F=()=>{i(13,q=!1)};return e.$$set=e=>{"id"in e&&i(2,m=e.id),"item"in e&&i(3,f=e.item),"values"in e&&i(0,p=e.values),"desc"in e&&i(4,h=e.desc),"noForm"in e&&i(5,$=e.noForm),"classId"in e&&i(6,g=e.classId),"eventId"in e&&i(7,v=e.eventId),"recordId"in e&&i(8,y=e.recordId),"withRefValue"in e&&i(26,w=e.withRefValue),"refValue"in e&&i(27,b=e.refValue),"required"in e&&i(9,x=e.required),"disabled"in e&&i(1,k=e.disabled),"readonly"in e&&i(10,I=e.readonly),"praefix"in e&&i(11,_=e.praefix),"selectionFields"in e&&i(28,S=e.selectionFields),"formnovalidate"in e&&i(12,C=e.formnovalidate),"selection"in e&&i(29,E=e.selection),"deList"in e&&i(30,N=e.deList),"isTemplate"in e&&i(31,L=e.isTemplate),"noList"in e&&i(32,j=e.noList)},[p,k,m,f,h,$,g,v,y,x,I,_,C,q,d,u,r,s,l,a,async()=>{i(14,d=await n.getSchemaByClass(f.refClass))},async()=>{let e=await Aa(d.class,d.id);if(D)for(const t in D)e=e.filter((e=>{const[n,i]=t.split(".");if(i||(i=n,n=""),n){if(e[n][0]&&e[n][0][i].length)return!0}else if(e[i])return!0;return!1}));return e},e=>()=>{i(13,q=!0),i(15,u=e)},({detail:e})=>{const t=e.row._id;p.find((e=>e===t))||i(0,p=p.concat(e.row._id)),F()},({detail:e})=>{e.delete&&i(0,p=p.filter((t=>t!==e.value))),e.value=p,o("change",e)},F,w,b,S,E,N,L,j,function(e){q=e,i(13,q)}]}class Hn extends _e{constructor(e){var t;super(),document.getElementById("svelte-1m792ni-style")||((t=L("style")).id="svelte-1m792ni-style",t.textContent=".field .card{padding:1em !important;margin-bottom:1em !important}",S(document.head,t)),Ie(this,e,Un,Rn,k,{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 Gn=/\d+/g,Qn=/%[HMSpPdmyY%]/g;function Yn(e,t,n){const i=Math.floor((new Date).getFullYear()/100);let o=!1;if(""===e)return null;const r=t.split(Qn);let s=0,l=0;const a=new Date(0);for(const c of r){if(!e.startsWith(c,s))return n;if(s+=c.length,s===e.length){if(l!==t.length)return n;break}if("%"!==t[l+c.length])break;if(l+=c.length+1,"%"===t[l]){if("%"!==e[s])return n;s++}else if("p"===t[l].toLowerCase()){const t=e.substr(s,2).toUpperCase();if("AM"===t)o=!1,a.getHours()>=12&&a.setHours(a.getHours()-12);else{if("PM"!==t)return n;o=!0,a.getHours()<12&&a.setHours(a.getHours()+12)}}else{Gn.lastIndex=s;const r=Gn.exec(e);if(null==r)return n;switch(t[l]){case"H":a.setHours(parseInt(r[0])+12*o);break;case"M":a.setMinutes(r[0]);break;case"S":a.setSeconds(r[0]);break;case"d":a.setDate(r[0]);break;case"m":a.setMonth(r[0]-1);break;case"y":a.setFullYear(100*i+parseInt(r[0]));break;case"Y":a.setFullYear(r[0])}s+=r[0].length}l++}return isNaN(a.valueOf())?n:a}function Jn(e,t){return null==e||null==t?e:(t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t)}const{document:Kn}=ve;function Zn(e,t,n){const i=e.slice();return i[17]=t[n],i}function Xn(e,t,n){const i=e.slice();return i[20]=t[n],i}function ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ti(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p=e[0].items,h=[];for(let t=0;t<p.length;t+=1)h[t]=ii(Xn(e,p,t));const $=e=>he(h[e],1,1,(()=>{h[e]=null}));let g=e[0].list&&oi(e);return a=new e[5]({props:{outline:!0,$$slots:{default:[si]},$$scope:{ctx:e}}}),a.$on("click",e[9]),d=new e[5]({props:{disabled:e[2],class:"close",form:e[6],filled:!0,type:"submit",$$slots:{default:[li]},$$scope:{ctx:e}}}),{c(){t=L("form"),n=L("input"),o=D();for(let e=0;e<h.length;e+=1)h[e].c();r=D(),g&&g.c(),s=D(),l=L("div"),be(a.$$.fragment),c=D(),be(d.$$.fragment),M(n,"class",_(e[6])+" svelte-1phofh5"),M(n,"name","_id"),M(n,"type","hidden"),n.value=i=e[1]._id||"",M(t,"class","fTask svelte-1phofh5"),M(t,"id",e[6]),M(l,"class","form--buttons svelte-1phofh5")},m(i,p){C(i,t,p),S(t,n),S(t,o);for(let e=0;e<h.length;e+=1)h[e].m(t,null);S(t,r),g&&g.m(t,null),C(i,s,p),C(i,l,p),xe(a,l,null),S(l,c),xe(d,l,null),u=!0,m||(f=[T(t,"keydown",e[8]),T(t,"submit",z(e[10]))],m=!0)},p(e,o){if((!u||2&o&&i!==(i=e[1]._id||""))&&(n.value=i),75&o){let n;for(p=e[0].items,n=0;n<p.length;n+=1){const i=Xn(e,p,n);h[n]?(h[n].p(i,o),pe(h[n],1)):(h[n]=ii(i),h[n].c(),pe(h[n],1),h[n].m(t,r))}for(me(),n=p.length;n<h.length;n+=1)$(n);fe()}e[0].list?g?(g.p(e,o),1&o&&pe(g,1)):(g=oi(e),g.c(),pe(g,1),g.m(t,null)):g&&(me(),he(g,1,1,(()=>{g=null})),fe());const s={};8388608&o&&(s.$$scope={dirty:o,ctx:e}),a.$set(s);const l={};4&o&&(l.disabled=e[2]),8388608&o&&(l.$$scope={dirty:o,ctx:e}),d.$set(l)},i(e){if(!u){for(let e=0;e<p.length;e+=1)pe(h[e]);pe(g),pe(a.$$.fragment,e),pe(d.$$.fragment,e),u=!0}},o(e){h=h.filter(Boolean);for(let e=0;e<h.length;e+=1)he(h[e]);he(g),he(a.$$.fragment,e),he(d.$$.fragment,e),u=!1},d(e){e&&E(t),N(h,e),g&&g.d(),e&&E(s),e&&E(l),ke(a),ke(d),m=!1,b(f)}}}function ni(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n&&(i.item=e[20]),1&n&&(i.selection=e[20].selection),2&n&&(i.record=e[1]),8&n&&(i.disabled=e[3]),1&n&&(i.eventId=e[0].id),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ii(e){let t,n,i=di(!0,e[20]),o=i&&ni(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){1&n&&(i=di(!0,e[20])),i?o?(o.p(e,n),1&n&&pe(o,1)):(o=ni(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function oi(e){let t,n,i=e[0].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=ri(Zn(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(75&n){let s;for(i=e[0].list,s=0;s<i.length;s+=1){const r=Zn(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=ri(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function ri(e){let t,n,i,o;return t=new e[4]({props:{text:e[17].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};1&n&&(o.text=e[17].designation),t.$set(o);const r={};1&n&&(r.list=e[17]),1&n&&(r.eventId=e[0].id),1&n&&(r.schema=e[17].item),2&n&&(r.record=e[1]),8&n&&(r.disabled=e[3]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function si(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function li(e){let t;return{c(){t=q("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ai(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function ci(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ai,then:ti,catch:ei,value:16,blocks:[,,,]};return $e(e[7](),o),{c(){t=D(),n=L("section"),o.block.c(),Kn.title="Vorgaben",M(n,"class","sTask svelte-1phofh5")},m(e,r){C(e,t,r),C(e,n,r),o.block.m(n,o.anchor=null),o.mount=()=>n,o.anchor=null,i=!0},p(t,[n]){ge(o,e=t,n)},i(e){i||(pe(o.block),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}i=!1},d(e){e&&E(t),e&&E(n),o.block.d(),o.token=null,o=null}}}const di=(e,{type:t="",properties:n={}})=>!e||"list"!==t&&("time"===n.format&&(t="time"),!["date","datetime","time"].includes(t)&&(!n.readonly&&!n.hidden));function ui(e,i,r){let a,d,u;I(e,l,(e=>r(11,d=e))),I(e,o,(e=>r(12,u=e)));const{Divider:m,Button:f,FormField:p}=c,h=JSON.parse(t.getItem("Locale"));let{schema:$}=i,{record:g}=i,v="template-"+$.class+Math.floor(9e3*Math.random()+1e3).toString(),y=!1;const w=()=>window.history.back(),b=(e,t,n=!1)=>{const i=t.id,o=e.find((e=>e.name===i));let r=t.value;if(!n&&o&&o.properties?.multi&&(r=g[i]),r&&o&&o.type.startsWith("date"))try{return Yn(r,"%d.%m.%Y").toISOString()}catch{return new Date(r).toISOString()}if(o&&"boolean"===o.type&&(r=!!t.checked),o&&"number"===o.type){const e=Number("1.1").toLocaleString(h.id).substring(1,2);try{r=Number(r.replace(e,".")).toString()}catch{}}return r};return e.$$set=e=>{"schema"in e&&r(0,$=e.schema),"record"in e&&r(1,g=e.record)},e.$$.update=()=>{4&e.$$.dirty&&r(3,a=y)},[$,g,y,a,m,f,v,async()=>{const e=await n.getEvent($.id);if(e.trigger?.startOn&&!e.trigger?.startOn?.some((e=>"Manual"===e.type))&&r(2,y=!0),d.role?.length&&$.authorization?.length){const e=$.authorization.some((e=>u?.find((t=>t===e.role&&"edit"===e.activity))));r(2,y||=!e)}},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},w,async e=>{const t={};Array.from(document.querySelectorAll("form#"+v+" ."+v)).map((e=>{const n=e.id||e.name;if(n)if(n.includes(".")){const[i,o]=n.split("."),r=$.list.find((e=>e.name===i));t[n]=b(r.item,e)}else t[n]=b($.items,e)})),await n.saveTemplate($.class,t),s.success("Die Vorgaben wurden gespeichert.",2e3),w()}]}const{document:mi}=ve;function fi(e,t,n){const i=e.slice();return i[28]=t[n],i}function pi(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),2&n[0]&&(i.item=e[28]),2&n[0]&&(i.listName=e[1].name),8&n[0]&&(i.eventId=e[3]),1&n[0]&&(i.record=e[0]),16&n[0]&&(i.disabled=e[4]),32&n[0]&&(i.required=e[5]),256&n[0]&&(i.currency=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function hi(e){let t,n,i=di(e[7],e[28]),o=i&&pi(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){130&n[0]&&(i=di(e[7],e[28])),i?o?(o.p(e,n),130&n[0]&&pe(o,1)):(o=pi(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function $i(e){let t,n,i,o=e[1].item,r=[];for(let t=0;t<o.length;t+=1)r[t]=hi(fi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));return{c(){t=L("div");for(let e=0;e<r.length;e+=1)r[e].c();M(t,"id",n=`accordion-content-${e[2]}-${e[1].name}`)},m(e,n){C(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null);i=!0},p(e,l){if(82367&l[0]){let n;for(o=e[1].item,n=0;n<o.length;n+=1){const i=fi(e,o,n);r[n]?(r[n].p(i,l),pe(r[n],1)):(r[n]=hi(i),r[n].c(),pe(r[n],1),r[n].m(t,null))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}(!i||6&l[0]&&n!==(n=`accordion-content-${e[2]}-${e[1].name}`))&&M(t,"id",n)},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);i=!1},d(e){e&&E(t),N(r,e)}}}function gi(e){let t,n,i=e[13](e[9])+"";return{c(){t=L("span"),n=q(i)},m(e,i){C(e,t,i),S(t,n)},p(e,t){512&t[0]&&i!==(i=e[13](e[9])+"")&&B(n,i)},d(e){e&&E(t)}}}function vi(e){let t,n,i;return n=new e[10]({props:{$$slots:{default:[gi]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[15](e[27]))&&e[15](e[27]).apply(this,arguments)})),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","accordion svelte-148ktt9"),M(t,"slot","handle")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(t,i){e=t;const o={};512&i[0]|1&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function yi(e){let t,n;return t=new e[12]({props:{open:e[6],$$slots:{handle:[vi,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]],default:[$i,({toggle:e})=>({27:e}),({toggle:e})=>[e?134217728:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",e[17]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};64&n[0]&&(i.open=e[6]),134218687&n[0]|1&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function wi(e){let t,n,i;return n=new e[11]({props:{$$slots:{default:[yi]},$$scope:{ctx:e}}}),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","formList")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};1023&t[0]|1&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function bi(e,t,i){const{Button:o,Accordion:r,AccordionSection:s}=c;let{list:l}=t,{schema:a}=t,{record:d}=t,{classId:u}=t,{eventId:m}=t,{disabled:$}=t,{required:g}=t,{open:v=!1}=t,{template:y={}}=t,{isTemplate:w=!1}=t,{currency:b}=t,{update:x=!1}=t,k=new Map;const I={};let _=d[l.name]||{};d[l.name]=_;const S=e=>I[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "),C=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};return e.$$set=e=>{"list"in e&&i(1,l=e.list),"schema"in e&&i(18,a=e.schema),"record"in e&&i(0,d=e.record),"classId"in e&&i(2,u=e.classId),"eventId"in e&&i(3,m=e.eventId),"disabled"in e&&i(4,$=e.disabled),"required"in e&&i(5,g=e.required),"open"in e&&i(6,v=e.open),"template"in e&&i(19,y=e.template),"isTemplate"in e&&i(7,w=e.isTemplate),"currency"in e&&i(8,b=e.currency),"update"in e&&i(20,x=e.update)},e.$$.update=()=>{1048579&e.$$.dirty[0]&&x&&d&&i(9,_=d[l.name]||{})},[d,l,u,m,$,g,v,w,b,_,o,r,s,e=>a.filter((t=>void 0!==e[t.name]&&"textarea"!==t.properties?.format&&"html"!==t.properties?.format)).map((t=>"object"===t.type?S(t.name):"boolean"===t.type?h(e[t.name]):"date"===t.type?f(e[t.name]):"datetime"===t.type?p(e[t.name]):e[t.name])).filter((e=>!!e)).join(" • ")||"+",({detail:e})=>{const[t,n]=e.itemName.split(".");if(!n)return;e.desc&&(I[n]=e.desc);const o=d[t];i(0,d[t]={...o,[n]:e.value},d),i(9,_=d[t])},e=>t=>{(()=>{const e=y[l.name]||{};for(const t in e)y[l.name][t]&&!d[l.name][t]&&i(0,d[l.name][t]=y[l.name][t],d)})(),e(t);const n=`#accordion-content-${u}-${l.name} > div.form-field:last-child`,o=document.querySelector(n);ie().then((()=>{const e=`#accordion-content-${u}-${l.name} textarea`;Array.from(document.querySelectorAll(e)).forEach(C)})).then((()=>o.scrollIntoView({behavior:"smooth",block:"end"})))},async({detail:{className:e,itemName:t,value:i}})=>{if(k.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===className+"."+l.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&k.set(e,r[0])},()=>{setTimeout((()=>{Array.from(k).forEach((([e,t])=>{d[l.name][e]||i(0,d[l.name][e]=t._id,d)}))}),500)},a,y,x,function(t){Y(e,t)}]}class xi extends _e{constructor(e){var t;super(),mi.getElementById("svelte-148ktt9-style")||((t=L("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}}",S(mi.head,t)),Ie(this,e,bi,wi,k,{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:ki}=ve;function Ii(e){e[0]=e[23].list,e[22]=e[23].items}function _i(e,t,n){const i=e.slice();return i[24]=t[n],i}function Si(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ci(e,t,n){const i=e.slice();return i[27]=t[n],i}function Ei(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ni(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[19](t)}Ii(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Li]},$$scope:{ctx:e}}}),n.$on("click",e[18]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[22]?.length&&function(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=ji(Ci(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[22],r=0;r<i.length;r+=1){const s=Ci(e,i,r);o[r]?o[r].p(s,t):(o[r]=ji(s),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}(e),x=e[0]?.length&&function(e){let t,n=e[0],i=[];for(let t=0;t<n.length;t+=1)i[t]=Fi(_i(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11778&o[0]){let r;for(n=e[0],r=0;r<n.length;r+=1){const s=_i(e,n,r);i[r]?i[r].p(s,o):(i[r]=Fi(s),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ii(e);const i={};2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[22]?.length&&b.p(e,t),e[0]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Li(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ji(e){let t,n,i=e[27]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function qi(e){let t,n,i=e[22],o=[];for(let t=0;t<i.length;t+=1)o[t]=Di(Si(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),M(t,"class","pointer svelte-14hcfjl")},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[22],s=0;s<i.length;s+=1){const l=Si(e,i,s);o[s]?o[s].p(l,r):(o[s]=Di(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}function Di(e){let t,n,i,o,r=e[9](e[24],e[27])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[24]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function Fi(e){let t,n=e[13](e[24],e[22],e[1]),i=n&&qi(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[24],e[22],e[1])),n?i?i.p(e,o):(i=qi(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function Ti(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function zi(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Ti,then:Ni,catch:Ei,value:23,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function Ai(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[zi]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2&n[0]|2&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Mi(e,t,i){const o=Q(),{Dialog:r,Divider:s,Loading:l,TextField:a,Button:d}=c;let{item:u}=t,{className:m}=t,{classId:p}=t,{list:$}=t,g="",v=p+Math.floor(9e3*Math.random()+1e3).toString()+"search";const y=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},w=n.getSchemaByClass(m);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(v)?.focus()}),200)}));return e.$$set=e=>{"item"in e&&i(15,u=e.item),"className"in e&&i(16,m=e.className),"classId"in e&&i(17,p=e.classId),"list"in e&&i(0,$=e.list)},[$,g,o,r,s,l,a,d,v,y,e=>()=>o("choose",{row:e}),async()=>{const e=await w,t=e.display;let n=Dt(t,e,$);return{list:$,items:n}},({detail:{value:e}})=>{i(1,g=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(y(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{i(1,g="")},u,m,p,()=>o("back"),function(e){g=e,i(1,g)}]}class Bi extends _e{constructor(e){var t;super(),ki.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(ki.head,t)),Ie(this,e,Mi,Ai,k,{item:15,className:16,classId:17,list:0},[-1,-1])}}const{document:Oi}=ve;function Pi(e,t,n){const i=e.slice();return i[11]=t[n],i}function Vi(e,t,n){const i=e.slice();return i[3]=t[n],i}function Wi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ri(e){let t,n,i,o=e[7].items,r=[];for(let t=0;t<o.length;t+=1)r[t]=Yi(Vi(e,o,t));const s=e=>he(r[e],1,1,(()=>{r[e]=null}));let l=e[7].list&&Ji(e);return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=D(),l&&l.c(),n=F()},m(e,o){for(let t=0;t<r.length;t+=1)r[t].m(e,o);C(e,t,o),l&&l.m(e,o),C(e,n,o),i=!0},p(e,i){if(5161959&i[0]){let n;for(o=e[7].items,n=0;n<o.length;n+=1){const s=Vi(e,o,n);r[n]?(r[n].p(s,i),pe(r[n],1)):(r[n]=Yi(s),r[n].c(),pe(r[n],1),r[n].m(t.parentNode,t))}for(me(),n=o.length;n<r.length;n+=1)s(n);fe()}e[7].list?l?(l.p(e,i),128&i[0]&&pe(l,1)):(l=Ji(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe())},i(e){if(!i){for(let e=0;e<o.length;e+=1)pe(r[e]);pe(l),i=!0}},o(e){r=r.filter(Boolean);for(let e=0;e<r.length;e+=1)he(r[e]);he(l),i=!1},d(e){N(r,e),e&&E(t),l&&l.d(e),e&&E(n)}}}function Ui(e){let t,n,i,o;const r=[Gi,Hi],s=[];function l(e,t){return e[3].name!==e[14]||e[15]?"lookup"!==e[3].properties?.format?1:-1:0}return~(t=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function Hi(e){let t,n;return t=new pl({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};256&n[0]&&(i.classId=e[8]),128&n[0]&&(i.item=e[3]),64&n[0]&&(i.record=e[6]),129&n[0]&&(i.disabled=e[3].name===e[14]&&e[15]||e[0]),32&n[0]&&(i.eventId=e[5]),4&n[0]&&(i.currency=e[2]),512&n[0]&&(i.changeValue=e[9]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gi(e){let t,n,i,o;n=new pl({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 r=e[1]&&Qi(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),r&&r.c(),P(t,"padding-top",".25em"),P(t,"background-color","lightyellow"),P(t,"position","relative")},m(e,s){C(e,t,s),xe(n,t,null),S(t,i),r&&r.m(t,null),o=!0},p(e,i){const o={};256&i[0]&&(o.classId=e[8]),128&i[0]&&(o.item=e[3]),64&i[0]&&(o.record=e[6]),3&i[0]&&(o.disabled=e[0]||!!e[1]),32&i[0]&&(o.eventId=e[5]),4&i[0]&&(o.currency=e[2]),512&i[0]&&(o.changeValue=e[9]),n.$set(o),e[1]?r?(r.p(e,i),2&i[0]&&pe(r,1)):(r=Qi(e),r.c(),pe(r,1),r.m(t,null)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(n.$$.fragment,e),pe(r),o=!0)},o(e){he(n.$$.fragment,e),he(r),o=!1},d(e){e&&E(t),ke(n),r&&r.d()}}}function Qi(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-16mo2c")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[22]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Yi(e){let t,n,i="list"!==e[3].type&&Ui(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[3].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ui(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Ji(e){let t,n,i=e[7].list,o=[];for(let t=0;t<i.length;t+=1)o[t]=Zi(Pi(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(485&n[0]){let s;for(i=e[7].list,s=0;s<i.length;s+=1){const r=Pi(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Zi(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Ki(e){let t,n,i,o;return t=new e[12]({props:{text:e[11].designation}}),i=new xi({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(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};128&n[0]&&(o.text=e[11].designation),t.$set(o);const r={};256&n[0]&&(r.classId=e[8]),128&n[0]&&(r.list=e[11]),32&n[0]&&(r.eventId=e[5]),128&n[0]&&(r.schema=e[11].item),64&n[0]&&(r.record=e[6]),1&n[0]&&(r.disabled=e[0]),4&n[0]&&(r.currency=e[2]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Zi(e){let t,n,i="array"!==e[11].type&&Ki(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"array"!==e[11].type?i?(i.p(e,n),128&n[0]&&pe(i,1)):(i=Ki(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Xi(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function eo(e){let t,n;return t=new Bi({props:{item:e[3],className:e[4],classId:e[8],list:e[11]}}),t.$on("choose",e[20]),t.$on("back",e[21]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n[0]&&(i.item=e[3]),16&n[0]&&(i.className=e[4]),256&n[0]&&(i.classId=e[8]),2048&n[0]&&(i.list=e[11]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function to(e){let t,n,i=e[10]&&eo(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[10]?i?(i.p(e,n),1024&n[0]&&pe(i,1)):(i=eo(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function no(e){let t,n,i,o,r,s,l={ctx:e,current:null,token:null,hasCatch:!1,pending:Xi,then:Ri,catch:Wi,value:52,blocks:[,,,]};function a(t){e[28](t)}$e(e[16](),l),n=new e[12]({});let c={class:"tModal",noClickaway:!0,$$slots:{default:[to]},$$scope:{ctx:e}};return void 0!==e[10]&&(c.open=e[10]),o=new e[13]({props:c}),K.push((()=>we(o,"open",a))),{c(){l.block.c(),t=D(),be(n.$$.fragment),i=D(),be(o.$$.fragment)},m(e,r){l.block.m(e,l.anchor=r),l.mount=()=>t.parentNode,l.anchor=t,C(e,t,r),xe(n,e,r),C(e,i,r),xe(o,e,r),s=!0},p(t,n){ge(l,e=t,n);const i={};3352&n[0]|67108864&n[1]&&(i.$$scope={dirty:n,ctx:e}),!r&&1024&n[0]&&(r=!0,i.open=e[10],re((()=>r=!1))),o.$set(i)},i(e){s||(pe(l.block),pe(n.$$.fragment,e),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(n.$$.fragment,e),he(o.$$.fragment,e),s=!1},d(e){l.block.d(e),l.token=null,l=null,e&&E(t),ke(n,e),e&&E(i),ke(o,e)}}}function io(e,t,i){const{Divider:o,FormField:r,Modal:s}=c,l=Q();let a,d,u,m,f,{required:p}=t,{disabled:h}=t,{readonly:$}=t,{id:g}=t,{item:v}=t,{value:y}=t,{refValue:w}=t,{currency:b}=t,x={},k=[],I=[],_={},S=new Map,C=!1,E="";const N=v.checkOn,L=y,j=e=>{a.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");k.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))},q=()=>{a.items.filter((e=>e.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.lookup})})),a.items.filter((e=>e.properties?.lookup)).forEach((e=>{I.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}))},D=async e=>{const t=k.filter((t=>t.refObj===e));if(t?.length){i(9,_={});for(const e of t){const{itemName:t,refObj:n,refName:o,op:r}=e;let{action:s}=e;if(!n)break;let l,a,c=!o&&x[n];const u=x[n];u&&o&&(c=(await Pa(n,u))[o]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===r&&(c=!c),"required"!==s&&"readonly"!==s||(s="required"===s?s:"disabled",setTimeout((()=>{l=`#${d} .form-field.${t} .field textarea`,a=document.querySelector(l),a||(l=`#${d} .form-field.${t} .field input`,a=document.querySelector(l)),a&&c&&a.setAttribute(s,""),a&&!c&&a.removeAttribute(s)}),0)),"hidden"===s&&(l=`#${d} .form-field.${t}`,a=document.querySelector(l),a?.classList?.toggle("hidden",!!c),c&&i(9,_[t]="",_))}}};H((()=>{F()}));const F=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 k)e.add(t.refObj||u);Array.from(e).forEach((e=>D(e)))})(),T())},T=()=>{setTimeout((()=>{Array.from(S).forEach((([e,t])=>{x[e]||i(6,x[e]=t._id,x)}))}),250)},z=async e=>{if(!e.value)return void M();const t={[e.itemName]:{$regex:`(?i)${e.value}`}},o=await n.getSectionView(u,t);o?.length?(i(11,E=o),i(10,C=!0)):(i(1,y=""),i(23,w=""),l("setRefValue",w))},A=()=>{i(10,C=!1)},M=()=>{i(1,y=""),i(23,w=y),i(6,x={}),l("setRefValue",w)};return e.$$set=e=>{"required"in e&&i(24,p=e.required),"disabled"in e&&i(0,h=e.disabled),"readonly"in e&&i(25,$=e.readonly),"id"in e&&i(26,g=e.id),"item"in e&&i(3,v=e.item),"value"in e&&i(1,y=e.value),"refValue"in e&&i(23,w=e.refValue),"currency"in e&&i(2,b=e.currency)},e.$$.update=()=>{33554433&e.$$.dirty[0]&&i(0,h=h||$),134217840&e.$$.dirty[0]&&x&&l("safeReference",{record:x,class:u,event:m,taskId:f})},[h,y,b,v,u,m,x,a,d,_,C,E,o,s,N,L,async()=>{try{if(y){const e=await n.getTask(v.refClass,y);delete e._task,i(6,x=e),i(27,f=(await n.getTaskByDocId(e._id))._id)}else i(6,x={})}catch{}return i(7,a=await n.getSchemaByClass(v.refClass)),i(8,d="form-"+a.class+Math.floor(9e3*Math.random()+1e3).toString()),i(4,u=a.class),a.identity.designation,i(5,m=a.id),["readonly","hidden","required"].map(j),q(),!0},async({detail:e})=>{const{itemName:t,value:n}=e;if(i(6,x[t]=n,x),t===N)return z(e);D(t)},async({detail:e})=>{if(!(a.input?.length&&a.input.length>1))return;if(prevSchema?.class!==a.input[0])return;const{value:t,lookup:o,view:r}=e,[s]=o.split(":"),l=(await n.getSectionView(s,{[r]:{$in:t}})).map((e=>e._id));for(const e of a.input.slice(1)){i(6,x[e]=[],x);const t=await n.getSchemaByClass(e);t.id;let o=await n.getTasks(t.id);if(o=o.data.filter((e=>"Ready"===e._task?.status&&l.includes(e[s]))),o?.length){const t=o.map((e=>e._id)),r=await n.getSectionView(e,{_id:{$in:t}});for(const t of r)t[e]=t._id;i(6,x[e]=r,x)}}},async({detail:{className:e,itemName:t,value:i}})=>{if(S.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===u))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&S.set(e,r[0])},async({detail:e})=>{const t=await n.getSectionView(u,{_id:e.row._id});t?.length&&(i(1,y=t[0]._id),i(23,w=y),l("setRefValue",w),i(6,x=t[0])),A()},A,M,w,p,$,g,f,function(e){C=e,i(10,C)}]}class oo extends _e{constructor(e){var t;super(),Oi.getElementById("svelte-16mo2c-style")||((t=L("style")).id="svelte-16mo2c-style",t.textContent=".feather2.svelte-16mo2c{position:absolute;top:1em;right:0.5em;color:#4300b0}",S(Oi.head,t)),Ie(this,e,io,no,k,{required:24,disabled:0,readonly:25,id:26,item:3,value:1,refValue:23,currency:2},[-1,-1])}}function ro(e){let t,n=e[11]&&function(e){let t,n;return{c(){t=L("span"),n=q(e[4]),M(t,"class","item")},m(e,i){C(e,t,i),S(t,n)},p(e,t){16&t[0]&&B(n,e[4])},d(e){e&&E(t)}}}(e);return{c(){n&&n.c(),t=F()},m(e,i){n&&n.m(e,i),C(e,t,i)},p(e,t){e[11]&&n.p(e,t)},d(e){n&&n.d(e),e&&E(t)}}}function so(e){let t,n,i;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:[ro]},$$scope:{ctx:e}}}),n.$on("change",e[14]),n.$on("focus",e[15]),{c(){t=L("div"),be(n.$$.fragment),P(t,"position","relative"),P(t,"max-width","10em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};6&t[0]&&(i.inputClass="txt-right"+(e[1]?"":" "+e[2])),1&t[0]&&(i.id=e[0]),1&t[0]&&(i.name=e[0]),256&t[0]&&(i.value=e[8]),64&t[0]&&(i.pattern=e[6]),128&t[0]&&(i.readonly=e[7]),8&t[0]&&(i.disabled=e[3]),32&t[0]&&(i.required=e[5]),16&t[0]|2&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function lo(e,n,i){let o;const r=Q(),{TextField:s}=c;let{id:l}=n,{item:a}=n,{value:d}=n,{noForm:u=!1}=n,{classId:m}=n,{disabled:f}=n,{formnovalidate:p}=n,{currency:h}=n,{praefix:$}=n,{notifyList:g}=n;const v=JSON.parse(t.getItem("Locale")),y=["price","amount","amountValue","taxValue","__total"].find((e=>e===a.name?.split("-")[0])),w=Number("1.1").toLocaleString(v.id).substring(1,2),{properties:b={}}=a;let{min:x,max:k,step:I,pattern:_,decimals:S=0,unit:C="",placeholder:E,hint:N,readonly:L,negative:j,required:q=!1}=b;L=!0===L||void 0;_||(_=S?`[0-9]+([${w}][0-9]{1,${S}})?`:"[0-9]*"),j&&(_="-?"+_);return e.$$set=e=>{"id"in e&&i(0,l=e.id),"item"in e&&i(16,a=e.item),"value"in e&&i(17,d=e.value),"noForm"in e&&i(1,u=e.noForm),"classId"in e&&i(2,m=e.classId),"disabled"in e&&i(3,f=e.disabled),"formnovalidate"in e&&i(18,p=e.formnovalidate),"currency"in e&&i(4,h=e.currency),"praefix"in e&&i(19,$=e.praefix),"notifyList"in e&&i(20,g=e.notifyList)},e.$$.update=()=>{262176&e.$$.dirty[0]&&i(5,q=q&&!p),131072&e.$$.dirty[0]&&i(8,o=Number(d.toString().replace(w,".")).toFixed(S).toString().replace(".",w)),1048576&e.$$.dirty[0]&&(async()=>{if(void 0===$)return;const e=a.properties?.value?.formula;"$multiply"===e?.operator&&r("formula",{item:a})})()},[l,u,m,f,h,q,_,L,o,s,v,y,I,E,({detail:e})=>r("blur",{value:e.value}),({detail:e})=>{L||Number(d.toString().replace(w,"."))||i(8,o="")},a,d,p,$,g]}class ao extends _e{constructor(e){super(),Ie(this,e,lo,so,k,{id:0,item:16,value:17,noForm:1,classId:2,disabled:3,formnovalidate:18,currency:4,praefix:19,notifyList:20},[-1,-1])}}const{document:co}=ve;function uo(e){e[33]=e[35].list,e[34]=e[35].items}function mo(e,t,n){const i=e.slice();return i[36]=t[n],i[38]=n,i}function fo(e,t,n){const i=e.slice();return i[39]=t[n],i[41]=n,i}function po(e,t,n){const i=e.slice();return i[39]=t[n],i}function ho(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function $o(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v,y;uo(e),n=new e[8]({props:{outline:!0,$$slots:{default:[go]},$$scope:{ctx:e}}}),n.$on("click",e[30]);let w=!e[1]&&vo(e);function b(t){e[31](t)}let x={id:e[11]};void 0!==e[2]&&(x.value=e[2]),l=new e[6]({props:x}),K.push((()=>we(l,"value",b))),l.$on("input",e[14]),u=new We({props:{size:"18"}});let k=e[34]?.length&&function(e){let t,n,i,o,r=!e[1]&&wo(e),s=e[34],l=[];for(let t=0;t<s.length;t+=1)l[t]=bo(po(e,s,t));return{c(){t=L("thead"),n=L("tr"),r&&r.c(),i=D();for(let e=0;e<l.length;e+=1)l[e].c();M(n,"class","svelte-1m010ne"),M(t,"class","svelte-1m010ne")},m(e,s){C(e,t,s),S(t,n),r&&r.m(n,null),S(n,i);for(let e=0;e<l.length;e+=1)l[e].m(n,null);o=!0},p(e,t){if(e[1]?r&&(me(),he(r,1,1,(()=>{r=null})),fe()):r?(r.p(e,t),2&t[0]&&pe(r,1)):(r=wo(e),r.c(),pe(r,1),r.m(n,i)),8192&t[0]){let i;for(s=e[34],i=0;i<s.length;i+=1){const o=po(e,s,i);l[i]?l[i].p(o,t):(l[i]=bo(o),l[i].c(),l[i].m(n,null))}for(;i<l.length;i+=1)l[i].d(1);l.length=s.length}},i(e){o||(pe(r),o=!0)},o(e){he(r),o=!1},d(e){e&&E(t),r&&r.d(),N(l,e)}}}(e),I=e[33]?.length&&function(e){let t,n,i=e[33],o=[];for(let t=0;t<i.length;t+=1)o[t]=So(mo(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(569359&n[0]){let s;for(i=e[33],s=0;s<i.length;s+=1){const r=mo(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=So(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),w&&w.c(),o=D(),r=L("div"),s=q("Suchen: "),be(l.$$.fragment),c=D(),d=L("span"),be(u.$$.fragment),m=D(),f=L("div"),p=L("table"),k&&k.c(),h=D(),$=L("tbody"),I&&I.c(),M(t,"class","form--buttons svelte-1m010ne"),M(d,"class","feather pointer svelte-1m010ne"),P(r,"margin-bottom","1em"),P(r,"position","relative"),M(p,"striped",""),M(p,"class","svelte-1m010ne"),M(f,"class","eList svelte-1m010ne")},m(a,b){C(a,t,b),xe(n,t,null),S(t,i),w&&w.m(t,null),C(a,o,b),C(a,r,b),S(r,s),xe(l,r,null),S(r,c),S(r,d),xe(u,d,null),C(a,m,b),C(a,f,b),S(f,p),k&&k.m(p,null),S(p,h),S(p,$),I&&I.m($,null),g=!0,v||(y=T(d,"click",e[16]),v=!0)},p(e,i){uo(e);const o={};8192&i[1]&&(o.$$scope={dirty:i,ctx:e}),n.$set(o),e[1]?w&&(me(),he(w,1,1,(()=>{w=null})),fe()):w?(w.p(e,i),2&i[0]&&pe(w,1)):(w=vo(e),w.c(),pe(w,1),w.m(t,null));const r={};!a&&4&i[0]&&(a=!0,r.value=e[2],re((()=>a=!1))),l.$set(r),e[34]?.length&&k.p(e,i),e[33]?.length&&I.p(e,i)},i(e){g||(pe(n.$$.fragment,e),pe(w),pe(l.$$.fragment,e),pe(u.$$.fragment,e),pe(k),pe(I),g=!0)},o(e){he(n.$$.fragment,e),he(w),he(l.$$.fragment,e),he(u.$$.fragment,e),he(k),he(I),g=!1},d(e){e&&E(t),ke(n),w&&w.d(),e&&E(o),e&&E(r),ke(l),ke(u),e&&E(m),e&&E(f),k&&k.d(),I&&I.d(),v=!1,y()}}}function go(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function vo(e){let t,n;return t=new e[8]({props:{disabled:!e[33].length,filled:!0,$$slots:{default:[yo]},$$scope:{ctx:e}}}),t.$on("click",e[17](e[33])),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function yo(e){let t;return{c(){t=q("Bestätigen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wo(e){let t,n,i,o,r;return n=new Fe({props:{size:"20"}}),{c(){t=L("th"),be(n.$$.fragment),M(t,"class","svelte-1m010ne")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[18](e[33])),o=!0)},p(t,n){e=t},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function bo(e){let t,n,i=e[39]+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function xo(e){let t,n,i,o,r,s,l,a=e[0],c=Io(e),d=e[34],u=[];for(let t=0;t<d.length;t+=1)u[t]=_o(fo(e,d,t));return{c(){t=L("tr"),c.c(),n=D();for(let e=0;e<u.length;e+=1)u[e].c();i=D(),M(t,"style",o=e[1]?"cursor: default;":"cursor: zoom-in;"),M(t,"title","übernimmt den Wert direkt"),M(t,"class","svelte-1m010ne"),V(t,"active",e[0].includes(e[36]))},m(o,a){C(o,t,a),c.m(t,null),S(t,n);for(let e=0;e<u.length;e+=1)u[e].m(t,null);S(t,i),r=!0,s||(l=T(t,"click",e[19](e[36])),s=!0)},p(s,l){if(e=s,1&l[0]&&k(a,a=e[0])?(me(),he(c,1,1,v),fe(),c=Io(e),c.c(),pe(c),c.m(t,n)):c.p(e,l),8200&l[0]){let n;for(d=e[34],n=0;n<d.length;n+=1){const o=fo(e,d,n);u[n]?u[n].p(o,l):(u[n]=_o(o),u[n].c(),u[n].m(t,i))}for(;n<u.length;n+=1)u[n].d(1);u.length=d.length}(!r||2&l[0]&&o!==(o=e[1]?"cursor: default;":"cursor: zoom-in;"))&&M(t,"style",o),8193&l[0]&&V(t,"active",e[0].includes(e[36]))},i(e){r||(pe(c),r=!0)},o(e){he(c),r=!1},d(e){e&&E(t),c.d(e),N(u,e),s=!1,l()}}}function ko(e){let t,n,i;return n=new e[10]({props:{name:e[12],data:e[38],checked:e[0].includes(e[36]),round:!0}}),{c(){t=L("td"),be(n.$$.fragment),M(t,"title","Wählt den Wert aus"),M(t,"class","svelte-1m010ne")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,t){const i={};1&t[0]&&(i.checked=e[0].includes(e[36])),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Io(e){let t,n,i=!e[1]&&ko(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){e[1]?i&&(me(),he(i,1,1,(()=>{i=null})),fe()):i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=ko(e),i.c(),pe(i,1),i.m(t.parentNode,t))},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function _o(e){let t,n,i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"";return{c(){t=L("td"),n=q(i),M(t,"class","svelte-1m010ne")},m(e,i){C(e,t,i),S(t,n)},p(e,t){8&t[0]&&i!==(i=(e[3][e[38]]?e[3][e[38]][e[41]]:e[36])+"")&&B(n,i)},d(e){e&&E(t)}}}function So(e){let t,n,i=e[15](e[36],e[2]),o=i&&xo(e);return{c(){o&&o.c(),t=F()},m(e,i){o&&o.m(e,i),C(e,t,i),n=!0},p(e,n){4&n[0]&&(i=e[15](e[36],e[2])),i?o?(o.p(e,n),4&n[0]&&pe(o,1)):(o=xo(e),o.c(),pe(o,1),o.m(t.parentNode,t)):o&&(me(),he(o,1,1,(()=>{o=null})),fe())},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){o&&o.d(e),e&&E(t)}}}function Co(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Eo(e){let t,n,i,o;t=new e[9]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:Co,then:$o,catch:ho,value:35,blocks:[,,,]};return $e(e[13](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function No(e){let t,n;return t=new e[7]({props:{title:"Auswahl",class:"eList",$$slots:{default:[Eo]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};15&n[0]|8192&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lo(e,t,i){const o=Q(),{Loading:r,TextField:s,Dialog:l,Button:a,Divider:d,Checkbox:u}=c;let{classId:m}=t,{id:f}=t,{selection:p}=t,{refDoc:h}=t,{tableName:$}=t,{idName:g}=t,{target:v}=t,{view:y}=t,{unique:w}=t,{uniqueView:b}=t,{status:x}=t,{single:k}=t;p||=[];let I="",_=m+Math.floor(9e3*Math.random()+1e3).toString()+"search",S=[];const C=$+g+v+"checkbox",E=(e,t)=>e>t?1:t>e?-1:0;return e.$$set=e=>{"classId"in e&&i(21,m=e.classId),"id"in e&&i(22,f=e.id),"selection"in e&&i(0,p=e.selection),"refDoc"in e&&i(23,h=e.refDoc),"tableName"in e&&i(24,$=e.tableName),"idName"in e&&i(25,g=e.idName),"target"in e&&i(20,v=e.target),"view"in e&&i(26,y=e.view),"unique"in e&&i(27,w=e.unique),"uniqueView"in e&&i(28,b=e.uniqueView),"status"in e&&i(29,x=e.status),"single"in e&&i(1,k=e.single)},[p,k,I,S,o,r,s,l,a,d,u,_,C,async()=>{let e=[],t=[],o={};if(i(3,S=[]),g)if(y){if(f){const t=m.split("-")[1].slice(0,-4),i="input."+m+"[name='_id']",r=document.querySelector(i).value;o={[g]:f},x&&(o.$or=[{status:!0},{[t]:r}]),e=await n.getSectionView($,o),e=e.sort(((e,n)=>{const i=e=>(e[t]||"z").toString()+e[v];return E(i(e),i(n))}))}}else b?f&&(o={[g]:f,status:!0},Object.entries(b).map((([e,n])=>{n?.length&&(o[e]={$in:n}),t.push(e)})),e=await n.getSectionView($,o),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})),i(3,S=e.map((e=>{const n=[e[v]];return t.map((t=>n.push(e[t]))),n})))):w?(e=await n.getSection($,g,f,w),e=e.sort(((e,t)=>E(e,t)))):(e=await n.getSection($,g,f,!1,x),e=e.sort(((e,t)=>{const n=e=>(p.includes(e[v])?"0-":"1-")+e[v];return E(n(e),n(t))})));else o={},f&&!Array.isArray(f)&&(o._id=f),e=await n.getSectionView($,o);const r=await n.getSchemaByClass($),s=[];if(h){const t=r.items[0].name,n=r.items[1].name,o=r.list[0].name,s=e.find((e=>e[t]===h));e=s?s[o]:[],i(20,v=n)}e.map((e=>{let t=e[v];if(t||$!==v||(i(20,v=r.items[0].name),t=e[v]),Array.isArray(t))for(const e of t){let t=e;"string"!=typeof e&&(t=Array.from(Object.values(e)).filter((e=>!!e&&24!==e?.length)).join(", ")),s.push(t||[])}else s.push(t||[])}));const l=r.items.find((e=>e.name===v))?.designation;return t=t.map((e=>r.items.find((t=>t.name===e))?.designation)),{list:s.flat(),items:[l,...t]}},({detail:{value:e}})=>{i(2,I=e)},(e,t)=>!t||!!e.toLowerCase().includes(t.toLowerCase()),()=>{i(2,I="")},e=>()=>{const t=document.getElementsByName(C),n=[];t.forEach(((t,i)=>{t.checked&&n.push(e[+t.attributes.data.value])})),o("choose",{list:n})},e=>()=>{document.getElementsByName(C).forEach(((e,t)=>{e.checked=!e.checked}))},e=>t=>{"TD"===t.target?.nodeName&&(k?o("choose",{list:[].concat(e)}):(i(0,p=p.includes(e)?p.filter((t=>t!==e)):p.concat(e)),o("choose",{list:p})))},v,m,f,h,$,g,y,w,b,x,()=>o("back"),function(e){I=e,i(2,I)}]}class jo extends _e{constructor(e){var t;super(),co.getElementById("svelte-1m010ne-style")||((t=L("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}",S(co.head,t)),Ie(this,e,Lo,No,k,{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:qo}=ve;function Do(e){let t,n,i,o,r,s=e[7].length+"";return{c(){t=L("span"),n=q("("),i=q(s),o=q(")"),M(t,"class",r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")},m(e,r){C(e,t,r),S(t,n),S(t,i),S(t,o)},p(e,n){128&n[0]&&s!==(s=e[7].length+"")&&B(i,s),2&n[0]&&r!==(r=_(e[1]?"showNumber disabled":"showNumber")+" svelte-1rbaejz")&&M(t,"class",r)},d(e){e&&E(t)}}}function Fo(e){let t;return{c(){t=L("div"),M(t,"class","load-more-options"),M(t,"slot","load-more-options-message")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function To(e){let t,n,i,o;const r=[Mo,Ao,zo],s=[];function l(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=l(e))&&(n=s[t]=r[t](e)),{c(){n&&n.c(),i=F()},m(e,n){~t&&s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?~t&&s[t].p(e,o):(n&&(me(),he(s[a],1,1,(()=>{s[a]=null})),fe()),~t?(n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i)):n=null)},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){~t&&s[t].d(e),e&&E(i)}}}function zo(e){let t,n,i,o,r;return n=new je({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title","Übernehmen"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[26]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Ao(e){let t,n,i,o,r;return n=new Ae({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title",e[17].title||"Generieren"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[25]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Mo(e){let t,n,i,o,r;return n=new We({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"title","Löschen"),M(t,"class","feather pointer svelte-1rbaejz")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[27]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Bo(e){let t,n,i;function o(t){e[37](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[Oo]},$$scope:{ctx:e}};return void 0!==e[10]&&(r.open=e[10]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};53&i[0]|32768&i[1]&&(o.$$scope={dirty:i,ctx:e}),!n&&1024&i[0]&&(n=!0,o.open=e[10],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Oo(e){let t,n;return t=new jo({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4&n[0]&&(i.classId=e[2]),1&n[0]&&(i.selection=e[0]),16&n[0]&&(i.unique=e[16].unique&&e[4].name),32&n[0]&&(i.uniqueView=e[16].view&&{[e[16].view]:e[5][e[16].view]}),32&n[0]&&(i.id=e[5][e[21]||e[20]]),16&n[0]&&(i.target=e[4].name),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Po(e){let t,n,i,o,r,s,l,a,c,d=!e[16].single&&e[7]?.length&&Do(e);function u(t){e[35](t)}function m(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:Vo,minSearchLength:"3",$$slots:{"load-more-options-message":[Fo]},$$scope:{ctx:e}};void 0!==e[7]&&(f.selection=e[7]),void 0!==e[9]&&(f.maxOptions=e[9]),i=new e[12]({props:f}),K.push((()=>we(i,"selection",u))),K.push((()=>we(i,"maxOptions",m))),i.$on("change",e[22]);let p=!e[1]&&To(e),h=e[10]&&Bo(e);return{c(){t=L("div"),d&&d.c(),n=D(),be(i.$$.fragment),s=D(),p&&p.c(),l=D(),h&&h.c(),a=F(),P(t,"position","relative")},m(e,o){C(e,t,o),d&&d.m(t,null),S(t,n),xe(i,t,null),S(t,s),p&&p.m(t,null),C(e,l,o),h&&h.m(e,o),C(e,a,o),c=!0},p(e,s){!e[16].single&&e[7]?.length?d?d.p(e,s):(d=Do(e),d.c(),d.m(t,n)):d&&(d.d(1),d=null);const l={};8&s[0]&&(l.id=e[3]),8&s[0]&&(l.name=e[3]),8&s[0]&&(l.class=e[3]),2&s[0]&&(l.disabled=e[1]),64&s[0]&&(l.required=e[6]),256&s[0]&&(l.placeholder=e[8]),32768&s[1]&&(l.$$scope={dirty:s,ctx:e}),!o&&128&s[0]&&(o=!0,l.selection=e[7],re((()=>o=!1))),!r&&512&s[0]&&(r=!0,l.maxOptions=e[9],re((()=>r=!1))),i.$set(l),e[1]?p&&(me(),he(p,1,1,(()=>{p=null})),fe()):p?(p.p(e,s),2&s[0]&&pe(p,1)):(p=To(e),p.c(),pe(p,1),p.m(t,null)),e[10]?h?(h.p(e,s),1024&s[0]&&pe(h,1)):(h=Bo(e),h.c(),pe(h,1),h.m(a.parentNode,a)):h&&(me(),he(h,1,1,(()=>{h=null})),fe())},i(e){c||(pe(i.$$.fragment,e),pe(p),pe(h),c=!0)},o(e){he(i.$$.fragment,e),he(p),he(h),c=!1},d(e){e&&E(t),d&&d.d(),ke(i),p&&p.d(),e&&E(l),h&&h.d(e),e&&E(a)}}}async function*Vo(e){yield[{name:e}]}function Wo(e,t,i){const o=Q(),{Modal:r,Autocomplete:s}=c;let{classId:l}=t,{id:a}=t,{item:d}=t,{record:u}=t,{value:m}=t,{noForm:f=!1}=t,{disabled:p}=t,{formnovalidate:h}=t,{numberInput:$}=t,{praefix:g}=t,{toDelete:v}=t,{reqQuantity:y}=t,{notifyList:w}=t;const{properties:b={}}=d;let{placeholder:x,hint:k,readonly:I,required:_=!1,lookup:S="",view:C=!1,multi:E,max:N=1e3,generate:L=!1,status:j=!0,refDoc:q}=b;const[D,F]=S.split(":");let T=!1,z=m.map&&m.map((e=>({name:e})))||[];p||=I,p&&(x="");const A=({detail:e})=>{let t=[];e.value.map((e=>{const n=e.name?.split(",");t=t.concat(n)})),i(7,z=t.map((e=>({name:e.trim()})))),o("blur",{value:z.map((e=>e.name))}),o("multi",{view:E.view,lookup:S,value:z.map((e=>e.name))})};H((async()=>{const e=document.getElementById(a);e.classList.add(l),!I&&S&&e.addEventListener("focus",M)}));const M=()=>{if(S){document.getElementById(a).blur();const e=y||N;(E.unique||z.length<e)&&i(10,T=!0)}},B=()=>{i(10,T&&=!1)},O=({detail:e})=>{i(7,z=e.list.map((e=>({name:e})))),o("blur",{value:e.list}),o("multi",{view:E.view,lookup:S,name:d.name,value:e.list}),B()},P=async()=>{const e={[F]:u[F]},t=await n.getSectionView(D,e),i=Array.from({length:t.length},((e,n)=>t[n][d.name]));O({detail:{list:i}})},V=(e=!1)=>{if(p||!E.required)return;const t=E.maxItem;if(!t||E.unique)return;i(9,N=!1!==e?e:y||u[t]||0);const n=z?.length!=N,r=document.getElementById(a);r?.classList?.toggle("invalid",n),o("invalid",{idx:g,value:n})};return e.$$set=e=>{"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"item"in e&&i(4,d=e.item),"record"in e&&i(5,u=e.record),"value"in e&&i(0,m=e.value),"noForm"in e&&i(28,f=e.noForm),"disabled"in e&&i(1,p=e.disabled),"formnovalidate"in e&&i(29,h=e.formnovalidate),"numberInput"in e&&i(30,$=e.numberInput),"praefix"in e&&i(31,g=e.praefix),"toDelete"in e&&i(32,v=e.toDelete),"reqQuantity"in e&&i(33,y=e.reqQuantity),"notifyList"in e&&i(34,w=e.notifyList)},e.$$.update=()=>{48&e.$$.dirty[0]&&u&&""===u[d.name]&&i(7,z=[]),48&e.$$.dirty[0]&&u&&Array.isArray(u[d.name])&&i(7,z=u[d.name].map((e=>({name:e})))),16&e.$$.dirty[0]|2&e.$$.dirty[1]&&v&&v===d.name&&i(7,z=[]),128&e.$$.dirty[0]&&z&&(i(0,m=z.map&&z.map((e=>e.name))||[]),V()),1073741824&e.$$.dirty[0]&&((e={})=>{const{item:t,value:n,idx:i}=e;void 0!==g&&g!==i||t&&t.name===E.maxItem&&V(n)})($),536870976&e.$$.dirty[0]&&i(6,_=_&&!h),8&e.$$.dirty[1]&&(async e=>{if(void 0===g)return;const{itemName:t,value:r}=e||{};if(!r)return;if(d.refItem?.split(".")[0]!==t)return;let[s,l]=d.refItem.split(".");if(Array.isArray(r)){if(s=s.slice(0,-1),!r.length)return o("record",{itemName:"quantity",value:0}),void i(7,z=[]);const e={_id:{$in:r}},t=await n.getSectionView(s,e);let a=[];for(const e of t)e[l]&&(a=a.concat(e[l][0][d.name]));if(!a.length)return;o("record",{itemName:"quantity",value:a.length}),i(7,z=a.map((e=>({name:e})))),A({detail:{value:z}})}else{const e=await n.getTask(s,r);if(!e||!e[l])return;const t=e[l];if(!Array.isArray(t)&&!t.length)return;const a=t[g][d.name];o("record",{itemName:"quantity",value:a?.length||0}),i(7,z=a&&a.map((e=>({name:e}))))}setTimeout(V,250)})(w)},[m,p,l,a,d,u,_,z,x,N,T,r,s,I,S,C,E,L,j,q,D,F,A,B,O,()=>{const e=u[L.itemQuantity]||y;if(!e)return;const t=L.prefix||"",n=u[L.variable]||"",i=L.len||5,o=Array.from({length:e},((e,o)=>t+n+"-"+o.toString().padStart(i,"0")));O({detail:{list:o}})},async()=>{if(!0===C)return P();const e=y||u[E.maxItem];if(!e)return;let t={};F&&(t={[F]:u[F]}),j&&(t.status=!0);const i=[].concat(u[E.view]||[]);i.length&&(t[E.view]={$in:i});const o=await n.getSectionView(D,t),r=Array.from({length:e<o.length?e:o.length},((e,t)=>o[t][d.name]));O({detail:{list:r}})},()=>{O({detail:{list:[]}})},f,h,$,g,v,y,w,function(e){z=e,i(7,z),i(5,u),i(4,d),i(32,v)},function(e){N=e,i(9,N)},function(e){T=e,i(10,T)}]}class Ro extends _e{constructor(e){var t;super(),qo.getElementById("svelte-1rbaejz-style")||((t=L("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}",S(qo.head,t)),Ie(this,e,Wo,Po,k,{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:Uo}=ve;function Ho(e){e[26]=e[28].list,e[27]=e[28].items}function Go(e,t,n){const i=e.slice();return i[29]=t[n],i}function Qo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Yo(e,t,n){const i=e.slice();return i[32]=t[n],i}function Jo(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ko(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g,v;function y(t){e[23](t)}Ho(e),n=new e[7]({props:{outline:!0,$$slots:{default:[Zo]},$$scope:{ctx:e}}}),n.$on("click",e[22]);let w={id:e[8]};void 0!==e[1]&&(w.value=e[1]),s=new e[6]({props:w}),K.push((()=>we(s,"value",y))),s.$on("input",e[12]),d=new We({props:{size:"18"}});let b=e[27]?.length&&function(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=Xo(Yo(e,i,t));return{c(){t=L("thead"),n=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();M(n,"class","svelte-14hcfjl"),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,t){if(2048&t[0]){let r;for(i=e[27],r=0;r<i.length;r+=1){const s=Yo(e,i,r);o[r]?o[r].p(s,t):(o[r]=Xo(s),o[r].c(),o[r].m(n,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},d(e){e&&E(t),N(o,e)}}}(e),x=e[26]?.length&&function(e){let t,n=e[26],i=[];for(let t=0;t<n.length;t+=1)i[t]=nr(Go(e,n,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=F()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);C(e,t,n)},p(e,o){if(11779&o[0]){let r;for(n=e[26],r=0;r<n.length;r+=1){const s=Go(e,n,r);i[r]?i[r].p(s,o):(i[r]=nr(s),i[r].c(),i[r].m(t.parentNode,t))}for(;r<i.length;r+=1)i[r].d(1);i.length=n.length}},d(e){N(i,e),e&&E(t)}}}(e);return{c(){t=L("div"),be(n.$$.fragment),i=D(),o=L("div"),r=q("Suchen: "),be(s.$$.fragment),a=D(),c=L("span"),be(d.$$.fragment),u=D(),m=L("div"),f=L("table"),b&&b.c(),p=D(),h=L("tbody"),x&&x.c(),M(t,"class","form--buttons svelte-14hcfjl"),M(c,"class","feather pointer svelte-14hcfjl"),P(o,"margin-bottom","1em"),P(o,"position","relative"),M(f,"striped",""),M(f,"class","svelte-14hcfjl"),M(m,"class","eList svelte-14hcfjl")},m(l,y){C(l,t,y),xe(n,t,null),C(l,i,y),C(l,o,y),S(o,r),xe(s,o,null),S(o,a),S(o,c),xe(d,c,null),C(l,u,y),C(l,m,y),S(m,f),b&&b.m(f,null),S(f,p),S(f,h),x&&x.m(h,null),$=!0,g||(v=T(c,"click",e[14]),g=!0)},p(e,t){Ho(e);const i={};64&t[1]&&(i.$$scope={dirty:t,ctx:e}),n.$set(i);const o={};!l&&2&t[0]&&(l=!0,o.value=e[1],re((()=>l=!1))),s.$set(o),e[27]?.length&&b.p(e,t),e[26]?.length&&x.p(e,t)},i(e){$||(pe(n.$$.fragment,e),pe(s.$$.fragment,e),pe(d.$$.fragment,e),$=!0)},o(e){he(n.$$.fragment,e),he(s.$$.fragment,e),he(d.$$.fragment,e),$=!1},d(e){e&&E(t),ke(n),e&&E(i),e&&E(o),ke(s),ke(d),e&&E(u),e&&E(m),b&&b.d(),x&&x.d(),g=!1,v()}}}function Zo(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Xo(e){let t,n,i=e[32]?.designation+"";return{c(){t=L("th"),n=q(i),M(t,"class","svelte-14hcfjl")},m(e,i){C(e,t,i),S(t,n)},p:v,d(e){e&&E(t)}}}function er(e){let t,n,i=e[27],o=[];for(let t=0;t<i.length;t+=1)o[t]=tr(Qo(e,i,t));return{c(){t=L("tr");for(let e=0;e<o.length;e+=1)o[e].c();n=D(),M(t,"class","pointer svelte-14hcfjl"),V(t,"active",e[29]._id===e[0])},m(e,i){C(e,t,i);for(let e=0;e<o.length;e+=1)o[e].m(t,null);S(t,n)},p(e,r){if(3584&r[0]){let s;for(i=e[27],s=0;s<i.length;s+=1){const l=Qo(e,i,s);o[s]?o[s].p(l,r):(o[s]=tr(l),o[s].c(),o[s].m(t,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}2049&r[0]&&V(t,"active",e[29]._id===e[0])},d(e){e&&E(t),N(o,e)}}}function tr(e){let t,n,i,o,r=e[9](e[29],e[32])+"";return{c(){t=L("td"),n=q(r),M(t,"class","svelte-14hcfjl")},m(r,s){C(r,t,s),S(t,n),i||(o=T(t,"click",A(e[10](e[29]))),i=!0)},p(t,n){e=t},d(e){e&&E(t),i=!1,o()}}}function nr(e){let t,n=e[13](e[29],e[27],e[1]),i=n&&er(e);return{c(){i&&i.c(),t=F()},m(e,n){i&&i.m(e,n),C(e,t,n)},p(e,o){2&o[0]&&(n=e[13](e[29],e[27],e[1])),n?i?i.p(e,o):(i=er(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&E(t)}}}function ir(e){let t,n;return t=new e[5]({}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p:v,i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function or(e){let t,n,i,o;t=new e[4]({});let r={ctx:e,current:null,token:null,hasCatch:!1,pending:ir,then:Ko,catch:Jo,value:28,blocks:[,,,]};return $e(e[11](),r),{c(){be(t.$$.fragment),n=D(),i=F(),r.block.c()},m(e,s){xe(t,e,s),C(e,n,s),C(e,i,s),r.block.m(e,r.anchor=s),r.mount=()=>i.parentNode,r.anchor=i,o=!0},p(t,n){ge(r,e=t,n)},i(e){o||(pe(t.$$.fragment,e),pe(r.block),o=!0)},o(e){he(t.$$.fragment,e);for(let e=0;e<3;e+=1){he(r.blocks[e])}o=!1},d(e){ke(t,e),e&&E(n),e&&E(i),r.block.d(e),r.token=null,r=null}}}function rr(e){let t,n;return t=new e[3]({props:{title:"Auswahl",class:"eList",$$slots:{default:[or]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3&n[0]|64&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sr(e,t,o){const r=Q(),{Dialog:s,Divider:l,Loading:a,TextField:d,Button:u}=c;let{item:m}=t,{className:p}=t,{classId:$}=t,{rowId:g}=t,{viewName:v}=t,{viewValue:y}=t,{recordId:w}=t,{filter:b}=t,x="",k=$+Math.floor(9e3*Math.random()+1e3).toString()+"search";const I=(e,t)=>{if(!t)return;const n=e[t.name];return"boolean"==typeof n?h(n):f(e[`_${t.name}`]||e[t.name]||"")},_=n.getSchemaByClass(p);H((()=>{window.setTimeout((()=>{const e=document.querySelector("tr.active");e?e.scrollIntoView({block:"end",behavior:"smooth"}):document.getElementById(k)?.focus()}),200)})),i.subscribe((async e=>{if(!e)return;const t=await _;e.eventId===t.id&&Va(t.class,e.eventId)}));return e.$$set=e=>{"item"in e&&o(15,m=e.item),"className"in e&&o(16,p=e.className),"classId"in e&&o(17,$=e.classId),"rowId"in e&&o(0,g=e.rowId),"viewName"in e&&o(18,v=e.viewName),"viewValue"in e&&o(19,y=e.viewValue),"recordId"in e&&o(20,w=e.recordId),"filter"in e&&o(21,b=e.filter)},[g,x,r,s,l,a,d,u,k,I,e=>()=>r("choose",{row:e}),async()=>{const e=await _,t="."+$+"#"+v;document.querySelector(t);let i={[v]:y},o=[];i[v]&&(o=await n.getSectionView(e.class,i,!0)),b&&(o=o.filter((e=>e._id!=b)));const r=e.display;return{list:o,items:Dt(r,e,o)}},({detail:{value:e}})=>{o(1,x=e)},(e,t,n)=>{if(!n)return!0;for(const i of t)if(I(e,i)?.toLowerCase()?.includes(n.toLowerCase()))return!0;return!1},()=>{o(1,x="")},m,p,$,v,y,w,b,()=>r("back"),function(e){x=e,o(1,x)}]}class lr extends _e{constructor(e){var t;super(),Uo.getElementById("svelte-14hcfjl-style")||((t=L("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}",S(Uo.head,t)),Ie(this,e,sr,rr,k,{item:15,className:16,classId:17,rowId:0,viewName:18,viewValue:19,recordId:20,filter:21},[-1,-1])}}function ar(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function cr(e){let t,n,i,o,r;function s(t){e[21](t)}let l={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]&&(l.value=e[0]),n=new e[10]({props:l}),K.push((()=>we(n,"value",s)));let a=!e[6]&&dr(e);return{c(){t=L("div"),be(n.$$.fragment),o=D(),a&&a.c(),P(t,"position","relative")},m(e,i){C(e,t,i),xe(n,t,null),S(t,o),a&&a.m(t,null),r=!0},p(e,o){const r={};4&o&&(r.id=e[2]),8&o&&(r.name=e[3].name),34&o&&(r.inputClass=e[5]||e[1]),64&o&&(r.disabled=e[6]),128&o&&(r.formnovalidate=e[7]),!i&&1&o&&(i=!0,r.value=e[0],re((()=>i=!1))),n.$set(r),e[6]?a&&(me(),he(a,1,1,(()=>{a=null})),fe()):a?(a.p(e,o),64&o&&pe(a,1)):(a=dr(e),a.c(),pe(a,1),a.m(t,null))},i(e){r||(pe(n.$$.fragment,e),pe(a),r=!0)},o(e){he(n.$$.fragment,e),he(a),r=!1},d(e){e&&E(t),ke(n),a&&a.d()}}}function dr(e){let t,n,i,o,r;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-wbrqzu")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[17]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ur(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function mr(e){let t,n,i;function o(t){e[22](t)}let r={class:"tModal",noClickaway:!0,$$slots:{default:[fr]},$$scope:{ctx:e}};return void 0!==e[8]&&(r.open=e[8]),t=new e[11]({props:r}),K.push((()=>we(t,"open",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};268435994&i&&(o.$$scope={dirty:i,ctx:e}),!n&&256&i&&(n=!0,o.open=e[8],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function fr(e){let t,n;return t=new lr({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(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8&n&&(i.item=e[3]),8&n&&(i.className=e[3].refClass),2&n&&(i.classId=e[1]),16&n&&(i.recordId=e[4]._id),512&n&&(i.viewValue=e[9]),16&n&&(i.filter=e[4]._id),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function pr(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ur,then:cr,catch:ar,value:27,blocks:[,,,]};$e(e[16](),o);let r=e[8]&&mr(e);return{c(){o.block.c(),t=D(),r&&r.c(),n=F()},m(e,s){o.block.m(e,o.anchor=s),o.mount=()=>t.parentNode,o.anchor=t,C(e,t,s),r&&r.m(e,s),C(e,n,s),i=!0},p(t,[i]){ge(o,e=t,i),e[8]?r?(r.p(e,i),256&i&&pe(r,1)):(r=mr(e),r.c(),pe(r,1),r.m(n.parentNode,n)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){i||(pe(o.block),pe(r),i=!0)},o(e){for(let e=0;e<3;e+=1){he(o.blocks[e])}he(r),i=!1},d(e){o.block.d(e),o.token=null,o=null,e&&E(t),r&&r.d(e),e&&E(n)}}}function hr(e,t,n){const{TextField:i,Modal:o}=c;let{classId:r}=t,{id:s}=t,{item:l}=t,{record:a}=t,{value:d}=t,{noForm:u=!1}=t,{disabled:m}=t,{formnovalidate:f}=t,{praefix:p}=t;const{properties:h={}}=l;let $,{pattern:g,placeholder:v,readonly:y,required:w=!1,view:b}=h,x=!1;const k=()=>{n(8,x=!1)};return e.$$set=e=>{"classId"in e&&n(1,r=e.classId),"id"in e&&n(2,s=e.id),"item"in e&&n(3,l=e.item),"record"in e&&n(4,a=e.record),"value"in e&&n(0,d=e.value),"noForm"in e&&n(5,u=e.noForm),"disabled"in e&&n(6,m=e.disabled),"formnovalidate"in e&&n(7,f=e.formnovalidate),"praefix"in e&&n(20,p=e.praefix)},[d,r,s,l,a,u,m,f,x,$,i,o,g,y,w,b,async()=>(n(9,$=a[b.selection]),!0),()=>{n(8,x=!0)},({detail:e})=>{n(0,d=e.row[b.value?b.value:"_id"]),k()},k,p,function(e){d=e,n(0,d)},function(e){x=e,n(8,x)}]}class $r extends _e{constructor(e){var t;super(),document.getElementById("svelte-wbrqzu-style")||((t=L("style")).id="svelte-wbrqzu-style",t.textContent=".feather.svelte-wbrqzu{position:absolute;top:0.75em;left:0.5em;color:#4300b0}",S(document.head,t)),Ie(this,e,hr,pr,k,{classId:1,id:2,item:3,record:4,value:0,noForm:5,disabled:6,formnovalidate:7,praefix:20})}}function gr(e,t,n){const i=e.slice();return i[12]=t[n][0],i[13]=t[n][1],i}function vr(e){let t;return{c(){t=L("option"),t.textContent="- ",t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function yr(e){let t;return{c(){t=L("option"),t.textContent="-- Bitte wählen -- ",t.disabled=!0,t.selected=!0,t.__value="",t.value=t.__value},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function wr(e){let t,n,i,o,r=e[12]+"";return{c(){t=L("option"),n=q(r),t.__value=i=e[13],t.value=t.__value,t.selected=o=e[0]==e[13]},m(e,i){C(e,t,i),S(t,n)},p(e,s){64&s&&r!==(r=e[12]+"")&&B(n,r),64&s&&i!==(i=e[13])&&(t.__value=i,t.value=t.__value),65&s&&o!==(o=e[0]==e[13])&&(t.selected=o)},d(e){e&&E(t)}}}function br(e){let t,n,i,o,r,s=!e[7]&&function(e){let t;function n(e,t){return e[5]&&!0!==e[8]?yr:vr}let i=n(e),o=i(e);return{c(){o.c(),t=F()},m(e,n){o.m(e,n),C(e,t,n)},p(e,r){i!==(i=n(e))&&(o.d(1),o=i(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){o.d(e),e&&E(t)}}}(e),l=e[6],a=[];for(let t=0;t<l.length;t+=1)a[t]=wr(gr(e,l,t));return{c(){t=L("select"),s&&s.c(),n=F();for(let e=0;e<a.length;e+=1)a[e].c();M(t,"class",i=_(e[3]||e[4])+" svelte-5xpzvo"),M(t,"id",e[2]),M(t,"name",e[2]),t.disabled=e[1],t.required=e[5]},m(i,l){C(i,t,l),s&&s.m(t,null),S(t,n);for(let e=0;e<a.length;e+=1)a[e].m(t,null);o||(r=T(t,"change",e[9]),o=!0)},p(e,[n]){if(e[7]||s.p(e,n),65&n){let i;for(l=e[6],i=0;i<l.length;i+=1){const o=gr(e,l,i);a[i]?a[i].p(o,n):(a[i]=wr(o),a[i].c(),a[i].m(t,null))}for(;i<a.length;i+=1)a[i].d(1);a.length=l.length}24&n&&i!==(i=_(e[3]||e[4])+" svelte-5xpzvo")&&M(t,"class",i),4&n&&M(t,"id",e[2]),4&n&&M(t,"name",e[2]),2&n&&(t.disabled=e[1]),32&n&&(t.required=e[5])},i:v,o:v,d(e){e&&E(t),s&&s.d(),N(a,e),o=!1,r()}}}function xr(e,t,n){const i=Q();let{id:o}=t,{item:r}=t,{value:s}=t,{noForm:l=!1}=t,{classId:a}=t,{disabled:c}=t,{required:d}=t,{enum:u,regulation:m,readonly:f}=r.properties;u&&(u=u.map((e=>[e,e]))),"valueAddedTax"===m&&(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,o=e.id),"item"in e&&n(10,r=e.item),"value"in e&&n(0,s=e.value),"noForm"in e&&n(3,l=e.noForm),"classId"in e&&n(4,a=e.classId),"disabled"in e&&n(1,c=e.disabled),"required"in e&&n(5,d=e.required)},[s,c,o,l,a,d,u,m,f,e=>i("blur",{value:e.srcElement.value}),r]}class kr extends _e{constructor(e){var t;super(),document.getElementById("svelte-5xpzvo-style")||((t=L("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}",S(document.head,t)),Ie(this,e,xr,br,k,{id:2,item:10,value:0,noForm:3,classId:4,disabled:1,required:5})}}function Ir(e){let t;return{c(){t=q("Stunden")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function _r(e){let t,n;return t=new e[4]({props:{slot:"hours-label",$$slots:{default:[Ir]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sr(e){let t;return{c(){t=q("Minuten")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Cr(e){let t,n;return t=new e[4]({props:{slot:"minutes-label",$$slots:{default:[Sr]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Er(e){let t;return{c(){t=q("Jetzt")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Nr(e){let t,n;return t=new e[4]({props:{slot:"now-label",$$slots:{default:[Er]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};4096&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Lr(e){let t,n,i,o,r,s,l,a,c;return o=new e[5]({props:{value:e[0],closeOnSelection:!0}}),o.$on("change",e[8]),s=new e[6]({props:{value:e[0],$$slots:{"now-label":[Nr],"minutes-label":[Cr],"hours-label":[_r]},$$scope:{ctx:e}}}),s.$on("change",e[7]),{c(){t=L("input"),i=D(),be(o.$$.fragment),r=D(),be(s.$$.fragment),M(t,"type","string"),M(t,"class",n=e[2]||e[3]),M(t,"id",e[1]),M(t,"name",e[1]),t.hidden=!0},m(n,d){C(n,t,d),O(t,e[0]),C(n,i,d),xe(o,n,d),C(n,r,d),xe(s,n,d),l=!0,a||(c=T(t,"input",e[9]),a=!0)},p(e,[i]){(!l||12&i&&n!==(n=e[2]||e[3]))&&M(t,"class",n),(!l||2&i)&&M(t,"id",e[1]),(!l||2&i)&&M(t,"name",e[1]),1&i&&O(t,e[0]);const r={};1&i&&(r.value=e[0]),o.$set(r);const a={};1&i&&(a.value=e[0]),4096&i&&(a.$$scope={dirty:i,ctx:e}),s.$set(a)},i(e){l||(pe(o.$$.fragment,e),pe(s.$$.fragment,e),l=!0)},o(e){he(o.$$.fragment,e),he(s.$$.fragment,e),l=!1},d(e){e&&E(t),e&&E(i),ke(o,e),e&&E(r),ke(s,e),a=!1,c()}}}function jr(e,t,n){const i=Q(),{Label:o,DatePicker:r,TimePicker:s}=c;let{value:l}=t,{id:a}=t,{noForm:d=!1}=t,{classId:u}=t;const m=e=>i("change",{value:e});return e.$$set=e=>{"value"in e&&n(0,l=e.value),"id"in e&&n(1,a=e.id),"noForm"in e&&n(2,d=e.noForm),"classId"in e&&n(3,u=e.classId)},[l,a,d,u,o,r,s,({detail:e})=>{var t,i;n(0,(t=e.value,i=l,l=null==t||null==i?t:(i.setHours(t.getHours(),t.getMinutes(),t.getSeconds()),i))),m(l)},({detail:e})=>{n(0,l=Jn(e.value,l)),m(l)},function(){l=this.value,n(0,l)}]}class qr extends _e{constructor(e){super(),Ie(this,e,jr,Lr,k,{value:0,id:1,noForm:2,classId:3})}}function Dr(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$;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=L("input"),r=D(),s=L("input"),d=D(),be(u.$$.fragment),m=q(" /\n"),be(f.$$.fragment),M(t,"type","string"),M(t,"class",n=e[1]||e[2]),M(t,"id",i=e[0]+"_from"),M(t,"name",o=e[0]+"_from"),t.hidden=!0,M(s,"type","string"),M(s,"class",l=e[1]||e[2]),M(s,"id",a=e[0]+"_to"),M(s,"name",c=e[0]+"_to"),s.hidden=!0},m(n,i){C(n,t,i),O(t,e[7]),C(n,r,i),C(n,s,i),O(s,e[8]),C(n,d,i),xe(u,n,i),C(n,m,i),xe(f,n,i),p=!0,h||($=[T(t,"input",e[13]),T(s,"input",e[14])],h=!0)},p(e,[r]){(!p||6&r&&n!==(n=e[1]||e[2]))&&M(t,"class",n),(!p||1&r&&i!==(i=e[0]+"_from"))&&M(t,"id",i),(!p||1&r&&o!==(o=e[0]+"_from"))&&M(t,"name",o),128&r&&O(t,e[7]),(!p||6&r&&l!==(l=e[1]||e[2]))&&M(s,"class",l),(!p||1&r&&a!==(a=e[0]+"_to"))&&M(s,"id",a),(!p||1&r&&c!==(c=e[0]+"_to"))&&M(s,"name",c),256&r&&O(s,e[8]);const d={};32&r&&(d.format=e[5]),8&r&&(d.required=e[3]),16&r&&(d.disabled=e[4]),128&r&&(d.value=e[7]),u.$set(d);const m={};64&r&&(m.format=e[6]),8&r&&(m.required=e[3]),16&r&&(m.disabled=e[4]),256&r&&(m.value=e[8]),f.$set(m)},i(e){p||(pe(u.$$.fragment,e),pe(f.$$.fragment,e),p=!0)},o(e){he(u.$$.fragment,e),he(f.$$.fragment,e),p=!1},d(e){e&&E(t),e&&E(r),e&&E(s),e&&E(d),ke(u,e),e&&E(m),ke(f,e),h=!1,b($)}}}function Fr(e,t,n){const i=Q(),{DatePicker:o}=c;let{value:r}=t,{id:s}=t,{noForm:l=!1}=t,{classId:a}=t,{required:d}=t,{disabled:u}=t,m="%d.%m.%Y",f="%d.%m.%Y",p=r?.from,h=r?.to;"Invalid Date"===p?.toString()&&(p=void 0),"Invalid Date"===h?.toString()&&(h=void 0),u&&(void 0===p&&(m=""),void 0===h&&(f=""));return e.$$set=e=>{"value"in e&&n(12,r=e.value),"id"in e&&n(0,s=e.id),"noForm"in e&&n(1,l=e.noForm),"classId"in e&&n(2,a=e.classId),"required"in e&&n(3,d=e.required),"disabled"in e&&n(4,u=e.disabled)},[s,l,a,d,u,m,f,p,h,o,({detail:e})=>{n(7,p=Jn(e.value,p)),h&&p&&h.valueOf()-p.valueOf()<0&&n(7,p=void 0),i("change",{value:p,range:"_from"})},({detail:e})=>{n(8,h=Jn(e.value,h)),h&&p&&h.valueOf()-p.valueOf()<0&&n(8,h=void 0),i("change",{value:h,range:"_to"})},r,function(){p=this.value,n(7,p)},function(){h=this.value,n(8,h)}]}class Tr extends _e{constructor(e){var t;super(),document.getElementById("svelte-7itxk4-style")||((t=L("style")).id="svelte-7itxk4-style",t.textContent="div.date-picker.moveLeft div.dropdown.calendar{left:-3em !important}",S(document.head,t)),Ie(this,e,Fr,Dr,k,{value:12,id:0,noForm:1,classId:2,required:3,disabled:4})}}function zr(e){let t,n,i;return n=new e[5]({props:{type:"string",inputClass:e[2],id:e[0],name:e[0],value:e[1],pattern:Ar,placeholder:Mr,readonly:e[3],disabled:e[4]}}),n.$on("change",e[6]),{c(){t=L("div"),be(n.$$.fragment),P(t,"max-width","4em")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p(e,[t]){const i={};4&t&&(i.inputClass=e[2]),1&t&&(i.id=e[0]),1&t&&(i.name=e[0]),2&t&&(i.value=e[1]),8&t&&(i.readonly=e[3]),16&t&&(i.disabled=e[4]),n.$set(i)},i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}const Ar="([01][0-9]|2[0-3]):([0-5][0-9])",Mr="";function Br(e,t,n){const i=Q(),{TextField:o}=c;let{id:r}=t,{item:s}=t,{value:l}=t,{inputClass:a}=t,{readonly:d}=t,{disabled:u}=t,{praefix:m}=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,r=e.id),"item"in e&&n(7,s=e.item),"value"in e&&n(1,l=e.value),"inputClass"in e&&n(2,a=e.inputClass),"readonly"in e&&n(3,d=e.readonly),"disabled"in e&&n(4,u=e.disabled),"praefix"in e&&n(8,m=e.praefix)},[r,l,a,d,u,o,({detail:e})=>{i("blur",{value:f(e.value)}),i("checkRange",{idx:m,fieldId:r,value:e.value})},s,m]}class Or extends _e{constructor(e){var t;super(),document.getElementById("svelte-vvt0yv-style")||((t=L("style")).id="svelte-vvt0yv-style",t.textContent=".text-field input.invalid{border:1px red solid !important}",S(document.head,t)),Ie(this,e,Br,zr,k,{id:0,item:7,value:1,inputClass:2,readonly:3,disabled:4,praefix:8})}}const{document:Pr}=ve;function Vr(e,t,n){const i=e.slice();return i[0]=t[n],i}function Wr(e,t,n){const i=e.slice();return i[17]=t[n],i[19]=n,i}function Rr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ur(e){let t,n,i=e[14],o=[];for(let t=0;t<i.length;t+=1)o[t]=Gr(Vr(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(14&n){let s;for(i=e[14],s=0;s<i.length;s+=1){const r=Vr(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Gr(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Hr(e){let t,n,i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"",o=e[19]&&function(){let e;return{c(){e=q(", ")},m(t,n){C(t,e,n)},d(t){t&&E(e)}}}();return{c(){t=L("span"),o&&o.c(),n=q(i),M(t,"class","lookupValue")},m(e,i){C(e,t,i),o&&o.m(t,null),S(t,n)},p(e,t){2&t&&i!==(i=(e[0]["_"+e[17]]||e[0][e[17]]||"(ja)")+"")&&B(n,i)},d(e){e&&E(t),o&&o.d()}}}function Gr(e){let t,n,i,o,r,s,l,a,c=e[1],d=[];for(let t=0;t<c.length;t+=1)d[t]=Hr(Wr(e,c,t));return o=new He({props:{size:"18"}}),{c(){t=L("div");for(let e=0;e<d.length;e+=1)d[e].c();n=D(),i=L("span"),be(o.$$.fragment),r=D(),M(i,"class","feather pointer svelte-1u646ni"),M(t,"class","lookupItem svelte-1u646ni")},m(c,u){C(c,t,u);for(let e=0;e<d.length;e+=1)d[e].m(t,null);S(t,n),S(t,i),xe(o,i,null),S(t,r),s=!0,l||(a=T(i,"click",e[3](e[0]._id)),l=!0)},p(i,o){if(e=i,6&o){let i;for(c=e[1],i=0;i<c.length;i+=1){const r=Wr(e,c,i);d[i]?d[i].p(r,o):(d[i]=Hr(r),d[i].c(),d[i].m(t,n))}for(;i<d.length;i+=1)d[i].d(1);d.length=c.length}},i(e){s||(pe(o.$$.fragment,e),s=!0)},o(e){he(o.$$.fragment,e),s=!1},d(e){e&&E(t),N(d,e),ke(o),l=!1,a()}}}function Qr(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Yr(e){let t,n,i={ctx:e,current:null,token:null,hasCatch:!1,pending:Qr,then:Ur,catch:Rr,value:14,blocks:[,,,]};return $e(e[2](),i),{c(){t=L("div"),i.block.c(),M(t,"class","lookup svelte-1u646ni")},m(e,o){C(e,t,o),i.block.m(t,i.anchor=null),i.mount=()=>t,i.anchor=null,n=!0},p(t,[n]){ge(i,e=t,n)},i(e){n||(pe(i.block),n=!0)},o(e){for(let e=0;e<3;e+=1){he(i.blocks[e])}n=!1},d(e){e&&E(t),i.block.d(),i.token=null,i=null}}}function Jr(e,t,i){let{id:o}=t,{item:r}=t,{praefix:s}=t,{record:l}=t;const{refItem:a,view:c}=r.properties;let d=c.split(","),[u,m]=a.split(":");const[f,p]=m.split("."),h=()=>{ie().then((()=>{const e=document.querySelector("div.form-field."+r.name);e&&(e.style.display="none")}))};return e.$$set=e=>{"id"in e&&i(4,o=e.id),"item"in e&&i(0,r=e.item),"praefix"in e&&i(5,s=e.praefix),"record"in e&&i(6,l=e.record)},[r,d,async()=>{let e=[];if(l._id){const t=!d.some((e=>e.includes(":")));p&&(u=p+"."+u);const o={[u]:l[u]||l._id};if(e=await n.getSectionView(f,o,t),!t){const t=d.find((e=>e.includes(":"))).split(":")[0];e=e.map((e=>{const n=e[t].find((e=>e[t]===l._id));return n._id=e._id,n})),i(1,d=d.map((e=>e.split(":")[1])))}}return e.length||h(),e},e=>async()=>{const t=await n.getTaskByDocId(e);if(!t)return;const i=t._id,o=`/task/${t.event}/${i}/task?view=standalone`;window.open(o)},o,s,l]}class Kr extends _e{constructor(e){var t;super(),Pr.getElementById("svelte-1u646ni-style")||((t=L("style")).id="svelte-1u646ni-style",t.textContent=".feather.svelte-1u646ni{position:absolute;top:0;left:-1.5em;color:#4300b0}div.lookup.svelte-1u646ni{margin-top:0.75em;color:#aaa}div.lookupItem.svelte-1u646ni{position:relative;margin-left:2em}div.form-field:has(div.lookup){margin-bottom:0.5em !important}div.field:has(div.lookupItem){background-color:#f5f5f5 !important}",S(Pr.head,t)),Ie(this,e,Jr,Yr,k,{id:4,item:0,praefix:5,record:6})}}function Zr(e){let t,n,i;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function Xr(e){let t,n,i,o,r;return n=new ot({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function es(e){let t,n,i,o,r,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 l=[Xr,Zr],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}const ts=e("getMapLink",(async e=>{const{street:t,houseNo:i,postcode:o,location:r,country:s}=e,l=[t&&i?t+" "+i:t,o&&r?o+" "+r:o||r||"",s&&(await n.getTask("country",s)).designation].filter((e=>!!e)).join(", ");return"https://bing.com/maps/default.aspx?where1="+encodeURIComponent(l)}));function ns(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{record:f}=t,{item:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,l=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value),"record"in e&&n(10,f=e.record),"item"in e&&n(11,p=e.item)},[o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;const e=u.includes(".")?f[u.split(".")[0]]:f,t=await ts(e);window.open(t,"_blank")},f,p,function(t){Y(e,t)}]}class is extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ns,es,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,record:10,item:11})}}function os(e){let t,n,i;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function rs(e){let t,n,i,o,r;return n=new Ye({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[9]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function ss(e){let t,n,i,o,r,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 l=[rs,os],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ls(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,l=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value)},[o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;let e=m;e.includes("//")||(e="//"+e),window.open(e,"_blank")},function(t){Y(e,t)}]}class as extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ls,ss,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7})}}function cs(e){let t,n,i;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function ds(e){let t,n,i,o,r;return n=new lt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function us(e){let t,n,i,o,r,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 l=[ds,cs],a=[];function c(e,t){return e[9]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};4&i&&(s.inputClass=e[2]),1&i&&(s.pattern=e[0]),2&i&&(s.placeholder=e[1]),8&i&&(s.disabled=e[3]),16&i&&(s.formnovalidate=e[4]),32&i&&(s.readonly=e[5]),64&i&&(s.required=e[6]),128&i&&(s.id=e[7]),256&i&&(s.name=e[8]),512&i&&(s.value=e[9]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function ms(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=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})",p||="+41 58 234 56 78";return e.$$set=e=>{"inputClass"in e&&n(2,o=e.inputClass),"disabled"in e&&n(3,r=e.disabled),"formnovalidate"in e&&n(4,s=e.formnovalidate),"readonly"in e&&n(5,l=e.readonly),"required"in e&&n(6,a=e.required),"id"in e&&n(7,d=e.id),"name"in e&&n(8,u=e.name),"value"in e&&n(9,m=e.value),"pattern"in e&&n(0,f=e.pattern),"placeholder"in e&&n(1,p=e.placeholder)},[f,p,o,r,s,l,a,d,u,m,i,async()=>{if(!m)return;let e="tel:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class fs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,ms,us,k,{inputClass:2,disabled:3,formnovalidate:4,readonly:5,required:6,id:7,name:8,value:9,pattern:0,placeholder:1})}}function ps(e){let t,n,i;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 svelte-9up2nn")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function hs(e){let t,n,i,o,r;return n=new tt({props:{size:"18"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather pointer svelte-9up2nn")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[11]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function $s(e){let t,n,i,o,r,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 l=[hs,ps],a=[];function c(e,t){return e[7]?0:1}return o=c(e),r=a[o]=l[o](e),{c(){t=L("div"),be(n.$$.fragment),i=D(),r.c(),P(t,"position","relative")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i),a[o].m(t,null),s=!0},p(e,[i]){const s={};1&i&&(s.inputClass=e[0]),256&i&&(s.pattern=e[8]),512&i&&(s.placeholder=e[9]),2&i&&(s.disabled=e[1]),4&i&&(s.formnovalidate=e[2]),8&i&&(s.readonly=e[3]),16&i&&(s.required=e[4]),32&i&&(s.id=e[5]),64&i&&(s.name=e[6]),128&i&&(s.value=e[7]),n.$set(s);let d=o;o=c(e),o===d?a[o].p(e,i):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),r=a[o],r?r.p(e,i):(r=a[o]=l[o](e),r.c()),pe(r,1),r.m(t,null))},i(e){s||(pe(n.$$.fragment,e),pe(r),s=!0)},o(e){he(n.$$.fragment,e),he(r),s=!1},d(e){e&&E(t),ke(n),a[o].d()}}}function gs(e,t,n){const{TextField:i}=c;let{inputClass:o}=t,{disabled:r}=t,{formnovalidate:s}=t,{readonly:l}=t,{required:a}=t,{id:d}=t,{name:u}=t,{value:m}=t,{pattern:f}=t,{placeholder:p}=t;return e.$$set=e=>{"inputClass"in e&&n(0,o=e.inputClass),"disabled"in e&&n(1,r=e.disabled),"formnovalidate"in e&&n(2,s=e.formnovalidate),"readonly"in e&&n(3,l=e.readonly),"required"in e&&n(4,a=e.required),"id"in e&&n(5,d=e.id),"name"in e&&n(6,u=e.name),"value"in e&&n(7,m=e.value),"pattern"in e&&n(8,f=e.pattern),"placeholder"in e&&n(9,p=e.placeholder)},[o,r,s,l,a,d,u,m,f,p,i,async()=>{if(!m)return;let e="mailto:"+m;window.open(e,"_self")},function(t){Y(e,t)}]}class vs extends _e{constructor(e){var t;super(),document.getElementById("svelte-9up2nn-style")||((t=L("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}",S(document.head,t)),Ie(this,e,gs,$s,k,{inputClass:0,disabled:1,formnovalidate:2,readonly:3,required:4,id:5,name:6,value:7,pattern:8,placeholder:9})}}const ys=["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 ws(e){let t;return{c(){t=L("textarea"),M(t,"id",e[0]),P(t,"visibility","hidden")},m(n,i){C(n,t,i),e[18](t)},p(e,n){1&n&&M(t,"id",e[0])},d(n){n&&E(t),e[18](null)}}}function bs(e){let t;return{c(){t=L("div"),M(t,"id",e[0])},m(n,i){C(n,t,i),e[17](t)},p(e,n){1&n&&M(t,"id",e[0])},d(n){n&&E(t),e[17](null)}}}function xs(e){let t;function n(e,t){return e[1]?bs:ws}let i=n(e),o=i(e);return{c(){t=L("div"),o.c(),M(t,"class",e[2])},m(n,i){C(n,t,i),o.m(t,null),e[19](t)},p(e,[r]){i===(i=n(e))&&o?o.p(e,r):(o.d(1),o=i(e),o&&(o.c(),o.m(t,null))),4&r&&M(t,"class",e[2])},i:v,o:v,d(n){n&&E(t),o.d(),e[19](null)}}}const ks=e=>e+"_"+Math.floor(1e9*Math.random())+String(Date.now());let Is=(()=>{let e={listeners:[],scriptId:ks("tiny-script"),scriptLoaded:!1,injected:!1};return{load:(t,n,i)=>{e.scriptLoaded?i():(e.listeners.push(i),e.injected||((t,n,i,o)=>{e.injected=!0;const r=n.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=i,r.onload=()=>{o()},n.head&&n.head.appendChild(r)})(e.scriptId,t,n,(()=>{e.listeners.forEach((e=>e())),e.scriptLoaded=!0})))}}})();function _s(e,t,n){var i;let o,r,s,{id:l=ks("tinymce-svelte")}=t,{inline:a}=t,{disabled:c=!1}=t,{apiKey:d="no-api-key"}=t,{channel:u="6"}=t,{scriptSrc:m}=t,{conf:f={}}=t,{modelEvents:p="change input undo redo"}=t,{value:h=""}=t,{text:$=""}=t,{cssClass:g="tinymce-wrapper"}=t,v=h,y=c;const w=Q(),b=()=>{const e="undefined"!=typeof window?window:global;return e&&e.tinymce?e.tinymce:null},x=()=>{const e=Object.assign(Object.assign({},f),{target:r,inline:void 0!==a?a:void 0!==f.inline&&f.inline,readonly:c,setup:e=>{n(14,s=e),e.on("init",(()=>{e.setContent(h),e.on(p,(()=>{n(15,v=e.getContent()),v!==h&&(n(5,h=v),n(6,$=e.getContent({format:"text"})))}))})),((e,t)=>{ys.forEach((n=>{e.on(n,(i=>{t(n.toLowerCase(),{eventName:n,event:i,editor:e})}))}))})(e,w),"function"==typeof f.setup&&f.setup(e)}});n(4,r.style.visibility="",r),b().init(e)};return H((()=>{if(null!==b())x();else{const e=m||`https://cdn.tiny.cloud/1/${d}/tinymce/${u}/tinymce.min.js`;Is.load(o.ownerDocument,e,(()=>{x()}))}})),G((()=>{var e;s&&(null===(e=b())||void 0===e||e.remove(s))})),e.$$set=e=>{"id"in e&&n(0,l=e.id),"inline"in e&&n(1,a=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,m=e.scriptSrc),"conf"in e&&n(11,f=e.conf),"modelEvents"in e&&n(12,p=e.modelEvents),"value"in e&&n(5,h=e.value),"text"in e&&n(6,$=e.text),"cssClass"in e&&n(2,g=e.cssClass)},e.$$.update=()=>{123040&e.$$.dirty&&(s&&v!==h&&(s.setContent(h),n(6,$=s.getContent({format:"text"}))),s&&c!==y&&(n(16,y=c),"function"==typeof(null===n(13,i=s.mode)||void 0===i?void 0:i.set)?s.mode.set(c?"readonly":"design"):s.setMode(c?"readonly":"design")))},[l,a,g,o,r,h,$,c,d,u,m,f,p,i,s,v,y,function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{r=e,n(4,r)}))},function(e){K[e?"unshift":"push"]((()=>{o=e,n(3,o)}))}]}class Ss extends _e{constructor(e){super(),Ie(this,e,_s,xs,k,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function Cs(e){let t,n,i,o,r,s,l;function a(t){e[7](t)}let c={scriptSrc:"/tinymce/tinymce.min.js",conf:e[6],disabled:e[4],readonly:e[5]};return void 0!==e[0]&&(c.value=e[0]),n=new Ss({props:c}),K.push((()=>we(n,"value",a))),{c(){t=L("div"),be(n.$$.fragment),o=D(),r=L("input"),M(r,"class",s=e[1]||e[2]),M(r,"id",e[3]),M(r,"name",e[3]),r.value=e[0],r.hidden=!0,P(t,"min-height","10em"),P(t,"margin-top","-1em")},m(e,i){C(e,t,i),xe(n,t,null),S(t,o),S(t,r),l=!0},p(e,[t]){const o={};16&t&&(o.disabled=e[4]),32&t&&(o.readonly=e[5]),!i&&1&t&&(i=!0,o.value=e[0],re((()=>i=!1))),n.$set(o),(!l||6&t&&s!==(s=e[1]||e[2]))&&M(r,"class",s),(!l||8&t)&&M(r,"id",e[3]),(!l||8&t)&&M(r,"name",e[3]),(!l||1&t&&r.value!==e[0])&&(r.value=e[0])},i(e){l||(pe(n.$$.fragment,e),l=!0)},o(e){he(n.$$.fragment,e),l=!1},d(e){e&&E(t),ke(n)}}}function Es(e,n,i){let o=JSON.parse(t.getItem("Locale")).id;o=o.startsWith("fr")?"fr_FR":o.split("-")[0];let{value:r}=n,{noForm:s}=n,{classId:l}=n,{id:a}=n,{disabled:c}=n,{readonly:d}=n;const u={plugins:"advlist numlist link image lists table preview emoticons fullscreen",menu:{file:{title:"File",items:"preview"}},menubar:"edit view insert format table",toolbar:"undo redo | styles | bold italic | alignleft aligncenter alignright alignjustify | outdent indent | bullist numlist | fullscreen",height:600,language:o};return e.$$set=e=>{"value"in e&&i(0,r=e.value),"noForm"in e&&i(1,s=e.noForm),"classId"in e&&i(2,l=e.classId),"id"in e&&i(3,a=e.id),"disabled"in e&&i(4,c=e.disabled),"readonly"in e&&i(5,d=e.readonly)},[r,s,l,a,c,d,u,function(e){r=e,i(0,r)}]}class Ns extends _e{constructor(e){var t;super(),document.getElementById("svelte-zemw0w-style")||((t=L("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}",S(document.head,t)),Ie(this,e,Es,Cs,k,{value:0,noForm:1,classId:2,id:3,disabled:4,readonly:5})}}
2
2
  /*!
3
3
  * Signature Pad v5.0.2 | https://github.com/szimek/signature_pad
4
4
  * (c) 2024 Szymon Nowak | Released under the MIT license
5
- */class Ns{constructor(e,t,n,i){if(isNaN(e)||isNaN(t))throw new Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=n||0,this.time=i||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}}class Ls{static fromPoints(e,t){const n=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new Ls(e[1],n,i,e[2],t.start,t.end)}static calculateControlPoints(e,t,n){const i=e.x-t.x,o=e.y-t.y,r=t.x-n.x,s=t.y-n.y,l=(e.x+t.x)/2,a=(e.y+t.y)/2,c=(t.x+n.x)/2,d=(t.y+n.y)/2,u=Math.sqrt(i*i+o*o),m=Math.sqrt(r*r+s*s),f=m/(u+m),p=c+(l-c)*f,h=d+(a-d)*f,$=t.x-p,g=t.y-h;return{c1:new Ns(l+$,a+g),c2:new Ns(c+$,d+g)}}constructor(e,t,n,i,o,r){this.startPoint=e,this.control2=t,this.control1=n,this.endPoint=i,this.startWidth=o,this.endWidth=r}length(){let e,t,n=0;for(let i=0;i<=10;i+=1){const o=i/10,r=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=r-e,o=s-t;n+=Math.sqrt(i*i+o*o)}e=r,t=s}return n}point(e,t,n,i,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*i*(1-e)*e*e+o*e*e*e}}class js{constructor(){try{this._et=new EventTarget}catch(e){this._et=document}}addEventListener(e,t,n){this._et.addEventListener(e,t,n)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,n){this._et.removeEventListener(e,t,n)}}class qs extends js{constructor(e,t={}){var n,i,o;super(),this.canvas=e,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=e=>{this._isLeftButtonPressed(e,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(e))},this._handleMouseMove=e=>{this._isLeftButtonPressed(e,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e)):this._strokeEnd(this._pointerEventToSignatureEvent(e),!1)},this._handleMouseUp=e=>{this._isLeftButtonPressed(e)||this._strokeEnd(this._pointerEventToSignatureEvent(e))},this._handleTouchStart=e=>{1!==e.targetTouches.length||this._drawingStroke||(e.cancelable&&e.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(e)))},this._handleTouchMove=e=>{1===e.targetTouches.length&&(e.cancelable&&e.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(e)):this._strokeEnd(this._touchEventToSignatureEvent(e),!1))},this._handleTouchEnd=e=>{0===e.targetTouches.length&&(e.cancelable&&e.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(e)))},this._handlePointerDown=e=>{this._isLeftButtonPressed(e)&&!this._drawingStroke&&(e.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(e)))},this._handlePointerMove=e=>{this._isLeftButtonPressed(e,!0)&&this._drawingStroke?(e.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e))):this._strokeEnd(this._pointerEventToSignatureEvent(e),!1)},this._handlePointerUp=e=>{this._isLeftButtonPressed(e)||(e.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(e)))},this.velocityFilterWeight=t.velocityFilterWeight||.7,this.minWidth=t.minWidth||.5,this.maxWidth=t.maxWidth||2.5,this.throttle=null!==(n=t.throttle)&&void 0!==n?n:16,this.minDistance=null!==(i=t.minDistance)&&void 0!==i?i:5,this.dotSize=t.dotSize||0,this.penColor=t.penColor||"black",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=t.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=t.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(e,t=250){let n,i,o,r=0,s=null;const l=()=>{r=Date.now(),s=null,n=e.apply(i,o),s||(i=null,o=[])};return function(...a){const c=Date.now(),d=t-(c-r);return i=this,o=a,d<=0||d>t?(s&&(clearTimeout(s),s=null),r=c,n=e.apply(i,o),s||(i=null,o=[])):s||(s=window.setTimeout(l,d)),n}}(qs.prototype._strokeUpdate,this.throttle):qs.prototype._strokeUpdate,this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:e,canvas:t}=this;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(e,t={}){return new Promise(((n,i)=>{const o=new Image,r=t.ratio||window.devicePixelRatio||1,s=t.width||this.canvas.width/r,l=t.height||this.canvas.height/r,a=t.xOffset||0,c=t.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,a,c,s,l),n()},o.onerror=e=>{i(e)},o.crossOrigin="anonymous",o.src=e,this._isEmpty=!1}))}toDataURL(e="image/png",t){return"image/svg+xml"===e?("object"!=typeof t&&(t=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(t))}`):("number"!=typeof t&&(t=void 0),this.canvas.toDataURL(e,t))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const e=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!e?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var e;const t=window.document===this.canvas.ownerDocument?window:null!==(e=this.canvas.ownerDocument.defaultView)&&void 0!==e?e:this.canvas.ownerDocument;return{addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}_removeMoveUpEventListeners(){const{removeEventListener:e}=this._getListenerFunctions();e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp),e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp),e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(e,{clear:t=!0}={}){t&&this.clear(),this._fromData(e,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(e)}toData(){return this._data}_isLeftButtonPressed(e,t){return t?1===e.buttons:!(1&~e.buttons)}_pointerEventToSignatureEvent(e){return{event:e,type:e.type,x:e.clientX,y:e.clientY,pressure:"pressure"in e?e.pressure:0}}_touchEventToSignatureEvent(e){const t=e.changedTouches[0];return{event:e,type:e.type,x:t.clientX,y:t.clientY,pressure:t.force}}_getPointGroupOptions(e){return{penColor:e&&"penColor"in e?e.penColor:this.penColor,dotSize:e&&"dotSize"in e?e.dotSize:this.dotSize,minWidth:e&&"minWidth"in e?e.minWidth:this.minWidth,maxWidth:e&&"maxWidth"in e?e.maxWidth:this.maxWidth,velocityFilterWeight:e&&"velocityFilterWeight"in e?e.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:e&&"compositeOperation"in e?e.compositeOperation:this.compositeOperation}}_strokeBegin(e){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:e,cancelable:!0})))return;const{addEventListener:t}=this._getListenerFunctions();switch(e.event.type){case"mousedown":t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp);break;case"touchstart":t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd);break;case"pointerdown":t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const n=this._getPointGroupOptions(),i=Object.assign(Object.assign({},n),{points:[]});this._data.push(i),this._reset(n),this._strokeUpdate(e)}_strokeUpdate(e){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(e);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:e}));const t=this._createPoint(e.x,e.y,e.pressure),n=this._data[this._data.length-1],i=n.points,o=i.length>0&&i[i.length-1],r=!!o&&t.distanceTo(o)<=this.minDistance,s=this._getPointGroupOptions(n);if(!o||!o||!r){const e=this._addPoint(t,s);o?e&&this._drawCurve(e,s):this._drawDot(t,s),i.push({time:t.time,x:t.x,y:t.y,pressure:t.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:e}))}_strokeEnd(e,t=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(t&&this._strokeUpdate(e),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:e})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(e){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(e.minWidth+e.maxWidth)/2,this._ctx.fillStyle=e.penColor,this._ctx.globalCompositeOperation=e.compositeOperation}_createPoint(e,t,n){const i=this.canvas.getBoundingClientRect();return new Ns(e-i.left,t-i.top,n,(new Date).getTime())}_addPoint(e,t){const{_lastPoints:n}=this;if(n.push(e),n.length>2){3===n.length&&n.unshift(n[0]);const e=this._calculateCurveWidths(n[1],n[2],t),i=Ls.fromPoints(n,e);return n.shift(),i}return null}_calculateCurveWidths(e,t,n){const i=n.velocityFilterWeight*t.velocityFrom(e)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i,n),r={end:o,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=o,r}_strokeWidth(e,t){return Math.max(t.maxWidth/(e+1),t.minWidth)}_drawCurveSegment(e,t,n){const i=this._ctx;i.moveTo(e,t),i.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(e,t){const n=this._ctx,i=e.endWidth-e.startWidth,o=2*Math.ceil(e.length());n.beginPath(),n.fillStyle=t.penColor;for(let n=0;n<o;n+=1){const r=n/o,s=r*r,l=s*r,a=1-r,c=a*a,d=c*a;let u=d*e.startPoint.x;u+=3*c*r*e.control1.x,u+=3*a*s*e.control2.x,u+=l*e.endPoint.x;let m=d*e.startPoint.y;m+=3*c*r*e.control1.y,m+=3*a*s*e.control2.y,m+=l*e.endPoint.y;const f=Math.min(e.startWidth+l*i,t.maxWidth);this._drawCurveSegment(u,m,f)}n.closePath(),n.fill()}_drawDot(e,t){const n=this._ctx,i=t.dotSize>0?t.dotSize:(t.minWidth+t.maxWidth)/2;n.beginPath(),this._drawCurveSegment(e.x,e.y,i),n.closePath(),n.fillStyle=t.penColor,n.fill()}_fromData(e,t,n){for(const i of e){const{points:e}=i,o=this._getPointGroupOptions(i);if(e.length>1)for(let n=0;n<e.length;n+=1){const i=e[n],r=new Ns(i.x,i.y,i.pressure,i.time);0===n&&this._reset(o);const s=this._addPoint(r,o);s&&t(s,o)}else this._reset(o),n(e[0],o)}}toSVG({includeBackgroundColor:e=!1}={}){const t=this._data,n=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/n,o=this.canvas.height/n,r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("viewBox",`0 0 ${i} ${o}`),r.setAttribute("width",i.toString()),r.setAttribute("height",o.toString()),e&&this.backgroundColor){const e=document.createElement("rect");e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill",this.backgroundColor),r.appendChild(e)}return this._fromData(t,((e,{penColor:t})=>{const n=document.createElement("path");if(!(isNaN(e.control1.x)||isNaN(e.control1.y)||isNaN(e.control2.x)||isNaN(e.control2.y))){const i=`M ${e.startPoint.x.toFixed(3)},${e.startPoint.y.toFixed(3)} C ${e.control1.x.toFixed(3)},${e.control1.y.toFixed(3)} ${e.control2.x.toFixed(3)},${e.control2.y.toFixed(3)} ${e.endPoint.x.toFixed(3)},${e.endPoint.y.toFixed(3)}`;n.setAttribute("d",i),n.setAttribute("stroke-width",(2.25*e.endWidth).toFixed(3)),n.setAttribute("stroke",t),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),r.appendChild(n)}}),((e,{penColor:t,dotSize:n,minWidth:i,maxWidth:o})=>{const s=document.createElement("circle"),l=n>0?n:(i+o)/2;s.setAttribute("r",l.toString()),s.setAttribute("cx",e.x.toString()),s.setAttribute("cy",e.y.toString()),s.setAttribute("fill",t),r.appendChild(s)})),r.outerHTML}}const{document:Ds}=ve;function Fs(e){let t,n,i,o,r;return n=new We({props:{size:"24"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-10h1n5r")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[5]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function Ts(e){let t,n,i,o,r,s,l=!e[0]&&Fs(e);return{c(){t=L("div"),n=L("canvas"),o=D(),l&&l.c(),M(n,"id",e[1]),M(n,"name",e[1]),M(n,"class",i=e[2]+" signature_pad "+e[3]+(e[0]||e[4]?" signature-readonly":"")+" svelte-10h1n5r"),M(n,"width","400"),M(n,"height","200"),M(t,"class",r=e[2]+"_wrapper wrapper svelte-10h1n5r")},m(e,i){C(e,t,i),S(t,n),S(t,o),l&&l.m(t,null),s=!0},p(e,[o]){(!s||2&o)&&M(n,"id",e[1]),(!s||2&o)&&M(n,"name",e[1]),(!s||29&o&&i!==(i=e[2]+" signature_pad "+e[3]+(e[0]||e[4]?" signature-readonly":"")+" svelte-10h1n5r"))&&M(n,"class",i),e[0]?l&&(me(),he(l,1,1,(()=>{l=null})),fe()):l?(l.p(e,o),1&o&&pe(l,1)):(l=Fs(e),l.c(),pe(l,1),l.m(t,null)),(!s||4&o&&r!==(r=e[2]+"_wrapper wrapper svelte-10h1n5r"))&&M(t,"class",r)},i(e){s||(pe(l),s=!0)},o(e){he(l),s=!1},d(e){e&&E(t),l&&l.d()}}}const zs=new Map;let As="";function Ms(e,t,n){const i=Q();let o,{id:r}=t,{name:s}=t,{value:l}=t,{record:a}=t,{classId:c}=t,{disabled:d}=t,{readonly:u}=t;const m=a._id||Math.floor(9e3*Math.random()+1e3).toString();u||=d;const f=e=>{As=e,zs.set(m,As),i("blur",{value:As})};return H((()=>{As=l||zs.get(m)||"",zs.set(m,As);const e=document.querySelector("canvas");n(8,o=new qs(e)),u||(o.addEventListener("endStroke",(()=>{f(o.toDataURL("image/png"))})),o.addEventListener("afterUpdateStroke",(()=>{f(o.toDataURL("image/png"))})))})),G((()=>zs.forEach(((e,t,n)=>{t!==m&&n.delete(t)})))),e.$$set=e=>{"id"in e&&n(1,r=e.id),"name"in e&&n(2,s=e.name),"value"in e&&n(6,l=e.value),"record"in e&&n(7,a=e.record),"classId"in e&&n(3,c=e.classId),"disabled"in e&&n(4,d=e.disabled),"readonly"in e&&n(0,u=e.readonly)},e.$$.update=()=>{256&e.$$.dirty&&As&&o&&o.fromDataURL(As,{ratio:1})},[u,r,s,c,d,()=>{o.clear(),f("")},l,a,o]}class Bs extends _e{constructor(e){var t;super(),Ds.getElementById("svelte-10h1n5r-style")||((t=L("style")).id="svelte-10h1n5r-style",t.textContent=".feather2.svelte-10h1n5r{position:absolute;right:-2em;color:#4300b0}.wrapper.svelte-10h1n5r{position:relative;width:400px;height:200px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #36697d}.signature-pad.svelte-10h1n5r{position:absolute;left:0;top:0;background-color:white}.signature-readonly.svelte-10h1n5r{cursor:not-allowed;pointer-events:none}",S(Ds.head,t)),Ie(this,e,Ms,Ts,k,{id:1,name:2,value:6,record:7,classId:3,disabled:4,readonly:0})}}function Os(e){let t,n;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+(e[20]?" hidden ":""),name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[cl,({notifyList:e})=>({18:e}),({notifyList:e})=>[e?262144:0]]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1048577&n[0]&&(i.class=e[0].name+(e[20]?" hidden ":"")),1&n[0]&&(i.name=e[0].designation),1&n[0]&&(i.help=e[0].properties?.hint),13631487&n[0]|536870912&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ps(e){let t,n;return t=new e[28]({props:{text:e[0].designation}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]&&(i.text=e[0].designation),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vs(e){let t,n,i,o;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+(e[20]?" hidden ":""),name:e[0].designation,help:e[0].properties?.hint}}),i=new Es({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),noForm:e[6]}}),i.$on("blur",e[35]()),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};1048577&n[0]&&(o.class=e[0].name+(e[20]?" hidden ":"")),1&n[0]&&(o.name=e[0].designation),1&n[0]&&(o.help=e[0].properties?.hint),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),8&n[0]&&(r.disabled=e[3]),524288&n[0]&&(r.readonly=e[19]),1&n[0]&&(r.name=e[0].name),4194304&n[0]&&(r.value=e[22]()),64&n[0]&&(r.noForm=e[6]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Ws(e){let t,n,i,o,r,s;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+" hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[dl]},$$scope:{ctx:e}}}),i=new e[28]({props:{text:e[23]}}),r=new oo({props:{required:e[4],disabled:e[3],readonly:e[19],id:e[32],item:e[0],currency:e[17],value:e[22]()}}),r.$on("setRefValue",e[40]),r.$on("safeReference",e[45]),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment),o=D(),be(r.$$.fragment)},m(e,l){xe(t,e,l),C(e,n,l),xe(i,e,l),C(e,o,l),xe(r,e,l),s=!0},p(e,n){const o={};1&n[0]&&(o.class=e[0].name+" hidden"),1&n[0]&&(o.name=e[0].designation),1&n[0]&&(o.help=e[0].properties?.hint),6291841&n[0]|536870912&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);const s={};8388608&n[0]&&(s.text=e[23]),i.$set(s);const l={};16&n[0]&&(l.required=e[4]),8&n[0]&&(l.disabled=e[3]),524288&n[0]&&(l.readonly=e[19]),1&n[0]&&(l.item=e[0]),131072&n[0]&&(l.currency=e[17]),4194304&n[0]&&(l.value=e[22]()),r.$set(l)},i(e){s||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){ke(t,e),e&&E(n),ke(i,e),e&&E(o),ke(r,e)}}}function Rs(e){let t,n;return t=new e[25]({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],pattern:e[29],required:!0===e[4],placeholder:e[30],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=!0===e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Us(e){let t,n;return t=new ms({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Hs(e){let t,n;return t=new ls({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gs(e){let t,n;return t=new gs({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Qs(e){let t,n;return t=new Or({props:{inputClass:e[6]||e[7],disabled:e[3],readonly:e[19],required:e[4],id:e[32],item:e[0],value:e[22](),praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("checkRange",e[53]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ys(e){let t,n;return t=new Kr({props:{id:e[32],item:e[0],praefix:e[5],record:e[1]}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]&&(i.item=e[0]),32&n[0]&&(i.praefix=e[5]),2&n[0]&&(i.record=e[1]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Js(e){let t,n;return t=new ns({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22](),record:e[1],item:e[0]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),2&n[0]&&(i.record=e[1]),1&n[0]&&(i.item=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ks(e){let t,n;return t=new qr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[33](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Zs(e){let t,n;return t=new Tr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[34](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Xs(e){let t,n;return t=new e[26]({props:{inputClass:e[6]||e[7],required:e[4],disabled:e[3],id:e[32],name:e[31],value:e[33](),closeOnSelection:!0}}),t.$on("change",e[35](!0)),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function el(e){let t,n;return t=new e[27]({props:{round:!0,inputClass:e[6]||e[7],disabled:e[3]||e[19],required:e[4],id:e[32],name:e[31],checked:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),524296&n[0]&&(i.disabled=e[3]||e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.checked=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function tl(e){let t,n;return t=new $r({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],record:e[1],value:e[22](),noForm:e[6],view:e[0].properties.view,praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("invalid",e[52]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),2&n[0]&&(i.record=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.view=e[0].properties.view),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function nl(e){let t,n;return t=new Ro({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],record:e[1],value:e[22](),noForm:e[6],multi:e[0].properties.multi,numberInput:e[12],praefix:e[5],toDelete:e[15],reqQuantity:e[16],notifyList:e[18]}}),t.$on("blur",e[35]()),t.$on("invalid",e[51]),t.$on("record",e[36]),t.$on("multi",e[37]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),2&n[0]&&(i.record=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.multi=e[0].properties.multi),4096&n[0]&&(i.numberInput=e[12]),32&n[0]&&(i.praefix=e[5]),32768&n[0]&&(i.toDelete=e[15]),65536&n[0]&&(i.reqQuantity=e[16]),262144&n[0]&&(i.notifyList=e[18]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function il(e){let t,n;return t=new ao({props:{classId:e[7],disabled:e[3],formnovalidate:e[10],required:e[4],readonly:e[19],id:e[32],item:e[0],currency:e[17],value:e[22](),praefix:e[5],notifyList:e[18],noForm:e[6]}}),t.$on("blur",e[35]()),t.$on("formula",e[50]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),16&n[0]&&(i.required=e[4]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),131072&n[0]&&(i.currency=e[17]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),262144&n[0]&&(i.notifyList=e[18]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ol(e){let t,n;return t=new kr({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function rl(e){let t,n;return t=new Bs({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),record:e[1],noForm:e[6],placeholder:e[0].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.name=e[0].name),4194304&n[0]&&(i.value=e[22]()),2&n[0]&&(i.record=e[1]),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.placeholder=e[0].properties?.placeholder),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sl(e){let t,n;return t=new r({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),noForm:e[6],placeholder:e[0].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.name=e[0].name),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.placeholder=e[0].properties?.placeholder),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ll(e){let t,n;return t=new Dn({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[0],desc:e[23],value:e[22](),noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[48]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[49]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function al(e){let t,n;return t=new Hn({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[0],desc:e[23],values:e[22]()||[],noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[46]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[47]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.values=e[22]()||[]),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function cl(e){let t,n,i,o;const r=[al,ll,sl,rl,ol,il,nl,tl,el,Xs,Zs,Ks,Js,Ys,Qs,Gs,Hs,Us,Rs],s=[];function l(e,t){return"object"===e[0].type&&e[0].properties?.multi?0:"object"===e[0].type?1:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?2:"signature"===e[0].type?3:e[0].properties&&(e[0].properties.enum||e[0].properties.regulation)?4:"number"===e[0].type?5:e[0].properties&&e[0].properties.multi?6:e[0].properties&&e[0].properties.view&&"lookup"!==e[0].properties.format?7:"boolean"===e[0].type?8:"date"===e[0].type?9:"dateRange"===e[0].type?10:"datetime"===e[0].type?11:"map"===e[0].properties?.format?12:"lookup"===e[0].properties?.format?13:"time"===e[0].properties?.format?14:"email"===e[0].type||"email"===e[0].properties?.format?15:"url"===e[0].properties?.format?16:"tel"===e[0].properties?.format?17:18}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function dl(e){let t,n;return t=new Dn({props:{classId:e[7],eventId:e[8],disabled:!0,readonly:!0,id:e[32],item:e[0],value:e[22](),noList:!0,withRefValue:!0,refValue:e[21]}}),t.$on("setRefDesc",e[41]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),2097152&n[0]&&(i.refValue=e[21]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ul(e){let t,n,i,o;const r=[Ws,Vs,Ps,Os],s=[];function l(e,t){return e[5]||"reference"!==e[0].saveAs||"object"!==e[0].type?"html"===e[0].properties?.format?1:"divider"===e[0].type?2:3:0}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function ml(e,t,n){let i,o,r;const s=Q(),{FormField:l,TextField:a,DatePicker:d,TimePicker:u,Checkbox:m,Divider:p}=c;let{praefix:h=""}=t,{item:$}=t,{listName:g=""}=t,{record:v}=t,{recordId:y}=t,{noForm:w=!1}=t,{classId:b}=t,{eventId:x}=t,{disabled:k}=t,{selectionFields:I}=t,{formnovalidate:_}=t,{selection:S=!1}=t,{notifyList:C}=t,{numberInput:E}=t,{deList:N}=t,{required:L}=t,{isTemplate:j}=t,{toDelete:q}=t,{reqQuantity:D}=t,{currency:F}=t,{changeValue:T}=t,{propSelection:z}=t;y||=v._id;let{required:A,readonly:M,hidden:B,pattern:O,placeholder:P}=$.properties||{};if(B=!0===B,void 0!==M&&(M=!0===M),void 0===L&&(L=A),k=k||!!M,"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const V=(g?g+".":"")+$.name,W=V+(""!==h?"-"+h:""),R=(e,t=V)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};let U=R(v);return e.$$set=e=>{"praefix"in e&&n(5,h=e.praefix),"item"in e&&n(0,$=e.item),"listName"in e&&n(42,g=e.listName),"record"in e&&n(1,v=e.record),"recordId"in e&&n(2,y=e.recordId),"noForm"in e&&n(6,w=e.noForm),"classId"in e&&n(7,b=e.classId),"eventId"in e&&n(8,x=e.eventId),"disabled"in e&&n(3,k=e.disabled),"selectionFields"in e&&n(9,I=e.selectionFields),"formnovalidate"in e&&n(10,_=e.formnovalidate),"selection"in e&&n(11,S=e.selection),"notifyList"in e&&n(18,C=e.notifyList),"numberInput"in e&&n(12,E=e.numberInput),"deList"in e&&n(13,N=e.deList),"required"in e&&n(4,L=e.required),"isTemplate"in e&&n(14,j=e.isTemplate),"toDelete"in e&&n(15,q=e.toDelete),"reqQuantity"in e&&n(16,D=e.reqQuantity),"currency"in e&&n(17,F=e.currency),"changeValue"in e&&n(43,T=e.changeValue),"propSelection"in e&&n(44,z=e.propSelection)},e.$$.update=()=>{if(1&e.$$.dirty[0]|8192&e.$$.dirty[1]&&z&&$.properties?.selection){const{refClass:e,refItem:t,target:n}=$.properties.selection,i=z.record[e];s("propSelection",{itemName:$.name,itemType:$.type,prop:t,target:n,source:e,sourceId:i})}if(4096&e.$$.dirty[1])for(const e in T)e===V&&n(1,v[V]=T[e],v);2&e.$$.dirty[0]&&n(22,i=(e=V)=>{let t=R(v);return void 0===t?"":t}),2&e.$$.dirty[0]&&(r=R(v))},n(23,o=((e=V)=>{let t=v["_"+e];return t=f(t),void 0===t?"":t})()),[$,v,y,k,L,h,w,b,x,I,_,S,E,N,j,q,D,F,C,M,B,U,i,o,l,a,d,m,p,O,P,V,W,(e=V)=>{let t=R(v);return t?new Date(t):""===h?new Date:void 0},(e=V)=>{const t=R(v,e+"_from"),n=R(v,e+"_to");return{from:void 0===t?t:new Date(t),to:void 0===n?n:new Date(n)}},e=>({detail:t})=>{let{value:i,checked:o,range:l}=t;void 0!==o&&(i=o);const a=V+(l||"");n(1,v[a]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(i,"%d.%m.%Y"):i,v);const c=Object.values(v).every((e=>!e))&&i;s("notify",{oldValue:r,value:i,add:c,itemName:a,desc:t.description})},({detail:e})=>{s("record",e)},({detail:e})=>{s("multi",e)},()=>n(20,B=!0),()=>"object"===$.type?"comment_"+W:W,({detail:e})=>{n(21,U=e)},({detail:e})=>{const{designation:t}=$;n(23,o=t+": "+(e||"(Neu)"))},g,T,z,function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)}]}class fl extends _e{constructor(e){var t;super(),document.getElementById("svelte-zmu4lk-style")||((t=L("style")).id="svelte-zmu4lk-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em;color:black}.form-field div.field > label.checkbox{padding-top:0.5em}",S(document.head,t)),Ie(this,e,ml,ul,k,{praefix:5,item:0,listName:42,record:1,recordId:2,noForm:6,classId:7,eventId:8,disabled:3,selectionFields:9,formnovalidate:10,selection:11,notifyList:18,numberInput:12,deList:13,required:4,isTemplate:14,toDelete:15,reqQuantity:16,currency:17,changeValue:43,propSelection:44},[-1,-1])}}const{document:pl}=ve;function hl(e,t,n){const i=e.slice();return i[93]=t[n],i[95]=n,i}function $l(e,t,n){const i=e.slice();return i[102]=t[n],i}function gl(e,t,n){const i=e.slice();return i[97]=t[n].title,i[98]=t[n].toDelete,i[99]=t[n].icon,i}function vl(e){let t,n;return t=new e[19]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[yl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function yl(e){let t,n,i;function o(t){e[50](t)}let r={item:e[29],disabled:!0};return void 0!==e[11]&&(r.value=e[11]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&2048&i[0]&&(n=!0,o.value=e[11],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function wl(e){let t,n;return t=new e[19]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[bl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function bl(e){let t,n,i;function o(t){e[51](t)}let r={item:e[27],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function xl(e){let t,n;return t=new e[19]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[kl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1152&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function kl(e){let t,n,i;function o(t){e[52](t)}let r={item:e[25],disabled:!0,currency:e[7]};return void 0!==e[10]&&(r.value=e[10]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&1024&i[0]&&(n=!0,o.value=e[10],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Il(e){let t,n;return t=new e[22]({props:{class:e[16][e[95]],open:e[9]&&!e[1]&&0===e[95],$$slots:{handle:[ql,({toggle:e,open:t})=>({96:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,0,e?8:0]],default:[El,({toggle:e,open:t})=>({96:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){x(e[43](e[95],e[92]))&&e[43](e[95],e[92]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};65536&i[0]&&(o.class=e[16][e[95]]),514&i[0]&&(o.open=e[9]&&!e[1]&&0===e[95]),439293&i[0]|4104&i[3]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _l(e){let t,n;return t=new fl({props:{praefix:e[95],item:e[102],eventId:e[6],record:e[93],recordId:e[4]._id,reqQuantity:e[2],notifyList:e[8],noForm:Al,classId:e[5],disabled:e[0],required:e[23],selectionFields:e[30],propSelection:e[15],numberInput:e[18],currency:e[7],formnovalidate:e[95]===e[12].length-1||e[12][e[95]]._delete}}),t.$on("notify",(function(){x(e[32](e[102],e[95]))&&e[32](e[102],e[95]).apply(this,arguments)})),t.$on("task",e[53]),t.$on("invalid",e[33]),t.$on("defPrep",e[34]),t.$on("checkRange",e[35]),t.$on("formula",e[44](e[95])),t.$on("record",e[54]),t.$on("propSelection",e[45](e[95])),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};8&i[0]&&(o.item=e[102]),64&i[0]&&(o.eventId=e[6]),4096&i[0]&&(o.record=e[93]),16&i[0]&&(o.recordId=e[4]._id),4&i[0]&&(o.reqQuantity=e[2]),256&i[0]&&(o.notifyList=e[8]),32&i[0]&&(o.classId=e[5]),1&i[0]&&(o.disabled=e[0]),32768&i[0]&&(o.propSelection=e[15]),262144&i[0]&&(o.numberInput=e[18]),128&i[0]&&(o.currency=e[7]),4096&i[0]&&(o.formnovalidate=e[95]===e[12].length-1||e[12][e[95]]._delete),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sl(e){let t,n,i=e[3].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=_l($l(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1082429949&n[0]|24606&n[1]){let s;for(i=e[3].item,s=0;s<i.length;s+=1){const r=$l(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=_l(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Cl(e){let t,n,i=e[12][e[95]]._delete,o=Sl(e);return{c(){o.c(),t=F()},m(e,i){o.m(e,i),C(e,t,i),n=!0},p(e,n){4096&n[0]&&k(i,i=e[12][e[95]]._delete)?(me(),he(o,1,1,v),fe(),o=Sl(e),o.c(),pe(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){e&&E(t),o.d(e)}}}function El(e){let t,n,i,o,r=e[12].length,s=Cl(e);return{c(){t=L("div"),s.c(),i=D(),M(t,"id",n=`accordion-content-${e[5]}-${e[3].name}-${e[95]}`)},m(e,n){C(e,t,n),s.m(t,null),C(e,i,n),o=!0},p(e,i){4096&i[0]&&k(r,r=e[12].length)?(me(),he(s,1,1,v),fe(),s=Cl(e),s.c(),pe(s),s.m(t,null)):s.p(e,i),(!o||40&i[0]&&n!==(n=`accordion-content-${e[5]}-${e[3].name}-${e[95]}`))&&M(t,"id",n)},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(t),s.d(e),e&&E(i)}}}function Nl(e){let t,n,i,o,r,s=e[31](e[13],e[95])+"";return{c(){t=L("div"),n=q(s),M(t,"class",i=_("draggableListItem "+e[3].name)+" svelte-1es1ap1"),M(t,"draggable",!0),V(t,"delete",e[93]._delete),V(t,"is-active-top",e[17]?.top===e[95]),V(t,"is-active-bottom",e[17]?.bottom===e[95])},m(i,s){C(i,t,s),S(t,n),o||(r=[T(t,"dragover",e[41]),T(t,"dragleave",e[42](e[95])),T(t,"dragstart",e[39](e[95])),T(t,"drop",z(e[38](e[95]))),T(t,"dragenter",e[40](e[95]))],o=!0)},p(o,r){e=o,8192&r[0]&&s!==(s=e[31](e[13],e[95])+"")&&B(n,s),8&r[0]&&i!==(i=_("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&M(t,"class",i),4104&r[0]&&V(t,"delete",e[93]._delete),131080&r[0]&&V(t,"is-active-top",e[17]?.top===e[95]),131080&r[0]&&V(t,"is-active-bottom",e[17]?.bottom===e[95])},d(e){e&&E(t),o=!1,b(r)}}}function Ll(e){let t,n,i;var o=e[99];return o&&(t=new o({props:{size:"20"}})),{c(){t&&be(t.$$.fragment),n=F()},m(e,o){t&&xe(t,e,o),C(e,n,o),i=!0},p(e,i){if(o!==(o=e[99])){if(t){me();const e=t;he(e.$$.fragment,1,0,(()=>{ke(e,1)})),fe()}o?(t=new o({props:{size:"20"}}),be(t.$$.fragment),pe(t.$$.fragment,1),xe(t,n.parentNode,n)):t=null}},i(e){i||(t&&pe(t.$$.fragment,e),i=!0)},o(e){t&&he(t.$$.fragment,e),i=!1},d(e){e&&E(n),t&&ke(t,e)}}}function jl(e){let t,n,i,o,r,s=!e[0]&&!e[3].readonly&&Ll(e);return{c(){t=L("span"),s&&s.c(),M(t,"class","pointer icon svelte-1es1ap1"),M(t,"title",e[97]),t.hidden=n=e[95]===e[12].length-1||!(e[93]._delete^e[98])},m(n,l){C(n,t,l),s&&s.m(t,null),i=!0,o||(r=T(t,"click",(function(){x(e[37](e[95],e[9],e[96]))&&e[37](e[95],e[9],e[96]).apply(this,arguments)})),o=!0)},p(o,r){(e=o)[0]||e[3].readonly?s&&(me(),he(s,1,1,(()=>{s=null})),fe()):s?(s.p(e,r),9&r[0]&&pe(s,1)):(s=Ll(e),s.c(),pe(s,1),s.m(t,null)),(!i||4096&r[0]&&n!==(n=e[95]===e[12].length-1||!(e[93]._delete^e[98])))&&(t.hidden=n)},i(e){i||(pe(s),i=!0)},o(e){he(s),i=!1},d(e){e&&E(t),s&&s.d(),o=!1,r()}}}function ql(e){let t,n,i,o,r,s;n=new e[20]({props:{$$slots:{default:[Nl]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[36](e[96],e[95],e[9]))&&e[36](e[96],e[95],e[9]).apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:We},{title:"undo",toDelete:!1,icon:Oe}],a=[];for(let t=0;t<2;t+=1)a[t]=jl(gl(e,l,t));const c=e=>he(a[e],1,1,(()=>{a[e]=null}));return{c(){t=L("div"),be(n.$$.fragment),i=D();for(let e=0;e<2;e+=1)a[e].c();o=D(),M(t,"class",r=_("accordion "+e[3].name)+" svelte-1es1ap1"),M(t,"slot","handle")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i);for(let e=0;e<2;e+=1)a[e].m(t,null);S(t,o),s=!0},p(i,d){e=i;const u={};if(143368&d[0]|4096&d[3]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),4617&d[0]|64&d[1]|8&d[3]){let n;for(l=[{title:"löschen",toDelete:!0,icon:We},{title:"undo",toDelete:!1,icon:Oe}],n=0;n<2;n+=1){const i=gl(e,l,n);a[n]?(a[n].p(i,d),pe(a[n],1)):(a[n]=jl(i),a[n].c(),pe(a[n],1),a[n].m(t,o))}for(me(),n=2;n<2;n+=1)c(n);fe()}(!s||8&d[0]&&r!==(r=_("accordion "+e[3].name)+" svelte-1es1ap1"))&&M(t,"class",r)},i(e){if(!s){pe(n.$$.fragment,e);for(let e=0;e<2;e+=1)pe(a[e]);s=!0}},o(e){he(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)he(a[e]);s=!1},d(e){e&&E(t),ke(n),N(a,e)}}}function Dl(e){let t,n,i=(!e[1]&&!e[0]||e[95]<e[12].length-1)&&Il(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){!e[1]&&!e[0]||e[95]<e[12].length-1?i?(i.p(e,n),4099&n[0]&&pe(i,1)):(i=Il(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Fl(e){let t,n,i=e[12],o=[];for(let t=0;t<i.length;t+=1)o[t]=Dl(hl(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1082635263&n[0]|32767&n[1]|1073741824&n[2]|8&n[3]){let s;for(i=e[12],s=0;s<i.length;s+=1){const r=hl(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Dl(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function Tl(e){let t,n,i,o,r,s,l=e[28]&&e[11]&&0!=e[11]&&vl(e),a=e[26]&&e[14]&&0!=e[14]&&wl(e),c=e[24]&&e[10]&&0!=e[10]&&xl(e);return r=new e[21]({props:{class:e[5]+e[3].name,$$slots:{default:[Fl,({closeOtherPanels:e})=>({92:e}),({closeOtherPanels:e})=>[0,0,e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=L("div"),l&&l.c(),n=D(),a&&a.c(),i=D(),c&&c.c(),o=D(),be(r.$$.fragment),M(t,"class","formList")},m(e,d){C(e,t,d),l&&l.m(t,null),S(t,n),a&&a.m(t,null),S(t,i),c&&c.m(t,null),S(t,o),xe(r,t,null),s=!0},p(e,s){e[28]&&e[11]&&0!=e[11]?l?(l.p(e,s),2048&s[0]&&pe(l,1)):(l=vl(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[26]&&e[14]&&0!=e[14]?a?(a.p(e,s),16384&s[0]&&pe(a,1)):(a=wl(e),a.c(),pe(a,1),a.m(t,i)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),e[24]&&e[10]&&0!=e[10]?c?(c.p(e,s),1024&s[0]&&pe(c,1)):(c=xl(e),c.c(),pe(c,1),c.m(t,o)):c&&(me(),he(c,1,1,(()=>{c=null})),fe());const d={};40&s[0]&&(d.class=e[5]+e[3].name),504831&s[0]|1073741824&s[2]|4096&s[3]&&(d.$$scope={dirty:s,ctx:e}),r.$set(d)},i(e){s||(pe(l),pe(a),pe(c),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(a),he(c),he(r.$$.fragment,e),s=!1},d(e){e&&E(t),l&&l.d(),a&&a.d(),c&&c.d(),ke(r)}}}let zl=new Map;const Al=!0,Ml="pos/target";function Bl(e,t,i){let o,r;const{FormField:s,TextField:l,Button:a,Accordion:d,AccordionSection:u,Divider:m}=c,$=Q();let{list:g}=t,{mainSchema:v}=t,{schema:y}=t,{record:w}=t,{classId:b}=t,{eventId:x}=t,{disabled:k}=t,{fixed:I}=t,{template:_={}}=t,{reqQuantity:S}=t,{open:C=!1}=t,{currency:E}=t,{notifyList:N}=t;const L=y.find((e=>"price"===e.name&&!e.properties?.hidden)),j=y.find((e=>"amount"===e.name&&!e.properties?.hidden)),q=y.find((e=>"quantity"===e.name&&!e.properties?.hidden)),D=j||L&&q,F=D&&q;let T=0;const z=y.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let A=0;const M=y.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",B=!!M;let O=0;const P={};let V,W=y.properties?.readonly,R=b.split("form-")[1].slice(0,-4),U=new Map;g.group&&(I=!0);const H={};k||=W;let G,J,K=[],Z=[],X=!1,ee={},te=[];y.filter((e=>e.selection)).map((e=>K.push({className:R,parentClass:y,refClass:e.selection,value:""}))),y.filter((e=>e.refClass)).forEach((e=>{}));["readonly","hidden","required"].map((e=>{y.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[i,o]=n.split(".");o||(o=i,i=void 0),te.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));const ne=e=>e.slice(0,3).join(", "),oe=async(e,t,n)=>{const i=w[n];if(!i?.length)return;const o=i[0][n];if(!o)return;const r=await Oa(n,o);return r?r[g.name]:void 0},re=async(e,t)=>{const n=te.filter((e=>(e.refObj||R)===t||e.refName===t));if(n?.length)for(const t of n){const{itemName:n,refObj:o,refName:r,op:s}=t;let l,a,{action:c}=t,d=!1,u=!1;if(o){const t=G[e][o];o===R&&r?d=w:t&&(d=await Oa(o,t))}!o&&r&&(d=G[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1)),"!"===s&&(u=!u),"required"!==c&&"readonly"!==c||(c="required"===c?c:"disabled",setTimeout((()=>{l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field textarea`,a=document.querySelector(l),a||(l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field input`,a=document.querySelector(l)),a&&u&&a.setAttribute(c,""),a&&!u&&a.removeAttribute(c)}),0)),"hidden"===c&&(l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n}`,a=document.querySelector(l),a?.classList?.toggle("hidden",u),u&&i(12,G[e][n]="",G))}},se=(e,t)=>{let n=`#accordion-content-${b}-${g.name}-${e} .form-field:not(.hidden) .field :required:not(:disabled)`;const o=document.querySelectorAll(n);let r=!1;o.forEach((e=>{e.required&&""===e.value&&(r=!0)})),void 0===t&&(n=`#accordion-content-${b}-${g.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(n)&&(t=!0)),i(16,Z[e]=r||t?"invalid":"",Z)},le=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},ae=(e,t)=>{if(!t)return;const n=y.find((e=>e.name===t)),o=n.properties.value.formula,{operator:r,argument:s}=o,l=s.map((t=>G[e][t.refItem]||w[t.refItem]));let a=0;"$add"===r&&(a=l.reduce(((e,t)=>+(e||0)+ +(t||0)))),"$subtract"===r&&(a=l.reduce(((e,t)=>{e||(e=""),t||(t="");const[n,i]=e.split(":");e=i?(+n+ +i/60).toFixed(2):+(n||0);let[o,r]=t.split(":");return o||(o=0),e-=r?(+o+ +r/60).toFixed(2):+(o||0)}))),"$multiply"===r&&(a=l.reduce(((e,t)=>+(e||0)*+(t||0))));const c=`#accordion-content-${b}-${g.name}-${e} .form-field.${t} .field input`,d=document.querySelector(c),u=d?.disabled;i(12,G[e][t]="$multiply"===r?a?ce(a,n.properties?.decimals):"":ce(a,n.properties?.decimals),G),i(18,ee={item:n,value:a,idx:e}),setTimeout((()=>{const e=document.querySelector(c);u&&e&&e.setAttribute("disabled","")}),0)},ce=(e,t)=>("number"==typeof e&&e||(e=Number(e||0)),e.toFixed(t||0));J=y.filter((e=>e.refClass)).reduce(((e,t)=>{const n=y.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,i]=t.selection.split(":"),[o]=i?.split(".")||[];o&&e.push({refClass:o,items:[n],selection:t.selection})}const i={refClass:t.refClass,items:[]};return n.forEach((e=>{i.items.push(e.name)})),e.push(i),e}),[]);const de=async(e,t,n,o)=>{const r=(await J).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:s,items:l,selection:a}=r,c=t.name;if(te.find((e=>e.itemName===c))){const t=`#accordion-content-${b}-${g.name}-${e} .form-field.${s}.hidden`;if(document.querySelector(t))return}return n?Promise.all(l.map((async r=>{const c=y.find((e=>e.name===r));if(c.properties?.readonly&&!t.refInput){const n=G[e][t.refClass];return Promise.resolve(Oa(t.refClass,n,!0)).then((t=>{let n=t[r];Array.isArray(n)&&(n=n.length?n[0][r]:""),i(12,G[e][r]=n,G)}))}let d="";const{refInput:u}=t;if(u&&G[e]){const[t,n]=u.split(".");d=n?G[e][n]:w[t]}if(a&&n!==o)l.map((t=>{i(12,G[e][t]="",G)}));else if(u&&!d||ue(e,r)||o!==n){const n=y.find((e=>e.refClass===s)),o=G[e][n.name];if(t.selection){const n=Ba(t.selection+o.toString());if(n)return Promise.resolve(n).then((t=>i(12,G[e][r]=t[r],G)))}return Promise.resolve(Oa(n.refClass,o)).then((t=>i(12,G[e][r]=t[r],G)))}}))):Promise.resolve(l.map((t=>{i(12,G[e][t]="",G)})))},ue=(e,t)=>{let n=G[e][t];return"number"===y.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},me=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};let fe=!1;const pe=e=>!(!I&&e>=G.length-1),he=(e,t=!1)=>{const[n,i]=e.split(";");return g.name===i&&(!!pe(t)&&((!1===t||t!=n)&&parseInt(n)))};y.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=y.find((e=>e.name===t.refItem))||y.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))}));const $e=(e,t=!1)=>{const n=`#accordion-content-${b}-${g.name}-${e} > div.form-field:not(.hidden)`,i=document.querySelectorAll(n);if(!i?.length)return;const o=i[i.length-1];ie().then((()=>{const t=`#accordion-content-${b}-${g.name}-${e} textarea`;Array.from(document.querySelectorAll(t)).forEach(me)})).then((()=>{t&&o.scrollIntoView({behavior:"smooth",block:"end"})}))};return e.$$set=e=>{"list"in e&&i(3,g=e.list),"mainSchema"in e&&i(46,v=e.mainSchema),"schema"in e&&i(47,y=e.schema),"record"in e&&i(4,w=e.record),"classId"in e&&i(5,b=e.classId),"eventId"in e&&i(6,x=e.eventId),"disabled"in e&&i(0,k=e.disabled),"fixed"in e&&i(1,I=e.fixed),"template"in e&&i(48,_=e.template),"reqQuantity"in e&&i(2,S=e.reqQuantity),"open"in e&&i(9,C=e.open),"currency"in e&&i(7,E=e.currency),"notifyList"in e&&i(8,N=e.notifyList)},e.$$.update=()=>{24&e.$$.dirty[0]&&w&&(i(2,S=w.quantity),i(12,G=(w[g.name]||[]).concat({})),(e=>{i(15,V={record:e})})(w)),4096&e.$$.dirty[0]&&i(13,o=G),15368&e.$$.dirty[0]&&o&&((()=>{if(z)i(14,A=G?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(B)i(11,O=G?.reduce(((e,t)=>e+(t._delete?0:+(t[M]||0))),0)||0)})(),(()=>{if(D)i(10,T=G?.reduce(((e,t)=>{if(t.amount){const n=t.amount??0;e+=t._delete?0:+n}else if(t.price){const n=(F?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),ie().then((()=>$("save",{listName:g.name,value:G,amountValue:T,weeksValue:O})))),262144&e.$$.dirty[1]&&(r=e=>P[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[k,I,S,g,w,b,x,E,N,C,T,O,G,o,A,V,Z,X,ee,s,a,d,u,undefined,D,{name:"amountValue",properties:{decimals:2}},z,{name:"hoursValue",properties:{decimals:2}},B,{name:"weeksValue",properties:{decimals:1}},K,(e,t)=>{let n=e[t];return H["pos"+t]&&(n=H["pos"+t]),n&&y.filter((e=>!0!==e.properties?.hidden&&("dateRange"===e.type||void 0!==n[e.name])&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):Array.isArray(n[e.name])?ne(n[e.name]):"boolean"===e.type?h(n[e.name]):"dateRange"===e.type?((e,t)=>{let n,i;try{n=t[e+"_from"],n=new Date(n||"").toLocaleDateString(),"Invalid Date"===n&&(n=" ")}catch{n=" "}try{i=t[e+"_to"],i=new Date(i||"").toLocaleDateString(),"Invalid Date"===i&&(i="")}catch{i=""}return[n,i].filter((e=>""!==e)).join(" - ").trim()})(e.name,n):"date"===e.type?f(n[e.name]):"datetime"===e.type?p(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:n})=>{const{oldValue:r,value:s,add:l,desc:a}=n;if(g.refItem){const n=await oe(t,e,g.refItem);n&&i(12,G=n)}ae(t,e._formulaActor);const c=K?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,s)),s&&G.length===t+1&&i(12,G=G.concat({})),a&&i(49,P[s]=a,P),await de(t,e,s,r),await re(t,e.name),i(13,o=G),"number"===e.type&&i(18,ee={item:e,value:s,idx:t}),se(t)},({detail:e})=>{const{idx:t,value:n}=e;se(t,n)},async({detail:{className:e,itemName:t,value:i}})=>{if(U.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===R+"."+g.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&U.set(e,r[0])},({detail:e})=>{const{idx:t,fieldId:n,value:i}=e;if(!i)return;const o=le(i);let r=!1;G.forEach(((e,n)=>{if(t===n)return;const{start:i,end:s}=G[n];i&&s&&o>le(i)&&o<le(s)&&(r=!0)}));const s=document.getElementById(n);s?.classList?.toggle("invalid",r)},(e,t,n)=>n=>{G[t]._delete||(e(n),$e(t,!0))},(e,t,n)=>o=>{if(i(12,G[e]._delete=!G[e]._delete,G),G[e]._delete){H["pos"+e]={...G[e]};for(const t of y)i(12,G[e][t.name]="",G);t&&n(o)}else{if(H["pos"+e]){const t={};for(const n of y)t[n.name]=H["pos"+e][n.name];i(12,G[e]=t,G)}H["pos"+e]=void 0,t||n(o)}},e=>t=>{t.preventDefault(),i(17,X=!1);const n=he(t.dataTransfer.getData(Ml),e);if(!1===n)return;t.dataTransfer.dropEffect="move";const o=[...G].map(((e,t)=>(e._index=t,e)));n<e?(o.splice(e+1,0,o[n]),o.splice(n,1)):(o.splice(e,0,o[n]),o.splice(n+1,1)),o.map(((e,t)=>{return n=e._index,i=t,void zl.set(i,n);var n,i}));let r=[];Z.map(((e,t)=>{r[t]=Z[(e=>{const t=zl.get(e);return void 0===t?e:t})(t)]})),i(16,Z=r),i(12,G=o.map(((e,t)=>(delete e._index,e)))),fe=!1},e=>t=>{if(!pe(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Ml,e+";"+g.name),fe=e},e=>t=>{const n=he(t.dataTransfer.getData(Ml),e)||fe;return!1===n||n===e?i(17,X=!1):void i(17,X={top:n>e&&e,bottom:n<e&&e})},e=>e.preventDefault(),e=>e=>{i(17,X=!1)},(e,t)=>n=>{setTimeout((()=>{Array.from(U).forEach((([t,n])=>{G[e][t]||i(12,G[e][t]=n._id,G)}))}),500);const o=new Set;for(const e of te)o.add(e.refObj||R);for(const t of Array.from(o))re(e,t);t(n),$e(e)},e=>({detail:t})=>{ae(e,t.item.name)},e=>async({detail:t})=>{const{itemName:n,itemType:o,source:r,target:s,sourceId:l,prop:a}=t;if(!l)return void i(12,G[e][n]="",G);let c=await Oa(r,l);const d=c[a];c=await Oa(g.name,w[g.name][e][g.name]);const u=c[s];let m="number"===o?0:"",f=0;u.forEach((e=>{const t=e[a];t.length<=f||t.every((e=>d.find((t=>t===e))))&&(m=e[n],f=t.length)})),i(12,G[e][n]=m,G)},v,y,_,P,function(e){O=e,i(11,O)},function(e){A=e,i(14,A)},function(e){T=e,i(10,T)},function(t){Y(e,t)},function(t){Y(e,t)}]}class Ol extends _e{constructor(e){var t;super(),pl.getElementById("svelte-1es1ap1-style")||((t=L("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",S(pl.head,t)),Ie(this,e,Bl,Tl,k,{list:3,mainSchema:46,schema:47,record:4,classId:5,eventId:6,disabled:0,fixed:1,template:48,reqQuantity:2,open:9,currency:7,notifyList:8},[-1,-1,-1,-1])}}const{Boolean:Pl,document:Vl}=ve;function Wl(e,t,n){const i=e.slice();return i[137]=t[n],i}function Rl(e,t,n){const i=e.slice();return i[140]=t[n],i}function Ul(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Hl(e){let t,n,i=e[136]&&function(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g=e[1].items,v=[];for(let t=0;t<g.length;t+=1)v[t]=Ql(Rl(e,g,t));const y=e=>he(v[e],1,1,(()=>{v[e]=null}));let w=e[1].list&&Yl(e),x=!e[4]&&!e[2]&&e[45]&&e[5]&&!e[24]&&ra(e);d=new e[29]({props:{outline:!0,$$slots:{default:[la]},$$scope:{ctx:e}}}),d.$on("click",e[48]);const k=[ca,aa],I=[];function j(e,t){return e[7]?0:e[45]?1:-1}~(m=j(e))&&(f=I[m]=k[m](e));return{c(){t=L("section"),n=L("form"),i=L("input"),r=D();for(let e=0;e<v.length;e+=1)v[e].c();s=D(),w&&w.c(),l=D(),x&&x.c(),a=D(),c=L("div"),be(d.$$.fragment),u=D(),f&&f.c(),M(i,"class",_(e[35])+" svelte-e23pry"),M(i,"name","_id"),M(i,"type","hidden"),i.value=o=e[6]._id||"",M(n,"class",_(e[36])+" svelte-e23pry"),M(n,"id",e[35]),M(c,"class","form--buttons svelte-e23pry"),M(t,"class",_(e[37])+" svelte-e23pry")},m(o,f){C(o,t,f),S(t,n),S(n,i),S(n,r);for(let e=0;e<v.length;e+=1)v[e].m(n,null);S(n,s),w&&w.m(n,null),S(t,l),x&&x.m(t,null),S(t,a),S(t,c),xe(d,c,null),S(c,u),~m&&I[m].m(c,null),p=!0,h||($=[T(n,"keydown",e[53]),T(n,"submit",z(e[47]))],h=!0)},p(e,r){if((!p||64&r[0]&&o!==(o=e[6]._id||""))&&(i.value=o),17056834&r[0]|941367312&r[1]){let t;for(g=e[1].items,t=0;t<g.length;t+=1){const i=Rl(e,g,t);v[t]?(v[t].p(i,r),pe(v[t],1)):(v[t]=Ql(i),v[t].c(),pe(v[t],1),v[t].m(n,s))}for(me(),t=g.length;t<v.length;t+=1)y(t);fe()}e[1].list?w?(w.p(e,r),2&r[0]&&pe(w,1)):(w=Yl(e),w.c(),pe(w,1),w.m(n,null)):w&&(me(),he(w,1,1,(()=>{w=null})),fe()),e[4]||e[2]||!e[45]||!e[5]||e[24]?x&&(me(),he(x,1,1,(()=>{x=null})),fe()):x?(x.p(e,r),16777268&r[0]&&pe(x,1)):(x=ra(e),x.c(),pe(x,1),x.m(t,a));const l={};524288&r[4]&&(l.$$scope={dirty:r,ctx:e}),d.$set(l);let u=m;m=j(e),m===u?~m&&I[m].p(e,r):(f&&(me(),he(I[u],1,1,(()=>{I[u]=null})),fe()),~m?(f=I[m],f?f.p(e,r):(f=I[m]=k[m](e),f.c()),pe(f,1),f.m(c,null)):f=null)},i(e){if(!p){for(let e=0;e<g.length;e+=1)pe(v[e]);pe(w),pe(x),pe(d.$$.fragment,e),pe(f),p=!0}},o(e){v=v.filter(Pl);for(let e=0;e<v.length;e+=1)he(v[e]);he(w),he(x),he(d.$$.fragment,e),he(f),p=!1},d(e){e&&E(t),N(v,e),w&&w.d(),x&&x.d(),ke(d),~m&&I[m].d(),h=!1,b($)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[136]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Gl(e){let t,n;return t=new fl({props:{classId:e[35],item:e[140],selection:e[140].selection,record:e[6],disabled:e[24],eventId:e[44],toDelete:e[14],currency:e[10],changeValue:e[18]}}),t.$on("task",e[49]),t.$on("notify",e[50]),t.$on("safeReference",e[59]),t.$on("multi",e[51]),t.$on("defPrep",e[58]),t.$on("record",e[60]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[140]),2&n[0]&&(i.selection=e[140].selection),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),16384&n[0]&&(i.toDelete=e[14]),1024&n[0]&&(i.currency=e[10]),262144&n[0]&&(i.changeValue=e[18]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ql(e){let t,n,i="list"!==e[140].type&&Gl(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[140].type?i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=Gl(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Yl(e){let t,n,i,o,r,s=e[40]&&e[11]&&0!=e[11]&&Jl(e),l=e[12]&&Zl(e),a=e[41]&&e[17]&&0!=e[17]&&ea(e),c=e[1].list,d=[];for(let t=0;t<c.length;t+=1)d[t]=oa(Wl(e,c,t));const u=e=>he(d[e],1,1,(()=>{d[e]=null}));return{c(){s&&s.c(),t=D(),l&&l.c(),n=D(),a&&a.c(),i=D();for(let e=0;e<d.length;e+=1)d[e].c();o=F()},m(e,c){s&&s.m(e,c),C(e,t,c),l&&l.m(e,c),C(e,n,c),a&&a.m(e,c),C(e,i,c);for(let t=0;t<d.length;t+=1)d[t].m(e,c);C(e,o,c),r=!0},p(e,r){if(e[40]&&e[11]&&0!=e[11]?s?(s.p(e,r),2048&r[0]&&pe(s,1)):(s=Jl(e),s.c(),pe(s,1),s.m(t.parentNode,t)):s&&(me(),he(s,1,1,(()=>{s=null})),fe()),e[12]?l?(l.p(e,r),4096&r[0]&&pe(l,1)):(l=Zl(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[41]&&e[17]&&0!=e[17]?a?(a.p(e,r),131072&r[0]&&pe(a,1)):(a=ea(e),a.c(),pe(a,1),a.m(i.parentNode,i)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),18449734&r[0]|538976272&r[1]){let t;for(c=e[1].list,t=0;t<c.length;t+=1){const n=Wl(e,c,t);d[t]?(d[t].p(n,r),pe(d[t],1)):(d[t]=oa(n),d[t].c(),pe(d[t],1),d[t].m(o.parentNode,o))}for(me(),t=c.length;t<d.length;t+=1)u(t);fe()}},i(e){if(!r){pe(s),pe(l),pe(a);for(let e=0;e<c.length;e+=1)pe(d[e]);r=!0}},o(e){he(s),he(l),he(a),d=d.filter(Pl);for(let e=0;e<d.length;e+=1)he(d[e]);r=!1},d(e){s&&s.d(e),e&&E(t),l&&l.d(e),e&&E(n),a&&a.d(e),e&&E(i),N(d,e),e&&E(o)}}}function Jl(e){let t,n;return t=new e[30]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Kl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3072&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Kl(e){let t,n,i;function o(t){e[71](t)}let r={item:e[38],disabled:!0,currency:e[10]};return void 0!==e[11]&&(r.value=e[11]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1024&i[0]&&(o.currency=e[10]),!n&&2048&i[0]&&(n=!0,o.value=e[11],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Zl(e){let t,n;return t=new e[30]({props:{name:"Total MWSt "+(e[13]?"("+e[13]+"%)":""),nameClass:"formField_italic",$$slots:{default:[Xl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8192&n[0]&&(i.name="Total MWSt "+(e[13]?"("+e[13]+"%)":"")),5120&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Xl(e){let t,n,i;function o(t){e[72](t)}let r={item:e[39],disabled:!0,currency:e[10]};return void 0!==e[12]&&(r.value=e[12]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1024&i[0]&&(o.currency=e[10]),!n&&4096&i[0]&&(n=!0,o.value=e[12],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function ea(e){let t,n;return t=new e[30]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[ta]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ta(e){let t,n,i;function o(t){e[73](t)}let r={item:e[42],disabled:!0};return void 0!==e[17]&&(r.value=e[17]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&131072&i[0]&&(n=!0,o.value=e[17],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function na(e){let t,n;return t=new xi({props:{classId:e[35],open:!e[2]&&1===e[1].list.length,list:e[137],template:e[19],eventId:e[44],schema:e[137].item,record:e[6],disabled:e[24],currency:e[10]}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};6&n[0]&&(i.open=!e[2]&&1===e[1].list.length),2&n[0]&&(i.list=e[137]),524288&n[0]&&(i.template=e[19]),2&n[0]&&(i.schema=e[137].item),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),1024&n[0]&&(i.currency=e[10]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ia(e){let t,n;return t=new Ol({props:{classId:e[35],open:e[16],list:e[137],template:e[20],eventId:e[44],schema:e[137].item,mainSchema:e[1].item,record:e[6],disabled:e[24],fixed:e[137].fixed,reqQuantity:e[15],currency:e[10],notifyList:e[8]}}),t.$on("save",e[52]),t.$on("record",e[60]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.open=e[16]),2&n[0]&&(i.list=e[137]),1048576&n[0]&&(i.template=e[20]),2&n[0]&&(i.schema=e[137].item),2&n[0]&&(i.mainSchema=e[1].item),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),2&n[0]&&(i.fixed=e[137].fixed),32768&n[0]&&(i.reqQuantity=e[15]),1024&n[0]&&(i.currency=e[10]),256&n[0]&&(i.notifyList=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function oa(e){let t,n,i,o,r,s;t=new e[28]({props:{text:e[137].designation}});const l=[ia,na],a=[];function c(e,t){return"array"===e[137].type?0:1}return i=c(e),o=a[i]=l[i](e),{c(){be(t.$$.fragment),n=D(),o.c(),r=F()},m(e,o){xe(t,e,o),C(e,n,o),a[i].m(e,o),C(e,r,o),s=!0},p(e,n){const s={};2&n[0]&&(s.text=e[137].designation),t.$set(s);let d=i;i=c(e),i===d?a[i].p(e,n):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),o=a[i],o?o.p(e,n):(o=a[i]=l[i](e),o.c()),pe(o,1),o.m(r.parentNode,r))},i(e){s||(pe(t.$$.fragment,e),pe(o),s=!0)},o(e){he(t.$$.fragment,e),he(o),s=!1},d(e){ke(t,e),e&&E(n),a[i].d(e),e&&E(r)}}}function ra(e){let t,n,i,o;function r(t){e[74](t)}let s={title:"",$$slots:{default:[sa]},$$scope:{ctx:e}};return void 0!==e[23]&&(s.checked=e[23]),n=new e[31]({props:s}),K.push((()=>we(n,"checked",r))),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","askNext"),P(t,"margin-top","1em"),P(t,"margin-left","23em")},m(e,i){C(e,t,i),xe(n,t,null),o=!0},p(e,t){const o={};524288&t[4]&&(o.$$scope={dirty:t,ctx:e}),!i&&8388608&t[0]&&(i=!0,o.checked=e[23],re((()=>i=!1))),n.$set(o)},i(e){o||(pe(n.$$.fragment,e),o=!0)},o(e){he(n.$$.fragment,e),o=!1},d(e){e&&E(t),ke(n)}}}function sa(e){let t;return{c(){t=L("span"),t.textContent="Weiter erfassen",P(t,"margin-left",".75em")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function la(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function aa(e){let t,n,i,o,r,s;t=new e[29]({props:{class:"close",disabled:e[24],form:e[35],filled:!0,type:"submit",$$slots:{default:[da]},$$scope:{ctx:e}}});let l=e[5]&&!e[24]&&ua(e),a=e[2]&&e[3]&&fa(e),c=e[21]&&ha(e);return{c(){be(t.$$.fragment),n=D(),l&&l.c(),i=D(),a&&a.c(),o=D(),c&&c.c(),r=F()},m(e,d){xe(t,e,d),C(e,n,d),l&&l.m(e,d),C(e,i,d),a&&a.m(e,d),C(e,o,d),c&&c.m(e,d),C(e,r,d),s=!0},p(e,n){const s={};16777216&n[0]&&(s.disabled=e[24]),524288&n[4]&&(s.$$scope={dirty:n,ctx:e}),t.$set(s),e[5]&&!e[24]?l?(l.p(e,n),16777248&n[0]&&pe(l,1)):(l=ua(e),l.c(),pe(l,1),l.m(i.parentNode,i)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[2]&&e[3]?a?(a.p(e,n),12&n[0]&&pe(a,1)):(a=fa(e),a.c(),pe(a,1),a.m(o.parentNode,o)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),e[21]?c?(c.p(e,n),2097152&n[0]&&pe(c,1)):(c=ha(e),c.c(),pe(c,1),c.m(r.parentNode,r)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(t.$$.fragment,e),pe(l),pe(a),pe(c),s=!0)},o(e){he(t.$$.fragment,e),he(l),he(a),he(c),s=!1},d(e){ke(t,e),e&&E(n),l&&l.d(e),e&&E(i),a&&a.d(e),e&&E(o),c&&c.d(e),e&&E(r)}}}function ca(e){let t,n,i,o;t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[ka]},$$scope:{ctx:e}}}),t.$on("click",e[56]);let r=e[22]&&Ia(e);return{c(){be(t.$$.fragment),n=D(),r&&r.c(),i=F()},m(e,s){xe(t,e,s),C(e,n,s),r&&r.m(e,s),C(e,i,s),o=!0},p(e,n){const o={};524288&n[4]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o),e[22]?r?(r.p(e,n),4194304&n[0]&&pe(r,1)):(r=Ia(e),r.c(),pe(r,1),r.m(i.parentNode,i)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(t.$$.fragment,e),pe(r),o=!0)},o(e){he(t.$$.fragment,e),he(r),o=!1},d(e){ke(t,e),e&&E(n),r&&r.d(e),e&&E(i)}}}function da(e){let t;return{c(){t=q("Speichern und schliessen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ua(e){let t,n;return t=new e[29]({props:{form:e[35],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[ma]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ma(e){let t;return{c(){t=q("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function fa(e){let t,n;return t=new e[29]({props:{disabled:e[24],danger:!0,outline:!0,$$slots:{default:[pa]},$$scope:{ctx:e}}}),t.$on("click",e[62]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16777216&n[0]&&(i.disabled=e[24]),524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function pa(e){let t;return{c(){t=q("Löschen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ha(e){let t,n,i,o,r;const s=[ga,$a],l=[];t=function(e){return e[43]?0:1}(e),n=l[t]=s[t](e);let a=e[22]&&ba(e);return{c(){n.c(),i=D(),a&&a.c(),o=F()},m(e,n){l[t].m(e,n),C(e,i,n),a&&a.m(e,n),C(e,o,n),r=!0},p(e,t){n.p(e,t),e[22]?a?(a.p(e,t),4194304&t[0]&&pe(a,1)):(a=ba(e),a.c(),pe(a,1),a.m(o.parentNode,o)):a&&(me(),he(a,1,1,(()=>{a=null})),fe())},i(e){r||(pe(n),pe(a),r=!0)},o(e){he(n),he(a),r=!1},d(e){l[t].d(e),e&&E(i),a&&a.d(e),e&&E(o)}}}function $a(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[va]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[54](e[0]))&&e[54](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ga(e){let t,n;return t=new d({props:{text:e[43],extended:!0,$$slots:{default:[wa]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function va(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent=`${e[61]()}`,be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function ya(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent=`${e[61]()}`,be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function wa(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[ya]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[54](e[0]))&&e[54](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ba(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[xa]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[55](e[0]))&&e[55](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function xa(e){let t,n,i;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Daten",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function ka(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Erstellen",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function Ia(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[_a]},$$scope:{ctx:e}}}),t.$on("click",e[57]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function _a(e){let t,n,i;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Daten",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function Sa(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ca(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Ea(e){let t;return{c(){t=q("Ja, bitte löschen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Na(e){let t,n,i,o,r,s,l,a,c;return s=new e[29]({props:{filled:!0,$$slots:{default:[Ca]},$$scope:{ctx:e}}}),s.$on("click",e[75]),a=new e[29]({props:{danger:!0,outline:!0,$$slots:{default:[Ea]},$$scope:{ctx:e}}}),a.$on("click",e[64]),{c(){t=L("p"),t.textContent="Willst du diese Daten löschen?",n=D(),i=L("p"),i.textContent="Das kann nicht rückgängig gemacht werden.",o=D(),r=L("div"),be(s.$$.fragment),l=D(),be(a.$$.fragment),M(r,"class","flex_div svelte-e23pry")},m(e,d){C(e,t,d),C(e,n,d),C(e,i,d),C(e,o,d),C(e,r,d),xe(s,r,null),S(r,l),xe(a,r,null),c=!0},p(e,t){const n={};524288&t[4]&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const i={};524288&t[4]&&(i.$$scope={dirty:t,ctx:e}),a.$set(i)},i(e){c||(pe(s.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(s.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){e&&E(t),e&&E(n),e&&E(i),e&&E(o),e&&E(r),ke(s),ke(a)}}}function La(e){let t,n,i;return n=new Ee({props:{size:"25"}}),{c(){t=L("div"),be(n.$$.fragment),M(t,"slot","title-icon")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function ja(e){let t,n;return t=new e[27]({props:{title:"Bestätigung",closeCallback:e[135],danger:!0,$$slots:{"title-icon":[La],default:[Na]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[4]&&(i.closeCallback=e[135]),524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function qa(e){let t,n,i,o,r,s;Vl.title=t=e[25];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Sa,then:Hl,catch:Ul,value:136,blocks:[,,,]};function a(t){e[76](t)}$e(e[46](),l);let c={$$slots:{default:[ja,({closeCallback:e})=>({135:e}),({closeCallback:e})=>[0,0,0,0,e?2048:0]]},$$scope:{ctx:e}};return void 0!==e[9]&&(c.open=e[9]),o=new e[26]({props:c}),K.push((()=>we(o,"open",a))),{c(){n=D(),l.block.c(),i=D(),be(o.$$.fragment)},m(e,t){C(e,n,t),l.block.m(e,l.anchor=t),l.mount=()=>i.parentNode,l.anchor=i,C(e,i,t),xe(o,e,t),s=!0},p(n,i){e=n,(!s||33554432&i[0])&&t!==(t=e[25])&&(Vl.title=t),ge(l,e,i);const a={};526336&i[4]&&(a.$$scope={dirty:i,ctx:e}),!r&&512&i[0]&&(r=!0,a.open=e[9],re((()=>r=!1))),o.$set(a)},i(e){s||(pe(l.block),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(o.$$.fragment,e),s=!1},d(e){e&&E(n),l.block.d(e),l.token=null,l=null,e&&E(i),ke(o,e)}}}let Da=new Map,Fa=new Map,Ta=new Map;const za=(e,t)=>{const i=t;return Da.has(i)||Da.set(i,n.getTasksList(t).then((({data:e})=>e))),Da.get(i)},Aa=(e,t,i,o=!1)=>Fa.get(i)||o?n.getTaskList(e,i).then((e=>(Fa.set(i,e),e))):za(e,t).then((t=>t.find((({_id:e})=>e===i))||n.getTaskList(e,i))).then((e=>(Fa.set(i,e),e))),Ma=(e,t)=>{Ta.set(e,t)},Ba=e=>Ta.get(e),Oa=(e,t,i=!1)=>!i&&Ta.get(t)||n.getTask(e,t).then((e=>(Ta.set(t,e),e))),Pa=(e,t)=>{if(!Da.get(t))return;const i=t;Da.set(i,n.getTasksList(t).then((({data:e})=>e)))};function Va(e,r,a){let d,f,p,h,v,y,w,b;I(e,m,(e=>a(87,v=e))),I(e,l,(e=>a(88,y=e))),I(e,o,(e=>a(89,w=e)));const{Modal:x,Dialog:k,Divider:_,Button:S,FormField:C,Checkbox:E}=c,{loggedIn:N,currentTasks:L,environment:j}=u;I(e,N,(e=>a(90,b=e))),I(e,L,(e=>a(85,p=e))),I(e,j,(e=>a(86,h=e)));const q=JSON.parse(t.getItem("Locale")),D=Q();let F,T,z,A,M,{schema:B}=r,{recID:O}=r,{deletable:P}=r,{prevEventID:V=!1}=r,{prev:W=!1}=r,{taskId:R=!1}=r,{description:U=""}=r,{root:Y=!1}=r,{readonly:J}=r,{isStandalone:K}=r,Z={},X={},ee="form-"+B.class+Math.floor(9e3*Math.random()+1e3).toString(),te=!1;const ne=Y?"fEmbedded":"fTask",oe=Y?"sEmbedded":"sTask";let re="CHF";let se,le,ae=0,ce=0,de=0,ue=0,me=1,fe=!O&&B.list&&1===B.list.length;const pe={},he=B.items.find((e=>"price"===e.name&&!e.properties?.hidden)),$e=B.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),ge=B.items.find((e=>"amount"===e.name&&!e.properties?.hidden)),ve=!!he||!!ge,ye=B.list?.filter((e=>"array"===e.type))?.length>1||ve,we=B.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,be=!!we,xe=B.list?.filter((e=>"array"===e.type))?.length>1||be,ke={},Ie=B.result?.resultDef[0].button?.description;let _e,Se,Ce,Ee,Ne=0,Le=0,je=[],qe=[],De=[],Fe={},Te=new Map,ze=B.class,Ae=B.id,Me=!1,Be=-1!==window.location.search.indexOf("next=");const Oe=!p?.length||p.find((e=>e===Ae));["readonly","hidden","required"].map((e=>{B.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");je.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));B.items.filter((e=>e.selection&&e.constraint)).map((e=>{qe.push({name:e.name,selection:e.selection,constraint:e.constraint})}));B.items.filter((e=>e.lookup)).forEach((e=>{De.push({name:e.name,lookup:e.lookup})})),B.items.filter((e=>e.properties?.lookup)).forEach((e=>{De.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}));const Pe=async e=>{if(e?.length)for(const t of e){if(!t.lookup)break;const{name:e}=t;if(Z[e])break;const{domain:i,value:o}=t.lookup;if("user"===i&&o){const t=b.user,i={[o]:t},r=await n.getSectionView(e,i);if(r?.length){const[{_id:t}]=r;t&&a(6,Z[e]=t,Z)}}}},Ve=async e=>{if(!B.input)return;if(!B.input.length)return;if(B.input.length<2)return;const t=!e.input.class[0].name&&e.input.class[0].selection;if(!t)return;const i=e.input.class[1].name,[o,r]=e.input.class[1].destination?.split(".");if(!i||!r)return;const s=B.list?.find((e=>e.name===o));if(!s)return;const l=await n.getSchemaByClass(t),c=(await n.getTasks(l.id)).data;if(!c?.length)return;const d=[];for(const e of c)if(e.active??1){const t={};for(const n of s.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);d.push(t)}d.length&&a(6,Z[o]=d,Z)},We=async()=>{for(const e of B.items)"boolean"==typeof e.properties?.value&&a(6,Z[e.name]=e.properties.value,Z),e.properties?.value?.concatenation&&Re(e);for(const e of B.list||[])for(const t of e.item)if("array"!==e.type&&"owner"===t.refItem){const i=await n.getSolitaire(t.refItem);i?.length&&(Z[e.name]||a(6,Z[e.name]={},Z),a(6,Z[e.name][t.name]=g(i[0],t.refPos||t.name),Z))}},Re=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await He(e.refItemNext));a(6,Z[e.name]=n,Z)},Ue=async e=>{const t=je.filter((t=>t.refObj===e));if(t?.length){a(18,Fe={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:r}=e;if(!n)break;let s,l,c=!i&&Z[n];const d=Z[n];d&&i&&(c=(await Oa(n,d))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==r&&"readonly"!==r||(r="required"===r?r:"disabled",setTimeout((()=>{s=`#${ee} .form-field.${t} .field #${t}`,l=document.querySelector(s),l&&c&&l.setAttribute(r,""),l&&!c&&l.removeAttribute(r)}),0)),"hidden"===r&&(s=`#${ee} .form-field.${t}`,l=document.querySelector(s),l?.classList?.toggle("hidden",!!c),c&&a(18,Fe[t]="",Fe))}}},He=async e=>{const[t,i]=e.offset?.split(",")||[0,0],o=+e.base||0,r=+e.step||1;e.type;const s=e.refItem,l=await n.getLastId(B.class,s);if(!l?.length)return(o+r).toString().padStart(i,"0");const a=l[0][s];return((+a?.substring(t,t+i)||o)+r).toString().padStart(i,"0")},Ge=(e,t,n,i=!1)=>{const o=n||t.name,r=o.startsWith("_")?o:o.split("_")[0],s=e.find((e=>e.name===r));let l=t.value;if(!s)return l;if(i||"signature"!==s.type&&!s.properties?.multi||(l=Z[o]),"dateRange"===s.type){if(null===l)return;let e=new Date(l);if("Invalid Date"==e)return;return e=`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T00:00:00.000Z`,new Date(e).toISOString()}if(l&&s.type.startsWith("date"))try{return Yn(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if("boolean"===s.type&&(l=!!t.checked),"number"===s.type){const e=Number("1.1").toLocaleString(q.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},Qe=()=>!z&&V?window.history.back():Ye(),Ye=()=>K?window.close():Y?window.singleSpaNavigate("/"):D("back"),Je=async(e,t)=>{if(B.input&&B.input.length>1){if(B.input[0]!==e)return;const{name:i,source:o,destination:r,selection:s}=Ce.input.class[1];if(o&&r){const n=await Oa(e,t);if(!n)return void a(6,Z[r]=[],Z);const l=await Oa(s,n[s]);if(!l)return;const c=l[o]?.map((e=>({[i]:e[i]})));if(!c)return;return void a(6,Z[r]=c,Z)}const{recursive:l}=Ce.input.class[1];if(t){const i=await n.getTaskOptions(`${e}:${t}`,Ae,l);a(6,Z={...Z,...i})}else{const e=B.input.slice(1);for(const t of e)a(6,Z[t]=[],Z)}}},Ke=()=>{let e=0;if(he){let t=1;$e&&(t=me),e=ue*t}ge&&(e=ue);let t=0;for(const e in pe)t+=pe[e];a(11,ae=t+e)},Ze=()=>{let e=0;for(const t in ke)e+=ke[t];a(17,Ne=e+ +Le)};i.subscribe((async e=>{if(!e)return;if(!O)return;const t=await n.getSchema(e.eventId);if(!t)return;const i=B.list?.find((e=>e.name===t.class));if(!i)return;const o=await n.getTaskById(e.taskId);((e,t,n)=>{if(!Da.get(e))return;const i=t;Fa.set(i,n)})(o.event,o.docId,o.data);const r=await n.getTask(t.class,o.docId),s=Z[t.class].filter((e=>e[t.class]==r._id));s?.length&&s.map((e=>{e[t.class]=o.docId})),a(6,Z),a(70,T),a(69,F),a(1,B)})),H((()=>{Da=new Map,Fa=new Map,Ta=new Map,Xe()}));const Xe=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(ee))&&++n<20;)await e(50);t&&(()=>{if(O)return;const e=new Set;for(const t of je)e.add(t.refObj||ze);Array.from(e).forEach((e=>Ue(e)))})(),et()},et=()=>{setTimeout((()=>{Array.from(Te).forEach((([e,t])=>{Z[e]||a(6,Z[e]=t._id,Z)}))}),350)};G((()=>{O&&function(e,t,n=t){e.set(n)}(m,v={[O]:{record:Z,lists:X}},v)}));const tt=()=>{const e={};Array.from(document.querySelectorAll("form#"+ee+" ."+ee)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,i]=t.name.split("."),o=B.list.find((e=>e.name===n));e[t.name]=Ge(o.item,t)}else e[t.name]=Ge(B.items,t,t.name.split("_")[0])})),B.list&&B.list.map((t=>{"array"===t.type&&X[t.name]&&(e[t.name]=X[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,i])=>("_delete"!==n&&(e[n]=Ge(t.item,{name:n,value:i,checked:i},"",!0)),e)),{}))),[]))}));let t=!0;return Object.entries(e).map((([e,n])=>{e=e.split("_")[0];const i=B.items.find((t=>t.name===e));i?.properties?.required&&!n&&(t=!1)})),t&&e},nt=e=>{const t="/api/report/list/"+e;window.open(t,"_self","width=1 height=1")},it=()=>{a(9,te=!1)};return e.$$set=e=>{"schema"in e&&a(1,B=e.schema),"recID"in e&&a(2,O=e.recID),"deletable"in e&&a(3,P=e.deletable),"prevEventID"in e&&a(67,V=e.prevEventID),"prev"in e&&a(4,W=e.prev),"taskId"in e&&a(0,R=e.taskId),"description"in e&&a(65,U=e.description),"root"in e&&a(5,Y=e.root),"readonly"in e&&a(66,J=e.readonly),"isStandalone"in e&&a(68,K=e.isStandalone)},e.$$.update=()=>{16&e.$$.dirty[2]&&a(24,d=J),2&e.$$.dirty[0]|384&e.$$.dirty[2]&&T&&F&&B.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const i=F.items.find((t=>t.name===e));if(!i)return;if(t!==i.type)return;const o="_"+e;T[e]?a(6,Z[e]=T[e],Z):a(6,Z[e]="",Z),T[o]&&a(6,Z[o]=T[o],Z),a(16,fe=!1)})),32&e.$$.dirty[0]|8&e.$$.dirty[2]&&a(25,f=Y?U||"enablerr - Form":document.title)},[R,B,O,P,W,Y,Z,z,M,te,re,ae,ce,de,se,le,fe,Ne,Fe,_e,Se,Me,Ee,Be,d,f,x,k,_,S,C,E,N,L,j,ee,ne,oe,{name:"amountValue",properties:{decimals:2}},{name:"taxValue",properties:{decimals:2}},ye,xe,{name:"weekValue",properties:{decimals:1}},Ie,Ae,Oe,async()=>{if(a(20,Se=[]),h.currency?a(10,re=h.currency.designation):n.getSectionView("owner",{}).then((e=>{e?.length&&e[0].currency&&n.getSectionView("currency",{_id:e[0].currency}).then((e=>{e?.length&&e[0].designation&&a(10,re=e[0].designation)}))})),Ce=await n.getEvent(Ae),O||(a(19,_e=Se),Pe(Ce.input?.class),We(),Ve(Ce)),O){if(v&&v[O]){const e=v[O].record;B.items.map((t=>{e[t.name]=Ge(B.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(6,Z=e),B.list&&B.list.map((e=>{"array"===e.type&&v[O].lists[e.name]&&a(6,Z[e.name]=v[O].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Ge(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]),Z)}))}else a(6,Z=await n.getTask(B.class,O));a(65,U=$(B,Z)),a(21,Me=!!B.result?.resultDef&&!B.result.resultDef[0].createAfterSave),a(12,ce=Z._tax?._amount),a(13,de=100*Z._tax?._rate||"")}if(V){a(66,J=!1),a(69,F=await n.getSchema(V)),"string"==typeof W&&a(70,T=await n.getTask(F.class,W));const e=B.items.find((e=>e.refClass===F.class));a(6,Z[e.name]=T._id,Z)}if(xe&&(Le=Z[we]||0),Ce.trigger?.startOn&&!Ce.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(66,J=!0),y.role?.length&&B.authorization?.length){const e=B.authorization.some((e=>w?.find((t=>t===e.role&&"edit"===e.activity))));a(66,J||=!e)}if(a(7,z="report"===Ce.output.type),h.userSetting){const e=h.userSetting;if(a(22,Ee=e.isAdmin),!Ee){const e=b.tenants.find((e=>e._id===b.tenant));e&&a(22,Ee=e.admin?.find((e=>e===b.user)))}}else n.getUserSettings().then((e=>{if(a(22,Ee=e.isAdmin),!Ee){const e=b.tenants.find((e=>e._id===b.tenant));e&&a(22,Ee=e.admin?.find((e=>e===b.user)))}}));return!0},async e=>{O||a(24,d=!0);const t=e.submitter?.className?.includes("close"),i={};if(Array.from(document.querySelectorAll("form#"+ee+" ."+ee)).map((e=>{if(e.name)if(e.name.includes(".")){const t=e.name.split(".")[0],n=B.items.find((e=>e.name===t));if(n&&"object"===n.type&&n.properties?.multi)i[t]=(i[t]||[]).concat(e.value);else{const[t,n]=e.name.split("."),o=B.list.find((e=>e.name===t));i[e.name]=Ge(o.item,e)}}else i[e.name]=Ge(B.items,e);else if(e.id){"signature"===B.items.find((t=>t.name===e.id)).type&&(e.name=e.id,i[e.name]=Ge(B.items,e))}})),B.list&&B.list.map((e=>{"array"===e.type&&X[e.name]&&(i[e.name]=X[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Ge(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]))})),i._event=Ae,i._prevEventId=V,i._taskId=R,A){const e=A.record;for(const t in e)t.includes(".")&&delete e[t];e._event=A.event,e._taskId=A.taskId;const{id:t}=await n.saveData(A.class,e);i[A.class]||(i[A.class]=t)}const{id:o,task:r,tax:l,error:c}=await n.saveData(B.class,i);if(c?.text){const e=c.field?" in "+c.field+": "+c.value:"";return s.failed(`${c.text} ${e}`,3e3),void a(24,d=!1)}s.success("Die Daten wurden gespeichert.",2e3),a(12,ce=l?._amount||0),a(13,de=100*(l?._rate||0)||""),i._id=o;const u=await n.getTaskList(B.class,o);if(D("choose",{row:u}),t)return Ye();if(!O){if(Be){const e=Math.floor(9e3*Math.random()+1e3).toString();return window.singleSpaNavigate(`/task/${Ae}/${Ae}/task?next=${e}`)}return window.singleSpaNavigate(`/task/${Ae}/${r}/task`)}},Qe,async({detail:e})=>{const{row:t}=e;let{eventId:i}=e;if((()=>{if(O)for(const e of je)e.refName||Ue(e.itemName)})(),await(async e=>{let t,i=!1;const o={...Z};for(const r of B.items)if(r.refItem&&(!e||r.properties?.linkOnly)){const[e,s]=r.refItem.split(".");Z[e]?(t=await n.getTask(e,Z[e]),t&&(o[r.name]=s?t[s][r.name]:t[r.name],i=!0)):s&&(o[r.name]="",i=!0)}for(const r of B.list||[])if((!e||r.properties?.linkOnly)&&r.refItem&&Z[r.refItem]){t=await n.getTask(r.refItem,Z[r.refItem]);const e=[];for(const n of t[r.name]){const t={};for(const e of r.item)n[e.name]&&(t[e.name]=n[e.name]);e.push(t),i=!0}o[r.name]=e}i&&a(6,Z=o)})(!!O),O)return;if(i||=t._task?.event,i&&(await(async(e,t)=>{if(!e)return;const i=(await n.getEvent(e)).output.class[0].name,o=De.filter((e=>e.lookup===i));if(o?.length)for(const e of o){const{lookup:n,name:i}=e;let o="";if(t){let e=await Oa(n,t);e&&e[i]?.length&&(o=e[i][0][i])}a(6,Z[i]=o,Z)}})(i,t._id),B.items.filter((e=>e.properties?.lookup)).forEach((async e=>{const t=await n.getEvent(i);t.output.class[0]?.name===e.properties.lookup&&a(6,Z[e.name]="",Z)}))),!t._task)return;const o=t._task.event,r=await n.getEvent(o);if(!Ce.output?.class?.length)return;const s=Ce.output.class[0]?.item.find((e=>(e.refClass||e.name)===r.output.class[0]?.name));(Ce.input?.class?.length&&Ce.input.class[0].name===r.output.class[0]?.name||s?.asInput)&&(a(69,F=await n.getSchema(o)),a(67,V=o),a(0,R=t._task._id),R&&t._task.docId?a(70,T=await n.getTask(F.class,t._task.docId)):a(70,T={}),Je(F.class,t?._task?.docId))},async({detail:e})=>{if(a(8,M=e),"quantity"===e.itemName&&a(15,le=Z.quantity),(async(e,t)=>{const n=qe.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(14,se=!1);for(const i of n){const{selection:n,constraint:o,name:r}=i;if(t)break;a(6,Z[r]="",Z),e===n&&a(14,se=o);const s=Z[n];if(s&&e===o){let e=await Oa(n,s);const t=Z[o];if(t?.length){const n=t[0].split(", ");e=e[o];let i="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(i=t[r])}));a(6,Z[r]=i,Z)}}}}})(e.itemName,e.oldValue===e.value),Ue(e.itemName),xe&&we&&(e.itemName===we&&(Le=+e.value),Ze()),ve&&ye){if(e.itemName===he?.name)ue=e.value;else if(e.itemName===$e?.name)me=e.value;else{if(e.itemName!==ge?.name)return;ue=e.value}Ke()}},async({detail:e})=>{if(!(B.input?.length&&B.input.length>1))return;if(F?.class!==B.input[0])return;const{value:t,lookup:i,view:o}=e;if(!i)return;const[r]=i.split(":"),s=(await n.getSectionView(r,{[o]:{$in:t}})).map((e=>e._id));for(const e of B.input.slice(1)){a(6,Z[e]=[],Z);const t=await n.getSchemaByClass(e);t.id;let i=await n.getTasks(t.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&s.includes(e[r]))),i?.length){const t=i.map((e=>e._id)),o=await n.getSectionView(e,{_id:{$in:t}});for(const t of o)t[e]=t._id;a(6,Z[e]=o,Z)}}},({detail:e})=>{X[e.listName]=e.value,ye&&(pe[e.listName]=e.amountValue,Ke()),xe&&(ke[e.listName]=e.weeksValue||0,Ze())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},e=>async()=>{const t=await n.getReportDoc(e)||{},{userReportId:i,type:o}=t;if(!i)return;const r="/api/userreport/"+i;if("ics"===o)return window.open(r,"_self","width=1 height=1");const s="/viewer/doc/index.html?file="+r+"&type="+o;window.open(s,"","popup=yes toolbar=no width=624 height=900")},e=>async()=>{const e=await n.getDocData(R);(async e=>{const t=window.screen.height,n=window.open("","_blank","width=800,height="+t+",location=no");await ie(),n?.document.write("<title>Report Daten für '"+B.identity.designation+"'</title>"),n?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+e+"</textarea>")})(JSON.stringify(e,null,4),B.identity.designation)},async()=>{const e=tt();if(!e)return;const t=Ce.result?.resultDef[0]?.addToReports;if(t){const i=e[t];if(i){const t={docId:i},o=(await n.getSectionView("_task",t))[0];e._taskId=o._id}}const{reportId:i,type:o}=await n.createReport(Ae,e);nt(i),setTimeout(Ye,2e3)},async()=>{const e=tt();if(!e)return;const t=await n.getReportData(Ae,e),i=window.screen.height,o=window.open("","_blank","width=800,height="+i+",location=no");await ie(),o?.document.write("<title>Report Daten für '"+B.identity.designation+"'</title>"),o?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+JSON.stringify(t,null,4)+"</textarea>")},async({detail:{className:e,itemName:t,value:i}})=>{if(ze!==i)return;if(!e)return;if(Te.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===ze))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&Te.set(e,r[0])},({detail:e})=>{A=e},({detail:e})=>{setTimeout((()=>{a(6,Z[e.itemName]=e.value,Z)}),200)},()=>B.result.resultDef[0].button?.designation||"Dokument erstellen",()=>{a(9,te=!0)},it,async()=>{if(ze&&O){(await n.deleteData(ze,O)).taskId?(s.success("Die Daten wurden gelöscht.",3e3),Qe()):s.failed("Die Daten können nicht gelöscht werden!",3e3)}it()},U,J,V,K,F,T,function(e){ae=e,a(11,ae)},function(e){ce=e,a(12,ce)},function(e){Ne=e,a(17,Ne)},function(e){Be=e,a(23,Be)},()=>it(),function(e){te=e,a(9,te)}]}class Wa extends _e{constructor(e){var t;super(),Vl.getElementById("svelte-e23pry-style")||((t=L("style")).id="svelte-e23pry-style",t.textContent="form.disabled.svelte-e23pry input.svelte-e23pry{background-color:red !important}input:placeholder-shown{font-style:italic}form.svelte-e23pry.svelte-e23pry{min-width:25em}hr[data-text]{margin-bottom:1em !important}@media only screen and (min-width: 600px){form.svelte-e23pry.svelte-e23pry{min-width:30em}}.fEmbedded.svelte-e23pry.svelte-e23pry,.fTask.svelte-e23pry.svelte-e23pry{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-e23pry.svelte-e23pry{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-e23pry.svelte-e23pry{height:fit-content;max-height:70vh}.sTask.svelte-e23pry.svelte-e23pry{height:95%;display:inline-grid}.sTask.svelte-e23pry .btn.svelte-e23pry{display:initial !important}.form--buttons.svelte-e23pry.svelte-e23pry{display:flex;gap:1em;padding-top:0.75em}.flex_div.svelte-e23pry.svelte-e23pry{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}section.sTask div.date-picker div.dropdown-shell div.dropdown.calendar{position:fixed !important;left:auto !important}form.fTask div.form-field{min-width:49vw}",S(Vl.head,t)),Ie(this,e,Va,qa,k,{schema:1,recID:2,deletable:3,prevEventID:67,prev:4,taskId:0,description:65,root:5,readonly:66,isStandalone:68},[-1,-1,-1,-1,-1])}}function Ra(e){let t,n,i;function o(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new Wa({props:r}),K.push((()=>we(t,"description",o))),t.$on("back",e[2]),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};32&i&&(o.schema=e[5]),64&i&&(o.recID=e[6]),!n&&1&i&&(n=!0,o.description=e[0],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Ua(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ra,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,[n]){const i={};1&n&&(i.description=e[0]),353&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ha(e,t,i){let o,{refresh:r}=t;return e.$$set=e=>{"refresh"in e&&i(3,r=e.refresh)},[o,(e,t)=>n.getSchema(e).then((n=>({schema:n,recID:t,eventID:e,title:n.identity.designation}))),e=>{},r,function(e){o=e,i(0,o)}]}function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qa,Ya,Ja=(Qa=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=i(i({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var o=Object.keys(s),r=Object.keys(e).reduce((function(t,n){return o.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var o=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=o();t.instance=new e.component(i(i({},r),{},{target:s,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},Qa(Ya={exports:{}},Ya.exports),Ya.exports);const Ka=Ga(Ja)({component:class extends _e{constructor(e){super(),Ie(this,e,Ha,Ua,k,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Za,mount:Xa,unmount:ec}=Ka;e({bootstrap:Za,mount:Xa,unmount:ec});e("Form",Wa),e("List",Tt),e("Template",class extends _e{constructor(e){var t;super(),Kn.getElementById("svelte-1phofh5-style")||((t=L("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",S(Kn.head,t)),Ie(this,e,ui,ci,k,{schema:0,record:1})}})}}}));
5
+ */class Ls{constructor(e,t,n,i){if(isNaN(e)||isNaN(t))throw new Error(`Point is invalid: (${e}, ${t})`);this.x=+e,this.y=+t,this.pressure=n||0,this.time=i||Date.now()}distanceTo(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))}equals(e){return this.x===e.x&&this.y===e.y&&this.pressure===e.pressure&&this.time===e.time}velocityFrom(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0}}class js{static fromPoints(e,t){const n=this.calculateControlPoints(e[0],e[1],e[2]).c2,i=this.calculateControlPoints(e[1],e[2],e[3]).c1;return new js(e[1],n,i,e[2],t.start,t.end)}static calculateControlPoints(e,t,n){const i=e.x-t.x,o=e.y-t.y,r=t.x-n.x,s=t.y-n.y,l=(e.x+t.x)/2,a=(e.y+t.y)/2,c=(t.x+n.x)/2,d=(t.y+n.y)/2,u=Math.sqrt(i*i+o*o),m=Math.sqrt(r*r+s*s),f=m/(u+m),p=c+(l-c)*f,h=d+(a-d)*f,$=t.x-p,g=t.y-h;return{c1:new Ls(l+$,a+g),c2:new Ls(c+$,d+g)}}constructor(e,t,n,i,o,r){this.startPoint=e,this.control2=t,this.control1=n,this.endPoint=i,this.startWidth=o,this.endWidth=r}length(){let e,t,n=0;for(let i=0;i<=10;i+=1){const o=i/10,r=this.point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),s=this.point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(i>0){const i=r-e,o=s-t;n+=Math.sqrt(i*i+o*o)}e=r,t=s}return n}point(e,t,n,i,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*i*(1-e)*e*e+o*e*e*e}}class qs{constructor(){try{this._et=new EventTarget}catch(e){this._et=document}}addEventListener(e,t,n){this._et.addEventListener(e,t,n)}dispatchEvent(e){return this._et.dispatchEvent(e)}removeEventListener(e,t,n){this._et.removeEventListener(e,t,n)}}class Ds extends qs{constructor(e,t={}){var n,i,o;super(),this.canvas=e,this._drawingStroke=!1,this._isEmpty=!0,this._lastPoints=[],this._data=[],this._lastVelocity=0,this._lastWidth=0,this._handleMouseDown=e=>{this._isLeftButtonPressed(e,!0)&&!this._drawingStroke&&this._strokeBegin(this._pointerEventToSignatureEvent(e))},this._handleMouseMove=e=>{this._isLeftButtonPressed(e,!0)&&this._drawingStroke?this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e)):this._strokeEnd(this._pointerEventToSignatureEvent(e),!1)},this._handleMouseUp=e=>{this._isLeftButtonPressed(e)||this._strokeEnd(this._pointerEventToSignatureEvent(e))},this._handleTouchStart=e=>{1!==e.targetTouches.length||this._drawingStroke||(e.cancelable&&e.preventDefault(),this._strokeBegin(this._touchEventToSignatureEvent(e)))},this._handleTouchMove=e=>{1===e.targetTouches.length&&(e.cancelable&&e.preventDefault(),this._drawingStroke?this._strokeMoveUpdate(this._touchEventToSignatureEvent(e)):this._strokeEnd(this._touchEventToSignatureEvent(e),!1))},this._handleTouchEnd=e=>{0===e.targetTouches.length&&(e.cancelable&&e.preventDefault(),this.canvas.removeEventListener("touchmove",this._handleTouchMove),this._strokeEnd(this._touchEventToSignatureEvent(e)))},this._handlePointerDown=e=>{this._isLeftButtonPressed(e)&&!this._drawingStroke&&(e.preventDefault(),this._strokeBegin(this._pointerEventToSignatureEvent(e)))},this._handlePointerMove=e=>{this._isLeftButtonPressed(e,!0)&&this._drawingStroke?(e.preventDefault(),this._strokeMoveUpdate(this._pointerEventToSignatureEvent(e))):this._strokeEnd(this._pointerEventToSignatureEvent(e),!1)},this._handlePointerUp=e=>{this._isLeftButtonPressed(e)||(e.preventDefault(),this._strokeEnd(this._pointerEventToSignatureEvent(e)))},this.velocityFilterWeight=t.velocityFilterWeight||.7,this.minWidth=t.minWidth||.5,this.maxWidth=t.maxWidth||2.5,this.throttle=null!==(n=t.throttle)&&void 0!==n?n:16,this.minDistance=null!==(i=t.minDistance)&&void 0!==i?i:5,this.dotSize=t.dotSize||0,this.penColor=t.penColor||"black",this.backgroundColor=t.backgroundColor||"rgba(0,0,0,0)",this.compositeOperation=t.compositeOperation||"source-over",this.canvasContextOptions=null!==(o=t.canvasContextOptions)&&void 0!==o?o:{},this._strokeMoveUpdate=this.throttle?function(e,t=250){let n,i,o,r=0,s=null;const l=()=>{r=Date.now(),s=null,n=e.apply(i,o),s||(i=null,o=[])};return function(...a){const c=Date.now(),d=t-(c-r);return i=this,o=a,d<=0||d>t?(s&&(clearTimeout(s),s=null),r=c,n=e.apply(i,o),s||(i=null,o=[])):s||(s=window.setTimeout(l,d)),n}}(Ds.prototype._strokeUpdate,this.throttle):Ds.prototype._strokeUpdate,this._ctx=e.getContext("2d",this.canvasContextOptions),this.clear(),this.on()}clear(){const{_ctx:e,canvas:t}=this;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(this._getPointGroupOptions()),this._isEmpty=!0}fromDataURL(e,t={}){return new Promise(((n,i)=>{const o=new Image,r=t.ratio||window.devicePixelRatio||1,s=t.width||this.canvas.width/r,l=t.height||this.canvas.height/r,a=t.xOffset||0,c=t.yOffset||0;this._reset(this._getPointGroupOptions()),o.onload=()=>{this._ctx.drawImage(o,a,c,s,l),n()},o.onerror=e=>{i(e)},o.crossOrigin="anonymous",o.src=e,this._isEmpty=!1}))}toDataURL(e="image/png",t){return"image/svg+xml"===e?("object"!=typeof t&&(t=void 0),`data:image/svg+xml;base64,${btoa(this.toSVG(t))}`):("number"!=typeof t&&(t=void 0),this.canvas.toDataURL(e,t))}on(){this.canvas.style.touchAction="none",this.canvas.style.msTouchAction="none",this.canvas.style.userSelect="none";const e=/Macintosh/.test(navigator.userAgent)&&"ontouchstart"in document;window.PointerEvent&&!e?this._handlePointerEvents():(this._handleMouseEvents(),"ontouchstart"in window&&this._handleTouchEvents())}off(){this.canvas.style.touchAction="auto",this.canvas.style.msTouchAction="auto",this.canvas.style.userSelect="auto",this.canvas.removeEventListener("pointerdown",this._handlePointerDown),this.canvas.removeEventListener("mousedown",this._handleMouseDown),this.canvas.removeEventListener("touchstart",this._handleTouchStart),this._removeMoveUpEventListeners()}_getListenerFunctions(){var e;const t=window.document===this.canvas.ownerDocument?window:null!==(e=this.canvas.ownerDocument.defaultView)&&void 0!==e?e:this.canvas.ownerDocument;return{addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}_removeMoveUpEventListeners(){const{removeEventListener:e}=this._getListenerFunctions();e("pointermove",this._handlePointerMove),e("pointerup",this._handlePointerUp),e("mousemove",this._handleMouseMove),e("mouseup",this._handleMouseUp),e("touchmove",this._handleTouchMove),e("touchend",this._handleTouchEnd)}isEmpty(){return this._isEmpty}fromData(e,{clear:t=!0}={}){t&&this.clear(),this._fromData(e,this._drawCurve.bind(this),this._drawDot.bind(this)),this._data=this._data.concat(e)}toData(){return this._data}_isLeftButtonPressed(e,t){return t?1===e.buttons:!(1&~e.buttons)}_pointerEventToSignatureEvent(e){return{event:e,type:e.type,x:e.clientX,y:e.clientY,pressure:"pressure"in e?e.pressure:0}}_touchEventToSignatureEvent(e){const t=e.changedTouches[0];return{event:e,type:e.type,x:t.clientX,y:t.clientY,pressure:t.force}}_getPointGroupOptions(e){return{penColor:e&&"penColor"in e?e.penColor:this.penColor,dotSize:e&&"dotSize"in e?e.dotSize:this.dotSize,minWidth:e&&"minWidth"in e?e.minWidth:this.minWidth,maxWidth:e&&"maxWidth"in e?e.maxWidth:this.maxWidth,velocityFilterWeight:e&&"velocityFilterWeight"in e?e.velocityFilterWeight:this.velocityFilterWeight,compositeOperation:e&&"compositeOperation"in e?e.compositeOperation:this.compositeOperation}}_strokeBegin(e){if(!this.dispatchEvent(new CustomEvent("beginStroke",{detail:e,cancelable:!0})))return;const{addEventListener:t}=this._getListenerFunctions();switch(e.event.type){case"mousedown":t("mousemove",this._handleMouseMove),t("mouseup",this._handleMouseUp);break;case"touchstart":t("touchmove",this._handleTouchMove),t("touchend",this._handleTouchEnd);break;case"pointerdown":t("pointermove",this._handlePointerMove),t("pointerup",this._handlePointerUp)}this._drawingStroke=!0;const n=this._getPointGroupOptions(),i=Object.assign(Object.assign({},n),{points:[]});this._data.push(i),this._reset(n),this._strokeUpdate(e)}_strokeUpdate(e){if(!this._drawingStroke)return;if(0===this._data.length)return void this._strokeBegin(e);this.dispatchEvent(new CustomEvent("beforeUpdateStroke",{detail:e}));const t=this._createPoint(e.x,e.y,e.pressure),n=this._data[this._data.length-1],i=n.points,o=i.length>0&&i[i.length-1],r=!!o&&t.distanceTo(o)<=this.minDistance,s=this._getPointGroupOptions(n);if(!o||!o||!r){const e=this._addPoint(t,s);o?e&&this._drawCurve(e,s):this._drawDot(t,s),i.push({time:t.time,x:t.x,y:t.y,pressure:t.pressure})}this.dispatchEvent(new CustomEvent("afterUpdateStroke",{detail:e}))}_strokeEnd(e,t=!0){this._removeMoveUpEventListeners(),this._drawingStroke&&(t&&this._strokeUpdate(e),this._drawingStroke=!1,this.dispatchEvent(new CustomEvent("endStroke",{detail:e})))}_handlePointerEvents(){this._drawingStroke=!1,this.canvas.addEventListener("pointerdown",this._handlePointerDown)}_handleMouseEvents(){this._drawingStroke=!1,this.canvas.addEventListener("mousedown",this._handleMouseDown)}_handleTouchEvents(){this.canvas.addEventListener("touchstart",this._handleTouchStart)}_reset(e){this._lastPoints=[],this._lastVelocity=0,this._lastWidth=(e.minWidth+e.maxWidth)/2,this._ctx.fillStyle=e.penColor,this._ctx.globalCompositeOperation=e.compositeOperation}_createPoint(e,t,n){const i=this.canvas.getBoundingClientRect();return new Ls(e-i.left,t-i.top,n,(new Date).getTime())}_addPoint(e,t){const{_lastPoints:n}=this;if(n.push(e),n.length>2){3===n.length&&n.unshift(n[0]);const e=this._calculateCurveWidths(n[1],n[2],t),i=js.fromPoints(n,e);return n.shift(),i}return null}_calculateCurveWidths(e,t,n){const i=n.velocityFilterWeight*t.velocityFrom(e)+(1-n.velocityFilterWeight)*this._lastVelocity,o=this._strokeWidth(i,n),r={end:o,start:this._lastWidth};return this._lastVelocity=i,this._lastWidth=o,r}_strokeWidth(e,t){return Math.max(t.maxWidth/(e+1),t.minWidth)}_drawCurveSegment(e,t,n){const i=this._ctx;i.moveTo(e,t),i.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1}_drawCurve(e,t){const n=this._ctx,i=e.endWidth-e.startWidth,o=2*Math.ceil(e.length());n.beginPath(),n.fillStyle=t.penColor;for(let n=0;n<o;n+=1){const r=n/o,s=r*r,l=s*r,a=1-r,c=a*a,d=c*a;let u=d*e.startPoint.x;u+=3*c*r*e.control1.x,u+=3*a*s*e.control2.x,u+=l*e.endPoint.x;let m=d*e.startPoint.y;m+=3*c*r*e.control1.y,m+=3*a*s*e.control2.y,m+=l*e.endPoint.y;const f=Math.min(e.startWidth+l*i,t.maxWidth);this._drawCurveSegment(u,m,f)}n.closePath(),n.fill()}_drawDot(e,t){const n=this._ctx,i=t.dotSize>0?t.dotSize:(t.minWidth+t.maxWidth)/2;n.beginPath(),this._drawCurveSegment(e.x,e.y,i),n.closePath(),n.fillStyle=t.penColor,n.fill()}_fromData(e,t,n){for(const i of e){const{points:e}=i,o=this._getPointGroupOptions(i);if(e.length>1)for(let n=0;n<e.length;n+=1){const i=e[n],r=new Ls(i.x,i.y,i.pressure,i.time);0===n&&this._reset(o);const s=this._addPoint(r,o);s&&t(s,o)}else this._reset(o),n(e[0],o)}}toSVG({includeBackgroundColor:e=!1}={}){const t=this._data,n=Math.max(window.devicePixelRatio||1,1),i=this.canvas.width/n,o=this.canvas.height/n,r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("viewBox",`0 0 ${i} ${o}`),r.setAttribute("width",i.toString()),r.setAttribute("height",o.toString()),e&&this.backgroundColor){const e=document.createElement("rect");e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill",this.backgroundColor),r.appendChild(e)}return this._fromData(t,((e,{penColor:t})=>{const n=document.createElement("path");if(!(isNaN(e.control1.x)||isNaN(e.control1.y)||isNaN(e.control2.x)||isNaN(e.control2.y))){const i=`M ${e.startPoint.x.toFixed(3)},${e.startPoint.y.toFixed(3)} C ${e.control1.x.toFixed(3)},${e.control1.y.toFixed(3)} ${e.control2.x.toFixed(3)},${e.control2.y.toFixed(3)} ${e.endPoint.x.toFixed(3)},${e.endPoint.y.toFixed(3)}`;n.setAttribute("d",i),n.setAttribute("stroke-width",(2.25*e.endWidth).toFixed(3)),n.setAttribute("stroke",t),n.setAttribute("fill","none"),n.setAttribute("stroke-linecap","round"),r.appendChild(n)}}),((e,{penColor:t,dotSize:n,minWidth:i,maxWidth:o})=>{const s=document.createElement("circle"),l=n>0?n:(i+o)/2;s.setAttribute("r",l.toString()),s.setAttribute("cx",e.x.toString()),s.setAttribute("cy",e.y.toString()),s.setAttribute("fill",t),r.appendChild(s)})),r.outerHTML}}const{document:Fs}=ve;function Ts(e){let t,n,i,o,r;return n=new We({props:{size:"24"}}),{c(){t=L("span"),be(n.$$.fragment),M(t,"class","feather2 pointer svelte-10h1n5r")},m(s,l){C(s,t,l),xe(n,t,null),i=!0,o||(r=T(t,"click",e[5]),o=!0)},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n),o=!1,r()}}}function zs(e){let t,n,i,o,r,s,l=!e[0]&&Ts(e);return{c(){t=L("div"),n=L("canvas"),o=D(),l&&l.c(),M(n,"id",e[1]),M(n,"name",e[1]),M(n,"class",i=e[2]+" signature_pad "+e[3]+(e[0]||e[4]?" signature-readonly":"")+" svelte-10h1n5r"),M(n,"width","400"),M(n,"height","200"),M(t,"class",r=e[2]+"_wrapper wrapper svelte-10h1n5r")},m(e,i){C(e,t,i),S(t,n),S(t,o),l&&l.m(t,null),s=!0},p(e,[o]){(!s||2&o)&&M(n,"id",e[1]),(!s||2&o)&&M(n,"name",e[1]),(!s||29&o&&i!==(i=e[2]+" signature_pad "+e[3]+(e[0]||e[4]?" signature-readonly":"")+" svelte-10h1n5r"))&&M(n,"class",i),e[0]?l&&(me(),he(l,1,1,(()=>{l=null})),fe()):l?(l.p(e,o),1&o&&pe(l,1)):(l=Ts(e),l.c(),pe(l,1),l.m(t,null)),(!s||4&o&&r!==(r=e[2]+"_wrapper wrapper svelte-10h1n5r"))&&M(t,"class",r)},i(e){s||(pe(l),s=!0)},o(e){he(l),s=!1},d(e){e&&E(t),l&&l.d()}}}const As=new Map;let Ms="";function Bs(e,t,n){const i=Q();let o,{id:r}=t,{name:s}=t,{value:l}=t,{record:a}=t,{classId:c}=t,{disabled:d}=t,{readonly:u}=t;const m=a._id||Math.floor(9e3*Math.random()+1e3).toString();u||=d;const f=e=>{Ms=e,As.set(m,Ms),i("blur",{value:Ms})};return H((()=>{Ms=l||As.get(m)||"",As.set(m,Ms);const e=document.querySelector("canvas");n(8,o=new Ds(e)),u||(o.addEventListener("endStroke",(()=>{f(o.toDataURL("image/png"))})),o.addEventListener("afterUpdateStroke",(()=>{f(o.toDataURL("image/png"))})))})),G((()=>As.forEach(((e,t,n)=>{t!==m&&n.delete(t)})))),e.$$set=e=>{"id"in e&&n(1,r=e.id),"name"in e&&n(2,s=e.name),"value"in e&&n(6,l=e.value),"record"in e&&n(7,a=e.record),"classId"in e&&n(3,c=e.classId),"disabled"in e&&n(4,d=e.disabled),"readonly"in e&&n(0,u=e.readonly)},e.$$.update=()=>{256&e.$$.dirty&&Ms&&o&&o.fromDataURL(Ms,{ratio:1})},[u,r,s,c,d,()=>{o.clear(),f("")},l,a,o]}class Os extends _e{constructor(e){var t;super(),Fs.getElementById("svelte-10h1n5r-style")||((t=L("style")).id="svelte-10h1n5r-style",t.textContent=".feather2.svelte-10h1n5r{position:absolute;right:-2em;color:#4300b0}.wrapper.svelte-10h1n5r{position:relative;width:400px;height:200px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #36697d}.signature-pad.svelte-10h1n5r{position:absolute;left:0;top:0;background-color:white}.signature-readonly.svelte-10h1n5r{cursor:not-allowed;pointer-events:none}",S(Fs.head,t)),Ie(this,e,Bs,zs,k,{id:1,name:2,value:6,record:7,classId:3,disabled:4,readonly:0})}}function Ps(e){let t,n;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+(e[20]?" hidden ":""),name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[dl,({notifyList:e})=>({18:e}),({notifyList:e})=>[e?262144:0]]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1048577&n[0]&&(i.class=e[0].name+(e[20]?" hidden ":"")),1&n[0]&&(i.name=e[0].designation),1&n[0]&&(i.help=e[0].properties?.hint),13631487&n[0]|536870912&n[1]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Vs(e){let t,n;return t=new e[28]({props:{text:e[0].designation}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]&&(i.text=e[0].designation),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ws(e){let t,n,i,o;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+(e[20]?" hidden ":""),name:e[0].designation,help:e[0].properties?.hint}}),i=new Ns({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),noForm:e[6]}}),i.$on("blur",e[35]()),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment)},m(e,r){xe(t,e,r),C(e,n,r),xe(i,e,r),o=!0},p(e,n){const o={};1048577&n[0]&&(o.class=e[0].name+(e[20]?" hidden ":"")),1&n[0]&&(o.name=e[0].designation),1&n[0]&&(o.help=e[0].properties?.hint),t.$set(o);const r={};128&n[0]&&(r.classId=e[7]),8&n[0]&&(r.disabled=e[3]),524288&n[0]&&(r.readonly=e[19]),1&n[0]&&(r.name=e[0].name),4194304&n[0]&&(r.value=e[22]()),64&n[0]&&(r.noForm=e[6]),i.$set(r)},i(e){o||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),o=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),o=!1},d(e){ke(t,e),e&&E(n),ke(i,e)}}}function Rs(e){let t,n,i,o,r,s;return t=new e[24]({props:{id:e[39](e[32]),class:e[0].name+" hidden",name:e[0].designation,help:e[0].properties?.hint,$$slots:{default:[ul]},$$scope:{ctx:e}}}),i=new e[28]({props:{text:e[23]}}),r=new oo({props:{required:e[4],disabled:e[3],readonly:e[19],id:e[32],item:e[0],currency:e[17],value:e[22]()}}),r.$on("setRefValue",e[40]),r.$on("safeReference",e[45]),{c(){be(t.$$.fragment),n=D(),be(i.$$.fragment),o=D(),be(r.$$.fragment)},m(e,l){xe(t,e,l),C(e,n,l),xe(i,e,l),C(e,o,l),xe(r,e,l),s=!0},p(e,n){const o={};1&n[0]&&(o.class=e[0].name+" hidden"),1&n[0]&&(o.name=e[0].designation),1&n[0]&&(o.help=e[0].properties?.hint),6291841&n[0]|536870912&n[1]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o);const s={};8388608&n[0]&&(s.text=e[23]),i.$set(s);const l={};16&n[0]&&(l.required=e[4]),8&n[0]&&(l.disabled=e[3]),524288&n[0]&&(l.readonly=e[19]),1&n[0]&&(l.item=e[0]),131072&n[0]&&(l.currency=e[17]),4194304&n[0]&&(l.value=e[22]()),r.$set(l)},i(e){s||(pe(t.$$.fragment,e),pe(i.$$.fragment,e),pe(r.$$.fragment,e),s=!0)},o(e){he(t.$$.fragment,e),he(i.$$.fragment,e),he(r.$$.fragment,e),s=!1},d(e){ke(t,e),e&&E(n),ke(i,e),e&&E(o),ke(r,e)}}}function Us(e){let t,n;return t=new e[25]({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],pattern:e[29],required:!0===e[4],placeholder:e[30],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=!0===e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Hs(e){let t,n;return t=new fs({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Gs(e){let t,n;return t=new as({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Qs(e){let t,n;return t=new vs({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],pattern:e[29],placeholder:e[30],value:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ys(e){let t,n;return t=new Or({props:{inputClass:e[6]||e[7],disabled:e[3],readonly:e[19],required:e[4],id:e[32],item:e[0],value:e[22](),praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("checkRange",e[53]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Js(e){let t,n;return t=new Kr({props:{id:e[32],item:e[0],praefix:e[5],record:e[1]}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]&&(i.item=e[0]),32&n[0]&&(i.praefix=e[5]),2&n[0]&&(i.record=e[1]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ks(e){let t,n;return t=new is({props:{inputClass:e[6]||e[7],disabled:e[3],formnovalidate:e[10],readonly:e[19],required:e[4],id:e[32],name:e[31],value:e[22](),record:e[1],item:e[0]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.value=e[22]()),2&n[0]&&(i.record=e[1]),1&n[0]&&(i.item=e[0]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Zs(e){let t,n;return t=new qr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[33](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Xs(e){let t,n;return t=new Tr({props:{classId:e[7],id:e[32],disabled:e[3],required:e[4],value:e[34](),noForm:e[6]}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function el(e){let t,n;return t=new e[26]({props:{inputClass:e[6]||e[7],required:e[4],disabled:e[3],id:e[32],name:e[31],value:e[33](),closeOnSelection:!0}}),t.$on("change",e[35](!0)),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function tl(e){let t,n;return t=new e[27]({props:{round:!0,inputClass:e[6]||e[7],disabled:e[3]||e[19],required:e[4],id:e[32],name:e[31],checked:e[22]()}}),t.$on("change",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};192&n[0]&&(i.inputClass=e[6]||e[7]),524296&n[0]&&(i.disabled=e[3]||e[19]),16&n[0]&&(i.required=e[4]),4194304&n[0]&&(i.checked=e[22]()),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function nl(e){let t,n;return t=new $r({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],record:e[1],value:e[22](),noForm:e[6],view:e[0].properties.view,praefix:e[5]}}),t.$on("blur",e[35]()),t.$on("invalid",e[52]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),2&n[0]&&(i.record=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.view=e[0].properties.view),32&n[0]&&(i.praefix=e[5]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function il(e){let t,n;return t=new Ro({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],record:e[1],value:e[22](),noForm:e[6],multi:e[0].properties.multi,numberInput:e[12],praefix:e[5],toDelete:e[15],reqQuantity:e[16],notifyList:e[18]}}),t.$on("blur",e[35]()),t.$on("invalid",e[51]),t.$on("record",e[36]),t.$on("multi",e[37]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),2&n[0]&&(i.record=e[1]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.multi=e[0].properties.multi),4096&n[0]&&(i.numberInput=e[12]),32&n[0]&&(i.praefix=e[5]),32768&n[0]&&(i.toDelete=e[15]),65536&n[0]&&(i.reqQuantity=e[16]),262144&n[0]&&(i.notifyList=e[18]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ol(e){let t,n;return t=new ao({props:{classId:e[7],disabled:e[3],formnovalidate:e[10],required:e[4],readonly:e[19],id:e[32],item:e[0],currency:e[17],value:e[22](),praefix:e[5],notifyList:e[18],noForm:e[6]}}),t.$on("blur",e[35]()),t.$on("formula",e[50]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),16&n[0]&&(i.required=e[4]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),131072&n[0]&&(i.currency=e[17]),4194304&n[0]&&(i.value=e[22]()),32&n[0]&&(i.praefix=e[5]),262144&n[0]&&(i.notifyList=e[18]),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function rl(e){let t,n;return t=new kr({props:{classId:e[7],disabled:e[3],required:e[4],id:e[32],item:e[0],value:e[22](),noForm:e[6]}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),16&n[0]&&(i.required=e[4]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function sl(e){let t,n;return t=new Os({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),record:e[1],noForm:e[6],placeholder:e[0].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.name=e[0].name),4194304&n[0]&&(i.value=e[22]()),2&n[0]&&(i.record=e[1]),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.placeholder=e[0].properties?.placeholder),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ll(e){let t,n;return t=new r({props:{classId:e[7],disabled:e[3],readonly:e[19],id:e[32],name:e[0].name,value:e[22](),noForm:e[6],placeholder:e[0].properties?.placeholder}}),t.$on("blur",e[35]()),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),8&n[0]&&(i.disabled=e[3]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.name=e[0].name),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),1&n[0]&&(i.placeholder=e[0].properties?.placeholder),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function al(e){let t,n;return t=new Dn({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[0],desc:e[23],value:e[22](),noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[48]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[49]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.value=e[22]()),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function cl(e){let t,n;return t=new Hn({props:{classId:e[7],eventId:e[8],required:e[4],disabled:e[3],formnovalidate:e[10],readonly:e[19],id:e[32],item:e[0],desc:e[23],values:e[22]()||[],noForm:e[6],praefix:e[5],selectionFields:e[9],selection:e[11],deList:e[13],recordId:e[2],isTemplate:e[14]}}),t.$on("task",e[46]),t.$on("change",e[35]()),t.$on("initFail",e[38]),t.$on("defPrep",e[47]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),16&n[0]&&(i.required=e[4]),8&n[0]&&(i.disabled=e[3]),1024&n[0]&&(i.formnovalidate=e[10]),524288&n[0]&&(i.readonly=e[19]),1&n[0]&&(i.item=e[0]),8388608&n[0]&&(i.desc=e[23]),4194304&n[0]&&(i.values=e[22]()||[]),64&n[0]&&(i.noForm=e[6]),32&n[0]&&(i.praefix=e[5]),512&n[0]&&(i.selectionFields=e[9]),2048&n[0]&&(i.selection=e[11]),8192&n[0]&&(i.deList=e[13]),4&n[0]&&(i.recordId=e[2]),16384&n[0]&&(i.isTemplate=e[14]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function dl(e){let t,n,i,o;const r=[cl,al,ll,sl,rl,ol,il,nl,tl,el,Xs,Zs,Ks,Js,Ys,Qs,Gs,Hs,Us],s=[];function l(e,t){return"object"===e[0].type&&e[0].properties?.multi?0:"object"===e[0].type?1:"textarea"===e[0].type||e[0].properties&&"textarea"===e[0].properties.format?2:"signature"===e[0].type?3:e[0].properties&&(e[0].properties.enum||e[0].properties.regulation)?4:"number"===e[0].type?5:e[0].properties&&e[0].properties.multi?6:e[0].properties&&e[0].properties.view&&"lookup"!==e[0].properties.format?7:"boolean"===e[0].type?8:"date"===e[0].type?9:"dateRange"===e[0].type?10:"datetime"===e[0].type?11:"map"===e[0].properties?.format?12:"lookup"===e[0].properties?.format?13:"time"===e[0].properties?.format?14:"email"===e[0].type||"email"===e[0].properties?.format?15:"url"===e[0].properties?.format?16:"tel"===e[0].properties?.format?17:18}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function ul(e){let t,n;return t=new Dn({props:{classId:e[7],eventId:e[8],disabled:!0,readonly:!0,id:e[32],item:e[0],value:e[22](),noList:!0,withRefValue:!0,refValue:e[21]}}),t.$on("setRefDesc",e[41]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};128&n[0]&&(i.classId=e[7]),256&n[0]&&(i.eventId=e[8]),1&n[0]&&(i.item=e[0]),4194304&n[0]&&(i.value=e[22]()),2097152&n[0]&&(i.refValue=e[21]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ml(e){let t,n,i,o;const r=[Rs,Ws,Vs,Ps],s=[];function l(e,t){return e[5]||"reference"!==e[0].saveAs||"object"!==e[0].type?"html"===e[0].properties?.format?1:"divider"===e[0].type?2:3:0}return t=l(e),n=s[t]=r[t](e),{c(){n.c(),i=F()},m(e,n){s[t].m(e,n),C(e,i,n),o=!0},p(e,o){let a=t;t=l(e),t===a?s[t].p(e,o):(me(),he(s[a],1,1,(()=>{s[a]=null})),fe(),n=s[t],n?n.p(e,o):(n=s[t]=r[t](e),n.c()),pe(n,1),n.m(i.parentNode,i))},i(e){o||(pe(n),o=!0)},o(e){he(n),o=!1},d(e){s[t].d(e),e&&E(i)}}}function fl(e,t,n){let i,o,r;const s=Q(),{FormField:l,TextField:a,DatePicker:d,TimePicker:u,Checkbox:m,Divider:p}=c;let{praefix:h=""}=t,{item:$}=t,{listName:g=""}=t,{record:v}=t,{recordId:y}=t,{noForm:w=!1}=t,{classId:b}=t,{eventId:x}=t,{disabled:k}=t,{selectionFields:I}=t,{formnovalidate:_}=t,{selection:S=!1}=t,{notifyList:C}=t,{numberInput:E}=t,{deList:N}=t,{required:L}=t,{isTemplate:j}=t,{toDelete:q}=t,{reqQuantity:D}=t,{currency:F}=t,{changeValue:T}=t,{propSelection:z}=t;y||=v._id;let{required:A,readonly:M,hidden:B,pattern:O,placeholder:P}=$.properties||{};if(B=!0===B,void 0!==M&&(M=!0===M),void 0===L&&(L=A),k=k||!!M,"string"==typeof $.name){const[e,t]=$.name.split("_");t&&($.name=t)}const V=(g?g+".":"")+$.name,W=V+(""!==h?"-"+h:""),R=(e,t=V)=>{try{return t.split(".").reduce(((e,t)=>e[t]),e)}catch(e){return""}};let U=R(v);return e.$$set=e=>{"praefix"in e&&n(5,h=e.praefix),"item"in e&&n(0,$=e.item),"listName"in e&&n(42,g=e.listName),"record"in e&&n(1,v=e.record),"recordId"in e&&n(2,y=e.recordId),"noForm"in e&&n(6,w=e.noForm),"classId"in e&&n(7,b=e.classId),"eventId"in e&&n(8,x=e.eventId),"disabled"in e&&n(3,k=e.disabled),"selectionFields"in e&&n(9,I=e.selectionFields),"formnovalidate"in e&&n(10,_=e.formnovalidate),"selection"in e&&n(11,S=e.selection),"notifyList"in e&&n(18,C=e.notifyList),"numberInput"in e&&n(12,E=e.numberInput),"deList"in e&&n(13,N=e.deList),"required"in e&&n(4,L=e.required),"isTemplate"in e&&n(14,j=e.isTemplate),"toDelete"in e&&n(15,q=e.toDelete),"reqQuantity"in e&&n(16,D=e.reqQuantity),"currency"in e&&n(17,F=e.currency),"changeValue"in e&&n(43,T=e.changeValue),"propSelection"in e&&n(44,z=e.propSelection)},e.$$.update=()=>{if(1&e.$$.dirty[0]|8192&e.$$.dirty[1]&&z&&$.properties?.selection){const{refClass:e,refItem:t,target:n}=$.properties.selection,i=z.record[e];s("propSelection",{itemName:$.name,itemType:$.type,prop:t,target:n,source:e,sourceId:i})}if(4096&e.$$.dirty[1])for(const e in T)e===V&&n(1,v[V]=T[e],v);2&e.$$.dirty[0]&&n(22,i=(e=V)=>{let t=R(v);return void 0===t?"":t}),2&e.$$.dirty[0]&&(r=R(v))},n(23,o=((e=V)=>{let t=v["_"+e];return t=f(t),void 0===t?"":t})()),[$,v,y,k,L,h,w,b,x,I,_,S,E,N,j,q,D,F,C,M,B,U,i,o,l,a,d,m,p,O,P,V,W,(e=V)=>{let t=R(v);return t?new Date(t):""===h?new Date:void 0},(e=V)=>{const t=R(v,e+"_from"),n=R(v,e+"_to");return{from:void 0===t?t:new Date(t),to:void 0===n?n:new Date(n)}},e=>({detail:t})=>{let{value:i,checked:o,range:l}=t;void 0!==o&&(i=o);const a=V+(l||"");n(1,v[a]=e?function(e,t){if(null==e)return null;let n=e.getHours();return/%p/i.test(t)&&(n%=12,0===n&&(n=12)),t.replace("%Y",e.getFullYear()).replace("%y",(e.getFullYear()%100).toString().padStart(2,"0")).replace("%m",(e.getMonth()+1).toString().padStart(2,"0")).replace("%d",e.getDate().toString().padStart(2,"0")).replace("%H",n.toString().padStart(2,"0")).replace("%M",e.getMinutes().toString().padStart(2,"0")).replace("%S",e.getSeconds().toString().padStart(2,"0")).replace("%p",e.getHours()<12?"am":"pm").replace("%P",e.getHours()<12?"AM":"PM").replace("%%","%")}(i,"%d.%m.%Y"):i,v);const c=Object.values(v).every((e=>!e))&&i;s("notify",{oldValue:r,value:i,add:c,itemName:a,desc:t.description})},({detail:e})=>{s("record",e)},({detail:e})=>{s("multi",e)},()=>n(20,B=!0),()=>"object"===$.type?"comment_"+W:W,({detail:e})=>{n(21,U=e)},({detail:e})=>{const{designation:t}=$;n(23,o=t+": "+(e||"(Neu)"))},g,T,z,function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)},function(t){Y(e,t)}]}class pl extends _e{constructor(e){var t;super(),document.getElementById("svelte-zmu4lk-style")||((t=L("style")).id="svelte-zmu4lk-style",t.textContent=".form-field{margin-bottom:1em !important}.form-field.hidden{display:none !important}.form-field > .description{padding-top:0.75em;color:black}.form-field div.field > label.checkbox{padding-top:0.5em}",S(document.head,t)),Ie(this,e,fl,ml,k,{praefix:5,item:0,listName:42,record:1,recordId:2,noForm:6,classId:7,eventId:8,disabled:3,selectionFields:9,formnovalidate:10,selection:11,notifyList:18,numberInput:12,deList:13,required:4,isTemplate:14,toDelete:15,reqQuantity:16,currency:17,changeValue:43,propSelection:44},[-1,-1])}}const{document:hl}=ve;function $l(e,t,n){const i=e.slice();return i[93]=t[n],i[95]=n,i}function gl(e,t,n){const i=e.slice();return i[102]=t[n],i}function vl(e,t,n){const i=e.slice();return i[97]=t[n].title,i[98]=t[n].toDelete,i[99]=t[n].icon,i}function yl(e){let t,n;return t=new e[19]({props:{name:"Total Wochen",nameClass:"formField_italic",$$slots:{default:[wl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function wl(e){let t,n,i;function o(t){e[50](t)}let r={item:e[29],disabled:!0};return void 0!==e[11]&&(r.value=e[11]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&2048&i[0]&&(n=!0,o.value=e[11],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function bl(e){let t,n;return t=new e[19]({props:{name:"Total Stunden",nameClass:"formField_italic",$$slots:{default:[xl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16384&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function xl(e){let t,n,i;function o(t){e[51](t)}let r={item:e[27],disabled:!0};return void 0!==e[14]&&(r.value=e[14]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&16384&i[0]&&(n=!0,o.value=e[14],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function kl(e){let t,n;return t=new e[19]({props:{name:"Total Betrag",nameClass:"formField_italic",$$slots:{default:[Il]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1152&n[0]|4096&n[3]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Il(e){let t,n,i;function o(t){e[52](t)}let r={item:e[25],disabled:!0,currency:e[7]};return void 0!==e[10]&&(r.value=e[10]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};128&i[0]&&(o.currency=e[7]),!n&&1024&i[0]&&(n=!0,o.value=e[10],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function _l(e){let t,n;return t=new e[22]({props:{class:e[16][e[95]],open:e[9]&&!e[1]&&0===e[95],$$slots:{handle:[Dl,({toggle:e,open:t})=>({96:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,0,e?8:0]],default:[Nl,({toggle:e,open:t})=>({96:e,9:t}),({toggle:e,open:t})=>[t?512:0,0,0,e?8:0]]},$$scope:{ctx:e}}}),t.$on("panel-open",(function(){x(e[43](e[95],e[92]))&&e[43](e[95],e[92]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};65536&i[0]&&(o.class=e[16][e[95]]),514&i[0]&&(o.open=e[9]&&!e[1]&&0===e[95]),439293&i[0]|4104&i[3]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sl(e){let t,n;return t=new pl({props:{praefix:e[95],item:e[102],eventId:e[6],record:e[93],recordId:e[4]._id,reqQuantity:e[2],notifyList:e[8],noForm:Ml,classId:e[5],disabled:e[0],required:e[23],selectionFields:e[30],propSelection:e[15],numberInput:e[18],currency:e[7],formnovalidate:e[95]===e[12].length-1||e[12][e[95]]._delete}}),t.$on("notify",(function(){x(e[32](e[102],e[95]))&&e[32](e[102],e[95]).apply(this,arguments)})),t.$on("task",e[53]),t.$on("invalid",e[33]),t.$on("defPrep",e[34]),t.$on("checkRange",e[35]),t.$on("formula",e[44](e[95])),t.$on("record",e[54]),t.$on("propSelection",e[45](e[95])),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};8&i[0]&&(o.item=e[102]),64&i[0]&&(o.eventId=e[6]),4096&i[0]&&(o.record=e[93]),16&i[0]&&(o.recordId=e[4]._id),4&i[0]&&(o.reqQuantity=e[2]),256&i[0]&&(o.notifyList=e[8]),32&i[0]&&(o.classId=e[5]),1&i[0]&&(o.disabled=e[0]),32768&i[0]&&(o.propSelection=e[15]),262144&i[0]&&(o.numberInput=e[18]),128&i[0]&&(o.currency=e[7]),4096&i[0]&&(o.formnovalidate=e[95]===e[12].length-1||e[12][e[95]]._delete),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Cl(e){let t,n,i=e[3].item,o=[];for(let t=0;t<i.length;t+=1)o[t]=Sl(gl(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1082429949&n[0]|24606&n[1]){let s;for(i=e[3].item,s=0;s<i.length;s+=1){const r=gl(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Sl(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function El(e){let t,n,i=e[12][e[95]]._delete,o=Cl(e);return{c(){o.c(),t=F()},m(e,i){o.m(e,i),C(e,t,i),n=!0},p(e,n){4096&n[0]&&k(i,i=e[12][e[95]]._delete)?(me(),he(o,1,1,v),fe(),o=Cl(e),o.c(),pe(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(pe(o),n=!0)},o(e){he(o),n=!1},d(e){e&&E(t),o.d(e)}}}function Nl(e){let t,n,i,o,r=e[12].length,s=El(e);return{c(){t=L("div"),s.c(),i=D(),M(t,"id",n=`accordion-content-${e[5]}-${e[3].name}-${e[95]}`)},m(e,n){C(e,t,n),s.m(t,null),C(e,i,n),o=!0},p(e,i){4096&i[0]&&k(r,r=e[12].length)?(me(),he(s,1,1,v),fe(),s=El(e),s.c(),pe(s),s.m(t,null)):s.p(e,i),(!o||40&i[0]&&n!==(n=`accordion-content-${e[5]}-${e[3].name}-${e[95]}`))&&M(t,"id",n)},i(e){o||(pe(s),o=!0)},o(e){he(s),o=!1},d(e){e&&E(t),s.d(e),e&&E(i)}}}function Ll(e){let t,n,i,o,r,s=e[31](e[13],e[95])+"";return{c(){t=L("div"),n=q(s),M(t,"class",i=_("draggableListItem "+e[3].name)+" svelte-1es1ap1"),M(t,"draggable",!0),V(t,"delete",e[93]._delete),V(t,"is-active-top",e[17]?.top===e[95]),V(t,"is-active-bottom",e[17]?.bottom===e[95])},m(i,s){C(i,t,s),S(t,n),o||(r=[T(t,"dragover",e[41]),T(t,"dragleave",e[42](e[95])),T(t,"dragstart",e[39](e[95])),T(t,"drop",z(e[38](e[95]))),T(t,"dragenter",e[40](e[95]))],o=!0)},p(o,r){e=o,8192&r[0]&&s!==(s=e[31](e[13],e[95])+"")&&B(n,s),8&r[0]&&i!==(i=_("draggableListItem "+e[3].name)+" svelte-1es1ap1")&&M(t,"class",i),4104&r[0]&&V(t,"delete",e[93]._delete),131080&r[0]&&V(t,"is-active-top",e[17]?.top===e[95]),131080&r[0]&&V(t,"is-active-bottom",e[17]?.bottom===e[95])},d(e){e&&E(t),o=!1,b(r)}}}function jl(e){let t,n,i;var o=e[99];return o&&(t=new o({props:{size:"20"}})),{c(){t&&be(t.$$.fragment),n=F()},m(e,o){t&&xe(t,e,o),C(e,n,o),i=!0},p(e,i){if(o!==(o=e[99])){if(t){me();const e=t;he(e.$$.fragment,1,0,(()=>{ke(e,1)})),fe()}o?(t=new o({props:{size:"20"}}),be(t.$$.fragment),pe(t.$$.fragment,1),xe(t,n.parentNode,n)):t=null}},i(e){i||(t&&pe(t.$$.fragment,e),i=!0)},o(e){t&&he(t.$$.fragment,e),i=!1},d(e){e&&E(n),t&&ke(t,e)}}}function ql(e){let t,n,i,o,r,s=!e[0]&&!e[3].readonly&&jl(e);return{c(){t=L("span"),s&&s.c(),M(t,"class","pointer icon svelte-1es1ap1"),M(t,"title",e[97]),t.hidden=n=e[95]===e[12].length-1||!(e[93]._delete^e[98])},m(n,l){C(n,t,l),s&&s.m(t,null),i=!0,o||(r=T(t,"click",(function(){x(e[37](e[95],e[9],e[96]))&&e[37](e[95],e[9],e[96]).apply(this,arguments)})),o=!0)},p(o,r){(e=o)[0]||e[3].readonly?s&&(me(),he(s,1,1,(()=>{s=null})),fe()):s?(s.p(e,r),9&r[0]&&pe(s,1)):(s=jl(e),s.c(),pe(s,1),s.m(t,null)),(!i||4096&r[0]&&n!==(n=e[95]===e[12].length-1||!(e[93]._delete^e[98])))&&(t.hidden=n)},i(e){i||(pe(s),i=!0)},o(e){he(s),i=!1},d(e){e&&E(t),s&&s.d(),o=!1,r()}}}function Dl(e){let t,n,i,o,r,s;n=new e[20]({props:{$$slots:{default:[Ll]},$$scope:{ctx:e}}}),n.$on("click",(function(){x(e[36](e[96],e[95],e[9]))&&e[36](e[96],e[95],e[9]).apply(this,arguments)}));let l=[{title:"löschen",toDelete:!0,icon:We},{title:"undo",toDelete:!1,icon:Oe}],a=[];for(let t=0;t<2;t+=1)a[t]=ql(vl(e,l,t));const c=e=>he(a[e],1,1,(()=>{a[e]=null}));return{c(){t=L("div"),be(n.$$.fragment),i=D();for(let e=0;e<2;e+=1)a[e].c();o=D(),M(t,"class",r=_("accordion "+e[3].name)+" svelte-1es1ap1"),M(t,"slot","handle")},m(e,r){C(e,t,r),xe(n,t,null),S(t,i);for(let e=0;e<2;e+=1)a[e].m(t,null);S(t,o),s=!0},p(i,d){e=i;const u={};if(143368&d[0]|4096&d[3]&&(u.$$scope={dirty:d,ctx:e}),n.$set(u),4617&d[0]|64&d[1]|8&d[3]){let n;for(l=[{title:"löschen",toDelete:!0,icon:We},{title:"undo",toDelete:!1,icon:Oe}],n=0;n<2;n+=1){const i=vl(e,l,n);a[n]?(a[n].p(i,d),pe(a[n],1)):(a[n]=ql(i),a[n].c(),pe(a[n],1),a[n].m(t,o))}for(me(),n=2;n<2;n+=1)c(n);fe()}(!s||8&d[0]&&r!==(r=_("accordion "+e[3].name)+" svelte-1es1ap1"))&&M(t,"class",r)},i(e){if(!s){pe(n.$$.fragment,e);for(let e=0;e<2;e+=1)pe(a[e]);s=!0}},o(e){he(n.$$.fragment,e),a=a.filter(Boolean);for(let e=0;e<2;e+=1)he(a[e]);s=!1},d(e){e&&E(t),ke(n),N(a,e)}}}function Fl(e){let t,n,i=(!e[1]&&!e[0]||e[95]<e[12].length-1)&&_l(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){!e[1]&&!e[0]||e[95]<e[12].length-1?i?(i.p(e,n),4099&n[0]&&pe(i,1)):(i=_l(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Tl(e){let t,n,i=e[12],o=[];for(let t=0;t<i.length;t+=1)o[t]=Fl($l(e,i,t));const r=e=>he(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=F()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);C(e,t,i),n=!0},p(e,n){if(1082635263&n[0]|32767&n[1]|1073741824&n[2]|8&n[3]){let s;for(i=e[12],s=0;s<i.length;s+=1){const r=$l(e,i,s);o[s]?(o[s].p(r,n),pe(o[s],1)):(o[s]=Fl(r),o[s].c(),pe(o[s],1),o[s].m(t.parentNode,t))}for(me(),s=i.length;s<o.length;s+=1)r(s);fe()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)pe(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)he(o[e]);n=!1},d(e){N(o,e),e&&E(t)}}}function zl(e){let t,n,i,o,r,s,l=e[28]&&e[11]&&0!=e[11]&&yl(e),a=e[26]&&e[14]&&0!=e[14]&&bl(e),c=e[24]&&e[10]&&0!=e[10]&&kl(e);return r=new e[21]({props:{class:e[5]+e[3].name,$$slots:{default:[Tl,({closeOtherPanels:e})=>({92:e}),({closeOtherPanels:e})=>[0,0,e?1073741824:0]]},$$scope:{ctx:e}}}),{c(){t=L("div"),l&&l.c(),n=D(),a&&a.c(),i=D(),c&&c.c(),o=D(),be(r.$$.fragment),M(t,"class","formList")},m(e,d){C(e,t,d),l&&l.m(t,null),S(t,n),a&&a.m(t,null),S(t,i),c&&c.m(t,null),S(t,o),xe(r,t,null),s=!0},p(e,s){e[28]&&e[11]&&0!=e[11]?l?(l.p(e,s),2048&s[0]&&pe(l,1)):(l=yl(e),l.c(),pe(l,1),l.m(t,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[26]&&e[14]&&0!=e[14]?a?(a.p(e,s),16384&s[0]&&pe(a,1)):(a=bl(e),a.c(),pe(a,1),a.m(t,i)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),e[24]&&e[10]&&0!=e[10]?c?(c.p(e,s),1024&s[0]&&pe(c,1)):(c=kl(e),c.c(),pe(c,1),c.m(t,o)):c&&(me(),he(c,1,1,(()=>{c=null})),fe());const d={};40&s[0]&&(d.class=e[5]+e[3].name),504831&s[0]|1073741824&s[2]|4096&s[3]&&(d.$$scope={dirty:s,ctx:e}),r.$set(d)},i(e){s||(pe(l),pe(a),pe(c),pe(r.$$.fragment,e),s=!0)},o(e){he(l),he(a),he(c),he(r.$$.fragment,e),s=!1},d(e){e&&E(t),l&&l.d(),a&&a.d(),c&&c.d(),ke(r)}}}let Al=new Map;const Ml=!0,Bl="pos/target";function Ol(e,t,i){let o,r;const{FormField:s,TextField:l,Button:a,Accordion:d,AccordionSection:u,Divider:m}=c,$=Q();let{list:g}=t,{mainSchema:v}=t,{schema:y}=t,{record:w}=t,{classId:b}=t,{eventId:x}=t,{disabled:k}=t,{fixed:I}=t,{template:_={}}=t,{reqQuantity:S}=t,{open:C=!1}=t,{currency:E}=t,{notifyList:N}=t;const L=y.find((e=>"price"===e.name&&!e.properties?.hidden)),j=y.find((e=>"amount"===e.name&&!e.properties?.hidden)),q=y.find((e=>"quantity"===e.name&&!e.properties?.hidden)),D=j||L&&q,F=D&&q;let T=0;const z=y.find((e=>"quantity"===e.name&&"h"===e.properties?.unit?.constant&&!e.properties?.hidden));let A=0;const M=y.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name||"",B=!!M;let O=0;const P={};let V,W=y.properties?.readonly,R=b.split("form-")[1].slice(0,-4),U=new Map;g.group&&(I=!0);const H={};k||=W;let G,J,K=[],Z=[],X=!1,ee={},te=[];y.filter((e=>e.selection)).map((e=>K.push({className:R,parentClass:y,refClass:e.selection,value:""}))),y.filter((e=>e.refClass)).forEach((e=>{}));["readonly","hidden","required"].map((e=>{y.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"";let[i,o]=n.split(".");o||(o=i,i=void 0),te.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));const ne=e=>e.slice(0,3).join(", "),oe=async(e,t,n)=>{const i=w[n];if(!i?.length)return;const o=i[0][n];if(!o)return;const r=await Pa(n,o);return r?r[g.name]:void 0},re=async(e,t)=>{const n=te.filter((e=>(e.refObj||R)===t||e.refName===t));if(n?.length)for(const t of n){const{itemName:n,refObj:o,refName:r,op:s}=t;let l,a,{action:c}=t,d=!1,u=!1;if(o){const t=G[e][o];o===R&&r?d=w:t&&(d=await Pa(o,t))}!o&&r&&(d=G[e]),d&&(u=d[r],Array.isArray(u)&&0===u.length&&(u=!1)),"!"===s&&(u=!u),"required"!==c&&"readonly"!==c||(c="required"===c?c:"disabled",setTimeout((()=>{l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field textarea`,a=document.querySelector(l),a||(l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n} .field input`,a=document.querySelector(l)),a&&u&&a.setAttribute(c,""),a&&!u&&a.removeAttribute(c)}),0)),"hidden"===c&&(l=`#accordion-content-${b}-${g.name}-${e} .form-field.${n}`,a=document.querySelector(l),a?.classList?.toggle("hidden",u),u&&i(12,G[e][n]="",G))}},se=(e,t)=>{let n=`#accordion-content-${b}-${g.name}-${e} .form-field:not(.hidden) .field :required:not(:disabled)`;const o=document.querySelectorAll(n);let r=!1;o.forEach((e=>{e.required&&""===e.value&&(r=!0)})),void 0===t&&(n=`#accordion-content-${b}-${g.name}-${e} :not(.form-field.hidden) .field input.invalid`,document.querySelector(n)&&(t=!0)),i(16,Z[e]=r||t?"invalid":"",Z)},le=e=>{if(!e)return 0;const[t,n=0]=e.split(":");return 60*t+parseInt(n)},ae=(e,t)=>{if(!t)return;const n=y.find((e=>e.name===t)),o=n.properties.value.formula,{operator:r,argument:s}=o,l=s.map((t=>G[e][t.refItem]||w[t.refItem]));let a=0;"$add"===r&&(a=l.reduce(((e,t)=>+(e||0)+ +(t||0)))),"$subtract"===r&&(a=l.reduce(((e,t)=>{e||(e=""),t||(t="");const[n,i]=e.split(":");e=i?(+n+ +i/60).toFixed(2):+(n||0);let[o,r]=t.split(":");return o||(o=0),e-=r?(+o+ +r/60).toFixed(2):+(o||0)}))),"$multiply"===r&&(a=l.reduce(((e,t)=>+(e||0)*+(t||0))));const c=`#accordion-content-${b}-${g.name}-${e} .form-field.${t} .field input`,d=document.querySelector(c),u=d?.disabled;i(12,G[e][t]="$multiply"===r?a?ce(a,n.properties?.decimals):"":ce(a,n.properties?.decimals),G),i(18,ee={item:n,value:a,idx:e}),setTimeout((()=>{const e=document.querySelector(c);u&&e&&e.setAttribute("disabled","")}),0)},ce=(e,t)=>("number"==typeof e&&e||(e=Number(e||0)),e.toFixed(t||0));J=y.filter((e=>e.refClass)).reduce(((e,t)=>{const n=y.filter((e=>e.refItem===t.refClass));if(!n?.length)return e;if(t.selection){const[n,i]=t.selection.split(":"),[o]=i?.split(".")||[];o&&e.push({refClass:o,items:[n],selection:t.selection})}const i={refClass:t.refClass,items:[]};return n.forEach((e=>{i.items.push(e.name)})),e.push(i),e}),[]);const de=async(e,t,n,o)=>{const r=(await J).find((e=>e.refClass===t.refClass));if(!r)return;const{refClass:s,items:l,selection:a}=r,c=t.name;if(te.find((e=>e.itemName===c))){const t=`#accordion-content-${b}-${g.name}-${e} .form-field.${s}.hidden`;if(document.querySelector(t))return}return n?Promise.all(l.map((async r=>{const c=y.find((e=>e.name===r));if(c.properties?.readonly&&!t.refInput){const n=G[e][t.refClass];return Promise.resolve(Pa(t.refClass,n,!0)).then((t=>{let n=t[r];Array.isArray(n)&&(n=n.length?n[0][r]:""),i(12,G[e][r]=n,G)}))}let d="";const{refInput:u}=t;if(u&&G[e]){const[t,n]=u.split(".");d=n?G[e][n]:w[t]}if(a&&n!==o)l.map((t=>{i(12,G[e][t]="",G)}));else if(u&&!d||ue(e,r)||o!==n){const n=y.find((e=>e.refClass===s)),o=G[e][n.name];if(t.selection){const n=Oa(t.selection+o.toString());if(n)return Promise.resolve(n).then((t=>i(12,G[e][r]=t[r],G)))}return Promise.resolve(Pa(n.refClass,o)).then((t=>i(12,G[e][r]=t[r],G)))}}))):Promise.resolve(l.map((t=>{i(12,G[e][t]="",G)})))},ue=(e,t)=>{let n=G[e][t];return"number"===y.find((e=>e.name===t)).type&&(n=Number(n||0)),!n},me=e=>{if(!e)return;const{style:t,scrollHeight:n}=e;n&&(t.height=`${n}px`)};let fe=!1;const pe=e=>!(!I&&e>=G.length-1),he=(e,t=!1)=>{const[n,i]=e.split(";");return g.name===i&&(!!pe(t)&&((!1===t||t!=n)&&parseInt(n)))};y.filter((e=>e.properties?.value?.formula?.argument)).forEach((e=>{e.properties.value.formula.argument.forEach((t=>{const n=y.find((e=>e.name===t.refItem))||y.find((e=>e.name===t.refItem));n&&(n._formulaActor=e.name)}))}));const $e=(e,t=!1)=>{const n=`#accordion-content-${b}-${g.name}-${e} > div.form-field:not(.hidden)`,i=document.querySelectorAll(n);if(!i?.length)return;const o=i[i.length-1];ie().then((()=>{const t=`#accordion-content-${b}-${g.name}-${e} textarea`;Array.from(document.querySelectorAll(t)).forEach(me)})).then((()=>{t&&o.scrollIntoView({behavior:"smooth",block:"end"})}))};return e.$$set=e=>{"list"in e&&i(3,g=e.list),"mainSchema"in e&&i(46,v=e.mainSchema),"schema"in e&&i(47,y=e.schema),"record"in e&&i(4,w=e.record),"classId"in e&&i(5,b=e.classId),"eventId"in e&&i(6,x=e.eventId),"disabled"in e&&i(0,k=e.disabled),"fixed"in e&&i(1,I=e.fixed),"template"in e&&i(48,_=e.template),"reqQuantity"in e&&i(2,S=e.reqQuantity),"open"in e&&i(9,C=e.open),"currency"in e&&i(7,E=e.currency),"notifyList"in e&&i(8,N=e.notifyList)},e.$$.update=()=>{24&e.$$.dirty[0]&&w&&(i(2,S=w.quantity),i(12,G=(w[g.name]||[]).concat({})),(e=>{i(15,V={record:e})})(w)),4096&e.$$.dirty[0]&&i(13,o=G),15368&e.$$.dirty[0]&&o&&((()=>{if(z)i(14,A=G?.reduce(((e,t)=>e+(t._delete?0:+(t.quantity||0))),0)||0)})(),(()=>{if(B)i(11,O=G?.reduce(((e,t)=>e+(t._delete?0:+(t[M]||0))),0)||0)})(),(()=>{if(D)i(10,T=G?.reduce(((e,t)=>{if(t.amount){const n=t.amount??0;e+=t._delete?0:+n}else if(t.price){const n=(F?t.quantity??0:1)*(t.price??0);e+=t._delete?0:n}return e}),0)||0)})(),ie().then((()=>$("save",{listName:g.name,value:G,amountValue:T,weeksValue:O})))),262144&e.$$.dirty[1]&&(r=e=>P[e]?.split(" • ").filter((e=>!!e)).slice(0,2).join(" · "))},[k,I,S,g,w,b,x,E,N,C,T,O,G,o,A,V,Z,X,ee,s,a,d,u,undefined,D,{name:"amountValue",properties:{decimals:2}},z,{name:"hoursValue",properties:{decimals:2}},B,{name:"weeksValue",properties:{decimals:1}},K,(e,t)=>{let n=e[t];return H["pos"+t]&&(n=H["pos"+t]),n&&y.filter((e=>!0!==e.properties?.hidden&&("dateRange"===e.type||void 0!==n[e.name])&&"textarea"!==e.properties?.format)).map((e=>""===n[e.name]?"":"object"===e.type?r(n[e.name]):Array.isArray(n[e.name])?ne(n[e.name]):"boolean"===e.type?h(n[e.name]):"dateRange"===e.type?((e,t)=>{let n,i;try{n=t[e+"_from"],n=new Date(n||"").toLocaleDateString(),"Invalid Date"===n&&(n=" ")}catch{n=" "}try{i=t[e+"_to"],i=new Date(i||"").toLocaleDateString(),"Invalid Date"===i&&(i="")}catch{i=""}return[n,i].filter((e=>""!==e)).join(" - ").trim()})(e.name,n):"date"===e.type?f(n[e.name]):"datetime"===e.type?p(n[e.name]):e.properties?.multi?"":n[e.name])).filter((e=>!!e)).join(" • ")||"+"},(e,t)=>async({detail:n})=>{const{oldValue:r,value:s,add:l,desc:a}=n;if(g.refItem){const n=await oe(t,e,g.refItem);n&&i(12,G=n)}ae(t,e._formulaActor);const c=K?.find((t=>t.refClass.split(":")[1]?.split(".")[0]===e.refClass));c&&(c.value=(c.value||new Map).set(t,s)),s&&G.length===t+1&&i(12,G=G.concat({})),a&&i(49,P[s]=a,P),await de(t,e,s,r),await re(t,e.name),i(13,o=G),"number"===e.type&&i(18,ee={item:e,value:s,idx:t}),se(t)},({detail:e})=>{const{idx:t,value:n}=e;se(t,n)},async({detail:{className:e,itemName:t,value:i}})=>{if(U.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===R+"."+g.name))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&U.set(e,r[0])},({detail:e})=>{const{idx:t,fieldId:n,value:i}=e;if(!i)return;const o=le(i);let r=!1;G.forEach(((e,n)=>{if(t===n)return;const{start:i,end:s}=G[n];i&&s&&o>le(i)&&o<le(s)&&(r=!0)}));const s=document.getElementById(n);s?.classList?.toggle("invalid",r)},(e,t,n)=>n=>{G[t]._delete||(e(n),$e(t,!0))},(e,t,n)=>o=>{if(i(12,G[e]._delete=!G[e]._delete,G),G[e]._delete){H["pos"+e]={...G[e]};for(const t of y)i(12,G[e][t.name]="",G);t&&n(o)}else{if(H["pos"+e]){const t={};for(const n of y)t[n.name]=H["pos"+e][n.name];i(12,G[e]=t,G)}H["pos"+e]=void 0,t||n(o)}},e=>t=>{t.preventDefault(),i(17,X=!1);const n=he(t.dataTransfer.getData(Bl),e);if(!1===n)return;t.dataTransfer.dropEffect="move";const o=[...G].map(((e,t)=>(e._index=t,e)));n<e?(o.splice(e+1,0,o[n]),o.splice(n,1)):(o.splice(e,0,o[n]),o.splice(n+1,1)),o.map(((e,t)=>{return n=e._index,i=t,void Al.set(i,n);var n,i}));let r=[];Z.map(((e,t)=>{r[t]=Z[(e=>{const t=Al.get(e);return void 0===t?e:t})(t)]})),i(16,Z=r),i(12,G=o.map(((e,t)=>(delete e._index,e)))),fe=!1},e=>t=>{if(!pe(e))return!1;t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move",t.dataTransfer.setData(Bl,e+";"+g.name),fe=e},e=>t=>{const n=he(t.dataTransfer.getData(Bl),e)||fe;return!1===n||n===e?i(17,X=!1):void i(17,X={top:n>e&&e,bottom:n<e&&e})},e=>e.preventDefault(),e=>e=>{i(17,X=!1)},(e,t)=>n=>{setTimeout((()=>{Array.from(U).forEach((([t,n])=>{G[e][t]||i(12,G[e][t]=n._id,G)}))}),500);const o=new Set;for(const e of te)o.add(e.refObj||R);for(const t of Array.from(o))re(e,t);t(n),$e(e)},e=>({detail:t})=>{ae(e,t.item.name)},e=>async({detail:t})=>{const{itemName:n,itemType:o,source:r,target:s,sourceId:l,prop:a}=t;if(!l)return void i(12,G[e][n]="",G);let c=await Pa(r,l);const d=c[a];c=await Pa(g.name,w[g.name][e][g.name]);const u=c[s];let m="number"===o?0:"",f=0;u.forEach((e=>{const t=e[a];t.length<=f||t.every((e=>d.find((t=>t===e))))&&(m=e[n],f=t.length)})),i(12,G[e][n]=m,G)},v,y,_,P,function(e){O=e,i(11,O)},function(e){A=e,i(14,A)},function(e){T=e,i(10,T)},function(t){Y(e,t)},function(t){Y(e,t)}]}class Pl extends _e{constructor(e){var t;super(),hl.getElementById("svelte-1es1ap1-style")||((t=L("style")).id="svelte-1es1ap1-style",t.textContent=".accordion.svelte-1es1ap1{display:flex;overflow:hidden}.accordion-content.svelte-1es1ap1{position:relative}.formList .accordion > .btn{display:inline-block;margin-bottom:1em;background-color:#F5F5F5}.sTask .formList .accordion > .btn{width:95% !important}.sEmbedded .formList .accordion > .btn{width:97%}@media screen and (max-width: 600px){.formList .accordion > .btn{width:25em}}span.pointer.svelte-1es1ap1{padding-top:1em}div.delete.svelte-1es1ap1{text-decoration:line-through}.icon.svelte-1es1ap1{margin-right:-0.75em}.form-field .formField_italic{font-style:italic}.panel.invalid .btn{border:1px #b80000 solid}.draggableListItem.svelte-1es1ap1{cursor:drag}.draggableListItem.is-active-top.svelte-1es1ap1{border-top:3px purple solid;padding-top:2em}.draggableListItem.is-active-bottom.svelte-1es1ap1{border-bottom:3px purple solid;padding-bottom:2em}",S(hl.head,t)),Ie(this,e,Ol,zl,k,{list:3,mainSchema:46,schema:47,record:4,classId:5,eventId:6,disabled:0,fixed:1,template:48,reqQuantity:2,open:9,currency:7,notifyList:8},[-1,-1,-1,-1])}}const{Boolean:Vl,document:Wl}=ve;function Rl(e,t,n){const i=e.slice();return i[137]=t[n],i}function Ul(e,t,n){const i=e.slice();return i[140]=t[n],i}function Hl(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Gl(e){let t,n,i=e[136]&&function(e){let t,n,i,o,r,s,l,a,c,d,u,m,f,p,h,$,g=e[1].items,v=[];for(let t=0;t<g.length;t+=1)v[t]=Yl(Ul(e,g,t));const y=e=>he(v[e],1,1,(()=>{v[e]=null}));let w=e[1].list&&Jl(e),x=!e[4]&&!e[2]&&e[45]&&e[5]&&!e[24]&&sa(e);d=new e[29]({props:{outline:!0,$$slots:{default:[aa]},$$scope:{ctx:e}}}),d.$on("click",e[48]);const k=[da,ca],I=[];function j(e,t){return e[7]?0:e[45]?1:-1}~(m=j(e))&&(f=I[m]=k[m](e));return{c(){t=L("section"),n=L("form"),i=L("input"),r=D();for(let e=0;e<v.length;e+=1)v[e].c();s=D(),w&&w.c(),l=D(),x&&x.c(),a=D(),c=L("div"),be(d.$$.fragment),u=D(),f&&f.c(),M(i,"class",_(e[35])+" svelte-e23pry"),M(i,"name","_id"),M(i,"type","hidden"),i.value=o=e[6]._id||"",M(n,"class",_(e[36])+" svelte-e23pry"),M(n,"id",e[35]),M(c,"class","form--buttons svelte-e23pry"),M(t,"class",_(e[37])+" svelte-e23pry")},m(o,f){C(o,t,f),S(t,n),S(n,i),S(n,r);for(let e=0;e<v.length;e+=1)v[e].m(n,null);S(n,s),w&&w.m(n,null),S(t,l),x&&x.m(t,null),S(t,a),S(t,c),xe(d,c,null),S(c,u),~m&&I[m].m(c,null),p=!0,h||($=[T(n,"keydown",e[53]),T(n,"submit",z(e[47]))],h=!0)},p(e,r){if((!p||64&r[0]&&o!==(o=e[6]._id||""))&&(i.value=o),17056834&r[0]|941367312&r[1]){let t;for(g=e[1].items,t=0;t<g.length;t+=1){const i=Ul(e,g,t);v[t]?(v[t].p(i,r),pe(v[t],1)):(v[t]=Yl(i),v[t].c(),pe(v[t],1),v[t].m(n,s))}for(me(),t=g.length;t<v.length;t+=1)y(t);fe()}e[1].list?w?(w.p(e,r),2&r[0]&&pe(w,1)):(w=Jl(e),w.c(),pe(w,1),w.m(n,null)):w&&(me(),he(w,1,1,(()=>{w=null})),fe()),e[4]||e[2]||!e[45]||!e[5]||e[24]?x&&(me(),he(x,1,1,(()=>{x=null})),fe()):x?(x.p(e,r),16777268&r[0]&&pe(x,1)):(x=sa(e),x.c(),pe(x,1),x.m(t,a));const l={};524288&r[4]&&(l.$$scope={dirty:r,ctx:e}),d.$set(l);let u=m;m=j(e),m===u?~m&&I[m].p(e,r):(f&&(me(),he(I[u],1,1,(()=>{I[u]=null})),fe()),~m?(f=I[m],f?f.p(e,r):(f=I[m]=k[m](e),f.c()),pe(f,1),f.m(c,null)):f=null)},i(e){if(!p){for(let e=0;e<g.length;e+=1)pe(v[e]);pe(w),pe(x),pe(d.$$.fragment,e),pe(f),p=!0}},o(e){v=v.filter(Vl);for(let e=0;e<v.length;e+=1)he(v[e]);he(w),he(x),he(d.$$.fragment,e),he(f),p=!1},d(e){e&&E(t),N(v,e),w&&w.d(),x&&x.d(),ke(d),~m&&I[m].d(),h=!1,b($)}}}(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,t){e[136]&&i.p(e,t)},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Ql(e){let t,n;return t=new pl({props:{classId:e[35],item:e[140],selection:e[140].selection,record:e[6],disabled:e[24],eventId:e[44],toDelete:e[14],currency:e[10],changeValue:e[18]}}),t.$on("task",e[49]),t.$on("notify",e[50]),t.$on("safeReference",e[59]),t.$on("multi",e[51]),t.$on("defPrep",e[58]),t.$on("record",e[60]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.item=e[140]),2&n[0]&&(i.selection=e[140].selection),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),16384&n[0]&&(i.toDelete=e[14]),1024&n[0]&&(i.currency=e[10]),262144&n[0]&&(i.changeValue=e[18]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Yl(e){let t,n,i="list"!==e[140].type&&Ql(e);return{c(){i&&i.c(),t=F()},m(e,o){i&&i.m(e,o),C(e,t,o),n=!0},p(e,n){"list"!==e[140].type?i?(i.p(e,n),2&n[0]&&pe(i,1)):(i=Ql(e),i.c(),pe(i,1),i.m(t.parentNode,t)):i&&(me(),he(i,1,1,(()=>{i=null})),fe())},i(e){n||(pe(i),n=!0)},o(e){he(i),n=!1},d(e){i&&i.d(e),e&&E(t)}}}function Jl(e){let t,n,i,o,r,s=e[40]&&e[11]&&0!=e[11]&&Kl(e),l=e[12]&&Xl(e),a=e[41]&&e[17]&&0!=e[17]&&ta(e),c=e[1].list,d=[];for(let t=0;t<c.length;t+=1)d[t]=ra(Rl(e,c,t));const u=e=>he(d[e],1,1,(()=>{d[e]=null}));return{c(){s&&s.c(),t=D(),l&&l.c(),n=D(),a&&a.c(),i=D();for(let e=0;e<d.length;e+=1)d[e].c();o=F()},m(e,c){s&&s.m(e,c),C(e,t,c),l&&l.m(e,c),C(e,n,c),a&&a.m(e,c),C(e,i,c);for(let t=0;t<d.length;t+=1)d[t].m(e,c);C(e,o,c),r=!0},p(e,r){if(e[40]&&e[11]&&0!=e[11]?s?(s.p(e,r),2048&r[0]&&pe(s,1)):(s=Kl(e),s.c(),pe(s,1),s.m(t.parentNode,t)):s&&(me(),he(s,1,1,(()=>{s=null})),fe()),e[12]?l?(l.p(e,r),4096&r[0]&&pe(l,1)):(l=Xl(e),l.c(),pe(l,1),l.m(n.parentNode,n)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[41]&&e[17]&&0!=e[17]?a?(a.p(e,r),131072&r[0]&&pe(a,1)):(a=ta(e),a.c(),pe(a,1),a.m(i.parentNode,i)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),18449734&r[0]|538976272&r[1]){let t;for(c=e[1].list,t=0;t<c.length;t+=1){const n=Rl(e,c,t);d[t]?(d[t].p(n,r),pe(d[t],1)):(d[t]=ra(n),d[t].c(),pe(d[t],1),d[t].m(o.parentNode,o))}for(me(),t=c.length;t<d.length;t+=1)u(t);fe()}},i(e){if(!r){pe(s),pe(l),pe(a);for(let e=0;e<c.length;e+=1)pe(d[e]);r=!0}},o(e){he(s),he(l),he(a),d=d.filter(Vl);for(let e=0;e<d.length;e+=1)he(d[e]);r=!1},d(e){s&&s.d(e),e&&E(t),l&&l.d(e),e&&E(n),a&&a.d(e),e&&E(i),N(d,e),e&&E(o)}}}function Kl(e){let t,n;return t=new e[30]({props:{name:"Total Dokument",nameClass:"formField_italic",$$slots:{default:[Zl]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};3072&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Zl(e){let t,n,i;function o(t){e[71](t)}let r={item:e[38],disabled:!0,currency:e[10]};return void 0!==e[11]&&(r.value=e[11]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1024&i[0]&&(o.currency=e[10]),!n&&2048&i[0]&&(n=!0,o.value=e[11],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Xl(e){let t,n;return t=new e[30]({props:{name:"Total MWSt "+(e[13]?"("+e[13]+"%)":""),nameClass:"formField_italic",$$slots:{default:[ea]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};8192&n[0]&&(i.name="Total MWSt "+(e[13]?"("+e[13]+"%)":"")),5120&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ea(e){let t,n,i;function o(t){e[72](t)}let r={item:e[39],disabled:!0,currency:e[10]};return void 0!==e[12]&&(r.value=e[12]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};1024&i[0]&&(o.currency=e[10]),!n&&4096&i[0]&&(n=!0,o.value=e[12],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function ta(e){let t,n;return t=new e[30]({props:{name:"Gesamtzeit in Wochen",nameClass:"formField_italic",$$slots:{default:[na]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};131072&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function na(e){let t,n,i;function o(t){e[73](t)}let r={item:e[42],disabled:!0};return void 0!==e[17]&&(r.value=e[17]),t=new ao({props:r}),K.push((()=>we(t,"value",o))),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};!n&&131072&i[0]&&(n=!0,o.value=e[17],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function ia(e){let t,n;return t=new xi({props:{classId:e[35],open:!e[2]&&1===e[1].list.length,list:e[137],template:e[19],eventId:e[44],schema:e[137].item,record:e[6],disabled:e[24],currency:e[10]}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};6&n[0]&&(i.open=!e[2]&&1===e[1].list.length),2&n[0]&&(i.list=e[137]),524288&n[0]&&(i.template=e[19]),2&n[0]&&(i.schema=e[137].item),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),1024&n[0]&&(i.currency=e[10]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function oa(e){let t,n;return t=new Pl({props:{classId:e[35],open:e[16],list:e[137],template:e[20],eventId:e[44],schema:e[137].item,mainSchema:e[1].item,record:e[6],disabled:e[24],fixed:e[137].fixed,reqQuantity:e[15],currency:e[10],notifyList:e[8]}}),t.$on("save",e[52]),t.$on("record",e[60]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};65536&n[0]&&(i.open=e[16]),2&n[0]&&(i.list=e[137]),1048576&n[0]&&(i.template=e[20]),2&n[0]&&(i.schema=e[137].item),2&n[0]&&(i.mainSchema=e[1].item),64&n[0]&&(i.record=e[6]),16777216&n[0]&&(i.disabled=e[24]),2&n[0]&&(i.fixed=e[137].fixed),32768&n[0]&&(i.reqQuantity=e[15]),1024&n[0]&&(i.currency=e[10]),256&n[0]&&(i.notifyList=e[8]),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ra(e){let t,n,i,o,r,s;t=new e[28]({props:{text:e[137].designation}});const l=[oa,ia],a=[];function c(e,t){return"array"===e[137].type?0:1}return i=c(e),o=a[i]=l[i](e),{c(){be(t.$$.fragment),n=D(),o.c(),r=F()},m(e,o){xe(t,e,o),C(e,n,o),a[i].m(e,o),C(e,r,o),s=!0},p(e,n){const s={};2&n[0]&&(s.text=e[137].designation),t.$set(s);let d=i;i=c(e),i===d?a[i].p(e,n):(me(),he(a[d],1,1,(()=>{a[d]=null})),fe(),o=a[i],o?o.p(e,n):(o=a[i]=l[i](e),o.c()),pe(o,1),o.m(r.parentNode,r))},i(e){s||(pe(t.$$.fragment,e),pe(o),s=!0)},o(e){he(t.$$.fragment,e),he(o),s=!1},d(e){ke(t,e),e&&E(n),a[i].d(e),e&&E(r)}}}function sa(e){let t,n,i,o;function r(t){e[74](t)}let s={title:"",$$slots:{default:[la]},$$scope:{ctx:e}};return void 0!==e[23]&&(s.checked=e[23]),n=new e[31]({props:s}),K.push((()=>we(n,"checked",r))),{c(){t=L("div"),be(n.$$.fragment),M(t,"class","askNext"),P(t,"margin-top","1em"),P(t,"margin-left","23em")},m(e,i){C(e,t,i),xe(n,t,null),o=!0},p(e,t){const o={};524288&t[4]&&(o.$$scope={dirty:t,ctx:e}),!i&&8388608&t[0]&&(i=!0,o.checked=e[23],re((()=>i=!1))),n.$set(o)},i(e){o||(pe(n.$$.fragment,e),o=!0)},o(e){he(n.$$.fragment,e),o=!1},d(e){e&&E(t),ke(n)}}}function la(e){let t;return{c(){t=L("span"),t.textContent="Weiter erfassen",P(t,"margin-left",".75em")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function aa(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ca(e){let t,n,i,o,r,s;t=new e[29]({props:{class:"close",disabled:e[24],form:e[35],filled:!0,type:"submit",$$slots:{default:[ua]},$$scope:{ctx:e}}});let l=e[5]&&!e[24]&&ma(e),a=e[2]&&e[3]&&pa(e),c=e[21]&&$a(e);return{c(){be(t.$$.fragment),n=D(),l&&l.c(),i=D(),a&&a.c(),o=D(),c&&c.c(),r=F()},m(e,d){xe(t,e,d),C(e,n,d),l&&l.m(e,d),C(e,i,d),a&&a.m(e,d),C(e,o,d),c&&c.m(e,d),C(e,r,d),s=!0},p(e,n){const s={};16777216&n[0]&&(s.disabled=e[24]),524288&n[4]&&(s.$$scope={dirty:n,ctx:e}),t.$set(s),e[5]&&!e[24]?l?(l.p(e,n),16777248&n[0]&&pe(l,1)):(l=ma(e),l.c(),pe(l,1),l.m(i.parentNode,i)):l&&(me(),he(l,1,1,(()=>{l=null})),fe()),e[2]&&e[3]?a?(a.p(e,n),12&n[0]&&pe(a,1)):(a=pa(e),a.c(),pe(a,1),a.m(o.parentNode,o)):a&&(me(),he(a,1,1,(()=>{a=null})),fe()),e[21]?c?(c.p(e,n),2097152&n[0]&&pe(c,1)):(c=$a(e),c.c(),pe(c,1),c.m(r.parentNode,r)):c&&(me(),he(c,1,1,(()=>{c=null})),fe())},i(e){s||(pe(t.$$.fragment,e),pe(l),pe(a),pe(c),s=!0)},o(e){he(t.$$.fragment,e),he(l),he(a),he(c),s=!1},d(e){ke(t,e),e&&E(n),l&&l.d(e),e&&E(i),a&&a.d(e),e&&E(o),c&&c.d(e),e&&E(r)}}}function da(e){let t,n,i,o;t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Ia]},$$scope:{ctx:e}}}),t.$on("click",e[56]);let r=e[22]&&_a(e);return{c(){be(t.$$.fragment),n=D(),r&&r.c(),i=F()},m(e,s){xe(t,e,s),C(e,n,s),r&&r.m(e,s),C(e,i,s),o=!0},p(e,n){const o={};524288&n[4]&&(o.$$scope={dirty:n,ctx:e}),t.$set(o),e[22]?r?(r.p(e,n),4194304&n[0]&&pe(r,1)):(r=_a(e),r.c(),pe(r,1),r.m(i.parentNode,i)):r&&(me(),he(r,1,1,(()=>{r=null})),fe())},i(e){o||(pe(t.$$.fragment,e),pe(r),o=!0)},o(e){he(t.$$.fragment,e),he(r),o=!1},d(e){ke(t,e),e&&E(n),r&&r.d(e),e&&E(i)}}}function ua(e){let t;return{c(){t=q("Speichern und schliessen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function ma(e){let t,n;return t=new e[29]({props:{form:e[35],filled:!0,type:"submit",style:"opacity: 0.75;",$$slots:{default:[fa]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function fa(e){let t;return{c(){t=q("Speichern")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function pa(e){let t,n;return t=new e[29]({props:{disabled:e[24],danger:!0,outline:!0,$$slots:{default:[ha]},$$scope:{ctx:e}}}),t.$on("click",e[62]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};16777216&n[0]&&(i.disabled=e[24]),524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ha(e){let t;return{c(){t=q("Löschen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function $a(e){let t,n,i,o,r;const s=[va,ga],l=[];t=function(e){return e[43]?0:1}(e),n=l[t]=s[t](e);let a=e[22]&&xa(e);return{c(){n.c(),i=D(),a&&a.c(),o=F()},m(e,n){l[t].m(e,n),C(e,i,n),a&&a.m(e,n),C(e,o,n),r=!0},p(e,t){n.p(e,t),e[22]?a?(a.p(e,t),4194304&t[0]&&pe(a,1)):(a=xa(e),a.c(),pe(a,1),a.m(o.parentNode,o)):a&&(me(),he(a,1,1,(()=>{a=null})),fe())},i(e){r||(pe(n),pe(a),r=!0)},o(e){he(n),he(a),r=!1},d(e){l[t].d(e),e&&E(i),a&&a.d(e),e&&E(o)}}}function ga(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[ya]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[54](e[0]))&&e[54](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function va(e){let t,n;return t=new d({props:{text:e[43],extended:!0,$$slots:{default:[ba]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};1&n[0]|524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ya(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent=`${e[61]()}`,be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function wa(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent=`${e[61]()}`,be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function ba(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.6;",$$slots:{default:[wa]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[54](e[0]))&&e[54](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function xa(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[ka]},$$scope:{ctx:e}}}),t.$on("click",(function(){x(e[55](e[0]))&&e[55](e[0]).apply(this,arguments)})),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(n,i){e=n;const o={};524288&i[4]&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function ka(e){let t,n,i;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Daten",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function Ia(e){let t,n,i;return n=new dt({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Erstellen",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function _a(e){let t,n;return t=new e[29]({props:{filled:!0,style:"opacity: 0.75;",$$slots:{default:[Sa]},$$scope:{ctx:e}}}),t.$on("click",e[57]),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Sa(e){let t,n,i;return n=new ft({props:{size:"18"}}),{c(){t=L("span"),t.textContent="Daten",be(n.$$.fragment),P(t,"margin-right",".75em")},m(e,o){C(e,t,o),xe(n,e,o),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n,e)}}}function Ca(e){return{c:v,m:v,p:v,i:v,o:v,d:v}}function Ea(e){let t;return{c(){t=q("Abbrechen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function Na(e){let t;return{c(){t=q("Ja, bitte löschen")},m(e,n){C(e,t,n)},d(e){e&&E(t)}}}function La(e){let t,n,i,o,r,s,l,a,c;return s=new e[29]({props:{filled:!0,$$slots:{default:[Ea]},$$scope:{ctx:e}}}),s.$on("click",e[75]),a=new e[29]({props:{danger:!0,outline:!0,$$slots:{default:[Na]},$$scope:{ctx:e}}}),a.$on("click",e[64]),{c(){t=L("p"),t.textContent="Willst du diese Daten löschen?",n=D(),i=L("p"),i.textContent="Das kann nicht rückgängig gemacht werden.",o=D(),r=L("div"),be(s.$$.fragment),l=D(),be(a.$$.fragment),M(r,"class","flex_div svelte-e23pry")},m(e,d){C(e,t,d),C(e,n,d),C(e,i,d),C(e,o,d),C(e,r,d),xe(s,r,null),S(r,l),xe(a,r,null),c=!0},p(e,t){const n={};524288&t[4]&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const i={};524288&t[4]&&(i.$$scope={dirty:t,ctx:e}),a.$set(i)},i(e){c||(pe(s.$$.fragment,e),pe(a.$$.fragment,e),c=!0)},o(e){he(s.$$.fragment,e),he(a.$$.fragment,e),c=!1},d(e){e&&E(t),e&&E(n),e&&E(i),e&&E(o),e&&E(r),ke(s),ke(a)}}}function ja(e){let t,n,i;return n=new Ee({props:{size:"25"}}),{c(){t=L("div"),be(n.$$.fragment),M(t,"slot","title-icon")},m(e,o){C(e,t,o),xe(n,t,null),i=!0},p:v,i(e){i||(pe(n.$$.fragment,e),i=!0)},o(e){he(n.$$.fragment,e),i=!1},d(e){e&&E(t),ke(n)}}}function qa(e){let t,n;return t=new e[27]({props:{title:"Bestätigung",closeCallback:e[135],danger:!0,$$slots:{"title-icon":[ja],default:[La]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,n){const i={};2048&n[4]&&(i.closeCallback=e[135]),524288&n[4]&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Da(e){let t,n,i,o,r,s;Wl.title=t=e[25];let l={ctx:e,current:null,token:null,hasCatch:!1,pending:Ca,then:Gl,catch:Hl,value:136,blocks:[,,,]};function a(t){e[76](t)}$e(e[46](),l);let c={$$slots:{default:[qa,({closeCallback:e})=>({135:e}),({closeCallback:e})=>[0,0,0,0,e?2048:0]]},$$scope:{ctx:e}};return void 0!==e[9]&&(c.open=e[9]),o=new e[26]({props:c}),K.push((()=>we(o,"open",a))),{c(){n=D(),l.block.c(),i=D(),be(o.$$.fragment)},m(e,t){C(e,n,t),l.block.m(e,l.anchor=t),l.mount=()=>i.parentNode,l.anchor=i,C(e,i,t),xe(o,e,t),s=!0},p(n,i){e=n,(!s||33554432&i[0])&&t!==(t=e[25])&&(Wl.title=t),ge(l,e,i);const a={};526336&i[4]&&(a.$$scope={dirty:i,ctx:e}),!r&&512&i[0]&&(r=!0,a.open=e[9],re((()=>r=!1))),o.$set(a)},i(e){s||(pe(l.block),pe(o.$$.fragment,e),s=!0)},o(e){for(let e=0;e<3;e+=1){he(l.blocks[e])}he(o.$$.fragment,e),s=!1},d(e){e&&E(n),l.block.d(e),l.token=null,l=null,e&&E(i),ke(o,e)}}}let Fa=new Map,Ta=new Map,za=new Map;const Aa=(e,t)=>{const i=t;return Fa.has(i)||Fa.set(i,n.getTasksList(t).then((({data:e})=>e))),Fa.get(i)},Ma=(e,t,i,o=!1)=>Ta.get(i)||o?n.getTaskList(e,i).then((e=>(Ta.set(i,e),e))):Aa(e,t).then((t=>t.find((({_id:e})=>e===i))||n.getTaskList(e,i))).then((e=>(Ta.set(i,e),e))),Ba=(e,t)=>{za.set(e,t)},Oa=e=>za.get(e),Pa=(e,t,i=!1)=>!i&&za.get(t)||n.getTask(e,t).then((e=>(za.set(t,e),e))),Va=(e,t)=>{if(!Fa.get(t))return;const i=t;Fa.set(i,n.getTasksList(t).then((({data:e})=>e)))};function Wa(e,r,a){let d,f,p,h,v,y,w,b;I(e,m,(e=>a(87,v=e))),I(e,l,(e=>a(88,y=e))),I(e,o,(e=>a(89,w=e)));const{Modal:x,Dialog:k,Divider:_,Button:S,FormField:C,Checkbox:E}=c,{loggedIn:N,currentTasks:L,environment:j}=u;I(e,N,(e=>a(90,b=e))),I(e,L,(e=>a(85,p=e))),I(e,j,(e=>a(86,h=e)));const q=JSON.parse(t.getItem("Locale")),D=Q();let F,T,z,A,M,{schema:B}=r,{recID:O}=r,{deletable:P}=r,{prevEventID:V=!1}=r,{prev:W=!1}=r,{taskId:R=!1}=r,{description:U=""}=r,{root:Y=!1}=r,{readonly:J}=r,{isStandalone:K}=r,Z={},X={},ee="form-"+B.class+Math.floor(9e3*Math.random()+1e3).toString(),te=!1;const ne=Y?"fEmbedded":"fTask",oe=Y?"sEmbedded":"sTask";let re="CHF";let se,le,ae=0,ce=0,de=0,ue=0,me=1,fe=!O&&B.list&&1===B.list.length;const pe={},he=B.items.find((e=>"price"===e.name&&!e.properties?.hidden)),$e=B.items.find((e=>"quantity"===e.name&&!e.properties?.hidden)),ge=B.items.find((e=>"amount"===e.name&&!e.properties?.hidden)),ve=!!he||!!ge,ye=B.list?.filter((e=>"array"===e.type))?.length>1||ve,we=B.items.find((e=>"number"===e.type&&"w"===e.properties?.unit?.constant?.toLowerCase()&&!e.properties?.hidden))?.name,be=!!we,xe=B.list?.filter((e=>"array"===e.type))?.length>1||be,ke={},Ie=B.result?.resultDef[0].button?.description;let _e,Se,Ce,Ee,Ne=0,Le=0,je=[],qe=[],De=[],Fe={},Te=new Map,ze=B.class,Ae=B.id,Me=!1,Be=-1!==window.location.search.indexOf("next=");const Oe=!p?.length||p.find((e=>e===Ae));["readonly","hidden","required"].map((e=>{B.items.filter((t=>"object"==typeof(t.properties&&t.properties[e]))).map((t=>{const n=t.properties[e].refItem||"",[i,o]=n.split(".");je.push({action:e,itemName:t.name,refObj:i,refName:o,op:t.properties[e].invert?"!":""})}))}));B.items.filter((e=>e.selection&&e.constraint)).map((e=>{qe.push({name:e.name,selection:e.selection,constraint:e.constraint})}));B.items.filter((e=>e.lookup)).forEach((e=>{De.push({name:e.name,lookup:e.lookup})})),B.items.filter((e=>e.properties?.lookup)).forEach((e=>{De.push({name:e.name,lookup:e.properties.lookup.split(":").at(-1)})}));const Pe=async e=>{if(e?.length)for(const t of e){if(!t.lookup)break;const{name:e}=t;if(Z[e])break;const{domain:i,value:o}=t.lookup;if("user"===i&&o){const t=b.user,i={[o]:t},r=await n.getSectionView(e,i);if(r?.length){const[{_id:t}]=r;t&&a(6,Z[e]=t,Z)}}}},Ve=async e=>{if(!B.input)return;if(!B.input.length)return;if(B.input.length<2)return;const t=!e.input.class[0].name&&e.input.class[0].selection;if(!t)return;const i=e.input.class[1].name,[o,r]=e.input.class[1].destination?.split(".");if(!i||!r)return;const s=B.list?.find((e=>e.name===o));if(!s)return;const l=await n.getSchemaByClass(t),c=(await n.getTasks(l.id)).data;if(!c?.length)return;const d=[];for(const e of c)if(e.active??1){const t={};for(const n of s.item)n.name===r?t[n.name]=e._id:e[n.name]&&(t[n.name]=e[n.name]);d.push(t)}d.length&&a(6,Z[o]=d,Z)},We=async()=>{for(const e of B.items)"boolean"==typeof e.properties?.value&&a(6,Z[e.name]=e.properties.value,Z),e.properties?.value?.concatenation&&Re(e);for(const e of B.list||[])for(const t of e.item)if("array"!==e.type&&"owner"===t.refItem){const i=await n.getSolitaire(t.refItem);i?.length&&(Z[e.name]||a(6,Z[e.name]={},Z),a(6,Z[e.name][t.name]=g(i[0],t.refPos||t.name),Z))}},Re=async e=>{const t=e.properties.value.concatenation;let n="";for(const e of t)void 0!==e.constant&&(n+=e.constant),"year"===e.variable&&(n+=(new Date).getFullYear()),e.refItemNext&&(n+=await He(e.refItemNext));a(6,Z[e.name]=n,Z)},Ue=async e=>{const t=je.filter((t=>t.refObj===e));if(t?.length){a(18,Fe={});for(const e of t){const{itemName:t,refObj:n,refName:i,op:o}=e;let{action:r}=e;if(!n)break;let s,l,c=!i&&Z[n];const d=Z[n];d&&i&&(c=(await Pa(n,d))[i]),Array.isArray(c)&&0===c.length&&(c=!1),"!"===o&&(c=!c),"required"!==r&&"readonly"!==r||(r="required"===r?r:"disabled",setTimeout((()=>{s=`#${ee} .form-field.${t} .field #${t}`,l=document.querySelector(s),l&&c&&l.setAttribute(r,""),l&&!c&&l.removeAttribute(r)}),0)),"hidden"===r&&(s=`#${ee} .form-field.${t}`,l=document.querySelector(s),l?.classList?.toggle("hidden",!!c),c&&a(18,Fe[t]="",Fe))}}},He=async e=>{const[t,i]=e.offset?.split(",")||[0,0],o=+e.base||0,r=+e.step||1;e.type;const s=e.refItem,l=await n.getLastId(B.class,s);if(!l?.length)return(o+r).toString().padStart(i,"0");const a=l[0][s];return((+a?.substring(t,t+i)||o)+r).toString().padStart(i,"0")},Ge=(e,t,n,i=!1)=>{const o=n||t.name,r=o.startsWith("_")?o:o.split("_")[0],s=e.find((e=>e.name===r));let l=t.value;if(!s)return l;if(i||"signature"!==s.type&&!s.properties?.multi||(l=Z[o]),"dateRange"===s.type){if(null===l)return;let e=new Date(l);if("Invalid Date"==e)return;return e=`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T00:00:00.000Z`,new Date(e).toISOString()}if(l&&s.type.startsWith("date"))try{return Yn(l,"%d.%m.%Y").toISOString()}catch{return new Date(l).toISOString()}if("boolean"===s.type&&(l=!!t.checked),"number"===s.type){const e=Number("1.1").toLocaleString(q.id).substring(1,2);try{l=Number(l.replace(e,".")).toString()}catch{}}return l},Qe=()=>!z&&V?window.history.back():Ye(),Ye=()=>K?window.close():Y?window.singleSpaNavigate("/"):D("back"),Je=async(e,t)=>{if(B.input&&B.input.length>1){if(B.input[0]!==e)return;const{name:i,source:o,destination:r,selection:s}=Ce.input.class[1];if(o&&r){const n=await Pa(e,t);if(!n)return void a(6,Z[r]=[],Z);const i=await Pa(s,n[s]);if(!i)return;const l=i[o]||[];return void a(6,Z[r]=l,Z)}const{recursive:l}=Ce.input.class[1];if(t){const i=await n.getTaskOptions(`${e}:${t}`,Ae,l);a(6,Z={...Z,...i})}else{const e=B.input.slice(1);for(const t of e)a(6,Z[t]=[],Z)}}},Ke=()=>{let e=0;if(he){let t=1;$e&&(t=me),e=ue*t}ge&&(e=ue);let t=0;for(const e in pe)t+=pe[e];a(11,ae=t+e)},Ze=()=>{let e=0;for(const t in ke)e+=ke[t];a(17,Ne=e+ +Le)};i.subscribe((async e=>{if(!e)return;if(!O)return;const t=await n.getSchema(e.eventId);if(!t)return;const i=B.list?.find((e=>e.name===t.class));if(!i)return;const o=await n.getTaskById(e.taskId);((e,t,n)=>{if(!Fa.get(e))return;const i=t;Ta.set(i,n)})(o.event,o.docId,o.data);const r=await n.getTask(t.class,o.docId),s=Z[t.class].filter((e=>e[t.class]==r._id));s?.length&&s.map((e=>{e[t.class]=o.docId})),a(6,Z),a(70,T),a(69,F),a(1,B)})),H((()=>{Fa=new Map,Ta=new Map,za=new Map,Xe()}));const Xe=async()=>{const e=e=>new Promise((t=>setTimeout(t,e)));let t,n=0;for(;!(t=document.getElementById(ee))&&++n<20;)await e(50);t&&(()=>{if(O)return;const e=new Set;for(const t of je)e.add(t.refObj||ze);Array.from(e).forEach((e=>Ue(e)))})(),et()},et=()=>{setTimeout((()=>{Array.from(Te).forEach((([e,t])=>{Z[e]||a(6,Z[e]=t._id,Z)}))}),350)};G((()=>{O&&function(e,t,n=t){e.set(n)}(m,v={[O]:{record:Z,lists:X}},v)}));const tt=()=>{const e={};Array.from(document.querySelectorAll("form#"+ee+" ."+ee)).map((t=>{if(t.name)if(t.name.includes(".")){const[n,i]=t.name.split("."),o=B.list.find((e=>e.name===n));e[t.name]=Ge(o.item,t)}else e[t.name]=Ge(B.items,t,t.name.split("_")[0])})),B.list&&B.list.map((t=>{"array"===t.type&&X[t.name]&&(e[t.name]=X[t.name].reduce(((e,n)=>n._delete||!Object.values(n).some(Boolean)?e:e.concat(Object.entries(n).reduce(((e,[n,i])=>("_delete"!==n&&(e[n]=Ge(t.item,{name:n,value:i,checked:i},"",!0)),e)),{}))),[]))}));let t=!0;return Object.entries(e).map((([e,n])=>{e=e.split("_")[0];const i=B.items.find((t=>t.name===e));i?.properties?.required&&!n&&(t=!1)})),t&&e},nt=e=>{const t="/api/report/list/"+e;window.open(t,"_self","width=1 height=1")},it=()=>{a(9,te=!1)};return e.$$set=e=>{"schema"in e&&a(1,B=e.schema),"recID"in e&&a(2,O=e.recID),"deletable"in e&&a(3,P=e.deletable),"prevEventID"in e&&a(67,V=e.prevEventID),"prev"in e&&a(4,W=e.prev),"taskId"in e&&a(0,R=e.taskId),"description"in e&&a(65,U=e.description),"root"in e&&a(5,Y=e.root),"readonly"in e&&a(66,J=e.readonly),"isStandalone"in e&&a(68,K=e.isStandalone)},e.$$.update=()=>{16&e.$$.dirty[2]&&a(24,d=J),2&e.$$.dirty[0]|384&e.$$.dirty[2]&&T&&F&&B.items.map((({name:e,type:t,refItem:n})=>{if(!1===n)return;const i=F.items.find((t=>t.name===e));if(!i)return;if(t!==i.type)return;const o="_"+e;T[e]?a(6,Z[e]=T[e],Z):a(6,Z[e]="",Z),T[o]&&a(6,Z[o]=T[o],Z),a(16,fe=!1)})),32&e.$$.dirty[0]|8&e.$$.dirty[2]&&a(25,f=Y?U||"enablerr - Form":document.title)},[R,B,O,P,W,Y,Z,z,M,te,re,ae,ce,de,se,le,fe,Ne,Fe,_e,Se,Me,Ee,Be,d,f,x,k,_,S,C,E,N,L,j,ee,ne,oe,{name:"amountValue",properties:{decimals:2}},{name:"taxValue",properties:{decimals:2}},ye,xe,{name:"weekValue",properties:{decimals:1}},Ie,Ae,Oe,async()=>{if(a(20,Se=[]),h.currency?a(10,re=h.currency.designation):n.getSectionView("owner",{}).then((e=>{e?.length&&e[0].currency&&n.getSectionView("currency",{_id:e[0].currency}).then((e=>{e?.length&&e[0].designation&&a(10,re=e[0].designation)}))})),Ce=await n.getEvent(Ae),O||(a(19,_e=Se),Pe(Ce.input?.class),We(),Ve(Ce)),O){if(v&&v[O]){const e=v[O].record;B.items.map((t=>{e[t.name]=Ge(B.items,{name:t.name,value:e[t.name],checked:e[t.name]})})),a(6,Z=e),B.list&&B.list.map((e=>{"array"===e.type&&v[O].lists[e.name]&&a(6,Z[e.name]=v[O].lists[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Ge(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]),Z)}))}else a(6,Z=await n.getTask(B.class,O));a(65,U=$(B,Z)),a(21,Me=!!B.result?.resultDef&&!B.result.resultDef[0].createAfterSave),a(12,ce=Z._tax?._amount),a(13,de=100*Z._tax?._rate||"")}if(V){a(66,J=!1),a(69,F=await n.getSchema(V)),"string"==typeof W&&a(70,T=await n.getTask(F.class,W));const e=B.items.find((e=>e.refClass===F.class));a(6,Z[e.name]=T._id,Z)}if(xe&&(Le=Z[we]||0),Ce.trigger?.startOn&&!Ce.trigger.startOn.some((e=>e.type.indexOf("Manual")>=0))&&a(66,J=!0),y.role?.length&&B.authorization?.length){const e=B.authorization.some((e=>w?.find((t=>t===e.role&&"edit"===e.activity))));a(66,J||=!e)}if(a(7,z="report"===Ce.output.type),h.userSetting){const e=h.userSetting;if(a(22,Ee=e.isAdmin),!Ee){const e=b.tenants.find((e=>e._id===b.tenant));e&&a(22,Ee=e.admin?.find((e=>e===b.user)))}}else n.getUserSettings().then((e=>{if(a(22,Ee=e.isAdmin),!Ee){const e=b.tenants.find((e=>e._id===b.tenant));e&&a(22,Ee=e.admin?.find((e=>e===b.user)))}}));return!0},async e=>{O||a(24,d=!0);const t=e.submitter?.className?.includes("close"),i={};if(Array.from(document.querySelectorAll("form#"+ee+" ."+ee)).map((e=>{if(e.name)if(e.name.includes(".")){const t=e.name.split(".")[0],n=B.items.find((e=>e.name===t));if(n&&"object"===n.type&&n.properties?.multi)i[t]=(i[t]||[]).concat(e.value);else{const[t,n]=e.name.split("."),o=B.list.find((e=>e.name===t));i[e.name]=Ge(o.item,e)}}else i[e.name]=Ge(B.items,e);else if(e.id){"signature"===B.items.find((t=>t.name===e.id)).type&&(e.name=e.id,i[e.name]=Ge(B.items,e))}})),B.list&&B.list.map((e=>{"array"===e.type&&X[e.name]&&(i[e.name]=X[e.name].reduce(((t,n)=>n._delete||!Object.values(n).some(Boolean)?t:t.concat(Object.entries(n).reduce(((t,[n,i])=>("_delete"!==n&&(t[n]=Ge(e.item,{name:n,value:i,checked:i},"",!0)),t)),{}))),[]))})),i._event=Ae,i._prevEventId=V,i._taskId=R,A){const e=A.record;for(const t in e)t.includes(".")&&delete e[t];e._event=A.event,e._taskId=A.taskId;const{id:t}=await n.saveData(A.class,e);i[A.class]||(i[A.class]=t)}const{id:o,task:r,tax:l,error:c}=await n.saveData(B.class,i);if(c?.text){const e=c.field?" in "+c.field+": "+c.value:"";return s.failed(`${c.text} ${e}`,3e3),void a(24,d=!1)}s.success("Die Daten wurden gespeichert.",2e3),a(12,ce=l?._amount||0),a(13,de=100*(l?._rate||0)||""),i._id=o;const u=await n.getTaskList(B.class,o);if(D("choose",{row:u}),t)return Ye();if(!O){if(Be){const e=Math.floor(9e3*Math.random()+1e3).toString();return window.singleSpaNavigate(`/task/${Ae}/${Ae}/task?next=${e}`)}return window.singleSpaNavigate(`/task/${Ae}/${r}/task`)}},Qe,async({detail:e})=>{const{row:t}=e;let{eventId:i}=e;if((()=>{if(O)for(const e of je)e.refName||Ue(e.itemName)})(),await(async e=>{let t,i=!1;const o={...Z};for(const r of B.items)if(r.refItem&&(!e||r.properties?.linkOnly)){const[e,s]=r.refItem.split(".");Z[e]?(t=await n.getTask(e,Z[e]),t&&(o[r.name]=s?t[s][r.name]:t[r.name],i=!0)):s&&(o[r.name]="",i=!0)}for(const r of B.list||[])if((!e||r.properties?.linkOnly)&&r.refItem&&Z[r.refItem]){t=await n.getTask(r.refItem,Z[r.refItem]);const e=[];for(const n of t[r.name]){const t={};for(const e of r.item)n[e.name]&&(t[e.name]=n[e.name]);e.push(t),i=!0}o[r.name]=e}i&&a(6,Z=o)})(!!O),O)return;if(i||=t._task?.event,i&&(await(async(e,t)=>{if(!e)return;const i=(await n.getEvent(e)).output.class[0].name,o=De.filter((e=>e.lookup===i));if(o?.length)for(const e of o){const{lookup:n,name:i}=e;let o="";if(t){let e=await Pa(n,t);e&&e[i]?.length&&(o=e[i][0][i])}a(6,Z[i]=o,Z)}})(i,t._id),B.items.filter((e=>e.properties?.lookup)).forEach((async e=>{const t=await n.getEvent(i);t.output.class[0]?.name===e.properties.lookup&&a(6,Z[e.name]="",Z)}))),!t._task)return;const o=t._task.event,r=await n.getEvent(o);if(!Ce.output?.class?.length)return;const s=Ce.output.class[0]?.item.find((e=>(e.refClass||e.name)===r.output.class[0]?.name));(Ce.input?.class?.length&&Ce.input.class[0].name===r.output.class[0]?.name||s?.asInput)&&(a(69,F=await n.getSchema(o)),a(67,V=o),a(0,R=t._task._id),R&&t._task.docId?a(70,T=await n.getTask(F.class,t._task.docId)):a(70,T={}),Je(F.class,t?._task?.docId))},async({detail:e})=>{if(a(8,M=e),"quantity"===e.itemName&&a(15,le=Z.quantity),(async(e,t)=>{const n=qe.filter((t=>t.selection===e||t.constraint===e));if(n?.length){a(14,se=!1);for(const i of n){const{selection:n,constraint:o,name:r}=i;if(t)break;a(6,Z[r]="",Z),e===n&&a(14,se=o);const s=Z[n];if(s&&e===o){let e=await Pa(n,s);const t=Z[o];if(t?.length){const n=t[0].split(", ");e=e[o];let i="";for(const t of e)Object.values(t).map((e=>{n.includes(e)&&(i=t[r])}));a(6,Z[r]=i,Z)}}}}})(e.itemName,e.oldValue===e.value),Ue(e.itemName),xe&&we&&(e.itemName===we&&(Le=+e.value),Ze()),ve&&ye){if(e.itemName===he?.name)ue=e.value;else if(e.itemName===$e?.name)me=e.value;else{if(e.itemName!==ge?.name)return;ue=e.value}Ke()}},async({detail:e})=>{if(!(B.input?.length&&B.input.length>1))return;if(F?.class!==B.input[0])return;const{value:t,lookup:i,view:o}=e;if(!i)return;const[r]=i.split(":"),s=(await n.getSectionView(r,{[o]:{$in:t}})).map((e=>e._id));for(const e of B.input.slice(1)){a(6,Z[e]=[],Z);const t=await n.getSchemaByClass(e);t.id;let i=await n.getTasks(t.id);if(i=i.data.filter((e=>"Ready"===e._task?.status&&s.includes(e[r]))),i?.length){const t=i.map((e=>e._id)),o=await n.getSectionView(e,{_id:{$in:t}});for(const t of o)t[e]=t._id;a(6,Z[e]=o,Z)}}},({detail:e})=>{X[e.listName]=e.value,ye&&(pe[e.listName]=e.amountValue,Ke()),xe&&(ke[e.listName]=e.weeksValue||0,Ze())},e=>{"button"!==e.srcElement?.type&&"textarea"!==e.srcElement?.type&&13==e.which&&e.preventDefault()},e=>async()=>{const t=await n.getReportDoc(e)||{},{userReportId:i,type:o}=t;if(!i)return;const r="/api/userreport/"+i;if("ics"===o)return window.open(r,"_self","width=1 height=1");const s="/viewer/doc/index.html?file="+r+"&type="+o;window.open(s,"","popup=yes toolbar=no width=624 height=900")},e=>async()=>{const e=await n.getDocData(R);(async e=>{const t=window.screen.height,n=window.open("","_blank","width=800,height="+t+",location=no");await ie(),n?.document.write("<title>Report Daten für '"+B.identity.designation+"'</title>"),n?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+e+"</textarea>")})(JSON.stringify(e,null,4),B.identity.designation)},async()=>{const e=tt();if(!e)return;const t=Ce.result?.resultDef[0]?.addToReports;if(t){const i=e[t];if(i){const t={docId:i},o=(await n.getSectionView("_task",t))[0];e._taskId=o._id}}const{reportId:i,type:o}=await n.createReport(Ae,e);nt(i),setTimeout(Ye,2e3)},async()=>{const e=tt();if(!e)return;const t=await n.getReportData(Ae,e),i=window.screen.height,o=window.open("","_blank","width=800,height="+i+",location=no");await ie(),o?.document.write("<title>Report Daten für '"+B.identity.designation+"'</title>"),o?.document.write("<textarea readonly style='resize: none; width: 100%; height: 100%;'>"+JSON.stringify(t,null,4)+"</textarea>")},async({detail:{className:e,itemName:t,value:i}})=>{if(ze!==i)return;if(!e)return;if(Te.has(e))return;if(!0!==i&&(i=(i=[].concat(i)).some((e=>e===ze))),!i)return;const o={[t]:!0},r=await n.getSectionView(e,o);r?.length&&Te.set(e,r[0])},({detail:e})=>{A=e},({detail:e})=>{setTimeout((()=>{a(6,Z[e.itemName]=e.value,Z)}),200)},()=>B.result.resultDef[0].button?.designation||"Dokument erstellen",()=>{a(9,te=!0)},it,async()=>{if(ze&&O){(await n.deleteData(ze,O)).taskId?(s.success("Die Daten wurden gelöscht.",3e3),Qe()):s.failed("Die Daten können nicht gelöscht werden!",3e3)}it()},U,J,V,K,F,T,function(e){ae=e,a(11,ae)},function(e){ce=e,a(12,ce)},function(e){Ne=e,a(17,Ne)},function(e){Be=e,a(23,Be)},()=>it(),function(e){te=e,a(9,te)}]}class Ra extends _e{constructor(e){var t;super(),Wl.getElementById("svelte-e23pry-style")||((t=L("style")).id="svelte-e23pry-style",t.textContent="form.disabled.svelte-e23pry input.svelte-e23pry{background-color:red !important}input:placeholder-shown{font-style:italic}form.svelte-e23pry.svelte-e23pry{min-width:25em}hr[data-text]{margin-bottom:1em !important}@media only screen and (min-width: 600px){form.svelte-e23pry.svelte-e23pry{min-width:30em}}.fEmbedded.svelte-e23pry.svelte-e23pry,.fTask.svelte-e23pry.svelte-e23pry{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-e23pry.svelte-e23pry{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-e23pry.svelte-e23pry{height:fit-content;max-height:70vh}.sTask.svelte-e23pry.svelte-e23pry{height:95%;display:inline-grid}.sTask.svelte-e23pry .btn.svelte-e23pry{display:initial !important}.form--buttons.svelte-e23pry.svelte-e23pry{display:flex;gap:1em;padding-top:0.75em}.flex_div.svelte-e23pry.svelte-e23pry{display:flex;margin-top:1em;gap:0.5em;justify-content:space-between}section.sTask div.date-picker div.dropdown-shell div.dropdown.calendar{position:fixed !important;left:auto !important}form.fTask div.form-field{min-width:49vw}",S(Wl.head,t)),Ie(this,e,Wa,Da,k,{schema:1,recID:2,deletable:3,prevEventID:67,prev:4,taskId:0,description:65,root:5,readonly:66,isStandalone:68},[-1,-1,-1,-1,-1])}}function Ua(e){let t,n,i;function o(t){e[4](t)}let r={schema:e[5],recID:e[6]};return void 0!==e[0]&&(r.description=e[0]),t=new Ra({props:r}),K.push((()=>we(t,"description",o))),t.$on("back",e[2]),{c(){be(t.$$.fragment)},m(e,n){xe(t,e,n),i=!0},p(e,i){const o={};32&i&&(o.schema=e[5]),64&i&&(o.recID=e[6]),!n&&1&i&&(n=!0,o.description=e[0],re((()=>n=!1))),t.$set(o)},i(e){i||(pe(t.$$.fragment,e),i=!0)},o(e){he(t.$$.fragment,e),i=!1},d(e){ke(t,e)}}}function Ha(e){let t,n;return t=new a({props:{update:e[1],description:e[0],$$slots:{default:[Ua,({prop:{schema:e,recID:t,eventID:n}})=>({5:e,6:t,7:n}),({prop:e})=>(e?32:0)|(e?64:0)|(e?128:0)]},$$scope:{ctx:e}}}),{c(){be(t.$$.fragment)},m(e,i){xe(t,e,i),n=!0},p(e,[n]){const i={};1&n&&(i.description=e[0]),353&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){n||(pe(t.$$.fragment,e),n=!0)},o(e){he(t.$$.fragment,e),n=!1},d(e){ke(t,e)}}}function Ga(e,t,i){let o,{refresh:r}=t;return e.$$set=e=>{"refresh"in e&&i(3,r=e.refresh)},[o,(e,t)=>n.getSchema(e).then((n=>({schema:n,recID:t,eventID:e,title:n.identity.designation}))),e=>{},r,function(e){o=e,i(0,o)}]}function Qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ya,Ja,Ka=(Ya=function(e,t){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("object"!==r(e))throw new Error("single-spa-svelte requires a configuration object");var t=i(i({},s),e);if(!t.component)throw new Error("single-spa-svelte must be passed opts.component");var n={};return{bootstrap:l.bind(null,t,n),mount:a.bind(null,t,n),unmount:c.bind(null,t,n),update:d.bind(null,t,n)}};var s={component:null,domElementGetter:null,props:{}};function l(e){return Promise.resolve()}function a(e,t,n){var o=Object.keys(s),r=Object.keys(e).reduce((function(t,n){return o.includes(n)||(t[n]=e[n]),t}),{});return Promise.resolve().then((function(){var o=function(e,t){return(t=t&&t.customProps?t.customProps:t).domElement?function(){return t.domElement}:t.domElementGetter?function(){return t.domElementGetter(t)}:e.domElementGetter?function(){return e.domElementGetter(t)}:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa-svelte was not given an application name as a prop, so it can't make a unique dom element container for the svelte application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)}(e,n),s=o();t.instance=new e.component(i(i({},r),{},{target:s,props:Object.assign({},n,e.props)}))}))}function c(e,t){return Promise.resolve().then((function(){t.instance.$destroy?t.instance.$destroy():t.instance.destroy()}))}function d(e,t,n){return Promise.resolve().then((function(){t.instance.$set?t.instance.$set(n):t.instance.set(n)}))}},Ya(Ja={exports:{}},Ja.exports),Ja.exports);const Za=Qa(Ka)({component:class extends _e{constructor(e){super(),Ie(this,e,Ga,Ha,k,{refresh:3})}},domElementGetter:()=>document.getElementById("detail-app")}),{bootstrap:Xa,mount:ec,unmount:tc}=Za;e({bootstrap:Xa,mount:ec,unmount:tc});e("Form",Ra),e("List",Tt),e("Template",class extends _e{constructor(e){var t;super(),Kn.getElementById("svelte-1phofh5-style")||((t=L("style")).id="svelte-1phofh5-style",t.textContent="form.svelte-1phofh5.svelte-1phofh5{min-width:25em}@media only screen and (min-width: 600px){form.svelte-1phofh5.svelte-1phofh5{min-width:30em}}.fEmbedded.svelte-1phofh5.svelte-1phofh5,.fTask.svelte-1phofh5.svelte-1phofh5{overflow-y:auto;padding-right:1em;overflow-x:hidden}.fEmbedded.svelte-1phofh5.svelte-1phofh5{height:fit-content;min-height:30vh;max-height:60vh}.fTask.svelte-1phofh5.svelte-1phofh5{height:fit-content;max-height:70vh}.sTask.svelte-1phofh5.svelte-1phofh5{height:95%;display:inline-grid;min-width:40em}.sTask.svelte-1phofh5 .btn.svelte-1phofh5{display:initial !important}.form--buttons.svelte-1phofh5.svelte-1phofh5{display:flex;gap:1em;padding-bottom:0.5em}",S(Kn.head,t)),Ie(this,e,ui,ci,k,{schema:0,record:1})}})}}}));