@enablerr-ui/form 0.2.7 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +2 -5
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios"],(function(t){"use strict";var e;return{setters:[function(t){e=t.default}],execute:function(){function n(){}function s(t){return t()}function o(){return Object.create(null)}function r(t){t.forEach(s)}function i(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,...e){if(null==t)return n;const s=t.subscribe(...e);return s.unsubscribe?()=>s.unsubscribe():s}function c(t){let e;return l(t,(t=>e=t))(),e}function u(t,e,n){t.$$.on_destroy.push(l(e,n))}function d(t,e,n,s){if(t){const o=p(t,e,n,s);return t[0](o)}}function p(t,e,n,s){return t[1]&&s?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](s(e))):n.ctx}function f(t,e,n,s,o,r,i){const a=function(t,e,n,s){if(t[2]&&s){const o=t[2](s(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let s=0;s<n;s+=1)t[s]=e.dirty[s]|o[s];return t}return e.dirty|o}return e.dirty}(e,s,o,r);if(a){const o=p(e,n,s,i);t.p(o,a)}}function m(t,e){t.appendChild(e)}function h(t,e,n){t.insertBefore(e,n||null)}function g(t){t.parentNode.removeChild(t)}function $(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function v(t){return document.createElement(t)}function b(t){return document.createTextNode(t)}function y(){return b(" ")}function w(){return b("")}function x(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function k(t){return function(e){return e.preventDefault(),t.call(this,e)}}function S(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function I(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:S(t,e,n)}function T(t){return""===t?null:+t}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function E(t,e){t.value=null==e?"":e}function j(t,e,n){t.classList[n?"add":"remove"](e)}let N;function _(t){N=t}function O(){const t=function(){if(!N)throw new Error("Function called outside component initialization");return N}();return(e,n)=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);s.slice().forEach((e=>{e.call(t,o)}))}}}function C(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const A=[],B=[],D=[],F=[],V=Promise.resolve();let L=!1;function P(t){D.push(t)}function M(t){F.push(t)}let z=!1;const R=new Set;function Y(){if(!z){z=!0;do{for(let t=0;t<A.length;t+=1){const e=A[t];_(e),J(e.$$)}for(_(null),A.length=0;B.length;)B.pop()();for(let t=0;t<D.length;t+=1){const e=D[t];R.has(e)||(R.add(e),e())}D.length=0}while(A.length);for(;F.length;)F.pop()();L=!1,z=!1,R.clear()}}function J(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(P)}}const U=new Set;let X;function H(){X={r:0,c:[],p:X}}function W(){X.r||r(X.c),X=X.p}function Z(t,e){t&&t.i&&(U.delete(t),t.i(e))}function G(t,e,n,s){if(t&&t.o){if(U.has(t))return;U.add(t),X&&X.c.push((()=>{U.delete(t),s&&(n&&t.d(1),s())})),t.o(e)}}const K="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Q(t,e,n){const s=t.$$.props[e];void 0!==s&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function tt(t){t&&t.c()}function et(t,e,n,o){const{fragment:a,on_mount:l,on_destroy:c,after_update:u}=t.$$;a&&a.m(e,n),o||P((()=>{const e=l.map(s).filter(i);c?c.push(...e):r(e),t.$$.on_mount=[]})),u.forEach(P)}function nt(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(A.push(t),L||(L=!0,V.then(Y)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ot(t,e,s,i,a,l,c=[-1]){const u=N;_(t);const d=t.$$={fragment:null,ctx:null,props:l,update:n,not_equal:a,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:o(),dirty:c,skip_bound:!1};let p=!1;if(d.ctx=s?s(t,e.props||{},((e,n,...s)=>{const o=s.length?s[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=o)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](o),p&&st(t,e)),n})):[],d.update(),p=!0,r(d.before_update),d.fragment=!!i&&i(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(g)}else d.fragment&&d.fragment.c();e.intro&&Z(t.$$.fragment),et(t,e.target,e.anchor,e.customElement),Y()}_(u)}class rt{$destroy(){nt(this,1),this.$destroy=n}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const it=window.sessionStorage;it.clear();const at={getItem:t=>it.getItem(t),setItem:(t,e)=>it.setItem(t,e)},lt=[];function ct(t,e=n){let s;const o=[];function r(e){if(a(t,e)&&(t=e,s)){const e=!lt.length;for(let e=0;e<o.length;e+=1){const n=o[e];n[1](),lt.push(n,t)}if(e){for(let t=0;t<lt.length;t+=2)lt[t][0](lt[t+1]);lt.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(i,a=n){const l=[i,a];return o.push(l),1===o.length&&(s=e(r)||n),i(t),()=>{const t=o.indexOf(l);-1!==t&&o.splice(t,1),0===o.length&&(s(),s=null)}}}}function ut(t,e,s){const o=!Array.isArray(t),a=o?[t]:t,c=e.length<2;return u=t=>{let s=!1;const u=[];let d=0,p=n;const f=()=>{if(d)return;p();const s=e(o?u[0]:u,t);c?t(s):p=i(s)?s:n},m=a.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),s&&f()}),(()=>{d|=1<<e}))));return s=!0,f(),function(){r(m),p()}},{subscribe:ct(s,u).subscribe};var u}const dt=ct(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:""),pt=ct([]);function ft(t){let e,n,s,o,r;const i=t[3].default,a=d(i,t,t[2],null);return{c(){e=v("fieldset"),n=v("legend"),s=b(t[0]),o=y(),a&&a.c(),j(n,"sr-only",!t[1])},m(t,i){h(t,e,i),m(e,n),m(n,s),m(e,o),a&&a.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&q(s,t[0]),2&e&&j(n,"sr-only",!t[1]),a&&a.p&&(!r||4&e)&&f(a,i,t,t[2],e,null,null)},i(t){r||(Z(a,t),r=!0)},o(t){G(a,t),r=!1},d(t){t&&g(e),a&&a.d(t)}}}function mt(t,e,n){let{$$slots:s={},$$scope:o}=e,{title:r=""}=e,{show:i=!0}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"show"in t&&n(1,i=t.show),"$$scope"in t&&n(2,o=t.$$scope)},[r,i,o,s]}class ht extends rt{constructor(t){super(),ot(this,t,mt,ft,a,{title:0,show:1})}}const gt=t=>({}),$t=t=>({}),vt=t=>({}),bt=t=>({});function yt(t){let e,n,s,o,i,a,l,c,u,p;const m=t[16].head,$=d(m,t,t[15],bt),b=t[16].tail,w=d(b,t,t[15],$t);return{c(){$&&$.c(),e=y(),n=v("input"),o=y(),i=v("input"),l=y(),w&&w.c(),S(n,"type","number"),S(n,"class",s=t[1]+" form-input form-number hidden"),S(n,"id",t[5]),S(n,"name",t[5]),S(n,"placeholder",t[8]),S(n,"aria-label",t[7]),S(n,"title",t[7]),n.required=t[9],n.disabled=t[10],S(n,"pattern",t[11]),S(n,"min",t[2]),S(n,"max",t[12]),S(n,"step",t[3]),S(i,"type","text"),S(i,"id",t[6]),S(i,"name",t[6]),S(i,"class",a=t[1]+" form-input form-number form-shadow"),i.disabled=t[10],S(i,"aria-label",t[7]),S(i,"title",t[7])},m(s,r){$&&$.m(s,r),h(s,e,r),h(s,n,r),E(n,t[0]),h(s,o,r),h(s,i,r),E(i,t[4]),h(s,l,r),w&&w.m(s,r),c=!0,u||(p=[x(n,"input",t[18]),x(n,"blur",t[13]),x(i,"input",t[19]),x(i,"focus",t[17])],u=!0)},p(t,[e]){$&&$.p&&(!c||32768&e)&&f($,m,t,t[15],e,vt,bt),(!c||2&e&&s!==(s=t[1]+" form-input form-number hidden"))&&S(n,"class",s),(!c||4&e)&&S(n,"min",t[2]),(!c||8&e)&&S(n,"step",t[3]),1&e&&T(n.value)!==t[0]&&E(n,t[0]),(!c||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&S(i,"class",a),16&e&&i.value!==t[4]&&E(i,t[4]),w&&w.p&&(!c||32768&e)&&f(w,b,t,t[15],e,gt,$t)},i(t){c||(Z($,t),Z(w,t),c=!0)},o(t){G($,t),G(w,t),c=!1},d(t){$&&$.d(t),t&&g(e),t&&g(n),t&&g(o),t&&g(i),t&&g(l),w&&w.d(t),u=!1,r(p)}}}function wt(t,e,n){let{$$slots:s={},$$scope:o}=e,{options:r}=e,{css:i}=e,{value:a}=e;const l=JSON.parse(window.sessionStorage.getItem("Locale")),{name:c,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=r;let{positive:g,min:$,max:v,decimal:b=0,step:y=1}=r;const w=O();let x;b>0&&(y="any"),g&&!$&&($=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(l.id,b),S=()=>{n(4,x=k.format(a))};return S(),t.$$set=t=>{"options"in t&&n(14,r=t.options),"css"in t&&n(1,i=t.css),"value"in t&&n(0,a=t.value),"$$scope"in t&&n(15,o=t.$$scope)},[a,i,$,y,x,c,u,d,p,f,m,h,v,()=>{S(),w("blur")},r,o,s,function(e){C(t,e)},function(){a=T(this.value),n(0,a)},function(){x=this.value,n(4,x)}]}class xt extends rt{constructor(t){super(),ot(this,t,wt,yt,a,{options:14,css:1,value:0})}}function kt(t){let e;return{c(){e=v("span"),e.textContent="%",S(e,"slot","head"),S(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){h(t,e,n)},d(t){t&&g(e)}}}function St(t){let e,n,s;function o(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[kt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new xt({props:r}),B.push((()=>Q(e,"value",o))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),s=!0},p(t,[s]){const o={};1&s&&(o.options=t[0]),4&s&&(o.css=t[2]),64&s&&(o.$$scope={dirty:s,ctx:t}),!n&&2&s&&(n=!0,o.value=t[1],M((()=>n=!1))),e.$set(o)},i(t){s||(Z(e.$$.fragment,t),s=!0)},o(t){G(e.$$.fragment,t),s=!1},d(t){nt(e,t)}}}function It(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;return s.positive=s.positive||!0,s.max=s.max||100,s.decimal=s.decimal||2,t.$$set=t=>{"options"in t&&n(0,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(1,r=t.value)},[s,r,o,function(t){r=t,n(1,r)},function(e){C(t,e)},function(e){C(t,e)}]}function Tt(t){let e,n;return{c(){e=v("span"),n=b(t[3]),S(e,"slot","head"),S(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,s){h(t,e,s),m(e,n)},p(t,e){8&e&&q(n,t[3])},d(t){t&&g(e)}}}function qt(t){let e,n,s;function o(e){t[4](e)}let r={options:t[1],css:t[2],$$slots:{head:[Tt]},$$scope:{ctx:t}};return void 0!==t[0]&&(r.value=t[0]),e=new xt({props:r}),B.push((()=>Q(e,"value",o))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),s=!0},p(t,[s]){const o={};2&s&&(o.options=t[1]),4&s&&(o.css=t[2]),136&s&&(o.$$scope={dirty:s,ctx:t}),!n&&1&s&&(n=!0,o.value=t[0],M((()=>n=!1))),e.$set(o)},i(t){s||(Z(e.$$.fragment,t),s=!0)},o(t){G(e.$$.fragment,t),s=!1},d(t){nt(e,t)}}}function Et(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e,{currency:i="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value),"currency"in t&&n(3,i=t.currency)},[r,s,o,i,function(t){r=t,n(0,r)},function(e){C(t,e)},function(e){C(t,e)}]}function jt(t){let e,s,o,r;return{c(){e=v("input"),S(e,"type","password"),S(e,"class",s=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],S(e,"pattern",t[7]),S(e,"autocomplete","off")},m(n,s){h(n,e,s),E(e,t[0]),o||(r=x(e,"input",t[9]),o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-input")&&S(e,"class",s),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,r()}}}function Nt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,disabled:u,pattern:d}=s;return t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,d,s,function(){r=this.value,n(0,r)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const _t=t=>((t,...e)=>e.includes(t))(t,void 0,null),Ot=t=>!_t(t),Ct=(t,...e)=>e.concat(t).find(Ot),At=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Bt=(t,e=2,n=0,s=t.toString(),o=n.toString())=>o.repeat(e-s.length)+s,Dt=(...t)=>{return(e=t[0],(t,...n)=>At(At("",e.toString),t,...n))(Bt,...t);var e};function Ft(t){let e,s,o,i;return{c(){e=v("input"),S(e,"type","date"),S(e,"class",s=t[1]+" form-input form-date"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"aria-label",t[3]),S(e,"title",t[3]),S(e,"pattern",Mt),S(e,"min",t[6]),S(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,s){h(n,e,s),E(e,t[0]),o||(i=[x(e,"input",t[10]),x(e,"blur",t[9])],o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-input form-date")&&S(e,"class",s),1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,r(i)}}}const Vt={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Lt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Pt=(t,e=!1)=>{const n=e?Lt:Vt,s=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?s.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Mt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function zt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,required:l,disabled:c,min:u,max:d}=s;return r=r.substr(0,10),t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,d,s,function(e){C(t,e)},function(){r=this.value,n(0,r)}]}class Rt extends rt{constructor(t){super(),ot(this,t,zt,Ft,a,{options:8,css:1,value:0})}}const{document:Yt}=K;function Jt(t,e,n){const s=t.slice();return s[16]=e[n].lit,s[17]=e[n].ref,s[18]=e,s[19]=n,s}function Ut(t){let e,n,s;function o(){t[12].call(e,t[19])}return{c(){e=v("input"),S(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),S(e,"id",t[2]+"-"+t[19]),S(e,"type","text"),S(e,"data-step",t[19]),S(e,"size",t[17].count),S(e,"minlength",t[17].count),S(e,"maxlength",t[17].count),S(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){h(r,e,i),E(e,t[1][t[19]]),n||(s=[x(e,"input",o),x(e,"input",t[8]),x(e,"blur",t[11])],n=!0)},p(n,s){t=n,2&s&&e.value!==t[1][t[19]]&&E(e,t[1][t[19]])},d(t){t&&g(e),n=!1,r(s)}}}function Xt(t){let e,s,o=t[16]+"";return{c(){e=v("span"),s=b(o),S(e,"class","iw-m svelte-u6cc6e")},m(t,n){h(t,e,n),m(e,s)},p:n,d(t){t&&g(e)}}}function Ht(t){let e;let n=function(t,e){return t[16]?Xt:Ut}(t),s=n(t);return{c(){s.c(),e=w()},m(t,n){s.m(t,n),h(t,e,n)},p(t,e){s.p(t,e)},d(t){s.d(t),t&&g(e)}}}function Wt(t){let e,s,o,r,i=t[6].obj,a=[];for(let e=0;e<i.length;e+=1)a[e]=Ht(Jt(t,i,e));return{c(){e=v("div");for(let t=0;t<a.length;t+=1)a[t].c();S(e,"class",s=t[0]+" form-input svelte-u6cc6e"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"tabindex","0")},m(n,s){h(n,e,s);for(let t=0;t<a.length;t+=1)a[t].m(e,null);o||(r=x(e,"focus",t[7]),o=!0)},p(t,[n]){if(382&n){let s;for(i=t[6].obj,s=0;s<i.length;s+=1){const o=Jt(t,i,s);a[s]?a[s].p(o,n):(a[s]=Ht(o),a[s].c(),a[s].m(e,null))}for(;s<a.length;s+=1)a[s].d(1);a.length=i.length}1&n&&s!==(s=t[0]+" form-input svelte-u6cc6e")&&S(e,"class",s)},i:n,o:n,d(t){t&&g(e),$(a,t),o=!1,r()}}}function Zt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;r=r.toString();const{name:i,title:a,required:l,disabled:c,mask:u,pattern:d=[]}=s,p=(t=>{let e=[],n="",s=!1;if("string"!=typeof t)return e;const o=(t="")=>{n=t},r=t=>o(n.concat(t)),i=(t=!0)=>{s=t},a=t=>(e.push({lit:t}),void i(!1));for(const l of t)s?a(l):"\\"===l?i():"{"===l?o():"}"===l?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===l?a(l):l>=0?r(l):a(l);const l=(t,n="",s=!0,o=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(o,o+=n.ref.count):s&&n.lit||"")),n):n;return{obj:e,getValues:t=>l(t,[],!1),format:t=>l(t)}})(u),f=p.getValues(r);return t.$$set=t=>{"options"in t&&n(10,s=t.options),"css"in t&&n(0,o=t.css),"value"in t&&n(9,r=t.value)},[o,f,i,l,c,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${i} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,r=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[e].length<t.minLength)return!0;const s=`#${i}-${e} ~ input`,o=document.querySelectorAll(s);return o[0]&&o[0].focus&&o[0].focus()},r,s,function(e){C(t,e)},function(t){f[t]=this.value,n(1,f)}]}class Gt extends rt{constructor(t){var e;super(),Yt.getElementById("svelte-u6cc6e-style")||((e=v("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",m(Yt.head,e)),ot(this,t,Zt,Wt,a,{options:10,css:0,value:9})}}function Kt(t){let e,n,s;function o(e){t[3](e)}let r={options:t[0],css:t[1]};return void 0!==t[2]&&(r.value=t[2]),e=new Gt({props:r}),B.push((()=>Q(e,"value",o))),e.$on("blur",t[4]),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),s=!0},p(t,[s]){const o={};1&s&&(o.options=t[0]),2&s&&(o.css=t[1]),!n&&4&s&&(n=!0,o.value=t[2],M((()=>n=!1))),e.$set(o)},i(t){s||(Z(e.$$.fragment,t),s=!0)},o(t){G(e.$$.fragment,t),s=!1},d(t){nt(e,t)}}}function Qt(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;return o=o.concat(" form-time"),s.mask="{2}:{2}",s.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(2,r=t.value)},[s,o,r,function(t){r=t,n(2,r)},function(e){C(t,e)}]}class te extends rt{constructor(t){super(),ot(this,t,Qt,Kt,a,{options:0,css:1,value:2})}}function ee(t){let e,n,s,o,i,a,l,c,u,d,p,f;function $(e){t[15](e)}let b={options:t[4],css:t[0]};function w(e){t[16](e)}void 0!==t[1]&&(b.value=t[1]),n=new Rt({props:b}),B.push((()=>Q(n,"value",$))),n.$on("blur",t[10]);let k={options:t[3],css:t[0]};return void 0!==t[2]&&(k.value=t[2]),i=new te({props:k}),B.push((()=>Q(i,"value",w))),i.$on("blur",t[10]),{c(){e=v("div"),tt(n.$$.fragment),o=y(),tt(i.$$.fragment),l=y(),c=v("input"),S(e,"id",t[6]),S(e,"tabindex","90"),S(e,"class","hidden"),S(c,"type","text"),S(c,"class",u=t[0]+" form-input form-shadow"),S(c,"id",t[7]),S(c,"name",t[7]),c.disabled=t[9],S(c,"aria-label",t[8]),S(c,"title",t[8])},m(s,r){h(s,e,r),et(n,e,null),m(e,o),et(i,e,null),h(s,l,r),h(s,c,r),E(c,t[5]),d=!0,p||(f=[x(e,"blur",t[10]),x(e,"focus",t[11]),x(c,"input",t[17]),x(c,"focus",t[14])],p=!0)},p(t,[e]){const o={};16&e&&(o.options=t[4]),1&e&&(o.css=t[0]),!s&&2&e&&(s=!0,o.value=t[1],M((()=>s=!1))),n.$set(o);const r={};8&e&&(r.options=t[3]),1&e&&(r.css=t[0]),!a&&4&e&&(a=!0,r.value=t[2],M((()=>a=!1))),i.$set(r),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&S(c,"class",u),32&e&&c.value!==t[5]&&E(c,t[5])},i(t){d||(Z(n.$$.fragment,t),Z(i.$$.fragment,t),d=!0)},o(t){G(n.$$.fragment,t),G(i.$$.fragment,t),d=!1},d(t){t&&g(e),nt(n),nt(i),t&&g(l),t&&g(c),p=!1,r(f)}}}function ne(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:l}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),s=Dt(e.getMonth()+1),o=Dt(e.getDate()),r=Dt(e.getHours()),i=Dt(e.getMinutes());return{date:n.concat("-",s,"-",o),time:r.concat(i)}})(r);const{name:c,nameShadow:u,title:d,disabled:p}=s;let f,m=Object.assign({},s),h=Object.assign({},s);h.name=c+"-Date",m.name=c+"-Time";const g=Pt(i.id,!0),$=()=>{try{n(12,(t=l,r=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,r=a||l?"invalid":"")}var t;n(5,f=g.format(r))},v=t=>t.startsWith(h.name),b=O();return $(),t.$$set=t=>{"options"in t&&n(13,s=t.options),"css"in t&&n(0,o=t.css),"value"in t&&n(12,r=t.value)},[o,a,l,m,h,f,c,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}$(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),r,s,function(e){C(t,e)},function(t){a=t,n(1,a)},function(t){l=t,n(2,l)},function(){f=this.value,n(5,f)}]}function se(t){let e,n,s,o,i,a,l,c;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new Rt({props:d}),B.push((()=>Q(e,"value",u))),e.$on("blur",t[8]),{c(){tt(e.$$.fragment),s=y(),o=v("input"),S(o,"type","text"),S(o,"class",i=t[2]+" form-input form-shadow"),S(o,"id",t[4]),S(o,"name",t[4]),S(o,"placeholder",t[6]),o.disabled=t[7],S(o,"aria-label",t[5]),S(o,"title",t[5])},m(n,r){et(e,n,r),h(n,s,r),h(n,o,r),E(o,t[3]),a=!0,l||(c=[x(o,"input",t[11]),x(o,"focus",t[9])],l=!0)},p(t,[s]){const r={};2&s&&(r.options=t[1]),4&s&&(r.css=t[2]+" hidden"),!n&&1&s&&(n=!0,r.value=t[0],M((()=>n=!1))),e.$set(r),(!a||4&s&&i!==(i=t[2]+" form-input form-shadow"))&&S(o,"class",i),8&s&&o.value!==t[3]&&E(o,t[3])},i(t){a||(Z(e.$$.fragment,t),a=!0)},o(t){G(e.$$.fragment,t),a=!1},d(t){nt(e,t),t&&g(s),t&&g(o),l=!1,r(c)}}}function oe(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:l,placeholder:c,disabled:u}=s;let d;const p=Pt(i.id),f=()=>{n(3,d=p.format(r))},m=O();return f(),t.$$set=t=>{"options"in t&&n(1,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value)},[r,s,o,d,a,l,c,u,()=>{f(),m("blur")},function(e){C(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function re(t){let e,s,o,r;return{c(){e=v("input"),S(e,"type","email"),S(e,"class",s=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,s){h(n,e,s),E(e,t[0]),o||(r=x(e,"input",t[8]),o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-input")&&S(e,"class",s),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,r()}}}function ie(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,disabled:u}=s;return t.$$set=t=>{"options"in t&&n(7,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,s,function(){r=this.value,n(0,r)}]}function ae(t){let e,s,o,r;return{c(){e=v("textarea"),S(e,"rows",t[6]),S(e,"class",s=t[1]+" form-textarea block"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,s){h(n,e,s),E(e,t[0]),o||(r=x(e,"input",t[8]),o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-textarea block")&&S(e,"class",s),1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,r()}}}function le(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,required:l,disabled:c,rows:u=3}=s;return t.$$set=t=>{"options"in t&&n(7,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,s,function(){r=this.value,n(0,r)}]}function ce(t){let e,s,o,i,a,l,c,u;return{c(){e=v("div"),s=v("input"),o=y(),i=v("div"),a=y(),l=v("div"),S(s,"type","checkbox"),S(s,"id",t[1]),S(s,"name",t[1]),S(s,"aria-label",t[2]),S(s,"title",t[2]),s.disabled=t[3],S(s,"class","svelte-ke6ng1"),S(i,"class","track svelte-ke6ng1"),S(l,"class","thumb svelte-ke6ng1"),S(e,"class","switch svelte-ke6ng1")},m(n,r){h(n,e,r),m(e,s),s.checked=t[0],m(e,o),m(e,i),m(e,a),m(e,l),c||(u=[x(s,"change",t[7]),x(i,"click",t[4]),x(l,"click",t[4])],c=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:n,o:n,d(t){t&&g(e),c=!1,r(u)}}}function ue(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;o="";const{name:i,title:a,disabled:l}=s;return t.$$set=t=>{"options"in t&&n(6,s=t.options),"css"in t&&n(5,o=t.css),"value"in t&&n(0,r=t.value)},[r,i,a,l,()=>n(0,r=l?r:!r),o,s,function(){r=this.checked,n(0,r)}]}function de(t){let e,s,o,r;return{c(){e=v("input"),S(e,"type","file"),S(e,"class",s=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"pattern",t[7]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,s){h(n,e,s),o||(r=x(e,"change",t[9]),o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-input")&&S(e,"class",s)},i:n,o:n,d(t){t&&g(e),o=!1,r()}}}function pe(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,disabled:u,pattern:d}=s;return t.$$set=t=>{"options"in t&&n(8,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,d,s,function(){r=this.value,n(0,r)}]}function fe(t){let e,s,o,r;return{c(){e=v("input"),S(e,"type","text"),S(e,"class",s=t[1]+" form-input"),S(e,"id",t[2]),S(e,"name",t[2]),S(e,"placeholder",t[4]),S(e,"aria-label",t[3]),S(e,"title",t[3]),e.required=t[5],e.disabled=t[6],S(e,"pattern",t[7]),S(e,"autocomplete",t[8])},m(n,s){h(n,e,s),E(e,t[0]),o||(r=x(e,"input",t[10]),o=!0)},p(t,[n]){2&n&&s!==(s=t[1]+" form-input")&&S(e,"class",s),1&n&&e.value!==t[0]&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),o=!1,r()}}}function me(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;const{name:i,title:a,placeholder:l,required:c,disabled:u,pattern:d,autocomplete:p="on"}=s;return t.$$set=t=>{"options"in t&&n(9,s=t.options),"css"in t&&n(1,o=t.css),"value"in t&&n(0,r=t.value)},[r,o,i,a,l,c,u,d,p,s,function(){r=this.value,n(0,r)}]}function he(t){let e,s,o;return{c(){e=v("input"),S(e,"type","hidden"),S(e,"id",t[1]),S(e,"name",t[1]),e.disabled=!0},m(n,r){h(n,e,r),E(e,t[0]),s||(o=x(e,"input",t[4]),s=!0)},p(t,[n]){1&n&&E(e,t[0])},i:n,o:n,d(t){t&&g(e),s=!1,o()}}}function ge(t,e,n){let{options:s}=e,{css:o}=e,{value:r}=e;o="";const{name:i}=s;return t.$$set=t=>{"options"in t&&n(3,s=t.options),"css"in t&&n(2,o=t.css),"value"in t&&n(0,r=t.value)},[r,i,o,s,function(){r=this.value,n(0,r)}]}const{document:$e}=K;function ve(t){let e;return{c(){e=v("p"),e.textContent=`Unknow input type: ${t[4]}`,S(e,"class","svelte-166hp95")},m(t,n){h(t,e,n)},p:n,i:n,o:n,d(t){t&&g(e)}}}function be(t){let e,n,s,o;function r(e){t[9](e)}var i=t[6];function a(t){let e={options:t[0],css:Ne};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(a(t)),B.push((()=>Q(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&tt(e.$$.fragment),s=w()},m(t,n){e&&et(e,t,n),h(t,s,n),o=!0},p(t,o){const l={};if(1&o&&(l.options=t[0]),!n&&2&o&&(n=!0,l.value=t[1],M((()=>n=!1))),i!==(i=t[6])){if(e){H();const t=e;G(t.$$.fragment,1,0,(()=>{nt(t,1)})),W()}i?(e=new i(a(t)),B.push((()=>Q(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),tt(e.$$.fragment),Z(e.$$.fragment,1),et(e,s.parentNode,s)):e=null}else i&&e.$set(l)},i(t){o||(e&&Z(e.$$.fragment,t),o=!0)},o(t){e&&G(e.$$.fragment,t),o=!1},d(t){t&&g(s),e&&nt(e,t)}}}function ye(t){let e,s,o,r,i,a,l,c,u,d,p,f=t[2].title+"";const $=[be,ve],w=[];a=function(t,e){return t[6]?0:1}(t),l=w[a]=$[a](t);let k=t[5]&&function(t){let e;return{c(){e=v("p"),e.textContent=`${t[5]}`,S(e,"class","form-hint hidden svelte-166hp95")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=v("fieldset"),s=v("label"),o=b(f),i=y(),l.c(),c=y(),k&&k.c(),S(s,"for",r=t[2].id),S(s,"disabled",t[3])},m(n,r){h(n,e,r),m(e,s),m(s,o),m(e,i),w[a].m(e,null),m(e,c),k&&k.m(e,null),u=!0,d||(p=x(s,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&f!==(f=t[2].title+"")&&q(o,f),(!u||4&e&&r!==(r=t[2].id))&&S(s,"for",r),l.p(t,e),t[5]&&k.p(t,e)},i(t){u||(Z(l),u=!0)},o(t){G(l),u=!1},d(t){t&&g(e),w[a].d(),k&&k.d(),d=!1,p()}}}const we={hidden:class extends rt{constructor(t){super(),ot(this,t,ge,he,a,{options:3,css:2,value:0})}},text:class extends rt{constructor(t){super(),ot(this,t,me,fe,a,{options:9,css:1,value:0})}},file:class extends rt{constructor(t){super(),ot(this,t,pe,de,a,{options:8,css:1,value:0})}},checkbox:class extends rt{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=v("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",m(document.head,e)),ot(this,t,ue,ce,a,{options:6,css:5,value:0})}},masked:Gt,textarea:class extends rt{constructor(t){super(),ot(this,t,le,ae,a,{options:7,css:1,value:0})}},email:class extends rt{constructor(t){super(),ot(this,t,ie,re,a,{options:7,css:1,value:0})}},date:class extends rt{constructor(t){super(),ot(this,t,oe,se,a,{options:1,css:2,value:0})}},datetime:class extends rt{constructor(t){super(),ot(this,t,ne,ee,a,{options:13,css:0,value:12})}},number:xt,password:class extends rt{constructor(t){super(),ot(this,t,Nt,jt,a,{options:8,css:1,value:0})}},currency:class extends rt{constructor(t){super(),ot(this,t,Et,qt,a,{options:1,css:2,value:0,currency:3})}},rate:class extends rt{constructor(t){super(),ot(this,t,It,St,a,{options:0,css:2,value:1})}}},xe={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},ke=t=>t+"-show",Se=t=>t&&document.getElementById(t),Ie=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},Te=(t,e)=>{if(!t)return!0;const n=Se(t);if(!n)return!0;const s=Se(ke(t));return!e&&!s||(s&&Ie(s,!e),Ie(n,e),e&&n.focus&&n.focus(),!1)},qe=t=>Te(t,!0),Ee=(t,e=Se(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Ee(t.id,t))):!e||!e.validity||e.validity.valid,je=t=>void 0===xe[t]?xe.default:xe[t],Ne="form-field";function _e(t,e,n){let{options:s}=e,{value:o}=e;const{label:r={},disabled:i,type:a="text",hint:l=!1}=s;r.id=s.name,s.nameShadow=ke(s.name),s.required=!i&&s.required,s.title=s.title||s.placeholder;const c=(t=>we[t])(a);return t.$$set=t=>{"options"in t&&n(0,s=t.options),"value"in t&&n(1,o=t.value)},[s,o,r,i,a,l,c,t=>qe(s.name),t=>{return e=s.name,Te(e,!1);var e},function(t){o=t,n(1,o)}]}class Oe extends rt{constructor(t){var e;super(),$e.getElementById("svelte-166hp95-style")||((e=v("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",m($e.head,e)),ot(this,t,_e,ye,a,{options:0,value:1})}}var Ce=Object.prototype.hasOwnProperty;function Ae(t){return null==t}function Be(t){return Ae(t)||Object.keys(t).length<=0}const De=function t(e,n){var s,o;if(e===n)return!0;if(e&&n&&(s=e.constructor)===n.constructor){if(s===Date)return e.getTime()===n.getTime();if(s===RegExp)return e.toString()===n.toString();if(s===Array){if((o=e.length)===n.length)for(;o--&&t(e[o],n[o]););return-1===o}if(!s||"object"==typeof e){for(s in o=0,e){if(Ce.call(e,s)&&++o&&!Ce.call(n,s))return!1;if(!(s in n)||!t(e[s],n[s]))return!1}return Object.keys(n).length===o}}return e!=e&&n!=n};function Fe(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const s=e.slice(0,-1).reduce(((t,n,s)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[s+1]))===+e[s+1]?[]:{}),t);return s[e[e.length-1]]=n,t}const Ve={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const s={};for(const o in e)s[o]="object"==typeof e[o]?t(e[o],n):n;return s},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:De,getErrorsFromSchema:function t(e,n,s={}){for(const o in n)switch(!0){case"object"===n[o].type&&!Be(n[o].fields):s[o]=t(e[o],n[o].fields,{...s[o]});break;case"array"===n[o].type:{const r=e&&e[o]?e[o]:[];s[o]=r.map((e=>{const r=t(e,n[o].innerType.fields,{...s[o]});return Object.keys(r).length>0?r:""}));break}default:s[o]=""}return s},getValues:function t(e){let n=[];for(const[,s]of Object.entries(e)){const e="object"==typeof s?t(s):[s];n=[...n,...e]}return n},isEmpty:Be,isNullish:Ae,set:Fe,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(Fe(t,e,n),t)))}};const Le=t=>{let e=t.initialValues||{};const n=t.validationSchema,s=t.validate,o=t.onSubmit,r=()=>Ve.cloneDeep(e),i=()=>n?Ve.getErrorsFromSchema(e,n.fields):Ve.assignDeep(e,""),a=()=>Ve.assignDeep(e,!1),l=ct(r()),u=ct(i()),d=ct(a()),p=ct(!1),f=ct(!1),m=ut(u,(t=>Ve.getValues(t).every((t=>""===t)))),h=ut(l,(t=>{const n=Ve.assignDeep(t,!1);for(let s in t)n[s]=!Ve.deepEqual(t[s],e[s]);return n})),g=ut(h,(t=>Ve.getValues(t).includes(!0)));function $(t,e){return x(t,!0),n?(f.set(!0),n.validateAt(t,c(l)).then((()=>Ve.update(u,t,""))).catch((e=>Ve.update(u,t,e.message))).finally((()=>{f.set(!1)}))):s?(f.set(!0),Promise.resolve().then((()=>s({[t]:e}))).then((e=>Ve.update(u,t,Ve.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return w(t,e),$(t,e)}function b(){l.set(r()),u.set(i()),d.set(a())}function y(t){return Promise.resolve().then((()=>u.set(i()))).then((()=>o(t,l,u))).finally((()=>p.set(!1)))}function w(t,e){Ve.update(l,t,e)}function x(t,e){Ve.update(d,t,e)}return{form:l,errors:u,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:g,handleChange:function(t){const e=t.target,n=e.name||e.id,s=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,s)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),Ve.subscribeOnce(l).then((t=>"function"==typeof s?(f.set(!0),Promise.resolve().then((()=>s(t))).then((e=>{Ve.isNullish(e)||0===Ve.getValues(e).length?y(t):(u.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>y(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>Ve.set(e,t.path,t.message))),u.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void y(t)))},handleReset:b,updateField:w,updateValidateField:v,updateTouched:x,validateField:function(t){return Ve.subscribeOnce(l).then((e=>$(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ut([l,u,d,h,m,f,p,g],(([t,e,n,s,o,r,i,a])=>({form:t,errors:e,touched:n,modified:s,isValid:o,isSubmitting:i,isValidating:r,isModified:a})))}};function Pe(t,e,n){const s=t.slice();return s[33]=e[n].show,s[13]=e[n].title,s[14]=e[n].fields,s}function Me(t,e,n){const s=t.slice();return s[0]=e[n],s[36]=e,s[37]=n,s}function ze(t){let e,n,s,o=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=v("p"),n=b(o),s=b(r),S(e,"class","er-error text-sm mt-2 text-red-500")},m(t,o){h(t,e,o),m(e,n),m(e,s)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(s,r)},d(t){t&&g(e)}}}function Re(t){let e;return{c(){e=v("p"),e.textContent=`${t[8].text}`,S(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}function Ye(t){let e,n,s;function o(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new Oe({props:r}),B.push((()=>Q(e,"value",o))),{c(){tt(e.$$.fragment)},m(t,n){et(e,t,n),s=!0},p(s,o){t=s;const r={};!n&&80&o[0]&&(n=!0,r.value=t[4][t[0].name],M((()=>n=!1))),e.$set(r)},i(t){s||(Z(e.$$.fragment,t),s=!0)},o(t){G(e.$$.fragment,t),s=!1},d(t){nt(e,t)}}}function Je(t){let e,n,s=t[14],o=[];for(let e=0;e<s.length;e+=1)o[e]=Ye(Me(t,s,e));const r=t=>G(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=w()},m(t,s){for(let e=0;e<o.length;e+=1)o[e].m(t,s);h(t,e,s),n=!0},p(t,n){if(80&n[0]){let i;for(s=t[14],i=0;i<s.length;i+=1){const r=Me(t,s,i);o[i]?(o[i].p(r,n),Z(o[i],1)):(o[i]=Ye(r),o[i].c(),Z(o[i],1),o[i].m(e.parentNode,e))}for(H(),i=s.length;i<o.length;i+=1)r(i);W()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Z(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)G(o[t]);n=!1},d(t){$(o,t),t&&g(e)}}}function Ue(t){let e,n;return e=new ht({props:{title:t[13],show:t[33],$$slots:{default:[Je]},$$scope:{ctx:t}}}),{c(){tt(e.$$.fragment)},m(t,s){et(e,t,s),n=!0},p(t,n){const s={};16&n[0]|128&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function Xe(t){let e,s,o,r=t[9].value+"",i=t[9].icon&&function(t){let e,s;return{c(){e=v("m-icon"),I(e,"class","mar-r-md"),I(e,"name",s=t[9].icon)},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=v("button"),i&&i.c(),s=y(),o=b(r),S(e,"ord","primary"),S(e,"class","full-width"),S(e,"type","submit")},m(t,n){h(t,e,n),i&&i.m(e,null),m(e,s),m(e,o)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&g(e),i&&i.d()}}}function He(t){let e,s,o,r,i,a,l,c,u,d,p,f;document.title=e="enablerr - "+t[5];let b=t[13].text&&function(t){let e;return{c(){e=v("h2"),e.textContent=`${t[13].text}`},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t),w=t[1]&&t[7].text&&ze(t),I=t[3]&&t[8].text&&Re(t),T=t[6],q=[];for(let e=0;e<T.length;e+=1)q[e]=Ue(Pe(t,T,e));const E=t=>G(q[t],1,1,(()=>{q[t]=null}));let j=t[9]&&Xe(t);return{c(){s=y(),b&&b.c(),o=y(),w&&w.c(),r=y(),I&&I.c(),i=y(),a=v("p"),a.textContent=`${t[10].text}`,l=y(),c=v("form");for(let t=0;t<q.length;t+=1)q[t].c();u=y(),j&&j.c(),S(a,"id","er-invalid"),S(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),c.noValidate=!0},m(e,n){h(e,s,n),b&&b.m(e,n),h(e,o,n),w&&w.m(e,n),h(e,r,n),I&&I.m(e,n),h(e,i,n),h(e,a,n),h(e,l,n),h(e,c,n);for(let t=0;t<q.length;t+=1)q[t].m(c,null);m(c,u),j&&j.m(c,null),d=!0,p||(f=x(c,"submit",k(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&b.p(t,n),t[1]&&t[7].text?w?w.p(t,n):(w=ze(t),w.c(),w.m(r.parentNode,r)):w&&(w.d(1),w=null),t[3]&&t[8].text?I?I.p(t,n):(I=Re(t),I.c(),I.m(i.parentNode,i)):I&&(I.d(1),I=null),80&n[0]){let e;for(T=t[6],e=0;e<T.length;e+=1){const s=Pe(t,T,e);q[e]?(q[e].p(s,n),Z(q[e],1)):(q[e]=Ue(s),q[e].c(),Z(q[e],1),q[e].m(c,u))}for(H(),e=T.length;e<q.length;e+=1)E(e);W()}t[9]&&j.p(t,n)},i(t){if(!d){for(let t=0;t<T.length;t+=1)Z(q[t]);d=!0}},o(t){q=q.filter(Boolean);for(let t=0;t<q.length;t+=1)G(q[t]);d=!1},d(t){t&&g(s),b&&b.d(t),t&&g(o),w&&w.d(t),t&&g(r),I&&I.d(t),t&&g(i),t&&g(a),t&&g(l),t&&g(c),$(q,t),j&&j.d(),p=!1,f()}}}function We(t,n,s){let o,r,{options:i={}}=n,{input:a}=n,{head:l=""}=n;const{title:c={},groups:d=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",y=!1;const w=d.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,n)=>{let s={};for(const t in T)(_t(a[t])||Ot(n[t])&&T[t]!==n[t])&&(s[t]=n[t]);if(((t={})=>!Object.keys(t).length)(s))return!1;const{_id:o,id:r}=n;return e.post("/api/"+t,{...s,_id:o,id:r}).then((t=>t.data))},k=(t,e,n,s)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(s)))),S=()=>{const t=w.find((t=>!Ee(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),qe(t.name),!1)},I={},T={};w.map((({name:t,type:e,value:n})=>{const o=je(e);let r=Ct(o,$[t],a[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}s(17,I[t]=r,I),T[t]=r}));const{form:q,handleSubmit:E,handleReset:j}=Le({initialValues:I,onSubmit:async t=>{if(!p)return;if(!S())return;const{path:e,func:n}=p,o=(t=>w.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let r={};e&&!(r=await x(e,o))||n&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,o,r))||((t,e)=>{const{action:n,url:o,query:r,reset:i}=t,{status:a=!0,data:l,message:c={}}=e;a?(s(3,y=!0),setTimeout((()=>{s(3,y=!1),k(n,l,o,r)}),m.text?1e3:10)):(i&&j(),s(1,v=!0),s(2,b=c.text),setTimeout((()=>{s(1,v=!1),s(2,b="")}),3e3))})(p,r)}});return u(t,q,(t=>s(4,r=t))),t.$$set=t=>{"options"in t&&s(0,i=t.options),"input"in t&&s(15,a=t.input),"head"in t&&s(16,l=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&s(5,o=I.Title||c.text||l)},[i,v,b,y,r,o,d,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},q,E,c,w,a,l,I,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,q.set(r))}]}const{document:Ze}=K;function Ge(t,e,n){const s=t.slice();return s[32]=e[n].show,s[13]=e[n].title,s[14]=e[n].fields,s}function Ke(t,e,n){const s=t.slice();return s[0]=e[n],s[35]=e,s[36]=n,s}function Qe(t){let e,n,s,o=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=v("p"),n=b(o),s=b(r),S(e,"class","er-error text-sm mt-2 text-red-500")},m(t,o){h(t,e,o),m(e,n),m(e,s)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(s,r)},d(t){t&&g(e)}}}function tn(t){let e;return{c(){e=v("p"),e.textContent=`${t[8].text}`,S(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}function en(t){let e,n,s,o;function r(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new Oe({props:i}),B.push((()=>Q(e,"value",r))),{c(){tt(e.$$.fragment),s=y()},m(t,n){et(e,t,n),h(t,s,n),o=!0},p(s,o){t=s;const r={};!n&&80&o[0]&&(n=!0,r.value=t[4][t[0].name],M((()=>n=!1))),e.$set(r)},i(t){o||(Z(e.$$.fragment,t),o=!0)},o(t){G(e.$$.fragment,t),o=!1},d(t){nt(e,t),t&&g(s)}}}function nn(t){let e,n,s=t[14],o=[];for(let e=0;e<s.length;e+=1)o[e]=en(Ke(t,s,e));const r=t=>G(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=w()},m(t,s){for(let e=0;e<o.length;e+=1)o[e].m(t,s);h(t,e,s),n=!0},p(t,n){if(80&n[0]){let i;for(s=t[14],i=0;i<s.length;i+=1){const r=Ke(t,s,i);o[i]?(o[i].p(r,n),Z(o[i],1)):(o[i]=en(r),o[i].c(),Z(o[i],1),o[i].m(e.parentNode,e))}for(H(),i=s.length;i<o.length;i+=1)r(i);W()}},i(t){if(!n){for(let t=0;t<s.length;t+=1)Z(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)G(o[t]);n=!1},d(t){$(o,t),t&&g(e)}}}function sn(t){let e,n;return e=new ht({props:{title:t[13],show:t[32],$$slots:{default:[nn]},$$scope:{ctx:t}}}),{c(){tt(e.$$.fragment)},m(t,s){et(e,t,s),n=!0},p(t,n){const s={};16&n[0]|64&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(Z(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){nt(e,t)}}}function on(t){let e,s,o,r=t[9].value+"",i=t[9].icon&&function(t){let e,s;return{c(){e=v("m-icon"),I(e,"class","mar-r-md"),I(e,"name",s=t[9].icon)},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t);return{c(){e=v("button"),i&&i.c(),s=y(),o=b(r),S(e,"ord","primary"),S(e,"class","full-width"),S(e,"type","submit")},m(t,n){h(t,e,n),i&&i.m(e,null),m(e,s),m(e,o)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&g(e),i&&i.d()}}}function rn(t){let e,s,o,r,i,a,l,c,u,d,p,f;Ze.title=e="enablerr - "+t[5];let b=t[13].text&&function(t){let e;return{c(){e=v("h2"),e.textContent=`${t[13].text}`,S(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){h(t,e,n)},p:n,d(t){t&&g(e)}}}(t),w=t[1]&&t[7].text&&Qe(t),I=t[3]&&t[8].text&&tn(t),T=t[6],q=[];for(let e=0;e<T.length;e+=1)q[e]=sn(Ge(t,T,e));const E=t=>G(q[t],1,1,(()=>{q[t]=null}));let j=t[9]&&on(t);return{c(){s=y(),b&&b.c(),o=y(),w&&w.c(),r=y(),I&&I.c(),i=y(),a=v("p"),a.textContent=`${t[10].text}`,l=y(),c=v("form");for(let t=0;t<q.length;t+=1)q[t].c();u=y(),j&&j.c(),S(a,"id","er-invalid"),S(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),S(c,"class","mt-4"),c.noValidate=!0,S(c,"enctype","multipart/form-data")},m(e,n){h(e,s,n),b&&b.m(e,n),h(e,o,n),w&&w.m(e,n),h(e,r,n),I&&I.m(e,n),h(e,i,n),h(e,a,n),h(e,l,n),h(e,c,n);for(let t=0;t<q.length;t+=1)q[t].m(c,null);m(c,u),j&&j.m(c,null),d=!0,p||(f=x(c,"submit",k(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(Ze.title=e),t[13].text&&b.p(t,n),t[1]&&t[7].text?w?w.p(t,n):(w=Qe(t),w.c(),w.m(r.parentNode,r)):w&&(w.d(1),w=null),t[3]&&t[8].text?I?I.p(t,n):(I=tn(t),I.c(),I.m(i.parentNode,i)):I&&(I.d(1),I=null),80&n[0]){let e;for(T=t[6],e=0;e<T.length;e+=1){const s=Ge(t,T,e);q[e]?(q[e].p(s,n),Z(q[e],1)):(q[e]=sn(s),q[e].c(),Z(q[e],1),q[e].m(c,u))}for(H(),e=T.length;e<q.length;e+=1)E(e);W()}t[9]&&j.p(t,n)},i(t){if(!d){for(let t=0;t<T.length;t+=1)Z(q[t]);d=!0}},o(t){q=q.filter(Boolean);for(let t=0;t<q.length;t+=1)G(q[t]);d=!1},d(t){t&&g(s),b&&b.d(t),t&&g(o),w&&w.d(t),t&&g(r),I&&I.d(t),t&&g(i),t&&g(a),t&&g(l),t&&g(c),$(q,t),j&&j.d(),p=!1,f()}}}function an(t,n,s){let o,r,{options:i={}}=n,{input:a}=n,{head:l=""}=n;const{title:c={},groups:d=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",y=!1;const w=d.reduce(((t,e)=>t.concat(e.fields)),[]),x=(t,e,n,s)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(s)))),k={},S={};w.map((({name:t,type:e,value:n})=>{const o=je(e);let r=Ct(o,$[t],a[t],n);s(17,k[t]=r,k),S[t]=r}));const{form:I,handleSubmit:T,handleReset:q}=Le({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:o}=p,r=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let i={};n&&!(i=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,r))||o&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(o,r,i))||((t,e)=>{const{action:n,url:o,query:r,reset:i}=t,{status:a=!0,data:l,message:c={}}=e;a?(s(3,y=!0),setTimeout((()=>{s(3,y=!1),x(n,l,o,r)}),m.text?1e3:10)):(i&&q(),s(1,v=!0),s(2,b=c.text),setTimeout((()=>{s(1,v=!1),s(2,b="")}),3e3))})(p,i)}});return u(t,I,(t=>s(4,r=t))),t.$$set=t=>{"options"in t&&s(0,i=t.options),"input"in t&&s(15,a=t.input),"head"in t&&s(16,l=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&s(5,o=k.Title||c.text||l)},[i,v,b,y,r,o,d,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},I,T,c,w,a,l,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,I.set(r))}]}function ln(t){let e,n,s,o;const r=t[3].default,i=d(r,t,t[2],null);return{c(){e=v("button"),i&&i.c(),S(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(r,a){h(r,e,a),i&&i.m(e,null),n=!0,s||(o=x(e,"click",t[4]),s=!0)},p(t,[s]){i&&i.p&&(!n||4&s)&&f(i,r,t,t[2],s,null,null),(!n||2&s)&&(e.disabled=t[1])},i(t){n||(Z(i,t),n=!0)},o(t){G(i,t),n=!1},d(t){t&&g(e),i&&i.d(t),s=!1,o()}}}function cn(t,e,n){let{$$slots:s={},$$scope:o}=e,{path:r}=e,{disabled:i}=e;return t.$$set=t=>{"path"in t&&n(0,r=t.path),"disabled"in t&&n(1,i=t.disabled),"$$scope"in t&&n(2,o=t.$$scope)},[r,i,o,s,()=>window.singleSpaNavigate(r)]}function un(t){let e,n,s,o,r;const i=t[5].default,a=d(i,t,t[4],null);return{c(){e=v("span"),a&&a.c(),S(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),S(e,"title",t[0])},m(n,i){h(n,e,i),a&&a.m(e,null),s=!0,o||(r=x(e,"click",t[2]),o=!0)},p(t,[o]){a&&a.p&&(!s||16&o)&&f(a,i,t,t[4],o,null,null),(!s||2&o&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&S(e,"class",n),(!s||1&o)&&S(e,"title",t[0])},i(t){s||(Z(a,t),s=!0)},o(t){G(a,t),s=!1},d(t){t&&g(e),a&&a.d(t),o=!1,r()}}}function dn(t,e,n){let{$$slots:s={},$$scope:o}=e,{title:r}=e,{link:i="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,o=t.$$scope)},[r,a,()=>window.singleSpaNavigate(i),i,o,s]}function pn(t){let e,n,s=t[0](),o=s&&function(t){let e;const n=t[2].default,s=d(n,t,t[1],null);return{c(){s&&s.c()},m(t,n){s&&s.m(t,n),e=!0},p(t,o){s&&s.p&&(!e||2&o)&&f(s,n,t,t[1],o,null,null)},i(t){e||(Z(s,t),e=!0)},o(t){G(s,t),e=!1},d(t){s&&s.d(t)}}}(t);return{c(){o&&o.c(),e=w()},m(t,s){o&&o.m(t,s),h(t,e,s),n=!0},p(t,[e]){s&&o.p(t,e)},i(t){n||(Z(o),n=!0)},o(t){G(o),n=!1},d(t){o&&o.d(t),t&&g(e)}}}function fn(t,e,n){let{$$slots:s={},$$scope:o}=e;O();const r=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,o=t.$$scope)},[()=>!!c(dt)||window.singleSpaNavigate(`/?p=${r}`),o,s]}function mn(t,e,n){let s;u(t,pt,(t=>n(1,s=t)));let{description:o}=e;return t.$$set=t=>{"description"in t&&n(0,o=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&o){const t=o;o.length>30&&n(0,o=o.substring(0,30)+"...");const e=window.location.pathname,r=s.filter((t=>t.href!==e));pt.set(r.slice(Math.max(r.length-6+1,0)).concat({href:e,text:o,desc:t}))}},[o,s]}var hn={getSchema:async t=>(await e.get("/api/schema/"+t)).data,getSchemas:async()=>(await e.get("/api/schema")).data,getSchemaByClass:async t=>(await e.get(`/api/schemabyclass/${t}`)).data,getEvents:async()=>(await e.get("/api/read/_event")).data,getTask:async(t,n)=>(await e.get(`/api/task/${t}:${n}?display=form`)).data,getTaskList:async(t,n)=>(await e.get(`/api/task/${t}:${n}?display=list`)).data,getTasksList:async t=>(await e.get(`/api/tasks/${t}?display=list`)).data,getTaskById:async t=>(await e.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:async t=>(await e.post("/api/taskqueue",{id:t})).data,saveData:async(t,n)=>(await e.post(`/api/${t}`,n)).data.id,deleteTask:async t=>(await e.delete(`/api/_task/${t}`)).data,savePlugins:async(t,n)=>(await e.post("/api/plugin",t,n)).data,savePlugin:async(t,n)=>(await e.post(`/api/plugin/${t}`,n)).data,deletePlugin:async t=>(await e.delete(`/api/plugin/${t}`)).data,getAuthStatus:async t=>(await e.post("/api/auth/status",{email:t})).data,authEnroll:async t=>(await e.post("/api/auth/enroll",t)).data,authLogin:async(t,n)=>(await e.post("/api/auth/login",{username:t,passcode:n})).data,authLogout:async()=>await e.post("/api/auth/logout")};const gn=window.location.pathname;t("default",{version:"0.2.7",Storage:at,getLoggedIn:()=>dt,getBreadcrumbs:()=>pt,Request:hn,Form:class extends rt{constructor(t){super(),ot(this,t,We,He,a,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends rt{constructor(t){super(),ot(this,t,an,rn,a,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends rt{constructor(t){super(),ot(this,t,cn,ln,a,{path:0,disabled:1})}},LinkIcon:class extends rt{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=v("style")).id="svelte-1jng2dw-style",e.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",m(document.head,e)),ot(this,t,dn,un,a,{title:0,link:3,color:1})}},Breadcrumb:class extends rt{constructor(t){super(),ot(this,t,mn,null,a,{description:0})}},CheckLogin:class extends rt{constructor(t){var e;super(),document.getElementById("svelte-29ryz7-style")||((e=v("style")).id="svelte-29ryz7-style",e.textContent="nav.breadcrumbs{margin:0 !important;padding-bottom:1em}",m(document.head,e)),ot(this,t,fn,pn,a,{})}},checkLogin:()=>{c(dt)||window.singleSpaNavigate(`/?p=${gn}`)}})}}}));
|
|
1
|
+
System.register(["axios","@enablerr-ui/layout"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.default},function(t){n=t.getAttractions}],execute:function(){function o(){}function s(t){return t()}function r(){return Object.create(null)}function i(t){t.forEach(s)}function a(t){return"function"==typeof t}function c(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,...e){if(null==t)return o;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function u(t){let e;return l(t,(t=>e=t))(),e}function d(t,e,n){t.$$.on_destroy.push(l(e,n))}function p(t,e,n,o){if(t){const s=f(t,e,n,o);return t[0](s)}}function f(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function m(t,e,n,o,s,r,i){const a=function(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|s[o];return t}return e.dirty|s}return e.dirty}(e,o,s,r);if(a){const s=f(e,n,o,i);t.p(s,a)}}function h(t){return t&&a(t.destroy)?t.destroy:o}function g(t,e){t.appendChild(e)}function $(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode.removeChild(t)}function b(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function x(t){return document.createElement(t)}function y(t){return document.createTextNode(t)}function w(){return y(" ")}function k(){return y("")}function S(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function E(t){return function(e){return e.preventDefault(),t.call(this,e)}}function I(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function j(t,e,n){e in t?t[e]="boolean"==typeof t[e]&&""===n||n:I(t,e,n)}function T(t){return""===t?null:+t}function q(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function C(t,e){t.value=null==e?"":e}function N(t,e,n){t.classList[n?"add":"remove"](e)}let _;function O(t){_=t}function L(){if(!_)throw new Error("Function called outside component initialization");return _}function A(){const t=L();return(e,n)=>{const o=t.$$.callbacks[e];if(o){const s=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);o.slice().forEach((e=>{e.call(t,s)}))}}}function D(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t(e)))}const B=[],F=[],P=[],V=[],M=Promise.resolve();let z=!1;function R(t){P.push(t)}function Y(t){V.push(t)}let J=!1;const U=new Set;function X(){if(!J){J=!0;do{for(let t=0;t<B.length;t+=1){const e=B[t];O(e),W(e.$$)}for(O(null),B.length=0;F.length;)F.pop()();for(let t=0;t<P.length;t+=1){const e=P[t];U.has(e)||(U.add(e),e())}P.length=0}while(B.length);for(;V.length;)V.pop()();z=!1,J=!1,U.clear()}}function W(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(R)}}const H=new Set;let Z;function G(){Z={r:0,c:[],p:Z}}function K(){Z.r||i(Z.c),Z=Z.p}function Q(t,e){t&&t.i&&(H.delete(t),t.i(e))}function tt(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),Z&&Z.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function et(t,e){const n=e.token={};function o(t,o,s,r){if(e.token!==n)return;e.resolved=r;let i=e.ctx;void 0!==s&&(i=i.slice(),i[s]=r);const a=t&&(e.current=t)(i);let c=!1;e.block&&(e.blocks?e.blocks.forEach(((t,n)=>{n!==o&&t&&(G(),tt(t,1,1,(()=>{e.blocks[n]===t&&(e.blocks[n]=null)})),K())})):e.block.d(1),a.c(),Q(a,1),a.m(e.mount(),e.anchor),c=!0),e.block=a,e.blocks&&(e.blocks[o]=a),c&&X()}if((s=t)&&"object"==typeof s&&"function"==typeof s.then){const n=L();if(t.then((t=>{O(n),o(e.then,1,e.value,t),O(null)}),(t=>{if(O(n),o(e.catch,2,e.error,t),O(null),!e.hasCatch)throw t})),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}var s}function nt(t,e,n){const o=e.slice(),{resolved:s}=t;t.current===t.then&&(o[t.value]=s),t.current===t.catch&&(o[t.error]=s),t.block.p(o,n)}const ot="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function st(t,e,n){const o=t.$$.props[e];void 0!==o&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function rt(t){t&&t.c()}function it(t,e,n,o){const{fragment:r,on_mount:c,on_destroy:l,after_update:u}=t.$$;r&&r.m(e,n),o||R((()=>{const e=c.map(s).filter(a);l?l.push(...e):i(e),t.$$.on_mount=[]})),u.forEach(R)}function at(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ct(t,e){-1===t.$$.dirty[0]&&(B.push(t),z||(z=!0,M.then(X)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function lt(t,e,n,s,a,c,l=[-1]){const u=_;O(t);const d=t.$$={fragment:null,ctx:null,props:c,update:o,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:e.context||[]),callbacks:r(),dirty:l,skip_bound:!1};let p=!1;if(d.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&a(d.ctx[e],d.ctx[e]=s)&&(!d.skip_bound&&d.bound[e]&&d.bound[e](s),p&&ct(t,e)),n})):[],d.update(),p=!0,i(d.before_update),d.fragment=!!s&&s(d.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);d.fragment&&d.fragment.l(t),t.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&Q(t.$$.fragment),it(t,e.target,e.anchor,e.customElement),X()}O(u)}class ut{$destroy(){at(this,1),this.$destroy=o}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const dt=window.sessionStorage;dt.clear();const pt={getItem:t=>dt.getItem(t),setItem:(t,e)=>dt.setItem(t,e)},ft=[];function mt(t,e=o){let n;const s=[];function r(e){if(c(t,e)&&(t=e,n)){const e=!ft.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),ft.push(n,t)}if(e){for(let t=0;t<ft.length;t+=2)ft[t][0](ft[t+1]);ft.length=0}}}return{set:r,update:function(e){r(e(t))},subscribe:function(i,a=o){const c=[i,a];return s.push(c),1===s.length&&(n=e(r)||o),i(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(n(),n=null)}}}}function ht(t,e,n){const s=!Array.isArray(t),r=s?[t]:t,c=e.length<2;return u=t=>{let n=!1;const u=[];let d=0,p=o;const f=()=>{if(d)return;p();const n=e(s?u[0]:u,t);c?t(n):p=a(n)?n:o},m=r.map(((t,e)=>l(t,(t=>{u[e]=t,d&=~(1<<e),n&&f()}),(()=>{d|=1<<e}))));return n=!0,f(),function(){i(m),p()}},{subscribe:mt(n,u).subscribe};var u}const gt=mt(window.localStorage.getItem("lh-enablerr-user")?{user:window.localStorage.getItem("lh-enablerr-user"),gravatar:window.localStorage.getItem("lh-enablerr-gravatar"),tenant:window.localStorage.getItem("lh-enablerr-tenant"),tenants:JSON.parse(window.localStorage.getItem("lh-enablerr-tenants"))}:""),$t=mt([]),vt=mt({tenant:"",status:""}),bt=()=>{gt.set(""),window.localStorage.setItem("lh-enablerr-user",""),window.localStorage.setItem("lh-enablerr-gravatar",""),window.localStorage.setItem("lh-enablerr-tenant",""),window.localStorage.setItem("lh-enablerr-tenants",""),window.location.href="/"};function xt(t){let e,n,o,s,r;const i=t[3].default,a=p(i,t,t[2],null);return{c(){e=x("fieldset"),n=x("legend"),o=y(t[0]),s=w(),a&&a.c(),N(n,"sr-only",!t[1])},m(t,i){$(t,e,i),g(e,n),g(n,o),g(e,s),a&&a.m(e,null),r=!0},p(t,[e]){(!r||1&e)&&q(o,t[0]),2&e&&N(n,"sr-only",!t[1]),a&&a.p&&(!r||4&e)&&m(a,i,t,t[2],e,null,null)},i(t){r||(Q(a,t),r=!0)},o(t){tt(a,t),r=!1},d(t){t&&v(e),a&&a.d(t)}}}function yt(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r=""}=e,{show:i=!0}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"show"in t&&n(1,i=t.show),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o]}class wt extends ut{constructor(t){super(),lt(this,t,yt,xt,c,{title:0,show:1})}}const kt=t=>({}),St=t=>({}),Et=t=>({}),It=t=>({});function jt(t){let e,n,o,s,r,a,c,l,u,d;const f=t[16].head,h=p(f,t,t[15],It),g=t[16].tail,b=p(g,t,t[15],St);return{c(){h&&h.c(),e=w(),n=x("input"),s=w(),r=x("input"),c=w(),b&&b.c(),I(n,"type","number"),I(n,"class",o=t[1]+" form-input form-number hidden"),I(n,"id",t[5]),I(n,"name",t[5]),I(n,"placeholder",t[8]),I(n,"aria-label",t[7]),I(n,"title",t[7]),n.required=t[9],n.disabled=t[10],I(n,"pattern",t[11]),I(n,"min",t[2]),I(n,"max",t[12]),I(n,"step",t[3]),I(r,"type","text"),I(r,"id",t[6]),I(r,"name",t[6]),I(r,"class",a=t[1]+" form-input form-number form-shadow"),r.disabled=t[10],I(r,"aria-label",t[7]),I(r,"title",t[7])},m(o,i){h&&h.m(o,i),$(o,e,i),$(o,n,i),C(n,t[0]),$(o,s,i),$(o,r,i),C(r,t[4]),$(o,c,i),b&&b.m(o,i),l=!0,u||(d=[S(n,"input",t[18]),S(n,"blur",t[13]),S(r,"input",t[19]),S(r,"focus",t[17])],u=!0)},p(t,[e]){h&&h.p&&(!l||32768&e)&&m(h,f,t,t[15],e,Et,It),(!l||2&e&&o!==(o=t[1]+" form-input form-number hidden"))&&I(n,"class",o),(!l||4&e)&&I(n,"min",t[2]),(!l||8&e)&&I(n,"step",t[3]),1&e&&T(n.value)!==t[0]&&C(n,t[0]),(!l||2&e&&a!==(a=t[1]+" form-input form-number form-shadow"))&&I(r,"class",a),16&e&&r.value!==t[4]&&C(r,t[4]),b&&b.p&&(!l||32768&e)&&m(b,g,t,t[15],e,kt,St)},i(t){l||(Q(h,t),Q(b,t),l=!0)},o(t){tt(h,t),tt(b,t),l=!1},d(t){h&&h.d(t),t&&v(e),t&&v(n),t&&v(s),t&&v(r),t&&v(c),b&&b.d(t),u=!1,i(d)}}}function Tt(t,e,n){let{$$slots:o={},$$scope:s}=e,{options:r}=e,{css:i}=e,{value:a}=e;const c=JSON.parse(window.sessionStorage.getItem("Locale")),{name:l,nameShadow:u,title:d,placeholder:p,required:f,disabled:m,pattern:h}=r;let{positive:g,min:$,max:v,decimal:b=0,step:x=1}=r;const y=A();let w;b>0&&(x="any"),g&&!$&&($=0);const k=((t,e)=>{const n=Intl.NumberFormat?new Intl.NumberFormat(t,{minimumFractionDigits:e}):{format:t=>t};return{format:t=>{try{t=n.format(t||0)}catch{t="(ungültig)"}return t}}})(c.id,b),S=()=>{n(4,w=k.format(a))};return S(),t.$$set=t=>{"options"in t&&n(14,r=t.options),"css"in t&&n(1,i=t.css),"value"in t&&n(0,a=t.value),"$$scope"in t&&n(15,s=t.$$scope)},[a,i,$,x,w,l,u,d,p,f,m,h,v,()=>{S(),y("blur")},r,s,o,function(e){D(t,e)},function(){a=T(this.value),n(0,a)},function(){w=this.value,n(4,w)}]}class qt extends ut{constructor(t){super(),lt(this,t,Tt,jt,c,{options:14,css:1,value:0})}}function Ct(t){let e;return{c(){e=x("span"),e.textContent="%",I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function Nt(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[Ct]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new qt({props:r}),F.push((()=>st(e,"value",s))),e.$on("focus",t[4]),e.$on("blur",t[5]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),4&o&&(s.css=t[2]),64&o&&(s.$$scope={dirty:o,ctx:t}),!n&&2&o&&(n=!0,s.value=t[1],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function _t(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return o.positive=o.positive||!0,o.max=o.max||100,o.decimal=o.decimal||2,t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(1,r=t.value)},[o,r,s,function(t){r=t,n(1,r)},function(e){D(t,e)},function(e){D(t,e)}]}function Ot(t){let e,n;return{c(){e=x("span"),n=y(t[3]),I(e,"slot","head"),I(e,"class","absolute text-sm italic z-50 pl-3 pt-3")},m(t,o){$(t,e,o),g(e,n)},p(t,e){8&e&&q(n,t[3])},d(t){t&&v(e)}}}function Lt(t){let e,n,o;function s(e){t[4](e)}let r={options:t[1],css:t[2],$$slots:{head:[Ot]},$$scope:{ctx:t}};return void 0!==t[0]&&(r.value=t[0]),e=new qt({props:r}),F.push((()=>st(e,"value",s))),e.$on("focus",t[5]),e.$on("blur",t[6]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};2&o&&(s.options=t[1]),4&o&&(s.css=t[2]),136&o&&(s.$$scope={dirty:o,ctx:t}),!n&&1&o&&(n=!0,s.value=t[0],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function At(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e,{currency:i="CHF"}=e;return t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value),"currency"in t&&n(3,i=t.currency)},[r,o,s,i,function(t){r=t,n(0,r)},function(e){D(t,e)},function(e){D(t,e)}]}function Dt(t){let e,n,s,r;return{c(){e=x("input"),I(e,"type","password"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete","off")},m(n,o){$(n,e,o),C(e,t[0]),s||(r=S(e,"input",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Bt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(){r=this.value,n(0,r)}]}Intl.NumberFormat().formatToParts(1.1).find((({type:t})=>"decimal"===t)).value;const Ft=t=>"function"==typeof t,Pt=t=>t&&t.toString,Vt=t=>((t,...e)=>e.includes(t))(t,void 0,null),Mt=t=>!Vt(t),zt=(t,...e)=>e.concat(t).find(Mt),Rt=(t=null,e,...n)=>{try{return e(...n)}catch{return t}},Yt=(t,e=2,n=0,o=t.toString(),s=n.toString())=>s.repeat(e-o.length)+o,Jt=(...t)=>{return(e=t[0],(t,...n)=>Rt(Rt("",e.toString),t,...n))(Yt,...t);var e},Ut=(t,e=window)=>({listen:function(n,o){e[`${n}EventListener`](t,o)},start:function(t){this.listen("add",t)},stop:function(t){this.listen("remove",t)}}),Xt=(...t)=>!t.every((({value:t,check:e,text:n})=>e(t)||console.error(n)));function Wt(t){let e,n,s,r;return{c(){e=x("input"),I(e,"type","date"),I(e,"class",n=t[1]+" form-input form-date"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),I(e,"pattern",Kt),I(e,"min",t[6]),I(e,"max",t[7]),e.required=t[4],e.disabled=t[5]},m(n,o){$(n,e,o),C(e,t[0]),s||(r=[S(e,"input",t[10]),S(e,"blur",t[9])],s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input form-date")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,i(r)}}}const Ht={timeZone:"UTC",year:"numeric",month:"long",day:"numeric",weekday:"short"},Zt={year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",timeZoneName:"short"},Gt=(t,e=!1)=>{const n=e?Zt:Ht,o=Intl.DateTimeFormat?new Intl.DateTimeFormat(t,n):{format:t=>t};return{format:t=>{try{t=t?o.format(new Date(t)):""}catch{t="(ungültig)"}return t}}},Kt="\\d{4}(-|/)\\d{2}(-|/)\\d{2}";function Qt(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,min:u,max:d}=o;return r=r.substr(0,10),t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(e){D(t,e)},function(){r=this.value,n(0,r)}]}class te extends ut{constructor(t){super(),lt(this,t,Qt,Wt,c,{options:8,css:1,value:0})}}const{document:ee}=ot;function ne(t,e,n){const o=t.slice();return o[16]=e[n].lit,o[17]=e[n].ref,o[18]=e,o[19]=n,o}function oe(t){let e,n,o;function s(){t[12].call(e,t[19])}return{c(){e=x("input"),I(e,"class","iw-m iw-n"+t[17].count+" svelte-u6cc6e"),I(e,"id",t[2]+"-"+t[19]),I(e,"type","text"),I(e,"data-step",t[19]),I(e,"size",t[17].count),I(e,"minlength",t[17].count),I(e,"maxlength",t[17].count),I(e,"pattern",t[5][t[19]]||t[17].pattern),e.required=t[3],e.disabled=t[4]},m(r,i){$(r,e,i),C(e,t[1][t[19]]),n||(o=[S(e,"input",s),S(e,"input",t[8]),S(e,"blur",t[11])],n=!0)},p(n,o){t=n,2&o&&e.value!==t[1][t[19]]&&C(e,t[1][t[19]])},d(t){t&&v(e),n=!1,i(o)}}}function se(t){let e,n,s=t[16]+"";return{c(){e=x("span"),n=y(s),I(e,"class","iw-m svelte-u6cc6e")},m(t,o){$(t,e,o),g(e,n)},p:o,d(t){t&&v(e)}}}function re(t){let e;let n=function(t,e){return t[16]?se:oe}(t),o=n(t);return{c(){o.c(),e=k()},m(t,n){o.m(t,n),$(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&v(e)}}}function ie(t){let e,n,s,r,i=t[6].obj,a=[];for(let e=0;e<i.length;e+=1)a[e]=re(ne(t,i,e));return{c(){e=x("div");for(let t=0;t<a.length;t+=1)a[t].c();I(e,"class",n=t[0]+" form-input svelte-u6cc6e"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"tabindex","0")},m(n,o){$(n,e,o);for(let t=0;t<a.length;t+=1)a[t].m(e,null);s||(r=S(e,"focus",t[7]),s=!0)},p(t,[o]){if(382&o){let n;for(i=t[6].obj,n=0;n<i.length;n+=1){const s=ne(t,i,n);a[n]?a[n].p(s,o):(a[n]=re(s),a[n].c(),a[n].m(e,null))}for(;n<a.length;n+=1)a[n].d(1);a.length=i.length}1&o&&n!==(n=t[0]+" form-input svelte-u6cc6e")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),b(a,t),s=!1,r()}}}function ae(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;r=r.toString();const{name:i,title:a,required:c,disabled:l,mask:u,pattern:d=[]}=o,p=(t=>{let e=[],n="",o=!1;if("string"!=typeof t)return e;const s=(t="")=>{n=t},r=t=>s(n.concat(t)),i=(t=!0)=>{o=t},a=t=>(e.push({lit:t}),void i(!1));for(const c of t)o?a(c):"\\"===c?i():"{"===c?s():"}"===c?e.push({ref:{count:parseInt(n),pattern:`\\d{${n}}`}}):" "===c?a(c):c>=0?r(c):a(c);const c=(t,n="",o=!0,s=0)=>t?e.reduce(((e,n)=>e.concat(n.ref&&n.ref.count?t.slice(s,s+=n.ref.count):o&&n.lit||"")),n):n;return{obj:e,getValues:t=>c(t,[],!1),format:t=>c(t)}})(u),f=p.getValues(r);return t.$$set=t=>{"options"in t&&n(10,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(9,r=t.value)},[s,f,i,c,l,d,p,({relatedTarget:t})=>{if(!t||"INPUT"===t.tagName)return!0;const e=`#${i} > input`;return document.querySelectorAll(e)[0].focus()},({target:t})=>{n(9,r=f.reduce(((t,e)=>t.concat(e))));const e=t.dataset.step;if(f[e].length<t.minLength)return!0;const o=`#${i}-${e} ~ input`,s=document.querySelectorAll(o);return s[0]&&s[0].focus&&s[0].focus()},r,o,function(e){D(t,e)},function(t){f[t]=this.value,n(1,f)}]}class ce extends ut{constructor(t){var e;super(),ee.getElementById("svelte-u6cc6e-style")||((e=x("style")).id="svelte-u6cc6e-style",e.textContent="span.iw-m.svelte-u6cc6e{margin-right:1px;margin-left:1px}.iw-n1.svelte-u6cc6e{width:0.75rem}.iw-n2.svelte-u6cc6e{width:1.25rem}.iw-n3.svelte-u6cc6e{width:2rem}.iw-n4.svelte-u6cc6e{width:2.5rem}.iw-n5.svelte-u6cc6e{width:3.25rem}.iw-n6.svelte-u6cc6e{width:3.75rem}.iw-n7.svelte-u6cc6e{width:4.5rem}.iw-n8.svelte-u6cc6e{width:5rem}.iw-n9.svelte-u6cc6e{width:5.75rem}.iw-n10.svelte-u6cc6e{width:6.25rem}input.svelte-u6cc6e:invalid{background-color:#fff5f5}",g(ee.head,e)),lt(this,t,ae,ie,c,{options:10,css:0,value:9})}}function le(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[1]};return void 0!==t[2]&&(r.value=t[2]),e=new ce({props:r}),F.push((()=>st(e,"value",s))),e.$on("blur",t[4]),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(t,[o]){const s={};1&o&&(s.options=t[0]),2&o&&(s.css=t[1]),!n&&4&o&&(n=!0,s.value=t[2],Y((()=>n=!1))),e.$set(s)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function ue(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;return s=s.concat(" form-time"),o.mask="{2}:{2}",o.pattern=["(2[0-3]|[0-1][0-9])","","[0-5][0-9]"],t.$$set=t=>{"options"in t&&n(0,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(2,r=t.value)},[o,s,r,function(t){r=t,n(2,r)},function(e){D(t,e)}]}class de extends ut{constructor(t){super(),lt(this,t,ue,le,c,{options:0,css:1,value:2})}}function pe(t){let e,n,o,s,r,a,c,l,u,d,p,f;function m(e){t[15](e)}let h={options:t[4],css:t[0]};function b(e){t[16](e)}void 0!==t[1]&&(h.value=t[1]),n=new te({props:h}),F.push((()=>st(n,"value",m))),n.$on("blur",t[10]);let y={options:t[3],css:t[0]};return void 0!==t[2]&&(y.value=t[2]),r=new de({props:y}),F.push((()=>st(r,"value",b))),r.$on("blur",t[10]),{c(){e=x("div"),rt(n.$$.fragment),s=w(),rt(r.$$.fragment),c=w(),l=x("input"),I(e,"id",t[6]),I(e,"tabindex","90"),I(e,"class","hidden"),I(l,"type","text"),I(l,"class",u=t[0]+" form-input form-shadow"),I(l,"id",t[7]),I(l,"name",t[7]),l.disabled=t[9],I(l,"aria-label",t[8]),I(l,"title",t[8])},m(o,i){$(o,e,i),it(n,e,null),g(e,s),it(r,e,null),$(o,c,i),$(o,l,i),C(l,t[5]),d=!0,p||(f=[S(e,"blur",t[10]),S(e,"focus",t[11]),S(l,"input",t[17]),S(l,"focus",t[14])],p=!0)},p(t,[e]){const s={};16&e&&(s.options=t[4]),1&e&&(s.css=t[0]),!o&&2&e&&(o=!0,s.value=t[1],Y((()=>o=!1))),n.$set(s);const i={};8&e&&(i.options=t[3]),1&e&&(i.css=t[0]),!a&&4&e&&(a=!0,i.value=t[2],Y((()=>a=!1))),r.$set(i),(!d||1&e&&u!==(u=t[0]+" form-input form-shadow"))&&I(l,"class",u),32&e&&l.value!==t[5]&&C(l,t[5])},i(t){d||(Q(n.$$.fragment,t),Q(r.$$.fragment,t),d=!0)},o(t){tt(n.$$.fragment,t),tt(r.$$.fragment,t),d=!1},d(t){t&&v(e),at(n),at(r),t&&v(c),t&&v(l),p=!1,i(f)}}}function fe(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale"));let{date:a,time:c}=(t=>{if(!t)return{date:"",time:""};const e=new Date(t),n=e.getFullYear().toString(),o=Jt(e.getMonth()+1),s=Jt(e.getDate()),r=Jt(e.getHours()),i=Jt(e.getMinutes());return{date:n.concat("-",o,"-",s),time:r.concat(i)}})(r);const{name:l,nameShadow:u,title:d,disabled:p}=o;let f,m=Object.assign({},o),h=Object.assign({},o);h.name=l+"-Date",m.name=l+"-Time";const g=Gt(i.id,!0),$=()=>{try{n(12,(t=c,r=new Date(a.substring(0,10).concat("T",t.substr(0,2),":",t.substr(2))).toISOString()))}catch(t){n(12,r=a||c?"invalid":"")}var t;n(5,f=g.format(r))},v=t=>t.startsWith(h.name),b=A();return $(),t.$$set=t=>{"options"in t&&n(13,o=t.options),"css"in t&&n(0,s=t.css),"value"in t&&n(12,r=t.value)},[s,a,c,m,h,f,l,u,d,p,({relatedTarget:t})=>{if(t){if(t.id.startsWith(m.name))return!0;if(v(t.id))return!0}$(),b("blur")},({relatedTarget:t})=>!t||(!!v(t.id)||void document.getElementById(h.name).focus()),r,o,function(e){D(t,e)},function(t){a=t,n(1,a)},function(t){c=t,n(2,c)},function(){f=this.value,n(5,f)}]}function me(t){let e,n,o,s,r,a,c,l;function u(e){t[10](e)}let d={options:t[1],css:t[2]+" hidden"};return void 0!==t[0]&&(d.value=t[0]),e=new te({props:d}),F.push((()=>st(e,"value",u))),e.$on("blur",t[8]),{c(){rt(e.$$.fragment),o=w(),s=x("input"),I(s,"type","text"),I(s,"class",r=t[2]+" form-input form-shadow"),I(s,"id",t[4]),I(s,"name",t[4]),I(s,"placeholder",t[6]),s.disabled=t[7],I(s,"aria-label",t[5]),I(s,"title",t[5])},m(n,r){it(e,n,r),$(n,o,r),$(n,s,r),C(s,t[3]),a=!0,c||(l=[S(s,"input",t[11]),S(s,"focus",t[9])],c=!0)},p(t,[o]){const i={};2&o&&(i.options=t[1]),4&o&&(i.css=t[2]+" hidden"),!n&&1&o&&(n=!0,i.value=t[0],Y((()=>n=!1))),e.$set(i),(!a||4&o&&r!==(r=t[2]+" form-input form-shadow"))&&I(s,"class",r),8&o&&s.value!==t[3]&&C(s,t[3])},i(t){a||(Q(e.$$.fragment,t),a=!0)},o(t){tt(e.$$.fragment,t),a=!1},d(t){at(e,t),t&&v(o),t&&v(s),c=!1,i(l)}}}function he(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const i=JSON.parse(window.sessionStorage.getItem("Locale")),{nameShadow:a,title:c,placeholder:l,disabled:u}=o;let d;const p=Gt(i.id),f=()=>{n(3,d=p.format(r))},m=A();return f(),t.$$set=t=>{"options"in t&&n(1,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,o,s,d,a,c,l,u,()=>{f(),m("blur")},function(e){D(t,e)},function(t){r=t,n(0,r)},function(){d=this.value,n(3,d)}]}function ge(t){let e,n,s,r;return{c(){e=x("input"),I(e,"type","email"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6]},m(n,o){$(n,e,o),C(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function $e(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,o,function(){r=this.value,n(0,r)}]}function ve(t){let e,n,s,r;return{c(){e=x("textarea"),I(e,"rows",t[6]),I(e,"class",n=t[1]+" form-textarea block"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[4],e.disabled=t[5]},m(n,o){$(n,e,o),C(e,t[0]),s||(r=S(e,"input",t[8]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-textarea block")&&I(e,"class",n),1&o&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function be(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,required:c,disabled:l,rows:u=3}=o;return t.$$set=t=>{"options"in t&&n(7,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,o,function(){r=this.value,n(0,r)}]}function xe(t){let e,n,s,r,a,c,l,u;return{c(){e=x("div"),n=x("input"),s=w(),r=x("div"),a=w(),c=x("div"),I(n,"type","checkbox"),I(n,"id",t[1]),I(n,"name",t[1]),I(n,"aria-label",t[2]),I(n,"title",t[2]),n.disabled=t[3],I(n,"class","svelte-ke6ng1"),I(r,"class","track svelte-ke6ng1"),I(c,"class","thumb svelte-ke6ng1"),I(e,"class","switch svelte-ke6ng1")},m(o,i){$(o,e,i),g(e,n),n.checked=t[0],g(e,s),g(e,r),g(e,a),g(e,c),l||(u=[S(n,"change",t[7]),S(r,"click",t[4]),S(c,"click",t[4])],l=!0)},p(t,[e]){1&e&&(n.checked=t[0])},i:o,o:o,d(t){t&&v(e),l=!1,i(u)}}}function ye(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i,title:a,disabled:c}=o;return t.$$set=t=>{"options"in t&&n(6,o=t.options),"css"in t&&n(5,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,a,c,()=>n(0,r=c?r:!r),s,o,function(){r=this.checked,n(0,r)}]}function we(t){let e,n,s,r;return{c(){e=x("input"),I(e,"type","file"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"pattern",t[7]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],e.multiple=!0},m(n,o){$(n,e,o),s||(r=S(e,"change",t[9]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n)},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function ke(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d}=o;return t.$$set=t=>{"options"in t&&n(8,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,o,function(){r=this.value,n(0,r)}]}function Se(t){let e,n,s,r;return{c(){e=x("input"),I(e,"type","text"),I(e,"class",n=t[1]+" form-input"),I(e,"id",t[2]),I(e,"name",t[2]),I(e,"placeholder",t[4]),I(e,"aria-label",t[3]),I(e,"title",t[3]),e.required=t[5],e.disabled=t[6],I(e,"pattern",t[7]),I(e,"autocomplete",t[8])},m(n,o){$(n,e,o),C(e,t[0]),s||(r=S(e,"input",t[10]),s=!0)},p(t,[o]){2&o&&n!==(n=t[1]+" form-input")&&I(e,"class",n),1&o&&e.value!==t[0]&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),s=!1,r()}}}function Ee(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;const{name:i,title:a,placeholder:c,required:l,disabled:u,pattern:d,autocomplete:p="on"}=o;return t.$$set=t=>{"options"in t&&n(9,o=t.options),"css"in t&&n(1,s=t.css),"value"in t&&n(0,r=t.value)},[r,s,i,a,c,l,u,d,p,o,function(){r=this.value,n(0,r)}]}function Ie(t){let e,n,s;return{c(){e=x("input"),I(e,"type","hidden"),I(e,"id",t[1]),I(e,"name",t[1]),e.disabled=!0},m(o,r){$(o,e,r),C(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&C(e,t[0])},i:o,o:o,d(t){t&&v(e),n=!1,s()}}}function je(t,e,n){let{options:o}=e,{css:s}=e,{value:r}=e;s="";const{name:i}=o;return t.$$set=t=>{"options"in t&&n(3,o=t.options),"css"in t&&n(2,s=t.css),"value"in t&&n(0,r=t.value)},[r,i,s,o,function(){r=this.value,n(0,r)}]}const{document:Te}=ot;function qe(t){let e;return{c(){e=x("p"),e.textContent=`Unknow input type: ${t[4]}`,I(e,"class","svelte-166hp95")},m(t,n){$(t,e,n)},p:o,i:o,o:o,d(t){t&&v(e)}}}function Ce(t){let e,n,o,s;function r(e){t[9](e)}var i=t[6];function a(t){let e={options:t[0],css:Me};return void 0!==t[1]&&(e.value=t[1]),{props:e}}return i&&(e=new i(a(t)),F.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8])),{c(){e&&rt(e.$$.fragment),o=k()},m(t,n){e&&it(e,t,n),$(t,o,n),s=!0},p(t,s){const c={};if(1&s&&(c.options=t[0]),!n&&2&s&&(n=!0,c.value=t[1],Y((()=>n=!1))),i!==(i=t[6])){if(e){G();const t=e;tt(t.$$.fragment,1,0,(()=>{at(t,1)})),K()}i?(e=new i(a(t)),F.push((()=>st(e,"value",r))),e.$on("focus",t[7]),e.$on("blur",t[8]),rt(e.$$.fragment),Q(e.$$.fragment,1),it(e,o.parentNode,o)):e=null}else i&&e.$set(c)},i(t){s||(e&&Q(e.$$.fragment,t),s=!0)},o(t){e&&tt(e.$$.fragment,t),s=!1},d(t){t&&v(o),e&&at(e,t)}}}function Ne(t){let e,n,s,r,i,a,c,l,u,d,p,f=t[2].title+"";const m=[Ce,qe],h=[];a=function(t,e){return t[6]?0:1}(t),c=h[a]=m[a](t);let b=t[5]&&function(t){let e;return{c(){e=x("p"),e.textContent=`${t[5]}`,I(e,"class","form-hint hidden svelte-166hp95")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=x("fieldset"),n=x("label"),s=y(f),i=w(),c.c(),l=w(),b&&b.c(),I(n,"for",r=t[2].id),I(n,"disabled",t[3])},m(o,r){$(o,e,r),g(e,n),g(n,s),g(e,i),h[a].m(e,null),g(e,l),b&&b.m(e,null),u=!0,d||(p=S(n,"click",t[7]),d=!0)},p(t,[e]){(!u||4&e)&&f!==(f=t[2].title+"")&&q(s,f),(!u||4&e&&r!==(r=t[2].id))&&I(n,"for",r),c.p(t,e),t[5]&&b.p(t,e)},i(t){u||(Q(c),u=!0)},o(t){tt(c),u=!1},d(t){t&&v(e),h[a].d(),b&&b.d(),d=!1,p()}}}const _e={hidden:class extends ut{constructor(t){super(),lt(this,t,je,Ie,c,{options:3,css:2,value:0})}},text:class extends ut{constructor(t){super(),lt(this,t,Ee,Se,c,{options:9,css:1,value:0})}},file:class extends ut{constructor(t){super(),lt(this,t,ke,we,c,{options:8,css:1,value:0})}},checkbox:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-ke6ng1-style")||((e=x("style")).id="svelte-ke6ng1-style",e.textContent=".switch.svelte-ke6ng1.svelte-ke6ng1{display:block;position:relative;vertical-align:middle;cursor:pointer;background-color:transparent;user-select:none}.track.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:3rem;height:1.5rem;background-color:#a0aec0;border-radius:9999px;box-shadow:inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)}.thumb.svelte-ke6ng1.svelte-ke6ng1{position:absolute;top:0;left:0;width:1.5rem;height:1.5rem;background-color:white;transition-property:all;transition-duration:300ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);border-radius:9999px;border-width:2px;border-color:#a0aec0}input[type='checkbox'].svelte-ke6ng1.svelte-ke6ng1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}input[type='checkbox'].svelte-ke6ng1:checked~.thumb.svelte-ke6ng1{border-color:#38b2ac;--transform-translate-x:100%;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;--border-opacity:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}input[type='checkbox'].svelte-ke6ng1:checked~.track.svelte-ke6ng1{background-color:#38b2ac;--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transition-property:background-color, border-color, color, fill, stroke}input[type='checkbox'].svelte-ke6ng1:disabled~.track.svelte-ke6ng1{background-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled~.thumb.svelte-ke6ng1{background-color:#f7fafc;border-color:#cbd5e0}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.thumb.svelte-ke6ng1{border-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:disabled:checked~.track.svelte-ke6ng1{background-color:#81e6d9}input[type='checkbox'].svelte-ke6ng1:focus+.track.svelte-ke6ng1,input[type='checkbox'].svelte-ke6ng1:active+.track.svelte-ke6ng1{box-shadow:0 0 0 3px rgba(66, 153, 225, 0.5)}",g(document.head,e)),lt(this,t,ye,xe,c,{options:6,css:5,value:0})}},masked:ce,textarea:class extends ut{constructor(t){super(),lt(this,t,be,ve,c,{options:7,css:1,value:0})}},email:class extends ut{constructor(t){super(),lt(this,t,$e,ge,c,{options:7,css:1,value:0})}},date:class extends ut{constructor(t){super(),lt(this,t,he,me,c,{options:1,css:2,value:0})}},datetime:class extends ut{constructor(t){super(),lt(this,t,fe,pe,c,{options:13,css:0,value:12})}},number:qt,password:class extends ut{constructor(t){super(),lt(this,t,Bt,Dt,c,{options:8,css:1,value:0})}},currency:class extends ut{constructor(t){super(),lt(this,t,At,Lt,c,{options:1,css:2,value:0,currency:3})}},rate:class extends ut{constructor(t){super(),lt(this,t,_t,Nt,c,{options:0,css:2,value:1})}}},Oe={default:"",checkbox:!1,email:"@",number:0,currency:0,rate:0},Le=t=>t+"-show",Ae=t=>t&&document.getElementById(t),De=(t,e,n="block")=>{t&&t.style&&(t.style.display=e?n:"none")},Be=(t,e)=>{if(!t)return!0;const n=Ae(t);if(!n)return!0;const o=Ae(Le(t));return!e&&!o||(o&&De(o,!e),De(n,e),e&&n.focus&&n.focus(),!1)},Fe=t=>Be(t,!0),Pe=(t,e=Ae(t))=>e&&e.children&&e.children.length?Array.from(e.children).every((t=>Pe(t.id,t))):!e||!e.validity||e.validity.valid,Ve=t=>void 0===Oe[t]?Oe.default:Oe[t],Me="form-field";function ze(t,e,n){let{options:o}=e,{value:s}=e;const{label:r={},disabled:i,type:a="text",hint:c=!1}=o;r.id=o.name,o.nameShadow=Le(o.name),o.required=!i&&o.required,o.title=o.title||o.placeholder;const l=(t=>_e[t])(a);return t.$$set=t=>{"options"in t&&n(0,o=t.options),"value"in t&&n(1,s=t.value)},[o,s,r,i,a,c,l,t=>Fe(o.name),t=>{return e=o.name,Be(e,!1);var e},function(t){s=t,n(1,s)}]}class Re extends ut{constructor(t){var e;super(),Te.getElementById("svelte-166hp95-style")||((e=x("style")).id="svelte-166hp95-style",e.textContent="p.svelte-166hp95,.form-hint.svelte-166hp95{padding-left:0.75rem;color:#38b2ac;font-size:0.875rem;font-style:italic}",g(Te.head,e)),lt(this,t,ze,Ne,c,{options:0,value:1})}}var Ye=Object.prototype.hasOwnProperty;function Je(t){return null==t}function Ue(t){return Je(t)||Object.keys(t).length<=0}const Xe=function t(e,n){var o,s;if(e===n)return!0;if(e&&n&&(o=e.constructor)===n.constructor){if(o===Date)return e.getTime()===n.getTime();if(o===RegExp)return e.toString()===n.toString();if(o===Array){if((s=e.length)===n.length)for(;s--&&t(e[s],n[s]););return-1===s}if(!o||"object"==typeof e){for(o in s=0,e){if(Ye.call(e,o)&&++s&&!Ye.call(n,o))return!1;if(!(o in n)||!t(e[o],n[o]))return!1}return Object.keys(n).length===s}}return e!=e&&n!=n};function We(t,e,n){if(new Object(t)!==t)return t;Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]);const o=e.slice(0,-1).reduce(((t,n,o)=>new Object(t[n])===t[n]?t[n]:t[n]=Math.trunc(Math.abs(e[o+1]))===+e[o+1]?[]:{}),t);return o[e[e.length-1]]=n,t}const He={assignDeep:function t(e,n){if(Array.isArray(e))return e.map((e=>t(e,n)));const o={};for(const s in e)o[s]="object"==typeof e[s]?t(e[s],n):n;return o},cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},deepEqual:Xe,getErrorsFromSchema:function t(e,n,o={}){for(const s in n)switch(!0){case"object"===n[s].type&&!Ue(n[s].fields):o[s]=t(e[s],n[s].fields,{...o[s]});break;case"array"===n[s].type:{const r=e&&e[s]?e[s]:[];o[s]=r.map((e=>{const r=t(e,n[s].innerType.fields,{...o[s]});return Object.keys(r).length>0?r:""}));break}default:o[s]=""}return o},getValues:function t(e){let n=[];for(const[,o]of Object.entries(e)){const e="object"==typeof o?t(o):[o];n=[...n,...e]}return n},isEmpty:Ue,isNullish:Je,set:We,subscribeOnce:function(t){return new Promise((e=>{t.subscribe(e)()}))},update:function(t,e,n){t.update((t=>(We(t,e,n),t)))}};const Ze=t=>{let e=t.initialValues||{};const n=t.validationSchema,o=t.validate,s=t.onSubmit,r=()=>He.cloneDeep(e),i=()=>n?He.getErrorsFromSchema(e,n.fields):He.assignDeep(e,""),a=()=>He.assignDeep(e,!1),c=mt(r()),l=mt(i()),d=mt(a()),p=mt(!1),f=mt(!1),m=ht(l,(t=>He.getValues(t).every((t=>""===t)))),h=ht(c,(t=>{const n=He.assignDeep(t,!1);for(let o in t)n[o]=!He.deepEqual(t[o],e[o]);return n})),g=ht(h,(t=>He.getValues(t).includes(!0)));function $(t,e){return w(t,!0),n?(f.set(!0),n.validateAt(t,u(c)).then((()=>He.update(l,t,""))).catch((e=>He.update(l,t,e.message))).finally((()=>{f.set(!1)}))):o?(f.set(!0),Promise.resolve().then((()=>o({[t]:e}))).then((e=>He.update(l,t,He.isNullish(e)?"":e[t]))).finally((()=>{f.set(!1)}))):Promise.resolve()}function v(t,e){return y(t,e),$(t,e)}function b(){c.set(r()),l.set(i()),d.set(a())}function x(t){return Promise.resolve().then((()=>l.set(i()))).then((()=>s(t,c,l))).finally((()=>p.set(!1)))}function y(t,e){He.update(c,t,e)}function w(t,e){He.update(d,t,e)}return{form:c,errors:l,touched:d,modified:h,isValid:m,isSubmitting:p,isValidating:f,isModified:g,handleChange:function(t){const e=t.target,n=e.name||e.id,o=function(t){return t.getAttribute&&"checkbox"===t.getAttribute("type")}(e)?e.checked:e.value;return v(n,o)},handleSubmit:function(t){return t&&t.preventDefault&&t.preventDefault(),p.set(!0),He.subscribeOnce(c).then((t=>"function"==typeof o?(f.set(!0),Promise.resolve().then((()=>o(t))).then((e=>{He.isNullish(e)||0===He.getValues(e).length?x(t):(l.set(e),p.set(!1))})).finally((()=>f.set(!1)))):n?(f.set(!0),n.validate(t,{abortEarly:!1}).then((()=>x(t))).catch((t=>{if(t&&t.inner){const e=i();t.inner.map((t=>He.set(e,t.path,t.message))),l.set(e)}p.set(!1)})).finally((()=>f.set(!1)))):void x(t)))},handleReset:b,updateField:y,updateValidateField:v,updateTouched:w,validateField:function(t){return He.subscribeOnce(c).then((e=>$(t,e[t])))},updateInitialValues:function(t){e=t,b()},state:ht([c,l,d,h,m,f,p,g],(([t,e,n,o,s,r,i,a])=>({form:t,errors:e,touched:n,modified:o,isValid:s,isSubmitting:i,isValidating:r,isModified:a})))}};function Ge(t,e,n){const o=t.slice();return o[33]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function Ke(t,e,n){const o=t.slice();return o[0]=e[n],o[36]=e,o[37]=n,o}function Qe(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=x("p"),n=y(s),o=y(r),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){$(t,e,s),g(e,n),g(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(o,r)},d(t){t&&v(e)}}}function tn(t){let e;return{c(){e=x("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}function en(t){let e,n,o;function s(e){t[18](e,t[0])}let r={options:t[0]};return void 0!==t[4][t[0].name]&&(r.value=t[4][t[0].name]),e=new Re({props:r}),F.push((()=>st(e,"value",s))),{c(){rt(e.$$.fragment)},m(t,n){it(e,t,n),o=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(r)},i(t){o||(Q(e.$$.fragment,t),o=!0)},o(t){tt(e.$$.fragment,t),o=!1},d(t){at(e,t)}}}function nn(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=en(Ke(t,o,e));const r=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);$(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=Ke(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=en(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function on(t){let e,n;return e=new wt({props:{title:t[13],show:t[33],$$slots:{default:[nn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};16&n[0]|128&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function sn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=x("m-icon"),j(e,"class","mar-r-md"),j(e,"name",n=t[9].icon)},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=x("button"),i&&i.c(),n=w(),s=y(r),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){$(t,e,o),i&&i.m(e,null),g(e,n),g(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function rn(t){let e,n,s,r,i,a,c,l,u,d,p,f;document.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=x("h2"),e.textContent=`${t[13].text}`},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&Qe(t),y=t[3]&&t[8].text&&tn(t),k=t[6],j=[];for(let e=0;e<k.length;e+=1)j[e]=on(Ge(t,k,e));const T=t=>tt(j[t],1,1,(()=>{j[t]=null}));let q=t[9]&&sn(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),r=w(),y&&y.c(),i=w(),a=x("p"),a.textContent=`${t[10].text}`,c=w(),l=x("form");for(let t=0;t<j.length;t+=1)j[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),l.noValidate=!0},m(e,o){$(e,n,o),m&&m.m(e,o),$(e,s,o),h&&h.m(e,o),$(e,r,o),y&&y.m(e,o),$(e,i,o),$(e,a,o),$(e,c,o),$(e,l,o);for(let t=0;t<j.length;t+=1)j[t].m(l,null);g(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(document.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=Qe(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?y?y.p(t,n):(y=tn(t),y.c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=Ge(t,k,e);j[e]?(j[e].p(o,n),Q(j[e],1)):(j[e]=on(o),j[e].c(),Q(j[e],1),j[e].m(l,u))}for(G(),e=k.length;e<j.length;e+=1)T(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(j[t]);d=!0}},o(t){j=j.filter(Boolean);for(let t=0;t<j.length;t+=1)tt(j[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),y&&y.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(j,t),q&&q.d(),p=!1,f()}}}function an(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",x=!1;const y=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,n)=>{let o={};for(const t in I)(Vt(a[t])||Mt(n[t])&&I[t]!==n[t])&&(o[t]=n[t]);if(((t={})=>!Object.keys(t).length)(o))return!1;const{_id:s,id:r}=n;return e.post("/api/"+t,{...o,_id:s,id:r}).then((t=>t.data))},k=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),S=()=>{const t=y.find((t=>!Pe(t.name)));return!t||(((t="",e=0,n=document.getElementById(t))=>{n&&n.style&&(n.style.display="block",setTimeout((()=>n.style.display="none"),e))})("er-invalid",3e3),Fe(t.name),!1)},E={},I={};y.map((({name:t,type:e,value:n})=>{const s=Ve(e);let r=zt(s,$[t],a[t],n);switch(e){case"date":r=r.substr(0,10);case"masked":r=r.toString()}o(17,E[t]=r,E),I[t]=r}));const{form:j,handleSubmit:T,handleReset:q}=Ze({initialValues:E,onSubmit:async t=>{if(!p)return;if(!S())return;const{path:e,func:n}=p,s=(t=>y.reduce(((e,n)=>(e[n.name]=t[n.name],e)),{}))(t);let r={};e&&!(r=await w(e,s))||n&&!(r=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(n,s,r))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,x=!0),setTimeout((()=>{o(3,x=!1),k(n,c,s,r)}),m.text?1e3:10)):(i&&q(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,r)}});return d(t,j,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=E.Title||l.text||c)},[i,v,b,x,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},j,T,l,y,a,c,E,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,j.set(r))}]}const{document:cn}=ot;function ln(t,e,n){const o=t.slice();return o[32]=e[n].show,o[13]=e[n].title,o[14]=e[n].fields,o}function un(t,e,n){const o=t.slice();return o[0]=e[n],o[35]=e,o[36]=n,o}function dn(t){let e,n,o,s=t[7].text+"",r=t[2]?": "+t[2]:"";return{c(){e=x("p"),n=y(s),o=y(r),I(e,"class","er-error text-sm mt-2 text-red-500")},m(t,s){$(t,e,s),g(e,n),g(e,o)},p(t,e){4&e[0]&&r!==(r=t[2]?": "+t[2]:"")&&q(o,r)},d(t){t&&v(e)}}}function pn(t){let e;return{c(){e=x("p"),e.textContent=`${t[8].text}`,I(e,"class","er-success text-sm mt-2 text-green-500")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}function fn(t){let e,n,o,s;function r(e){t[18](e,t[0])}let i={options:t[0]};return void 0!==t[4][t[0].name]&&(i.value=t[4][t[0].name]),e=new Re({props:i}),F.push((()=>st(e,"value",r))),{c(){rt(e.$$.fragment),o=w()},m(t,n){it(e,t,n),$(t,o,n),s=!0},p(o,s){t=o;const r={};!n&&80&s[0]&&(n=!0,r.value=t[4][t[0].name],Y((()=>n=!1))),e.$set(r)},i(t){s||(Q(e.$$.fragment,t),s=!0)},o(t){tt(e.$$.fragment,t),s=!1},d(t){at(e,t),t&&v(o)}}}function mn(t){let e,n,o=t[14],s=[];for(let e=0;e<o.length;e+=1)s[e]=fn(un(t,o,e));const r=t=>tt(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=k()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);$(t,e,o),n=!0},p(t,n){if(80&n[0]){let i;for(o=t[14],i=0;i<o.length;i+=1){const r=un(t,o,i);s[i]?(s[i].p(r,n),Q(s[i],1)):(s[i]=fn(r),s[i].c(),Q(s[i],1),s[i].m(e.parentNode,e))}for(G(),i=o.length;i<s.length;i+=1)r(i);K()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Q(s[t]);n=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)tt(s[t]);n=!1},d(t){b(s,t),t&&v(e)}}}function hn(t){let e,n;return e=new wt({props:{title:t[13],show:t[32],$$slots:{default:[mn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};16&n[0]|64&n[1]&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function gn(t){let e,n,s,r=t[9].value+"",i=t[9].icon&&function(t){let e,n;return{c(){e=x("m-icon"),j(e,"class","mar-r-md"),j(e,"name",n=t[9].icon)},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t);return{c(){e=x("button"),i&&i.c(),n=w(),s=y(r),I(e,"ord","primary"),I(e,"class","full-width"),I(e,"type","submit")},m(t,o){$(t,e,o),i&&i.m(e,null),g(e,n),g(e,s)},p(t,e){t[9].icon&&i.p(t,e)},d(t){t&&v(e),i&&i.d()}}}function $n(t){let e,n,s,r,i,a,c,l,u,d,p,f;cn.title=e="enablerr - "+t[5];let m=t[13].text&&function(t){let e;return{c(){e=x("h2"),e.textContent=`${t[13].text}`,I(e,"class","mt-6 text-center text-2xl leading-9 font-extrabold text-gray-900")},m(t,n){$(t,e,n)},p:o,d(t){t&&v(e)}}}(t),h=t[1]&&t[7].text&&dn(t),y=t[3]&&t[8].text&&pn(t),k=t[6],j=[];for(let e=0;e<k.length;e+=1)j[e]=hn(ln(t,k,e));const T=t=>tt(j[t],1,1,(()=>{j[t]=null}));let q=t[9]&&gn(t);return{c(){n=w(),m&&m.c(),s=w(),h&&h.c(),r=w(),y&&y.c(),i=w(),a=x("p"),a.textContent=`${t[10].text}`,c=w(),l=x("form");for(let t=0;t<j.length;t+=1)j[t].c();u=w(),q&&q.c(),I(a,"id","er-invalid"),I(a,"class","er-invalid hidden text-sm mt-2 bg-red-100 text-gray-700"),I(l,"class","mt-4"),l.noValidate=!0,I(l,"enctype","multipart/form-data")},m(e,o){$(e,n,o),m&&m.m(e,o),$(e,s,o),h&&h.m(e,o),$(e,r,o),y&&y.m(e,o),$(e,i,o),$(e,a,o),$(e,c,o),$(e,l,o);for(let t=0;t<j.length;t+=1)j[t].m(l,null);g(l,u),q&&q.m(l,null),d=!0,p||(f=S(l,"submit",E(t[12])),p=!0)},p(t,n){if((!d||32&n[0])&&e!==(e="enablerr - "+t[5])&&(cn.title=e),t[13].text&&m.p(t,n),t[1]&&t[7].text?h?h.p(t,n):(h=dn(t),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null),t[3]&&t[8].text?y?y.p(t,n):(y=pn(t),y.c(),y.m(i.parentNode,i)):y&&(y.d(1),y=null),80&n[0]){let e;for(k=t[6],e=0;e<k.length;e+=1){const o=ln(t,k,e);j[e]?(j[e].p(o,n),Q(j[e],1)):(j[e]=hn(o),j[e].c(),Q(j[e],1),j[e].m(l,u))}for(G(),e=k.length;e<j.length;e+=1)T(e);K()}t[9]&&q.p(t,n)},i(t){if(!d){for(let t=0;t<k.length;t+=1)Q(j[t]);d=!0}},o(t){j=j.filter(Boolean);for(let t=0;t<j.length;t+=1)tt(j[t]);d=!1},d(t){t&&v(n),m&&m.d(t),t&&v(s),h&&h.d(t),t&&v(r),y&&y.d(t),t&&v(i),t&&v(a),t&&v(c),t&&v(l),b(j,t),q&&q.d(),p=!1,f()}}}function vn(t,n,o){let s,r,{options:i={}}=n,{input:a}=n,{head:c=""}=n;const{title:l={},groups:u=[],submit:p=!1,failure:f={},success:m={},button:h=!1,links:g=[]}=i;a=a||{};const $={};let v=!1,b="",x=!1;const y=u.reduce(((t,e)=>t.concat(e.fields)),[]),w=(t,e,n,o)=>(t&&t(e),n&&(t=>{t="/"+window.location.pathname.split("/")[1],window.history.pushState(t,null,t)})(encodeURI(n+((t="")=>t&&(Array.isArray(t)?t:[t]).reduce(((t,e,n)=>t+(n?"&":"")+e+"="+r[e]),"?"))(o)))),k={},S={};y.map((({name:t,type:e,value:n})=>{const s=Ve(e);let r=zt(s,$[t],a[t],n);o(17,k[t]=r,k),S[t]=r}));const{form:E,handleSubmit:I,handleReset:j}=Ze({initialValues:k,onSubmit:async t=>{if(!p)return;const{path:n,func:s}=p,r=(()=>{const t=new FormData,e=document.querySelector("#plugin").files;for(let n=0;n<e.length;n++)t.append(`upload_${n}`,e[n]);return t})();let i={};n&&!(i=await((t,n)=>e.post("/api/"+t,n,{headers:{"Content-Type":"multipart/form-data"}}).then((t=>t.data)))(n,r))||s&&!(i=await(async(t,e,n)=>(n.message={text:await t(e)},!!n.message.text&&(n.status=!n.message.text,n.data=!1,n)))(s,r,i))||((t,e)=>{const{action:n,url:s,query:r,reset:i}=t,{status:a=!0,data:c,message:l={}}=e;a?(o(3,x=!0),setTimeout((()=>{o(3,x=!1),w(n,c,s,r)}),m.text?1e3:10)):(i&&j(),o(1,v=!0),o(2,b=l.text),setTimeout((()=>{o(1,v=!1),o(2,b="")}),3e3))})(p,i)}});return d(t,E,(t=>o(4,r=t))),t.$$set=t=>{"options"in t&&o(0,i=t.options),"input"in t&&o(15,a=t.input),"head"in t&&o(16,c=t.head)},t.$$.update=()=>{196608&t.$$.dirty[0]&&o(5,s=k.Title||l.text||c)},[i,v,b,x,r,s,u,f,m,h,{text:"Bitte füllen Sie die Felder korrekt aus."},E,I,l,y,a,c,k,function(e,n){t.$$.not_equal(r[n.name],e)&&(r[n.name]=e,E.set(r))}]}function bn(t){let e,n,o,s;const r=t[3].default,i=p(r,t,t[2],null);return{c(){e=x("button"),i&&i.c(),I(e,"class","link-button txt-sm mar-r-sm"),e.disabled=t[1]},m(r,a){$(r,e,a),i&&i.m(e,null),n=!0,o||(s=S(e,"click",t[4]),o=!0)},p(t,[o]){i&&i.p&&(!n||4&o)&&m(i,r,t,t[2],o,null,null),(!n||2&o)&&(e.disabled=t[1])},i(t){n||(Q(i,t),n=!0)},o(t){tt(i,t),n=!1},d(t){t&&v(e),i&&i.d(t),o=!1,s()}}}function xn(t,e,n){let{$$slots:o={},$$scope:s}=e,{path:r}=e,{disabled:i}=e;return t.$$set=t=>{"path"in t&&n(0,r=t.path),"disabled"in t&&n(1,i=t.disabled),"$$scope"in t&&n(2,s=t.$$scope)},[r,i,s,o,()=>window.singleSpaNavigate(r)]}function yn(t){let e,n,o,s,r;const i=t[5].default,a=p(i,t,t[4],null);return{c(){e=x("span"),a&&a.c(),I(e,"class",n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"),I(e,"title",t[0])},m(n,i){$(n,e,i),a&&a.m(e,null),o=!0,s||(r=S(e,"click",t[2]),s=!0)},p(t,[s]){a&&a.p&&(!o||16&s)&&m(a,i,t,t[4],s,null,null),(!o||2&s&&n!==(n="pointer icon flex brd-radius-full brd-with-sm "+t[1]+" svelte-1jng2dw"))&&I(e,"class",n),(!o||1&s)&&I(e,"title",t[0])},i(t){o||(Q(a,t),o=!0)},o(t){tt(a,t),o=!1},d(t){t&&v(e),a&&a.d(t),s=!1,r()}}}function wn(t,e,n){let{$$slots:o={},$$scope:s}=e,{title:r}=e,{link:i="/"}=e,{color:a}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"link"in t&&n(3,i=t.link),"color"in t&&n(1,a=t.color),"$$scope"in t&&n(4,s=t.$$scope)},[r,a,()=>window.singleSpaNavigate(i),i,s,o]}function kn(t){let e,n,o=t[0](),s=o&&function(t){let e;const n=t[2].default,o=p(n,t,t[1],null);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||2&s)&&m(o,n,t,t[1],s,null,null)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}(t);return{c(){s&&s.c(),e=k()},m(t,o){s&&s.m(t,o),$(t,e,o),n=!0},p(t,[e]){o&&s.p(t,e)},i(t){n||(Q(s),n=!0)},o(t){tt(s),n=!1},d(t){s&&s.d(t),t&&v(e)}}}function Sn(t,e,n){let{$$slots:o={},$$scope:s}=e;const r=window.location.pathname;return t.$$set=t=>{"$$scope"in t&&n(1,s=t.$$scope)},[()=>!!u(gt)||window.singleSpaNavigate(`/?p=${r}`),s,o]}function En(t,e,n){let o;d(t,$t,(t=>n(1,o=t)));let{description:s}=e;return t.$$set=t=>{"description"in t&&n(0,s=t.description)},t.$$.update=()=>{if(3&t.$$.dirty&&s){const t=s;s.length>30&&n(0,s=s.substring(0,30)+"...");const e=window.location.pathname,r=o;r.find((t=>t.href===e))||$t.set(r.slice(Math.max(r.length-6+1,0)).concat({href:e,text:s,desc:t}))}},[s,o]}const In=Ut("single-spa:routing-event");function jn(t,{modulePath:e,update:n}){if(Xt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Pt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString(),s=e=>{const s=e.currentTarget.location.pathname,[,r,...i]=s.split("/");o===r&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return In.start(s),{destroy:()=>In.stop(s)}}const Tn=t=>({prop:2&t}),qn=t=>({prop:t[5]});function Cn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:On,then:_n,catch:Nn,value:5,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){$(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Nn(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function _n(t){let e;const n=t[3].default,o=p(n,t,t[2],qn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||6&s)&&m(o,n,t,t[2],s,Tn,qn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function On(t){return{c:o,m:o,p:o,i:o,o:o,d:o}}function Ln(t){let e,n,o,s,r,c=t[1]&&Cn(t);return{c(){e=x("div"),c&&c.c(),I(e,"class","data")},m(i,a){$(i,e,a),c&&c.m(e,null),o=!0,s||(r=[h(n=jn.call(null,e,t[0])),S(e,"data",t[4])],s=!0)},p(t,[o]){t[1]?c?(c.p(t,o),2&o&&Q(c,1)):(c=Cn(t),c.c(),Q(c,1),c.m(e,null)):c&&(G(),tt(c,1,1,(()=>{c=null})),K()),n&&a(n.update)&&1&o&&n.update.call(null,t[0])},i(t){o||(Q(c),o=!0)},o(t){tt(c),o=!1},d(t){t&&v(e),c&&c.d(),s=!1,i(r)}}}function An(t,e,n){let o,{$$slots:s={},$$scope:r}=e,{options:i}=e;return t.$$set=t=>{"options"in t&&n(0,i=t.options),"$$scope"in t&&n(2,r=t.$$scope)},[i,o,r,s,({detail:t})=>n(1,o=t.data)]}const Dn="single-spa:routing-event",Bn=Ut(Dn);function Fn(t,{modulePath:e,update:n}){if(Xt({value:n,check:Ft,text:"<update> should be a function (dataListener)"},{value:e,check:Pt,text:"<modulePath> should be a string (dataListener)"}))return;const o=e.toString(),s=e=>{const s=e.currentTarget.location.pathname,[,r,...i]=s.split("/");o===r&&t.dispatchEvent(new CustomEvent("data",{detail:{data:n(...i)}}))};return Bn.start(s),{destroy:()=>Bn.stop(s)}}const Pn=()=>window.dispatchEvent(new CustomEvent(Dn));const Vn=t=>({prop:2&t}),Mn=t=>({prop:{...t[7],refresh:Pn}});function zn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Jn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Rn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!0,pending:Gn,then:Hn,catch:Un,value:7,error:8,blocks:[,,,]};return et(n=t[1],s),{c(){e=k(),s.block.c()},m(t,n){$(t,e,n),s.block.m(t,s.anchor=n),s.mount=()=>e.parentNode,s.anchor=e,o=!0},p(e,o){t=e,s.ctx=t,2&o&&n!==(n=t[1])&&et(n,s)||nt(s,t,o)},i(t){o||(Q(s.block),o=!0)},o(t){for(let t=0;t<3;t+=1){tt(s.blocks[t])}o=!1},d(t){t&&v(e),s.block.d(t),s.token=null,s=null}}}function Yn(t){let e;return{c(){e=y("... Initializing ...")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function Jn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Yn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Un(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Oops!",$$slots:{default:[Wn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Xn(t){let e,n,o,s=t[8]+"";return{c(){e=y("... "),n=y(s),o=y(" ...")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p(t,e){2&e&&s!==(s=t[8]+"")&&q(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Wn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Xn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Hn(t){let e,n;return e=new t[2]({props:{class:"form",title:t[7].title,$$slots:{default:[Zn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.title=t[7].title),66&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Zn(t){let e;const n=t[4].default,o=p(n,t,t[6],Mn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||66&s)&&m(o,n,t,t[6],s,Vn,Mn)},i(t){e||(Q(o,t),e=!0)},o(t){tt(o,t),e=!1},d(t){o&&o.d(t)}}}function Gn(t){let e,n;return e=new t[2]({props:{constrainWidth:!0,title:"Please wait while",$$slots:{default:[Qn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function Kn(t){let e;return{c(){e=y("... Loading...")},m(t,n){$(t,e,n)},d(t){t&&v(e)}}}function Qn(t){let e,n;return e=new t[3]({props:{$$slots:{default:[Kn]},$$scope:{ctx:t}}}),{c(){rt(e.$$.fragment)},m(t,o){it(e,t,o),n=!0},p(t,n){const o={};64&n&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){n||(Q(e.$$.fragment,t),n=!0)},o(t){tt(e.$$.fragment,t),n=!1},d(t){at(e,t)}}}function to(t){let e,n,o,s,r,c,l;const u=[Rn,zn],d=[];function p(t,e){return t[1]?0:1}return n=p(t),o=d[n]=u[n](t),{c(){e=x("section"),o.c()},m(o,i){$(o,e,i),d[n].m(e,null),r=!0,c||(l=[h(s=Fn.call(null,e,t[0])),S(e,"data",t[5])],c=!0)},p(t,[r]){let i=n;n=p(t),n===i?d[n].p(t,r):(G(),tt(d[i],1,1,(()=>{d[i]=null})),K(),o=d[n],o?o.p(t,r):(o=d[n]=u[n](t),o.c()),Q(o,1),o.m(e,null)),s&&a(s.update)&&1&r&&s.update.call(null,t[0])},i(t){r||(Q(o),r=!0)},o(t){tt(o),r=!1},d(t){t&&v(e),d[n].d(),c=!1,i(l)}}}function eo(t,e,o){let{$$slots:s={},$$scope:r}=e;const{Dialog:i,Chip:a}=n;let c,{options:l}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"$$scope"in t&&o(6,r=t.$$scope)},[l,c,i,a,s,({detail:t})=>o(1,c=t.data),r]}e.interceptors.response.use((t=>203===t.status?Promise.reject(t.data.error):t),(t=>400===t.response.status?(bt(),Promise.reject(t)):t));let no=new Map;const oo=t=>(...e)=>{const n=u(vt),o=n.tenant;"invalid"===n.status&&(no=new Map,vt.set({tenant:o,status:""}));const s=[].concat(t.name,e).join("-");let r=no.get(s);if(!r)try{r=t(...e),no.set(s,r)}catch(t){throw t}return r};var so={getSchema:oo((t=>axios.get("/api/schema/"+t).then((t=>t.data)).catch((e=>{throw`schema with id ${t} not found`})))),getSchemas:oo((async()=>(await axios.get("/api/schema")).data)),getSchemaByClass:oo((async t=>(await axios.get(`/api/schemabyclass/${t}`)).data)),getEvents:oo((async()=>(await axios.get("/api/read/_event")).data)),getTask:async(t,e)=>axios.get(`/api/task/${t}:${e}?display=form`).then((t=>t.data)).catch((t=>{throw"task not found"})),getTaskList:async(t,e)=>(await axios.get(`/api/task/${t}:${e}?display=list`)).data,getTasksList:t=>axios.get(`/api/tasks/${t}?display=list`).then((t=>t.data)).catch((t=>{throw"list not found"})),getTaskById:async t=>(await axios.post("/api/read/_task",{_id:t})).data[0],getTaskqueue:t=>axios.post("/api/taskqueue",{id:t}).then((t=>t.data)).catch((t=>{throw"queue not found"})),saveData:async(t,e)=>(await axios.post(`/api/${t}`,e)).data.id,deleteTask:async t=>(await axios.delete(`/api/_task/${t}`)).data,savePlugins:async(t,e)=>(await axios.post("/api/plugin",t,e)).data,savePlugin:async(t,e)=>(await axios.post(`/api/plugin/${t}`,e)).data,deletePlugin:async t=>(await axios.delete(`/api/plugin/${t}`)).data,getAuthStatus:async t=>(await axios.post("/api/auth/status",{email:t})).data,authEnroll:async t=>(await axios.post("/api/auth/enroll",t)).data,authLogin:async(t,e)=>(await axios.post("/api/auth/login",{username:t,passcode:e})).data,authLogout:async()=>await axios.post("/api/auth/logout")};const ro=window.location.pathname;t("default",{version:"0.2.11",Storage:pt,getLoggedIn:()=>gt,getBreadcrumbs:()=>$t,getCacheValidator:()=>vt,onLogout:bt,Listener:class extends ut{constructor(t){super(),lt(this,t,An,Ln,c,{options:0})}},Request:so,FormDialog:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1ifpj2m-style")||((e=x("style")).id="svelte-1ifpj2m-style",e.textContent="section.data{position:relative;width:100%}.dialog.form{width:fit-content !important;min-width:32em !important;min-height:10em !important}@media screen and (max-width: 600px){.dialog.form{min-width:25em !important}}",g(document.head,e)),lt(this,t,eo,to,c,{options:0})}},Form:class extends ut{constructor(t){super(),lt(this,t,an,rn,c,{options:0,input:15,head:16},[-1,-1])}},FormUpload:class extends ut{constructor(t){super(),lt(this,t,vn,$n,c,{options:0,input:15,head:16},[-1,-1])}},LinkButton:class extends ut{constructor(t){super(),lt(this,t,xn,bn,c,{path:0,disabled:1})}},LinkIcon:class extends ut{constructor(t){var e;super(),document.getElementById("svelte-1jng2dw-style")||((e=x("style")).id="svelte-1jng2dw-style",e.textContent=".red.svelte-1jng2dw{background-color:var(--m-color-red-light)}.blue.svelte-1jng2dw{background-color:var(--m-color-blue-light)}.green.svelte-1jng2dw{background-color:var(--m-color-green-light)}.icon.svelte-1jng2dw{max-height:1.2em}",g(document.head,e)),lt(this,t,wn,yn,c,{title:0,link:3,color:1})}},Breadcrumb:class extends ut{constructor(t){super(),lt(this,t,En,null,c,{description:0})}},CheckLogin:class extends ut{constructor(t){super(),lt(this,t,Sn,kn,c,{})}},checkLogin:()=>{u(gt)||window.singleSpaNavigate(`/?p=${ro}`)}})}}}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enablerr-ui/form",
|
|
3
3
|
"description": "enablerr - the Next Enterprise Solution",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.11",
|
|
5
5
|
"os": [
|
|
6
6
|
"darwin",
|
|
7
7
|
"linux"
|
|
@@ -27,8 +27,5 @@
|
|
|
27
27
|
"form"
|
|
28
28
|
],
|
|
29
29
|
"author": "pier4all-jcs",
|
|
30
|
-
"license": "ISC"
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"svelte": "3.38.2"
|
|
33
|
-
}
|
|
30
|
+
"license": "ISC"
|
|
34
31
|
}
|