@enablerr-ui/form 0.2.15 → 0.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["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 N(t){return""===t?null:+t}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function q(t,e){t.value=null==e?"":e}function C(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(),C(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)&&T(o,t[0]),2&e&&C(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),q(n,t[0]),$(o,s,i),$(o,r,i),q(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&&N(n.value)!==t[0]&&q(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]&&q(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 Nt(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=N(this.value),n(0,a)},function(){w=this.value,n(4,w)}]}class Tt extends ut{constructor(t){super(),lt(this,t,Nt,jt,c,{options:14,css:1,value:0})}}function qt(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 Ct(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[qt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new Tt({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&&T(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 Tt({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),q(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]&&q(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),q(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&&q(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),q(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]]&&q(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),q(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]&&q(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),q(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]&&q(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),q(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]&&q(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),q(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&&q(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),q(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]&&q(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),q(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&q(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:Ne}=ot;function Te(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 qe(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 Ce(t){let e,n,s,r,i,a,c,l,u,d,p,f=t[2].title+"";const m=[qe,Te],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+"")&&T(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:Tt,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,Ct,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(),Ne.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(Ne.head,e)),lt(this,t,ze,Ce,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]:"")&&T(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 N=t=>tt(j[t],1,1,(()=>{j[t]=null}));let T=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(),T&&T.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),T&&T.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)N(e);K()}t[9]&&T.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),T&&T.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:N,handleReset:T}=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&&T(),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,N,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]:"")&&T(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 N=t=>tt(j[t],1,1,(()=>{j[t]=null}));let T=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(),T&&T.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),T&&T.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)N(e);K()}t[9]&&T.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),T&&T.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 Nn=t=>({prop:2&t}),Tn=t=>({prop:t[5]});function qn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:On,then:_n,catch:Cn,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 Cn(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],Tn);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,Nn,Tn)},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]&&qn(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=qn(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:4&t}),Mn=t=>({prop:t[8],refresh:Pn});function zn(t){let e,n;return e=new t[3]({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={};128&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:8,error:9,blocks:[,,,]};return et(n=t[2],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,4&o&&n!==(n=t[2])&&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[4]({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={};128&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[3]({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={};132&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[9]+"";return{c(){e=y("... "),n=y(s),o=y(" ...")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p(t,e){4&e&&s!==(s=t[9]+"")&&T(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Wn(t){let e,n;return e=new t[4]({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={};132&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[3]({props:{class:t[1],title:t[8].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.class=t[1]),4&n&&(o.title=t[8].title),132&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[5].default,o=p(n,t,t[7],Mn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||132&s)&&m(o,n,t,t[7],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[3]({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={};128&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[4]({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={};128&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[2]?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[6])],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,{className:u="form"}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"className"in t&&o(1,u=t.className),"$$scope"in t&&o(7,r=t.$$scope)},[l,u,c,i,a,s,({detail:t})=>o(2,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:t=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),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.15",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,className:1})}},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}`)}})}}}));
|
|
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 N(t){return""===t?null:+t}function T(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function q(t,e){t.value=null==e?"":e}function C(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(),C(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)&&T(o,t[0]),2&e&&C(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),q(n,t[0]),$(o,s,i),$(o,r,i),q(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&&N(n.value)!==t[0]&&q(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]&&q(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 Nt(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=N(this.value),n(0,a)},function(){w=this.value,n(4,w)}]}class Tt extends ut{constructor(t){super(),lt(this,t,Nt,jt,c,{options:14,css:1,value:0})}}function qt(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 Ct(t){let e,n,o;function s(e){t[3](e)}let r={options:t[0],css:t[2],$$slots:{head:[qt]},$$scope:{ctx:t}};return void 0!==t[1]&&(r.value=t[1]),e=new Tt({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&&T(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 Tt({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),q(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]&&q(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),q(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&&q(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),q(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]]&&q(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),q(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]&&q(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),q(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]&&q(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),q(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]&&q(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),q(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&&q(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),q(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]&&q(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),q(e,t[0]),n||(s=S(e,"input",t[4]),n=!0)},p(t,[n]){1&n&&q(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:Ne}=ot;function Te(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 qe(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 Ce(t){let e,n,s,r,i,a,c,l,u,d,p,f=t[2].title+"";const m=[qe,Te],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+"")&&T(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:Tt,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,Ct,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(),Ne.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(Ne.head,e)),lt(this,t,ze,Ce,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]:"")&&T(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 N=t=>tt(j[t],1,1,(()=>{j[t]=null}));let T=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(),T&&T.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),T&&T.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)N(e);K()}t[9]&&T.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),T&&T.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:N,handleReset:T}=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&&T(),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,N,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]:"")&&T(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 N=t=>tt(j[t],1,1,(()=>{j[t]=null}));let T=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(),T&&T.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),T&&T.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)N(e);K()}t[9]&&T.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),T&&T.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 Nn=t=>({prop:2&t}),Tn=t=>({prop:t[5]});function qn(t){let e,n,o,s={ctx:t,current:null,token:null,hasCatch:!1,pending:On,then:_n,catch:Cn,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 Cn(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],Tn);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,Nn,Tn)},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]&&qn(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=qn(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:4&t}),Mn=t=>({prop:t[8],refresh:Pn});function zn(t){let e,n;return e=new t[3]({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={};128&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:8,error:9,blocks:[,,,]};return et(n=t[2],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,4&o&&n!==(n=t[2])&&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[4]({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={};128&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[3]({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={};132&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[9]+"";return{c(){e=y("... "),n=y(s),o=y(" ...")},m(t,s){$(t,e,s),$(t,n,s),$(t,o,s)},p(t,e){4&e&&s!==(s=t[9]+"")&&T(n,s)},d(t){t&&v(e),t&&v(n),t&&v(o)}}}function Wn(t){let e,n;return e=new t[4]({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={};132&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[3]({props:{class:t[1],title:t[8].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.class=t[1]),4&n&&(o.title=t[8].title),132&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[5].default,o=p(n,t,t[7],Mn);return{c(){o&&o.c()},m(t,n){o&&o.m(t,n),e=!0},p(t,s){o&&o.p&&(!e||132&s)&&m(o,n,t,t[7],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[3]({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={};128&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[4]({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={};128&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[2]?0:1}return n=p(t),o=d[n]=u[n](t),{c(){e=x("section"),o.c(),I(e,"class","data")},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[6])],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,{className:u="form"}=e;return t.$$set=t=>{"options"in t&&o(0,l=t.options),"className"in t&&o(1,u=t.className),"$$scope"in t&&o(7,r=t.$$scope)},[l,u,c,i,a,s,({detail:t})=>o(2,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:()=>axios.get("/api/event").then((t=>t.data)).catch((t=>{throw"Events not found"})),getEvent:oo((t=>axios.get("/api/event/"+t).then((t=>t.data)).catch((e=>{throw`Event with id ${t} not found`})))),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.16",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,className:1})}},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}`)}})}}}));
|