123456789101112 |
- import{bb as Nn,bc as Rn,a6 as Ln,bd as Vn,be as ge,bf as ir,bg as Dn,f as ur,a as P,p as lr,t as me,d as pe,u as Oe,r as re,o as Bn,J as oe,g as Xr,h as he,_ as N,c as K,b as I,aa as Re,bh as kn,bi as Zr,bj as or,e as ne,aX as ie,I as Wn,M as Gn,ar as Un,B as Kn,F as _e,aK as Hn,w as ve,bk as Yn,bl as Xn,bm as Zn,bn as Qn,Z as zn,$ as Jn,Q as Qr,E as zr,ak as et,bo as rt,al as nt,P as se,T as Jr,S as Ye,aj as tt,X as le,D as at,j as Se,aH as it,i as ut,bp as lt,a5 as We}from"./index-4c57e493.js";import{j as ce,M as en,k as ot,l as st,m as ft,i as ct,n as rn,o as nn,h as dt,R as wr,r as Fr,p as Le,q as tn,t as sr,v as vt,w as an,x as gt,y as mt,U as xr,z as fr,A as Me,B as cr,C as ht,D as un,E as pt,_ as Ve,F as ln,G as yt,c as bt,d as wt,g as Or,f as Ft,e as xt,a as on,u as Ot}from"./useFlexGapSupport-2ff65cc2.js";function At(r){return Nn(r)||Rn(r)||Ln(r)||Vn()}function De(r,e){for(var n=-1,t=r==null?0:r.length,a=Array(t);++n<t;)a[n]=e(r[n],n,r);return a}var $t=1/0,Ar=ge?ge.prototype:void 0,$r=Ar?Ar.toString:void 0;function sn(r){if(typeof r=="string")return r;if(ce(r))return De(r,sn)+"";if(ir(r))return $r?$r.call(r):"";var e=r+"";return e=="0"&&1/r==-$t?"-0":e}function Ct(r,e,n){var t=-1,a=r.length;e<0&&(e=-e>a?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(a);++t<a;)i[t]=r[t+e];return i}function Pt(r){return function(e){return e==null?void 0:e[r]}}var Cr=1/0,Et=17976931348623157e292;function St(r){if(!r)return r===0?r:0;if(r=Dn(r),r===Cr||r===-Cr){var e=r<0?-1:1;return e*Et}return r===r?r:0}function qt(r){var e=St(r),n=e%1;return e===e?n?e-n:e:0}function Tt(r){return r==null?"":sn(r)}var jt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/;function dr(r,e){if(ce(r))return!1;var n=typeof r;return n=="number"||n=="symbol"||n=="boolean"||r==null||ir(r)?!0:It.test(r)||!jt.test(r)||e!=null&&r in Object(e)}var _t="Expected a function";function vr(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(_t);var n=function(){var t=arguments,a=e?e.apply(this,t):t[0],i=n.cache;if(i.has(a))return i.get(a);var u=r.apply(this,t);return n.cache=i.set(a,u)||i,u};return n.cache=new(vr.Cache||en),n}vr.Cache=en;var Mt=500;function Nt(r){var e=vr(r,function(t){return n.size===Mt&&n.clear(),t}),n=e.cache;return e}var Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lt=/\\(\\)?/g,Vt=Nt(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(Rt,function(n,t,a,i){e.push(a?i.replace(Lt,"$1"):t||n)}),e});const Dt=Vt;function Be(r,e){return ce(r)?r:dr(r,e)?[r]:Dt(Tt(r))}var Bt=1/0;function Ae(r){if(typeof r=="string"||ir(r))return r;var e=r+"";return e=="0"&&1/r==-Bt?"-0":e}function gr(r,e){e=Be(e,r);for(var n=0,t=e.length;r!=null&&n<t;)r=r[Ae(e[n++])];return n&&n==t?r:void 0}var kt=function(){try{var r=ot(Object,"defineProperty");return r({},"",{}),r}catch{}}();const Ne=kt;function fn(r,e,n){e=="__proto__"&&Ne?Ne(r,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[e]=n}var Wt=Object.prototype,Gt=Wt.hasOwnProperty;function cn(r,e,n){var t=r[e];(!(Gt.call(r,e)&&st(t,n))||n===void 0&&!(e in r))&&fn(r,e,n)}function Ut(r,e){return r!=null&&e in Object(r)}function Kt(r,e,n){e=Be(e,r);for(var t=-1,a=e.length,i=!1;++t<a;){var u=Ae(e[t]);if(!(i=r!=null&&n(r,u)))break;r=r[u]}return i||++t!=a?i:(a=r==null?0:r.length,!!a&&ft(a)&&ct(u,a)&&(ce(r)||rn(r)))}function Ht(r,e){return r!=null&&Kt(r,e,Ut)}var Pr=ge?ge.isConcatSpreadable:void 0;function Yt(r){return ce(r)||rn(r)||!!(Pr&&r&&r[Pr])}function dn(r,e,n,t,a){var i=-1,u=r.length;for(n||(n=Yt),a||(a=[]);++i<u;){var l=r[i];e>0&&n(l)?e>1?dn(l,e-1,n,t,a):nn(a,l):t||(a[a.length]=l)}return a}function Xt(r){var e=r==null?0:r.length;return e?dn(r,1):[]}function Zt(r,e,n){switch(n.length){case 0:return r.call(e);case 1:return r.call(e,n[0]);case 2:return r.call(e,n[0],n[1]);case 3:return r.call(e,n[0],n[1],n[2])}return r.apply(e,n)}var Er=Math.max;function vn(r,e,n){return e=Er(e===void 0?r.length-1:e,0),function(){for(var t=arguments,a=-1,i=Er(t.length-e,0),u=Array(i);++a<i;)u[a]=t[e+a];a=-1;for(var l=Array(e+1);++a<e;)l[a]=t[a];return l[e]=n(u),Zt(r,this,l)}}function Qt(r){return function(){return r}}function mr(r){return r}var zt=Ne?function(r,e){return Ne(r,"toString",{configurable:!0,enumerable:!1,value:Qt(e),writable:!0})}:mr;const Jt=zt;var ea=800,ra=16,na=Date.now;function ta(r){var e=0,n=0;return function(){var t=na(),a=ra-(t-n);if(n=t,a>0){if(++e>=ea)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var aa=ta(Jt);const gn=aa;function ia(r){return gn(vn(r,void 0,Xt),r+"")}var mn=Symbol("rowContextKey"),ua=function(e){lr(mn,e)},la=function(){return ur(mn,{gutter:P(function(){}),wrap:P(function(){}),supportFlexGap:P(function(){})})};me("top","middle","bottom","stretch");me("start","end","center","space-around","space-between");var oa=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},sa=pe({compatConfig:{MODE:3},name:"ARow",props:oa(),setup:function(e,n){var t=n.slots,a=Oe("row",e),i=a.prefixCls,u=a.direction,l,s=re({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),w=dt();Bn(function(){l=wr.subscribe(function(d){var p=e.gutter||0;(!Array.isArray(p)&&oe(p)==="object"||Array.isArray(p)&&(oe(p[0])==="object"||oe(p[1])==="object"))&&(s.value=d)})}),Xr(function(){wr.unsubscribe(l)});var v=P(function(){var d=[0,0],p=e.gutter,o=p===void 0?0:p,y=Array.isArray(o)?o:[o,0];return y.forEach(function(f,$){if(oe(f)==="object")for(var m=0;m<Fr.length;m++){var c=Fr[m];if(s.value[c]&&f[c]!==void 0){d[$]=f[c];break}}else d[$]=f||0}),d});ua({gutter:v,supportFlexGap:w,wrap:P(function(){return e.wrap})});var h=P(function(){var d;return he(i.value,(d={},N(d,"".concat(i.value,"-no-wrap"),e.wrap===!1),N(d,"".concat(i.value,"-").concat(e.justify),e.justify),N(d,"".concat(i.value,"-").concat(e.align),e.align),N(d,"".concat(i.value,"-rtl"),u.value==="rtl"),d))}),x=P(function(){var d=v.value,p={},o=d[0]>0?"".concat(d[0]/-2,"px"):void 0,y=d[1]>0?"".concat(d[1]/-2,"px"):void 0;return o&&(p.marginLeft=o,p.marginRight=o),w.value?p.rowGap="".concat(d[1],"px"):y&&(p.marginTop=y,p.marginBottom=y),p});return function(){var d;return K("div",{class:h.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});const fa=sa;function ca(r){return typeof r=="number"?"".concat(r," ").concat(r," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(r)?"0 0 ".concat(r):r}var da=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const hn=pe({compatConfig:{MODE:3},name:"ACol",props:da(),setup:function(e,n){var t=n.slots,a=la(),i=a.gutter,u=a.supportFlexGap,l=a.wrap,s=Oe("col",e),w=s.prefixCls,v=s.direction,h=P(function(){var d,p=e.span,o=e.order,y=e.offset,f=e.push,$=e.pull,m=w.value,c={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(b){var F,O={},S=e[b];typeof S=="number"?O.span=S:oe(S)==="object"&&(O=S||{}),c=I(I({},c),{},(F={},N(F,"".concat(m,"-").concat(b,"-").concat(O.span),O.span!==void 0),N(F,"".concat(m,"-").concat(b,"-order-").concat(O.order),O.order||O.order===0),N(F,"".concat(m,"-").concat(b,"-offset-").concat(O.offset),O.offset||O.offset===0),N(F,"".concat(m,"-").concat(b,"-push-").concat(O.push),O.push||O.push===0),N(F,"".concat(m,"-").concat(b,"-pull-").concat(O.pull),O.pull||O.pull===0),N(F,"".concat(m,"-rtl"),v.value==="rtl"),F))}),he(m,(d={},N(d,"".concat(m,"-").concat(p),p!==void 0),N(d,"".concat(m,"-order-").concat(o),o),N(d,"".concat(m,"-offset-").concat(y),y),N(d,"".concat(m,"-push-").concat(f),f),N(d,"".concat(m,"-pull-").concat($),$),d),c)}),x=P(function(){var d=e.flex,p=i.value,o={};if(p&&p[0]>0){var y="".concat(p[0]/2,"px");o.paddingLeft=y,o.paddingRight=y}if(p&&p[1]>0&&!u.value){var f="".concat(p[1]/2,"px");o.paddingTop=f,o.paddingBottom=f}return d&&(o.flex=ca(d),l.value===!1&&!o.minWidth&&(o.minWidth=0)),o});return function(){var d;return K("div",{class:h.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});function va(r,e){for(var n=-1,t=r==null?0:r.length;++n<t&&e(r[n],n,r)!==!1;);return r}function $e(r,e,n,t){var a=!n;n||(n={});for(var i=-1,u=e.length;++i<u;){var l=e[i],s=t?t(n[l],r[l],l,n,r):void 0;s===void 0&&(s=r[l]),a?fn(n,l,s):cn(n,l,s)}return n}function ga(r,e){return r&&$e(e,Le(e),r)}function ma(r){var e=[];if(r!=null)for(var n in Object(r))e.push(n);return e}var ha=Object.prototype,pa=ha.hasOwnProperty;function ya(r){if(!Re(r))return ma(r);var e=tn(r),n=[];for(var t in r)t=="constructor"&&(e||!pa.call(r,t))||n.push(t);return n}function hr(r){return sr(r)?vt(r,!0):ya(r)}function ba(r,e){return r&&$e(e,hr(e),r)}var pn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sr=pn&&typeof module=="object"&&module&&!module.nodeType&&module,wa=Sr&&Sr.exports===pn,qr=wa?kn.Buffer:void 0,Tr=qr?qr.allocUnsafe:void 0;function Fa(r,e){if(e)return r.slice();var n=r.length,t=Tr?Tr(n):new r.constructor(n);return r.copy(t),t}function xa(r,e){var n=-1,t=r.length;for(e||(e=Array(t));++n<t;)e[n]=r[n];return e}function Oa(r,e){return $e(r,an(r),e)}var Aa=Object.getOwnPropertySymbols,$a=Aa?function(r){for(var e=[];r;)nn(e,an(r)),r=Zr(r);return e}:gt;const yn=$a;function Ca(r,e){return $e(r,yn(r),e)}function bn(r){return mt(r,hr,yn)}var Pa=Object.prototype,Ea=Pa.hasOwnProperty;function Sa(r){var e=r.length,n=new r.constructor(e);return e&&typeof r[0]=="string"&&Ea.call(r,"index")&&(n.index=r.index,n.input=r.input),n}function pr(r){var e=new r.constructor(r.byteLength);return new xr(e).set(new xr(r)),e}function qa(r,e){var n=e?pr(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.byteLength)}var Ta=/\w*$/;function ja(r){var e=new r.constructor(r.source,Ta.exec(r));return e.lastIndex=r.lastIndex,e}var jr=ge?ge.prototype:void 0,Ir=jr?jr.valueOf:void 0;function Ia(r){return Ir?Object(Ir.call(r)):{}}function _a(r,e){var n=e?pr(r.buffer):r.buffer;return new r.constructor(n,r.byteOffset,r.length)}var Ma="[object Boolean]",Na="[object Date]",Ra="[object Map]",La="[object Number]",Va="[object RegExp]",Da="[object Set]",Ba="[object String]",ka="[object Symbol]",Wa="[object ArrayBuffer]",Ga="[object DataView]",Ua="[object Float32Array]",Ka="[object Float64Array]",Ha="[object Int8Array]",Ya="[object Int16Array]",Xa="[object Int32Array]",Za="[object Uint8Array]",Qa="[object Uint8ClampedArray]",za="[object Uint16Array]",Ja="[object Uint32Array]";function ei(r,e,n){var t=r.constructor;switch(e){case Wa:return pr(r);case Ma:case Na:return new t(+r);case Ga:return qa(r,n);case Ua:case Ka:case Ha:case Ya:case Xa:case Za:case Qa:case za:case Ja:return _a(r,n);case Ra:return new t;case La:case Ba:return new t(r);case Va:return ja(r);case Da:return new t;case ka:return Ia(r)}}var _r=Object.create,ri=function(){function r(){}return function(e){if(!Re(e))return{};if(_r)return _r(e);r.prototype=e;var n=new r;return r.prototype=void 0,n}}();const ni=ri;function ti(r){return typeof r.constructor=="function"&&!tn(r)?ni(Zr(r)):{}}var ai="[object Map]";function ii(r){return or(r)&&fr(r)==ai}var Mr=Me&&Me.isMap,ui=Mr?cr(Mr):ii;const li=ui;var oi="[object Set]";function si(r){return or(r)&&fr(r)==oi}var Nr=Me&&Me.isSet,fi=Nr?cr(Nr):si;const ci=fi;var di=1,vi=2,gi=4,wn="[object Arguments]",mi="[object Array]",hi="[object Boolean]",pi="[object Date]",yi="[object Error]",Fn="[object Function]",bi="[object GeneratorFunction]",wi="[object Map]",Fi="[object Number]",xn="[object Object]",xi="[object RegExp]",Oi="[object Set]",Ai="[object String]",$i="[object Symbol]",Ci="[object WeakMap]",Pi="[object ArrayBuffer]",Ei="[object DataView]",Si="[object Float32Array]",qi="[object Float64Array]",Ti="[object Int8Array]",ji="[object Int16Array]",Ii="[object Int32Array]",_i="[object Uint8Array]",Mi="[object Uint8ClampedArray]",Ni="[object Uint16Array]",Ri="[object Uint32Array]",V={};V[wn]=V[mi]=V[Pi]=V[Ei]=V[hi]=V[pi]=V[Si]=V[qi]=V[Ti]=V[ji]=V[Ii]=V[wi]=V[Fi]=V[xn]=V[xi]=V[Oi]=V[Ai]=V[$i]=V[_i]=V[Mi]=V[Ni]=V[Ri]=!0;V[yi]=V[Fn]=V[Ci]=!1;function we(r,e,n,t,a,i){var u,l=e&di,s=e&vi,w=e&gi;if(n&&(u=a?n(r,t,a,i):n(r)),u!==void 0)return u;if(!Re(r))return r;var v=ce(r);if(v){if(u=Sa(r),!l)return xa(r,u)}else{var h=fr(r),x=h==Fn||h==bi;if(ht(r))return Fa(r,l);if(h==xn||h==wn||x&&!a){if(u=s||x?{}:ti(r),!l)return s?Ca(r,ba(u,r)):Oa(r,ga(u,r))}else{if(!V[h])return a?r:{};u=ei(r,h,l)}}i||(i=new un);var d=i.get(r);if(d)return d;i.set(r,u),ci(r)?r.forEach(function(y){u.add(we(y,e,n,y,r,i))}):li(r)&&r.forEach(function(y,f){u.set(f,we(y,e,n,f,r,i))});var p=w?s?bn:pt:s?hr:Le,o=v?void 0:p(r);return va(o||r,function(y,f){o&&(f=y,y=r[f]),cn(u,f,we(y,e,n,f,r,i))}),u}var Li=1,Vi=4;function je(r){return we(r,Li|Vi)}function fe(){return fe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},fe.apply(this,arguments)}function Di(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,xe(r,e)}function Xe(r){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xe(r)}function xe(r,e){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,a){return t.__proto__=a,t},xe(r,e)}function Bi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ie(r,e,n){return Bi()?Ie=Reflect.construct.bind():Ie=function(a,i,u){var l=[null];l.push.apply(l,i);var s=Function.bind.apply(a,l),w=new s;return u&&xe(w,u.prototype),w},Ie.apply(null,arguments)}function ki(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function Ze(r){var e=typeof Map=="function"?new Map:void 0;return Ze=function(t){if(t===null||!ki(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return Ie(t,arguments,Xe(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),xe(a,t)},Ze(r)}var Wi=/%[sdj%]/g,Gi=function(){};typeof process<"u"&&process.env;function Qe(r){if(!r||!r.length)return null;var e={};return r.forEach(function(n){var t=n.field;e[t]=e[t]||[],e[t].push(n)}),e}function J(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];var a=0,i=n.length;if(typeof r=="function")return r.apply(null,n);if(typeof r=="string"){var u=r.replace(Wi,function(l){if(l==="%%")return"%";if(a>=i)return l;switch(l){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return l}});return u}return r}function Ui(r){return r==="string"||r==="url"||r==="hex"||r==="email"||r==="date"||r==="pattern"}function X(r,e){return!!(r==null||e==="array"&&Array.isArray(r)&&!r.length||Ui(e)&&typeof r=="string"&&!r)}function Ki(r,e,n){var t=[],a=0,i=r.length;function u(l){t.push.apply(t,l||[]),a++,a===i&&n(t)}r.forEach(function(l){e(l,u)})}function Rr(r,e,n){var t=0,a=r.length;function i(u){if(u&&u.length){n(u);return}var l=t;t=t+1,l<a?e(r[l],i):n([])}i([])}function Hi(r){var e=[];return Object.keys(r).forEach(function(n){e.push.apply(e,r[n]||[])}),e}var Lr=function(r){Di(e,r);function e(n,t){var a;return a=r.call(this,"Async Validation Error")||this,a.errors=n,a.fields=t,a}return e}(Ze(Error));function Yi(r,e,n,t,a){if(e.first){var i=new Promise(function(x,d){var p=function(f){return t(f),f.length?d(new Lr(f,Qe(f))):x(a)},o=Hi(r);Rr(o,n,p)});return i.catch(function(x){return x}),i}var u=e.firstFields===!0?Object.keys(r):e.firstFields||[],l=Object.keys(r),s=l.length,w=0,v=[],h=new Promise(function(x,d){var p=function(y){if(v.push.apply(v,y),w++,w===s)return t(v),v.length?d(new Lr(v,Qe(v))):x(a)};l.length||(t(v),x(a)),l.forEach(function(o){var y=r[o];u.indexOf(o)!==-1?Rr(y,n,p):Ki(y,n,p)})});return h.catch(function(x){return x}),h}function Xi(r){return!!(r&&r.message!==void 0)}function Zi(r,e){for(var n=r,t=0;t<e.length;t++){if(n==null)return n;n=n[e[t]]}return n}function Vr(r,e){return function(n){var t;return r.fullFields?t=Zi(e,r.fullFields):t=e[n.field||r.fullField],Xi(n)?(n.field=n.field||r.fullField,n.fieldValue=t,n):{message:typeof n=="function"?n():n,fieldValue:t,field:n.field||r.fullField}}}function Dr(r,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var t=e[n];typeof t=="object"&&typeof r[n]=="object"?r[n]=fe({},r[n],t):r[n]=t}}return r}var On=function(e,n,t,a,i,u){e.required&&(!t.hasOwnProperty(e.field)||X(n,u||e.type))&&a.push(J(i.messages.required,e.fullField))},Qi=function(e,n,t,a,i){(/^\s+$/.test(n)||n==="")&&a.push(J(i.messages.whitespace,e.fullField))},qe,zi=function(){if(qe)return qe;var r="[a-fA-F\\d:]",e=function(c){return c&&c.includeBoundaries?"(?:(?<=\\s|^)(?="+r+")|(?<="+r+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",t="[a-fA-F\\d]{1,4}",a=(`
- (?:
- (?:`+t+":){7}(?:"+t+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
- (?:`+t+":){6}(?:"+n+"|:"+t+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
- (?:`+t+":){5}(?::"+n+"|(?::"+t+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
- (?:`+t+":){4}(?:(?::"+t+"){0,1}:"+n+"|(?::"+t+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
- (?:`+t+":){3}(?:(?::"+t+"){0,2}:"+n+"|(?::"+t+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
- (?:`+t+":){2}(?:(?::"+t+"){0,3}:"+n+"|(?::"+t+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
- (?:`+t+":){1}(?:(?::"+t+"){0,4}:"+n+"|(?::"+t+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
- (?::(?:(?::`+t+"){0,5}:"+n+"|(?::"+t+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
- )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
- `).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+a+"$)"),u=new RegExp("^"+n+"$"),l=new RegExp("^"+a+"$"),s=function(c){return c&&c.exact?i:new RegExp("(?:"+e(c)+n+e(c)+")|(?:"+e(c)+a+e(c)+")","g")};s.v4=function(m){return m&&m.exact?u:new RegExp(""+e(m)+n+e(m),"g")},s.v6=function(m){return m&&m.exact?l:new RegExp(""+e(m)+a+e(m),"g")};var w="(?:(?:[a-z]+:)?//)",v="(?:\\S+(?::\\S*)?@)?",h=s.v4().source,x=s.v6().source,d="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",o="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",f='(?:[/?#][^\\s"]*)?',$="(?:"+w+"|www\\.)"+v+"(?:localhost|"+h+"|"+x+"|"+d+p+o+")"+y+f;return qe=new RegExp("(?:^"+$+"$)","i"),qe},Br={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},be={integer:function(e){return be.number(e)&&parseInt(e,10)===e},float:function(e){return be.number(e)&&!be.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!be.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Br.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(zi())},hex:function(e){return typeof e=="string"&&!!e.match(Br.hex)}},Ji=function(e,n,t,a,i){if(e.required&&n===void 0){On(e,n,t,a,i);return}var u=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=e.type;u.indexOf(l)>-1?be[l](n)||a.push(J(i.messages.types[l],e.fullField,e.type)):l&&typeof n!==e.type&&a.push(J(i.messages.types[l],e.fullField,e.type))},eu=function(e,n,t,a,i){var u=typeof e.len=="number",l=typeof e.min=="number",s=typeof e.max=="number",w=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v=n,h=null,x=typeof n=="number",d=typeof n=="string",p=Array.isArray(n);if(x?h="number":d?h="string":p&&(h="array"),!h)return!1;p&&(v=n.length),d&&(v=n.replace(w,"_").length),u?v!==e.len&&a.push(J(i.messages[h].len,e.fullField,e.len)):l&&!s&&v<e.min?a.push(J(i.messages[h].min,e.fullField,e.min)):s&&!l&&v>e.max?a.push(J(i.messages[h].max,e.fullField,e.max)):l&&s&&(v<e.min||v>e.max)&&a.push(J(i.messages[h].range,e.fullField,e.min,e.max))},de="enum",ru=function(e,n,t,a,i){e[de]=Array.isArray(e[de])?e[de]:[],e[de].indexOf(n)===-1&&a.push(J(i.messages[de],e.fullField,e[de].join(", ")))},nu=function(e,n,t,a,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||a.push(J(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var u=new RegExp(e.pattern);u.test(n)||a.push(J(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},_={required:On,whitespace:Qi,type:Ji,range:eu,enum:ru,pattern:nu},tu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n,"string")&&!e.required)return t();_.required(e,n,a,u,i,"string"),X(n,"string")||(_.type(e,n,a,u,i),_.range(e,n,a,u,i),_.pattern(e,n,a,u,i),e.whitespace===!0&&_.whitespace(e,n,a,u,i))}t(u)},au=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&_.type(e,n,a,u,i)}t(u)},iu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(n===""&&(n=void 0),X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&(_.type(e,n,a,u,i),_.range(e,n,a,u,i))}t(u)},uu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&_.type(e,n,a,u,i)}t(u)},lu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),X(n)||_.type(e,n,a,u,i)}t(u)},ou=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&(_.type(e,n,a,u,i),_.range(e,n,a,u,i))}t(u)},su=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&(_.type(e,n,a,u,i),_.range(e,n,a,u,i))}t(u)},fu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(n==null&&!e.required)return t();_.required(e,n,a,u,i,"array"),n!=null&&(_.type(e,n,a,u,i),_.range(e,n,a,u,i))}t(u)},cu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&_.type(e,n,a,u,i)}t(u)},du="enum",vu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i),n!==void 0&&_[du](e,n,a,u,i)}t(u)},gu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n,"string")&&!e.required)return t();_.required(e,n,a,u,i),X(n,"string")||_.pattern(e,n,a,u,i)}t(u)},mu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n,"date")&&!e.required)return t();if(_.required(e,n,a,u,i),!X(n,"date")){var s;n instanceof Date?s=n:s=new Date(n),_.type(e,s,a,u,i),s&&_.range(e,s.getTime(),a,u,i)}}t(u)},hu=function(e,n,t,a,i){var u=[],l=Array.isArray(n)?"array":typeof n;_.required(e,n,a,u,i,l),t(u)},Ge=function(e,n,t,a,i){var u=e.type,l=[],s=e.required||!e.required&&a.hasOwnProperty(e.field);if(s){if(X(n,u)&&!e.required)return t();_.required(e,n,a,l,i,u),X(n,u)||_.type(e,n,a,l,i)}t(l)},pu=function(e,n,t,a,i){var u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(X(n)&&!e.required)return t();_.required(e,n,a,u,i)}t(u)},Fe={string:tu,method:au,number:iu,boolean:uu,regexp:lu,integer:ou,float:su,array:fu,object:cu,enum:vu,pattern:gu,date:mu,url:Ge,hex:Ge,email:Ge,required:hu,any:pu};function ze(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Je=ze(),Ce=function(){function r(n){this.rules=null,this._messages=Je,this.define(n)}var e=r.prototype;return e.define=function(t){var a=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(i){var u=t[i];a.rules[i]=Array.isArray(u)?u:[u]})},e.messages=function(t){return t&&(this._messages=Dr(ze(),t)),this._messages},e.validate=function(t,a,i){var u=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var l=t,s=a,w=i;if(typeof s=="function"&&(w=s,s={}),!this.rules||Object.keys(this.rules).length===0)return w&&w(null,l),Promise.resolve(l);function v(o){var y=[],f={};function $(c){if(Array.isArray(c)){var b;y=(b=y).concat.apply(b,c)}else y.push(c)}for(var m=0;m<o.length;m++)$(o[m]);y.length?(f=Qe(y),w(y,f)):w(null,l)}if(s.messages){var h=this.messages();h===Je&&(h=ze()),Dr(h,s.messages),s.messages=h}else s.messages=this.messages();var x={},d=s.keys||Object.keys(this.rules);d.forEach(function(o){var y=u.rules[o],f=l[o];y.forEach(function($){var m=$;typeof m.transform=="function"&&(l===t&&(l=fe({},l)),f=l[o]=m.transform(f)),typeof m=="function"?m={validator:m}:m=fe({},m),m.validator=u.getValidationMethod(m),m.validator&&(m.field=o,m.fullField=m.fullField||o,m.type=u.getType(m),x[o]=x[o]||[],x[o].push({rule:m,value:f,source:l,field:o}))})});var p={};return Yi(x,s,function(o,y){var f=o.rule,$=(f.type==="object"||f.type==="array")&&(typeof f.fields=="object"||typeof f.defaultField=="object");$=$&&(f.required||!f.required&&o.value),f.field=o.field;function m(F,O){return fe({},O,{fullField:f.fullField+"."+F,fullFields:f.fullFields?[].concat(f.fullFields,[F]):[F]})}function c(F){F===void 0&&(F=[]);var O=Array.isArray(F)?F:[F];!s.suppressWarning&&O.length&&r.warning("async-validator:",O),O.length&&f.message!==void 0&&(O=[].concat(f.message));var S=O.map(Vr(f,l));if(s.first&&S.length)return p[f.field]=1,y(S);if(!$)y(S);else{if(f.required&&!o.value)return f.message!==void 0?S=[].concat(f.message).map(Vr(f,l)):s.error&&(S=[s.error(f,J(s.messages.required,f.field))]),y(S);var C={};f.defaultField&&Object.keys(o.value).map(function(M){C[M]=f.defaultField}),C=fe({},C,o.rule.fields);var R={};Object.keys(C).forEach(function(M){var T=C[M],B=Array.isArray(T)?T:[T];R[M]=B.map(m.bind(null,M))});var D=new r(R);D.messages(s.messages),o.rule.options&&(o.rule.options.messages=s.messages,o.rule.options.error=s.error),D.validate(o.value,o.rule.options||s,function(M){var T=[];S&&S.length&&T.push.apply(T,S),M&&M.length&&T.push.apply(T,M),y(T.length?T:null)})}}var b;if(f.asyncValidator)b=f.asyncValidator(f,o.value,c,o.source,s);else if(f.validator){try{b=f.validator(f,o.value,c,o.source,s)}catch(F){console.error==null||console.error(F),s.suppressValidatorError||setTimeout(function(){throw F},0),c(F.message)}b===!0?c():b===!1?c(typeof f.message=="function"?f.message(f.fullField||f.field):f.message||(f.fullField||f.field)+" fails"):b instanceof Array?c(b):b instanceof Error&&c(b.message)}b&&b.then&&b.then(function(){return c()},function(F){return c(F)})},function(o){v(o)},l)},e.getType=function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Fe.hasOwnProperty(t.type))throw new Error(J("Unknown rule type %s",t.type));return t.type||"string"},e.getValidationMethod=function(t){if(typeof t.validator=="function")return t.validator;var a=Object.keys(t),i=a.indexOf("message");return i!==-1&&a.splice(i,1),a.length===1&&a[0]==="required"?Fe.required:Fe[this.getType(t)]||void 0},r}();Ce.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Fe[e]=n};Ce.warning=Gi;Ce.messages=Je;Ce.validators=Fe;function ae(r){return r==null?[]:Array.isArray(r)?r:[r]}function An(r,e){for(var n=r,t=0;t<e.length;t+=1){if(n==null)return;n=n[e[t]]}return n}function $n(r,e,n,t){if(!e.length)return n;var a=At(e),i=a[0],u=a.slice(1),l;return!r&&typeof i=="number"?l=[]:Array.isArray(r)?l=ne(r):l=I({},r),t&&n===void 0&&u.length===1?delete l[i][u[0]]:l[i]=$n(l[i],u,n,t),l}function yu(r,e,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&t&&n===void 0&&!An(r,e.slice(0,-1))?r:$n(r,e,n,t)}function er(r){return ae(r)}function bu(r,e){var n=An(r,e);return n}function wu(r,e,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=yu(r,e,n,t);return a}function Fu(r,e){return r&&r.some(function(n){return Ou(n,e)})}function kr(r){return oe(r)==="object"&&r!==null&&Object.getPrototypeOf(r)===Object.prototype}function Cn(r,e){var n=Array.isArray(r)?ne(r):I({},r);return e&&Object.keys(e).forEach(function(t){var a=n[t],i=e[t],u=kr(a)&&kr(i);n[t]=u?Cn(a,i||{}):i}),n}function xu(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];return n.reduce(function(a,i){return Cn(a,i)},r)}function Wr(r,e){var n={};return e.forEach(function(t){var a=bu(r,t);n=wu(n,t,a)}),n}function Ou(r,e){return!r||!e||r.length!==e.length?!1:r.every(function(n,t){return e[t]===n})}var z="'${name}' is not a valid ${type}",ke={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:z,method:z,array:z,object:z,number:z,date:z,boolean:z,integer:z,float:z,regexp:z,email:z,url:z,hex:z},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Au=Ce;function $u(r,e){return r.replace(/\$\{\w+\}/g,function(n){var t=n.slice(2,-1);return e[t]})}function rr(r,e,n,t,a){return nr.apply(this,arguments)}function nr(){return nr=Ve(ie.mark(function r(e,n,t,a,i){var u,l,s,w,v,h,x,d;return ie.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return u=I({},t),delete u.ruleIndex,delete u.trigger,l=null,u&&u.type==="array"&&u.defaultField&&(l=u.defaultField,delete u.defaultField),s=new Au(N({},e,[u])),w=xu({},ke,a.validateMessages),s.messages(w),v=[],o.prev=9,o.next=12,Promise.resolve(s.validate(N({},e,n),I({},a)));case 12:o.next=17;break;case 14:o.prev=14,o.t0=o.catch(9),o.t0.errors?v=o.t0.errors.map(function(y,f){var $=y.message;return Wn($)?Gn($,{key:"error_".concat(f)}):$}):(console.error(o.t0),v=[w.default()]);case 17:if(!(!v.length&&l)){o.next=22;break}return o.next=20,Promise.all(n.map(function(y,f){return rr("".concat(e,".").concat(f),y,l,a,i)}));case 20:return h=o.sent,o.abrupt("return",h.reduce(function(y,f){return[].concat(ne(y),ne(f))},[]));case 22:return x=I(I({},t),{},{name:e,enum:(t.enum||[]).join(", ")},i),d=v.map(function(y){return typeof y=="string"?$u(y,x):y}),o.abrupt("return",d);case 25:case"end":return o.stop()}},r,null,[[9,14]])})),nr.apply(this,arguments)}function Pn(r,e,n,t,a,i){var u=r.join("."),l=n.map(function(v,h){var x=v.validator,d=I(I({},v),{},{ruleIndex:h});return x&&(d.validator=function(p,o,y){var f=!1,$=function(){for(var b=arguments.length,F=new Array(b),O=0;O<b;O++)F[O]=arguments[O];Promise.resolve().then(function(){f||y.apply(void 0,F)})},m=x(p,o,$);f=m&&typeof m.then=="function"&&typeof m.catch=="function",f&&m.then(function(){y()}).catch(function(c){y(c||" ")})}),d}).sort(function(v,h){var x=v.warningOnly,d=v.ruleIndex,p=h.warningOnly,o=h.ruleIndex;return!!x==!!p?d-o:x?1:-1}),s;if(a===!0)s=new Promise(function(){var v=Ve(ie.mark(function h(x,d){var p,o,y;return ie.wrap(function($){for(;;)switch($.prev=$.next){case 0:p=0;case 1:if(!(p<l.length)){$.next=12;break}return o=l[p],$.next=5,rr(u,e,o,t,i);case 5:if(y=$.sent,!y.length){$.next=9;break}return d([{errors:y,rule:o}]),$.abrupt("return");case 9:p+=1,$.next=1;break;case 12:x([]);case 13:case"end":return $.stop()}},h)}));return function(h,x){return v.apply(this,arguments)}}());else{var w=l.map(function(v){return rr(u,e,v,t,i).then(function(h){return{errors:h,rule:v}})});s=(a?Pu(w):Cu(w)).then(function(v){return Promise.reject(v)})}return s.catch(function(v){return v}),s}function Cu(r){return tr.apply(this,arguments)}function tr(){return tr=Ve(ie.mark(function r(e){return ie.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e).then(function(a){var i,u=(i=[]).concat.apply(i,ne(a));return u}));case 1:case"end":return t.stop()}},r)})),tr.apply(this,arguments)}function Pu(r){return ar.apply(this,arguments)}function ar(){return ar=Ve(ie.mark(function r(e){var n;return ie.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=0,a.abrupt("return",new Promise(function(i){e.forEach(function(u){u.then(function(l){l.errors.length&&i([l]),n+=1,n===e.length&&i([])})})}));case 2:case"end":return a.stop()}},r)})),ar.apply(this,arguments)}var Eu=1,Su=2;function qu(r,e,n,t){var a=n.length,i=a,u=!t;if(r==null)return!i;for(r=Object(r);a--;){var l=n[a];if(u&&l[2]?l[1]!==r[l[0]]:!(l[0]in r))return!1}for(;++a<i;){l=n[a];var s=l[0],w=r[s],v=l[1];if(u&&l[2]){if(w===void 0&&!(s in r))return!1}else{var h=new un;if(t)var x=t(w,v,s,r,e,h);if(!(x===void 0?ln(v,w,Eu|Su,t,h):x))return!1}}return!0}function En(r){return r===r&&!Re(r)}function Tu(r){for(var e=Le(r),n=e.length;n--;){var t=e[n],a=r[t];e[n]=[t,a,En(a)]}return e}function Sn(r,e){return function(n){return n==null?!1:n[r]===e&&(e!==void 0||r in Object(n))}}function ju(r){var e=Tu(r);return e.length==1&&e[0][2]?Sn(e[0][0],e[0][1]):function(n){return n===r||qu(n,r,e)}}function Iu(r,e,n){var t=r==null?void 0:gr(r,e);return t===void 0?n:t}var _u=1,Mu=2;function Nu(r,e){return dr(r)&&En(e)?Sn(Ae(r),e):function(n){var t=Iu(n,r);return t===void 0&&t===e?Ht(n,r):ln(e,t,_u|Mu)}}function Ru(r){return function(e){return gr(e,r)}}function Lu(r){return dr(r)?Pt(Ae(r)):Ru(r)}function qn(r){return typeof r=="function"?r:r==null?mr:typeof r=="object"?ce(r)?Nu(r[0],r[1]):ju(r):Lu(r)}function Vu(r){return function(e,n,t){var a=Object(e);if(!sr(e)){var i=qn(n);e=Le(e),n=function(l){return i(a[l],l,a)}}var u=r(e,n,t);return u>-1?a[i?e[u]:u]:void 0}}var Du=Math.max;function Bu(r,e,n){var t=r==null?0:r.length;if(!t)return-1;var a=n==null?0:qt(n);return a<0&&(a=Du(t+a,0)),yt(r,qn(e),a)}var ku=Vu(Bu);const Wu=ku;var Tn=Symbol("formContextKey"),jn=function(e){lr(Tn,e)},yr=function(){return ur(Tn,{name:P(function(){}),labelAlign:P(function(){return"right"}),vertical:P(function(){return!1}),addField:function(n,t){},removeField:function(n){},model:P(function(){}),rules:P(function(){}),colon:P(function(){}),labelWrap:P(function(){}),labelCol:P(function(){}),requiredMark:P(function(){return!1}),validateTrigger:P(function(){}),onValidate:function(){},validateMessages:P(function(){return ke})})},In=Symbol("formItemPrefixContextKey"),Gu=function(e){lr(In,e)},Uu=function(){return ur(In,{prefixCls:P(function(){return""})})},br=function(e,n){var t,a,i,u,l=n.slots,s=n.emit,w=n.attrs,v=I(I({},e),w),h=v.prefixCls,x=v.htmlFor,d=v.labelCol,p=v.labelAlign,o=v.colon,y=v.required,f=v.requiredMark,$=Un("Form"),m=Kn($,1),c=m[0],b=(t=e.label)!==null&&t!==void 0?t:(a=l.label)===null||a===void 0?void 0:a.call(l);if(!b)return null;var F=yr(),O=F.vertical,S=F.labelAlign,C=F.labelCol,R=F.labelWrap,D=F.colon,M=d||(C==null?void 0:C.value)||{},T=p||(S==null?void 0:S.value),B="".concat(h,"-item-label"),G=he(B,T==="left"&&"".concat(B,"-left"),M.class,N({},"".concat(B,"-wrap"),!!R.value)),k=b,E=o===!0||(D==null?void 0:D.value)!==!1&&o!==!1,q=E&&!O.value;if(q&&typeof b=="string"&&b.trim()!==""&&(k=b.replace(/[:|:]\s*$/,"")),k=K(_e,null,[k,(i=l.tooltip)===null||i===void 0?void 0:i.call(l,{class:"".concat(h,"-item-tooltip")})]),f==="optional"&&!y){var g,A;k=K(_e,null,[k,K("span",{class:"".concat(h,"-item-optional")},[((g=c.value)===null||g===void 0?void 0:g.optional)||((A=Hn.Form)===null||A===void 0?void 0:A.optional)])])}var j=he((u={},N(u,"".concat(h,"-item-required"),y),N(u,"".concat(h,"-item-required-mark-optional"),f==="optional"),N(u,"".concat(h,"-item-no-colon"),!E),u));return K(hn,I(I({},M),{},{class:G}),{default:function(){return[K("label",{for:x,class:j,title:typeof b=="string"?b:"",onClick:function(Z){return s("click",Z)}},[k])]}})};br.displayName="FormItemLabel";br.inheritAttrs=!1;const Ku=br,Hu=pe({compatConfig:{MODE:3},name:"ErrorList",props:["errors","help","onDomErrorVisibleChange","helpStatus","warnings"],setup:function(e){var n=Oe("",e),t=n.prefixCls,a=Uu(),i=a.prefixCls,u=a.status,l=P(function(){return"".concat(i.value,"-item-explain")}),s=P(function(){return!!(e.errors&&e.errors.length)}),w=re(u.value);return ve([s,u],function(){s.value&&(w.value=u.value)}),function(){var v,h,x=bt("".concat(t.value,"-show-help-item")),d=Yn("".concat(t.value,"-show-help-item"),x);return d.class=l.value,(v=e.errors)!==null&&v!==void 0&&v.length?K(Xn,I(I({},d),{},{tag:"div"}),{default:function(){return[(h=e.errors)===null||h===void 0?void 0:h.map(function(o,y){return K("div",{key:y,role:"alert",class:w.value?"".concat(l.value,"-").concat(w.value):""},[o])})]}}):null}}});var Yu={success:Zn,warning:Qn,error:zn,validating:Jn},Xu=pe({compatConfig:{MODE:3},slots:["help","extra","errors"],inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status"],setup:function(e,n){var t=n.slots,a=yr(),i=a.wrapperCol,u=I({},a);return delete u.labelCol,delete u.wrapperCol,jn(u),Gu({prefixCls:P(function(){return e.prefixCls}),status:P(function(){return e.status})}),function(){var l,s,w,v=e.prefixCls,h=e.wrapperCol,x=e.help,d=x===void 0?(l=t.help)===null||l===void 0?void 0:l.call(t):x,p=e.errors,o=p===void 0?(s=t.errors)===null||s===void 0?void 0:s.call(t):p,y=e.hasFeedback,f=e.status,$=e.extra,m=$===void 0?(w=t.extra)===null||w===void 0?void 0:w.call(t):$,c="".concat(v,"-item"),b=h||(i==null?void 0:i.value)||{},F=he("".concat(c,"-control"),b.class),O=f&&Yu[f];return K(hn,I(I({},b),{},{class:F}),{default:function(){var C;return K(_e,null,[K("div",{class:"".concat(c,"-control-input")},[K("div",{class:"".concat(c,"-control-input-content")},[(C=t.default)===null||C===void 0?void 0:C.call(t)]),y&&O?K("span",{class:"".concat(c,"-children-icon")},[K(O,null,null)]):null]),K(Hu,{errors:o,help:d,class:"".concat(c,"-explain-connected")},null),m?K("div",{class:"".concat(c,"-extra")},[m]):null])}})}}});const Zu=Xu;function Qu(r){var e=Qr(r.value.slice()),n=null;return zr(function(){clearTimeout(n),n=setTimeout(function(){e.value=r.value},r.value.length?0:10)}),e}me("success","warning","error","validating","");function Ue(r,e,n){var t=r,a=e,i=0;try{for(var u=a.length;i<u-1&&!(!t&&!n);++i){var l=a[i];if(l in t)t=t[l];else{if(n)throw Error("please transfer a valid name path to form item!");break}}if(n&&!t)throw Error("please transfer a valid name path to form item!")}catch{console.error("please transfer a valid name path to form item!")}return{o:t,k:a[i],v:t?t[a[i]]:void 0}}var zu=function(){return{htmlFor:String,prefixCls:String,label:se.any,help:se.any,extra:se.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:se.oneOf(me("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean}},Ju=0,el="form_item";const rl=pe({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:zu(),slots:["help","label","extra"],setup:function(e,n){var t=n.slots,a=n.attrs,i=n.expose;et(e.prop===void 0);var u="form-item-".concat(++Ju),l=Oe("form",e),s=l.prefixCls,w=yr(),v=P(function(){return e.name||e.prop}),h=re([]),x=re(!1),d=re(),p=P(function(){var g=v.value;return er(g)}),o=P(function(){if(p.value.length){var g=w.name.value,A=p.value.join("_");return g?"".concat(g,"_").concat(A):"".concat(el,"_").concat(A)}else return}),y=function(){var A=w.model.value;if(!(!A||!v.value))return Ue(A,p.value,!0).v},f=P(function(){return y()}),$=re(je(f.value)),m=P(function(){var g=e.validateTrigger!==void 0?e.validateTrigger:w.validateTrigger.value;return g=g===void 0?"change":g,ae(g)}),c=P(function(){var g=w.rules.value,A=e.rules,j=e.required!==void 0?{required:!!e.required,trigger:m.value}:[],L=Ue(g,p.value);g=g?L.o[L.k]||L.v:[];var W=[].concat(A||g||[]);return Wu(W,function(Z){return Z.required})?W:W.concat(j)}),b=P(function(){var g=c.value,A=!1;return g&&g.length&&g.every(function(j){return j.required?(A=!0,!1):!0}),A||e.required}),F=re();zr(function(){F.value=e.validateStatus});var O=P(function(){var g={};return typeof e.label=="string"?g.label=e.label:e.name&&(g.label=String(e.name)),e.messageVariables&&(g=I(I({},g),e.messageVariables)),g}),S=function(A){if(p.value.length!==0){var j=e.validateFirst,L=j===void 0?!1:j,W=A||{},Z=W.triggerName,U=c.value;if(Z&&(U=U.filter(function(H){var ee=H.trigger;if(!ee&&!m.value.length)return!0;var Q=ae(ee||m.value);return Q.includes(Z)})),!U.length)return Promise.resolve();var Y=Pn(p.value,f.value,U,I({validateMessages:w.validateMessages.value},A),L,O.value);return F.value="validating",h.value=[],Y.catch(function(H){return H}).then(function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(F.value==="validating"){var ee=H.filter(function(Q){return Q&&Q.errors.length});F.value=ee.length?"error":"success",h.value=ee.map(function(Q){return Q.errors}),w.onValidate(v.value,!h.value.length,h.value.length?Ye(h.value[0]):null)}}),Y}},C=function(){S({triggerName:"blur"})},R=function(){if(x.value){x.value=!1;return}S({triggerName:"change"})},D=function(){F.value=e.validateStatus,x.value=!1,h.value=[]},M=function(){F.value=e.validateStatus,x.value=!0,h.value=[];var A=w.model.value||{},j=f.value,L=Ue(A,p.value,!0);Array.isArray(j)?L.o[L.k]=[].concat($.value):L.o[L.k]=$.value,Jr(function(){x.value=!1})},T=P(function(){return e.htmlFor===void 0?o.value:e.htmlFor}),B=function(){var A=T.value;if(!(!A||!d.value)){var j=d.value.$el.querySelector('[id="'.concat(A,'"]'));j&&j.focus&&j.focus()}};i({onFieldBlur:C,onFieldChange:R,clearValidate:D,resetField:M}),rt({id:o,onFieldBlur:function(){e.autoLink&&C()},onFieldChange:function(){e.autoLink&&R()},clearValidate:D},P(function(){return!!(e.autoLink&&w.model.value&&v.value)}));var G=!1;ve(v,function(g){g?G||(G=!0,w.addField(u,{fieldValue:f,fieldId:o,fieldName:v,resetField:M,clearValidate:D,namePath:p,validateRules:S,rules:c})):(G=!1,w.removeField(u))},{immediate:!0}),Xr(function(){w.removeField(u)});var k=Qu(h),E=P(function(){return e.validateStatus!==void 0?e.validateStatus:k.value.length?"error":F.value}),q=P(function(){var g;return g={},N(g,"".concat(s.value,"-item"),!0),N(g,"".concat(s.value,"-item-has-feedback"),E.value&&e.hasFeedback),N(g,"".concat(s.value,"-item-has-success"),E.value==="success"),N(g,"".concat(s.value,"-item-has-warning"),E.value==="warning"),N(g,"".concat(s.value,"-item-has-error"),E.value==="error"),N(g,"".concat(s.value,"-item-is-validating"),E.value==="validating"),N(g,"".concat(s.value,"-item-hidden"),e.hidden),g});return function(){var g,A;if(e.noStyle)return(g=t.default)===null||g===void 0?void 0:g.call(t);var j=(A=e.help)!==null&&A!==void 0?A:t.help?nt(t.help()):null;return K(fa,I(I({},a),{},{class:[q.value,j!=null||k.value.length?"".concat(s.value,"-item-with-help"):"",a.class],key:"row"}),{default:function(){var W,Z,U,Y;return K(_e,null,[K(Ku,I(I({},e),{},{htmlFor:T.value,required:b.value,requiredMark:w.requiredMark.value,prefixCls:s.value,onClick:B,label:(W=e.label)!==null&&W!==void 0?W:(Z=t.label)===null||Z===void 0?void 0:Z.call(t)}),null),K(Zu,I(I({},e),{},{errors:j!=null?ae(j):k.value,prefixCls:s.value,status:E.value,ref:d,help:j,extra:(U=e.extra)!==null&&U!==void 0?U:(Y=t.extra)===null||Y===void 0?void 0:Y.call(t)}),{default:t.default})])}})}}});function _n(r){var e=!1,n=r.length,t=[];return r.length?new Promise(function(a,i){r.forEach(function(u,l){u.catch(function(s){return e=!0,s}).then(function(s){n-=1,t[l]=s,!(n>0)&&(e&&i(t),a(t))})})}):Promise.resolve([])}function Gr(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function Ur(r,e){return(!e||r!=="hidden")&&r!=="visible"&&r!=="clip"}function Ke(r,e){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var n=getComputedStyle(r,null);return Ur(n.overflowY,e)||Ur(n.overflowX,e)||function(t){var a=function(i){if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}}(t);return!!a&&(a.clientHeight<t.scrollHeight||a.clientWidth<t.scrollWidth)}(r)}return!1}function Te(r,e,n,t,a,i,u,l){return i<r&&u>e||i>r&&u<e?0:i<=r&&l<=n||u>=e&&l>=n?i-r-t:u>e&&l<n||i<r&&l>n?u-e+a:0}var Kr=function(r,e){var n=window,t=e.scrollMode,a=e.block,i=e.inline,u=e.boundary,l=e.skipOverflowHiddenElements,s=typeof u=="function"?u:function(Ee){return Ee!==u};if(!Gr(r))throw new TypeError("Invalid target");for(var w,v,h=document.scrollingElement||document.documentElement,x=[],d=r;Gr(d)&&s(d);){if((d=(v=(w=d).parentElement)==null?w.getRootNode().host||null:v)===h){x.push(d);break}d!=null&&d===document.body&&Ke(d)&&!Ke(document.documentElement)||d!=null&&Ke(d,l)&&x.push(d)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,o=n.visualViewport?n.visualViewport.height:innerHeight,y=window.scrollX||pageXOffset,f=window.scrollY||pageYOffset,$=r.getBoundingClientRect(),m=$.height,c=$.width,b=$.top,F=$.right,O=$.bottom,S=$.left,C=a==="start"||a==="nearest"?b:a==="end"?O:b+m/2,R=i==="center"?S+c/2:i==="end"?F:S,D=[],M=0;M<x.length;M++){var T=x[M],B=T.getBoundingClientRect(),G=B.height,k=B.width,E=B.top,q=B.right,g=B.bottom,A=B.left;if(t==="if-needed"&&b>=0&&S>=0&&O<=o&&F<=p&&b>=E&&O<=g&&S>=A&&F<=q)return D;var j=getComputedStyle(T),L=parseInt(j.borderLeftWidth,10),W=parseInt(j.borderTopWidth,10),Z=parseInt(j.borderRightWidth,10),U=parseInt(j.borderBottomWidth,10),Y=0,H=0,ee="offsetWidth"in T?T.offsetWidth-T.clientWidth-L-Z:0,Q="offsetHeight"in T?T.offsetHeight-T.clientHeight-W-U:0,te="offsetWidth"in T?T.offsetWidth===0?0:k/T.offsetWidth:0,ue="offsetHeight"in T?T.offsetHeight===0?0:G/T.offsetHeight:0;if(h===T)Y=a==="start"?C:a==="end"?C-o:a==="nearest"?Te(f,f+o,o,W,U,f+C,f+C+m,m):C-o/2,H=i==="start"?R:i==="center"?R-p/2:i==="end"?R-p:Te(y,y+p,p,L,Z,y+R,y+R+c,c),Y=Math.max(0,Y+f),H=Math.max(0,H+y);else{Y=a==="start"?C-E-W:a==="end"?C-g+U+Q:a==="nearest"?Te(E,g,G,W,U+Q,C,C+m,m):C-(E+G/2)+Q/2,H=i==="start"?R-A-L:i==="center"?R-(A+k/2)+ee/2:i==="end"?R-q+Z+ee:Te(A,q,k,L,Z+ee,R,R+c,c);var ye=T.scrollLeft,Pe=T.scrollTop;C+=Pe-(Y=Math.max(0,Math.min(Pe+Y/ue,T.scrollHeight-G/ue+Q))),R+=ye-(H=Math.max(0,Math.min(ye+H/te,T.scrollWidth-k/te+ee)))}D.push({el:T,top:Y,left:H})}return D};function Mn(r){return r===Object(r)&&Object.keys(r).length!==0}function nl(r,e){e===void 0&&(e="auto");var n="scrollBehavior"in document.body.style;r.forEach(function(t){var a=t.el,i=t.top,u=t.left;a.scroll&&n?a.scroll({top:i,left:u,behavior:e}):(a.scrollTop=i,a.scrollLeft=u)})}function tl(r){return r===!1?{block:"end",inline:"nearest"}:Mn(r)?r:{block:"start",inline:"nearest"}}function al(r,e){var n=r.isConnected||r.ownerDocument.documentElement.contains(r);if(Mn(e)&&typeof e.behavior=="function")return e.behavior(n?Kr(r,e):[]);if(n){var t=tl(e);return nl(Kr(r,t),t.behavior)}}var il=Math.min;function ul(r,e,n){for(var t=n?Ft:xt,a=r[0].length,i=r.length,u=i,l=Array(i),s=1/0,w=[];u--;){var v=r[u];u&&e&&(v=De(v,cr(e))),s=il(v.length,s),l[u]=!n&&(e||a>=120&&v.length>=120)?new wt(u&&v):void 0}v=r[0];var h=-1,x=l[0];e:for(;++h<a&&w.length<s;){var d=v[h],p=e?e(d):d;if(d=n||d!==0?d:0,!(x?Or(x,p):t(w,p,n))){for(u=i;--u;){var o=l[u];if(!(o?Or(o,p):t(r[u],p,n)))continue e}x&&x.push(p),w.push(d)}}return w}function ll(r,e){return gn(vn(r,e,mr),r+"")}function ol(r){return or(r)&&sr(r)}function sl(r){return ol(r)?r:[]}var fl=ll(function(r){var e=De(r,sl);return e.length&&e[0]===r[0]?ul(e):[]});const cl=fl;function dl(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}function vl(r,e){return e.length<2?r:gr(r,Ct(e,0,-1))}function gl(r,e){return e=Be(e,r),r=vl(r,e),r==null||delete r[Ae(dl(e))]}function ml(r){return tt(r)?void 0:r}var hl=1,pl=2,yl=4,bl=ia(function(r,e){var n={};if(r==null)return n;var t=!1;e=De(e,function(i){return i=Be(i,r),t||(t=i.length>1),i}),$e(r,bn(r),n),t&&(n=we(n,hl|pl|yl,ml));for(var a=e.length;a--;)gl(n,e[a]);return n});const wl=bl;function Hr(r){var e=!1;return r&&r.length&&r.every(function(n){return n.required?(e=!0,!1):!0}),e}function Yr(r){return r==null?[]:Array.isArray(r)?r:[r]}function He(r,e,n){var t=r;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");for(var a=e.split("."),i=0,u=a.length;i<u-1&&!(!t&&!n);++i){var l=a[i];if(l in t)t=t[l];else{if(n)throw new Error("please transfer a valid name path to validate!");break}}return{o:t,k:a[i],v:t?t[a[i]]:null,isValid:t&&a[i]in t}}function Fl(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:re({}),n=arguments.length>2?arguments[2]:void 0,t=je(le(r)),a=at({}),i=Qr([]),u=function(c){Se(le(r),I(I({},je(t)),c)),Jr(function(){Object.keys(a).forEach(function(b){a[b]={autoLink:!1,required:Hr(le(e)[b])}})})},l=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1?arguments[1]:void 0;return b.length?c.filter(function(F){var O=Yr(F.trigger||"change");return cl(O,b).length}):c},s=null,w=function(c){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=arguments.length>2?arguments[2]:void 0,O=[],S={},C=function(){var G=c[R],k=He(le(r),G,F);if(!k.isValid)return"continue";S[G]=k.v;var E=l(le(e)[G],Yr(b&&b.trigger));E.length&&O.push(v(G,k.v,E,b||{}).then(function(){return{name:G,errors:[],warnings:[]}}).catch(function(q){var g=[],A=[];return q.forEach(function(j){var L=j.rule.warningOnly,W=j.errors;L?A.push.apply(A,ne(W)):g.push.apply(g,ne(W))}),g.length?Promise.reject({name:G,errors:g,warnings:A}):{name:G,errors:g,warnings:A}}))},R=0;R<c.length;R++)var D=C();var M=_n(O);s=M;var T=M.then(function(){return s===M?Promise.resolve(S):Promise.reject([])}).catch(function(B){var G=B.filter(function(k){return k&&k.errors.length});return Promise.reject({values:S,errorFields:G,outOfDate:s!==M})});return T.catch(function(B){return B}),T},v=function(c,b,F){var O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},S=Pn([c],b,F,I({validateMessages:ke},O),!!O.validateFirst);return a[c]?(a[c].validateStatus="validating",S.catch(function(C){return C}).then(function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(a[c].validateStatus==="validating"){var R,D=C.filter(function(M){return M&&M.errors.length});a[c].validateStatus=D.length?"error":"success",a[c].help=D.length?D.map(function(M){return M.errors}):null,n==null||(R=n.onValidate)===null||R===void 0||R.call(n,c,!D.length,D.length?Ye(a[c].help[0]):null)}}),S):S.catch(function(C){return C})},h=function(c,b){var F=[],O=!0;c?Array.isArray(c)?F=c:F=[c]:(O=!1,F=i.value);var S=w(F,b||{},O);return S.catch(function(C){return C}),S},x=function(c){var b=[];c?Array.isArray(c)?b=c:b=[c]:b=i.value,b.forEach(function(F){a[F]&&Se(a[F],{validateStatus:"",help:null})})},d=function(c){for(var b={autoLink:!1},F=[],O=Array.isArray(c)?c:[c],S=0;S<O.length;S++){var C=O[S];(C==null?void 0:C.validateStatus)==="error"&&(b.validateStatus="error",C.help&&F.push(C.help)),b.required=b.required||(C==null?void 0:C.required)}return b.help=F,b},p=t,o=!0,y=function(c){var b=[];i.value.forEach(function(F){var O=He(c,F,!1),S=He(p,F,!1),C=o&&(n==null?void 0:n.immediate)&&O.isValid;(C||!on(O.v,S.v))&&b.push(F)}),h(b,{trigger:"change"}),o=!1,p=je(Ye(c))},f=n==null?void 0:n.debounce,$=!0;return ve(e,function(){i.value=e?Object.keys(le(e)):[],!$&&n&&n.validateOnRuleChange&&h(),$=!1},{deep:!0,immediate:!0}),ve(i,function(){var m={};i.value.forEach(function(b){m[b]=Se({},a[b],{autoLink:!1,required:Hr(le(e)[b])}),delete a[b]});for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&delete a[c];Se(a,m)},{immediate:!0}),ve(r,f&&f.wait?it(y,f.wait,wl(f,["wait"])):y,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:r,rulesRef:e,initialModel:t,validateInfos:a,resetFields:u,validate:h,validateField:v,mergeValidateInfo:d,clearValidate:x}}var xl=function(){return{layout:se.oneOf(me("horizontal","inline","vertical")),labelCol:{type:Object},wrapperCol:{type:Object},colon:{type:Boolean,default:void 0},labelAlign:se.oneOf(me("left","right")),labelWrap:{type:Boolean,default:void 0},prefixCls:String,requiredMark:{type:[String,Boolean],default:void 0},hideRequiredMark:{type:Boolean,default:void 0},model:se.object,rules:{type:Object},validateMessages:{type:Object,default:void 0},validateOnRuleChange:{type:Boolean,default:void 0},scrollToFirstError:{type:[Boolean,Object]},onSubmit:Function,name:String,validateTrigger:{type:[String,Array]},size:{type:String},onValuesChange:{type:Function},onFieldsChange:{type:Function},onFinish:{type:Function},onFinishFailed:{type:Function},onValidate:{type:Function}}};function Ol(r,e){return on(ae(r),ae(e))}var Al=pe({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:ut(xl(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:rl,useForm:Fl,setup:function(e,n){var t=n.emit,a=n.slots,i=n.expose,u=n.attrs,l=Ot(e),s=Oe("form",e),w=s.prefixCls,v=s.direction,h=s.form,x=P(function(){return e.requiredMark===""||e.requiredMark}),d=P(function(){var E;return x.value!==void 0?x.value:h&&((E=h.value)===null||E===void 0?void 0:E.requiredMark)!==void 0?h.value.requiredMark:!e.hideRequiredMark}),p=P(function(){var E,q;return(E=e.colon)!==null&&E!==void 0?E:(q=h.value)===null||q===void 0?void 0:q.colon}),o=lt(),y=o.validateMessages,f=P(function(){return I(I(I({},ke),y.value),e.validateMessages)}),$=P(function(){var E;return he(w.value,(E={},N(E,"".concat(w.value,"-").concat(e.layout),!0),N(E,"".concat(w.value,"-hide-required-mark"),d.value===!1),N(E,"".concat(w.value,"-rtl"),v.value==="rtl"),N(E,"".concat(w.value,"-").concat(l.value),l.value),E))}),m=re(),c={},b=function(q,g){c[q]=g},F=function(q){delete c[q]},O=function(q){var g=!!q,A=g?ae(q).map(er):[];return g?Object.values(c).filter(function(j){return A.findIndex(function(L){return Ol(L,j.fieldName.value)})>-1}):Object.values(c)},S=function(q){if(!e.model){We(!1,"Form","model is required for resetFields to work.");return}O(q).forEach(function(g){g.resetField()})},C=function(q){O(q).forEach(function(g){g.clearValidate()})},R=function(q){var g=e.scrollToFirstError;if(t("finishFailed",q),g&&q.errorFields.length){var A={};oe(g)==="object"&&(A=g),M(q.errorFields[0].name,A)}},D=function(){return G.apply(void 0,arguments)},M=function(q){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=O(q?[q]:void 0);if(A.length){var j=A[0].fieldId.value,L=j?document.getElementById(j):null;L&&al(L,I({scrollMode:"if-needed",block:"nearest"},g))}},T=function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(q===!0){var g=[];return Object.values(c).forEach(function(A){var j=A.namePath;g.push(j.value)}),Wr(e.model,g)}else return Wr(e.model,q)},B=function(q,g){if(We(!(q instanceof Function),"Form","validateFields/validateField/validate not support callback, please use promise instead"),!e.model)return We(!1,"Form","model is required for validateFields to work."),Promise.reject("Form `model` is required for validateFields to work.");var A=!!q,j=A?ae(q).map(er):[],L=[];Object.values(c).forEach(function(U){var Y;if(A||j.push(U.namePath.value),!!((Y=U.rules)!==null&&Y!==void 0&&Y.value.length)){var H=U.namePath.value;if(!A||Fu(j,H)){var ee=U.validateRules(I({validateMessages:f.value},g));L.push(ee.then(function(){return{name:H,errors:[],warnings:[]}}).catch(function(Q){var te=[],ue=[];return Q.forEach(function(ye){var Pe=ye.rule.warningOnly,Ee=ye.errors;Pe?ue.push.apply(ue,ne(Ee)):te.push.apply(te,ne(Ee))}),te.length?Promise.reject({name:H,errors:te,warnings:ue}):{name:H,errors:te,warnings:ue}}))}}});var W=_n(L);m.value=W;var Z=W.then(function(){return m.value===W?Promise.resolve(T(j)):Promise.reject([])}).catch(function(U){var Y=U.filter(function(H){return H&&H.errors.length});return Promise.reject({values:T(j),errorFields:Y,outOfDate:m.value!==W})});return Z.catch(function(U){return U}),Z},G=function(){return B.apply(void 0,arguments)},k=function(q){if(q.preventDefault(),q.stopPropagation(),t("submit",q),e.model){var g=B();g.then(function(A){t("finish",A)}).catch(function(A){R(A)})}};return i({resetFields:S,clearValidate:C,validateFields:B,getFieldsValue:T,validate:D,scrollToField:M}),jn({model:P(function(){return e.model}),name:P(function(){return e.name}),labelAlign:P(function(){return e.labelAlign}),labelCol:P(function(){return e.labelCol}),labelWrap:P(function(){return e.labelWrap}),wrapperCol:P(function(){return e.wrapperCol}),vertical:P(function(){return e.layout==="vertical"}),colon:p,requiredMark:d,validateTrigger:P(function(){return e.validateTrigger}),rules:P(function(){return e.rules}),addField:b,removeField:F,onValidate:function(q,g,A){t("validate",q,g,A)},validateMessages:f}),ve(function(){return e.rules},function(){e.validateOnRuleChange&&B()}),function(){var E;return K("form",I(I({},u),{},{onSubmit:k,class:[$.value,u.class]}),[(E=a.default)===null||E===void 0?void 0:E.call(a)])}}});const Pl=Al;export{hn as C,Pl as F,fa as R,At as _,cn as a,gr as b,Be as c,ia as f,Ht as h,Ae as t};
|