!function(){function n(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var e,o,i,u,a=[],l=!0,c=!1;try{if(i=(r=r.call(n)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(e=i.call(r)).done)&&(a.push(e.value),a.length!==t);l=!0);}catch(f){c=!0,o=f}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(n,r)||function(n,r){if(!n)return;if("string"==typeof n)return t(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return t(n,r)}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(n,t){(null==t||t>n.length)&&(t=n.length);for(var r=0,e=new Array(t);r<t;r++)e[r]=n[r];return e}System.register(["./index-legacy-646c47fa.js"],(function(t,r){"use strict";var e,o,i,u,a,l,c,f,s,d;return{setters:[function(n){e=n.c,o=n.d,i=n.a7,u=n.X,a=n.a,l=n.n,c=n.t,f=n.p,s=n.by,d=n.k}],execute:function(){var r=n(e("form"),2),m=r[0],v=r[1],g={colon:Boolean,disabled:Boolean,readonly:Boolean,showError:Boolean,labelWidth:l,labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,submitOnEnter:c,showErrorMessage:c,errorMessageAlign:String,validateTrigger:{type:[String,Array],default:"onBlur"}},h=o({name:m,props:g,emits:["submit","failed"],setup:function(n,t){var r=t.emit,e=t.slots,o=i(s),l=o.children,c=o.linkChildren,d=function(n){return n?l.filter((function(t){return n.includes(t.name)})):l},m=function(t){return"string"==typeof t?function(n){var t=l.find((function(t){return t.name===n}));return t?new Promise((function(n,r){t.validate().then((function(t){t?r(t):n()}))})):Promise.reject()}(t):n.validateFirst?(r=t,new Promise((function(n,t){var e=[];d(r).reduce((function(n,t){return n.then((function(){if(!e.length)return t.validate().then((function(n){n&&e.push(n)}))}))}),Promise.resolve()).then((function(){e.length?t(e):n()}))}))):function(n){return new Promise((function(t,r){var e=d(n);Promise.all(e.map((function(n){return n.validate()}))).then((function(n){(n=n.filter(Boolean)).length?r(n):t()}))}))}(t);var r},g=function(n,t){l.some((function(r){return r.name===n&&(r.$el.scrollIntoView(t),!0)}))},h=function(){return l.reduce((function(n,t){return void 0!==t.name&&(n[t.name]=t.formValue.value),n}),{})},y=function(){var t=h();m().then((function(){return r("submit",t)})).catch((function(e){r("failed",{values:t,errors:e}),n.scrollToError&&e[0].name&&g(e[0].name)}))},p=function(n){f(n),y()};return c({props:n}),u({submit:y,validate:m,getValues:h,scrollToField:g,resetValidation:function(n){"string"==typeof n&&(n=[n]),d(n).forEach((function(n){n.resetValidation()}))},getValidationStatus:function(){return l.reduce((function(n,t){return n[t.name]=t.getValidationStatus(),n}),{})}}),function(){var n;return a("form",{class:v(),onSubmit:p},[null==(n=e.default)?void 0:n.call(e)])}}});t("F",d(h))}}}))}();
