@archbiz/element-plus 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,21 @@
1
+ /*!
2
+ * Archbiz
3
+ * @archbiz/element-plus v0.1.0
4
+ * (c) 2018-2026 Dio Zhu
5
+ * Released under the MIT License.
6
+ */
7
+ "use strict";var As=Object.defineProperty,Os=Object.defineProperties;var Ps=Object.getOwnPropertyDescriptors;var yr=Object.getOwnPropertySymbols;var ji=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable;var ln=(e,t,r)=>t in e?As(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t)=>{for(var r in t||(t={}))ji.call(t,r)&&ln(e,r,t[r]);if(yr)for(var r of yr(t))Ni.call(t,r)&&ln(e,r,t[r]);return e},re=(e,t)=>Os(e,Ps(t));var Lt=(e,t)=>{var r={};for(var n in e)ji.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yr)for(var n of yr(e))t.indexOf(n)<0&&Ni.call(e,n)&&(r[n]=e[n]);return r};var be=(e,t,r)=>ln(e,typeof t!="symbol"?t+"":t,r);var me=(e,t,r)=>new Promise((n,i)=>{var o=u=>{try{s(r.next(u))}catch(c){i(c)}},a=u=>{try{s(r.throw(u))}catch(c){i(c)}},s=u=>u.done?n(u.value):Promise.resolve(u.value).then(o,a);s((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("element-plus"),l=require("vue"),sn=require("@element-plus/icons-vue"),lr=require("vue-router"),Mr=require("vxe-pc-ui");function Rs(e){e.useApp((t,r)=>{r.component(L.ElForm.name)||r.use(L.ElForm),r.component(L.ElButton.name)||r.use(L.ElButton),r.component(L.ElRow.name)||r.use(L.ElRow),r.component(L.ElCol.name)||r.use(L.ElCol),r.component(L.ElInput.name)||r.use(L.ElInput),r.component(L.ElInputNumber.name)||r.use(L.ElInputNumber),r.component(L.ElCascader.name)||r.use(L.ElCascader),r.component(L.ElPopover.name)||r.use(L.ElPopover),r.component(L.ElTooltip.name)||r.use(L.ElTooltip),r.component(L.ElAutocomplete.name)||r.use(L.ElAutocomplete),r.component(L.ElCheckboxGroup.name)||r.use(L.ElCheckboxGroup),r.component(L.ElCheckboxButton.name)||r.use(L.ElCheckboxButton),r.component(L.ElRadioGroup.name)||r.use(L.ElRadioGroup),r.component(L.ElRadioButton.name)||r.use(L.ElRadioButton),r.component(L.ElRadio.name)||r.use(L.ElRadio),r.component(L.ElDialog.name)||r.use(L.ElDialog),r.component(L.ElDivider.name)||r.use(L.ElDivider),r.component(L.ElCheckbox.name)||r.use(L.ElCheckbox),r.component(L.ElSelect.name)||r.use(L.ElSelect),r.component(L.ElTree.name)||r.use(L.ElTree),r.component(L.ElUpload.name)||r.use(L.ElUpload),r.component(L.ElSlider.name)||r.use(L.ElSlider),r.component(L.ElRate.name)||r.use(L.ElRate),r.component(L.ElColorPicker.name)||r.use(L.ElColorPicker),r.component(L.ElSwitch.name)||r.use(L.ElSwitch),r.component(L.ElDatePicker.name)||r.use(L.ElDatePicker),r.component(L.ElIcon.name)||r.use(L.ElIcon),r.component(L.ElTimePicker.name)||r.use(L.ElTimePicker),r.component(L.ElProgress.name)||r.use(L.ElProgress),r.component(L.ElInputTag.name)||r.use(L.ElInputTag),r.component(L.ElText.name)||r.use(L.ElText),r.component(L.ElTransfer.name)||r.use(L.ElTransfer),r.component(L.ElTreeSelect.name)||r.use(L.ElTreeSelect),r.component(L.ElMention.name)||r.use(L.ElMention)})}const Ms=(e,t)=>{const{AbForm:r}=t||{};r.use(Rs),e.use(r)};var sa=typeof global=="object"&&global&&global.Object===Object&&global,Ds=typeof self=="object"&&self&&self.Object===Object&&self,ze=sa||Ds||Function("return this")(),Je=ze.Symbol,ua=Object.prototype,Is=ua.hasOwnProperty,Bs=ua.toString,Ht=Je?Je.toStringTag:void 0;function js(e){var t=Is.call(e,Ht),r=e[Ht];try{e[Ht]=void 0;var n=!0}catch(o){}var i=Bs.call(e);return n&&(t?e[Ht]=r:delete e[Ht]),i}var Ns=Object.prototype,Vs=Ns.toString;function Ls(e){return Vs.call(e)}var Hs="[object Null]",zs="[object Undefined]",Vi=Je?Je.toStringTag:void 0;function $t(e){return e==null?e===void 0?zs:Hs:Vi&&Vi in Object(e)?js(e):Ls(e)}function Ke(e){return e!=null&&typeof e=="object"}var Us="[object Symbol]";function Ur(e){return typeof e=="symbol"||Ke(e)&&$t(e)==Us}function ca(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Te=Array.isArray,Li=Je?Je.prototype:void 0,Hi=Li?Li.toString:void 0;function da(e){if(typeof e=="string")return e;if(Te(e))return ca(e,da)+"";if(Ur(e))return Hi?Hi.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var qs=/\s/;function Ys(e){for(var t=e.length;t--&&qs.test(e.charAt(t)););return t}var Gs=/^\s+/;function Ws(e){return e&&e.slice(0,Ys(e)+1).replace(Gs,"")}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var zi=NaN,Js=/^[-+]0x[0-9a-f]+$/i,Ks=/^0b[01]+$/i,Qs=/^0o[0-7]+$/i,Zs=parseInt;function Ui(e){if(typeof e=="number")return e;if(Ur(e))return zi;if(Ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ws(e);var r=Ks.test(e);return r||Qs.test(e)?Zs(e.slice(2),r?2:8):Js.test(e)?zi:+e}function qr(e){return e}var Xs="[object AsyncFunction]",eu="[object Function]",tu="[object GeneratorFunction]",ru="[object Proxy]";function Xn(e){if(!Ae(e))return!1;var t=$t(e);return t==eu||t==tu||t==Xs||t==ru}var un=ze["__core-js_shared__"],qi=function(){var e=/[^.]+$/.exec(un&&un.keys&&un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nu(e){return!!qi&&qi in e}var iu=Function.prototype,ou=iu.toString;function Tt(e){if(e!=null){try{return ou.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var au=/[\\^$.*+?()[\]{}|]/g,lu=/^\[object .+?Constructor\]$/,su=Function.prototype,uu=Object.prototype,cu=su.toString,du=uu.hasOwnProperty,fu=RegExp("^"+cu.call(du).replace(au,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pu(e){if(!Ae(e)||nu(e))return!1;var t=Xn(e)?fu:lu;return t.test(Tt(e))}function hu(e,t){return e==null?void 0:e[t]}function Et(e,t){var r=hu(e,t);return pu(r)?r:void 0}var On=Et(ze,"WeakMap"),Yi=Object.create,mu=function(){function e(){}return function(t){if(!Ae(t))return{};if(Yi)return Yi(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function gu(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function yu(){}function vu(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var bu=800,wu=16,xu=Date.now;function Su(e){var t=0,r=0;return function(){var n=xu(),i=wu-(n-r);if(r=n,i>0){if(++t>=bu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cu(e){return function(){return e}}var Dr=function(){try{var e=Et(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),$u=Dr?function(e,t){return Dr(e,"toString",{configurable:!0,enumerable:!1,value:Cu(t),writable:!0})}:qr,Tu=Su($u);function fa(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Eu(e,t,r,n){for(var i=e.length,o=r+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function ku(e){return e!==e}function _u(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function Fu(e,t,r){return t===t?_u(e,t,r):Eu(e,ku,r)}function Au(e,t){var r=e==null?0:e.length;return!!r&&Fu(e,t,0)>-1}var Ou=9007199254740991,Pu=/^(?:0|[1-9]\d*)$/;function Yr(e,t){var r=typeof e;return t=t==null?Ou:t,!!t&&(r=="number"||r!="symbol"&&Pu.test(e))&&e>-1&&e%1==0&&e<t}function ei(e,t,r){t=="__proto__"&&Dr?Dr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function sr(e,t){return e===t||e!==e&&t!==t}var Ru=Object.prototype,Mu=Ru.hasOwnProperty;function ti(e,t,r){var n=e[t];(!(Mu.call(e,t)&&sr(n,r))||r===void 0&&!(t in e))&&ei(e,t,r)}function Du(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=void 0;u===void 0&&(u=e[s]),i?ei(r,s,u):ti(r,s,u)}return r}var Gi=Math.max;function Iu(e,t,r){return t=Gi(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Gi(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),gu(e,this,s)}}function Bu(e,t){return Tu(Iu(e,t,qr),e+"")}var ju=9007199254740991;function ri(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ju}function Bt(e){return e!=null&&ri(e.length)&&!Xn(e)}function Nu(e,t,r){if(!Ae(r))return!1;var n=typeof t;return(n=="number"?Bt(r)&&Yr(t,r.length):n=="string"&&t in r)?sr(r[t],e):!1}function Vu(e){return Bu(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&Nu(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}var Lu=Object.prototype;function ni(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Lu;return e===r}function Hu(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var zu="[object Arguments]";function Wi(e){return Ke(e)&&$t(e)==zu}var pa=Object.prototype,Uu=pa.hasOwnProperty,qu=pa.propertyIsEnumerable,Ir=Wi(function(){return arguments}())?Wi:function(e){return Ke(e)&&Uu.call(e,"callee")&&!qu.call(e,"callee")};function Yu(){return!1}var ha=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ji=ha&&typeof module=="object"&&module&&!module.nodeType&&module,Gu=Ji&&Ji.exports===ha,Ki=Gu?ze.Buffer:void 0,Wu=Ki?Ki.isBuffer:void 0,tr=Wu||Yu,Ju="[object Arguments]",Ku="[object Array]",Qu="[object Boolean]",Zu="[object Date]",Xu="[object Error]",ec="[object Function]",tc="[object Map]",rc="[object Number]",nc="[object Object]",ic="[object RegExp]",oc="[object Set]",ac="[object String]",lc="[object WeakMap]",sc="[object ArrayBuffer]",uc="[object DataView]",cc="[object Float32Array]",dc="[object Float64Array]",fc="[object Int8Array]",pc="[object Int16Array]",hc="[object Int32Array]",mc="[object Uint8Array]",gc="[object Uint8ClampedArray]",yc="[object Uint16Array]",vc="[object Uint32Array]",ge={};ge[cc]=ge[dc]=ge[fc]=ge[pc]=ge[hc]=ge[mc]=ge[gc]=ge[yc]=ge[vc]=!0;ge[Ju]=ge[Ku]=ge[sc]=ge[Qu]=ge[uc]=ge[Zu]=ge[Xu]=ge[ec]=ge[tc]=ge[rc]=ge[nc]=ge[ic]=ge[oc]=ge[ac]=ge[lc]=!1;function bc(e){return Ke(e)&&ri(e.length)&&!!ge[$t(e)]}function ii(e){return function(t){return e(t)}}var ma=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kt=ma&&typeof module=="object"&&module&&!module.nodeType&&module,wc=Kt&&Kt.exports===ma,cn=wc&&sa.process,Rt=function(){try{var e=Kt&&Kt.require&&Kt.require("util").types;return e||cn&&cn.binding&&cn.binding("util")}catch(t){}}(),Qi=Rt&&Rt.isTypedArray,oi=Qi?ii(Qi):bc,xc=Object.prototype,Sc=xc.hasOwnProperty;function ga(e,t){var r=Te(e),n=!r&&Ir(e),i=!r&&!n&&tr(e),o=!r&&!n&&!i&&oi(e),a=r||n||i||o,s=a?Hu(e.length,String):[],u=s.length;for(var c in e)(t||Sc.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Yr(c,u)))&&s.push(c);return s}function ya(e,t){return function(r){return e(t(r))}}var Cc=ya(Object.keys,Object),$c=Object.prototype,Tc=$c.hasOwnProperty;function Ec(e){if(!ni(e))return Cc(e);var t=[];for(var r in Object(e))Tc.call(e,r)&&r!="constructor"&&t.push(r);return t}function ai(e){return Bt(e)?ga(e):Ec(e)}function kc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var _c=Object.prototype,Fc=_c.hasOwnProperty;function Ac(e){if(!Ae(e))return kc(e);var t=ni(e),r=[];for(var n in e)n=="constructor"&&(t||!Fc.call(e,n))||r.push(n);return r}function va(e){return Bt(e)?ga(e,!0):Ac(e)}var Oc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pc=/^\w*$/;function li(e,t){if(Te(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ur(e)?!0:Pc.test(e)||!Oc.test(e)||t!=null&&e in Object(t)}var rr=Et(Object,"create");function Rc(){this.__data__=rr?rr(null):{},this.size=0}function Mc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Dc="__lodash_hash_undefined__",Ic=Object.prototype,Bc=Ic.hasOwnProperty;function jc(e){var t=this.__data__;if(rr){var r=t[e];return r===Dc?void 0:r}return Bc.call(t,e)?t[e]:void 0}var Nc=Object.prototype,Vc=Nc.hasOwnProperty;function Lc(e){var t=this.__data__;return rr?t[e]!==void 0:Vc.call(t,e)}var Hc="__lodash_hash_undefined__";function zc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rr&&t===void 0?Hc:t,this}function bt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bt.prototype.clear=Rc;bt.prototype.delete=Mc;bt.prototype.get=jc;bt.prototype.has=Lc;bt.prototype.set=zc;function Uc(){this.__data__=[],this.size=0}function Gr(e,t){for(var r=e.length;r--;)if(sr(e[r][0],t))return r;return-1}var qc=Array.prototype,Yc=qc.splice;function Gc(e){var t=this.__data__,r=Gr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Yc.call(t,r,1),--this.size,!0}function Wc(e){var t=this.__data__,r=Gr(t,e);return r<0?void 0:t[r][1]}function Jc(e){return Gr(this.__data__,e)>-1}function Kc(e,t){var r=this.__data__,n=Gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function it(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}it.prototype.clear=Uc;it.prototype.delete=Gc;it.prototype.get=Wc;it.prototype.has=Jc;it.prototype.set=Kc;var nr=Et(ze,"Map");function Qc(){this.size=0,this.__data__={hash:new bt,map:new(nr||it),string:new bt}}function Zc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Wr(e,t){var r=e.__data__;return Zc(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Xc(e){var t=Wr(this,e).delete(e);return this.size-=t?1:0,t}function ed(e){return Wr(this,e).get(e)}function td(e){return Wr(this,e).has(e)}function rd(e,t){var r=Wr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ot(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ot.prototype.clear=Qc;ot.prototype.delete=Xc;ot.prototype.get=ed;ot.prototype.has=td;ot.prototype.set=rd;var nd="Expected a function";function si(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(nd);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(si.Cache||ot),r}si.Cache=ot;var id=500;function od(e){var t=si(e,function(n){return r.size===id&&r.clear(),n}),r=t.cache;return t}var ad=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ld=/\\(\\)?/g,sd=od(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ad,function(r,n,i,o){t.push(i?o.replace(ld,"$1"):n||r)}),t});function ba(e){return e==null?"":da(e)}function ui(e,t){return Te(e)?e:li(e,t)?[e]:sd(ba(e))}function ur(e){if(typeof e=="string"||Ur(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function wa(e,t){t=ui(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[ur(t[r++])];return r&&r==n?e:void 0}function We(e,t,r){var n=e==null?void 0:wa(e,t);return n===void 0?r:n}function ud(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xa=ya(Object.getPrototypeOf,Object),cd="[object Object]",dd=Function.prototype,fd=Object.prototype,Sa=dd.toString,pd=fd.hasOwnProperty,hd=Sa.call(Object);function md(e){if(!Ke(e)||$t(e)!=cd)return!1;var t=xa(e);if(t===null)return!0;var r=pd.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Sa.call(r)==hd}function gd(){if(!arguments.length)return[];var e=arguments[0];return Te(e)?e:[e]}function yd(){this.__data__=new it,this.size=0}function vd(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function bd(e){return this.__data__.get(e)}function wd(e){return this.__data__.has(e)}var xd=200;function Sd(e,t){var r=this.__data__;if(r instanceof it){var n=r.__data__;if(!nr||n.length<xd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(e,t),this.size=r.size,this}function He(e){var t=this.__data__=new it(e);this.size=t.size}He.prototype.clear=yd;He.prototype.delete=vd;He.prototype.get=bd;He.prototype.has=wd;He.prototype.set=Sd;var Ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zi=Ca&&typeof module=="object"&&module&&!module.nodeType&&module,Cd=Zi&&Zi.exports===Ca,Xi=Cd?ze.Buffer:void 0,eo=Xi?Xi.allocUnsafe:void 0;function $a(e,t){if(t)return e.slice();var r=e.length,n=eo?eo(r):new e.constructor(r);return e.copy(n),n}function Ta(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function $d(){return[]}var Td=Object.prototype,Ed=Td.propertyIsEnumerable,to=Object.getOwnPropertySymbols,kd=to?function(e){return e==null?[]:(e=Object(e),Ta(to(e),function(t){return Ed.call(e,t)}))}:$d;function _d(e,t,r){var n=t(e);return Te(e)?n:ud(n,r(e))}function Pn(e){return _d(e,ai,kd)}var Rn=Et(ze,"DataView"),Mn=Et(ze,"Promise"),Ot=Et(ze,"Set"),ro="[object Map]",Fd="[object Object]",no="[object Promise]",io="[object Set]",oo="[object WeakMap]",ao="[object DataView]",Ad=Tt(Rn),Od=Tt(nr),Pd=Tt(Mn),Rd=Tt(Ot),Md=Tt(On),Le=$t;(Rn&&Le(new Rn(new ArrayBuffer(1)))!=ao||nr&&Le(new nr)!=ro||Mn&&Le(Mn.resolve())!=no||Ot&&Le(new Ot)!=io||On&&Le(new On)!=oo)&&(Le=function(e){var t=$t(e),r=t==Fd?e.constructor:void 0,n=r?Tt(r):"";if(n)switch(n){case Ad:return ao;case Od:return ro;case Pd:return no;case Rd:return io;case Md:return oo}return t});var Dd=Object.prototype,Id=Dd.hasOwnProperty;function Bd(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Id.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Br=ze.Uint8Array;function ci(e){var t=new e.constructor(e.byteLength);return new Br(t).set(new Br(e)),t}function jd(e,t){var r=ci(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Nd=/\w*$/;function Vd(e){var t=new e.constructor(e.source,Nd.exec(e));return t.lastIndex=e.lastIndex,t}var lo=Je?Je.prototype:void 0,so=lo?lo.valueOf:void 0;function Ld(e){return so?Object(so.call(e)):{}}function Ea(e,t){var r=t?ci(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Hd="[object Boolean]",zd="[object Date]",Ud="[object Map]",qd="[object Number]",Yd="[object RegExp]",Gd="[object Set]",Wd="[object String]",Jd="[object Symbol]",Kd="[object ArrayBuffer]",Qd="[object DataView]",Zd="[object Float32Array]",Xd="[object Float64Array]",ef="[object Int8Array]",tf="[object Int16Array]",rf="[object Int32Array]",nf="[object Uint8Array]",of="[object Uint8ClampedArray]",af="[object Uint16Array]",lf="[object Uint32Array]";function sf(e,t,r){var n=e.constructor;switch(t){case Kd:return ci(e);case Hd:case zd:return new n(+e);case Qd:return jd(e);case Zd:case Xd:case ef:case tf:case rf:case nf:case of:case af:case lf:return Ea(e,r);case Ud:return new n;case qd:case Wd:return new n(e);case Yd:return Vd(e);case Gd:return new n;case Jd:return Ld(e)}}function ka(e){return typeof e.constructor=="function"&&!ni(e)?mu(xa(e)):{}}var uf="[object Map]";function cf(e){return Ke(e)&&Le(e)==uf}var uo=Rt&&Rt.isMap,df=uo?ii(uo):cf,ff="[object Set]";function pf(e){return Ke(e)&&Le(e)==ff}var co=Rt&&Rt.isSet,hf=co?ii(co):pf,mf=1,_a="[object Arguments]",gf="[object Array]",yf="[object Boolean]",vf="[object Date]",bf="[object Error]",Fa="[object Function]",wf="[object GeneratorFunction]",xf="[object Map]",Sf="[object Number]",Aa="[object Object]",Cf="[object RegExp]",$f="[object Set]",Tf="[object String]",Ef="[object Symbol]",kf="[object WeakMap]",_f="[object ArrayBuffer]",Ff="[object DataView]",Af="[object Float32Array]",Of="[object Float64Array]",Pf="[object Int8Array]",Rf="[object Int16Array]",Mf="[object Int32Array]",Df="[object Uint8Array]",If="[object Uint8ClampedArray]",Bf="[object Uint16Array]",jf="[object Uint32Array]",he={};he[_a]=he[gf]=he[_f]=he[Ff]=he[yf]=he[vf]=he[Af]=he[Of]=he[Pf]=he[Rf]=he[Mf]=he[xf]=he[Sf]=he[Aa]=he[Cf]=he[$f]=he[Tf]=he[Ef]=he[Df]=he[If]=he[Bf]=he[jf]=!0;he[bf]=he[Fa]=he[kf]=!1;function Qt(e,t,r,n,i,o){var a,s=t&mf;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ae(e))return e;var u=Te(e);if(u)a=Bd(e);else{var c=Le(e),d=c==Fa||c==wf;if(tr(e))return $a(e,s);if(c==Aa||c==_a||d&&!i)a=d?{}:ka(e);else{if(!he[c])return i?e:{};a=sf(e,c,s)}}o||(o=new He);var f=o.get(e);if(f)return f;o.set(e,a),hf(e)?e.forEach(function(m){a.add(Qt(m,t,r,m,e,o))}):df(e)&&e.forEach(function(m,g){a.set(g,Qt(m,t,r,g,e,o))});var h=Pn,p=u?void 0:h(e);return fa(p||e,function(m,g){p&&(g=m,m=e[g]),ti(a,g,Qt(m,t,r,g,e,o))}),a}var Nf=1,Vf=4;function st(e){return Qt(e,Nf|Vf)}var Lf=1,Hf=4;function zf(e,t){return t=typeof t=="function"?t:void 0,Qt(e,Lf|Hf,t)}function Uf(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i}var qf="__lodash_hash_undefined__";function Yf(e){return this.__data__.set(e,qf),this}function Gf(e){return this.__data__.has(e)}function ir(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ot;++t<r;)this.add(e[t])}ir.prototype.add=ir.prototype.push=Yf;ir.prototype.has=Gf;function Wf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Oa(e,t){return e.has(t)}var Jf=1,Kf=2;function Pa(e,t,r,n,i,o){var a=r&Jf,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=r&Kf?new ir:void 0;for(o.set(e,t),o.set(t,e);++f<s;){var m=e[f],g=t[f];if(n)var y=a?n(g,m,f,t,e,o):n(m,g,f,e,t,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Wf(t,function(v,S){if(!Oa(p,S)&&(m===v||i(m,v,r,n,o)))return p.push(S)})){h=!1;break}}else if(!(m===g||i(m,g,r,n,o))){h=!1;break}}return o.delete(e),o.delete(t),h}function Qf(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function di(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Zf=1,Xf=2,ep="[object Boolean]",tp="[object Date]",rp="[object Error]",np="[object Map]",ip="[object Number]",op="[object RegExp]",ap="[object Set]",lp="[object String]",sp="[object Symbol]",up="[object ArrayBuffer]",cp="[object DataView]",fo=Je?Je.prototype:void 0,dn=fo?fo.valueOf:void 0;function dp(e,t,r,n,i,o,a){switch(r){case cp:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case up:return!(e.byteLength!=t.byteLength||!o(new Br(e),new Br(t)));case ep:case tp:case ip:return sr(+e,+t);case rp:return e.name==t.name&&e.message==t.message;case op:case lp:return e==t+"";case np:var s=Qf;case ap:var u=n&Zf;if(s||(s=di),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=Xf,a.set(e,t);var d=Pa(s(e),s(t),n,i,o,a);return a.delete(e),d;case sp:if(dn)return dn.call(e)==dn.call(t)}return!1}var fp=1,pp=Object.prototype,hp=pp.hasOwnProperty;function mp(e,t,r,n,i,o){var a=r&fp,s=Pn(e),u=s.length,c=Pn(t),d=c.length;if(u!=d&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:hp.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var y=a;++f<u;){h=s[f];var v=e[h],S=t[h];if(n)var $=a?n(S,v,h,t,e,o):n(v,S,h,e,t,o);if(!($===void 0?v===S||i(v,S,r,n,o):$)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var V=e.constructor,P=t.constructor;V!=P&&"constructor"in e&&"constructor"in t&&!(typeof V=="function"&&V instanceof V&&typeof P=="function"&&P instanceof P)&&(g=!1)}return o.delete(e),o.delete(t),g}var gp=1,po="[object Arguments]",ho="[object Array]",vr="[object Object]",yp=Object.prototype,mo=yp.hasOwnProperty;function vp(e,t,r,n,i,o){var a=Te(e),s=Te(t),u=a?ho:Le(e),c=s?ho:Le(t);u=u==po?vr:u,c=c==po?vr:c;var d=u==vr,f=c==vr,h=u==c;if(h&&tr(e)){if(!tr(t))return!1;a=!0,d=!1}if(h&&!d)return o||(o=new He),a||oi(e)?Pa(e,t,r,n,i,o):dp(e,t,u,r,n,i,o);if(!(r&gp)){var p=d&&mo.call(e,"__wrapped__"),m=f&&mo.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,y=m?t.value():t;return o||(o=new He),i(g,y,r,n,o)}}return h?(o||(o=new He),mp(e,t,r,n,i,o)):!1}function Jr(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ke(e)&&!Ke(t)?e!==e&&t!==t:vp(e,t,r,n,Jr,i)}var bp=1,wp=2;function xp(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var s=a[0],u=e[s],c=a[1];if(a[2]){if(u===void 0&&!(s in e))return!1}else{var d=new He,f;if(!(f===void 0?Jr(c,u,bp|wp,n,d):f))return!1}}return!0}function Ra(e){return e===e&&!Ae(e)}function Sp(e){for(var t=ai(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ra(i)]}return t}function Ma(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Cp(e){var t=Sp(e);return t.length==1&&t[0][2]?Ma(t[0][0],t[0][1]):function(r){return r===e||xp(r,e,t)}}function $p(e,t){return e!=null&&t in Object(e)}function Tp(e,t,r){t=ui(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=ur(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&ri(i)&&Yr(a,i)&&(Te(e)||Ir(e)))}function Ep(e,t){return e!=null&&Tp(e,t,$p)}var kp=1,_p=2;function Fp(e,t){return li(e)&&Ra(t)?Ma(ur(e),t):function(r){var n=We(r,e);return n===void 0&&n===t?Ep(r,e):Jr(t,n,kp|_p)}}function Ap(e){return function(t){return t==null?void 0:t[e]}}function Op(e){return function(t){return wa(t,e)}}function Pp(e){return li(e)?Ap(ur(e)):Op(e)}function Da(e){return typeof e=="function"?e:e==null?qr:typeof e=="object"?Te(e)?Fp(e[0],e[1]):Cp(e):Pp(e)}function Rp(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[++i];if(r(o[u],u,o)===!1)break}return t}}var Ia=Rp();function Mp(e,t){return e&&Ia(e,t,ai)}function Dp(e,t){return function(r,n){if(r==null)return r;if(!Bt(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}var fi=Dp(Mp),fn=function(){return ze.Date.now()},Ip="Expected a function",Bp=Math.max,jp=Math.min;function Np(e,t,r){var n,i,o,a,s,u,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Ip);t=Ui(t)||0,Ae(r)&&(d=!!r.leading,f="maxWait"in r,o=f?Bp(Ui(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h);function p(T){var E=n,k=i;return n=i=void 0,c=T,a=e.apply(k,E),a}function m(T){return c=T,s=setTimeout(v,t),d?p(T):a}function g(T){var E=T-u,k=T-c,N=t-E;return f?jp(N,o-k):N}function y(T){var E=T-u,k=T-c;return u===void 0||E>=t||E<0||f&&k>=o}function v(){var T=fn();if(y(T))return S(T);s=setTimeout(v,g(T))}function S(T){return s=void 0,h&&n?p(T):(n=i=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,n=u=i=s=void 0}function V(){return s===void 0?a:S(fn())}function P(){var T=fn(),E=y(T);if(n=arguments,i=this,u=T,E){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(v,t),p(u)}return s===void 0&&(s=setTimeout(v,t)),a}return P.cancel=$,P.flush=V,P}function Dn(e,t,r){(r!==void 0&&!sr(e[t],r)||r===void 0&&!(t in e))&&ei(e,t,r)}function Vp(e){return Ke(e)&&Bt(e)}function In(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Lp(e){return Du(e,va(e))}function Hp(e,t,r,n,i,o,a){var s=In(e,r),u=In(t,r),c=a.get(u);if(c){Dn(e,r,c);return}var d=o?o(s,u,r+"",e,t,a):void 0,f=d===void 0;if(f){var h=Te(u),p=!h&&tr(u),m=!h&&!p&&oi(u);d=u,h||p||m?Te(s)?d=s:Vp(s)?d=vu(s):p?(f=!1,d=$a(u,!0)):m?(f=!1,d=Ea(u,!0)):d=[]:md(u)||Ir(u)?(d=s,Ir(s)?d=Lp(s):(!Ae(s)||Xn(s))&&(d=ka(u))):f=!1}f&&(a.set(u,d),i(d,u,n,o,a),a.delete(u)),Dn(e,r,d)}function Ba(e,t,r,n,i){e!==t&&Ia(t,function(o,a){if(i||(i=new He),Ae(o))Hp(e,t,a,r,Ba,n,i);else{var s=n?n(In(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),Dn(e,a,s)}},va)}function zp(e){return typeof e=="function"?e:qr}function ja(e,t){var r=Te(e)?fa:fi;return r(e,zp(t))}function Up(e,t){var r=[];return fi(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}function wt(e,t){var r=Te(e)?Ta:Up;return r(e,Da(t))}function qp(e,t){var r=-1,n=Bt(e)?Array(e.length):[];return fi(e,function(i,o,a){n[++r]=t(i,o,a)}),n}function Na(e,t){var r=Te(e)?ca:qp;return r(e,Da(t))}function jr(e,t){return Jr(e,t)}var br=Vu(function(e,t,r){Ba(e,t,r)});function Yp(e,t,r,n){if(!Ae(e))return e;t=ui(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var u=ur(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=a){var d=s[u];c=void 0,c===void 0&&(c=Ae(d)?d:Yr(t[i+1])?[]:{})}ti(s,u,c),s=s[u]}return e}function xe(e,t,r){return e==null?e:Yp(e,t,r)}function Gp(e){return ba(e).toLowerCase()}var Wp=1/0,Jp=Ot&&1/di(new Ot([,-0]))[1]==Wp?function(e){return new Ot(e)}:yu,Kp=200;function Qp(e,t,r){var n=-1,i=Au,o=e.length,a=!0,s=[],u=s;if(o>=Kp){var c=Jp(e);if(c)return di(c);a=!1,i=Oa,u=new ir}else u=s;e:for(;++n<o;){var d=e[n],f=d;if(d=d!==0?d:0,a&&f===f){for(var h=u.length;h--;)if(u[h]===f)continue e;s.push(d)}else i(u,f,r)||(u!==s&&u.push(f),s.push(d))}return s}function Zp(e){return e&&e.length?Qp(e):[]}const Va={search:"Search",reset:"Reset",expand:"Expand",unexpand:"Unexpand",pleaseEnter:"Please enter ",pleaseSelect:"Please select ",rangeStart:"start ",rangeEnd:"end ",today:"Today",yesterday:"Yesterday",lastWeek:"Last week",last7:"Last seven days",last30:"Last 30 days",thisMonth:"This month",thisYear:"This year",min:"Min",max:"Max",table:{total:"Total"},timePeriodOutOfRange:"The current period is outside the selectable range",upload:{select:"Select files",tip:"Allowed formats and maximum size",uploading:"Uploading",preview:"Preview",download:"Download",delete:"Delete",retry:"Retry association",setCover:"Set cover",unsetCover:"Unset cover",tooMany:"File count exceeds the limit",invalidType:"File type is not allowed",tooLarge:"File size exceeds the limit",failed:"File upload failed",missingBusinessId:"Business ID or file ID is missing"},action:{detail:"Detail",create:"Create",del:"Delete",edit:"Edit",export:"Export",save:"Save",cancel:"Cancel",return:"Return"}},La={search:"查询",reset:"重置",expand:"展开",unexpand:"收起",pleaseEnter:"请输入",pleaseSelect:"请选择",rangeStart:"开始",rangeEnd:"结束",today:"今天",yesterday:"昨天",lastWeek:"上周",last7:"最近七天",last30:"最近 30 天",thisMonth:"本月",thisYear:"今年",min:"最小",max:"最大",table:{total:"合计"},timePeriodOutOfRange:"已有时段超出可选范围",upload:{select:"选择文件",tip:"支持的格式及最大大小",uploading:"上传中",preview:"预览",download:"下载",delete:"删除",retry:"重试关联",setCover:"设为封面",unsetCover:"取消封面",tooMany:"文件数量超过限制",invalidType:"文件格式不符合要求",tooLarge:"文件大小超过限制",failed:"文件上传失败",missingBusinessId:"缺少业务主键或文件标识"},action:{detail:"详情",create:"新增",del:"删除",edit:"编辑",export:"导出",save:"保存",cancel:"取消",return:"返回"}},Se=(e="localStorage")=>({wsCache:e==="localStorage"?window.localStorage:window.sessionStorage,setLang:Ha,getLang:cr,isZhCN:xt,setTheme:za,getTheme:Ua,isDark:qa,setCurrentSize:Ya,getCurrentSize:Ga,setUser:Wa,getUser:Ja}),at={IS_DARK:"isDark",LANG:"lang",THEME:"theme",LAYOUT:"layout",CURRENT_SIZE:"currentSize",USER:"user"},Ha=(e="")=>{const{wsCache:t}=Se();t.setItem(at.LANG,e)},cr=()=>{const{wsCache:e}=Se();return e.getItem(at.LANG)},xt=()=>{const e=cr()||"";return!e||Gp(e)==="zh-cn"},za=e=>{const{wsCache:t}=Se();t.setItem(at.THEME,JSON.stringify(e||"{}"))},Ua=()=>{const{wsCache:e}=Se(),t=e.getItem(at.THEME);return t?JSON.parse(t):void 0},qa=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,Ya=(e="")=>{const{wsCache:t}=Se();t.setItem(at.CURRENT_SIZE,e)},Ga=()=>{const{wsCache:e}=Se();return e.getItem(at.CURRENT_SIZE)},Wa=e=>{const{wsCache:t}=Se();t.setItem(at.USER,JSON.stringify(e||"{}"))},Ja=()=>{const{wsCache:e}=Se(),t=e.getItem(at.USER),r=t?JSON.parse(t):{};return r.permissions=new Set(r.permissions||[]),r},Xp=cr()||"zh-cn",Xe=e=>({t:r=>We(Xp==="zh-cn"?La:Va,r,r)});function eh(e){const t=new Set(e.map(n=>n.field).filter(Boolean)),r=new Set;return e.flatMap(n=>{if(n.rangeFields===void 0)return[];const i=n.rangeFields;if(typeof n.field!="string"||!n.field||!Array.isArray(i)||!i.length||i.some(o=>typeof o!="string"||!o||t.has(o)||r.has(o))||new Set(i).size!==i.length)throw new TypeError(`Invalid rangeFields for search rule "${n.field}": expected distinct fields that do not conflict with other rules.`);return i.forEach(o=>r.add(o)),[{field:n.field,fields:i,trimTrailingNulls:n.type==="cascader"}]})}function th(e,t,r){if(!t.length||e==null&&!r.size)return e;const n=R({},e);for(const{field:i,fields:o,trimTrailingNulls:a}of t)if(o.some(s=>Object.prototype.hasOwnProperty.call(n,s))){const s=o.map(u=>{var c;return(c=n[u])!=null?c:null});if(a)for(;s.length&&s[s.length-1]===null;)s.pop();n[i]=s.every(u=>u===null)?null:s,o.forEach(u=>delete n[u])}else r.has(i)&&!Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=null);return n}function rh(e,t){if(!t.length||e==null)return e;const r=R({},e);for(const{field:n,fields:i}of t){if(!Object.prototype.hasOwnProperty.call(r,n))continue;const o=r[n];if(o!=null&&o!==""&&!Array.isArray(o))throw new TypeError(`Invalid range value for search rule "${n}": expected an array or an empty value.`);i.forEach((a,s)=>{var u;r[a]=Array.isArray(o)&&(u=o[s])!=null?u:null}),delete r[n]}return r}const nh=l.defineComponent({name:"AbSearch",__name:"ab-search",props:l.mergeModels({rule:{},compactMode:{type:Boolean,default:!1},collapse:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["update:modelValue","query","reset"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.inject("abTableRef",null),{t:o}=Xe(),a=l.useModel(e,"modelValue"),s=l.ref(n.collapse),u=l.ref(),c=l.ref(),d=l.computed(()=>eh(n.rule.map(N))),f=l.reactive(new Set);l.watch(()=>d.value.map(({field:_,fields:F})=>({field:_,present:a.value!=null&&F.some(A=>Object.prototype.hasOwnProperty.call(a.value,A))})),_=>{const F=new Set(_.map(({field:A})=>A));for(const A of f)F.has(A)||f.delete(A);for(const{field:A,present:C}of _)C&&f.add(A)},{immediate:!0,flush:"sync"});const h=l.computed(()=>th(a.value,d.value,f));let p;function m(_,F){const A=R({},p!=null?p:h.value);for(const C of F.fields())Object.prototype.hasOwnProperty.call(_,C)?A[C]=_[C]:delete A[C];p=A,a.value=rh(A,d.value),l.nextTick(()=>{p===A&&(p=void 0)})}const g=l.reactive({type:"ElFormItem",native:!0,props:{justify:"end"},class:"ab-form-item ab-search__operates",children:[{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:search"}},o("search")],props:{type:"primary"},on:{click:U}},{type:"ElButton",native:!0,children:[{type:"icon",props:{icon:"ep:refresh"}},o("reset")],props:{type:"default"},on:{click:k}},{type:"ElButton",native:!0,children:[o("expand")],props:{type:"primary",link:!0,icon:l.markRaw(sn.ArrowDown)},on:{click:x}}]});l.watchEffect(()=>{g.children[2].children=[o(s.value?"unexpand":"expand")],g.children[2].props.icon=s.value?l.markRaw(sn.ArrowUp):l.markRaw(sn.ArrowDown)}),l.watch(()=>n.rule,()=>{s.value=n.collapse});const y=l.computed(()=>[...n.rule.filter(_=>N(_).hidden!==!0),g]),v=l.computed(()=>n.rule.filter(_=>N(_).hidden===!0).map(_=>l.shallowReactive(re(R({},N(_)),{hidden:!1}))));function S(_,F=new Set){for(const A of _){if(!A||typeof A!="object")continue;const C=N(A);if(typeof C.field=="string"&&F.add(C.field),Array.isArray(C.children)&&S(C.children,F),Array.isArray(C.control))for(const I of C.control)Array.isArray(I.rule)&&S(I.rule,F)}return F}const $=l.computed(()=>S(y.value)),V=l.computed(()=>S(v.value));function P(_){if(h.value==null)return h.value;const F=R({},h.value);for(const A of _)delete F[A];return F}const T=l.computed(_=>{const F=P(V.value);return jr(F,_)?_:F}),E=l.computed(_=>{const F=P($.value);return jr(F,_)?_:F});l.watch(()=>a.value,_=>q());function k(){return me(this,null,function*(){var _,F;(_=u.value)==null||_.resetFields(),yield l.nextTick(),(F=c.value)==null||F.resetFields()})}function N(_){return typeof _.getRule=="function"?_.getRule():_}function q(){var _;(_=i==null?void 0:i.value)==null||_.reload(),r("query",a.value)}function U(){return me(this,null,function*(){yield l.nextTick(),q()})}function x(){s.value=!s.value}return(_,F)=>{const A=l.resolveComponent("ab-form");return l.openBlock(),l.createElementBlock("section",{class:l.normalizeClass(["ab-search",e.compactMode?"compact":""])},[l.createVNode(A,{rule:y.value,"model-value":T.value,"onUpdate:modelValue":F[0]||(F[0]=C=>m(C,u.value)),api:u.value,"onUpdate:api":F[1]||(F[1]=C=>u.value=C)},null,8,["rule","model-value","api"]),l.createVNode(l.Transition,{name:"ab-search-expand",mode:"out-in",appear:"",persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",null,[l.createVNode(A,{rule:v.value,"model-value":E.value,"onUpdate:modelValue":F[2]||(F[2]=C=>m(C,c.value)),api:c.value,"onUpdate:api":F[3]||(F[3]=C=>c.value=C)},null,8,["rule","model-value","api"])],512),[[l.vShow,s.value]])]),_:1})],2)}}}),ih=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},oh=ih(nh,[["__scopeId","data-v-bfc6a8b4"]]),ah=(e,t)=>{e.component("ab-search",oh)};function Mt(e){let t=e.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return t.indexOf("-")===0&&(t=t.substr(1)),t}function Ka(e){return e.replace(e[0],e[0].toLocaleUpperCase())}function De(e,t,r){e&&t&&(e[t]=r)}function ht(e,t){e&&t&&delete e[t]}var go=e=>Object.prototype.toString.call(e).slice(8,-1),B={type(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},Undef(e){return e==null},Element(e){return typeof e=="object"&&!!e&&"nodeType"in e&&e.nodeType===1&&!B.Object(e)},trueArray(e){return Array.isArray(e)&&e.length>0},Function(e){let t=go(e);return t==="Function"||t==="AsyncFunction"},getType(e){return go(e)},empty(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e},Date:e=>B.type(e,"Date"),Object:e=>B.type(e,"Object"),String:e=>B.type(e,"String"),Boolean:e=>B.type(e,"Boolean"),Array:e=>B.type(e,"Array"),Number:e=>B.type(e,"Number")};function fe(e,t){return{}.hasOwnProperty.call(e,t)}function Kr(e,t={},r){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=Reflect.get(t,n);if(Array.isArray(i)||B.Object(i)){let o=Reflect.get(e,n)===void 0;if(Array.isArray(i))o&&De(e,n,[]);else{let a=i;if(a._clone&&r!==void 0)if(r)i=a.getRule(),o&&De(e,n,{});else{De(e,n,a._clone());continue}else o&&De(e,n,{})}Reflect.set(e,n,Kr(Reflect.get(e,n),i,r))}else if(De(e,n,i),!B.Undef(i)){let o=i;B.Undef(o.__json)||Reflect.set(Reflect.get(e,n),"__json",o.__json),B.Undef(o.__origin)||Reflect.set(Reflect.get(e,n),"__origin",o.__origin)}}return r!==void 0&&Array.isArray(e)?e.filter(n=>!n||!n.__ctrl):e}function St(e){return Kr({},{value:e}).value}function Qa(e,t,r){return`[archbiz ${e}]: ${t}`}function pi(e,t){console.error(Qa("err",e))}function lh(e){pi(e instanceof Error?e.toString():String(e)),console.error(e)}var Za=["props"],Xa=["class","style","directives"],el=["on","hook"],Bn="[[T-FORM-PREFIX-",jn="-T-FORM-SUFFIX]]";function pn(e){return Function(`return ${e}`)()}function or(e,t){let r=Kr(Array.isArray(e)?[]:{},e,!0),n=JSON.stringify(r,function(i,o){var u;if(typeof o=="object"&&o&&Reflect.get(o,"_isVue")===!0)return;if(typeof o!="function")return o;let a=o;if(a.__json)return a.__json;let s=(u=a.__origin)!=null?u:o;if(!a.__emit)return`${Bn}${s}${jn}`},t);if(n===void 0)throw TypeError("Unable to serialize the provided value as JSON.");return n}function Qe(e,t){if(typeof e!="string"||e.length<=4)return e;let r=e.trim(),n=!1;try{if(r.indexOf(jn)>0&&r.indexOf(Bn)===0)r=r.replace(jn,"").replace(Bn,""),n=!0;else if(r.indexOf("$FN:")===0)r=r.substring(4),n=!0;else if(r.indexOf("$EXEC:")===0)r=r.substring(6),n=!0;else if(r.indexOf("$GLOBAL:")===0){let o=r.substring(8),a=function(...s){let u=s[0].api.getGlobalEvent(o);if(typeof u=="function")return u.apply(this,s)};return a.__json=e,a.__inject=!0,a}else if(r.indexOf("$FNX:")===0){let o=pn(`function($inject){
8
+ ${r.substring(5)}
9
+ }`);return o.__json=e,o.__inject=!0,o}else(!t&&r.indexOf("function ")===0&&r!=="function "||!t&&r.indexOf("function(")===0&&r!=="function(")&&(n=!0);if(!n)return e;let i;try{i=pn(r)}catch(o){i=pn(`function ${r}`)}return i.__json=e,i}catch(i){pi(`解析失败:${r}
10
+
11
+ err: ${String(i)}`);return}}function tl(e,t){return JSON.parse(e,function(r,n){return typeof n=="string"?Qe(n,t):n})}var tt=(e,t={},r={})=>{let n=[...Za,...r.normal||[]],i=[...Xa,...r.array||[]],o=[...el,...r.functional||[]],a=r.props||[];return e.reduce((s,u)=>{for(let c in u)if(s[c])if(a.indexOf(c)>-1)s[c]=tt([u[c]],s[c]);else if(n.indexOf(c)>-1)s[c]=R(R({},s[c]),u[c]);else if(i.indexOf(c)>-1){let d=s[c]instanceof Array?s[c]:[s[c]],f=u[c]instanceof Array?u[c]:[u[c]];s[c]=[...d,...f]}else if(o.indexOf(c)>-1)for(let d in u[c])if(s[c][d]){let f=s[c][d]instanceof Array?s[c][d]:[s[c][d]],h=u[c][d]instanceof Array?u[c][d]:[u[c][d]];s[c][d]=[...f,...h]}else s[c][d]=u[c][d];else if(c==="hook")for(let d in u[c])s[c][d]?s[c][d]=sh(s[c][d],u[c][d]):s[c][d]=u[c][d];else s[c]=u[c];else s[c]=n.indexOf(c)>-1||o.indexOf(c)>-1||a.indexOf(c)>-1?R({},u[c]):i.indexOf(c)>-1?u[c]instanceof Array?[...u[c]]:typeof u[c]=="object"?R({},u[c]):u[c]:u[c];return s},t)},sh=(e,t)=>function(...r){e&&e.apply(this,r),t&&t.apply(this,r)};function ut(e,t){let r=null;return function(...n){r!==null&&clearTimeout(r),r=setTimeout(()=>e.apply(this,n),t)}}function ct(e,t,r){let n=e,i;return(t||"").split(".").forEach(o=>{i&&(n[i]&&typeof n[i]=="object"||(n[i]={}),n=n[i]),i=o}),n[String(i)]=r,n}function X(e,...t){return(Object.assign||function(r,...n){for(let i of n)for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&De(r,o,Reflect.get(i,o));return r})(e,...t)}function rl(e){return typeof e!="object"||!e?e:Array.isArray(e)?[...e]:R({},e)}function uh(e=new Map){let t={$on(r,n){let i=e.get(r);i&&i.push(n)||e.set(r,[n])},$once(r,n){n._once=!0,t.$on(r,n)},$off(r,n){let i=e.get(r);i&&i.splice(i.indexOf(n)>>>0,1)},$emit(r,...n){(e.get(r)||[]).slice().forEach(i=>{"_once"in i&&i._once&&(t.$off(r,i),delete i._once),i(...n)}),(e.get("*")||[]).slice().forEach(i=>{i(r,n)})}};return t}function ch(e){return e&&typeof e=="object"&&typeof e.then=="function"}function Nn(e){return ch(e)?e:Promise.resolve(e)}function kt(e){return Array.isArray(e)?e:e==null||e===""?[]:[e]}function Pe(e){return nl(e==null?void 0:e.replace(/(-[a-z])/g,function(t){return t.replace("-","").toLocaleUpperCase()}))}function nl(e){return e==null?void 0:e.replace(e[0],e[0].toLowerCase())}function zt(e){return e?typeof e=="object"?JSON.stringify(e,null,2):String(e):""}var dh=0;function Qr(){let e=370+ ++dh;return"F"+Math.random().toString(36).substr(3,3)+(+`${Date.now()}`).toString(36)+e.toString(36)+"c"}function il(e,t,r={}){let{valueField:n="value",childrenField:i="children"}=r;for(let o of e){if(o[n]===t)return o;if(Array.isArray(o[i])){let a=il(o[i],t,r);if(a)return a}}}var fh={black:"#182327"},ph={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ve={h:0,s:0,l:0},wr={h:0,s:0,l:0};function hn(e,t,r){return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*6*(2/3-r):e}var hh=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/,ol=class mt{constructor(t,r,n,i){be(this,"isColor",!0);be(this,"r",1);be(this,"g",1);be(this,"b",1);be(this,"a",1);return r===void 0&&n===void 0?this.set(t):this.setRGBA(t,r,n,i)}static isColor(t){return typeof t=="string"?hh.test(t):typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=16777215&&t.toString(6).length===6}static getRandomStyle(t){return t?Ue.random().setA(t).getStyle():Ue.random().getStyle()}static getDarken(t,r=.8){return Ue.set(t).getHSL(xr),Ue.setHSL(xr.h,xr.s,xr.l*r).getStyle()}static getLighten(t,r=1.2){return this.getDarken(t,r)}static getContrast(t){return Ue.set(t),Ue.getContrastString()}static getArray(t){return Ue.set(t).toArray()}static getComplementary(t){return Ue.set(t),Ue.getComplementaryString()}static getMoreTransparent(t,r){return Ue.set(t).setA(r).getStyle()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,r,n){return this.setRGBA(t,r,n,this.a)}setRGBA(t,r,n,i=1){return this.r=t,this.g=r,this.b=n,this.a=i,this}setHSL(t,r,n,i=1){if(t=mh(t,1),r=Ut(r,0,1),n=Ut(n,0,1),r===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+r):n+r-n*r,a=2*n-o;this.r=hn(a,o,t+1/3),this.g=hn(a,o,t),this.b=hn(a,o,t-1/3)}return this.a=i,this}setStyle(t){let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let n,i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,this.a=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0),this;break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let a=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,u=parseInt(n[3],10)/100,c=Math.max(Math.min(1,n[4]===void 0?1:parseFloat(n[4])),0);return this.setHSL(a,s,u,c)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let n=r[1],i=n.length;if(i===3)return this.r=parseInt(n.charAt(0)+n.charAt(0),16)/255,this.g=parseInt(n.charAt(1)+n.charAt(1),16)/255,this.b=parseInt(n.charAt(2)+n.charAt(2),16)/255,this.a=1,this;if(i===6)return this.r=parseInt(n.charAt(0)+n.charAt(1),16)/255,this.g=parseInt(n.charAt(2)+n.charAt(3),16)/255,this.b=parseInt(n.charAt(4)+n.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let r=ph[t.toLowerCase()];return r===void 0?console.warn("Color: Unknown color "+t):this.setHex(r),this}clone(){return new mt(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new mt){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new mt){let r=this.a,n=r*this.r+(1-r)*t.r,i=r*this.g+(1-r)*t.g,o=r*this.b+(1-r)*t.b;return new mt(n,i,o)}getHex(){return Ut(this.r*255,0,255)<<16^Ut(this.g*255,0,255)<<8^Ut(this.b*255,0,255)}getHSL(t){let r=this.r,n=this.g,i=this.b,o=Math.max(r,n,i),a=Math.min(r,n,i),s=0,u,c=(a+o)/2;if(a===o)s=0,u=0;else{let d=o-a;switch(u=c<=.5?d/(o+a):d/(2-o-a),o){case r:s=(n-i)/d+(n<i?6:0);break;case n:s=(i-r)/d+2;break;case i:s=(r-n)/d+4}s/=6}return t.h=s,t.s=u,t.l=c,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new mt){let r=this.toArray(),n=[0,0,0,1];for(let i=0;i<r.length;i++)if(i<3)n[i]=1-r[i];else if(i===3)r[i]>1||r[i]<=0?n[i]=1:n[i]=Math.max(Math.min(parseFloat(r[i].toFixed(2)),1),0);else continue;return t.setRGBA(n[0],n[1],n[2],parseFloat(n[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(t===void 0||t>=1)return this.getHexString();let r=this.getRGBByBg(),n=r.r*t+(1-t),i=r.g*t+(1-t),o=r.b*t+(1-t);return new mt(n,i,o).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,r,n){return this.getHSL(Ve),Ve.h+=t,Ve.s+=r,Ve.l+=n,this.setHSL(Ve.h,Ve.s,Ve.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,r){return this.r=t.r+r.r,this.g=t.g+r.g,this.b=t.b+r.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,r){return this.r+=(t.r-this.r)*r,this.g+=(t.g-this.g)*r,this.b+=(t.b-this.b)*r,this}lerpColors(t,r,n){return this.r=t.r+(r.r-t.r)*n,this.g=t.g+(r.g-t.g)*n,this.b=t.b+(r.b-t.b)*n,this}lerpHSL(t,r){this.getHSL(Ve),t.getHSL(wr);let n=mn(Ve.h,wr.h,r),i=mn(Ve.s,wr.s,r),o=mn(Ve.l,wr.l,r);return this.setHSL(n,i,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}toArray(t=[0,0,0,0],r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,t}fromBufferAttribute(t,r){return this.r=t.getX(r),this.g=t.getY(r),this.b=t.getZ(r),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ut=(e,t,r)=>Math.max(t,Math.min(r,e)),mh=(e,t)=>(e%t+t)%t,mn=(e,t,r)=>(1-r)*e+r*t,Ue=new ol,xr={h:0,s:0,l:0};function al(){let e=window.localStorage.getItem("user"),t=e?JSON.parse(e):{};return t.permissions=new Set(t.permissions||[]),t}function gn(e,t){let r=!1;return!(e!=null&&e.length)&&!(t!=null&&t.length)||(e&&e.length>0&&(r=yh(e)),t&&t.length>0&&(r||(r=vh(t))),r)}var gh="*:*:*",yh=(e=[])=>{var r;let t=al();return((r=t==null?void 0:t.permissions)==null?void 0:r.has(gh))||e.some(n=>{var i;return(i=t==null?void 0:t.permissions)==null?void 0:i.has(n)})};function vh(e){var t;if(e&&e instanceof Array&&e.length>0){let r=e;return!!(((t=al())==null?void 0:t.roles)||[]).some(n=>n==="super_admin"||r.includes(n))}return console.error("permission.hasRole"),!1}var dr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ll={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r=1e3,n=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",c="day",d="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var A=["th","st","nd","rd"],C=F%100;return"["+F+(A[(C-20)%10]||A[C]||A[0])+"]"}},$=function(F,A,C){var I=String(F);return!I||I.length>=A?F:""+Array(A+1-I.length).join(C)+F},V={s:$,z:function(F){var A=-F.utcOffset(),C=Math.abs(A),I=Math.floor(C/60),D=C%60;return(A<=0?"+":"-")+$(I,2,"0")+":"+$(D,2,"0")},m:function F(A,C){if(A.date()<C.date())return-F(C,A);var I=12*(C.year()-A.year())+(C.month()-A.month()),D=A.clone().add(I,f),G=C-D<0,Q=A.clone().add(I+(G?-1:1),f);return+(-(I+(C-D)/(G?D-Q:Q-D))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:d,d:c,D:m,h:u,m:s,s:a,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},P="en",T={};T[P]=S;var E="$isDayjsObject",k=function(F){return F instanceof x||!(!F||!F[E])},N=function F(A,C,I){var D;if(!A)return P;if(typeof A=="string"){var G=A.toLowerCase();T[G]&&(D=G),C&&(T[G]=C,D=G);var Q=A.split("-");if(!D&&Q.length>1)return F(Q[0])}else{var Z=A.name;T[Z]=A,D=Z}return!I&&D&&(P=D),D||!I&&P},q=function(F,A){if(k(F))return F.clone();var C=typeof A=="object"?A:{};return C.date=F,C.args=arguments,new x(C)},U=V;U.l=N,U.i=k,U.w=function(F,A){return q(F,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var x=function(){function F(C){this.$L=N(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[E]=!0}var A=F.prototype;return A.parse=function(C){this.$d=function(I){var D=I.date,G=I.utc;if(D===null)return new Date(NaN);if(U.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Q=D.match(y);if(Q){var Z=Q[2]-1||0,M=(Q[7]||"0").substring(0,3);return G?new Date(Date.UTC(Q[1],Z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,M)):new Date(Q[1],Z,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,M)}}return new Date(D)}(C),this.init()},A.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},A.$utils=function(){return U},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(C,I){var D=q(C);return this.startOf(I)<=D&&D<=this.endOf(I)},A.isAfter=function(C,I){return q(C)<this.startOf(I)},A.isBefore=function(C,I){return this.endOf(I)<q(C)},A.$g=function(C,I,D){return U.u(C)?this[I]:this.set(D,C)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(C,I){var D=this,G=!!U.u(I)||I,Q=U.p(C),Z=function(w,O){var j=U.w(D.$u?Date.UTC(D.$y,O,w):new Date(D.$y,O,w),D);return G?j:j.endOf(c)},M=function(w,O){return U.w(D.toDate()[w].apply(D.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(O)),D)},H=this.$W,Y=this.$M,ne=this.$D,ue="set"+(this.$u?"UTC":"");switch(Q){case p:return G?Z(1,0):Z(31,11);case f:return G?Z(1,Y):Z(0,Y+1);case d:var J=this.$locale().weekStart||0,b=(H<J?H+7:H)-J;return Z(G?ne-b:ne+(6-b),Y);case c:case m:return M(ue+"Hours",0);case u:return M(ue+"Minutes",1);case s:return M(ue+"Seconds",2);case a:return M(ue+"Milliseconds",3);default:return this.clone()}},A.endOf=function(C){return this.startOf(C,!1)},A.$set=function(C,I){var D,G=U.p(C),Q="set"+(this.$u?"UTC":""),Z=(D={},D[c]=Q+"Date",D[m]=Q+"Date",D[f]=Q+"Month",D[p]=Q+"FullYear",D[u]=Q+"Hours",D[s]=Q+"Minutes",D[a]=Q+"Seconds",D[o]=Q+"Milliseconds",D)[G],M=G===c?this.$D+(I-this.$W):I;if(G===f||G===p){var H=this.clone().set(m,1);H.$d[Z](M),H.init(),this.$d=H.set(m,Math.min(this.$D,H.daysInMonth())).$d}else Z&&this.$d[Z](M);return this.init(),this},A.set=function(C,I){return this.clone().$set(C,I)},A.get=function(C){return this[U.p(C)]()},A.add=function(C,I){var D,G=this;C=Number(C);var Q=U.p(I),Z=function(Y){var ne=q(G);return U.w(ne.date(ne.date()+Math.round(Y*C)),G)};if(Q===f)return this.set(f,this.$M+C);if(Q===p)return this.set(p,this.$y+C);if(Q===c)return Z(1);if(Q===d)return Z(7);var M=(D={},D[s]=n,D[u]=i,D[a]=r,D)[Q]||1,H=this.$d.getTime()+C*M;return U.w(H,this)},A.subtract=function(C,I){return this.add(-1*C,I)},A.format=function(C){var I=this,D=this.$locale();if(!this.isValid())return D.invalidDate||g;var G=C||"YYYY-MM-DDTHH:mm:ssZ",Q=U.z(this),Z=this.$H,M=this.$m,H=this.$M,Y=D.weekdays,ne=D.months,ue=D.meridiem,J=function(O,j,z,oe){return O&&(O[j]||O(I,G))||z[j].slice(0,oe)},b=function(O){return U.s(Z%12||12,O,"0")},w=ue||function(O,j,z){var oe=O<12?"AM":"PM";return z?oe.toLowerCase():oe};return G.replace(v,function(O,j){return j||function(z){switch(z){case"YY":return String(I.$y).slice(-2);case"YYYY":return U.s(I.$y,4,"0");case"M":return H+1;case"MM":return U.s(H+1,2,"0");case"MMM":return J(D.monthsShort,H,ne,3);case"MMMM":return J(ne,H);case"D":return I.$D;case"DD":return U.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return J(D.weekdaysMin,I.$W,Y,2);case"ddd":return J(D.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(Z);case"HH":return U.s(Z,2,"0");case"h":return b(1);case"hh":return b(2);case"a":return w(Z,M,!0);case"A":return w(Z,M,!1);case"m":return String(M);case"mm":return U.s(M,2,"0");case"s":return String(I.$s);case"ss":return U.s(I.$s,2,"0");case"SSS":return U.s(I.$ms,3,"0");case"Z":return Q}return null}(O)||Q.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(C,I,D){var G,Q=this,Z=U.p(I),M=q(C),H=(M.utcOffset()-this.utcOffset())*n,Y=this-M,ne=function(){return U.m(Q,M)};switch(Z){case p:G=ne()/12;break;case f:G=ne();break;case h:G=ne()/3;break;case d:G=(Y-H)/6048e5;break;case c:G=(Y-H)/864e5;break;case u:G=Y/i;break;case s:G=Y/n;break;case a:G=Y/r;break;default:G=Y}return D?G:U.a(G)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return T[this.$L]},A.locale=function(C,I){if(!C)return this.$L;var D=this.clone(),G=N(C,I,!0);return G&&(D.$L=G),D},A.clone=function(){return U.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},F}(),_=x.prototype;return q.prototype=_,[["$ms",o],["$s",a],["$m",s],["$H",u],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(F){_[F[1]]=function(A){return this.$g(A,F[0],F[1])}}),q.extend=function(F,A){return F.$i||(F(A,x,q),F.$i=!0),q},q.locale=N,q.isDayjs=k,q.unix=function(F){return q(1e3*F)},q.en=T[P],q.Ls=T,q.p={},q})})(ll);var bh=ll.exports;const ce=jt(bh);var wh={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r,n,i=1e3,o=6e4,a=36e5,s=864e5,u=31536e6,c=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:u,months:c,days:s,hours:a,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},p=function(T){return T instanceof V},m=function(T,E,k){return new V(T,k,E.$l)},g=function(T){return n.p(T)+"s"},y=function(T){return T<0},v=function(T){return y(T)?Math.ceil(T):Math.floor(T)},S=function(T){return Math.abs(T)},$=function(T,E){return T?y(T)?{negative:!0,format:""+S(T)+E}:{negative:!1,format:""+T+E}:{negative:!1,format:""}},V=function(){function T(k,N,q){var U=this;if(this.$d={},this.$l=q,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),N)return m(k*h[g(N)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach(function(F){U.$d[g(F)]=k[F]}),this.calMilliseconds(),this;if(typeof k=="string"){var x=k.match(d);if(x){var _=x.slice(2).map(function(F){return F!=null?Number(F):0});return this.$d.years=_[0],this.$d.months=_[1],this.$d.weeks=_[2],this.$d.days=_[3],this.$d.hours=_[4],this.$d.minutes=_[5],this.$d.seconds=_[6],this.calMilliseconds(),this}}return this}var E=T.prototype;return E.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce(function(N,q){return N+(k.$d[q]||0)*h[q]},0)},E.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=v(k/u),k%=u,this.$d.months=v(k/c),k%=c,this.$d.days=v(k/s),k%=s,this.$d.hours=v(k/a),k%=a,this.$d.minutes=v(k/o),k%=o,this.$d.seconds=v(k/i),k%=i,this.$d.milliseconds=k},E.toISOString=function(){var k=$(this.$d.years,"Y"),N=$(this.$d.months,"M"),q=+this.$d.days||0;this.$d.weeks&&(q+=7*this.$d.weeks);var U=$(q,"D"),x=$(this.$d.hours,"H"),_=$(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var A=$(F,"S"),C=k.negative||N.negative||U.negative||x.negative||_.negative||A.negative,I=x.format||_.format||A.format?"T":"",D=(C?"-":"")+"P"+k.format+N.format+U.format+I+x.format+_.format+A.format;return D==="P"||D==="-P"?"P0D":D},E.toJSON=function(){return this.toISOString()},E.format=function(k){var N=k||"YYYY-MM-DDTHH:mm:ss",q={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return N.replace(f,function(U,x){return x||String(q[U])})},E.as=function(k){return this.$ms/h[g(k)]},E.get=function(k){var N=this.$ms,q=g(k);return q==="milliseconds"?N%=1e3:N=q==="weeks"?v(N/h[q]):this.$d[q],N||0},E.add=function(k,N,q){var U;return U=N?k*h[g(N)]:p(k)?k.$ms:m(k,this).$ms,m(this.$ms+U*(q?-1:1),this)},E.subtract=function(k,N){return this.add(k,N,!0)},E.locale=function(k){var N=this.clone();return N.$l=k,N},E.clone=function(){return m(this.$ms,this)},E.humanize=function(k){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},T}(),P=function(T,E,k){return T.add(E.years()*k,"y").add(E.months()*k,"M").add(E.days()*k,"d").add(E.hours()*k,"h").add(E.minutes()*k,"m").add(E.seconds()*k,"s").add(E.milliseconds()*k,"ms")};return function(T,E,k){r=k,n=k().$utils(),k.duration=function(U,x){var _=k.locale();return m(U,{$l:_},x)},k.isDuration=p;var N=E.prototype.add,q=E.prototype.subtract;E.prototype.add=function(U,x){return p(U)?P(this,U,1):N.bind(this)(U,x)},E.prototype.subtract=function(U,x){return p(U)?P(this,U,-1):q.bind(this)(U,x)}}})})(wh);var sl={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){return function(r,n){var i=n.prototype,o=i.format;i.format=function(a){var s=this,u=this.$locale();if(!this.isValid())return o.bind(this)(a);var c=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return u.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return u.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),f==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),f==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return f}});return o.bind(this)(d)}}})})(sl);var xh=sl.exports;const Sh=jt(xh);var ul={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r="day";return function(n,i,o){var a=function(c){return c.add(4-c.isoWeekday(),r)},s=i.prototype;s.isoWeekYear=function(){return a(this).year()},s.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),r);var d,f,h,p,m=a(this),g=(d=this.isoWeekYear(),f=this.$u,h=(f?o.utc:o)().year(d).startOf("year"),p=4-h.isoWeekday(),h.isoWeekday()>4&&(p+=7),h.add(p,r));return m.diff(g,"week")+1},s.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=s.startOf;s.startOf=function(c,d){var f=this.$utils(),h=!!f.u(d)||d;return f.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,d)}}})})(ul);var Ch=ul.exports;const $h=jt(Ch);var cl={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(dr,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,u={},c=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(v){this[y]=+v}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var S=v.match(/([+-]|\d\d)/g),$=60*S[1]+(+S[2]||0);return $===0?0:S[0]==="+"?-$:$}(y)}],h=function(y){var v=u[y];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(y,v){var S,$=u.meridiem;if($){for(var V=1;V<=24;V+=1)if(y.indexOf($(V,0,v))>-1){S=V>12;break}}else S=y===(v?"pm":"PM");return S},m={A:[s,function(y){this.afternoon=p(y,!1)}],a:[s,function(y){this.afternoon=p(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[o,d("day")],Do:[s,function(y){var v=u.ordinal,S=y.match(/\d+/);if(this.day=S[0],v)for(var $=1;$<=31;$+=1)v($).replace(/\[|\]/g,"")===y&&(this.day=$)}],w:[a,d("week")],ww:[o,d("week")],M:[a,d("month")],MM:[o,d("month")],MMM:[s,function(y){var v=h("months"),S=(h("monthsShort")||v.map(function($){return $.slice(0,3)})).indexOf(y)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[s,function(y){var v=h("months").indexOf(y)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[o,function(y){this.year=c(y)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(y){var v,S;v=y,S=u&&u.formats;for(var $=(y=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(q,U,x){var _=x&&x.toUpperCase();return U||S[x]||r[x]||S[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,A,C){return A||C.slice(1)})})).match(n),V=$.length,P=0;P<V;P+=1){var T=$[P],E=m[T],k=E&&E[0],N=E&&E[1];$[P]=N?{regex:k,parser:N}:T.replace(/^\[|\]$/g,"")}return function(q){for(var U={},x=0,_=0;x<V;x+=1){var F=$[x];if(typeof F=="string")_+=F.length;else{var A=F.regex,C=F.parser,I=q.slice(_),D=A.exec(I)[0];C.call(U,D),q=q.replace(D,"")}}return function(G){var Q=G.afternoon;if(Q!==void 0){var Z=G.hours;Q?Z<12&&(G.hours+=12):Z===12&&(G.hours=0),delete G.afternoon}}(U),U}}return function(y,v,S){S.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var $=v.prototype,V=$.parse;$.parse=function(P){var T=P.date,E=P.utc,k=P.args;this.$u=E;var N=k[1];if(typeof N=="string"){var q=k[2]===!0,U=k[3]===!0,x=q||U,_=k[2];U&&(_=k[2]),u=this.$locale(),!q&&_&&(u=S.Ls[_]),this.$d=function(I,D,G,Q){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*I);var Z=g(D)(I),M=Z.year,H=Z.month,Y=Z.day,ne=Z.hours,ue=Z.minutes,J=Z.seconds,b=Z.milliseconds,w=Z.zone,O=Z.week,j=new Date,z=Y||(M||H?1:j.getDate()),oe=M||j.getFullYear(),ie=0;M&&!H||(ie=H>0?H-1:j.getMonth());var pe,Ee=ne||0,Ce=ue||0,Oe=J||0,ve=b||0;return w?new Date(Date.UTC(oe,ie,z,Ee,Ce,Oe,ve+60*w.offset*1e3)):G?new Date(Date.UTC(oe,ie,z,Ee,Ce,Oe,ve)):(pe=new Date(oe,ie,z,Ee,Ce,Oe,ve),O&&(pe=Q(pe).week(O).toDate()),pe)}catch(Re){return new Date("")}}(T,N,E,S),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),x&&T!=this.format(N)&&(this.$d=new Date("")),u={}}else if(N instanceof Array)for(var F=N.length,A=1;A<=F;A+=1){k[1]=N[A-1];var C=S.apply(this,k);if(C.isValid()){this.$d=C.$d,this.$L=C.$L,this.init();break}A===F&&(this.$d=new Date(""))}else V.call(this,P)}}})})(cl);var Th=cl.exports;const Eh=jt(Th),kh=cr()==="zh-cn";ce.extend($h);ce.extend(Sh);ce.extend(Eh);function nt(e){return typeof e=="undefined"||e==="undefined"||e==="null"||e===null||e===""||isNaN(e)}function _h(e){if(nt(e))return e;let t="";return kh?t=Intl.NumberFormat("zh-CN",{style:"currency",currency:"CNY"}).format(e):t=Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e),t}function Fh(e){return nt(e)?e:(Math.round(e*100)/100).toLocaleString()}function Ah(e){return nt(e)?e:Math.round(e*100)/100+" %"}function _e(e,t="YYYY-MM-DD"){if(e==null||e==="")return e;const r=ce(e);return r.isValid()?r.format(t):e}function Oh(e,t,r="label",n){const i=[];if(Array.isArray(t)&&!t.length)return"";if(Array.isArray(t))for(let a=0,s=t.length;a<s;a++)t[a]=String(t[a]).trim().normalize();else t=String(t).trim().normalize();if(!(e!=null&&e.length))return nt(t)?"":t;const o=a=>!0;return Array.isArray(t)?i.push(...wt(e,a=>t.includes(String(a.value))&&o())):i.push(...wt(e,a=>(a.value===t||String(a.value)===String(t))&&o())),i!=null&&i.length?Zp(Uf(Na(i,r))).join("、"):Array.isArray(t)||nt(t)?"":t}const yo=({cellValue:e}={},t="YYYY-MM-DD HH:mm")=>_e(e,t),yn=({cellValue:e}={},t="YYYY")=>_e(e,t),vn=({cellValue:e}={},t="Q")=>e==null||e===""||!ce(e).isValid()?e:xt()?_e(e,"YYYY")+"年"+_e(e,t)+"季度":"Quarter "+_e(e,t)+", "+_e(e,"YYYY"),bn=({cellValue:e}={},t="MM")=>e==null||e===""||!ce(e).isValid()?e:xt()?_e(e,"YYYY")+"年 "+_e(e,t)+"月":_e(e,t)+"/"+_e(e,"YYYY"),Ph=({cellValue:e}={},t="W")=>{if(e==null||e==="")return e;const r=typeof e=="string"&&/^(\d{4})-(\d{1,2})(?:st|nd|rd|th|周)$/i.exec(e);if(!r&&!ce(e).isValid())return e;const n=r?r[1]:_e(e,"GGGG"),i=r?r[2]:_e(e,t);return xt()?n+"年第"+i+"周":"Week "+i+", "+n},vo=({cellValue:e,itemValue:t}={})=>((typeof e=="undefined"||e===null)&&(e=t),nt(e)?e:Fh(e)),bo=({cellValue:e}={})=>nt(e)?e:Ah(e),wo=({cellValue:e,itemValue:t}={})=>(nt(e)&&(e=t),nt(e)?e:_h(e)),Rh=new Map([["radio",xo],["checkbox",xo],["switch",Mh],["treeSelect",Dh],["cascader",Ih],["inputNumber",()=>typeof vo=="function"?vo:void 0],["inputCurrency",()=>typeof wo=="function"?wo:void 0],["inputPercent",()=>typeof bo=="function"?bo:void 0],["datePicker",Bh],["timePicker",jh]]);function hi(e){var n;if(typeof e.formatter=="function")return re(R({},e),{formatter:e.formatter});const t=Rh.get((n=e.type)!=null?n:"");let r;return t?r=t(e):Array.isArray(e.options)&&e.options.length>0&&(r=Nh(e)),re(R({},e),{formatter:r})}function dl(e,t){if(typeof e!="string"||typeof t!="string"||t==="YYYY-wo")return e;const r=t==="x"||t==="X"?ce(Number(e)*(t==="X"?1e3:1)):ce(e,t,!0);return r.isValid()?r:e}function xo(e){var r;const t=((r=e.props)==null?void 0:r.options)||e.options;return({cellValue:n})=>n==null||n===""?"":(Array.isArray(n)?n:[n]).map(o=>{var s,u;const a=Array.isArray(t)?t.find(c=>(c==null?void 0:c.value)===o):void 0;return(u=(s=a==null?void 0:a.label)!=null?s:o)!=null?u:""}).join("、")}function Mh(e){return({cellValue:t})=>{var a;const{activeValue:r=!0,inactiveValue:n=!1,activeText:i,inactiveText:o}=(a=e.props)!=null?a:{};return t===r?i||(xt()?"开启":"On"):t===n?o||(xt()?"关闭":"Off"):t!=null?t:""}}function Dh(e){var s,u,c,d,f,h,p;const t=(s=e.props)!=null?s:{},r=(u=t.props)!=null?u:{},n=e.optionsTo==="props.data"&&Array.isArray(e.options)?e.options:t.data,i=(f=(d=(c=r.value)!=null?c:t.nodeKey)!=null?d:t.valueKey)!=null?f:"value",o=(h=r.label)!=null?h:"label",a=(p=r.children)!=null?p:"children";return({cellValue:m})=>m==null||m===""?"":(Array.isArray(m)?m:[m]).map(y=>{var S;const v=Array.isArray(n)?il(n,y,{valueField:i,childrenField:a}):void 0;return(S=v==null?void 0:v[o])!=null?S:y}).join("、")}function fl(e,t,r,n){for(const i of e){if(jr(i[r],t))return[i];const o=i[n];if(Array.isArray(o)){const a=fl(o,t,r,n);if(a)return[i,...a]}}}function Ih(e){var f,h,p,m,g,y;const t=(f=e.props)!=null?f:{},r=(h=t.props)!=null?h:{},n=e.optionsTo==="props.options"&&Array.isArray(e.options)?e.options:t.options,i=(p=r.value)!=null?p:"value",o=(m=r.label)!=null?m:"label",a=(g=r.children)!=null?g:"children",s=Array.isArray(n)?n:[],u=(y=t.separator)!=null?y:" / ",c=t.showAllLevels!==!1;function d(v){let S;if(r.emitPath===!1){const $=fl(s,v,i,a);S=$?$.map(V=>{var P;return(P=V[o])!=null?P:V[i]}):[v]}else{const $=Array.isArray(v)?v:[v];let V=s;S=$.map(P=>{var k;const T=V.find(N=>jr(N[i],P)),E=T==null?void 0:T[a];return V=Array.isArray(E)?E:[],(k=T==null?void 0:T[o])!=null?k:P})}return(c?S:S.slice(-1)).join(u)}return({cellValue:v})=>v==null||v===""?"":r.multiple===!0?(Array.isArray(v)?v:[v]).map(d).join("、"):d(v)}const wn={year:yn,years:yn,yearrange:yn,quarter:vn,quarters:vn,quarterrange:vn,month:bn,months:bn,monthrange:bn,week:Ph,datetime:yo,datetimerange:yo};function Bh(e){var n,i;const t=(i=(n=e.props)==null?void 0:n.type)!=null?i:"date",r=o=>{var s,u,c,d;if(o==null||o==="")return"";const a=dl(o,(s=e.props)==null?void 0:s.valueFormat);return(u=e.props)!=null&&u.format?_e(a,e.props.format):(d=(c=wn[t])==null?void 0:c.call(wn,{cellValue:a}))!=null?d:_e(a)};return({cellValue:o})=>{var s,u;if(!Array.isArray(o))return r(o);if(o.every(c=>c==null||c===""))return"";const a=t.endsWith("range")?(u=(s=e.props)==null?void 0:s.rangeSeparator)!=null?u:" - ":"、";return o.map(r).join(a)}}function jh(e){const t=r=>{var i,o,a,s;if(r==null||r==="")return"";const n=dl(r,(o=(i=e.props)==null?void 0:i.valueFormat)!=null?o:"HH:mm");return _e(n,(s=(a=e.props)==null?void 0:a.format)!=null?s:"HH:mm")};return({cellValue:r})=>{var n,i;return Array.isArray(r)?r.every(o=>o==null||o==="")?"":r.map(t).join((i=(n=e.props)==null?void 0:n.rangeSeparator)!=null?i:" - "):t(r)}}function Nh(e){return({cellValue:t})=>Oh(e.options,t)}function pl(e="small"){return e==="large"?"medium":e==="default"?"small":"mini"}const de={DETAIL:"detail",DEL:"del",ADD:"add",EDIT:"edit",SAVE:"save",CREATE:"create",READ:"read",UPDATE:"update",EXPORT:"export",OPERATE:"OPERATE"};function So(e){let t=0;for(const r of e)r.group&&(t=Math.max(t,gd(r.group).length));return t+1}const hl=()=>{const{t:e}=Xe();return{info(t){L.ElMessage.info(t)},error(t){L.ElMessage.error(t)},success(t){L.ElMessage.success(t)},warning(t){L.ElMessage.warning(t)},alert(t){L.ElMessageBox.alert(t,e("common.confirmTitle"))},alertError(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"error"})},alertSuccess(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"success"})},alertWarning(t){L.ElMessageBox.alert(t,e("common.confirmTitle"),{type:"warning"})},notify(t){L.ElNotification.info(t)},notifyError(t){L.ElNotification.error(t)},notifySuccess(t){L.ElNotification.success(t)},notifyWarning(t){L.ElNotification.warning(t)},confirm(t,r){return L.ElMessageBox.confirm(t,r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},delConfirm(t,r){return L.ElMessageBox.confirm(t||e("common.delMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},exportConfirm(t,r){return L.ElMessageBox.confirm(t||e("common.exportMessage"),r||e("common.confirmTitle"),{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})},prompt(t,r){return L.ElMessageBox.prompt(t,r,{confirmButtonText:e("common.ok"),cancelButtonText:e("common.cancel"),type:"warning"})}}},Zr=l.defineComponent({name:"AbTableOperate",__name:"ab-table-operate",props:l.mergeModels({rule:{},modelValue:{},idField:{},idFieldTable:{},permiPrefix:{},api:{},link:{type:Boolean},plain:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},{api:{},apiModifiers:{}}),emits:l.mergeModels(["refresh","operated"],["update:api"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Xe(),a=hl(),s=l.inject("abTableDetailRef",void 0),u=l.inject("abTableRef",void 0),{wsCache:c}=Se(),d=l.computed(()=>c.getCurrentSize||"default"),f=l.useModel(e,"api"),h=l.computed(()=>{var V;if(!i.rule||Array.isArray(i.rule)&&!((V=i.rule)!=null&&V.length))return;const $=Array.isArray(i.rule)?{type:"ElRow",children:[...st(i.rule)],native:!0}:re(R({},st(i.rule)),{native:!0});return delete $.field,ja($==null?void 0:$.children,P=>{xe(P,"props.plain",i.plain),xe(P,"props.link",i.link),xe(P,"props.size",d.value),P.field===de.CREATE?(xe(P,"children",[{type:"icon",props:{icon:"ep:plus"}},o(`action.${de.CREATE}`)]),xe(P,"props",{type:"primary",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",m),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",p)):P.field===de.DETAIL?(xe(P,"children",[{type:"icon",props:{icon:"ep:view"}},o(`action.${de.DETAIL}`)]),xe(P,"props",{type:"primary",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",g)):P.field===de.DEL?(xe(P,"children",[{type:"icon",props:{icon:"ep:delete"}},o(`action.${de.DEL}`)]),xe(P,"props",{type:"danger",plain:i.plain,link:i.link}),We(P,"on.click")||xe(P,"on.click",v),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",y)):P.field===de.EXPORT&&(xe(P,"children",[{type:"icon",props:{icon:"ep:download"}},o(`action.${de.EXPORT}`)]),xe(P,"props",{type:"warning",plain:i.plain,link:i.link}),i.permiPrefix&&!We(P,"computed.hidden")&&xe(P,"computed.hidden",S)),xe(P,"native",!0)}),[$]});function p(){return!gn([`${i.permiPrefix}:create`],["admin"])}function m(){var $,V;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((V=s==null?void 0:s.value)==null||V.toggle(!0,i.modelValue,!1))}function g(){var $,V;typeof(($=s==null?void 0:s.value)==null?void 0:$.toggle)=="function"&&((V=s==null?void 0:s.value)==null||V.toggle(!0,i.modelValue,i.readonly))}function y(){return!gn([`${i.permiPrefix}:delete`],["admin"])}function v(){return me(this,null,function*(){var V,P;(yield a.delConfirm().catch(T=>T))==="confirm"&&(typeof i.deleteHandler=="function"&&i.idField&&(yield i.deleteHandler((V=i.modelValue)==null?void 0:V[i.idField])),yield l.nextTick(),(P=u==null?void 0:u.value)==null||P.remove(i.modelValue),n("refresh"))})}function S(){return!gn([`${i.permiPrefix}:export`],["admin"])}return t({}),($,V)=>{const P=l.resolveComponent("ab-form");return l.openBlock(),l.createBlock(P,{rule:h.value,"model-value":e.modelValue,api:f.value,"onUpdate:api":V[0]||(V[0]=T=>f.value=T)},null,8,["rule","model-value","api"])}}}),Vh={class:"ab-table-detail__title"},ml=l.defineComponent({name:"AbTableDetail",__name:"ab-table-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},visible:{type:Boolean},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Xe(),a=lr.useRoute(),s=l.ref(),u=l.ref({}),c=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.visible),h=l.ref(i.readonly);l.watch(()=>i.readonly,x=>h.value=x,{immediate:!0});const p=l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");i.id;const m=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),g=l.computed(()=>m.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:h.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),y=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),v=()=>{var x;h.value=!1,(x=u.value)==null||x.refresh()},S=()=>me(this,null,function*(){E.value=!0;let x;m.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!m.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),E.value=!1}),$=()=>{var x;h.value=!0,(x=u.value)==null||x.refresh()},V=()=>N(),P=l.computed(()=>{const x=st(y.value.find(_=>_.type!==de.OPERATE&&_.field===de.OPERATE));if(x)return x.children=wt(x==null?void 0:x.children,_=>_.field!==de.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!h.value},on:{click:v}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:h.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:h.value},on:{click:$}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:V}}),x}),T=l.computed(()=>l.reactive(y.value.filter(x=>x.type!==de.OPERATE&&x.field!==de.OPERATE).map(x=>st(x)))),E=l.ref(!1),k=(x=void 0,_=!1)=>me(this,null,function*(){var F,A;if(h.value=_,f.value=!0,E.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=st(x)||{};(F=i.rule)==null||F.forEach(I=>{const D=typeof I.getRule=="function"?I.getRule():I;D.field&&D.field!==de.OPERATE&&typeof(C==null?void 0:C[D.field])=="undefined"&&typeof D.edit=="undefined"&&typeof D.itemRender=="undefined"&&(C[D.field]="")}),d.value=C}yield l.nextTick(),(A=u.value)==null||A.refresh(),n("open",d.value),E.value=!1}),N=()=>{h.value=!0,f.value=!1,d.value={}};return t({open:k,close:N,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):N(),reload:()=>me(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,h.value)})}),(x,_)=>{const F=l.resolveComponent("ab-form"),A=l.resolveComponent("el-drawer"),C=l.resolveDirective("loading");return l.openBlock(),l.createBlock(A,{modelValue:f.value,"onUpdate:modelValue":_[3]||(_[3]=I=>f.value=I),"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:p.value,class:"ab-table-detail","header-class":"ab-table-detail__header"},{header:l.withCtx(()=>[l.createElementVNode("div",Vh,l.toDisplayString(g.value),1),l.withDirectives(l.createVNode(Zr,{class:"ab-table-detail__opr","permi-prefix":e.permiPrefix,rule:P.value,"model-value":d.value,api:c.value,"onUpdate:api":_[0]||(_[0]=I=>c.value=I),plain:"",readonly:h.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,E.value]])]),default:l.withCtx(()=>[l.withDirectives(l.createVNode(F,{ref_key:"formRef",ref:s,rule:T.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=I=>d.value=I),api:u.value,"onUpdate:api":_[2]||(_[2]=I=>u.value=I),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:h.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,E.value]])]),_:1},8,["modelValue","size"])}}});function gl(e){return typeof e=="object"&&e!==null&&"name"in e&&typeof e.name=="string"}function Lh(e){return typeof e=="string"||typeof e=="function"||gl(e)}function xn(e){return e==null||typeof e=="string"||typeof e=="number"?e:String(e)}function Co(e){if(e!=null)return typeof e=="string"||typeof e=="number"?e:String(e)}function Hh(e,t,r){if(t==null||t==="")return;if(typeof e=="function")return e(r);if(typeof e=="string")return{name:e,query:{id:xn(t)}};if(!gl(e))return;const n={name:e.name},i=e.query;typeof i=="string"?n.query={[i]:xn(t)}:i&&(n.query={},Object.keys(i).forEach(a=>{const s=i[a];n.query[a]=xn(r[s])}));const o=e.params;if(typeof o=="string"){const a=Co(t);a!==void 0&&(n.params={[o]:a})}else o&&(n.params={},Object.keys(o).forEach(a=>{const s=o[a],u=Co(r[s]);u!==void 0&&(n.params[a]=u)}));return n}const zh={class:"ab-router-link"},yl=l.defineComponent({name:"AbRouterLink",__name:"ab-router-link",props:{link:{},value:{},row:{}},setup(e){const t=e,r=l.computed(()=>Hh(t.link,t.value,t.row));return(n,i)=>{const o=l.resolveComponent("ab-icon");return l.openBlock(),l.createElementBlock("div",zh,[l.createVNode(o,{icon:"ep:link",size:16}),r.value?(l.openBlock(),l.createBlock(l.unref(lr.RouterLink),{key:0,to:r.value,class:"ab-router-link"},{default:l.withCtx(()=>[l.renderSlot(n.$slots,"default")]),_:3},8,["to"])):l.renderSlot(n.$slots,"default",{},void 0,void 0,1)])}}}),Uh=l.defineComponent({name:"AbTableColumn",__name:"ab-table-column",props:{rule:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh","operated"],setup(e,{emit:t}){const r=t,n=e;l.inject("abTableRef",null);const i=l.computed(()=>{var c;return!((c=n.rule)!=null&&c.hidden)}),o=l.computed(()=>n.sortable!==!1&&n.rule.sortable!==!1&&n.rule.sortFieldTable!==!1&&(n.rule.sortable===!0||n.rule.sortFieldTable!==void 0||!!n.idFieldTable)),a=l.computed(()=>{var c,d,f,h,p;return re(R({},n.rule.params),{sortField:(d=n.rule.sortField)!=null?d:(c=n.rule.params)==null?void 0:c.sortField,sortFieldTable:typeof n.rule.sortFieldTable=="string"?n.rule.sortFieldTable:(p=(h=(f=n.rule.params)==null?void 0:f.sortFieldTable)!=null?h:n.idFieldTable)!=null?p:""})}),s=l.computed(()=>hi(n.rule).formatter);function u({cellValue:c,row:d,column:f}={}){var h,p,m,g,y;typeof((p=(h=n.rule)==null?void 0:h.on)==null?void 0:p.change)=="function"&&((y=(g=(m=n.rule)==null?void 0:m.on)==null?void 0:g.change)==null||y.call(g,{cellValue:c,row:d,column:f}))}return l.inject("abTableDetailRef",void 0),(c,d)=>{var m,g,y,v,S;const f=l.resolveComponent("el-switch"),h=l.resolveComponent("ab-icon"),p=l.resolveComponent("vxe-column");return e.rule.field?(l.openBlock(),l.createBlock(p,{key:1,title:e.rule.title,field:e.rule.field,sortable:o.value,params:a.value,width:((m=e.rule)==null?void 0:m.width)||"auto","min-width":(g=e.rule)==null?void 0:g.minWidth,align:(y=e.rule)==null?void 0:y.align,fixed:(v=e.rule)==null?void 0:v.fixed,visible:i.value,"class-name":(S=e.rule)!=null&&S.cellArrow?"items-center":""},{default:l.withCtx($=>{var V,P;return[e.rule.type==="ElRow"&&e.rule.field===l.unref(de).OPERATE?(l.openBlock(),l.createBlock(Zr,{key:0,"id-field":e.idField,"permi-prefix":e.permiPrefix,rule:e.rule,"model-value":$.row,"delete-handler":e.deleteHandler,readonly:e.readonly,link:"",onRefresh:d[0]||(d[0]=T=>r("refresh"))},null,8,["id-field","permi-prefix","rule","model-value","delete-handler","readonly"])):e.rule.field?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[(V=e.rule)!=null&&V.cellRender?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[e.rule.type==="switch"?(l.openBlock(),l.createBlock(f,l.mergeProps({key:0},e.rule.props,{modelValue:$.row[e.rule.field],"onUpdate:modelValue":T=>$.row[e.rule.field]=T,onChange:T=>u({cellValue:$.row[e.rule.field],column:$.column,row:$.row})}),null,16,["modelValue","onUpdate:modelValue","onChange"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.rule.type),1)],64))],64)):e.rule.link?(l.openBlock(),l.createBlock(yl,{key:1,link:e.rule.link,value:$.row[e.rule.field],row:$.row},{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))]),_:2},1032,["link","value","row"])):s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createTextVNode(l.toDisplayString(s.value({cellValue:$.row[e.rule.field],column:$.column,row:$.row})),1)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:3},[l.createTextVNode(l.toDisplayString($.row[e.rule.field]),1)],64))],64)):l.createCommentVNode("",!0),(P=e.rule)!=null&&P.cellArrow?(l.openBlock(),l.createBlock(h,{key:2,icon:$.row[e.rule.field]<0?"streamline:graph-arrow-decrease":"streamline:graph-arrow-increase",class:l.normalizeClass($.row[e.rule.field]<0?"danger":"success")},null,8,["icon","class"])):l.createCommentVNode("",!0)]}),_:1},8,["title","field","sortable","params","width","min-width","align","fixed","visible","class-name"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[],64))}}}),qh=l.defineComponent({name:"AbTableColumns",__name:"ab-table-columns",props:{rule:{},idx:{},idField:{},idFieldTable:{},permiPrefix:{},sortable:{type:Boolean},deleteHandler:{},readonly:{type:Boolean}},emits:["refresh"],setup(e,{emit:t}){const r=t,n=e,i=l.computed(()=>{const{field:o,children:a}=n.rule;return!!(a!=null&&a.length)&&(o?o!==de.OPERATE:!n.rule.type&&!!n.rule.title)});return(o,a)=>{var c,d,f;const s=l.resolveComponent("ab-table-columns",!0),u=l.resolveComponent("vxe-colgroup");return i.value?(l.openBlock(),l.createBlock(u,{key:0,field:e.rule.field,title:(c=e.rule)==null?void 0:c.title,"header-align":((d=e.rule)==null?void 0:d.groupAlign)||((f=e.rule)==null?void 0:f.align)||"center"},{default:l.withCtx(()=>{var h;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((h=e.rule)==null?void 0:h.children,(p,m)=>(l.openBlock(),l.createBlock(s,l.mergeProps({key:p.field||`${e.idx}_${m}`,ref_for:!0},re(R({},n),{rule:p,idx:m}),{"id-field":e.idField,onRefresh:a[0]||(a[0]=g=>r("refresh"))}),null,16,["id-field"]))),128))]}),_:1},8,["field","title","header-align"])):(l.openBlock(),l.createBlock(Uh,{key:1,rule:e.rule,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:a[1]||(a[1]=h=>r("refresh"))},null,8,["rule","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))}}});function Or(e,t){if(!e||e===t)return;let r=e.props.abFormInject;if(r)return r;if(e.parent)return Or(e.parent,t)}function $o(){let e=l.getCurrentInstance();if(!e)throw Error("AbForm lifecycle hook requires an active Vue component.");return e}function Yh(){return typeof document<"u"&&typeof document.createElement=="function"&&document.head!=null}function Gh(e,t,r){return l.defineComponent({name:"AbForm"+(e.isMobile?"Mobile":""),components:t,directives:r,props:{rule:{type:Array,required:!0,default:()=>[]},option:{type:Object,default:()=>({})},extendOption:Boolean,driver:[String,Object],modelValue:Object,idField:String,idFieldTable:String,disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","beforeUnmount","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render(){return this.fc.render()},setup(n){let i=$o();l.provide("parentFC",i);let o=l.inject("parentFC",null),a=o!=null?o:i;if(o)for(;a.setupState.parent;)a=a.setupState.parent;let{rule:s,modelValue:u,subForm:c,inFor:d}=l.toRefs(n),f=l.reactive({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:[...s.value||[]]}),h=JSON.stringify(u.value||{}),p=new e(i),m=p.api(),g=d.value,y=()=>{if(o){let E=Or(i,o);if(E){let k;if(g){let N=E.getSubForm();k=Array.isArray(N)?[...N]:N?[N]:[],k.push(m)}else k=m;E.subForm(k)}}},v=()=>{let E=Or(i,o);if(E)if(g){let k=kt(E.getSubForm()),N=k.indexOf(m);N>-1&&k.splice(N,1)}else E.subForm()},S=null;l.onBeforeMount(()=>{Yh()&&l.watchEffect(()=>{let E="",k=n.option&&n.option.globalClass||{};Object.keys(k).forEach(N=>{let q="",U=k[N].style;U&&Object.keys(U).forEach(x=>{q+=Mt(x)+":"+U[x]+";"}),k[N].content&&(q+=k[N].content+";"),q&&(E+=`.${N}{${q}}`)}),n.option&&n.option.style&&(E+=n.option.style),S||(S=document.createElement("style"),S.type="text/css",document.head.appendChild(S)),S.innerHTML=E||""})});let $=ut(()=>{p.bus.$emit("$loadData.$topForm")},100),V=ut(function(){p.bus.$emit("$loadData.$scopeForm")},100),P=ut(()=>{p.bus.$emit("$loadData.$form")},100),T=(...E)=>{p.bus.$emit("change-$form."+String(E[0]))};return l.onMounted(()=>{o&&(m.top.bus.$on("$loadData.$form",$),m.top.bus.$on("change",T)),m!==m.scope&&m.scope.bus.$on("$loadData.$scopeForm",V),p.mounted()}),l.onBeforeUnmount(()=>{o&&(m.top.bus.$off("$loadData.$form",$),m.top.bus.$off("change",T)),m!==m.scope&&m.scope.bus.$off("$loadData.$scopeForm",V),v(),f.destroyed=!0,p.unmount(),S&&S.parentNode&&S.parentNode.removeChild(S)}),l.onUpdated(()=>{p.updated()}),y(),l.watch(()=>n.option,()=>{p.initOptions(),m.refresh()},{deep:!0,flush:"sync"}),l.watch(()=>[...s.value],E=>{p.$handle.isBreakWatch()||E.length===f.renderRule.length&&E.every(k=>f.renderRule.indexOf(k)>-1)||(p.$handle.updateAppendData(),p.$handle.reloadRule(s.value),i.setupState.renderRule())}),l.watch(()=>[n.disabled,n.preview,n.readonly],()=>{m.refresh()}),l.watch(u,E=>{if(or(E||{})===h)return;let k=E!=null?E:{};m.config.forceCoverValue?m.coverValue(k):m.setValue(k)},{deep:!0,flush:"post"}),l.watch(()=>n.index,()=>{m.coverValue({}),p.$handle.updateAppendData(),l.nextTick(()=>{l.nextTick(()=>{m.clearValidateState()})})},{flush:"sync"}),re(R({fc:l.markRaw(p),parent:o&&l.markRaw(o),top:l.markRaw(a),fapi:l.markRaw(m)},l.toRefs(f)),{getGroupInject:()=>Or(i,o),refresh(){++f.unique},renderRule(){f.renderRule=[...s.value||[]]},updateValue(E){if(f.destroyed)return;let k=or(E);h!==k&&(h=k,i.emit("update:modelValue",E),l.nextTick(()=>{P(),o?c.value||V():($(),V())}))}})},created(){let n=$o();n.emit("update:api",n.setupState.fapi),n.setupState.fc.init()}})}var vl=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],mi=["validate","children","control"],gi=["effect","deep","renderSlots"];function bl(){return[...vl,...Za,...Xa,...el,...mi,...gi]}function Vn(e,t){return{value:e,enumerable:!1,configurable:!1,writable:!0}}function wl(e,t){return xl([e],t||!1)[0]}function xl(e,t){return Kr([],[...e],t||!1)}var Wh={array:mi,normal:gi};function rt(e,t){return tt(Array.isArray(t)?t:[t],e,Wh),e}function To(e){let t=typeof e.getRule=="function"?e.getRule():e;return t.type||(t.type="text"),t}function Jh(e,t){return e?(Object.keys(t||{}).forEach(r=>{t!=null&&t[r]&&(e[r]=rt(e[r]||{},t[r]))}),e):t}function Sl(e,t){Object.defineProperties(e,Object.keys(t).reduce((r,n)=>(r[n]={get(){return t[n]()}},r),{}))}function Ye(e){return e?e.__fc__||(e.__origin__?e.__origin__.__fc__:null):null}function ee(e,t){try{return e()}catch(r){lh(r)}return t}function Sr(){let e={},t=r=>r||"default";return{setSlot(r,n){r=t(r),!n||Array.isArray(n)&&n.length||(e[r]||(e[r]=[]),e[r].push(n))},getSlot(r,n){r=t(r);let i=[];return(e[r]||[]).forEach(o=>{if(Array.isArray(o))i.push(...o);else if(B.Function(o)){let a=o(...n||[]);Array.isArray(a)?i.push(...a):i.push(a)}else B.Undef(o)||i.push(o)}),i},getSlots(){let r={};return Object.keys(e).forEach(n=>{r[n]=(...i)=>this.getSlot(n,i)}),r},slotLen(r){return r=t(r),e[r]?e[r].length:0},mergeBag(r){if(!r)return this;let n=r,i=B.Function(n.getSlots)?n.getSlots():r;return Array.isArray(r)||l.isVNode(r)?this.setSlot(void 0,()=>r):Object.keys(i).forEach(o=>{this.setSlot(o,i[o])}),this}}}function Eo(e){let t=R({},e.props||{}),r=e.on||{};return Object.keys(r).forEach(n=>{n.indexOf("-")>0&&(n=Pe(n));let i=`on${Ka(n)}`;Array.isArray(t[i])?t[i]=[...t[i],r[n]]:t[i]?t[i]=[t[i],r[n]]:t[i]=r[n]}),t.key=e.key,t.ref=e.ref,t.class=e.class,t.id=e.id,t.style=e.style,t.slot&&delete t.slot,t}function Cr(e,t){return Object.setPrototypeOf(e,t),e}var ko=(e,t)=>typeof e=="string"?String(t):typeof e=="number"?Number(t):t,Pt={"==":(e,t)=>JSON.stringify(e)===JSON.stringify(ko(e,t)),"!=":(e,t)=>!Pt["=="](e,t),">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,on(e,t){let r=e;return r&&r.indexOf&&r.indexOf(ko(r[0],t))>-1},notOn(e,t){return!Pt.on(e,t)},in(e,t){let r=t;return r&&r.indexOf&&r.indexOf(e)>-1},notIn(e,t){return!Pt.in(e,t)},between(e,t){let r=t;return e>r[0]&&e<r[1]},notBetween(e,t){let r=t;return e<r[0]||e>r[1]},empty(e){return B.empty(e)},notEmpty(e){return!B.empty(e)},pattern(e,t){return new RegExp(t,"g").test(e)}};function ke(e,t){return(typeof t=="string"?t.split("."):t||[]).forEach(r=>{e!=null&&(e=e[r])}),e}function Kh(e){let t=/{{\s*(.*?)\s*}}/g,r,n={};for(;(r=t.exec(e))!==null;)r[1]&&(n[r[1]]=!0);return Object.keys(n)}function _o(e){let t=e.split("."),r=[],n="";return t.forEach((i,o)=>{o===0?n=i:n+="."+i,r.push(n)}),r.join(" && ")}function Cl(e){let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];o==="["?(n===0&&r&&(t.push({type:"key",value:r}),r=""),n++,r+=o):o==="]"?(n--,r+=o,n===0&&(t.push({type:"bracket",value:Cl(r.slice(1,-1))}),r="")):o==="."&&n===0?r&&(r=(t.push({type:"key",value:r}),"")):r+=o}return r&&t.push({type:"key",value:r}),t.map(i=>i.type==="key"?{key:i.value}:{children:i.value})}function $l(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}var Tl=class{constructor(e,t,r,n,i){be(this,"_data");be(this,"event");this._data=re(R({},$l()),{type:e,title:t,field:r,value:n,props:i||{}}),this.event=this.on}getRule(){return this._data}setProp(e,t){return De(this._data,e,t),this}modelField(e){return this._data.modelField=e,this}on(e,t){return this.setAttribute("on",e,t,arguments.length>=2)}setAttribute(e,t,r,n=!1){let i=n?{[t]:r}:t;return rt(this._data,{[e]:i}),this}_clone(){let e=new this.constructor;return e._data=wl(this._data),e}};function El(e){e.forEach(t=>{Object.defineProperty(Tl.prototype,t,{configurable:!0,enumerable:!0,writable:!0,value:function(r,n){return this.setAttribute(t,r,n,arguments.length>=2)}})})}El(bl());function $e(e,t){return(r,n,i,o={})=>{let a=new Tl(e,r,n,i,o);return typeof t=="function"?t(a):t&&a.setAttribute("props",t),a}}var Qh=$e("");function Zh(e,t,r){let n=Qh("",t);return n._data.type=e,n._data.title=r,n}function Xh(){return{create:Zh,factory:$e}}function em(e,t){return Object.assign(Error(`fail to ${e} ${t.status}'`),{status:t.status,url:e})}function Fo(e){let t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(r){return t}}function kl(e){if(typeof XMLHttpRequest>"u")return;let t=new XMLHttpRequest,r=e.action||"";t.upload&&e.onProgress&&t.upload.addEventListener("progress",a=>{var u;let s=a;s.percent=s.total>0?s.loaded/s.total*100:0,(u=e.onProgress)==null||u.call(e,s)});let n=e.query;if(n){let a=typeof n=="string"?n:Object.keys(n).reduce((u,c)=>{let d=n[c];return u[c]=d==null?"":String(d),u},{}),s=new URLSearchParams(a).toString();s&&(r+=r.includes("?")?`&${s}`:`?${s}`)}t.onerror=a=>{var s;(s=e.onError)==null||s.call(e,a)},t.onload=()=>{var a;t.status<200||t.status>=300?(a=e.onError)==null||a.call(e,em(r,t),Fo(t)):e.onSuccess(Fo(t))},t.open(e.method||"get",r,!0);let i=null;if(e.data||e.file)if(e.file||(e.dataType||"").toLowerCase()!=="json"){let a=new FormData;Object.keys(e.data||{}).forEach(s=>{var c;let u=(c=e.data)==null?void 0:c[s];a.append(s,typeof Blob<"u"&&u instanceof Blob?u:String(u))}),i=a}else i=JSON.stringify(e.data||{}),t.setRequestHeader("content-type","application/json");e.file&&i instanceof FormData&&i.append(String(e.filename),e.file,e.file.name),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);let o=e.headers||{};Object.keys(o).forEach(a=>{o[a]!=null&&t.setRequestHeader(a,o[a])}),t.send(i)}function Ao(e,t,r){return new Promise((n,i)=>{(t||kl)(re(R({},e),{onSuccess(o){let a=u=>u,s=Qe(e.parse);typeof s=="function"?a=(u,c,d)=>s(u,c,d):typeof s=="string"&&(a=u=>ke(u,s)),Nn(a(o,e.targetRule,r)).then(n)},onError(o){i(o)}}))})}function qt(e){return St(e)}function tm(e){function t(o){return B.Undef(o)?o=e.fields():Array.isArray(o)||(o=[o]),o}function r(o,a,s){B.Undef(o)?o=Object.keys(R(R({},e.fieldCtx),e.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(u=>{let c=e.fieldCtx[u]||e.nameCtx[u];c&&c.forEach(d=>{De(d.rule,a,s),e.$render.clearCache(d)})})}function n(){let o=e.subForm;return Object.keys(o).reduce((a,s)=>{let u=o[s];return u&&(Array.isArray(u)?a.push(...u):a.push(u)),a},[])}let i={get isScope(){return e.vm.props.subForm===!1},get isPreview(){return e.preview},get config(){return e.options},set config(o){e.fc.options.value=o},get options(){return e.options},set options(o){e.fc.options.value=o},get form(){return e.form},get rule(){return e.rules},get parent(){return e.vm.setupState.parent&&e.vm.setupState.parent.setupState.fapi},get top(){return i.parent?i.parent.top:i},get scope(){let o=e.vm;for(;o&&o.setupState.fapi;)if(o.props.subForm)o=o.setupState.parent;else return o.setupState.fapi;return i.top},get children(){return n()},get siblings(){let o=e.vm.setupState.getGroupInject();if(o){let a=o.getSubForm();if(Array.isArray(a))return[...a]}},get index(){let o=i.siblings;if(o){let a=o.indexOf(i);return a>-1?a:void 0}},get formulas(){return R({},e.fc.formulas)},formData(o){if(o==null||typeof o=="boolean"){let a={};return Object.keys(e.form).forEach(s=>{(o===!0||e.ignoreFields.indexOf(s)===-1)&&(a[s]=qt(e.form[s]))}),a}return t(o).reduce((a,s)=>(a[s]=i.getValue(s),a),{})},getValue(o){let a=e.getFieldCtx(o);return a?qt(a.rule.value):e.options.appendValue!==!1&&fe(e.appendData,o)?qt(e.appendData[o]):void 0},coverValue(o){let a=R({},o||{});e.deferSyncValue(()=>{e.appendData={},i.fields().forEach(s=>{let u=e.fieldCtx[s];if(u){let c=fe(o,s);u.forEach(d=>{d.rule.value=c?o[s]:void 0}),delete a[s]}}),X(e.appendData,a)},!0)},setValue(o){let a=o;arguments.length>=2&&(a={[o]:arguments[1]}),e.deferSyncValue(()=>{Object.keys(a).forEach(s=>{let u=e.fieldCtx[s];if(!u)return e.appendData[s]=a[s];u.forEach(c=>{c.rule.value=a[s]})})},!0)},removeField(o){let a=e.getCtx(o);return e.deferSyncValue(()=>{e.getCtxs(o).forEach(s=>{s.rm()})},!0),a?a.origin:void 0},removeRule(o){let a=o&&Ye(o);if(a)return a.rm(),a.origin},fields:()=>e.fields(),append:(o,a,s)=>{let u=e.sort.length-1,c,d=e.getCtx(a);if(d)if(s){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return;u=d.rule.children.length-1}else u=d.root.indexOf(d.origin),c=d.root;else c=e.rules;c.splice(u+1,0,o)},prepend:(o,a,s)=>{let u=0,c,d=e.getCtx(a);if(d)if(s){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return}else u=d.root.indexOf(d.origin),c=d.root;else c=e.rules;c.splice(u,0,o)},hidden(o,a){r(a,"hidden",!!o),e.refresh()},hiddenStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.hidden},display(o,a){r(a,"display",!!o),e.refresh()},displayStatus(o){let a=e.getCtx(o);if(a)return!!a.rule.display},disabled(o,a){t(a).forEach(s=>{e.getCtxs(s).forEach(u=>{De(u.rule.props,"disabled",!!o)})}),e.refresh()},all(o){return Object.keys(e.ctxs).map(a=>{let s=e.ctxs[a];return o?s.origin:s.rule})},model(o){return e.fields().reduce((a,s)=>{let u=e.fieldCtx[s][0];return a[s]=o?u.origin:u.rule,a},{})},component(o){return Object.keys(e.nameCtx).reduce((a,s)=>{let u=e.nameCtx[s].map(c=>o?c.origin:c.rule);return a[s]=u.length===1?u[0]:u,a},{})},bind(){return i.form},reload:o=>{e.reloadRule(o)},updateOptions(o){e.fc.updateOptions(o),i.refresh()},onSubmit(o){i.updateOptions({onSubmit:o})},sync:o=>{if(Array.isArray(o)){o.forEach(s=>i.sync(s));return}let a=B.Object(o)?Ye(o):e.getCtxs(o);a&&(a=Array.isArray(a)?a:[a],a.forEach(s=>{if(!s.deleted){let u=e.subForm[s.id];u&&(Array.isArray(u)?u.forEach(c=>{c.refresh()}):u&&u.refresh()),e.$render.clearCache(s)}}),e.refresh())},refresh:()=>{n().forEach(o=>{o.refresh()}),e.$render.clearCacheAll(),e.refresh()},refreshOptions(){e.$manager.updateOptions(e.options),i.refresh()},hideForm:o=>{e.vm.setupState.isShow=!o},changeStatus:()=>e.changeStatus,clearChangeStatus:()=>{e.changeStatus=!1},updateRule(o,a){e.getCtxs(o).forEach(s=>{X(s.rule,a)})},updateRules(o){Object.keys(o).forEach(a=>{i.updateRule(a,o[a])})},mergeRule:(o,a)=>{e.getCtxs(o).forEach(s=>{rt(s.rule,a)})},mergeRules(o){Object.keys(o).forEach(a=>{i.mergeRule(a,o[a])})},getRule:(o,a)=>{let s=e.getCtx(o);if(s)return a?s.origin:s.rule},findType(o,a){let s;return Object.keys(e.ctxs).forEach(u=>{let c=e.ctxs[u];c.rule.type===o&&(s=a?c.origin:c.rule)}),s},findTypes(o,a){let s=[];return Object.keys(e.ctxs).forEach(u=>{let c=e.ctxs[u];c.rule.type===o&&s.push(a?c.origin:c.rule)}),s},getRenderRule:o=>{let a=e.getCtx(o);if(a)return a.prop},getRefRule:o=>{let a=e.getCtxs(o);if(a){let s=a.map(u=>u.rule);return s.length===1?s[0]:s}},setEffect(o,a,s){let u=e.getCtx(o);u&&a&&(a[0]==="$"&&(a=a.substr(1)),fe(u.rule,"$"+a)&&De(u.rule,"$"+a,s),fe(u.rule,"effect")||(u.rule.effect={}),De(u.rule.effect,a,s))},clearEffectData(o,a){let s=e.getCtx(o);s&&(a&&a[0]==="$"&&(a=a.substr(1)),s.clearEffectData(a),i.sync(o))},updateValidate(o,a,s){s?i.mergeRule(o,{validate:a}):r(o,"validate",a)},updateValidates(o,a){Object.keys(o).forEach(s=>{i.updateValidate(s,o[s],a)})},refreshValidate(){i.refresh()},resetFields(o){t(o).forEach(a=>{e.getCtxs(a).forEach(s=>{e.$render.clearCache(s),s.rule.value=qt(s.defaultValue)})}),l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{i.clearValidateState(o)})})}),o!=null||(B.Function(e.options.onReset)&&ee(()=>e.options.onReset(i)),e.vm.emit("reset",i))},method(o,a){let s=i.el(o);if(!s||!s[a])throw Error(Qa("err",`${a} 方法不存在`));return(...u)=>s[a](...u)},exec(o,a,...s){return ee(()=>i.method(o,a)(...s))},toJson(o){return or(i.rule,o)},trigger(o,a,...s){let u=i.el(o);u&&u.$emit(a,...s)},el(o){let a=e.getCtx(o);if(a)return a.el||e.vm.refs[a.ref]},scrollTo(o,a={block:"center",inline:"nearest",behavior:"smooth"}){let s=i.el(o);if(!s)return;let u=s.$el===void 0?s:s.$el;if(!u)return;let c=u.nodeType===1?u:u.firstElementChild;c&&typeof c.scrollIntoView=="function"&&c.scrollIntoView(a)},focus(o){let a=i.el(o);if(!a)return;let s=d=>!d||typeof d.focus!="function"?!1:(ee(()=>d.focus()),!0);if(s(a))return;let u=a.$el===void 0?a:a.$el;if(s(u))return;let c=u&&(u.nodeType===1?u:u.firstElementChild);s(c)||c&&c.querySelector&&s(c.querySelector('input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])'))},closeModal:o=>{e.bus.$emit("fc:closeModal:"+o)},getSubForm(o){let a=e.getCtx(o);return a?e.subForm[a.id]:void 0},getChildrenRuleList(o){let a=typeof o=="object",s=a?Ye(o):e.getCtx(o),u=s?s.rule:a?o:i.getRule(o);if(!u)return[];let c=[];return(d=>{d&&d.forEach(f=>{typeof f=="object"&&(f.field&&c.push(f),c.push(...i.getChildrenRuleList(f)))})})(s?s.loadChildrenPending():u.children),c},getParentRule(o){return(typeof o=="object"?Ye(o):e.getCtx(o)).parent.rule},getParentSubRule(o){let a=typeof o=="object"?Ye(o):e.getCtx(o);if(a){let s=a.getParentGroup();if(s)return s.rule}},getChildrenFormData(o,a){return i.getChildrenRuleList(o).reduce((s,u)=>((u.ignore!==!0||a===!0)&&(s[u.field]=qt(u.value)),s),{})},setChildrenFormData(o,a,s){let u=i.getChildrenRuleList(o);e.deferSyncValue(()=>{u.forEach(c=>{fe(a,c.field)?c.value=a[c.field]:s&&(c.value=void 0)})})},getGlobalEvent(o){let a=i.options.globalEvent[o];if(a)return typeof a=="object"&&(a=a.handle),Qe(a)},getGlobalData(o){return new Promise((a,s)=>{let u=i.options.globalData[o];u?u.type==="fetch"?i.fetch(u).then(c=>{a(c)}).catch(s):a(u.data):a(e.fc.loadData[o])})},emitGlobalEvent(o,...a){let s=i.getGlobalEvent(o);if(s){let u=e.getInjectData({},void 0);return u.args=[...a],a.unshift(u),s.apply(null,a)}},setGlobalData(o,a){i.setData("$globalData."+o,a)},setGlobalVar(o,a){i.setData("$var."+o,a)},renderRule(o,a,s){let u=typeof o=="object"?Ye(o):e.getCtx(o);return u?e.$render.createRuleVnode(u,a,s):void 0},renderChildren(o,a,s){let u=typeof o=="object"?Ye(o):e.getCtx(o);return u?e.$render.createChildrenVnodes(u,a,s):void 0},nextTick(o){e.bus.$once("next-tick",o),e.refresh()},nextRefresh(o){e.nextRefresh(),o&&ee(o)},deferSyncValue(o,a){e.deferSyncValue(o,a)},emit(o,...a){e.vm.emitsOptions&&!e.vm.emitsOptions[o]&&(e.vm.emitsOptions[o]=null),e.vm.emit(o,...a)},bus:e.bus,getCurrenabFormRule(){var o;return(o=e.vm.setupState.getGroupInject())==null?void 0:o.rule},fetch(o){return new Promise((a,s)=>{let u=R({},o);u=e.loadFetchVar(u);let c=d=>{ee(()=>u.onError&&u.onError(d)),s(d)};e.beforeFetch(u).then(()=>Ao(u,e.fc.create.fetch,i).then(d=>{ee(()=>u.onSuccess&&u.onSuccess(d)),a(d)}).catch(d=>{c(d)})).catch(d=>{c(d)})})},watchFetch(o,a,s,u){return e.fc.watchLoadData((c,d)=>{let f=R({},o);if(f=e.loadFetchVar(f,c),u&&u(f,d)===!1)return;let h=p=>{ee(()=>f.onError&&f.onError(p)),s&&s(p)};e.beforeFetch(f).then(()=>Ao(f,e.fc.create.fetch,i).then(p=>{ee(()=>f.onSuccess&&f.onSuccess(p)),a&&a(p,d)}).catch(p=>{h(p)})).catch(p=>{h(p)})},o.wait==null?1e3:o.wait)},getData(o,a){return e.fc.get?e.fc.get(o,a):e.fc.getLoadData(o,a)},watchData(o){return e.fc.watchLoadData((a,s)=>{ee(()=>o(a,s))})},setData(o,a,s){return e.fc.setData(o,a,s)},refreshData(o){return e.fc.refreshData(o)},t(o,a){return e.fc.t(o,a)},getLocale(){return e.fc.getLocale()},helper:{tidyFields:t,props:r}};return["on","once","off"].forEach(o=>{i[o]=function(...a){e.bus[`$${o}`](...a)}}),i.changeValue=i.changeField=i.setValue,i}function rm(e){X(e.prototype,{initCache(){this.clearCacheAll()},clearCache(t){if(t.rule.cache)return;let r=this.cache[t.id];r?((r.use===!0||r.parent)&&this.$handle.refresh(),r.parent&&this.clearCache(r.parent),this.cache[t.id]=null):t.parent&&this.clearCache(t.parent)},clearCacheAll(){this.cache={}},setCache(t,r,n){this.cache[t.id]={vnode:r,use:!1,parent:n,slot:t.rule.slot}},getCache(t){let r=this.cache[t.id];if(r)return r.use=!0,r.vnode}})}var At={init(e){},toFormValue(e,t){return e},toValue(e,t){return e},mounted(e){},render(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultRender?t.$handle.fc.renderDriver.defaultRender(t,e):t.$render.defaultRender(t,e)},preview(e,t){return t.$handle.fc.renderDriver&&t.$handle.fc.renderDriver.defaultPreview?t.$handle.fc.renderDriver.defaultPreview(t,e):this.render(e,t)},mergeProp(e){}};function _l(e,t){let{key:r,origin:n,def:i,onLoad:o,onReload:a,onUpdate:s}=t;if(e.pending[r]&&e.pending[r].origin===n)return e.getPending(r,i);delete e.pending[r];let u=n;if(B.Function(n)){let c=n,d=ee(()=>c({rule:e.rule,api:e.$api,update:f=>{let h=f||i,p=e.getPending(r,i);e.setPending(r,n,h),s&&s(h,p)},reload:()=>{let f=e.getPending(r,i);delete e.pending[r],a&&a(f),e.$api&&e.$api.sync(e.rule)}}));d&&B.Function(d.then)?(d.then(f=>{let h=f||i;e.setPending(r,n,h),o&&o(h),e.$api&&e.$api.sync(e.rule)}).catch(f=>{console.error(f)}),u=i,e.setPending(r,n,u)):(u=d||i,e.setPending(r,n,u),o&&o(u))}return u}function Fl(e,t,r={}){let n=R({key:"options",origin:t,def:[]},r);return"loadPending"in e?e.loadPending(n):_l(e,n)}function nm(e){X(e.prototype,{initRender(){this.cacheConfig={}},getTypeSlot(t){let r=n=>{if(n){let i;return t.rule.field&&(i=n.slots["field-"+Mt(t.rule.field)]||n.slots["field-"+t.rule.field]),i||(i=n.slots["type-"+Mt(t.type)]||n.slots["type-"+t.type]),i||r(n.setupState.parent)}};return r(this.vm)},render(){if(!this.vm.setupState.isShow)return;this.$manager.beforeRender(),this.applyShowNumber(this.$manager.rule);let t=Sr();return this.sort.forEach(r=>{this.renderSlot(t,this.$handle.ctxs[r])}),this.$manager.render(t)},applyShowNumber(t){let r=this.$handle.options||{};if(!r.showNumber||!t)return;t.class=this.mergeClass(t.class,"is-numbered"),r.showNumber==="chinese"&&(t.class=this.mergeClass(t.class,"is-number-chinese"));let n=r.numberColor,i=(r.form||{}).style;t.style=n?B.String(i)?`${i};--ab-number-color:${n}`:Array.isArray(i)?i.concat({"--ab-number-color":n}):re(R({},i||{}),{"--ab-number-color":n}):i},renderSlot(t,r,n){if(this.isFragment(r)){r.initProp(),this.mergeGlobal(r),r.initNone();let i=this.renderChildren(r.loadChildrenPending(),r),o=i.default;o&&t.setSlot(r.rule.slot,()=>o()),delete i.default,t.mergeBag(i)}else t.setSlot(r.rule.slot,this.renderCtx(r,n))},mergeGlobal(t){if(!this.$handle.options.global)return;let{trueType:r,originType:n,type:i}=t;this.cacheConfig[r]||(this.cacheConfig[r]=l.computed(()=>{let o=this.$handle.options.global;return rt({},[o["*"]||o.default||{},o[n]||o[i]||{}])})),t.prop=rt({},[this.cacheConfig[t.trueType].value,t.prop])},setOptions(t){let r=Fl(t,t.prop.options);t.prop.options=r,t.prop.optionsTo&&r&&ct(t.prop,t.prop.optionsTo,r)},deepSet(t){let r=t.prop.deep;r&&Object.keys(r).sort((n,i)=>n.length<i.length?-1:1).forEach(n=>{ct(t.prop,n,r[n])})},parseSide(t,r){return B.Object(t)?rt({props:{abFormInject:r.prop.props.abFormInject}},t):t},renderSides(t,r,n){let i=r[n?"rule":"prop"];return[this.renderRule(this.parseSide(i.prefix,r)),t,this.renderRule(this.parseSide(i.suffix,r))]},renderId(t,r){let n=this.$handle[r==="field"?"fieldCtx":"nameCtx"][t];return n?n.map(i=>this.renderCtx(i,i.parent)):void 0},renderCtx(t,r){var n;try{if(t.type==="hidden")return;let i=t.rule;if(this.force||!this.cache[t.id]||((n=this.cache[t.id])==null?void 0:n.slot)!==i.slot){let o;t.initProp(),this.mergeGlobal(t),t.initNone(),this.$manager.tidyRule(t),this.deepSet(t),this.setOptions(t),this.ctxProp(t);let a=t.prop;a.preview=!!(a.preview==null?this.$handle.preview:a.preview),a.props.abFormInject=this.injectProp(t);let s=a.cache!==!1,u=a.preview;if(a.hidden){this.setCache(t,void 0,r);return}o=(...c)=>{var g,y,v,S,$,V;let d={rule:i,prop:a,preview:u,api:this.$handle.api,model:a.model||{},slotValue:c};c.length&&i.slotUpdate&&ee(()=>i.slotUpdate(d));let f={},h=t.loadChildrenPending();t.parser.renderChildren?f=t.parser.renderChildren(h,t):t.parser.loadChildren!==!1&&(f=this.renderChildren(h,t)),Object.keys(a.renderSlots||{}).forEach(P=>{f[P]=(...T)=>{if(B.Function(a.renderSlots[P]))return ee(()=>a.renderSlots[P](...T));let E=this.parseSide(a.renderSlots[P],t);return this.renderRule(E)}});let p=this.getTypeSlot(t),m;if(p)d.children=f,m=p(d);else{let P=rl(f);if(u)m=t.parser.preview(P,t);else{let T=t.parser,E=T!==At,k=E&&Object.prototype.hasOwnProperty.call(T,"render");if(E&&!k&&t.input&&((v=(y=(g=t.$handle)==null?void 0:g.vm)==null?void 0:y.props)==null?void 0:v.readonly)===!0){let N=typeof this.$handle.getParser=="function"?this.$handle.getParser({type:"text",originType:"text",trueType:"text"}):(S=this.fc.parsers)==null?void 0:S.text;m=N&&N!==T?N.render(P,t):T.render(P,t)}else m=T.render(P,t)}}return m=this.renderSides(m,t),($=a.title)!=null&&$.show&&(a.wrap=R({show:!0},a.wrap||{}),a.native||(a.native=!1)),(t.input||!B.Undef(a.native)||((V=a.col)==null?void 0:V.show)===!0)&&a.native!==!0&&(this.fc.targeabFormDriver("updateWrap",t),m=this.$manager.makeWrap(t,m)),t.none&&(m=Array.isArray(m)?m.map(P=>!P||!P.__v_isVNode?P:this.none(P)):this.none(m)),s&&this.setCache(t,()=>this.stable(m),r),m},this.setCache(t,o,r)}return(...o)=>{let a=this.getCache(t);if(a)return a(...o);if(this.cache[t.id])return;let s=this.renderCtx(t,t.parent);if(s)return s()}}catch(i){console.error(i);return}},none(t){if(t)return t.props.class=this.mergeClass(t.props.class,"ab-none"),t},mergeClass(t,r){if(Array.isArray(t))t.push(r);else return t?[t,r]:r;return t},stable(t){return(Array.isArray(t)?t:[t]).forEach(r=>{r&&r.__v_isVNode&&r.children&&typeof r.children=="object"&&(r.children.$stable=!0,this.stable(r.children))}),t},getModelField(t){var r,n,i;return t.prop.modelField||t.parser.modelField||((r=this.fc.modelFields)==null?void 0:r[this.vNode.aliasMap[t.type]])||((n=this.fc.modelFields)==null?void 0:n[t.type])||((i=this.fc.modelFields)==null?void 0:i[t.originType])||"modelValue"},isFragment(t){return t.type==="fragment"||t.type==="template"},injectProp(t){let r=this.vm.setupState;if(!r.ctxInject[t.id]){let i={api:this.$handle.api,form:this.fc.create,subForm:o=>{this.$handle.addSubForm(t,o)},getSubForm:()=>this.$handle.subForm[t.id],slots:()=>this.vm.setupState.top.slots,getWrap:()=>this.vm.refs[t.wrapRef],options:[],children:[],preview:!1,get readonly(){return t.$handle.vm.props.readonly},get idField(){return t.$handle.vm.props.idField},get idFieldTable(){return t.$handle.vm.props.idFieldTable},get formValue(){return t.$handle.vm.props.modelValue},id:t.id,field:t.field,rule:t.rule,input:t.input,t:(...o)=>this.$handle.api.t(...o),updateValue:o=>{this.$handle.onUpdateValue(t,o)}};r.ctxInject[t.id]=i}let n=r.ctxInject[t.id];return X(n,{preview:t.prop.preview,options:t.prop.options,children:t.loadChildrenPending()}),n},ensureCtxHandlers(t){if(t.handlers)return t.handlers;let r=this,n={vnodeMounted(i){i.el.__rule__=t.rule,r.onMounted(t,i.el)},vnodeBeforeUnmount(){r.$handle.effect(t,"beforeUnmount"),r.$handle.targetHook(t,"beforeUnmount")},fcUpdateValue(i){r.$handle.onUpdateValue(t,i)},fcEl(i){t.exportEl=i,i&&((i.$el||i).__rule__=t.rule)},modelCallback(i){r.tmpInput&&r.tmpInput(t.field,i,t.rule),r.onInput(t,i)},modelEmit(){r.onEmitInput(t)}};return t.handlers=n,n},ctxProp(t){let{ref:r,key:n,rule:i}=t;this.$manager.mergeProp(t),t.parser.mergeProp(t);let o=this.ensureCtxHandlers(t),a=[{ref:r,key:i.key||`${n}fc`,slot:void 0,on:{vnodeMounted:o.vnodeMounted,vnodeBeforeUnmount:o.vnodeBeforeUnmount,"fc.updateValue":o.fcUpdateValue,"fc.el":o.fcEl}}];if(t.input){this.vm.props.disabled===!0&&(t.prop.props.disabled=!0);let s=this.getModelField(t),u={callback:o.modelCallback,modelField:s,value:this.$handle.geabFormData(t)};a.push({on:R({[`update:${s}`]:u.callback},t.prop.modelEmit?{[t.prop.modelEmit]:o.modelEmit}:{}),props:{[s]:u.value}}),t.prop.model=u}return tt(a,t.prop),t.prop},onMounted(t,r){t.el=this.vm.refs[t.ref]||r,t.parser.mounted(t),this.$handle.effect(t,"mounted"),this.$handle.targetHook(t,"mounted")},onInput(t,r){t.prop.modelEmit?this.$handle.onBaseInput(t,r):this.$handle.onInput(t,r)},onEmitInput(t){this.$handle.setValue(t,t.parser.toValue(t.modelValue,t),t.modelValue)},renderChildren(t,r){if(!B.trueArray(t))return{};let n=Sr();return t.map(i=>{if(i){if(B.String(i)||B.Number(i))return n.setSlot(null,`${i}`);if(i.__fc__)return this.renderSlot(n,i.__fc__,r);i.type&&l.nextTick(()=>{this.$handle.loadChildren(t,r),this.$handle.refresh()})}}),n.getSlots()},defaultRender(t,r){let n=t.prop;return n.component?typeof n.component=="string"?this.vNode.make(n.component,n,r):this.vNode.makeComponent(n.component,n,r):this.vNode[t.type]?this.vNode[t.type](n,r):this.vNode[t.originType]?this.vNode[t.originType](n,r):this.vNode.make(nl(n.type),n,r)},createChildrenVnodes(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=this.renderChildren(t.rule.children,t);return this.force=!1,this.tmpInput=null,i},createRuleVnode(t,r,n){this.force=n!==!1,this.tmpInput=r;let i=Sr();return this.renderSlot(i,t,t.parent),this.force=!1,this.tmpInput=null,i.getSlots()},renderRule(t,r,n){if(!t)return;if(B.String(t)||B.Number(t))return`${t}`;let i;if(n)i=t.type;else if(i=t.is,t.type){i=Pe(t.type);let s=this.vNode.aliasMap[i];s&&(i=Pe(s))}if(!i)return;let o=Sr();B.trueArray(t.children)&&t.children.forEach(s=>{s&&o.setSlot(s==null?void 0:s.slot,()=>this.renderRule(s))});let a=R({},t);return delete a.type,delete a.is,this.vNode.make(i,a,o.mergeBag(r).getSlots())}})}var im=1;function Ln(e){X(this,{$handle:e,fc:e.fc,vm:e.vm,$manager:e.$manager,vNode:new e.fc.CreateNode(e),force:!1,tmpInput:null,id:im++}),Sl(this,{options(){return e.options},sort(){return e.sort}}),this.initCache(),this.initRender()}rm(Ln),nm(Ln);function om(e){X(e.prototype,{parseInjectEvent(t,r){let n=t.inject||this.options.injectEvent;return this.parseEventLst(t,r,n)},parseEventLst(t,r,n,i){return Object.keys(r).forEach(o=>{let a=this.parseEvent(t,r[o],n,i);a&&(r[o]=a)}),r},parseEvent(t,r,n,i){if(B.Function(r)&&(n!==!1&&!B.Undef(n)||r.__inject))return this.inject(t,r,n);if(!i&&Array.isArray(r)&&r[0]&&(B.String(r[0])||B.Function(r[0])))return this.parseEventLst(t,r,n,!0);if(B.String(r)){let o=Qe(r);if(o&&r!==o){let a=o;return a.__inject?this.parseEvent(t,a,n,!0):a}}},parseEmit(t){let r={},n=t.rule,{emitPrefix:i,field:o,name:a,inject:s}=n,u=n.emit||[];return B.trueArray(u)&&u.forEach(c=>{if(!c)return;let d,f=i||o||a;if(B.Object(c)&&(d=c.inject,c=c.name,f=c.prefix||f),f){let h=Mt(`${f}-${c}`),p=(...m)=>{this.vm.emitsOptions&&!this.vm.emitsOptions[h]&&(this.vm.emitsOptions[h]=null),this.vm.emit(h,...m),this.vm.emit("emit-event",h,...m),this.bus.$emit(h,...m)};if(p.__emit=!0,!d&&s===!1)r[Pe(c)]=p;else{let m=d||s||this.options.injectEvent;r[Pe(c)]=B.Undef(m)?p:this.inject(n,p,m)}}}),t.computed.on=r,r},getInjectData(t,r){let n=t.__fc__&&t.__fc__.$api,{option:i,rule:o}=(t.__fc__&&t.__fc__.$handle.vm||this.vm).props;return{$f:n||this.api,api:n||this.api,rule:o,self:t.__origin__,option:i,inject:r}},inject(t,r,n){if(r.__origin){if(this.watching&&!this.loading)return r;r=r.__origin}let i=this,o=function(...a){let s=i.getInjectData(t,n);return s.args=[...a],a.unshift(s),r.apply(this,a)};return o.__origin=r,o.__json=r.__json,o},loadStrVar(t,r,n){if(t&&typeof t=="string"&&t.indexOf("{{")>-1&&t.indexOf("}}")>-1){let i=t,o=Kh(t),a=c=>{let d=!1,f;if(n&&c.indexOf("$form.")===0){let h=c.split(".");h.shift(),fe(n.value,h[0])&&(d=!0,f=r?r({id:"$form."+h[0]+"_"+n.rule.__fc__.id,getValue:()=>ke(n.value,h)}):ke(n.value,h))}return d||(f=r?r(c):this.fc.getLoadData(c)),f},s=c=>{let d=[];c.forEach(h=>{h.key?d.push(h.key):h.children&&d.push(s(h.children))});let f=!1;return d.forEach((h,p)=>{h!=null&&(h.indexOf("'")===0||h.indexOf('"')===0)&&(d[p]=h.slice(1,-1),f=!0)}),d.length===1&&(f||!isNaN(Number(d[0])))?d[0]:a(d.join("."))},u;if(o.forEach(c=>{let d=c.split("||"),f=d[0].trim();if(f){let h=(d[1]||"").trim(),p=Cl(f),m=ee(()=>s(p));(m==null||m==="")&&d.length>1&&(m=h),u=m,t=t.replaceAll(`{{${c}}}`,m!=null?m:"")}}),o.length===1&&i===`{{${o[0]}}}`)return u}return t},loadFetchVar(t,r,n){let i;n&&n.__fc__&&(i=n.__fc__.getParentGroup()),!i&&t.targetRule&&t.targetRule.__fc__&&(i=t.targetRule.__fc__.getParentGroup());let o=a=>this.loadStrVar(a,r,i?{rule:n,value:this.subRuleData[i.id]||{}}:null);return t.action=o(t.action||""),["headers","data","query"].forEach(a=>{if(t[a]){let s=Array.isArray(t[a])?[]:{};Object.keys(t[a]).forEach(u=>{s[o(u)]=o(t[a][u])}),t[a]=s}}),t}})}var Oo=["hook:updated","hook:mounted"];function am(e){X(e.prototype,{usePage(){let t=this.options.page;if(!t)return;let r=25,n=lm(this.rules);if(B.Object(t)){let i=t;i.first&&(r=parseInt(String(i.first),10)||r),i.limit&&(n=parseInt(String(i.limit),10)||n)}X(this,{first:r,limit:n,pageEnd:this.rules.length<=r}),this.bus.$on("page-end",()=>this.vm.emit("page-end",this.api)),this.pageLoad()},pageLoad(){let t=()=>{this.pageEnd?(this.bus.$off(Oo,t),this.bus.$emit("page-end")):(this.first+=this.limit,this.pageEnd=this.rules.length<=this.first,this.loadRule(),this.refresh())};this.bus.$on(Oo,t)}})}function lm(e){return e.length<31?31:Math.ceil(e.length/3)}function sm(e){X(e.prototype,{clearNextTick(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick(t){this.clearNextTick(),this.nextTick=setTimeout(()=>{t(),this.nextTick=null},10)},render(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function um(e){Object.defineProperties(e.origin,{__fc__:Vn(l.markRaw(e))}),e.rule!==e.origin&&Object.defineProperties(e.rule,{__fc__:Vn(l.markRaw(e))})}function Al(e,t,r){let n=Qr(),i=!!t.field;X(this,{id:n,ref:n,wrapRef:n+"fi",rule:t,origin:t.__origin__||t,name:t.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:t.subRule?this:null,cacheConfig:null,prop:R({},t),computed:{},payload:{},refRule:{},handlers:null,input:i,el:void 0,exportEl:void 0,defaultValue:i?St(r):void 0,field:t.field||void 0}),this.updateKey(),um(this),this.update(e,!0)}X(Al.prototype,{getParentGroup(){let e=this.parent;for(;e;){if(e.group)return e;e=e.parent}},loadChildrenPending(){let e=this.rule.children||[];return Array.isArray(e)?e:this.loadPending({key:"children",origin:e,def:[],onLoad:t=>{this.$handle&&this.$handle.loadChildren(t,this)},onUpdate:(t,r)=>{this.$handle&&(t===r?this.$handle.loadChildren(t,this):this.$handle.updateChildren(this,t,r))},onReload:t=>{this.$handle?this.$handle.updateChildren(this,[],t):delete this.pending.children}})},loadPending(e){return _l(this,e)},getPending(e,t){return this.pending[e]&&this.pending[e].value||t},setPending(e,t,r){this.pending[e]={origin:t,value:l.reactive(r)}},effectData(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey(e){this.key=Qr(),e&&this.parent&&this.parent.updateKey(e)},updateType(){this.originType=this.rule.type,this.type=Pe(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser(e){this.parser=e,e.init(this)},initProp(){var t,r,n;let e=R({},this.rule);delete e.children,delete e.validate,this.prop=rt({},[e,...Object.keys(this.payload).map(i=>this.payload[i]),this.computed]),e.col&&((t=e.col)==null?void 0:t.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[...((n=(r=this.refRule)==null?void 0:r.__$validate)==null?void 0:n.value)||[],...this.prop.validate||[]]},initNone(){this.none=!(B.Undef(this.prop.display)||this.prop.display)},hasHidden(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate(){return this.prop.validate},check(e){return this.vm===e.vm},unwatch(){this.watch.forEach(e=>e()),this.watch=[],Object.keys(this.refRule).forEach(e=>{e.indexOf("__$")!==0&&delete this.refRule[e]})},unlink(){this.linkOn.forEach(e=>e()),this.linkOn=[]},link(){this.unlink(),this.$handle.appendLink(this)},watchTo(){this.$handle.watchCtx(this)},delete(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),X(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1,handlers:null,el:void 0,exportEl:void 0})},rmCtrl(){this.ctrlRule.forEach(e=>e.__fc__&&e.__fc__.rm()),this.ctrlRule=[]},rm(){let e=()=>{let t=this.root.indexOf(this.origin);t>-1&&(this.root.splice(t,1),this.$handle&&this.$handle.refresh())};this.deleted?e():this.$handle.noWatch(()=>{this.$handle.deferSyncValue(()=>{this.rmCtrl(),e(),this.$handle.rmCtx(this),X(this,{root:[]})},this.input)})},update(e,t){X(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!t&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function cm(e){X(e.prototype,{nextRefresh(t){let r=this.loadedId;l.nextTick(()=>{r===this.loadedId&&(t?t():this.refresh())})},parseRule(t){let r=To(t);return Object.defineProperties(r,{__origin__:Vn(t)}),dm(r),this.appendValue(r),[r,r.prefix,r.suffix].forEach(n=>{n&&this.loadFn(n,r)}),this.loadCtrl(r),r.update&&(r.update=Qe(r.update)),r},loadFn(t,r){["on","props","deep"].forEach(n=>{t[n]&&this.parseInjectEvent(r,t[n])})},loadCtrl(t){t.control&&t.control.forEach(r=>{r.handle&&(r.handle=Qe(r.handle))})},syncProp(t){let r=t.rule,n=r.sync;B.trueArray(n)&&tt([{on:n.reduce((i,o)=>(i[typeof o=="object"&&o.event||`update:${o}`]=a=>{r.props[typeof o=="object"&&o.prop||o]=a,this.vm.emit("sync",o,a,r,this.fapi)},i),{})}],t.computed)},loadRule(){this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(()=>{if(this._loadRule(this.rules),this.loading=!1,this.cycleLoad&&this.pageEnd)return this.loadRule();this.syncForm(),this.pageEnd&&this.bus.$emit("load-end"),this.vm.setupState.renderRule()})},loadChildren(t,r){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(t,r),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(r)},_loadRule(t,r){let n=a=>{let s=t[a-1];if(!s||!s.__fc__)return a>0?n(a-1):-1;let u=this.sort.indexOf(s.__fc__.id);return u>-1?u:n(a-1)},i=(a,s)=>{B.trueArray(a)&&this._loadRule(a,s)},o=t.map((a,s)=>{if(r&&!B.Object(a)||!this.pageEnd&&!r&&s>=this.first)return;if(a.__fc__&&a.__fc__.root===t&&this.ctxs[a.__fc__.id])return i(a.__fc__.loadChildrenPending(),a.__fc__),a.__fc__;let u=To(a),c=()=>!!(u.field&&this.fieldCtx[u.field]&&this.fieldCtx[u.field][0]!==a.__fc__);this.fc.targeabFormDriver("loadRule",{rule:u,api:this.api},this.fc),this.ruleEffect(u,"init",{repeat:c()}),c()&&this.vm.emit("repeat-field",a,this.api);let d=a.__fc__||null,f=!1,h=d!==null,p=u.value;if(h){let y=d;if(p=y.defaultValue,y.deleted){if(Po(y))return;y.update(this)}else if(!y.check(this)){if(Po(y))return;t[s]=a=a._clone?a._clone():tl(or(a)),d=null,f=!0}}if(d)d.originType!==d.rule.type&&d.updateType(),this.bindParser(d),this.appendValue(d.rule),d.parent&&d.parent!==r&&this.rmSubRuleData(d);else{let y=this.parseRule(a);d=new Al(this,y,p),this.bindParser(d)}this.parseEmit(d),this.syncProp(d),d.parent=r||null,d.root=t,this.setCtx(d),!f&&!h&&(this.effect(d,"load"),this.targetHook(d,"load")),this.effect(d,"created");let m=d.loadChildrenPending();if(d.parser.loadChildren===!1||i(m,d),!r){let y=n(s);y>-1||!s?this.sort.splice(y+1,0,d.id):this.sort.push(d.id)}let g=d.rule;return d.updated||(d.updated=!0,B.Function(g.update)&&this.bus.$once("load-end",()=>{this.refreshUpdate(d,g.value,"init")}),this.effect(d,"loaded")),this.refreshControl(d)&&(this.cycleLoad=!0),d}).filter(a=>!!a);r&&(r.children=o)},refreshControl(t){return t.input&&t.rule.control&&this.useCtrl(t)},useCtrl(t){let r=fm(t),n=[],i=this.api;if(!r.length)return!1;for(let s=0;s<r.length;s++){let u=r[s],c=u.handle||function(f){let h=Pt;return(h[u.condition||"=="]||h["=="])(f,u.value)};if(!B.trueArray(u.rule))continue;let d=re(R({},u),{valid:ee(()=>c(t.rule.value,i)),ctrl:pm(t,u.rule),isHidden:B.String(u.rule[0])});d.valid&&d.ctrl||!d.valid&&!d.ctrl&&!d.isHidden||n.push(d)}if(!n.length)return!1;let o=[],a=!1;return this.deferSyncValue(()=>{n.reverse().forEach(({isHidden:s,valid:u,rule:c,prepend:d,append:f,child:h,ctrl:p,method:m})=>{if(s)u?t.ctrlRule.push({__ctrl:!0,children:c,valid:u}):p&&t.ctrlRule.splice(t.ctrlRule.indexOf(p)>>>0,1),o[u?"push":"unshift"](()=>{m==="disabled"||m==="enabled"?this.api.disabled(!u,c):m==="display"||m==="show"?this.api.display(u,c):m==="required"?(c.forEach(g=>{this.api.setEffect(g,"required",u)}),u||this.api.clearValidateState(c)):this.api.hidden(!u,c)});else if(u){a=!0;let g={type:"fragment",native:!0,__ctrl:!0,children:c};t.ctrlRule.push(g),this.bus.$once("load-start",()=>{d?i.prepend(g,d,h):f||h?i.append(g,f||t.id,h):t.root.splice(t.root.indexOf(t.origin)+1,0,g)})}else{t.ctrlRule.splice(t.ctrlRule.indexOf(p),1);let g=Ye(p);g&&g.rm()}})}),o.length&&(this.loading?o.length&&this.bus.$once("load-end",()=>{o.forEach(s=>s())}):o.length&&l.nextTick(()=>{o.forEach(s=>s())})),this.vm.emit("control",t.origin,this.api),this.effect(t,"control"),a},reloadRule(t){return this._reloadRule(t)},_reloadRule(t){t||(t=this.rules);let r=R({},this.ctxs);this.clearNextTick(),this.initData(t),this.fc.rules=t,this.deferSyncValue(()=>{this.bus.$once("load-end",()=>{Object.keys(r).filter(n=>this.ctxs[n]===void 0).forEach(n=>this.rmCtx(r[n])),this.$render.clearCacheAll()}),this.reloading=!0,this.loadRule(),this.reloading=!1,this.refresh(),this.bus.$emit("reloading",this.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh(){this.vm.setupState.refresh()}})}function dm(e){let t=$l();return Object.keys(t).forEach(r=>{fe(e,r)||(e[r]=t[r])}),e}function fm(e){let t=e.rule.control||[];return B.Object(t)?[t]:t}function pm(e,t){for(let r=0;r<e.ctrlRule.length;r++){let n=e.ctrlRule[r];if(n.children===t)return n}}function Po(e){return!!e.rule.__ctrl}function hm(e){X(e.prototype,{setValue(t,r,n,i){t.deleted||(t.rule.value=r,this.changeStatus=!0,this.seabFormData(t,n),this.$render.clearCache(t),this.nextRefresh(),this.syncValue(),this.valueChange(t,r),this.vm.emit("change",t.field,r,t.origin,this.api,i||!1),this.effect(t,"value"),this.targetHook(t,"value",{value:r}),this.emitEvent("change",t.field,r,{rule:t.origin,api:this.api,setFlag:i||!1}),i&&l.nextTick(()=>{l.nextTick(()=>{l.nextTick(()=>{this.api.clearValidateState(t.id)})})}),this.$manager.fieldChange(t,r,n,i))},onInput(t,r){let n;t.input&&(this.isQuote(t,n=t.parser.toValue(r,t))||this.isChange(t,r))&&this.setValue(t,n,r)},onUpdateValue(t,r){this.deferSyncValue(()=>{let n=t.getParentGroup(),i=n?this.subRuleData[n.id]:null,o={};Object.keys(r||{}).forEach(a=>{i&&fe(i,a)?o[a]=r[a]:fe(this.api.form,a)?this.api.form[a]=r[a]:this.api.top!==this.api&&fe(this.api.top.form,a)&&(this.api.top.form[a]=r[a])}),Object.keys(o).length&&this.api.setChildrenFormData(n.rule,o)})},onBaseInput(t,r){this.seabFormData(t,r),this.$render.clearCache(t),this.nextRefresh()},seabFormData(t,r){t.modelValue=r;let n=t.getParentGroup();n&&(this.subRuleData[n.id]||(this.subRuleData[n.id]={}),this.subRuleData[n.id][t.field]=t.rule.value),De(this.formData,t.id,r)},rmSubRuleData(t){let r=t.getParentGroup();r&&this.subRuleData[r.id]&&delete this.subRuleData[r.id][t.field]},geabFormData(t){return this.formData[t.id]},syncForm(){let t=l.reactive({}),r=this.fields(),n=[];this.options.appendValue!==!1&&Object.keys(this.appendData).forEach(i=>{r.indexOf(i)===-1&&(t[i]=l.toRef(this.appendData,i))}),r.forEach(i=>{let o=(this.fieldCtx[i]||[]).filter(a=>!this.isIgnore(a))[0];o||(o=this.fieldCtx[i][0],n.push(i)),t[i]=l.toRef(o.rule,"value")}),this.form=t,this.ignoreFields=n,this.syncValue()},isIgnore(t){return t.rule.ignore===!0||(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields)&&t.hasHidden()},appendValue(t){(t.field&&fe(this.appendData,t.field)||B.Undef(t.value)&&this.options.forceCoverValue)&&(t.value=this.appendData[t.field],delete this.appendData[t.field])},addSubForm(t,r){this.subForm[t.id]=r},deferSyncValue(t,r){this.deferSyncFn||(this.deferSyncFn=t),this.deferSyncFn.sync||(this.deferSyncFn.sync=r),ee(t),this.deferSyncFn===t&&(this.deferSyncFn=null,t.sync&&this.syncForm())},syncValue(){if(this.deferSyncFn)return this.deferSyncFn.sync=!0;let t={};Object.keys(this.form).forEach(r=>{this.ignoreFields.indexOf(r)===-1&&(t[r]=this.form[r])}),this.vm.setupState.updateValue(t)},isChange(t,r){let n=this.geabFormData(t);if(n===r)return!1;let i=typeof n;return i===typeof r&&(i==="string"||i==="boolean"||i==="number"&&Number.isFinite(n)&&Number.isFinite(r))?!0:JSON.stringify(n,Ro)!==JSON.stringify(r,Ro)},isQuote(t,r){return(r instanceof Function||B.Object(r)||Array.isArray(r))&&r===t.rule.value},refreshUpdate(t,r,n,i){if(B.Function(t.rule.update)){let o=ee(()=>t.rule.update(r,t.origin,this.api,{origin:n||"change",linkField:i}));if(o===void 0)return;t.rule.hidden=o===!0}},valueChange(t,r){this.refreshRule(t,r),this.bus.$emit("change-"+t.field,r)},refreshRule(t,r,n,i){this.refreshControl(t)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(t,r,n,i)},appendLink(t){let r=t.rule.link;B.trueArray(r)&&r.forEach(n=>{let i=()=>this.refreshRule(t,t.rule.value,"link",n);this.bus.$on("change-"+n,i),t.linkOn.push(()=>this.bus.$off("change-"+n,i))})},fields(){return Object.keys(this.fieldCtx)}})}function Ro(e,t){return typeof t=="function"?""+t:t}var mm=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],Yt=Symbol("oldValue"),gm=["$condition","$variableVal","$val","$form","$scope","$group","$rule"],ym=["$formulas","$form","$scope","$group","$rule","$api"],$r=new Map,vm=1e3;function Mo(e,t){let r=e.join(",")+"|"+t,n=$r.get(r);return n||($r.size>=vm&&$r.clear(),n=Function(...e,t),$r.set(r,n)),n}function bm(e){X(e.prototype,{scheduleComputedUpdate(t){(this._computedQueue||(this._computedQueue=[])).push(t),this._computedFlushing||this._computedScheduled||(this._computedScheduled=!0,setTimeout(()=>{this._computedScheduled=!1,this._computedFlushing=!0;try{let r=this._computedQueue||[];this._computedQueue=[];for(let n=0;n<r.length;n++)ee(r[n]),this._computedQueue&&this._computedQueue.length&&(r.push(...this._computedQueue),this._computedQueue=[])}finally{this._computedFlushing=!1}}))},getCtx(t){return this.getFieldCtx(t)||this.getNameCtx(t)[0]||this.ctxs[t]},getCtxs(t){return this.fieldCtx[t]||this.nameCtx[t]||(this.ctxs[t]?[this.ctxs[t]]:[])},setIdCtx(t,r,n){let i=`${n}Ctx`;this[i][r]?this[i][r].push(t):this[i][r]=[t]},rmIdCtx(t,r,n){let i=`${n}Ctx`,o=this[i][r];if(!o)return!1;let a=o.splice(o.indexOf(t)>>>0,1).length>0;return o.length||delete this[i][r],a},getFieldCtx(t){return(this.fieldCtx[t]||[])[0]},getNameCtx(t){return this.nameCtx[t]||[]},setCtx(t){let{id:r,field:n,name:i,rule:o}=t;this.ctxs[r]=t,i&&this.setIdCtx(t,i,"name"),t.input&&(this.setIdCtx(t,n,"field"),this.seabFormData(t,t.parser.toFormValue(o.value,t)),this.isMounted&&!this.reloading&&this.vm.emit("change",t.field,o.value,t.origin,this.api,!1,!0))},getParser(t){let r=this.fc.parsers,n=this.fc.renderDriver,i=Pe(t.type)||t.type;if(n){let o=n.parsers||{},a=o[t.originType]||o[i]||o[t.trueType];if(a)return a}return r[t.originType]||r[i]||r[t.trueType]||At},bindParser(t){t.setParser(this.getParser(t))},getType(t){let r=this.fc.CreateNode.aliasMap,n=r[t]||r[Pe(t)||t]||t;return Pe(n)},noWatch(t){this.noWatchFn||(this.noWatchFn=t),ee(t),this.noWatchFn===t&&(this.noWatchFn=null)},watchCtx(t){let r=bl().filter(a=>a[0]!=="_"&&a[0]!=="$"&&mm.indexOf(a)===-1),n={},i=(a,s,u)=>(c,d)=>{let f=s.value;if(!this.isBreakWatch())if(u&&t.parser.loadChildren===!1)this.$render.clearCache(t),this.nextRefresh();else{if(this.watching=!0,l.nextTick(()=>{this.targetHook(t,"watch",{key:a,oldValue:d,newValue:f})}),a==="hidden"&&!!f!=!!d&&l.nextTick(()=>{this.targetHook(t,"hidden",{value:f})}),a==="ignore"&&t.input||a==="hidden"&&(t.rule.ignore==="hidden"||this.options.ignoreHiddenFields))this.syncForm();else if(a==="link"){t.link();return}else["props","on","deep"].indexOf(a)>-1?(this.parseInjectEvent(t.rule,f||{}),a==="props"&&t.input&&this.seabFormData(t,t.parser.toFormValue(t.rule.value,t))):a==="emit"?this.parseEmit(t):["prefix","suffix"].indexOf(a)>-1?f&&this.loadFn(f,t.rule):a==="type"?(t.updateType(),this.bindParser(t)):u&&(B.Function(d)&&(d=t.getPending("children",[])),B.Function(f)&&(f=t.loadChildrenPending()),this.updateChildren(t,f,d));this.$render.clearCache(t),this.refresh(),this.watching=!1}},o=(a,s=!1)=>{if(n[a])return;n[a]=!0;let u=t.refRule[a],c=a==="children",d=i(a,u,c);t.watch.push(l.watch(c?()=>B.Function(u.value)?u.value:[...u.value||[]]:()=>u.value,d,{deep:!c,flush:c?"sync":"pre"})),s&&d(u.value,void 0)};if(r.forEach(a=>{t.refRule[a]=l.toRef(t.rule,a),fe(t.rule,a)&&o(a)}),t.watch.push(l.watch(()=>Object.keys(t.rule).join("|"),()=>{r.forEach(a=>{!n[a]&&fe(t.rule,a)&&o(a,!0)})})),t.refRule.__$title=l.computed(()=>{let a=(typeof t.rule.title=="object"?t.rule.title.title:t.rule.title)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$info=l.computed(()=>{let a=(typeof t.rule.info=="object"?t.rule.info.info:t.rule.info)||"";if(a){let s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=this.api.t(s[1]))}return a}),t.refRule.__$validate=l.computed(()=>{let a=s=>{var c,d;let u=s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);return u?this.api.t(u[1],{title:(d=(c=t.refRule)==null?void 0:c.__$title)==null?void 0:d.value}):s};return kt(t.rule.validate).map(s=>{let u=R({},s);if(u.message&&(u.message=a(u.message)),B.Function(u.validator)){let c=t;u.validator=function(...d){return s.validator.call({that:this,id:c.id,field:c.field,rule:c.rule,api:c.$handle.api},...d)}}if(u.adapter){if(typeof u.error=="object"){let c=R({},u.error);Object.keys(c).forEach(d=>{c[d]=a(c[d])}),u.error=c}return this.adapterValidate(u,t)}return u})}),t.input){let a=l.toRef(t.rule,"value");t.watch.push(l.watch(()=>a.value,()=>{let s=t.parser.toFormValue(a.value,t);this.isChange(t,s)&&this.setValue(t,a.value,s,!0)}))}this.bus.$once("load-end",()=>{let a=t.rule.computed;a&&(typeof a!="object"&&(a={value:a}),Object.keys(a).forEach(s=>{let u=l.computed(()=>{let d=a[s];if(!d)return;let f=this.compute(t,d);return(d.linkage||d.linkageVariable)&&f===Yt?Yt:f}),c=d=>{s==="value"?this.onInput(t,d):s[0]==="$"?this.api.setEffect(t.id,s,d):ct(t.rule,s,d)};(s==="value"?[void 0,null,""].indexOf(t.rule.value)>-1:u.value!==ke(t.rule,s))&&c(u.value),t.watch.push(l.watch(u,d=>{d!==Yt&&this.scheduleComputedUpdate(()=>c(d))},{deep:!0}))}))}),this.watchEffect(t)},adapterValidate(t,r){return this.$manager.adapterValidate({required:t.required,message:t.message,trigger:t.trigger},(n,i)=>{if((t.beforeValidate&&ee(()=>t.beforeValidate({value:n,api:this.api,validate:t,rule:r.rule})))===!1)i();else{let o=this.validator(r,n,t);if(o){let a="";typeof t.error=="object"&&(a=t.error[o]||t.error.default),!a&&typeof t.message=="string"&&(a=t.message),a||(a=this.getValidateMessage(r,{key:o,rule:t[o]})),i(a)}else if(t.validator){let a=t.validator&&ee(()=>t.validator(n,i));a&&B.Function(a.then)&&a.then(()=>i()).catch(s=>i(s))}else i()}})},getValidateMessage(t,r){var i,o;let n=Array.isArray(r.rule)?r.rule.join(","):""+r.rule;return this.api.t(r.key==="required"?r.key:"validate."+r.key,{[r.key]:n,title:(o=(i=t.refRule)==null?void 0:i.__$title)==null?void 0:o.value})},validator(t,r,n){if(B.empty(r))return n.required?"required":void 0;for(let[i,o]of Object.entries(n))switch(i){case"len":case"maxLen":case"minLen":let a=u=>i==="len"?u===o:i==="maxLen"?u<=o:u>=o;if(Array.isArray(r)){if(!a(r.length))return i}else{if(typeof r=="object")return i;if(!a((""+r).length))return i}break;case"pattern":if(!(typeof o=="string"?new RegExp(o):o).test(""+r))return i;break;case"uppercase":if(o&&(typeof r!="string"||!/^[A-Z]*$/.test(r)))return i;break;case"lowercase":if(o&&(typeof r!="string"||!/^[a-z]*$/.test(r)))return i;break;case"min":case"max":case"positive":case"negative":case"integer":case"number":let s=Number(r);if(Number.isNaN(s)||i==="min"&&s<o||i==="max"&&s>o||i==="positive"&&s<=0||i==="negative"&&s>=0||i==="integer"&&!Number.isInteger(s))return i;break;case"equal":if(r!==o)return i;break;case"enum":if(Array.isArray(o)&&!o.includes(r))return i;break;case"hasKeys":if(typeof r!="object"||Array.isArray(o)&&o.some(u=>!(u in r)))return i;break;case"email":if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(""+r))return i;break;case"url":if(!RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i").test(""+r))return i;break;case"ip":if(!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test(""+r))return i;break;case"phone":if(!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test(""+r))return i;break;case"computed":if(!this.compute(t,o))return i}},compute(t,r){let n;if(typeof r=="object"){let i=t.getParentGroup(),o=u=>{if(u=Array.isArray(u)?{mode:"AND",group:u}:u,!B.trueArray(u.group))return!0;let c=u.mode==="OR",d=!0;for(let f=0;f<u.group.length;f++){let h=u.group[f],p,m=null,g=null;if(h.variable)g=this.fc.getLoadData(h.variable);else if(h.field)m=_o(h.field||"");else if(!h.mode)return!0;let y=h.compare;if(y&&(y=_o(y||"")),p=h.mode?o(h):Pt[h.condition]?B.Function(h.handler)?ee(()=>h.handler(this.api,t.rule)):ee(()=>Mo(gm,`with($form){with($scope){with(this){with($group){ return $condition['${h.condition}'](${h.variable?"$variableVal":m}, ${y||"$val"}); }}}}`).call(this.api.form,Pt,g,h.value,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,i&&this.subRuleData[i.id]||{},t.rule)):!1,c&&p)return!0;c||d&&(d=p)}return!c&&d},a=r,s=o(a);return s=a.invert===!0?!s:s,a.linkage?s?ee(()=>this.computeValue(a.linkage,t,i),void 0):Yt:a.linkageVariable?s?ee(()=>this.fc.getLoadData(a.linkageVariable),void 0):Yt:s}if(B.Function(r)){let i=r;n=()=>i(this.api.form,this.api,t.rule)}else{let i=t.getParentGroup();n=()=>this.computeValue(r,t,i)}return ee(n,void 0)},computeValue(t,r,n){let i=this,o=Object.keys(this.fc.formulas).reduce((a,s)=>(a[s]=function(...u){return i.fc.formulas[s].call({that:this,rule:r.rule,api:i.api,fc:i.fc},...u)},a),{});return ee(()=>Mo(ym,`with($form){with($scope){with(this){with($group){with($formulas){ return ${t} }}}}}`).call(this.api.form,o,this.api.top.form,this.api.top===this.api.scope?{}:this.api.scope.form,n&&this.subRuleData[n.id]||{},r.rule,this.api),void 0)},updateChildren(t,r,n){this.deferSyncValue(()=>{n&&n.forEach(i=>{(r||[]).indexOf(i)===-1&&i&&!B.String(i)&&i.__fc__&&i.__fc__.parent===t&&this.rmCtx(i.__fc__)}),B.trueArray(r)&&(this.loadChildren(r,t),this.bus.$emit("update",this.api))})},rmSub(t){B.trueArray(t)&&t.forEach(r=>{r&&r.__fc__&&this.rmCtx(r.__fc__)})},rmCtx(t){if(t.deleted)return;let{id:r,field:n,input:i,name:o}=t;ht(this.ctxs,r),ht(this.formData,r),ht(this.subForm,r),ht(this.vm.setupState.ctxInject,r);let a=t.getParentGroup();a&&this.subRuleData[a.id]&&ht(this.subRuleData[a.id],n),t.group&&ht(this.subRuleData,r),i&&this.rmIdCtx(t,n,"field"),o&&this.rmIdCtx(t,o,"name"),i&&!fe(this.fieldCtx,n)&&ht(this.form,n),this.deferSyncValue(()=>{if(!this.reloading){if(t.parser.loadChildren!==!1){let u=t.getPending("children",t.rule.children);B.trueArray(u)&&u.forEach(c=>c&&c.__fc__&&this.rmCtx(c.__fc__))}t.root===this.rules&&this.vm.setupState.renderRule()}},i);let s=this.sort.indexOf(r);return s>-1&&this.sort.splice(s,1),this.$render.clearCache(t),t.delete(),this.effect(t,"deleted"),this.targetHook(t,"deleted"),i&&!this.fieldCtx[n]&&this.vm.emit("remove-field",n,t.rule,this.api),t.rule.__ctrl||this.vm.emit("remove-rule",t.rule,this.api),t}})}function wm(e){X(e.prototype,{mounted(){let t=()=>{this.isMounted=!0,this.lifecycle("mounted")};this.pageEnd?t():this.bus.$once("page-end",t)},lifecycle(t){this.fc.targeabFormDriver(t,this.api,this.fc),this.vm.emit(t,this.api),this.emitEvent(t,this.api)},emitEvent(t,...r){let n=this.options[t]||this.options[Pe("on-"+t)||"on-"+t];if(n){let i=Qe(n);B.Function(i)&&ee(()=>i(...r))}this.bus.$emit(t,...r)},targetHook(t,r,n){var u,c,d,f;let i=(c=(u=t.prop)==null?void 0:u.hook)==null?void 0:c[r],o=(h,p)=>{h&&(Array.isArray(h)?h:[h]).forEach(m=>{ee(()=>m(re(R({args:Object.values(n||{})},n||{}),{self:t.rule,rule:t.rule,parent:p==null?void 0:p.rule,$f:this.api,api:this.api,option:this.vm.props.option})))})};o(i);let a="deep"+Ka(r),s=t.parent;for(;s;)o((f=(d=s.prop)==null?void 0:d.hook)==null?void 0:f[a],s),s=s.parent}})}function xm(e){X(e.prototype,{useProvider(){let t=this.fc.providers;Object.keys(t).forEach(r=>{let n=t[r];B.Function(n)&&(n=n(this.fc)),n._c=Cm(n),this.onEffect(n,r),this.providers[r]=n})},onEffect(t,r){let n=[];(t._c||["*"]).forEach(i=>{let o=i==="*"?"*":this.getType(i);n.indexOf(o)>-1||(n.push(o),this.bus.$on(`p:${r||t.name}:${o}:${+!!t.input}`,(a,s)=>{t[a]&&t[a](...s)}))}),t._used=n},watchEffect(t){let r={required:()=>{var i,o;return(fe(t.rule,"$required")?t.rule.$required:(o=(i=t.rule)==null?void 0:i.effect)==null?void 0:o.required)||!1}},n=t.rule.effect||{};Object.keys(n).forEach(i=>{r[i]=()=>n[i]}),Object.keys(t.rule).forEach(i=>{i[0]==="$"&&(r[i.substr(1)]=()=>t.rule[i])}),Object.keys(r).forEach(i=>{t.watch.push(l.watch(r[i],o=>{this.effect(t,"watch",{[i]:o})},{deep:!0}))})},ruleEffect(t,r,n){this.emitEffect({rule:t,input:!!t.field,type:this.getType(t.type)},r,n)},effect(t,r,n){this.emitEffect({rule:t.rule,input:t.input,type:t.trueType,ctx:t,custom:n},r)},getEffect(t,r){if(fe(t,"$"+r))return t["$"+r];if(fe(t,"effect")&&fe(t.effect,r))return t.effect[r]},emitEffect({ctx:t,rule:r,input:n,type:i,custom:o},a,s){if(!i||["fcFragment","fragment"].indexOf(i)>-1)return;let u=o||Object.keys(r).reduce((c,d)=>(d[0]==="$"&&(c[d.substr(1)]=r[d]),c),R({},r.effect||{}));Object.keys(u).forEach(c=>{let d=this.providers[c];if(!d||d.input&&!n)return;let f;if(!d._c)f="*";else if(d._used&&d._used.indexOf(i)>-1)f=i;else return;let h=R({value:u[c],getValue:()=>this.getEffect(r,c)},s||{});t&&(h.getProp=()=>t.effectData(c),h.clearProp=()=>t.clearEffectData(c),h.mergeProp=p=>rt(h.getProp(),[p]),h.id=t.id),this.bus.$emit(`p:${c}:${f}:${+!!d.input}`,a,[h,r,this.api])})}})}function Sm(e){return e.filter(function(t,r,n){return n.indexOf(t,0)===r})}function Cm(e){let t=e.components;if(Array.isArray(t)){let r=Sm(t.filter(n=>n!=="*"));return r.length?r:!1}return B.String(t)?[t]:!1}function qe(e){Sl(this,{options(){return e.options.value||{}},bus(){return e.bus},preview(){return e.vm.props.preview==null?e.vm.setupState.parent&&e.vm.setupState.parent.props.preview!=null?e.vm.setupState.parent.props.preview:e.options.value.preview||!1:e.vm.props.preview}}),X(this,{fc:e,vm:e.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:l.reactive({}),subRuleData:l.reactive({}),subForm:{},form:l.reactive({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:()=>{this.lifecycle("reload")}}),this.initData(e.rules),this.$manager=new e.manager(this),this.$render=Reflect.construct(Ln,[this]),this.api=e.extendApiFn.reduce((t,r)=>{let n=ee(()=>r(t,this));return n&&n!==t&&X(t,n),t},tm(this))}X(qe.prototype,{initData(e){X(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData(){this.appendData=R(R(R({},St(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch(e){return new Promise((t,r)=>{let n=this.options.beforeFetch&&ee(()=>this.options.beforeFetch(e,{api:this.api}));n&&B.Function(n.then)?n.then(t).catch(r):t()})},beforeFetch(e){return new Promise((t,r)=>{let n=e&&e.beforeFetch&&ee(()=>e.beforeFetch(e,{api:this.api}));n&&B.Function(n.then)?n.then(t).catch(r):n===!1?r():t()}).then(()=>this.globalBeforeFetch(e))},beforeSubmit(e){return new Promise((t,r)=>{let n=this.options.beforeSubmit&&ee(()=>this.options.beforeSubmit(e,{api:this.api}));n&&B.Function(n.then)?n.then(t).catch(r):n===!1?r():t()})}}),om(qe),am(qe),sm(qe),cm(qe),hm(qe),bm(qe),wm(qe),xm(qe);var Sn=l.defineComponent({name:"fcFragment",inheritAttrs:!1,props:["vnode"],render(){return this.vnode}});function $m(e){return Object.keys(e).map(t=>{let r=e[t],n=l.resolveDirective(t);if(n)return[n,r.value,r.arg,r.modifiers||{}]}).filter(t=>!!t)}function Do(e,t){let r=e.directives;return r?(Array.isArray(r)||(r=[r]),l.withDirectives(t,r.reduce((n,i)=>n.concat($m(i)),[]))):t}function Tm(){let e={};const r=class r{constructor(i){be(this,"aliasMap",e);be(this,"vm");be(this,"handle");this.vm=i.vm,this.handle=i}make(i,o,a){return Do(o,this.h(i,Eo(o),a))}makeComponent(i,o,a){try{return Do(o,l.createVNode(i,Eo(o),a))}catch(s){return console.error(s),l.createVNode("")}}h(i,o,a){let s=this.vm||l.getCurrentInstance();if(!s)throw Error("Cannot create a node outside a component instance");let u=s.appContext.config.isNativeTag(i),c=this.handle.fc.prop.components[i];!c&&u&&delete o.abFormInject;try{return l.createVNode(c||(u?i:l.resolveComponent(i)),o,a)}catch(d){return console.error(d),l.createVNode("")}}static alias(i,o){e[i]=o}static use(i){Object.keys(i).forEach(o=>{let a=Mt(o),s=o.toLocaleLowerCase(),u=i[o];r.alias(o,u),[o,a,s].forEach(c=>{Object.assign(r.prototype,{[c]:function(d,f){return this.make(e[o]||c,d,f)}})})})}};be(r,"aliasMap",e);let t=r;return t}function Em(e){class t extends km{}return Object.assign(t.prototype,e),t}var km=class{constructor(e){be(this,"$handle");be(this,"vm");be(this,"$render");be(this,"$r");be(this,"options");be(this,"ref");be(this,"mergeOptionsRule");be(this,"key");this.$handle=e,this.vm=e.vm,this.options={},this.ref="fcForm",this.mergeOptionsRule={normal:["form","row","info","submitBtn","resetBtn"]},this.updateKey(),this.init()}__init(){this.$render=this.$handle.$render,this.$r=(...e)=>this.$render.renderRule(...e)}updateKey(){this.key=Qr()}init(){}update(){}beforeRender(){}form(){return this.vm.refs[this.ref]}adapterValidate(e,t){return e.validator=(r,n,i)=>t(n,i),e}getSlot(e){let t=r=>r.slots[e]||(r.setupState.parent?t(r.setupState.parent):void 0);return t(this.vm)}mergeOptions(e,t){return tt(e.map(r=>this.tidyOptions(r)),t,this.mergeOptionsRule)}updateOptions(e){this.$handle.fc.targeabFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()}tidyOptions(e){return e}tidyRule(e){}mergeProp(e){}getDefaultOptions(){return{}}fieldChange(e,t,r,n){}render(e){}};function Nr(e,t){return Reflect.get(e,t)}function yi(e,t,r){Reflect.set(e,t,r)}function vi(e,t){Reflect.deleteProperty(e,t)}var _m=function(e){return{name:"loadData",_fn:[],loaded(t,r,n){this.deleted(t),l.nextTick(()=>{let i=kt(t.getValue()),o=[];i.forEach(a=>{if(a&&(a.attr||a.template||a.handler)){let s=c=>{var p;let d=(p=r==null?void 0:r.__fc__)==null?void 0:p.getParentGroup(),f;f=a.template?e.$handle.loadStrVar(a.template,c,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null):a.handler&&B.Function(a.handler)?a.handler(c,r,n):e.$handle.loadStrVar(`{{${a.attr}}}`,c,d?{rule:r,value:e.$handle.subRuleData[d.id]||{}}:null),(f==null||f==="")&&a.default!=null&&(f=a.default),a.copy!==!1&&(f=St(f));let h=a.modify?r:t.getProp();a.to==="child"?h.children?h.children[0]=f:h.children=[f]:ct(h,a.to||"options",f),n.sync(r)},u=e.watchLoadData(c=>s(c));s=ut(s,a.wait||300),a.watch===!1?u():o.push(u)}}),yi(this._fn,t.id,o)})},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=Nr(this._fn,t.id))==null||r.forEach(n=>{n()}),vi(this._fn,t.id),t.clearProp()}}},Fm=function(e){return{name:"t",_fn:[],loaded(t,r,n){this.deleted(t);let i=t.getValue()||{},o=[];Object.keys(i).forEach(a=>{let s=i[a];if(s){let u=typeof s=="object",c=f=>{let h=u?s:null,p=e.t(u?h==null?void 0:h.attr:s,u&&(h==null?void 0:h.params)||null,f),m=u&&(h!=null&&h.modify)?r:t.getProp();a==="child"?m.children?m.children[0]=p:m.children=[p]:ct(m,a,p),n.sync(r)},d=e.watchLoadData(f=>c(f));c=ut(c,(typeof s=="object"?s.wait:0)||300),typeof s!="object"||s.watch!==!1?o.push(d):d()}}),yi(this._fn,t.id,o)},watch(t,r,n){this.loaded(t,r,n)},deleted(t){var r;(r=Nr(this._fn,t.id))==null||r.forEach(n=>{n()}),vi(this._fn,t.id),t.clearProp()}}},Ol={name:"componentValidate",load(e,t,r){let n=e.getValue();if(!n||typeof n=="object"&&"method"in n&&n.method===!1)e.clearProp(),r.clearValidateState([t.field]);else{let i=B.Object(n)&&n!==null?n:{method:n},o=i.method,a=re(R({},i),{validator(...s){let u=Ye(t);if(u&&typeof u=="object"&&"id"in u)return r.exec(u.id,typeof o=="string"?o:"abFormValidate",...s,{attr:e,rule:t,api:r})}});delete a.method,e.getProp().validate=[a]}},watch(e,t,r){Ol.load(e,t,r)}},Am={fetch:function(e){function t(i){return typeof i=="string"?{action:i,to:"options"}:i}function r(i,o,a){let s=i.value;n.deleted(i);let u=t(typeof s=="function"?s(o,a):s),c=h=>{h===void 0?i.clearProp():ct(i.getProp(),(u==null?void 0:u.to)||"options",h),h!=null&&(u!=null&&u.key)&&e.$handle.options.globalData[u.key]&&e.fetchCache.set(e.$handle.options.globalData[u.key],{status:!0,data:h}),a.sync(o)};if(!u||!u.action&&!u.key){c(void 0);return}u=St(u),u.to||(u.to="options");let d=u.onError,f=()=>!i.getValue()&&(i.clearProp(),a.sync(o),!0);yi(n._fn,i.id,e.watchLoadData(ut((h,p)=>{var y;if(p&&(u==null?void 0:u.watch)===!1)return(y=Nr(n._fn,i.id))==null?void 0:y();if(u!=null&&u.key){e.targetRule=o;let v=h(`$globalData.${u.key}`);if(delete e.targetRule,v){if(f())return;c(v)}return}let m=e.$handle.loadFetchVar(St(u),h,o),g=re(R({headers:{}},m),{onSuccess(v,S){if(f())return;let $=P=>S?P:fe(P,"data")?ke(P,"data"):P,V=Qe(m.parse);typeof V=="function"?$=P=>V(P,o,a):typeof V=="string"&&($=P=>ke(P,V)),Nn($(v)).then(P=>{c(P)})},onError(v){if(c(void 0),!f())if(typeof d=="function")d(v,o,a);else{let S=v&&typeof v=="object"&&"message"in v?v.message:void 0;pi(S?String(S):`fetch fail ${m.action||""}`)}}});e.$handle.beforeFetch(g,{rule:o,api:a}).then(()=>{typeof m.action=="function"?Nn(m.action(o,a)).then(v=>{g.onSuccess(v,!0)}).catch(v=>{g.onError(v)}):ee(()=>e.create.fetch(g,{inject:i,rule:o,api:a}))}).catch(()=>{})},u.wait||600)))}let n={name:"fetch",_fn:[],loaded(i,o,a){r(i,o,a)},watch(i,o,a){r(i,o,a)},deleted(i){var o;(o=Nr(this._fn,i.id))==null||o(),vi(this._fn,i.id),i.clearProp()}};return n},loadData:_m,t:Fm,componentValidate:Ol},Om={name:"html",loadChildren:!1,render(e,t){return t.prop.props.innerHTML=e.default(),t.vNode.make(t.prop.props.tag||"div",t.prop)},renderChildren(e){return{default:()=>e.filter(t=>B.String(t)).join("")}}};function Pm(e){e+="=";let t=decodeURIComponent(document.cookie).split(";");for(let r=0;r<t.length;r++){let n=t[r];for(;n.charAt(0)===" ";)n=n.substring(1);if(n.indexOf(e)===0){n=n.substring(e.length,n.length);try{return JSON.parse(n)}catch(i){return n}}}return null}function Rm(e){let t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function Mm(e){let t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(r){return t}return null}function bi(e,t){if(!t)return null;let r=t.split("."),n=r.shift();if(!n)return null;let i=e(n);return r.length?i==null?null:ke(i,r):i}function Dm(e){return bi(Pm,e)}function Im(e){return bi(Rm,e)}function Bm(e){return bi(Mm,e)}var jm=typeof global=="object"&&global&&global.Object===Object&&global,Nm=typeof self=="object"&&self&&self.Object===Object&&self,wi=jm||Nm||Function("return this")(),Dt=wi.Symbol,Pl=Object.prototype,Vm=Pl.hasOwnProperty,Lm=Pl.toString,Gt=Dt?Dt.toStringTag:void 0;function Hm(e){var t=Vm.call(e,Gt),r=e[Gt];try{e[Gt]=void 0;var n=!0}catch(o){}var i=Lm.call(e);return n&&(t?e[Gt]=r:delete e[Gt]),i}var zm=Object.prototype.toString;function Um(e){return zm.call(e)}var qm="[object Null]",Ym="[object Undefined]",Io=Dt?Dt.toStringTag:void 0;function Rl(e){return e==null?e===void 0?Ym:qm:Io&&Io in Object(e)?Hm(e):Um(e)}function Gm(e){return typeof e=="object"&&!!e}var Wm="[object Symbol]";function xi(e){return typeof e=="symbol"||Gm(e)&&Rl(e)==Wm}function Jm(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Si=Array.isArray,Bo=Dt?Dt.prototype:void 0,jo=Bo?Bo.toString:void 0;function Ml(e){if(typeof e=="string")return e;if(Si(e))return Jm(e,Ml)+"";if(xi(e))return jo?jo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Dl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Km="[object AsyncFunction]",Qm="[object Function]",Zm="[object GeneratorFunction]",Xm="[object Proxy]";function eg(e){if(!Dl(e))return!1;var t=Rl(e);return t==Qm||t==Zm||t==Km||t==Xm}var Cn=wi["__core-js_shared__"],No=function(){var e=/[^.]+$/.exec(Cn&&Cn.keys&&Cn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tg(e){return!!No&&No in e}var rg=Function.prototype.toString;function ng(e){if(e!=null){try{return rg.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var ig=/[\\^$.*+?()[\]{}|]/g,og=/^\[object .+?Constructor\]$/,ag=Function.prototype,lg=Object.prototype,sg=ag.toString,ug=lg.hasOwnProperty,cg=RegExp("^"+sg.call(ug).replace(ig,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dg(e){return!Dl(e)||tg(e)?!1:(eg(e)?cg:og).test(ng(e))}function fg(e,t){return e==null?void 0:e[t]}function Il(e,t){var r=fg(e,t);return dg(r)?r:void 0}function pg(e,t){return e===t||e!==e&&t!==t}var hg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mg=/^\w*$/;function gg(e,t){if(Si(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||xi(e)?!0:mg.test(e)||!hg.test(e)||t!=null&&e in Object(t)}var Wt=Il(Object,"create"),yg="__lodash_hash_undefined__",vg=Object.prototype.hasOwnProperty,bg=Object.prototype.hasOwnProperty,wg="__lodash_hash_undefined__";function gt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},gt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},gt.prototype.get=function(e){var t=this.__data__;if(Wt){var r=t[e];return r===yg?void 0:r}return vg.call(t,e)?t[e]:void 0},gt.prototype.has=function(e){var t=this.__data__;return Wt?t[e]!==void 0:bg.call(t,e)},gt.prototype.set=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=Wt&&t===void 0?wg:t,this};function Tr(e,t){for(var r=e.length;r--;)if(pg(e[r][0],t))return r;return-1}var xg=Array.prototype.splice;function Ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ft.prototype.clear=function(){this.__data__=[],this.size=0},Ft.prototype.delete=function(e){var t=this.__data__,r=Tr(t,e);return r<0?!1:(r==t.length-1?t.pop():xg.call(t,r,1),--this.size,!0)},Ft.prototype.get=function(e){var t=this.__data__,r=Tr(t,e);return r<0?void 0:t[r][1]},Ft.prototype.has=function(e){return Tr(this.__data__,e)>-1},Ft.prototype.set=function(e,t){var r=this.__data__,n=Tr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var Sg=Il(wi,"Map");function Cg(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Er(e,t){var r=e.__data__;return Cg(t)?r[typeof t=="string"?"string":"hash"]:r.map}function yt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yt.prototype.clear=function(){this.size=0,this.__data__={hash:new gt,map:new(Sg||Ft),string:new gt}},yt.prototype.delete=function(e){var t=Er(this,e).delete(e);return this.size-=+!!t,t},yt.prototype.get=function(e){return Er(this,e).get(e)},yt.prototype.has=function(e){return Er(this,e).has(e)},yt.prototype.set=function(e,t){var r=Er(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var $g="Expected a function";function Ci(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError($g);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ci.Cache||yt),r}Ci.Cache=yt;var Tg=500;function Eg(e){var t=Ci(e,function(n){return r.size===Tg&&r.clear(),n}),r=t.cache;return t}var kg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_g=/\\(\\)?/g,Fg=Eg(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(kg,function(r,n,i,o){t.push(i?o.replace(_g,"$1"):n||r)}),t});function Ag(e){return e==null?"":Ml(e)}function Og(e,t){return Si(e)?e:gg(e,t)?[e]:Fg(Ag(e))}function Pg(e){if(typeof e=="string"||xi(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rg(e,t){t=Og(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Pg(t[r++])];return r&&r==n?e:void 0}function Mg(e,t,r){var n=e==null?void 0:Rg(e,t);return n===void 0?r:n}var Dg={required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},Ig={required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}},aa,Bg=((aa=window.localStorage)==null?void 0:aa.getItem("lang"))||"zh-cn",la,jg=(la=(e=>({t:t=>Mg(Bg==="zh-cn"?Ig:Dg,t,t)}))())==null?void 0:la.t;function $n(...e){let t=e.length===1?e[0]:e[1],r=e.length===1?t==null?void 0:t.name:e[0];return{id:typeof r=="string"?r:void 0,prop:t}}function Ng(e={}){let t=e.key||[],r=e.array||[],n=e.normal||[];vl.push(...t),mi.push(...r),gi.push(...n),El([...t,...r,...n])}var Vg=1,Me={},Vo=Symbol("defValue");function Bl(e){let t={[Sn.name||"fcFragment"]:Sn},r={},n={},i={},o={},a=[],s=[],u=e.extendApi?[e.extendApi]:[],c=R({},Am),d=Xh(),f={global:{}},h=e.isMobile===!0,p=l.reactive({$mobile:h}),m=Tm(),g={},y={};Ng(e.attrs||{});function v(b){let w=Me[b];if(Array.isArray(w))return w.map(O=>O.api());if(w)return w.api()}function S(b){a.push(b)}function $(...b){let w=$n(...b);w.id&&w.prop&&(n[w.id]=w.prop)}function V(...b){let w=$n(...b);w.id&&w.prop&&(c[w.id]=B.Function(w.prop)?w.prop:re(R({},w.prop),{name:w.id}))}function P(b){m.use(b)}function T(...b){let w=b[0];if(arguments.length===0)return At;if(typeof w=="string"&&arguments.length===1)return r[Pe(w)||w];let O=$n(...b);if(!O.id||!O.prop)return At;let j=Pe(O.id),z=O.prop,oe=z.merge===!0?r[j]:void 0;r[j]=Cr(z,oe||At),d[j]=$e(j),z.maker&&X(d,z.maker)}function E(b,w){let O,j=w;if(typeof b=="string"){if(O=b,j===void 0)return t[O]}else{let pe=b;O=pe.displayName||pe.name,j=b}if(!O||!j)return;let z=Pe(O),oe=Mt(O);t[O]=j,t[z]=j,t[oe]=j,delete m.aliasMap[O],delete m.aliasMap[z],delete m.aliasMap[oe],delete r[O],delete r[z],delete r[oe];let ie=j.abFormParser;ie&&T(O,ie)}function k(){return Gh(Y,t,n)}function N(b,w){let O=k();return l.createApp({data(){return l.reactive({rule:b,option:w})},render(){return l.h(O,R({ref:"fc"},this.$data))}})}function q(){return Sn}function U(b,w){let O=Reflect.get(b,"install");return B.Function(O)?O(x,w):typeof b=="function"&&b(x,w),this}let x=function(b,w){let O=N(b,w||{});a.forEach(z=>{ee(()=>z(x,O))});let j=document.createElement("div");return((w==null?void 0:w.el)||document.body).appendChild(j),O.mount(j).$refs.fc.fapi};Cr(x,y);function _(b){let w=R({},e);return b?w.inherit={components:t,parsers:r,directives:n,modelFields:i,providers:c,useApps:a,maker:d,formulas:g,loadData:p}:delete w.inherit,Bl(w)}function F(b,w){i[b]=w}function A(b,w){g[b]=w}function C(b,w){let O=o[b]||{},j=O.parsers||{};w.parsers&&Object.keys(w.parsers).forEach(z=>{j[z]=Cr(w.parsers[z],At)}),w.name=b,o[b]=re(R(R({},O),w),{parsers:j})}function I(b){b&&Object.keys(Me).forEach(w=>{(Array.isArray(Me[w])?Me[w]:[Me[w]]).forEach(O=>{O.bus.$emit("$loadData."+b)})})}function D(b,w){ct(p,b,w),I(b)}function G(b,w){let O=(...j)=>ee(()=>w(...j));O._driver=!0,D(b,O)}function Q(b,w){let O=(b||"").split(".");b=O.shift()||"";let j=O.join(".");if(fe(p,b)||(p[b]=Vo),p[b]!==Vo){let z=p[b];return z&&z._driver?z=z(j):O.length&&(z=ke(z,O)),z==null||z===""?w:z}return w}function Z(b){u.push(b)}function M(b){delete p[b],I(b)}function H(b,w){s.push({name:b,callback:w})}function Y(b){X(this,{id:Vg++,create:x,vm:b,manager:Em(e.manager||{}),parsers:r,providers:c,modelFields:i,formulas:g,isMobile:h,rules:b.props.rule,name:b.props.name||Qr(),inFor:b.props.inFor,prop:{components:t,directives:n},get:null,drivers:o,renderDriver:null,refreshData:I,loadData:p,CreateNode:m,bus:uh(),unwatch:new Set,options:l.ref({}),extendApiFn:u,fetchCache:new WeakMap,tmpData:l.reactive({})}),this.unwatch.push=this.unwatch.add.bind(this.unwatch),s.forEach(w=>{this.bus.$on(w.name,w.callback)}),l.nextTick(()=>{l.watch(this.options,()=>{this.$handle.$manager.updateOptions(this.options.value),this.api().refresh()},{deep:!0})}),X(b.appContext.components,t),X(b.appContext.directives,n),this.$handle=Reflect.construct(qe,[this]),this.name&&(this.inFor?(Me[this.name]||(Me[this.name]=[]),Me[this.name].push(this)):Me[this.name]=this)}Y.isMobile=h,X(Y.prototype,{init(){this.isSub()&&this.unwatch.add(l.watch(()=>this.vm.setupState.parent.setupState.fc.options.value,()=>{this.initOptions(),this.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver=typeof this.vm.props.driver=="object"?this.vm.props.driver:this.drivers[String(this.vm.props.driver)]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targeabFormDriver(b,...w){this.bus.$emit(b,...w);let O=this.renderDriver;if(O&&O[b])return ee(()=>O[b](...w))},t(b,w,O){let j=O?O("$t."+b):this.globalLanguageDriver(b);return j!=null||(j=""),j&&w&&Object.keys(w).forEach(z=>{let oe=RegExp(`{${z}}`,"g");j=j.replace(oe,w[z])}),j},globalDataDriver(b){var oe;let w=b.split("."),O=w.shift()||"",j=(oe=this.options.value)==null?void 0:oe.globalData,z=j==null?void 0:j[O];if(z){if(z.type==="static")return ke(z.data,w);{let ie,pe=this.fetchCache.get(z);if(pe){if(pe.status&&(ie=ke(pe.data,w)),!pe.loading)return ie;pe.loading=!1,this.fetchCache.set(z,pe)}else this.fetchCache.set(z,{status:!1});let Ee=ut(()=>{Oe();let ve=this.fetchCache.get(z);j&&Object.values(j).indexOf(z)!==-1?(ve&&(ve.loading=!0,this.fetchCache.set(z,ve)),this.bus.$emit("$loadData.$globalData."+O)):this.fetchCache.delete(z)},z.wait||600),Ce=ve=>{this.fetchCache.set(z,{status:!0,data:ve}),this.bus.$emit("$loadData.$globalData."+O)},Oe=this.watchLoadData((ve,Re)=>{if(Re&&z.watch===!1)return Oe();if(Re){Ee();return}let Ie=this.$handle.loadFetchVar(rl(z),ve);Ie.targetRule=this.targetRule,this.$handle.api.fetch(Ie).then(ft=>{Ce(ft)}).catch(()=>{Ce(null)})});return z.watch===!1&&Oe(),ie}}},getLocale(){let b=this.vm.setupState.top.props.locale;return b&&typeof b=="object"?b.name:typeof b=="string"?b:"zh-cn"},globalLanguageDriver(b){var z;let w=this.vm.setupState.top.props.t,O=this.vm.setupState.top.props.locale,j;return w&&(j=ee(()=>w(b))),j==null&&O&&typeof O=="object"&&(j=ke(O,b)),j!=null||(j=ke((((z=this.options.value)==null?void 0:z.language)||{})[this.getLocale()]||{},b),j!=null||(j=jg(b))),j},globalVarDriver(b){var z,oe;let w=b.split("."),O=w.shift()||"",j=(oe=(z=this.options.value)==null?void 0:z.globalVariable)==null?void 0:oe[O];if(j){let ie=B.Function(j)?j:Qe(j.handle);if(ie)return ke(ie((...pe)=>this.$handle.api.getData(...pe),this.$handle.api),w)}},setData(b,w,O){O?D(b,w):(ct(this.vm.setupState.top.setupState.fc.tmpData,b,w),this.bus.$emit("$loadData."+b))},getLoadData(b,w){let O=null;if(b!=null){let j=b.split("."),z=j.shift();if(O=ke(this.vm.setupState.top.setupState.fc.tmpData,b),O!=null)return O;if(z==="$topForm")O=this.$handle.api.top.formData(!0);else if(z==="$scopeForm")O=this.$handle.api.scope.formData(!0);else if(z==="$form")O=this.$handle.api.formData(!0);else if(z==="$options")O=this.options.value;else if(z==="$globalData")O=this.globalDataDriver(j.join(".")),j=[];else if(z==="$var")O=this.globalVarDriver(j.join(".")),j=[];else if(z==="$locale")O=this.getLocale(),j=[];else if(z==="$t")O=this.globalLanguageDriver(j.join(".")),j=[];else{if(z==="$preview")return this.$handle.preview;O=Q(b),j=[]}O&&j.length&&(O=ke(O,j))}return O==null||O===""?w:O},watchLoadData(b,w){let O={},j=ie=>{this.get||(this.get=z),ee(()=>{b(z,ie)}),this.get===z&&(this.get=void 0)},z=(ie,pe)=>{let Ee;if(typeof ie=="object"&&(Ee=ie.getValue,ie=ie.id),O[ie])return O[ie].val;let Ce=l.computed(()=>Ee?Ee():this.getLoadData(ie,pe)),Oe=ie.split("."),ve=Oe.shift(),Re=Oe.shift()||"",Ie=ut(()=>{let Be=Ee?Ee():this.getLoadData(ie,pe);if(O[ie])((Be instanceof Function||B.Object(Be)||Array.isArray(Be))&&Be===O[ie].val||JSON.stringify(Be)!==JSON.stringify(O[ie].val))&&(O[ie].val=Be,j(!0));else return},w||0),ft=l.watch(Ce,Be=>{Ie()});return this.bus.$on("$loadData."+ve,Ie),Re&&this.bus.$on("$loadData."+ve+"."+Re,Ie),O[ie]={fn:()=>{this.bus.$off("$loadData."+ve,Ie),Re&&this.bus.$off("$loadData."+ve+"."+Re,Ie),ft()},val:Ce.value},Ce.value};j(!1);let oe=()=>{Object.keys(O).forEach(ie=>O[ie].fn()),O={},this.unwatch.delete(oe)};return this.unwatch.add(oe),oe},isSub(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions(){this.options.value={};let b=R({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},St(f)),w=this.isSub();w&&(b=this.mergeOptions(b,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),b=this.mergeOptions(b,this.vm.props.option);let O=this.api();this.targeabFormDriver("initOptions",b,{api:O,isSubForm:w}),this.updateOptions(b)},mergeOptions(b,w,O){return w=R({},w||{}),O&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(j=>{delete w[j]}),w.global&&(b.global=Jh(b.global,w.global),delete w.global),this.$handle.$manager.mergeOptions([w],b),b},updateOptions(b){this.options.value=this.mergeOptions(this.options.value,b),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api(){return this.$handle.api},render(){return this.$handle.render()},mounted(){this.$handle.mounted()},unmount(){if(ee(()=>this.$handle.lifecycle("beforeUnmount")),this.name)if(this.inFor){let b=Me[this.name].indexOf(this);Me[this.name].splice(b,1)}else delete Me[this.name];s.forEach(b=>{this.bus.$off(b.name,b.callback)}),this.tmpData={},[...this.unwatch].forEach(b=>b()),this.unwatch.clear(),this.$handle.reloadRule([])},updated(){this.$handle.bindNextTick(()=>this.bus.$emit("next-tick",this.$handle.api))}});function ne(b){X(b,{version:e.version,ui:e.ui,isMobile:h,extendApi:Z,getData:Q,setDataDriver:G,setData:D,removeData:M,refreshData:I,maker:d,component:E,directive:$,setModelField:F,seabFormula:A,setDriver:C,register:V,$vnode:q,parser:T,use:U,factory:_,componentAlias:P,copyRule:wl,copyRules:xl,mergeRule:rt,fetch:kl,$form:k,parseFn:Qe,parseJson:tl,toJson:or,useApp:S,getApi:v,on:H})}function ue(b){X(b,{create:x,install(w,O){f=R(R({},f),O||{});let j=`_installedAbForm${h?"Mobile":""}_${e.ui}`,z=w;if(z[j]===!0)return;z[j]=!0;let oe=function(pe,Ee={}){return x(pe,Ee)};ne(oe),w.config.globalProperties.$abForm=oe;let ie=k();w.component(ie.name,ie),a.forEach(pe=>{ee(()=>pe(b,w))})}})}if(ne(y),ue(y),G("$cookie",Dm),G("$localStorage",Im),G("$sessionStorage",Bm),m.use({fragment:"fcFragment"}),e.install&&x.use(e),S((b,w)=>{w.mixin({props:["abFormInject"],emits:["fc.updateValue","fc.el"]})}),T(Om),e.inherit){let b=e.inherit;b.components&&X(t,b.components),b.parsers&&X(r,b.parsers),b.directives&&X(n,b.directives),b.modelFields&&X(i,b.modelFields),b.providers&&X(c,b.providers),b.useApps&&X(a,b.useApps),b.maker&&X(d,b.maker),b.loadData&&X(p,b.loadData),b.formulas&&X(g,b.formulas)}let J=k();return Cr(J,y),Object.defineProperties(J,{fetch:{get(){return y.fetch},set(b){y.fetch=b}}}),J.util=y,J}const{t:Ge}=Xe(),{isZhCN:Lg}=Se(),Hg=["rgba(1, 1, 1, 0)","#45b787","#21532fff","#6e9bc5","#2775b6","#F26666","#D95970","#ECD2B9","#BF9D8A","#ECDEC0","#D0AC57","#e0e0e0","#beb6b6","#918883","#F2F2F2","#ececec","#2E3032","#182327","rgba(0, 0, 0, 0.5)"],Lo={hidden:{hidden:!0},datePicker:{props:{valueFormat:"x"}},timePicker:{props:{format:"HH:mm",valueFormat:"HH:mm"}},select:{props:{showKey:!0,showCode:!0}},treeSelect:{props:{defaultExpandAll:!0,expandOnClickNode:!1}},treeSelectMultiple:{props:{multiple:!0,type:"checked",showCheckbox:!0}},inputNumber:{align:"right"},inputCurrency:{align:"right",children:[{type:"span",slot:"prefix",children:[Lg()?"¥":"$"]}]},inputPercent:{align:"right",children:[{type:"span",slot:"suffix",children:["%"]}]},switch:{align:"center"},colorPicker:{props:{showAlpha:!0,predefine:Hg}},divider:{props:{contentPosition:"left"}}};function jl(e,t={}){const{type:r,disabledDate:n,shortcuts:i}=e||{};let o=Lo[r||""];if(r==="datePicker"){if(n===!0&&(o=br({},o,{props:{disabledDate:Ug}})),i===!0){const p=We(e,"props.type")==="daterange";o=br({},o,{props:{shortcuts:p?Yg:qg}})}}else r==="treeSelect"&&We(e,"props.multiple")&&(o=br({},o,Lo.treeSelectMultiple));if(!o)return e;const a=t.includeChildren!==!1,f=o,{children:s}=f,u=Lt(f,["children"]),d=br({},a?o:u,e);return a&&s?re(R({},d),{children:zg(s,e.children)}):d}function zg(e,t){if(t===void 0)return e;if(!Array.isArray(t))return t;const r=new Set(t.map(n=>n==null?void 0:n.slot).filter(Boolean));return[...e.filter(n=>!n.slot||!r.has(n.slot)),...t]}function Ug(e){return e.getTime()>Date.now()}const qg=[{text:Ge("today"),value:()=>ce().startOf("day").valueOf()},{text:Ge("yesterday"),value:()=>ce().subtract(1,"days").startOf("day").valueOf()},{text:Ge("lastWeek"),value:()=>ce().subtract(1,"weeks").startOf("week").valueOf()}],Yg=[{text:Ge("today"),value:()=>[ce().startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("yesterday"),value:()=>[ce().subtract(1,"days").startOf("day").valueOf(),ce().subtract(1,"days").endOf("day").valueOf()]},{text:Ge("lastWeek"),value:()=>[ce().subtract(1,"weeks").startOf("week").valueOf(),ce().subtract(1,"weeks").endOf("week").valueOf()]},{text:Ge("last7"),value:()=>[ce().subtract(7,"days").startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("last30"),value:()=>[ce().subtract(30,"days").startOf("day").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("thisMonth"),value:()=>[ce().startOf("month").valueOf(),ce().endOf("day").valueOf()]},{text:Ge("thisYear"),value:()=>[ce().startOf("year").valueOf(),ce().endOf("day").valueOf()]}];function Ho(e,t=[]){var i;const r=[],n=new Map;for(const o of e){const a=typeof o.group=="string"?o.group?[o.group]:[]:(i=o.group)!=null?i:[];if(!Array.isArray(a)||a.some(d=>typeof d!="string"||!d.trim()))throw new TypeError("Table column group must be a non-empty name or an array of non-empty names.");if(!a.length){r.push(o);continue}let s=r;const u=[];let c;for(const d of a){u.push(d);const f=JSON.stringify(u);let h=n.get(f);h||(h={field:`__ab_table_group__${encodeURIComponent(JSON.stringify([t,u]))}`,title:d,children:[]},n.set(f,h),s.push(h)),c=h,s=h.children}c&&o.groupAlign!==void 0&&(c.groupAlign=o.groupAlign),s.push(o)}return r}function Gg(e,t){const r=e.sortData;if(!r)return e;const n=new Map,i=new Set;function o(d,f){var h;for(const p of d){const m=p.getKey();m&&(n.set(m,f),p.defaultVisible===!1&&i.add(m),(h=p.children)!=null&&h.length&&o(p.children,m))}}o(t,null);const a=new Set;function s(d,f){return d.some(h=>{if(!h||typeof h.k!="string"||h.c!==void 0&&!Array.isArray(h.c))return!0;const{k:p,c:m}=h;return a.has(p)||n.has(p)&&n.get(p)!==f?!0:(a.add(p),m?s(m,p):!1)})}if(!(Array.isArray(r)?s(r,null):typeof r!="object"||Object.keys(r).some(d=>n.has(d)&&n.get(d)!==null)))return e;const c=e.visibleData&&R({},e.visibleData);if(c)for(const d of i)c[d]===!0&&delete c[d];return re(R({},e),{sortData:void 0,visibleData:c})}function Wg(e){const t=l.reactive(new Map),r=new WeakMap,n=new Set;function i(u){return typeof u.getRule=="function"?u.getRule():u}function o(u){let c=r.get(u);if(!c){const f={};c={rule:u,pending:f,getPending(h,p){return f[h]&&f[h].value||p},setPending(h,p,m){f[h]={origin:p,value:l.reactive(m)}}},r.set(u,c)}const d=Fl(c,u.options,{onLoad:f=>t.set(u,f),onUpdate:f=>t.set(u,f),onReload:()=>{t.set(u,[]),o(u)}});t.set(u,d)}function a(u,c){for(const d of u){const f=i(d);c.has(f)||(c.add(f),typeof f.options=="function"?o(f):t.delete(f),Array.isArray(f.children)&&a(f.children,c))}}l.watchEffect(()=>{const u=new Set;a(e(),u);for(const c of n)u.has(c)||(n.delete(c),t.delete(c));u.forEach(c=>n.add(c))});function s(u,c,d){const f=i(u),h=t.get(f),p=[...c,f.field?`field:${f.field}`:`index:${d}`],m=Array.isArray(f.children)?Ho(f.children.map((v,S)=>s(v,p,S)),p):f.children,g=Array.isArray(m)&&m.some((v,S)=>v!==f.children[S]);let y=f;return(typeof f.options=="function"||g)&&(y=re(R(R({},f),typeof f.options=="function"?{options:h}:{}),{children:m})),jl(y,{includeChildren:!1})}return l.computed(()=>Ho(e().map((u,c)=>s(u,[],c))))}function Nl(e,t){for(const r of e){if(r.field===t)return r;if(r.children){const n=Nl(r.children,t);if(n)return n}}}function Jg(e,t,r,n){var o;if(!r)return e;const i=(o=r.footerFormatter)!=null?o:hi(r).formatter;return i?i({cellValue:e,row:t,column:n!=null?n:r}):e}function Kg(e,t,r,n,i){var h;if(typeof e.labelField!="string"||!e.labelField.trim()||!Array.isArray(e.fields))throw new TypeError("AbTable footerSummary requires a labelField and a fields array.");const o=new Set([e.labelField]),a=[],s=[],u=p=>{if(!p.trim()||o.has(p)||["__proto__","constructor","prototype"].includes(p))throw new TypeError(`AbTable footerSummary has an invalid or duplicate field: "${p}".`);o.add(p)};if(["__proto__","constructor","prototype"].includes(e.labelField))throw new TypeError("AbTable footerSummary has an invalid labelField.");for(const p of e.fields)if(typeof p=="string")u(p),a.push(p);else{if(!p||typeof p!="object"||Array.isArray(p)||!Object.keys(p).length)throw new TypeError("AbTable footerSummary fields must be field names or objects of callbacks.");for(const[m,g]of Object.entries(p)){if(u(m),typeof g!="function")throw new TypeError(`AbTable footerSummary handler for "${m}" must be a function.`);s.push([m,g])}}const c={};for(const p of a){let m=null;for(const g of t){const y=g[p];if(!(y==null||typeof y=="string"&&!y.trim())){if(typeof y!="number"&&typeof y!="string"||!Number.isFinite(Number(y)))throw new TypeError(`AbTable footerSummary field "${p}" must contain numbers or numeric strings.`);if(m=(m!=null?m:0)+Number(y),!Number.isFinite(m))throw new RangeError(`AbTable footerSummary total for "${p}" is not finite.`)}}c[p]=m}for(const[p,m]of s){const g=t.length?m({rows:t,totals:Object.freeze(R({},c))}):null;if(g!==null&&(typeof g!="number"||!Number.isFinite(g)))throw new TypeError(`AbTable footerSummary handler for "${p}" must return a finite number or null.`);c[p]=g}const d=R({[e.labelField]:(h=e.label)!=null?h:n},c),f=R({},d);for(const[p,m]of Object.entries(c))f[p]=m===null?"-":Jg(m,d,Nl(r,p),i(p));return f}const Vl=l.defineComponent({name:"AbTable",__name:"ab-table",props:l.mergeModels({id:{},title:{},rule:{default:()=>[]},queryHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},pagerClassName:{},pagerConfig:{},pagerEnable:{type:Boolean,default:!0},locale:{default:"zh-cn"},idField:{},idFieldTable:{},permiPrefix:{},compactMode:{type:Boolean},parentIdField:{},accordion:{type:Boolean},hasChildField:{},lazyMethod:{},isCurrent:{type:Boolean},dragable:{type:Boolean},absDragable:{type:Boolean},rowClassName:{},headerCellClassName:{},cellClassName:{},rowStyle:{},editable:{type:Boolean},singleSelect:{type:Boolean},multiSelect:{type:Boolean},validRules:{},sortable:{type:Boolean,default:!0},sortLocally:{type:Boolean},footerSummary:{},maxHeight:{},offsetTop:{},autoHeight:{type:Boolean},readonly:{type:Boolean,default:!0}},{query:{},queryModifiers:{}}),emits:l.mergeModels(["update:modelValue","changed","cellClick","current-change","after-loaded","operated"],["update:query"]),setup(e,{expose:t,emit:r}){var Ri;const n=r,i=e,{t:o}=Xe(),a=lr.useRoute(),s=l.ref(null),u=l.ref(),c=l.ref();l.inject("abToolbarRef",null);const d=l.ref([]),f=l.ref(i.id||String((Ri=l.getCurrentInstance())==null?void 0:Ri.uid)||a.path),h=Wg(()=>i.rule),p=l.computed(()=>{const W=[];return i.editable&&ja(i.rule||[],K=>K.field&&K.edit?W.push(K.field):void 0),W}),m=({column:W})=>{var K;return typeof i.headerCellClassName=="function"?i.headerCellClassName({column:W}):(K=p.value)!=null&&K.includes(W.field)?"primary":null},g=l.computed(()=>!(!i.readonly||i.multiSelect||i.singleSelect)),{wsCache:y}=Se(),v=l.computed(()=>y.getCurrentSize||"default"),S=l.computed(()=>pl(v.value)),$={useKey:!0,resizable:!0},V=l.reactive({useKey:!0,isHover:!0,isCurrent:i.isCurrent,drag:i.dragable}),P=i.compactMode?{padding:!1,height:30}:void 0,T=i.dragable?l.reactive({trigger:"row",showGuidesStatus:!0}):void 0,E=l.reactive({immediate:!0,storage:!0,restoreStore:({$table:W,storeData:K})=>{const te=Gg(K,W.getFullColumns());return te!==K&&console.warn("[AbTable] Saved column order conflicts with current groups; the order and visibility overrides for hidden columns were ignored."),te}}),k=l.reactive({filename:`${i.title||(a==null?void 0:a.meta.title)}_${ce().format("YYYYMMDD")}`,columns:Na(wt(i.rule,W=>W.field!==de.OPERATE),W=>({field:W.field}))}),N=(W,K)=>me(this,null,function*(){var le;const te=c.value,we=wt(i.rule,ae=>(ae==null?void 0:ae.field)&&(ae==null?void 0:ae.field)!=="operate"&&!ae.hidden),ye=!!i.parentIdField&&((le=b.value)==null?void 0:le.expandAll);if(K){const ae=te==null?void 0:te.getCheckboxRecords();if(!(ae==null?void 0:ae.length))return;te==null||te.exportData({data:ae,columns:we,isAllExpand:ye,filename:W})}else te==null||te.exportData({columns:we,isAllExpand:ye,filename:W})}),q=W=>{var K,te;return(te=(K=c.value)==null?void 0:K.getColumnByField)==null?void 0:te.call(K,W)},U=l.computed(()=>i.footerSummary?[Kg(i.footerSummary,d.value,h.value,o("table.total"),q)]:[]),x=l.useModel(e,"query"),_=l.ref(0),F=l.ref(1),A=l.ref(10),C=l.ref(""),I=l.ref(""),D=l.ref(""),G=l.computed(()=>{var W,K,te,we,ye,le,ae,Fe,je,Ne;return{pageNo:(K=(W=i.pagerConfig)==null?void 0:W.pageNoField)!=null?K:"pageNo",pageSize:(we=(te=i.pagerConfig)==null?void 0:te.pageSizeField)!=null?we:"pageSize",sortFieldTable:(le=(ye=i.pagerConfig)==null?void 0:ye.sortFieldTableField)!=null?le:"sortFieldTable",sortField:(Fe=(ae=i.pagerConfig)==null?void 0:ae.sortFieldField)!=null?Fe:"sortField",sortType:(Ne=(je=i.pagerConfig)==null?void 0:je.sortTypeField)!=null?Ne:"sortType"}}),Q=l.computed(()=>{var W;return((W=i.pagerConfig)==null?void 0:W.layouts)||["Home","PrevJump","PrevPage","Number","NextPage","NextJump","End","Sizes","FullJump","Total"]});function Z(){var Fe,je,Ne,lt,pt,Vt;const W=(Fe=x.value)!=null?Fe:{},K=G.value,te=(je=W[K.pageNo])!=null?je:1,we=(Ne=W[K.pageSize])!=null?Ne:10,ye=(lt=W[K.sortFieldTable])!=null?lt:"",le=(pt=W[K.sortField])!=null?pt:"",ae=(Vt=W[K.sortType])!=null?Vt:"";if(!Number.isInteger(te)||Number(te)<1||!Number.isInteger(we)||Number(we)<1)throw new TypeError("AbTable pageNo and pageSize must be positive integers.");if(typeof ye!="string"||typeof le!="string"||typeof ae!="string")throw new TypeError("AbTable sort fields must be strings.");F.value=Number(te),A.value=Number(we),C.value=ye,I.value=le,D.value=ae}const M=te=>me(this,[te],function*({currentPage:W,pageSize:K}){F.value=W,A.value=K,yield gr()}),H=l.reactive({trigger:"cell",remote:!i.sortLocally}),Y=we=>me(this,[we],function*({field:W,order:K,column:te}){var ye,le,ae,Fe,je;if(!K)C.value=(ye=i.idFieldTable)!=null?ye:"",I.value=i.idField||"id",D.value="desc";else{const Ne=(Fe=(ae=(le=te.params)==null?void 0:le.sortFieldTable)!=null?ae:i.idFieldTable)!=null?Fe:"",lt=((je=te.params)==null?void 0:je.sortField)||W;if(typeof Ne!="string"||typeof lt!="string")throw new TypeError("AbTable column sortFieldTable and sortField must be strings.");C.value=Ne,I.value=lt.replace(/[A-Z]/g,pt=>"_"+pt.toLowerCase()),D.value=K}yield on()}),ne=l.computed(()=>i.editable&&!g.value?{trigger:"click",mode:"row",showStatus:!0}:void 0),ue=l.ref(i.editable),J=l.computed(()=>!i.parentIdField),b=l.computed(()=>{if(!i.parentIdField)return;const W={transform:!0,accordion:i.accordion,rowField:i.idField||"id",parentField:i.parentIdField||"parentId",hasChildField:i.hasChildField||"hasChildren",expandAll:!0};return typeof i.lazyMethod=="function"&&(W.lazy=!0,W.loadMethod=i.lazyMethod),W}),w=i.singleSelect?{labelField:"name",trigger:"row"}:void 0,O=Np(W=>n("current-change",{newValue:W}),100),j=({row:W,column:K})=>{if((K==null?void 0:K.field)===de.OPERATE)return;const te=c.value;(!i.editable||g.value)&&(te==null||te.clearCheckboxRow()),te==null||te.setCheckboxRow(W,!0),n("cellClick",{row:W,column:K})},z=()=>{var K;const W=(K=c.value)==null?void 0:K.getRadioRecord();O(W)},oe=l.computed(()=>i.multiSelect||typeof i.multiSelect=="undefined"&&i.editable);V.isCurrent=oe.value||i.singleSelect||i.absDragable||i.isCurrent;const ie=l.reactive({highlight:i.multiSelect&&i.editable,range:!i.parentIdField}),pe=()=>{var K;const W=(K=c.value)==null?void 0:K.getCheckboxRecords();O(W)},Ee=({newValue:W,column:K})=>{(K==null?void 0:K.field)!==de.OPERATE&&O(W)};let Ce=l.ref(i.maxHeight||0);const Oe={mini:36,small:40,medium:44,large:48};let ve=Oe[S.value||"medium"]||Oe.medium;const Re=l.ref([10,15,20,50,100]),Ie=()=>{var je,Ne,lt,pt,Vt,Mi,Di,Ii,Bi;if(!i.autoHeight){i.maxHeight&&(Ce.value=i.maxHeight);return}(Ne=(je=c.value)==null?void 0:je.cellConfig)!=null&&Ne.height&&(ve=c.value.cellConfig.height);const W=(lt=s.value)==null?void 0:lt.parentElement,K=((Vt=(pt=W==null?void 0:W.querySelector(".ab-toolbar"))==null?void 0:pt.getBoundingClientRect())==null?void 0:Vt.height)||0,te=(So(i.rule)||0)*ve,we=((Ii=(Di=(Mi=u.value)==null?void 0:Mi.$el)==null?void 0:Di.getBoundingClientRect())==null?void 0:Ii.height)||0,ye=(((Bi=W==null?void 0:W.getBoundingClientRect())==null?void 0:Bi.height)||500)-K-we;if(i.offsetTop){const an=window.innerHeight-(i.offsetTop||0);Ce.value=Math.max(ye,an)}else Ce.value=ye;if(Ce.value<=0)return;const le=Ce.value-te-(i.pagerEnable?ve*1.5:0);let ae=Math.min(Math.max(Math.round(le/ve),10),100);i.footerSummary&&(ae-=1);const Fe=[...Re.value];Fe.includes(ae)||(Fe.push(ae),Fe.sort((an,Fs)=>an-Fs)),Re.value=Fe,A.value=ae,console.warn("calculateTableHeight: ",So(i.rule))},ft=l.ref(!1);let Be=0;function gr(){return me(this,null,function*(){var K,te;if(!i.queryHandler)return;const W=++Be;ft.value=!0;try{const we=G.value,ye=re(R({},x.value),{[we.pageNo]:F.value,[we.pageSize]:A.value,[we.sortFieldTable]:C.value,[we.sortField]:I.value,[we.sortType]:D.value}),le=yield i.queryHandler(ye),ae=Array.isArray(le)?le:(K=le==null?void 0:le.data)!=null?K:le==null?void 0:le.list;if(!Array.isArray(ae))throw new TypeError("AbTable queryHandler must return an array or an object containing a data or list array.");if(W!==Be)return;d.value=ae,_.value=Array.isArray(le)?le.length:(te=le.total)!=null?te:ae.length}finally{W===Be&&(ft.value=!1)}})}l.onMounted(()=>me(this,null,function*(){Z(),Ie(),yield gr()}));function _s(){return me(this,null,function*(){F.value=1,yield gr()})}function on(){return me(this,null,function*(){yield gr()})}return t({reload:_s,refresh:on,resize:()=>Ie(),tableRef:c,exportData:N}),(W,K)=>{const te=l.resolveComponent("vxe-table"),we=l.resolveComponent("vxe-pager");return l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:s,class:"ab-table"},[l.createVNode(te,{ref_key:"tableRef",ref:c,id:f.value,data:d.value,stripe:J.value,loading:ft.value,"column-config":$,"row-config":V,"row-drag-config":l.unref(T),"cell-config":l.unref(P),"custom-config":E,"tree-config":b.value,"row-class-name":e.rowClassName,"header-cell-class-name":m,"cell-class-name":e.cellClassName,"row-style":e.rowStyle,border:"inner",size:S.value,"max-height":l.unref(Ce),"edit-config":ne.value,"edit-rules":e.editable?e.validRules:void 0,"keep-source":ue.value,"show-overflow":"","show-header-overflow":"","show-footer-overflow":"","auto-resize":"","show-footer":!!e.footerSummary,"footer-data":U.value,"sort-config":H,onSortChange:Y,"radio-config":l.unref(w),onRadioChange:z,"checkbox-config":ie,onCheckboxChange:pe,onCheckboxAll:pe,onCurrentChange:Ee,"export-config":k,onCellClick:j},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(ye,le)=>(l.openBlock(),l.createBlock(qh,{key:ye.field||le,rule:ye,idx:le,"id-field":e.idField,"id-field-table":e.idFieldTable,"permi-prefix":e.permiPrefix,sortable:e.sortable,"delete-handler":e.deleteHandler,readonly:e.readonly,onRefresh:on},null,8,["rule","idx","id-field","id-field-table","permi-prefix","sortable","delete-handler","readonly"]))),128))]),_:1},8,["id","data","stripe","loading","row-config","row-drag-config","cell-config","custom-config","tree-config","row-class-name","cell-class-name","row-style","size","max-height","edit-config","edit-rules","keep-source","show-footer","footer-data","sort-config","radio-config","checkbox-config","export-config"]),e.pagerEnable?(l.openBlock(),l.createBlock(we,{key:0,ref_key:"pagerRef",ref:u,"class-name":e.pagerClassName,"page-sizes":Re.value,"current-page":F.value,"onUpdate:currentPage":K[0]||(K[0]=ye=>F.value=ye),"page-size":A.value,"onUpdate:pageSize":K[1]||(K[1]=ye=>A.value=ye),total:_.value,size:S.value,layouts:Q.value,onPageChange:M},null,8,["class-name","page-sizes","current-page","page-size","total","size","layouts"])):l.createCommentVNode("",!0)],512)}}});/**
12
+ * (c) Iconify
13
+ *
14
+ * For the full copyright and license information, please view the license.txt or license.gpl.txt
15
+ * files at https://github.com/iconify/iconify
16
+ *
17
+ * Licensed under MIT.
18
+ *
19
+ * @license MIT
20
+ * @version 3.1.1
21
+ */const Ll=Object.freeze({left:0,top:0,width:16,height:16}),Vr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fr=Object.freeze(R(R({},Ll),Vr)),Hn=Object.freeze(re(R({},fr),{body:"",hidden:!1}));function Qg(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}function zo(e,t){const r=Qg(e,t);for(const n in Hn)n in Vr?n in e&&!(n in r)&&(r[n]=Vr[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}function Zg(e,t){const r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(r[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=n[a]&&n[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(r).concat(Object.keys(n)).forEach(o),i}function Xg(e,t,r){const n=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=zo(n[s]||i[s],o)}return a(t),r.forEach(a),zo(e,o)}function ey(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),r.push(i)});const n=Zg(e);for(const i in n){const o=n[i];o&&(t(i,Xg(e,i,o)),r.push(i))}return r}const Zt=/^[a-z0-9]+(-[a-z0-9]+)*$/,Nt=(e,t,r,n="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),c={provider:i.length>0?i[0]:n,prefix:u,name:s};return t&&!Pr(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:n,prefix:a.shift(),name:a.join("-")};return t&&!Pr(s)?null:s}if(r&&n===""){const s={provider:n,prefix:"",name:o};return t&&!Pr(s,r)?null:s}return null},Pr=(e,t)=>e?!!((e.provider===""||e.provider.match(Zt))&&(t&&e.prefix===""||e.prefix.match(Zt))&&e.name.match(Zt)):!1,ty=R({provider:"",aliases:{},not_found:{}},Ll);function Tn(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function ry(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Tn(e,ty))return null;const r=t.icons;for(const i in r){const o=r[i];if(!i.match(Zt)||typeof o.body!="string"||!Tn(o,Hn))return null}const n=t.aliases||Object.create(null);for(const i in n){const o=n[i],a=o.parent;if(!i.match(Zt)||typeof a!="string"||!r[a]&&!n[a]||!Tn(o,Hn))return null}return t}const Lr=Object.create(null);function ny(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Ze(e,t){const r=Lr[e]||(Lr[e]=Object.create(null));return r[t]||(r[t]=ny(e,t))}function $i(e,t){return ry(t)?ey(t,(r,n)=>{n?e.icons[r]=n:e.missing.add(r)}):[]}function iy(e,t,r){try{if(typeof r.body=="string")return e.icons[t]=R({},r),!0}catch(n){}return!1}function oy(e,t){let r=[];return(typeof e=="string"?[e]:Object.keys(Lr)).forEach(i=>{(typeof i=="string"&&typeof t=="string"?[t]:Object.keys(Lr[i]||{})).forEach(a=>{const s=Ze(i,a);r=r.concat(Object.keys(s.icons).map(u=>(i!==""?"@"+i+":":"")+a+":"+u))})}),r}let Ti=!1;function ay(e){return Ti}function pr(e){const t=typeof e=="string"?Nt(e,!0,Ti):e;if(t){const r=Ze(t.provider,t.prefix),n=t.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function ly(e,t){const r=Nt(e,!0,Ti);if(!r)return!1;const n=Ze(r.provider,r.prefix);return iy(n,r.name,t)}function Hl(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const r=e.prefix;if(!Pr({provider:t,prefix:r,name:"a"}))return!1;const n=Ze(t,r);return!!$i(n,e)}function sy(e){return!!pr(e)}function uy(e){const t=pr(e);return t?R(R({},fr),t):null}const zl=Object.freeze({width:null,height:null}),Ul=Object.freeze(R(R({},zl),Vr)),cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,dy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zn(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const n=e.split(cy);if(n===null||!n.length)return e;const i=[];let o=n.shift(),a=dy.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*r)/r)}else i.push(o);if(o=n.shift(),o===void 0)return i.join("");a=!a}}const fy=e=>e==="unset"||e==="undefined"||e==="none";function Xr(e,t){const r=R(R({},fr),e),n=R(R({},Ul),t),i={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,n].forEach(m=>{const g=[],y=m.hFlip,v=m.vFlip;let S=m.rotate;y?v?S+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):v&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let $;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:$=i.height/2+i.top,g.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:$=i.width/2+i.left,g.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}S%2===1&&(i.left!==i.top&&($=i.left,i.left=i.top,i.top=$),i.width!==i.height&&($=i.width,i.width=i.height,i.height=$)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=n.width,s=n.height,u=i.width,c=i.height;let d,f;a===null?(f=s===null?"1em":s==="auto"?c:s,d=zn(f,u/c)):(d=a==="auto"?u:a,f=s===null?zn(d,c/u):s==="auto"?c:s);const h={},p=(m,g)=>{fy(g)||(h[m]=g.toString())};return p("width",d),p("height",f),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+u.toString()+" "+c.toString(),{attributes:h,body:o}}const py=/\sid="(\S+)"/g,hy="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let my=0;function ql(e,t=hy){const r=[];let n;for(;n=py.exec(e);)r.push(n[1]);if(!r.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(o=>{const a=typeof t=="function"?t(o):t+(my++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const vt={local:!0,session:!0},Yl={local:new Set,session:new Set};let Ei=!1;function gy(e){Ei=e}const Uo="iconify2",ar="iconify",Gl=ar+"-count",qo=ar+"-version",Wl=36e5,yy=168;function Un(e,t){try{return e.getItem(t)}catch(r){}}function ki(e,t,r){try{return e.setItem(t,r),!0}catch(n){}}function Yo(e,t){try{e.removeItem(t)}catch(r){}}function qn(e,t){return ki(e,Gl,t.toString())}function Yn(e){return parseInt(Un(e,Gl))||0}let kr=typeof window=="undefined"?{}:window;function Jl(e){const t=e+"Storage";try{if(kr&&kr[t]&&typeof kr[t].length=="number")return kr[t]}catch(r){}vt[e]=!1}function Kl(e,t){const r=Jl(e);if(!r)return;const n=Un(r,qo);if(n!==Uo){if(n){const s=Yn(r);for(let u=0;u<s;u++)Yo(r,ar+u.toString())}ki(r,qo,Uo),qn(r,0);return}const i=Math.floor(Date.now()/Wl)-yy,o=s=>{const u=ar+s.toString(),c=Un(r,u);if(typeof c=="string"){try{const d=JSON.parse(c);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>i&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,s))return!0}catch(d){}Yo(r,u)}};let a=Yn(r);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,qn(r,a)):Yl[e].add(s))}function Ql(){if(!Ei){gy(!0);for(const e in vt)Kl(e,t=>{const r=t.data,n=t.provider,i=r.prefix,o=Ze(n,i);if(!$i(o,r).length)return!1;const a=r.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Zl(e,t){switch(e){case"local":case"session":vt[e]=t;break;case"all":for(const r in vt)vt[r]=t;break}}const Gn=Object.create(null);function Xl(e,t){Gn[e]=t}function Wn(e){return Gn[e]||Gn[""]}function _i(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const en=Object.create(null),Jt=["https://api.simplesvg.com","https://api.unisvg.com"],Rr=[];for(;Jt.length>0;)Jt.length===1||Math.random()>.5?Rr.push(Jt.shift()):Rr.push(Jt.pop());en[""]=_i({resources:["https://api.iconify.design"].concat(Rr)});function es(e,t){const r=_i(t);return r===null?!1:(en[e]=r,!0)}function tn(e){return en[e]}function vy(){return Object.keys(en)}const by=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch(t){}};let Hr=by();function wy(e){Hr=e}function xy(){return Hr}function Sy(e,t){const r=tn(e);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let i=0;r.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";n=r.maxURL-i-r.path.length-o.length}return n}function Cy(e){return e===404}const $y=(e,t,r)=>{const n=[],i=Sy(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return r.forEach((u,c)=>{s+=u.length+1,s>=i&&c>0&&(n.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),n.push(a),n};function Ty(e){if(typeof e=="string"){const t=tn(e);if(t)return t.path}return"/"}const Ey=(e,t,r)=>{if(!Hr){r("abort",424);return}let n=Ty(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});n+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;n+=o.slice(0,1)==="/"?o.slice(1):o;break}default:r("abort",400);return}let i=503;Hr(e+n).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{r(Cy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?r("abort",o):r("next",i)});return}setTimeout(()=>{r("success",o)})}).catch(()=>{r("next",i)})},ky={prepare:$y,send:Ey};function _y(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let n={provider:"",prefix:"",name:""};return e.forEach(i=>{if(n.name===i.name&&n.prefix===i.prefix&&n.provider===i.provider)return;n=i;const o=i.provider,a=i.prefix,s=i.name,u=r[o]||(r[o]=Object.create(null)),c=u[a]||(u[a]=Ze(o,a));let d;s in c.icons?d=t.loaded:a===""||c.missing.has(s)?d=t.missing:d=t.pending;const f={provider:o,prefix:a,name:s};d.push(f)}),t}function ts(e,t){e.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(i=>i.id!==t))})}function Fy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const n=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const c=u.name;if(e.icons[c])a.loaded.push({provider:n,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:n,prefix:i,name:c});else return r=!0,!0;return!1}),a.pending.length!==s&&(r||ts([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ay=0;function Oy(e,t,r){const n=Ay++,i=ts.bind(null,r,n);if(!t.pending.length)return i;const o={id:n,icons:t,callback:e,abort:i};return r.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function Py(e,t=!0,r=!1){const n=[];return e.forEach(i=>{const o=typeof i=="string"?Nt(i,t,r):i;o&&n.push(o)}),n}var Ry={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function My(e,t,r,n){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let T=e.resources.slice(0);for(a=[];T.length>1;){const E=Math.floor(Math.random()*T.length);a.push(T[E]),T=T.slice(0,E).concat(T.slice(E+1))}a=a.concat(T)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",c=0,d,f=null,h=[],p=[];typeof n=="function"&&p.push(n);function m(){f&&(clearTimeout(f),f=null)}function g(){u==="pending"&&(u="aborted"),m(),h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function y(T,E){E&&(p=[]),typeof T=="function"&&p.push(T)}function v(){return{startTime:s,payload:t,status:u,queriesSent:c,queriesPending:h.length,subscribe:y,abort:g}}function S(){u="failed",p.forEach(T=>{T(void 0,d)})}function $(){h.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),h=[]}function V(T,E,k){const N=E!=="success";switch(h=h.filter(q=>q!==T),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){d=k,S();return}if(N){d=k,h.length||(a.length?P():S());return}if(m(),$(),!e.random){const q=e.resources.indexOf(T.resource);q!==-1&&q!==e.index&&(e.index=q)}u="completed",p.forEach(q=>{q(k)})}function P(){if(u!=="pending")return;m();const T=a.shift();if(T===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&($(),S())},e.timeout);return}S();return}const E={status:"pending",resource:T,callback:(k,N)=>{V(E,k,N)}};h.push(E),c++,f=setTimeout(P,e.rotate),r(T,t,E.callback)}return setTimeout(P),v}function rs(e){const t=R(R({},Ry),e);let r=[];function n(){r=r.filter(s=>s().status==="pending")}function i(s,u,c){const d=My(t,s,u,(f,h)=>{n(),c&&c(f,h)});return r.push(d),d}function o(s){return r.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:n}}function Go(){}const En=Object.create(null);function Dy(e){if(!En[e]){const t=tn(e);if(!t)return;const r=rs(t),n={config:t,redundancy:r};En[e]=n}return En[e]}function ns(e,t,r){let n,i;if(typeof e=="string"){const o=Wn(e);if(!o)return r(void 0,424),Go;i=o.send;const a=Dy(e);a&&(n=a.redundancy)}else{const o=_i(e);if(o){n=rs(o);const a=e.resources?e.resources[0]:"",s=Wn(a);s&&(i=s.send)}}return!n||!i?(r(void 0,424),Go):n.query(t,i,r)().abort}function Iy(e,t){const r=e.lastModifiedCached;if(r&&r>=t)return r===t;if(e.lastModifiedCached=t,r)for(const n in vt)Kl(n,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function By(e,t){Ei||Ql();function r(n){let i;if(!vt[n]||!(i=Jl(n)))return;const o=Yl[n];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=Yn(i),!qn(i,a+1))return;const s={cached:Math.floor(Date.now()/Wl),provider:e.provider,data:t};return ki(i,ar+a.toString(),JSON.stringify(s))}t.lastModified&&!Iy(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),r("local")||r("session"))}function Wo(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Fy(e)}))}function Ny(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:n}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=Wn(r)))return;o.prepare(r,n,i).forEach(s=>{ns(r,s,u=>{if(typeof u!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=$i(e,u);if(!c.length)return;const d=e.pendingIcons;d&&c.forEach(f=>{d.delete(f)}),By(e,u)}catch(c){console.error(c)}jy(e)})})}))}const Vy=e=>{const r=Ze(e.provider,e.prefix).pendingIcons;return!!(r&&r.has(e.name))},Fi=(e,t)=>{const r=Py(e,!0,ay()),n=_y(r);if(!n.pending.length){let u=!0;return t&&setTimeout(()=>{u&&t(n.loaded,n.missing,n.pending,Wo)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return n.pending.forEach(u=>{const{provider:c,prefix:d}=u;if(d===s&&c===a)return;a=c,s=d,o.push(Ze(c,d));const f=i[c]||(i[c]=Object.create(null));f[d]||(f[d]=[])}),n.pending.forEach(u=>{const{provider:c,prefix:d,name:f}=u,h=Ze(c,d),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][d].push(f))}),o.forEach(u=>{const{provider:c,prefix:d}=u;i[c][d].length&&Ny(u,i[c][d])}),t?Oy(t,n,o):Wo},Ly=e=>new Promise((t,r)=>{const n=typeof e=="string"?Nt(e,!0):e;if(!n){r(e);return}Fi([n||e],i=>{if(i.length&&n){const o=pr(n);if(o){t(R(R({},fr),o));return}}r(e)})});function is(e,t){const r=R({},e);for(const n in t){const i=t[n],o=typeof i;n in zl?(i===null||i&&(o==="string"||o==="number"))&&(r[n]=i):o===typeof r[n]&&(r[n]=n==="rotate"?i%4:i)}return r}const rn=re(R({},Ul),{inline:!1}),kn="iconify",Jn="iconify-inline",dt="iconifyData"+Date.now();let Ct=[];function hr(e){for(let t=0;t<Ct.length;t++){const r=Ct[t];if((typeof r.node=="function"?r.node():r.node)===e)return r}}function os(e,t=!1){let r=hr(e);return r?(r.temporary&&(r.temporary=t),r):(r={node:e,temporary:t},Ct.push(r),r)}function Hy(){if(document.documentElement)return os(document.documentElement);Ct.push({node:()=>document.documentElement})}function zy(e){Ct=Ct.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function mr(){return Ct}function Uy(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Xt=null;const qy={childList:!0,subtree:!0,attributes:!0};function as(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Xt&&Xt(e)}))}function Yy(e,t){if(!e.observer)return;const r=e.observer;if(!r.pendingScan)for(let n=0;n<t.length;n++){const i=t[n];if(i.addedNodes&&i.addedNodes.length>0||i.type==="attributes"&&i.target[dt]!==void 0){r.paused||as(e);return}}}function ls(e,t){e.observer.instance.observe(t,qy)}function zr(e){let t=e.observer;if(t&&t.instance)return;const r=typeof e.node=="function"?e.node():e.node;!r||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Yy.bind(null,e)),ls(e,r),t.paused||as(e))}function Jo(){mr().forEach(zr)}function ss(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Gy(e){const t=Xt!==null;if(Xt!==e&&(Xt=e,t&&mr().forEach(ss)),t){Jo();return}Uy(Jo)}function Kn(e){(e?[e]:mr()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const r=t.observer;if(r.paused++,r.paused>1||!r.instance)return;r.instance.disconnect()})}function Wy(e){if(e){const t=hr(e);t&&Kn(t)}else Kn()}function Qn(e){(e?[e]:mr()).forEach(t=>{if(!t.observer){zr(t);return}const r=t.observer;if(r.paused&&(r.paused--,!r.paused)){const n=typeof t.node=="function"?t.node():t.node;if(n)r.instance?ls(t,n):zr(t);else return}})}function Jy(e){if(e){const t=hr(e);t&&Qn(t)}else Qn()}function us(e,t=!1){const r=os(e,t);return zr(r),r}function cs(e){const t=hr(e);t&&(ss(t),zy(e))}function Ky(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const r=e.customisations,n=t.customisations;for(const i in rn)if(r[i]!==n[i])return!0;return!1}function Qy(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function n(i){for(;i<0;)i+=4;return i%4}if(r===""){const i=parseInt(e);return isNaN(i)?0:n(i)}else if(r!==e){let i=0;switch(r){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-r.length));return isNaN(o)?0:(o=o/i,o%1===0?n(o):0)}}return t}const Zy=/[\s,]+/;function Xy(e,t){t.split(Zy).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ev=["width","height"],tv=["inline","hFlip","vFlip"];function rv(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function nv(e){const t=e.getAttribute("data-icon"),r=typeof t=="string"&&Nt(t,!0);if(!r)return null;const n=re(R({},rn),{inline:e.classList&&e.classList.contains(Jn)});ev.forEach(s=>{const u=e.getAttribute("data-"+s);u&&(n[s]=u)});const i=e.getAttribute("data-rotate");typeof i=="string"&&(n.rotate=Qy(i));const o=e.getAttribute("data-flip");typeof o=="string"&&Xy(n,o),tv.forEach(s=>{const u="data-"+s,c=rv(e.getAttribute(u),u);typeof c=="boolean"&&(n[s]=c)});const a=e.getAttribute("data-mode");return{name:t,icon:r,customisations:n,mode:a}}const iv="svg."+kn+", i."+kn+", span."+kn+", i."+Jn+", span."+Jn;function ov(e){const t=[];return e.querySelectorAll(iv).forEach(r=>{const n=r[dt]||r.tagName.toLowerCase()!=="svg"?nv(r):null;n&&t.push({node:r,props:n})}),t}function ds(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)r+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}let er;function av(){try{er=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){er=null}}function lv(e){return er===void 0&&av(),er?er.createHTML(e):e}function fs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(r=>{e[r]&&t.add("iconify--"+e[r])}),t}function ps(e,t,r,n){const i=e.classList;if(n){const a=n.classList;Array.from(a).forEach(s=>{i.add(s)})}const o=[];return t.forEach(a=>{i.contains(a)?r.has(a)&&o.push(a):(i.add(a),o.push(a))}),r.forEach(a=>{t.has(a)||i.remove(a)}),o}function hs(e,t,r){const n=e.style;(r||[]).forEach(o=>{n.removeProperty(o)});const i=[];for(const o in t)n.getPropertyValue(o)||(i.push(o),n.setProperty(o,t[o]));return i}function ms(e,t,r){let n;try{n=document.createElement("span")}catch(m){return e}const i=t.customisations,o=Xr(r,i),a=e[dt],s=ds(ql(o.body),R({"aria-hidden":"true",role:"img"},o.attributes));n.innerHTML=lv(s);const u=n.childNodes[0],c=e.attributes;for(let m=0;m<c.length;m++){const g=c.item(m),y=g.name;y!=="class"&&!u.hasAttribute(y)&&u.setAttribute(y,g.value)}const d=fs(t.icon),f=ps(u,d,new Set(a&&a.addedClasses),e),h=hs(u,i.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),p=re(R({},t),{status:"loaded",addedClasses:f,addedStyles:h});return u[dt]=p,e.parentNode&&e.parentNode.replaceChild(u,e),u}function sv(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function uv(e){return"data:image/svg+xml,"+sv(e)}function cv(e){return'url("'+uv(e)+'")'}const dv={display:"inline-block"},Zn={"background-color":"currentColor"},gs={"background-color":"transparent"},Ko={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Qo={"-webkit-mask":Zn,mask:Zn,background:gs};for(const e in Qo){const t=Qo[e];for(const r in Ko)t[e+"-"+r]=Ko[r]}function Zo(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function fv(e,t,r,n){const i=t.customisations,o=Xr(r,i),a=o.attributes,s=e[dt],u=ds(o.body,re(R({},a),{width:r.width+"",height:r.height+""})),c=fs(t.icon),d=ps(e,c,new Set(s&&s.addedClasses)),f=cv(u),h=R(R({"--svg":f,width:Zo(a.width),height:Zo(a.height)},dv),n?Zn:gs);i.inline&&(h["vertical-align"]="-0.125em");const p=hs(e,h,s&&s.addedStyles),m=re(R({},t),{status:"loaded",addedClasses:d,addedStyles:p});return e[dt]=m,e}let _r=!1;function pv(){_r||(_r=!0,setTimeout(()=>{_r&&(_r=!1,It())}))}function It(e,t=!1){const r=Object.create(null);function n(i,o){const{provider:a,prefix:s,name:u}=i,c=Ze(a,s),d=c.icons[u];if(d)return{status:"loaded",icon:d};if(c.missing.has(u))return{status:"missing"};if(o&&!Vy(i)){const f=r[a]||(r[a]=Object.create(null));(f[s]||(f[s]=new Set)).add(u)}return{status:"loading"}}(e?[e]:mr()).forEach(i=>{const o=typeof i.node=="function"?i.node():i.node;if(!o||!o.querySelectorAll)return;let a=!1,s=!1;function u(c,d,f){if(s||(s=!0,Kn(i)),c.tagName.toUpperCase()!=="SVG"){const h=d.mode,p=h==="mask"||(h==="bg"?!1:h==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof p=="boolean"){fv(c,d,R(R({},fr),f),p);return}}ms(c,d,f)}ov(o).forEach(({node:c,props:d})=>{const f=c[dt];if(!f){const{status:p,icon:m}=n(d.icon,!0);if(m){u(c,d,m);return}a=a||p==="loading",c[dt]=re(R({},d),{status:p});return}let h;if(Ky(f,d)){if(h=n(d.icon,f.name!==d.name),!h.icon){a=a||h.status==="loading",Object.assign(f,re(R({},d),{status:h.status}));return}}else{if(f.status!=="loading")return;if(h=n(d.icon,!1),!h.icon){f.status=h.status;return}}u(c,d,h.icon)}),i.temporary&&!a?cs(o):t&&a?us(o,!0):s&&i.observer&&Qn(i)});for(const i in r){const o=r[i];for(const a in o){const s=o[a];Fi(Array.from(s).map(u=>({provider:i,prefix:a,name:u})),pv)}}}function hv(e){const t=hr(e);t?It(t):It({node:e,temporary:!0},!0)}function ys(e,t,r=!1){const n=pr(e);if(!n)return null;const i=Nt(e),o=is(rn,t||{}),a=ms(document.createElement("span"),{name:e,icon:i,customisations:o},n);return r?a.outerHTML:a}function mv(){return"3.1.1"}function gv(e,t){return ys(e,t,!1)}function yv(e,t){return ys(e,t,!0)}function vv(e,t){const r=pr(e);if(!r)return null;const n=is(rn,t||{});return Xr(r,n)}function bv(e){e?hv(e):It()}if(typeof document!="undefined"&&typeof window!="undefined"){Hy();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Hl(n))&&console.error(r)}catch(i){console.error(r)}})}setTimeout(()=>{Gy(It),It()})}function wv(e,t){Zl(e,t!==!1)}function xv(e){Zl(e,!0)}Xl("",ky);if(typeof document!="undefined"&&typeof window!="undefined"){Ql();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const r in t){const n="IconifyProviders["+r+"] is invalid.";try{const i=t[r];if(typeof i!="object"||!i||i.resources===void 0)continue;es(r,i)||console.error(n)}catch(i){console.error(n)}}}}const Sv={getAPIConfig:tn,setAPIModule:Xl,sendAPIQuery:ns,setFetch:wy,getFetch:xy,listAPIProviders:vy},vs={_api:Sv,addAPIProvider:es,loadIcons:Fi,loadIcon:Ly,iconExists:sy,getIcon:uy,listIcons:oy,addIcon:ly,addCollection:Hl,replaceIDs:ql,calculateSize:zn,buildIcon:Xr,getVersion:mv,renderSVG:gv,renderHTML:yv,renderIcon:vv,scan:bv,observe:us,stopObserving:cs,pauseObserver:Wy,resumeObserver:Jy,enableCache:wv,disableCache:xv};try{self.Iconify===void 0&&(self.Iconify=vs)}catch(e){}const Cv=["xlink:href"],$v=["data-icon"],Tv=l.defineComponent({name:"AbIcon",__name:"ab-icon",props:{icon:{},color:{},size:{default:16},svgClass:{}},setup(e){const t=e,r=l.ref(null),n=l.computed(()=>{var u;return(u=t.icon)==null?void 0:u.startsWith("svg-icon:")}),i=l.computed(()=>{var u;return l.unref(n)?`#icon-${(u=t.icon)==null?void 0:u.split("svg-icon:")[1]}`:t.icon}),o=l.computed(()=>{const{color:u,size:c}=t;return{fontSize:`${c}px`,height:"1em",color:u}}),a=l.computed(()=>{const{svgClass:u}=t;return`iconify ${u}`}),s=u=>me(this,null,function*(){if(l.unref(n))return;const c=l.unref(r);if(!c||(yield l.nextTick(),!u))return;const d=vs.renderSVG(u,{});if(d)c.textContent="",c.appendChild(d);else{const f=document.createElement("span");f.className="iconify",f.dataset.icon=u,c.textContent="",c.appendChild(f)}});return l.watch(()=>t.icon,u=>{s(u)}),(u,c)=>{const d=l.resolveComponent("ElIcon");return l.openBlock(),l.createBlock(d,{class:"ab-icon",color:e.color,size:e.size},{default:l.withCtx(()=>[n.value?(l.openBlock(),l.createElementBlock("svg",{key:0,class:l.normalizeClass(a.value)},[l.createElementVNode("use",{"xlink:href":i.value},null,8,Cv)],2)):(l.openBlock(),l.createElementBlock("span",{key:1,ref_key:"elRef",ref:r,class:l.normalizeClass(u.$attrs.class),style:l.normalizeStyle(o.value)},[l.createElementVNode("span",{class:l.normalizeClass(a.value),"data-icon":i.value},null,10,$v)],6))]),_:1},8,["color","size"])}}}),Ev=l.defineComponent({name:"AbCheckbox",inheritAttrs:!1,__name:"ab-checkbox",props:{abFormInject:Object,modelValue:{type:Array,default:()=>[]},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElCheckboxButton":"ElCheckbox"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),u=l.ref(s.value),c=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){u.value=p;return}h(p)}),l.watch(a,p=>{if(!s.value&&Array.isArray(p)&&p.length>0&&r.input){const m=c.value.map(y=>y.value);let g=null;p.forEach(y=>{m.indexOf(y)===-1&&(g=y)}),g!=null&&(u.value=g)}},{immediate:!0});function d(p){const v=p,{value:m,label:g}=v;return Lt(v,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=[...kt(a.value)],g=m.indexOf(u.value);u.value=p,g>-1&&(m.splice(g,1),m.push(p),f(m))}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-checkbox-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value===null?void 0:a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(v,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${v.value}`},{ref_for:!0},d(v),{label:v.value,value:v.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.label||v.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,value:u.value||void 0,label:u.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":u.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(v=>v!=="default"),v=>({name:v,fn:l.withCtx(S=>[l.renderSlot(p.$slots,v,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),kv=l.defineComponent({name:"AbRadio",inheritAttrs:!1,__name:"ab-radio",props:{abFormInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.computed(()=>r.type==="button"?"ElRadioButton":"ElRadio"),a=l.toRef(r,"modelValue"),s=l.toRef(r,"inputValue",""),u=l.ref(s.value),c=l.computed(()=>{var m;const p=r.options||((m=r.abFormInject)==null?void 0:m.options)||[];return Array.isArray(p)?p:[]});l.watch(s,p=>{if(!r.input){u.value=p;return}h(p)}),l.watch(a,p=>{!s.value&&p!=null&&r.input&&!c.value.some(m=>m.value===p)&&(u.value=p)},{immediate:!0});function d(p){const v=p,{value:m,label:g}=v;return Lt(v,["value","label"])}function f(p){n("update:modelValue",p)}function h(p){const m=u.value;u.value=p,a.value===m&&f(p)}return l.onMounted(()=>{n("fc.el",i.value)}),(p,m)=>{const g=l.resolveComponent("el-input"),y=l.resolveComponent("el-radio-group");return l.openBlock(),l.createBlock(y,l.mergeProps(p.$attrs,{"model-value":a.value,"onUpdate:modelValue":f,ref_key:"el",ref:i}),l.createSlots({default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(c.value,(v,S)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),l.mergeProps({key:`${o.value}${S}-${v.value}`},{ref_for:!0},d(v),{label:v.value,value:v.value}),{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(v.label||v.value||""),1)]),_:2},1040,["label","value"]))),128)),l.renderSlot(p.$slots,"default"),e.input?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.value),{key:0,checked:!1,value:u.value||void 0,label:u.value||void 0},{default:l.withCtx(()=>[l.createVNode(g,{size:"small","model-value":u.value,"onUpdate:modelValue":h},null,8,["model-value"])]),_:1},8,["value","label"])):l.createCommentVNode("",!0)]),_:2},[l.renderList(Object.keys(p.$slots).filter(v=>v!=="default"),v=>({name:v,fn:l.withCtx(S=>[l.renderSlot(p.$slots,v,l.normalizeProps(l.guardReactiveProps(S!=null?S:{})))])}))]),1040,["model-value"])}}}),_v={class:"p-option__left"},Fv={class:"p-option__right"},Av={class:"p-option__left"},Ov={key:0,class:"p-option__right"},Pv={key:1,class:"p-option__right"},Rv=l.defineComponent({name:"AbSelect",inheritAttrs:!1,__name:"ab-select",props:{abFormInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String,showValue:Boolean,showKey:Boolean,showCode:Boolean},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.toRef(r,"modelValue"),a=l.computed(()=>{var f;const d=(f=r.abFormInject)==null?void 0:f.options;return Array.isArray(d)?d:[]}),{wsCache:s}=Se(),u=l.computed(()=>s.getCurrentSize||"default");function c(d){n("update:modelValue",d)}return l.onMounted(()=>{n("fc.el",i.value)}),(d,f)=>{const h=l.resolveComponent("el-option"),p=l.resolveComponent("el-option-group"),m=l.resolveComponent("el-select");return l.openBlock(),l.createBlock(m,l.mergeProps(d.$attrs,{"model-value":o.value,"onUpdate:modelValue":c,ref_key:"el",ref:i}),{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(g,y)=>{var v,S;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.unref(fe)(g,"options")?(l.openBlock(),l.createBlock(p,{label:g.label,key:`${y}-${g.label}`},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(B).trueArray(g.options)?g.options:[],($,V)=>(l.openBlock(),l.createBlock(h,l.mergeProps({key:`${V}-${$.value}`},{ref_for:!0},$),null,16))),128))]),_:2},1032,["label"])):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.showValue?(l.openBlock(),l.createBlock(h,{key:0,label:g==null?void 0:g.label,value:g==null?void 0:g.value,class:l.normalizeClass((v=g==null?void 0:g.class)!=null?v:"")},{default:l.withCtx(()=>[l.createElementVNode("span",_v,l.toDisplayString(g==null?void 0:g.label),1),l.createElementVNode("span",Fv,l.toDisplayString(g==null?void 0:g.value),1)]),_:2},1032,["label","value","class"])):e.showKey||e.showCode?(l.openBlock(),l.createBlock(h,{key:1,label:g==null?void 0:g.label,value:g==null?void 0:g.value,size:u.value,class:l.normalizeClass((S=g==null?void 0:g.class)!=null?S:"")},{default:l.withCtx(()=>[l.createElementVNode("span",Av,l.toDisplayString(g==null?void 0:g.label),1),e.showKey?(l.openBlock(),l.createElementBlock("span",Ov,l.toDisplayString(g==null?void 0:g.key),1)):l.createCommentVNode("",!0),e.showCode?(l.openBlock(),l.createElementBlock("span",Pv,l.toDisplayString(g==null?void 0:g.code),1)):l.createCommentVNode("",!0)]),_:2},1032,["label","value","size","class"])):(l.openBlock(),l.createBlock(h,{key:2,label:g==null?void 0:g.label,value:g==null?void 0:g.value},null,8,["label","value"]))],64))],64)}),256)),l.renderSlot(d.$slots,"default")]),_:3},16,["model-value"])}}}),Mv="abTree",Dv=l.defineComponent({name:Mv,inheritAttrs:!1,abFormParser:{mergeProp(e){const t=e.prop.props;t.nodeKey||(t.nodeKey="id"),t.props||(t.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:()=>[]}},emits:["update:modelValue","fc.el"],watch:{modelValue(){this.setValue()}},methods:{updateValue(){if(!this.$refs.tree)return;let e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)},setValue(){if(!this.$refs.tree)return;this.type==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(kt(this.modelValue))}},render(){return l.createVNode(l.resolveComponent("ElTree"),l.mergeProps(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),Iv=l.defineComponent({name:"AbTimePicker",inheritAttrs:!1,__name:"ab-time-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,c=>o.value=c);const{wsCache:a}=Se(),s=l.computed(()=>a.getCurrentSize||"default");function u(c){n("update:modelValue",c)}return l.onMounted(()=>{n("fc.el",i.value)}),(c,d)=>{const f=l.resolveComponent("el-time-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i},c.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:u}),null,16,["modelValue","size"])}}}),Bv=l.defineComponent({name:"AbColorPicker",inheritAttrs:!1,__name:"ab-color-picker",props:{modelValue:{}},emits:["update:modelValue","fc.el"],setup(e,{emit:t}){const r=e,n=t,i=l.ref(),o=l.ref(r.modelValue);l.watch(()=>r.modelValue,c=>o.value=c);const{wsCache:a}=Se(),s=l.computed(()=>a.getCurrentSize||"default");function u(c){n("update:modelValue",c)}return l.onMounted(()=>{n("fc.el",i.value)}),(c,d)=>{const f=l.resolveComponent("el-color-picker");return l.openBlock(),l.createBlock(f,l.mergeProps({ref_key:"el",ref:i,class:"ab-color-picker"},c.$attrs,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=h=>o.value=h),size:s.value,onChange:u}),null,16,["modelValue","size"])}}}),jv={class:"ab-input-range"},Nv={key:0,class:"range-prefix"},Vv={key:3,class:"range-suffix"},Lv=l.defineComponent({name:"AbInputRange",__name:"ab-input-range",props:l.mergeModels({abFormInject:{},prefix:{},suffix:{},clearable:{type:Boolean,default:!0},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,{t:i}=Xe(),o=l.useModel(e,"modelValue"),a=l.computed(()=>{var h,p,m,g;return[(p=(h=o.value)==null?void 0:h[0])!=null?p:null,(g=(m=o.value)==null?void 0:m[1])!=null?g:null]}),s=l.computed(()=>{var h;return n.readonly===!0||((h=n.abFormInject)==null?void 0:h.readonly)===!0});function u(h,p){const m=[...a.value];return m[h]=p===""?null:p,m}function c(h,p){o.value=u(h,p)}const{wsCache:d}=Se(),f=l.computed(()=>d.getCurrentSize||"default");return(h,p)=>{var y,v;const m=l.resolveComponent("el-text"),g=l.resolveComponent("el-input");return l.openBlock(),l.createElementBlock("div",jv,[e.prefix?(l.openBlock(),l.createElementBlock("span",Nv,l.toDisplayString(e.prefix),1)):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[0]),1)]),_:1}),p[4]||(p[4]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(m,{class:"ab-input-range__val"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value[1]),1)]),_:1})],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createVNode(g,{"model-value":(y=a.value[0])!=null?y:"",size:f.value,placeholder:l.unref(i)("min"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[0]||(p[0]=S=>c(0,S)),onChange:p[1]||(p[1]=S=>r("change",u(0,S)))},null,8,["model-value","size","placeholder","clearable"]),p[5]||(p[5]=l.createElementVNode("span",{class:"range-splitter"}," ~ ",-1)),l.createVNode(g,{"model-value":(v=a.value[1])!=null?v:"",size:f.value,placeholder:l.unref(i)("max"),clearable:e.clearable,class:"ab-input-range__val","onUpdate:modelValue":p[2]||(p[2]=S=>c(1,S)),onChange:p[3]||(p[3]=S=>r("change",u(1,S)))},null,8,["model-value","size","placeholder","clearable"])],64)),e.suffix?(l.openBlock(),l.createElementBlock("span",Vv,l.toDisplayString(e.suffix),1)):l.createCommentVNode("",!0)])}}}),Hv={class:"ab-time-period w-full"},zv={class:"start-time"},Uv={key:0},qv={class:"end-time"},Yv=l.defineComponent({name:"AbTimePeriod",__name:"ab-time-period",props:l.mergeModels({abFormInject:{},startTime:{default:"08:00"},endTime:{default:"18:00"},readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const r=t,n=e,i=l.useModel(e,"modelValue"),o=l.computed(()=>{var g;return n.readonly===!0||((g=n.abFormInject)==null?void 0:g.readonly)===!0});function a(g){const y=/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/.exec(g.trim()),v=y?Number(y[1]):NaN,S=y?Number(y[2]):NaN,$=y!=null&&y[3]?Number(y[3]):0;if(!y||v>24||S>59||$>59||v===24&&(S!==0||$!==0))throw new TypeError(`Invalid time "${g}": expected HH:mm or HH:mm:ss between 00:00 and 24:00.`);return v*3600+S*60+$}function s(g){const y=Math.floor(g/3600),v=Math.floor(g%3600/60),S=g%60,$=`${String(y).padStart(2,"0")}:${String(v).padStart(2,"0")}`;return S?`${$}:${String(S).padStart(2,"0")}`:$}const u=l.computed(()=>{const g=a(n.startTime),y=a(n.endTime);if(g>=y)throw new RangeError("timePeriod requires startTime before endTime.");return[g,y]}),c=l.computed(()=>{var g,y,v,S,$,V;return[((g=i.value)==null?void 0:g[0])===""?null:(v=(y=i.value)==null?void 0:y[0])!=null?v:null,((S=i.value)==null?void 0:S[1])===""?null:(V=($=i.value)==null?void 0:$[1])!=null?V:null]}),d=l.computed(()=>{const[g,y]=u.value,v=c.value[0]===null?g:a(c.value[0]),S=c.value[1]===null?y:a(c.value[1]);if(c.value[0]!==null&&c.value[1]!==null&&v>S)throw new RangeError("timePeriod start value must be before or equal to end value.");return[v,S]});l.computed(()=>d.value.some(g=>g<u.value[0]||g>u.value[1]));const f=l.computed(()=>{const g=y=>Math.min(u.value[1],Math.max(u.value[0],y));return[g(d.value[0]),g(d.value[1])]});function h(g){if(!Array.isArray(g)||g.length!==2)throw new TypeError("timePeriod slider must provide a pair of values.");return[c.value[0]!==null&&g[0]===f.value[0]?c.value[0]:s(g[0]),c.value[1]!==null&&g[1]===f.value[1]?c.value[1]:s(g[1])]}function p(g){i.value=h(g)}function m(g){r("change",h(g))}return(g,y)=>{var S,$;const v=l.resolveComponent("el-slider");return l.openBlock(),l.createElementBlock("div",Hv,[l.createElementVNode("div",zv,l.toDisplayString((S=c.value[0])!=null?S:"--:--"),1),o.value?(l.openBlock(),l.createElementBlock("div",Uv,"~")):(l.openBlock(),l.createBlock(v,{key:1,class:l.normalizeClass({"is-empty":c.value[0]==null&&c.value[1]==null}),"model-value":f.value,range:"",step:30,min:u.value[0],max:u.value[1],"format-tooltip":s,"format-value-text":s,"onUpdate:modelValue":p,onChange:m},null,8,["class","model-value","min","max"])),l.createElementVNode("div",qv,l.toDisplayString(($=c.value[1])!=null?$:"--:--"),1)])}}}),bs=Symbol("archbiz-upload-apis");function Gv(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&e.trim()&&e!=="new")return e}function Xo(e){const t=e.split(/[?#]/,1)[0].split("/").pop()||e;try{return decodeURIComponent(t)}catch(r){if(r instanceof URIError)return t;throw r}}const Wv={class:"ab-upload-file"},Jv={key:1,role:"alert"},Kv={class:"ab-upload-file__list"},Qv={key:0},Zv={key:1,role:"alert"},ws=l.defineComponent({name:"AbUploadFile",__name:"ab-upload-file",props:{modelValue:{},apis:{},abFormInject:{},idFieldTable:{},businessCode:{},fileType:{default:()=>["doc","xls","txt","pdf"]},fileSize:{default:5},limit:{default:5},drag:{type:Boolean},isShowTip:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},delEnabled:{type:Boolean,default:!0},preEnabled:{type:Boolean,default:!0},dowEnabled:{type:Boolean,default:!0},coverEnabled:{type:Boolean},autoCover:{type:Boolean}},emits:["update:modelValue","preview","error","reload"],setup(e,{expose:t,emit:r}){const n=e,i=r,{t:o}=Xe(),a=hl(),s=l.inject(bs,void 0);function u(){var H;const M=(H=n.apis)!=null?H:s;if(!M)throw new Error("Upload APIs are not configured. Pass upload to setupArchbizKit or apis to the component.");return M}u();const c=l.computed(()=>{var M;return n.disabled||n.readonly||((M=n.abFormInject)==null?void 0:M.readonly)===!0}),d=l.computed(()=>{var H;const M=n.abFormInject;return Gv(M!=null&&M.idField?(H=M.formValue)==null?void 0:H[M.idField]:void 0)}),f=l.ref([]),h=l.ref(""),p=l.ref(!1),m=l.ref(!1),g=new Set;let y=1,v=0,S=0,$,V;function P(M){var H,Y;return{businessType:(Y=n.idFieldTable)!=null?Y:(H=n.abFormInject)==null?void 0:H.idFieldTable,businessCode:n.businessCode,businessId:M}}function T(M){a.error(M instanceof Error?M.message:String(M)),i("error",M)}function E(){i("update:modelValue",f.value.flatMap(M=>M.url?[M.url]:[]))}function k(M){const H=M.name.includes(".")?M.name.slice(M.name.lastIndexOf(".")+1).toLowerCase():"";return{url:M.url,name:M.name,extension:H,fileId:M.fileId}}function N(M){return/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(M)}const q=M=>{if(f.value.length+S>=n.limit)return a.error(o("upload.tooMany")),!1;const H=M.name.includes(".")?M.name.slice(M.name.lastIndexOf(".")+1).toLowerCase():"";return n.fileType.length&&!n.fileType.some(Y=>Y.toLowerCase().replace(/^\./,"")===H)?(a.error(o("upload.invalidType")),!1):M.size>n.fileSize*1024*1024?(a.error(o("upload.tooLarge")),!1):(S++,!0)};function U(M){S=Math.max(0,S-1);const H=v,Y=l.reactive({uid:y++,name:M.file.name,status:"uploading"});f.value.push(Y);const ne=me(this,null,function*(){try{const ue=yield u().upload({file:M.file}),J=ue==null?void 0:ue.data;if(!J||J.id==null||typeof J.url!="string"||!J.url||typeof J.name!="string"||!J.name)throw new TypeError("Upload API must return data with id, name and url.");if(H!==v)return;Object.assign(Y,{fileId:J.id,url:J.url,name:J.name,size:J.size,status:"pending"}),E()}catch(ue){throw H===v&&(Y.status="failed",Y.error=ue instanceof Error?ue.message:String(ue)),ue}});return g.add(ne),ne.then(()=>{g.delete(ne),H===v&&d.value!==void 0&&C()},()=>{g.delete(ne)}),ne}const x=M=>T(M);function _(){return me(this,null,function*(){yield Promise.allSettled([...g]);const M=f.value.find(H=>H.status==="failed");if(M)throw new Error(M.error||o("upload.failed"))})}function F(M,H){return me(this,null,function*(){if(V&&(yield V),yield Promise.allSettled([...g]),H!==v||d.value!==M)return;const Y=f.value.filter(w=>w.status==="pending"&&w.fileId!=null);if(Y.length)try{if(yield u().attach(re(R({},P(M)),{fileIds:Y.map(w=>w.fileId),isCover:n.autoCover&&Y.length===1&&N(Y[0].name)?1:0})),H!==v||d.value!==M)return;Y.forEach(w=>{w.status="recent",w.error=void 0})}catch(w){throw H===v&&d.value===M&&Y.forEach(O=>{O.error=w instanceof Error?w.message:String(w)}),w}const ne=yield u().list(re(R({},P(M)),{pageSize:1e3}));if(!ne||!Array.isArray(ne.list))throw new TypeError("Upload list API must return a list array.");if(H!==v||d.value!==M)return;if(ne.list.some(w=>!w||w.fileId==null||typeof w.name!="string"||!w.name||typeof w.url!="string"||!w.url))throw new TypeError("Upload list entries must have fileId, name and url.");const ue=f.value.filter(w=>w.status!=="linked"&&w.status!=="recent"),J=ne.list.map(w=>({uid:y++,id:w.id,fileId:w.fileId,name:w.name,url:w.url,size:w.size,isCover:w.isCover,status:"linked"})),b=f.value.filter(w=>w.status==="recent"&&!J.some(O=>O.fileId===w.fileId));f.value=[...J,...b,...ue],h.value="",E()})}function A(){const M=d.value;if(M===void 0)return Promise.reject(new Error(o("upload.missingBusinessId")));if($)return $.then(()=>A());const H=F(M,v);return $=H,p.value=!0,H.then(()=>{$===H&&($=void 0,p.value=!1)},()=>{$===H&&($=void 0,p.value=!1)}),H}function C(){const M=v;A().catch(H=>{M===v&&(h.value=H instanceof Error?H.message:String(H),T(H))})}function I(){return me(this,null,function*(){yield _(),yield A()})}function D(){C()}function G(M){m.value=!0;const H=M();V=H,H.then(()=>{V===H&&(V=void 0,m.value=!1)},()=>{V===H&&(V=void 0,m.value=!1)}),H.catch(T)}function Q(M){G(()=>me(this,null,function*(){const H=v;if(M.status==="linked"&&d.value!==void 0||M.status==="recent"){const Y=d.value;if(Y===void 0||M.fileId==null)throw new Error(o("upload.missingBusinessId"));yield u().remove(re(R({},P(Y)),{fileId:M.fileId}))}H===v&&(f.value=f.value.filter(Y=>Y.uid!==M.uid),E(),i("reload"))}))}function Z(M){G(()=>me(this,null,function*(){const H=v;if(M.id==null)throw new Error(o("upload.missingBusinessId"));const Y=M.isCover?0:1;yield u().setCover(M.id,Y),H===v&&(M.isCover=Y,i("reload"))}))}return l.watch(()=>n.modelValue,M=>{const H=M!=null?M:[],Y=f.value,ne=[...Y],ue=H.map(J=>{const b=ne.findIndex(w=>w.url===J);return b>=0?ne.splice(b,1)[0]:{uid:y++,name:Xo(J),url:J,status:"linked"}});f.value=[...ue,...Y.filter(J=>J.status==="uploading"||J.status==="failed")]},{immediate:!0,deep:!0}),l.watch(d,(M,H)=>{var Y;H!==void 0&&M!==H&&(v++,$=void 0,p.value=!1,h.value="",f.value=((Y=n.modelValue)!=null?Y:[]).map(ne=>({uid:y++,name:Xo(ne),url:ne,status:"linked"}))),M!==void 0&&C()},{immediate:!0}),l.onBeforeUnmount(()=>{v++}),t({waitForUploads:_,waitForAssociations:I,retryAssociations:D}),(M,H)=>{const Y=l.resolveComponent("el-button"),ne=l.resolveComponent("el-upload"),ue=l.resolveComponent("el-link");return l.openBlock(),l.createElementBlock("div",Wv,[c.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(ne,{key:0,"show-file-list":!1,drag:e.drag,multiple:e.limit>1,accept:e.fileType.map(J=>`.${J.replace(/^\./,"")}`).join(","),"before-upload":q,"http-request":U,"on-error":x},l.createSlots({default:l.withCtx(()=>[l.createVNode(Y,{type:"primary"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.select")),1)]),_:1})]),_:2},[e.isShowTip?{name:"tip",fn:l.withCtx(()=>[l.createElementVNode("div",null,l.toDisplayString(l.unref(o)("upload.tip"))+": "+l.toDisplayString(e.fileType.join("/"))+"; "+l.toDisplayString(e.fileSize)+" MB",1)]),key:"0"}:void 0]),1032,["drag","multiple","accept"])),h.value?(l.openBlock(),l.createElementBlock("div",Jv,[l.createTextVNode(l.toDisplayString(h.value)+" ",1),c.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Y,{key:0,link:"",onClick:D},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1}))])):l.createCommentVNode("",!0),l.createElementVNode("ul",Kv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.value,J=>(l.openBlock(),l.createElementBlock("li",{key:J.uid,class:"ab-upload-file__item"},[l.createElementVNode("span",null,l.toDisplayString(J.name),1),J.status==="uploading"?(l.openBlock(),l.createElementBlock("span",Qv,l.toDisplayString(l.unref(o)("upload.uploading")),1)):l.createCommentVNode("",!0),J.error?(l.openBlock(),l.createElementBlock("span",Zv,l.toDisplayString(J.error),1)):l.createCommentVNode("",!0),J.url&&e.preEnabled?(l.openBlock(),l.createBlock(Y,{key:2,link:"",onClick:b=>i("preview",k(J))},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.preview")),1)]),_:1},8,["onClick"])):l.createCommentVNode("",!0),J.url&&e.dowEnabled?(l.openBlock(),l.createBlock(ue,{key:3,href:J.url,target:"_blank",download:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.download")),1)]),_:1},8,["href"])):l.createCommentVNode("",!0),!c.value&&e.coverEnabled&&J.id!=null&&N(J.name)?(l.openBlock(),l.createBlock(Y,{key:4,disabled:p.value||m.value,link:"",onClick:b=>Z(J)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(J.isCover?l.unref(o)("upload.unsetCover"):l.unref(o)("upload.setCover")),1)]),_:2},1032,["disabled","onClick"])):l.createCommentVNode("",!0),!c.value&&J.status==="pending"&&J.error?(l.openBlock(),l.createBlock(Y,{key:5,link:"",onClick:D},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.retry")),1)]),_:1})):l.createCommentVNode("",!0),!c.value&&e.delEnabled&&J.status!=="uploading"?(l.openBlock(),l.createBlock(Y,{key:6,disabled:p.value||m.value,link:"",onClick:b=>Q(J)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(o)("upload.delete")),1)]),_:1},8,["disabled","onClick"])):l.createCommentVNode("",!0)]))),128))])])}}}),Xv=[Tv,Ev,kv,Rv,Dv,Iv,Bv,Lv,Yv,ws],ea={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},ta="datePicker",eb={name:ta,maker:["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce((e,t)=>(e[t]=$e(ta,{type:t.toLowerCase()}),e),{}),mergeProp(e){var r;const t=e.prop.props;t.valueFormat||(t.valueFormat=ea[(r=t.type)!=null?r:""]||ea.date)}},_n="hidden",tb={name:_n,maker:{[_n]:(e,t)=>$e(_n)("",e,t)},render(){return[]}},Ai="input",xs=["password","url","email","text","textarea"].reduce((e,t)=>(e[t]=$e(Ai,{type:t}),e),{});xs.idate=$e(Ai,{type:"date"});const rb={name:Ai,maker:xs,mergeProp(e){const{props:t}=e.prop;t!=null&&t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},Fr={name:"inputNumber"},nb="textarea",ib={name:nb,mergeProp(e){const{props:t}=e.prop;t.type="textarea",t.autosize&&typeof t.autosize=="object"&&t.autosize.minRows&&(t.rows=t.autosize.minRows||2)}},ra="slider",ob={name:ra,maker:{sliderRange:$e(ra,{range:!0})},toFormValue(e,t){let r=Array.isArray(e),n=t.prop.props,i=n.min||0,o;return n.range===!0?o=r?e:[i,parseFloat(e)||i]:o=r?parseFloat(e[0])||i:parseFloat(e),o}},Fn="timePicker",ab={name:Fn,maker:{time:$e(Fn,e=>e.props.isRange=!1),timeRange:$e(Fn,e=>e.props.isRange=!0)},mergeProp(e){const t=e.prop.props;t.valueFormat||(t.valueFormat="HH:mm:ss")}},lb={name:"FcRow",render(e,t){return t.vNode.col({props:{span:24}},{default:()=>[t.vNode.row(t.prop,e)]})}},sb="select",Ss={name:sb,toFormValue(e,t){return t.prop.props.multiple&&!Array.isArray(e)?kt(e):e}},ub=re(R({},Ss),{name:"treeSelect"}),cb={name:"text",render(e,t){const r=t.$handle.api.getValue(t.field),n=hi(t.prop).formatter,i=typeof n=="function"?n({cellValue:r,column:t.rule,row:t.$handle.api.formData()}):r,o=String(i!=null?i:"");return Lh(t.prop.link)?l.h(yl,{link:t.prop.link,value:r,row:t.$handle.api.formData()},{default:()=>o}):l.h(L.ElText,null,{default:()=>o})}},Cs={name:"radio"},db=re(R({},Cs),{name:"checkbox"}),fb={name:"switch"},pb={name:"cascader"},hb={name:"colorPicker",render(e,t){var r,n,i;if(((i=(n=(r=t==null?void 0:t.$handle)==null?void 0:r.vm)==null?void 0:n.props)==null?void 0:i.readonly)===!0){const o=t.$handle.api.getValue(t.field),a=typeof o=="string"?o:void 0;return l.h("span",{class:"ab-color-picker__readonly",style:{backgroundColor:a,color:a?ol.getContrast(a):fh.black},title:a},String(o!=null?o:""))}return t.$render.defaultRender(t,e)}},mb=[eb,tb,rb,Fr,re(R({},Fr),{name:"number"}),re(R({},Fr),{name:"inputCurrency"}),re(R({},Fr),{name:"inputPercent"}),cb,ib,ob,ab,lb,Ss,ub,Cs,db,fb,pb,hb],se="el",gb={input:se+"-input",number:se+"-input-number",inputNumber:se+"-input-number",inputCurrency:se+"-input-number",inputPercent:se+"-input-number",inputRange:"ab-input-range",text:se+"-text",divider:se+"-divider",select:"ab-select",treeSelect:se+"-tree-select",datePicker:se+"-date-picker",timePicker:"ab-time-picker",cascader:se+"-cascader",colorPicker:"ab-colorPicker",timePeriod:"ab-time-period",uploadFile:"ab-upload-file",textarea:se+"-input",button:se+"-button",icon:"ab-icon",slider:se+"-slider",rate:se+"-rate",upload:"ab-upload",popover:se+"-popover",tooltip:se+"-tooltip",timeSelect:se+"-time-select",switch:se+"-switch",checkbox:"ab-checkbox",radio:"ab-radio",formItem:se+"-form-item",form:se+"-form",frame:"ab-frame",col:se+"-col",row:se+"-row",tree:"ab-tree",inputTag:se+"-input-tag",inputOtp:se+"-input-otp",mention:se+"-mention",transfer:se+"-transfer",autoComplete:se+"-autocomplete",auto:se+"-autocomplete",group:"ab-group",array:"ab-group",object:"ab-sub-form",subForm:"ab-sub-form"};function yb(){return{form:{inline:!0,labelPosition:"right",labelWidth:"120px",fieldWidth:"238px",disabled:!1,size:void 0},row:{show:!1,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}}const{t:Ar}=Xe(),vb=new Set(["input","inputnumber","textarea","password","inputtag"]),na=new Set(["select","datepicker","timepicker","treeselect","cascader","autocomplete"]);function bb(e){return e.type==="tooltip"}function ia(e,t){fe(e,t)&&B.String(e[t])&&(e[t]={[t]:e[t],show:!0})}function et(e){return e===!1}function wb(e,t){fe(e,t)&&!B.Object(e[t])&&(e[t]={show:!!e[t]})}function An(e){const t=R({},e);return delete t.children,t}const xb={validate(){const e=this.form();return e?e.validate():new Promise(t=>t())},validateField(e){return new Promise((t,r)=>{const n=this.form();n?n.validateField(e,(i,o)=>{o?r(o):t(i)}):t(void 0)})},clearValidateState(e){const t=this.vm.refs[e.wrapRef];t&&t.clearValidate()},fieldChange(e,t,r,n){var i,o;n||(o=(i=this.vm.refs[e.wrapRef])==null?void 0:i.validate("change"))==null||o.catch(()=>{})},tidyOptions(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(t=>{wb(e,t)}),e},tidyRule({prop:e}){return ia(e,"title"),ia(e,"info"),e},mergeProp(e){var s,u,c,f,h,p,m,g;const d=jl(R(R({},e.rule),e.prop),{includeChildren:((c=(u=(s=this.$handle)==null?void 0:s.vm)==null?void 0:u.props)==null?void 0:c.readonly)!==!0}),{children:r}=d,n=Lt(d,["children"]);Object.assign(e.prop,n),r!==e.rule.children&&(e.rule.children=r);const i=String(e.rule.type||e.type||"").replace(/[-_]/g,"").toLowerCase(),o=(m=(h=(f=e.refRule)==null?void 0:f.__$title)==null?void 0:h.value)!=null?m:typeof e.rule.title=="object"?(p=e.rule.title)==null?void 0:p.title:e.rule.title;if((vb.has(i)||na.has(i))&&o!==void 0&&o!==null&&o!==""){(g=e.prop).props||(g.props={}),this.$handle.api.getLocale();const y=na.has(i)?Ar("pleaseSelect"):Ar("pleaseEnter");fe(e.prop.props,"placeholder")||(e.prop.props.placeholder=`${y}${zt(o)}`);const v=String(e.prop.props.type||"").toLowerCase();(i==="datepicker"||i==="timepicker")&&(v.endsWith("range")||e.prop.props.isRange===!0)&&(fe(e.prop.props,"startPlaceholder")||(e.prop.props.startPlaceholder=`${y}${Ar("rangeStart")}${zt(o)}`),fe(e.prop.props,"endPlaceholder")||(e.prop.props.endPlaceholder=`${y}${Ar("rangeEnd")}${zt(o)}`))}const a={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(y=>{e.prop[y]=tt([this.options[y]||{},e.prop[y]||{}],a[y])})},getDefaultOptions(){return yb()},update(){const e=this.options.form,t=R({},e);delete t.fieldWidth,this.rule={props:R({},t),on:{submit:r=>{r.preventDefault()}},style:e.style,type:"form"}},beforeRender(){const{key:e,ref:t,$handle:r}=this,n=this.options.form;X(this.rule,{key:e,ref:t,class:[n.className,n.class,"ab-form",this.$handle.preview?"is-preview":""]}),X(this.rule.props,{model:r.formData})},render(e){return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,()=>this.makeFormBtn()),this.$r(this.rule,et(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap(e,t){var h;const r=e.prop,n=`${this.key}${e.key}`,i=r.col,o=this.isTitle(r)&&r.wrap.title!==!1,a=!(i!=null&&i.labelWidth)&&!o?0:i==null?void 0:i.labelWidth,s=e.input?(h=this.options.form)==null?void 0:h.fieldWidth:"",{inline:u,col:c}=this.rule.props,d=r.wrap.class;delete r.wrap.class,delete r.wrap.title;const f=(B.Undef(r.wrap.show)?!e.input:et(r.wrap.show))?t:this.$r(tt([r.wrap,re(R({props:re(R({labelWidth:a===void 0?a:zt(a),label:o?r.title.title:void 0},An(r.wrap||{})),{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(d||r.className,"ab-form-item")},s?{style:{"--ab-field-width":zt(s)}}:{}),{key:`${n}fi`,ref:e.wrapRef,type:"formItem"})]),R({default:()=>t},o?{label:()=>this.makeInfo(r,n,e)}:{}));return u===!0||et(c)||et(i.show)?f:this.makeCol(r,n,[f])},isTitle(e){if(this.options.form.title===!1)return!1;const t=e.title;return!(!t.title&&!t.native||et(t.show))},makeInfo(e,t,r){var d,f,h,p,m,g;const n=R({},e.title),i=R({},e.info),o=bb(i),a=this.options.form,s=this.getSlot("title"),u=[s?s({title:(f=(d=r.refRule)==null?void 0:d.__$title)==null?void 0:f.value,rule:r.rule,options:this.options}):((p=(h=r.refRule)==null?void 0:h.__$title)==null?void 0:p.value)+(a.labelSuffix||a["label-suffix"]||"")];if(!et(i.show)&&(i.info||i.native)&&!et(i.icon)){const y={type:i.type||"popover",props:An(i),key:`${t}pop`};delete y.props.icon,delete y.props.show,delete y.props.info,delete y.props.align,delete y.props.native;const v="content";i.info&&!fe(y.props,v)&&(y.props[v]=(g=(m=r.refRule)==null?void 0:m.__$info)==null?void 0:g.value),u[i.align!=="left"?"unshift":"push"](this.$r(tt([i,y]),{[n.slot||(o?"default":"reference")]:()=>this.$r({type:"ElIcon",style:"top:2px",key:`${t}i`},{default:()=>this.$r({type:i.icon===!0?"icon-warning":i.icon})},!0)}))}const c=tt([n,{props:An(n),key:`${t}tit`,class:"ab-form-title",type:n.type||"span",on:{click:(...y)=>{this.$handle.targetHook(r,"titleClick",{args:y})}}}]);return delete c.props.show,delete c.props.title,delete c.props.native,this.$r(c,u)},makeCol(e,t,r){const n=R({},e.col);return delete n.show,this.$r({class:this.$render.mergeClass(n.class,"ab-form-col"),type:"col",props:n||{span:24},key:`${t}col`},r)},makeRow(e){const t=this.options.row||{};return this.$r({type:"row",props:t,class:this.$render.mergeClass(t.class,"ab-form-row"),key:`${this.key}row`},e)},makeFormBtn(){let e=[];if(et(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),et(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!e.length)return;const t=this.$r({type:"formItem",class:"ab-form-item",key:`${this.key}fb`},e);return this.rule.props.inline===!0?t:this.$r({type:"col",class:"ab-form-col ab-form-footer",props:{span:24},key:`${this.key}fc`},[t])},makeResetBtn(){const e=R({},this.options.resetBtn),t=e.innerText||this.$handle.api.t("reset")||"重置";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-reset-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.resetBtn.click?this.options.resetBtn.click(r):r.resetFields()}},key:`${this.key}b2`},[t])},makeSubmitBtn(){const e=R({},this.options.submitBtn),t=e.innerText||this.$handle.api.t("submit")||"提交";return delete e.innerText,delete e.click,delete e.col,delete e.show,this.$r({type:"button",props:e,class:"ab-submit-btn",style:{width:e.width},on:{click:()=>{const r=this.$handle.api;this.options.submitBtn.click?this.options.submitBtn.click(r):r.submit().catch(()=>{})}},key:`${this.key}b1`},[t])}},_t={};Sb(_t);Cb(_t);$b(_t);Tb(_t);Eb(_t);kb(_t);function Sb(e){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","inputTag","inputOtp","mention","transfer","treeSelect","radio","rate"].forEach(t=>{e[t]=$e(t)}),e.auto=e.autoComplete,e.number=e.inputNumber,e.color=e.colorPicker,e.tag=e.inputTag}function Cb(e){e.treeSelectMultiple=$e("treeSelect",{multiple:!0})}function $b(e){const t="select",r="multiple";e.selectMultiple=$e(t,{[r]:!0}),e.selectOne=$e(t,{[r]:!1})}function Tb(e){const t="tree",r={treeSelected:"selected",treeChecked:"checked"};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,{type:r[i]}),n),e)}function Eb(e){const t="upload",r={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(r).reduce((n,i)=>(n[i]=$e(t,o=>o.props({uploadType:r[i][0],maxLength:r[i][1]})),n),e),e.uploadImage=e.image,e.uploadFile=e.file}function kb(e){const t={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};return Object.keys(t).reduce((r,n)=>(r[n]=$e("frame",i=>i.props({type:t[n][0],maxLength:t[n][1]})),r),e),e.frameInput=e.frameInputs,e.frameFile=e.frameFiles,e.frameImage=e.frameImages,e}function oa(e,t){return B.Boolean(e)?e={show:e}:!B.Undef(e)&&!B.Object(e)&&(e={show:t}),e}function _b(e,t){return{formEl(){return t.$manager.form()},wrapEl(r){const n=t.getFieldCtx(r);if(n)return t.vm.refs[n.wrapRef]},validate(r){return new Promise((n,i)=>{const o=e.children,a=[t.$manager.validate()];o.filter(s=>!s.isScope).forEach(s=>{a.push(s.validate())}),Promise.all(a).then(()=>{n(!0),r&&r(!0)}).catch(s=>{i(s),r&&r(s),t.vm.emit("validate-fail",s,{api:e}),t.emitEvent("validate-fail",s,{api:e})})})},validateField(r,n){return new Promise((i,o)=>{const s=typeof r=="object"?Ye(r):t.getCtx(r);if(!s){i(null),n&&n(null);return}const u=t.subForm[s.id],c=[t.$manager.validateField(s.id)];kt(u).filter(d=>!d.isScope).forEach(d=>{c.push(d.validate())}),Promise.all(c).then(()=>{i(null),n&&n(null)}).catch(d=>{o(d),n&&n(d),t.vm.emit("validate-field-fail",d,{field:r,api:e})})})},validateFields(r,n){return new Promise((i,o)=>{Array.isArray(r)||(r=[r]);const a=r.map(s=>e.validateField(s));Promise.all(a).then(()=>{i(null),n&&n(null)}).catch(s=>{o(s),n&&n(s)})})},clearValidateState(r,n=!0){e.helper.tidyFields(r).forEach(i=>{n&&this.clearSubValidateState(i),t.getCtxs(i).forEach(o=>{t.$manager.clearValidateState(o)})})},clearSubValidateState(r){e.helper.tidyFields(r).forEach(n=>{t.getCtxs(n).forEach(i=>{const o=t.subForm[i.id];o&&(Array.isArray(o)?o.forEach(a=>{a.clearValidateState()}):o&&o.clearValidateState())})})},btn:{loading:(r=!0)=>{e.submitBtnProps({loading:!!r})},disabled:(r=!0)=>{e.submitBtnProps({disabled:!!r})},show:(r=!0)=>{e.submitBtnProps({show:!!r})}},resetBtn:{loading:(r=!0)=>{e.resetBtnProps({loading:!!r})},disabled:(r=!0)=>{e.resetBtnProps({disabled:!!r})},show:(r=!0)=>{e.resetBtnProps({show:!!r})}},submitBtnProps:(r={})=>{let n=oa(t.options.submitBtn,!0);X(n,r),t.options.submitBtn=n,e.refreshOptions()},resetBtnProps:(r={})=>{let n=oa(t.options.resetBtn,!1);X(n,r),t.options.resetBtn=n,e.refreshOptions()},submit(r,n){return new Promise((i,o)=>{(t.options.validateOnSubmit===!1?Promise.resolve():e.validate()).then(()=>{let s=e.formData();t.beforeSubmit(s).then(()=>{B.Function(r)&&ee(()=>r(s,e)),B.Function(t.options.onSubmit)&&ee(()=>t.options.onSubmit(s,e)),t.vm.emit("submit",s,e),i(s)}).catch(()=>{})}).catch((...s)=>{B.Function(n)&&ee(()=>n(e,...s)),o(...s)})})}}}const $s={name:"required",load(e,t,r){const n=Fb(e.getValue());let i;if(n.required===!1)e.clearProp(),r==null||r.clearValidateState([t==null?void 0:t.field]);else{const o=R({required:!0,validator(s,u,c){a(),B.empty(u)?c(o.message):c()}},n),a=()=>{var u;const s=(u=t==null?void 0:t.__fc__.refRule.__$title)==null?void 0:u.value;if(i!==s)if(i=s,!n.message)o.message=(r==null?void 0:r.t("required",{title:s}))||s+((r==null?void 0:r.getLocale())==="en"?" is required":"不能为空");else{const c=n.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);c&&(o.message=r==null?void 0:r.t(c[1],{title:s}))}};a(),e.getProp().validate=[o]}r==null||r.sync(t)},watch(e,t,r){$s.load(e,t,r)}};function Fb(e){return B.Boolean(e)?{required:e}:B.String(e)?{message:e}:B.Undef(e)?{required:!1}:B.Function(e)?{validator:e}:B.Object(e)?e:{}}function Ab(e,t){const r=e;r.componentAlias(gb),Xv.forEach(o=>{const a=o;r.component(a.name,a)}),r.register($s),mb.forEach(o=>{r.parser(o)});const n=_t;Object.keys(n).forEach(o=>{r.maker[o]=n[o]});const i=typeof window!="undefined"?window.ElementPlus:void 0;i&&r.useApp((o,a)=>{a.use(i)})}function Ob(){return Bl({ui:"element-plus",version:"0.1.0",manager:xb,extendApi:_b,install:Ab,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}const Ts=l.defineComponent({name:"abDrawer",__name:"ab-drawer",props:l.mergeModels({visible:{type:Boolean,default:!1},detailLevel:{default:1}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=e,r=l.useModel(e,"visible"),n=l.computed(()=>t.detailLevel&&t.detailLevel<5?`${76-t.detailLevel*8}%`:"32%");return(i,o)=>{const a=l.resolveComponent("el-drawer");return l.openBlock(),l.createBlock(a,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),"with-header":!1,"show-close":!1,"append-to-body":"","close-on-click-modal":"","close-on-press-escape":"","destroy-on-close":"",size:n.value},{default:l.withCtx(()=>[l.renderSlot(i.$slots,"default")]),_:3},8,["modelValue","size"])}}}),Pb=(e,t)=>{e.component("ab-drawer",Ts)};var Oi=Object.defineProperty,Rb=Object.getOwnPropertyDescriptor,Mb=Object.getOwnPropertyNames,Db=Object.prototype.hasOwnProperty,Ib=(e,t)=>{for(var r in t)Oi(e,r,{get:t[r],enumerable:!0})},Bb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mb(t))!Db.call(e,i)&&i!==r&&Oi(e,i,{get:()=>t[i],enumerable:!(n=Rb(t,i))||n.enumerable});return e},jb=e=>Bb(Oi({},"__esModule",{value:!0}),e),Es={};Ib(Es,{default:()=>Vb});var Nb=jb(Es),Vb={vxe:{base:{pleaseInput:"请输入",pleaseSelect:"请选择",comma:",",fullStop:"。"},loading:{text:"加载中..."},error:{downErr:"下载失败",errLargeData:"当绑定的数据量过大时,应该请使用 {0},否则可能会出现卡顿",groupFixed:"如果使用分组表头,冻结列必须按组设置",groupMouseRange:'分组表头与 "{0}" 不能同时使用,这可能会出现错误',groupTag:'分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误',scrollErrProp:'启用虚拟滚动后不支持该参数 "{0}"',errConflicts:'参数 "{0}" 与 "{1}" 有冲突',modelConflicts:'绑定的字段值 "{0}" 与 "{1}" 存在冲突,将会出现错误',notSupportProp:'当启用参数 "{0}" 时不支持 "{1}",应该为 "{2}",否则将会出现错误',reqSupportProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会出现错误',notConflictProp:'当使用 "{0}" 时,应该设置 "{1}",否则可能会存在功能冲突',unableInsert:"无法插入到指定位置,请检查参数是否正确",useErr:'安装 "{0}" 模块时发生错误,可能顺序不正确,依赖的模块需要在 Table 之前安装',barUnableLink:"工具栏无法关联表格",expandContent:'展开行的插槽应该是 "content",请检查是否正确',reqComp:'缺少 "{0}" 组件,请检查是否正确安装。 https://vxeui.com/#/start/useUI/useGlobal',reqModule:'缺少 "{0}" 模块',reqProp:'缺少必要的 "{0}" 参数,这可能会导致出现错误',emptyProp:'参数 "{0}" 不允许为空',errProp:'不支持的参数 "{0}",可能为 "{1}"',colRepet:'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用',notFunc:'方法 "{0}" 不存在',errFunc:'参数 "{0}" 不是一个方法',notValidators:'全局校验 "{0}" 不存在',notFormats:'全局格式化 "{0}" 不存在',notCommands:'全局指令 "{0}" 不存在',notSlot:'插槽 "{0}" 不存在',noTree:'树结构不支持 "{0}"',noGroup:'数据分组后不支持 "{0}"',notProp:'不支持的参数 "{0}"',returnErr:'参数 "{0}" 的返回值期望是 "{1}" 实际是 "{2}"',notSupportReturn:'当返回值为 "{0}" 时的参数应该使用用 "{1}" 而不是 "{2}"',checkProp:'当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度',coverProp:'"{0}" 的参数 "{1}" 重复定义,这可能会出现错误',uniField:'字段名 "{0}" 重复定义,这可能会出现错误',repeatKey:'主键重复 {0}="{1}",这可能会出现错误',repeatProp:'参数重复 {0}="{1}",这可能会出现错误',delFunc:'方法 "{0}" 已废弃,请使用 "{1}"',delProp:'参数 "{0}" 已废弃,请使用 "{1}"',delEvent:'事件 "{0}" 已废弃,请使用 "{1}"',removeProp:'参数 "{0}" 已废弃,不建议使用,这可能会导致出现错误',errFormat:'全局的格式化内容应该使用 "VXETable.formats" 定义,挂载 "formatter={0}" 的方式已不建议使用',notType:'不支持的文件类型 "{0}"',notExp:"该浏览器不支持导入/导出功能",impFields:"导入失败,请检查字段名和数据格式是否正确",treeNotImp:"树表格不支持导入",treeCrossDrag:"只能拖拽第一层级",treeDragChild:"父级不能拖拽到自己的子级中",reqPlugin:'扩展插件未安装 "{1}" https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"超过支持的最大数据量 {0} 行,这可能会导致出现错误",useNew:"不建议使用 {0},请使用 {1}",errorVersion:"版本不匹配,当前版本 {0},最低支持版本为 {1}",errMaxVersion:"版本不匹配,当前版本 {0},最高支持版本为 {1}"},table:{emptyText:"暂无数据",allTitle:"全选/取消",seqTitle:"序号",actionTitle:"操作",confirmFilter:"筛选",resetFilter:"重置",allFilter:"全部",sortAsc:"升序:最低到最高",sortDesc:"降序:最高到最低",filter:"对所选的列启用筛选",impSuccess:"成功导入 {0} 条记录",expLoading:"正在导出中",expSuccess:"导出成功",expError:"导出失败",expFilename:"导出_{0}",expOriginFilename:"导出_源_{0}",customTitle:"个性化设置",customAll:"全部",customConfirm:"确认",customClose:"关闭",customCancel:"取消",customRestore:"恢复默认",maxFixedCol:"最大冻结列的数量不能超过 {0} 个",maxGroupCol:"最大分组字段的数量不能超过 {0} 个",dragTip:"移动:{0}",resizeColTip:"宽:{0} 像素",resizeRowTip:"高:{0} 像素",rowGroupContentTotal:"{0}({1})",menuLoading:"加载中..."},grid:{selectOneRecord:"请至少选择一条记录!",deleteSelectRecord:"您确定要删除所选记录吗?",removeSelectRecord:"您确定要移除所选记录吗?",dataUnchanged:"数据未改动!",delSuccess:"成功删除所选记录!",saveSuccess:"保存成功!",operError:"发生错误,操作失败!"},select:{clear:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索",loadingText:"加载中...",emptyText:"暂无数据",maxSize:"最大可选择的数量不能超过 {0} 个",overSizeErr:"已超出最大可选数量 {0} 个,超出部分将被忽略!",searchEmpty:"未匹配到数据!"},list:{allChecked:"全选",dragTip:"移动:{0}"},tree:{searchEmpty:"未匹配到数据!",dragTip:"移动:{0}"},treeSelect:{clearChecked:"清除",allChecked:"全选",allExpand:"全部展开",clearExpand:"全部收起",total:"已选 {0} 项",filterCount:"共找到 {0} 条记录",close:"关闭",search:"搜索",emptyText:"暂无数据"},tableSelect:{filterCount:"共找到 {0} 条记录"},pager:{goto:"前往",gotoTitle:"页数",pagesize:"{0}条/页",total:"共 {0} 条记录",pageClassifier:"页",homePage:"首页",homePageTitle:"首页",prevPage:"上一页",prevPageTitle:"上一页",nextPage:"下一页",nextPageTitle:"下一页",prevJump:"向上跳页",prevJumpTitle:"向上跳页",nextJump:"向下跳页",nextJumpTitle:"向下跳页",endPage:"末页",endPageTitle:"末页"},alert:{title:"系统提示"},button:{confirm:"确认",cancel:"取消",clear:"清除"},filter:{search:"搜索"},custom:{cstmTitle:"个性化设置",cstmRestore:"恢复默认",cstmCancel:"取消",cstmConfirm:"确定",cstmConfirmRestore:"请确认是否恢复成默认列配置?",cstmDragTarget:"移动:{0}",setting:{colSort:"排序",sortHelpTip:"点击图标开始拖动",colTitle:"列标题",colResizable:"列宽(像素)",colVisible:"是否显示",colFixed:"冻结列",colFixedMax:"冻结列({0})",colAlign:"对齐方式",colHeadAlign:"表头对齐方式",colFootAlign:"表尾对齐方式",fixedLeft:"左",fixedUnset:"无",fixedRight:"右",alignLeft:"左",alignCenter:"中",alignRight:"右",moveUp:"上移",moveDn:"下移",putTop:"置顶",putBottom:"置尾",moveUpTitle:"点击向上移动",moveDnTitle:"点击向下移动",putTopTitle:"点击置顶",putBottomTitle:"点击置尾",anLeftTitle:"左对齐",anCenterTitle:"居中",anRightTitle:"右对齐"}},import:{modes:{covering:"覆盖方式(直接覆盖表格数据)",insert:"底部追加(在表格的底部追加新数据)",insertTop:"顶部追加(在表格的顶部追加新数据)",insertBottom:"底部追加(在表格的底部追加新数据)"},impTitle:"导入数据",impFile:"文件名",impSelect:"选择文件",impType:"文件类型",impOpts:"参数设置",impMode:"导入模式",impConfirm:"导入",impCancel:"取消"},export:{types:{csv:"CSV (逗号分隔)(*.csv)",html:"网页(*.html)",xml:"XML 数据(*.xml)",txt:"文本文件(制表符分隔)(*.txt)",xls:"Excel 97-2003 工作簿(*.xls)",xlsx:"Excel 工作簿(*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"空数据",current:"当前数据(当前页的数据)",selected:"选中数据(当前页选中的数据)",all:"全量数据(包括所有分页的数据)"},printTitle:"打印数据",expTitle:"导出数据",expName:"文件名",expNamePlaceholder:"请输入文件名",expSheetName:"标题",expSheetNamePlaceholder:"请输入标题",expType:"保存类型",expMode:"选择数据",expCurrentColumn:"全部字段",expColumn:"选择字段",widthMode:"列宽设置",wModeTitle:"设置打印时列宽的渲染方式",wdModes:{default:"默认",auto:"自适应(根据内容自适应列宽)",scale:"等比例(根据页面比例渲染列宽)"},expOpts:"参数设置",expOptHeader:"表头",expHeaderTitle:"是否需要表头",expOptFooter:"表尾",expFooterTitle:"是否需要表尾",expOptColgroup:"分组表头",expOptTitle:"列标题",expTitleTitle:"是否为列标题,否则显示为列的字段名",expColgroupTitle:"如果存在,则支持带有分组结构的表头",expOptMerge:"合并",expMergeTitle:"如果存在,则支持带有合并结构的单元格",expOptAllExpand:"展开树",expAllExpandTitle:"如果存在,则支持将带有层级结构的数据全部展开",expOptTreeAllExpand:"展开树",expTreeAllExpandTitle:"如果存在,则自动展开所有树层级",expOptRowGroupAllExpand:"展开分组",expRowGroupAllExpandTitle:"如果存在,则自动展开所有分组层级",expOptUseStyle:"样式",expUseStyleTitle:"如果存在,则支持带样式的单元格",expOptOriginal:"源数据",expOriginalTitle:"如果为源数据,则支持导入到表格中",expPrint:"打印",expConfirm:"导出",expCancel:"取消"},modal:{errTitle:"错误提示",zoomMin:"最小化",zoomIn:"最大化",zoomOut:"还原",close:"关闭",miniMaxSize:"最小化窗口的数量不能超过 {0} 个",footPropErr:"show-footer 仅用于启用表尾,需配合 show-confirm-button | show-cancel-button | 插槽使用"},drawer:{close:"关闭"},form:{folding:"收起",unfolding:"展开"},toolbar:{import:"导入",export:"导出",print:"打印",refresh:"刷新",zoomIn:"全屏",zoomOut:"还原",custom:"个性化设置",customAll:"全部",customConfirm:"确认",customRestore:"重置",fixedLeft:"冻结在左侧",fixedRight:"冻结在右侧",cancelFixed:"取消冻结列"},iconPicker:{search:"搜索",emptyText:"暂无数据"},datePicker:{yearTitle:"{0} 年"},dateRangePicker:{pleaseRange:"请选择开始日期与结束日期"},input:{date:{m1:"01 月",m2:"02 月",m3:"03 月",m4:"04 月",m5:"05 月",m6:"06 月",m7:"07 月",m8:"08 月",m9:"09 月",m10:"10 月",m11:"11 月",m12:"12 月",quarterLabel:"{0} 年",monthLabel:"{0} 年",dayLabel:"{0} 年 {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"yyyy 年第 WW 周",month:"yyyy-MM",quarter:"yyyy 年第 q 季度",year:"yyyy"},weeks:{w:"",w0:"周日",w1:"周一",w2:"周二",w3:"周三",w4:"周四",w5:"周五",w6:"周六"},months:{m0:"一月",m1:"二月",m2:"三月",m3:"四月",m4:"五月",m5:"六月",m6:"七月",m7:"八月",m8:"九月",m9:"十月",m10:"十一月",m11:"十二月"},quarters:{q1:"第一季度",q2:"第二季度",q3:"第三季度",q4:"第四季度"}}},calendar:{yearLabel:"{0} 年",monthLabel:"{0} 月"},cascader:{clearChecked:"清除",allChecked:"全选",total:"已选 {0} 项",close:"关闭",search:"搜索"},numberInput:{currencySymbol:"¥"},imagePreview:{popupTitle:"预览",operBtn:{zoomOut:"缩小",zoomIn:"放大",pctFull:"等比例缩放",pct11:"显示原始尺寸",rotateLeft:"向左旋转",rotateRight:"向右旋转",print:"点击打印图片",download:"点击下载图片"}},upload:{fileBtnText:"点击或拖拽上传",imgBtnText:"点击或拖拽上传",dragPlaceholder:"请把文件拖放到这个区域即可上传",imgSizeHint:"单张{0}",imgCountHint:"最多{0}张",fileTypeHint:"支持 {0} 文件类型",fileSizeHint:"单个文件大小不超过{0}",fileCountHint:"最多可上传{0}个文件",uploadTypeErr:"文件类型不匹配!",overCountErr:"最多只能选择{0}个文件!",overCountExtraErr:"已超出最大数量{0}个,超出的{1}个文件将被忽略!",overSizeErr:"文件大小最大不能超过{0}!",manualUpload:"点击上传",reUpload:"重新上传",uploadProgress:"上传中 {0}%",uploadErr:"上传失败",uploadSuccess:"上传成功",moreBtnText:"更多({0})",moreImgBtnText:"图片({0})",moreFileBtnText:"文件({0})",viewItemTitle:"点击查看",morePopup:{readTitle:"查看列表",imageTitle:"上传图片",fileTitle:"上传文件"}},empty:{defText:"暂无数据"},colorPicker:{clear:"清除",confirm:"确认",copySuccess:"已复制到剪贴板:{0}",hex:"十六进制"},formDesign:{formName:"表单名称",defFormTitle:"未命名的表单",widgetPropTab:"控件属性",widgetFormTab:"表单属性",error:{wdFormUni:"该类型的控件在表单中只允许添加一个",wdSubUni:"该类型的控件在子表中只允许添加一个"},styleSetting:{btn:"样式设置",title:"表单的样式设置",layoutTitle:"控件布局",verticalLayout:"上下布局",horizontalLayout:"横向布局",styleTitle:"标题样式",boldTitle:"标题加粗",fontBold:"加粗",fontNormal:"常规",colonTitle:"显示冒号",colonVisible:"显示",colonHidden:"隐藏",alignTitle:"对齐方式",widthTitle:"标题宽度",alignLeft:"居左",alignRight:"居右",unitPx:"像素",unitPct:"百分比"},widget:{group:{base:"基础控件",layout:"布局控件",system:"系统控件",module:"模块控件",chart:"图表控件",advanced:"高级控件"},copyTitle:"副本_{0}",component:{input:"输入框",textarea:"文本域",select:"下拉选择",row:"一行多列",title:"标题",text:"文本",subtable:"子表",VxeSwitch:"是/否",VxeInput:"输入框",VxeNumberInput:"数字",VxeDatePicker:"日期",VxeTextarea:"文本域",VxeSelect:"下拉选择",VxeTreeSelect:"树形选择",VxeRadioGroup:"单选框",VxeCheckboxGroup:"复选框",VxeUploadFile:"文件",VxeUploadImage:"图片",VxeRate:"评分",VxeSlider:"滑块"},row:{placeholder:"控件位置"}},widgetProp:{name:"控件名称",placeholder:"提示语",required:"必填校验",multiple:"允许多选",displaySetting:{name:"显示设置",pc:"电脑端",mobile:"手机端",visible:"显示",hidden:"隐藏"},dataSource:{name:"数据源",defValue:"选项{0}",addOption:"添加选项",batchEditOption:"批量编辑",batchEditTip:"每行对应一个选项,支持从表格、Excel、WPS 中直接复制粘贴。",batchEditSubTip:"每行对应一个选项,如果是分组,子项可以是空格或制表键开头,支持从表格、Excel、WPS 中直接复制粘贴。",buildOption:"生成选项"},rowProp:{colSize:"列数",col2:"两列",col3:"三列",col4:"四列",col6:"六列",layout:"布局"},textProp:{name:"内容",alignTitle:"对齐方式",alignLeft:"居左",alignCenter:"居中",alignRight:"居右",colorTitle:"字体颜色",sizeTitle:"字体大小",boldTitle:"字体加粗",fontNormal:"常规",fontBold:"加粗"},subtableProp:{seqTitle:"序号",showSeq:"显示序号",showCheckbox:"允许多选",errSubDrag:"子表不支持该控件,请使用其他控件",colPlace:"将控件拖拽进来"},uploadProp:{limitFileCount:"文件数量限制",limitFileSize:"文件大小限制",multiFile:"允许上传多个文件",limitImgCount:"图片数量限制",limitImgSize:"图片大小限制",multiImg:"允许上传多张图片"},rules:{required:"必填字段"}}},listDesign:{fieldSettingTab:"字段设置",listSettingTab:"参数设置",searchTitle:"查询条件",listTitle:"列表字段",searchField:"查询字段",listField:"列表字段",activeBtn:{ActionButtonUpdate:"编辑",ActionButtonDelete:"删除"},search:{addBtn:"编辑",emptyText:"未配置查询条件",editPopupTitle:"编辑查询字段"},searchPopup:{colTitle:"标题",saveBtn:"保存"}},text:{copySuccess:"已复制到剪贴板",copyError:"当前环境不支持该操作"},countdown:{formats:{yyyy:"年",MM:"月",dd:"天",HH:"时",mm:"分",ss:"秒"}},contextMenu:{loadingText:"加载中..."},switch:{onText:"打开",offText:"关闭"},gantt:{tFullFormat:{year:"{yyyy}年",quarter:"{yyyy}年第{q}季度",month:"{yyyy}年{MM}月",week:"{yyyy}年第{W}周",day:"{yyyy}年{MM}月 {eLabel}",date:"{yyyy}年{MM}月{dd}日",hour:"{yyyy}年{MM}月{dd}日{HH}时",minute:"{yyyy}年{MM}月{dd}日{HH}时{mm}分",second:"{yyyy}年{MM}月{dd}日{HH}时{mm}分{ss}秒"},tSimpleFormat:{year:"{yyyy}年",quarter:"{q}季度",month:"{M}月",week:"{W}周",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}年",quarter:"{start.q}~{end.q}季度",month:"{start.M}~{end.M}月",week:"{start.W}~{end.W}周",day:"{eStartLabel}~{eEndLabel}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"},days:{w0:"日",w1:"一",w2:"二",w3:"三",w4:"四",w5:"五",w6:"六"}},plugins:{extendCellArea:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",selectErr:"无法操作指定区域的单元格",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作",cpInvalidErr:"该操作无法进行,您选择的区域中存在被禁止的列({0})"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},body:{row:"行:{0}",col:"列:{0}"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},extendPivotTable:{aggregation:{grouping:"分组",values:"值",groupPlaceholder:"拖至此处进行分组",valuesPlaceholder:"拖至此处进行聚合",dragExistCol:"该列已存在",sortHelpTip:"点击图标开始拖动"},aggFuncs:{sum:"求和",count:"计数",avg:"平均值",min:"最小值",max:"最大值",first:"首个值",last:"末尾值"}},filterComplexInput:{menus:{fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧"},cases:{equal:"等于",gt:"大于",lt:"小于",begin:"开头是",endin:"结尾是",include:"包含",isSensitive:"区分大小写"}},filterCombination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结左侧",fixedRight:"冻结右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",isAfter:"在以下日期之后",eqAfter:"在以下日期之后或与之相同",isBefore:"在以下日期之前",eqBefore:"在以下日期之前或与之相同",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",before:"之前",after:"之后",tomorrow:"明天",today:"今天",yesterday:"昨天",nextWeek:"下周",thisWeek:"本周",lastWeek:"上周",nextMonth:"下月",thisMonth:"本月",lastMonth:"上月",nextYear:"明年",thisYear:"今年",lastYear:"去年",yearToDate:"本年度截止到现在",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},empty:"(空白)",notData:"无匹配项"}},pro:{area:{mergeErr:"无法对合并单元格进行该操作",multiErr:"无法对多重选择区域进行该操作",extendErr:"若要执行此操作,所有合并的单元格需大小相同",pasteMultiErr:"无法粘贴,需要相同大小的复制的区域和粘贴的区域才能执行此操作"},fnr:{title:"查找和替换",titleFd:"查找",titleRe:"替换",findLabel:"查找",replaceLabel:"替换",findTitle:"查找内容:",replaceTitle:"替换为:",tabs:{find:"查找",replace:"替换"},filter:{re:"正则表达式",whole:"全词匹配",sensitive:"区分大小写"},btns:{findNext:"查找下一个",findAll:"查找全部",replace:"替换",replaceAll:"替换全部",cancel:"取消"},header:{seq:"#",cell:"单元格",value:"值"},empty:"(空值)",reError:"无效的正则表达式",recordCount:"已找到 {0} 个单元格",notCell:"找不到匹配的单元格",replaceSuccess:"成功替换 {0} 个单元格"}},renderer:{search:"搜索",cases:{equal:"等于",unequal:"不等于",gt:"大于",ge:"大于或等于",lt:"小于",le:"小于或等于",begin:"开头是",notbegin:"开头不是",endin:"结尾是",notendin:"结尾不是",include:"包含",exclude:"不包含",between:"介于",top10:"前10项",aboveAverage:"高于平均值",belowAverage:"低于平均值",custom:"自定义筛选",insensitive:"不区分大小写",isSensitive:"区分大小写"},combination:{menus:{sort:"排序",clearSort:"清除排序",sortAsc:"升序",sortDesc:"降序",fixedColumn:"冻结列",fixedGroup:"冻结分组",cancelFixed:"取消冻结",fixedLeft:"冻结到左侧",fixedRight:"冻结到右侧",clearFilter:"清除筛选",textOption:"文本筛选",numberOption:"数值筛选",dateOption:"日期筛选"},popup:{title:"自定义筛选的方式",currColumnTitle:"显示行:",and:"与",or:"或",describeHtml:"可用 ? 代表单个字符<br/>用 * 代表任意多个字符"},empty:"(空白)",notData:"无匹配项"}}}};const Lb=jt(Nb);var Pi=Object.defineProperty,Hb=Object.getOwnPropertyDescriptor,zb=Object.getOwnPropertyNames,Ub=Object.prototype.hasOwnProperty,qb=(e,t)=>{for(var r in t)Pi(e,r,{get:t[r],enumerable:!0})},Yb=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zb(t))!Ub.call(e,i)&&i!==r&&Pi(e,i,{get:()=>t[i],enumerable:!(n=Hb(t,i))||n.enumerable});return e},Gb=e=>Yb(Pi({},"__esModule",{value:!0}),e),ks={};qb(ks,{default:()=>Jb});var Wb=Gb(ks),Jb={vxe:{base:{pleaseInput:"Please enter",pleaseSelect:"Please select",comma:",",fullStop:"."},loading:{text:"Loading..."},error:{downErr:"Download failed",errLargeData:"When the bound data volume is too large, please use {0}; otherwise, performance may lag",groupFixed:"If grouped headers are used, fixed columns must be set by group",groupMouseRange:'Grouped headers cannot be used together with "{0}", which may cause errors',groupTag:'Group columns should use "{0}" instead of "{1}", which may cause errors',scrollErrProp:'The parameter "{0}" is not supported after virtual scrolling is enabled',errConflicts:'Parameter "{0}" conflicts with "{1}"',modelConflicts:'The bound field value "{0}" conflicts with "{1}", which will cause errors',notSupportProp:'When parameter "{0}" is enabled, "{1}" is not supported; it should be "{2}", otherwise errors may occur',reqSupportProp:'When using "{0}", "{1}" should be set, otherwise errors may occur',notConflictProp:'When using "{0}", "{1}" should be set, otherwise functional conflicts may occur',unableInsert:"Unable to insert at the specified position. Please check whether the parameters are correct",useErr:'An error occurred while installing the "{0}" module. The order may be incorrect; dependent modules must be installed before Table',barUnableLink:"The toolbar cannot be linked to the table",expandContent:'The slot for the expanded row should be "content". Please check whether it is correct',reqComp:'Missing "{0}" component. Please check whether it is installed correctly. https://vxeui.com/#/start/useUI/useGlobal',reqModule:'Missing "{0}" module',reqProp:'Missing required parameter "{0}", which may cause errors',emptyProp:'Parameter "{0}" cannot be empty',errProp:'Unsupported parameter "{0}", possibly "{1}"',colRepet:'column.{0}="{1}" is duplicated, which may cause some features to be unavailable',notFunc:'Method "{0}" does not exist',errFunc:'Parameter "{0}" is not a method',notValidators:'Global validator "{0}" does not exist',notFormats:'Global formatter "{0}" does not exist',notCommands:'Global command "{0}" does not exist',notSlot:'Slot "{0}" does not exist',noTree:'Tree structure does not support "{0}"',noGroup:'"{0}" is not supported after data grouping',notProp:'Unsupported parameter "{0}"',returnErr:'The return value of parameter "{0}" is expected to be "{1}" but is actually "{2}"',notSupportReturn:'When the return value is "{0}", the parameter should use "{1}" instead of "{2}"',checkProp:'Large data volumes may cause checkbox lag. It is recommended to set parameter "{0}" to improve rendering speed',coverProp:'Parameter "{1}" of "{0}" is defined repeatedly, which may cause errors',uniField:'Field name "{0}" is defined repeatedly, which may cause errors',repeatKey:'Duplicate primary key {0}="{1}", which may cause errors',repeatProp:'Duplicate parameter {0}="{1}", which may cause errors',delFunc:'Method "{0}" is deprecated. Please use "{1}"',delProp:'Parameter "{0}" is deprecated. Please use "{1}"',delEvent:'Event "{0}" is deprecated. Please use "{1}"',removeProp:'Parameter "{0}" is deprecated and not recommended, which may cause errors',errFormat:'Global formatting content should be defined using "VXETable.formats". Mounting "formatter={0}" is no longer recommended',notType:'Unsupported file type "{0}"',notExp:"This browser does not support import/export",impFields:"Import failed. Please check whether field names and data formats are correct",treeNotImp:"Tree table does not support import",treeCrossDrag:"Only the first level can be dragged",treeDragChild:"A parent cannot be dragged into its own children",reqPlugin:'Extension plugin "{1}" is not installed. https://vxeui.com/other{0}/#/{1}/start/npmInstall',errMaxRow:"Exceeds the maximum supported data volume of {0} rows, which may cause errors",useNew:"{0} is not recommended. Please use {1}",errorVersion:"Version mismatch. Current version is {0}, minimum supported version is {1}",errMaxVersion:"Version mismatch. Current version is {0}, maximum supported version is {1}"},table:{emptyText:"No data",allTitle:"Select all/Clear",seqTitle:"No.",actionTitle:"Actions",confirmFilter:"Filter",resetFilter:"Reset",allFilter:"All",sortAsc:"Ascending: lowest to highest",sortDesc:"Descending: highest to lowest",filter:"Enable filtering for the selected column",impSuccess:"Successfully imported {0} records",expLoading:"Exporting",expSuccess:"Export successful",expError:"Export failed",expFilename:"Export_{0}",expOriginFilename:"Export_Source_{0}",customTitle:"Custom settings",customAll:"All",customConfirm:"Confirm",customClose:"Close",customCancel:"Cancel",customRestore:"Restore defaults",maxFixedCol:"The maximum number of fixed columns cannot exceed {0}",maxGroupCol:"The maximum number of grouped fields cannot exceed {0}",dragTip:"Move: {0}",resizeColTip:"Width: {0} px",resizeRowTip:"Height: {0} px",rowGroupContentTotal:"{0} ({1})",menuLoading:"Loading..."},grid:{selectOneRecord:"Please select at least one record!",deleteSelectRecord:"Are you sure you want to delete the selected records?",removeSelectRecord:"Are you sure you want to remove the selected records?",dataUnchanged:"Data has not changed!",delSuccess:"Selected records deleted successfully!",saveSuccess:"Saved successfully!",operError:"An error occurred. Operation failed!"},select:{clear:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search",loadingText:"Loading...",emptyText:"No data",maxSize:"The maximum number of selectable items cannot exceed {0}",overSizeErr:"The maximum selectable count of {0} has been exceeded. The excess will be ignored!",searchEmpty:"No matching data!"},list:{allChecked:"All",dragTip:"Move: {0}"},tree:{searchEmpty:"No matching data!",dragTip:"Move: {0}"},treeSelect:{clearChecked:"Clear",allChecked:"All",allExpand:"Expand all",clearExpand:"Collapse all",total:"{0} selected",filterCount:"{0} records found",close:"Close",search:"Search",emptyText:"No data"},tableSelect:{filterCount:"{0} records found"},pager:{goto:"Go to",gotoTitle:"Page",pagesize:"{0}/page",total:"Total {0} records",pageClassifier:"Page",homePage:"Home",homePageTitle:"Home",prevPage:"Previous",prevPageTitle:"Previous",nextPage:"Next",nextPageTitle:"Next",prevJump:"Jump up",prevJumpTitle:"Jump up",nextJump:"Jump down",nextJumpTitle:"Jump down",endPage:"Last",endPageTitle:"Last"},alert:{title:"System prompt"},button:{confirm:"Confirm",cancel:"Cancel",clear:"Clear"},filter:{search:"Search"},custom:{cstmTitle:"Custom settings",cstmRestore:"Restore defaults",cstmCancel:"Cancel",cstmConfirm:"OK",cstmConfirmRestore:"Are you sure you want to restore the default column configuration?",cstmDragTarget:"Move: {0}",setting:{colSort:"Sort",sortHelpTip:"Click the icon to start dragging",colTitle:"Column title",colResizable:"Column width (px)",colVisible:"Visible",colFixed:"Fixed column",colFixedMax:"Fixed columns ({0})",colAlign:"Alignment",colHeadAlign:"Header alignment",colFootAlign:"Footer alignment",fixedLeft:"Left",fixedUnset:"None",fixedRight:"Right",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",moveUp:"Up",moveDn:"Down",putTop:"Top",putBottom:"Bottom",moveUpTitle:"Click to move up",moveDnTitle:"Click to move down",putTopTitle:"Click to move to top",putBottomTitle:"Click to move to bottom",anLeftTitle:"Align left",anCenterTitle:"Align center",anRightTitle:"Align right"}},import:{modes:{covering:"Cover (directly overwrite table data)",insert:"Append at bottom (append new data to the bottom of the table)",insertTop:"Append at top (append new data to the top of the table)",insertBottom:"Append at bottom (append new data to the bottom of the table)"},impTitle:"Import data",impFile:"File name",impSelect:"Select file",impType:"File type",impOpts:"Options",impMode:"Import mode",impConfirm:"Import",impCancel:"Cancel"},export:{types:{csv:"CSV (comma separated)(*.csv)",html:"Web page (*.html)",xml:"XML data (*.xml)",txt:"Text file (tab separated)(*.txt)",xls:"Excel 97-2003 Workbook (*.xls)",xlsx:"Excel workbook (*.xlsx)",pdf:"PDF (*.pdf)"},modes:{empty:"Empty data",current:"Current data (data on the current page)",selected:"Selected data (data selected on the current page)",all:"All data (including data on all pages)"},printTitle:"Print data",expTitle:"Export data",expName:"File name",expNamePlaceholder:"Please enter a file name",expSheetName:"Title",expSheetNamePlaceholder:"Please enter a title",expType:"Save type",expMode:"Select data",expCurrentColumn:"All fields",expColumn:"Select fields",widthMode:"Column width settings",wModeTitle:"Set how column widths are rendered when printing",wdModes:{default:"Default",auto:"Auto (adjust column widths based on content)",scale:"Scale (render column widths according to page scale)"},expOpts:"Options",expOptHeader:"Header",expHeaderTitle:"Whether a header is needed",expOptFooter:"Footer",expFooterTitle:"Whether a footer is needed",expOptColgroup:"Grouped header",expOptTitle:"Column titles",expTitleTitle:"Whether to use column titles; otherwise, display field names",expColgroupTitle:"If present, supports headers with grouped structure",expOptMerge:"Merge",expMergeTitle:"If present, supports cells with merged structure",expOptAllExpand:"Expand tree",expAllExpandTitle:"If present, supports fully expanding hierarchical data",expOptTreeAllExpand:"Expand tree",expTreeAllExpandTitle:"If present, automatically expands all tree levels",expOptRowGroupAllExpand:"Expand groups",expRowGroupAllExpandTitle:"If present, automatically expands all group levels",expOptUseStyle:"Styles",expUseStyleTitle:"If present, supports styled cells",expOptOriginal:"Source data",expOriginalTitle:"If source data, supports importing into the table",expPrint:"Print",expConfirm:"Export",expCancel:"Cancel"},modal:{errTitle:"Error",zoomMin:"Minimize",zoomIn:"Maximize",zoomOut:"Restore",close:"Close",miniMaxSize:"The number of minimized windows cannot exceed {0}",footPropErr:"show-footer is only used to enable the footer and must be used with show-confirm-button | show-cancel-button | slots"},drawer:{close:"Close"},form:{folding:"Collapse",unfolding:"Expand"},toolbar:{import:"Import",export:"Export",print:"Print",refresh:"Refresh",zoomIn:"Fullscreen",zoomOut:"Restore",custom:"Custom settings",customAll:"All",customConfirm:"Confirm",customRestore:"Reset",fixedLeft:"Freeze left",fixedRight:"Freeze right",cancelFixed:"Unfreeze"},iconPicker:{search:"Search",emptyText:"No data"},datePicker:{yearTitle:"{0}"},dateRangePicker:{pleaseRange:"Please select a start date and an end date"},input:{date:{m1:"Jan",m2:"Feb",m3:"Mar",m4:"Apr",m5:"May",m6:"Jun",m7:"Jul",m8:"Aug",m9:"Sep",m10:"Oct",m11:"Nov",m12:"Dec",quarterLabel:"{0}",monthLabel:"{0}",dayLabel:"{0} {1}",labelFormat:{date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss",week:"Week WW, yyyy",month:"yyyy-MM",quarter:"Qq yyyy",year:"yyyy"},weeks:{w:"",w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},months:{m0:"January",m1:"February",m2:"March",m3:"April",m4:"May",m5:"June",m6:"July",m7:"August",m8:"September",m9:"October",m10:"November",m11:"December"},quarters:{q1:"Q1",q2:"Q2",q3:"Q3",q4:"Q4"}}},calendar:{yearLabel:"{0}",monthLabel:"{0}"},cascader:{clearChecked:"Clear",allChecked:"All",total:"{0} selected",close:"Close",search:"Search"},numberInput:{currencySymbol:"$"},imagePreview:{popupTitle:"Preview",operBtn:{zoomOut:"Zoom out",zoomIn:"Zoom in",pctFull:"Fit to page",pct11:"Original size",rotateLeft:"Rotate left",rotateRight:"Rotate right",print:"Click to print image",download:"Click to download image"}},upload:{fileBtnText:"Click or drag to upload",imgBtnText:"Click or drag to upload",dragPlaceholder:"Drag files here to upload",imgSizeHint:"Single image {0}",imgCountHint:"Up to {0} images",fileTypeHint:"Supports {0} file types",fileSizeHint:"Single file size must not exceed {0}",fileCountHint:"Up to {0} files can be uploaded",uploadTypeErr:"File type mismatch!",overCountErr:"You can select up to {0} files!",overCountExtraErr:"The maximum count of {0} has been exceeded. The excess {1} files will be ignored!",overSizeErr:"File size cannot exceed {0}!",manualUpload:"Click to upload",reUpload:"Re-upload",uploadProgress:"Uploading {0}%",uploadErr:"Upload failed",uploadSuccess:"Upload successful",moreBtnText:"More ({0})",moreImgBtnText:"Images ({0})",moreFileBtnText:"Files ({0})",viewItemTitle:"Click to view",morePopup:{readTitle:"View list",imageTitle:"Upload images",fileTitle:"Upload files"}},empty:{defText:"No data"},colorPicker:{clear:"Clear",confirm:"Confirm",copySuccess:"Copied to clipboard: {0}",hex:"HEX"},formDesign:{formName:"Form name",defFormTitle:"Untitled form",widgetPropTab:"Widget properties",widgetFormTab:"Form properties",error:{wdFormUni:"Only one widget of this type can be added to the form",wdSubUni:"Only one widget of this type can be added to the subtable"},styleSetting:{btn:"Style settings",title:"Form style settings",layoutTitle:"Widget layout",verticalLayout:"Vertical layout",horizontalLayout:"Horizontal layout",styleTitle:"Title style",boldTitle:"Bold title",fontBold:"Bold",fontNormal:"Normal",colonTitle:"Show colon",colonVisible:"Show",colonHidden:"Hide",alignTitle:"Alignment",widthTitle:"Title width",alignLeft:"Left",alignRight:"Right",unitPx:"px",unitPct:"%"},widget:{group:{base:"Basic widgets",layout:"Layout widgets",system:"System widgets",module:"Module widgets",chart:"Chart widgets",advanced:"Advanced widgets"},copyTitle:"Copy_{0}",component:{input:"Input",textarea:"Textarea",select:"Select",row:"Row with multiple columns",title:"Title",text:"Text",subtable:"Subtable",VxeSwitch:"Yes/No",VxeInput:"Input",VxeNumberInput:"Number",VxeDatePicker:"Date",VxeTextarea:"Textarea",VxeSelect:"Select",VxeTreeSelect:"Tree select",VxeRadioGroup:"Radio group",VxeCheckboxGroup:"Checkbox group",VxeUploadFile:"File",VxeUploadImage:"Image",VxeRate:"Rate",VxeSlider:"Slider"},row:{placeholder:"widget position"}},widgetProp:{name:"Widget name",placeholder:"Placeholder",required:"Required validation",multiple:"Allow multiple selection",displaySetting:{name:"Display settings",pc:"Desktop",mobile:"Mobile",visible:"Visible",hidden:"Hidden"},dataSource:{name:"Data source",defValue:"Option {0}",addOption:"Add option",batchEditOption:"Batch edit",batchEditTip:"Each line corresponds to one option. You can copy and paste directly from tables, Excel, or WPS.",batchEditSubTip:"Each line corresponds to one option. For groups, sub-items can start with spaces or tabs. You can copy and paste directly from tables, Excel, or WPS.",buildOption:"Generate options"},rowProp:{colSize:"Columns",col2:"Two columns",col3:"Three columns",col4:"Four columns",col6:"Six columns",layout:"Layout"},textProp:{name:"Content",alignTitle:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",colorTitle:"Font color",sizeTitle:"Font size",boldTitle:"Bold font",fontNormal:"Normal",fontBold:"Bold"},subtableProp:{seqTitle:"No.",showSeq:"Show row number",showCheckbox:"Allow multiple selection",errSubDrag:"This widget is not supported in subtables. Please use another widget",colPlace:"Drag a widget here"},uploadProp:{limitFileCount:"File count limit",limitFileSize:"File size limit",multiFile:"Allow uploading multiple files",limitImgCount:"Image count limit",limitImgSize:"Image size limit",multiImg:"Allow uploading multiple images"},rules:{required:"Required field"}}},listDesign:{fieldSettingTab:"Field settings",listSettingTab:"Options",searchTitle:"Search conditions",listTitle:"List fields",searchField:"Search field",listField:"List field",activeBtn:{ActionButtonUpdate:"Edit",ActionButtonDelete:"Delete"},search:{addBtn:"Edit",emptyText:"No search conditions configured",editPopupTitle:"Edit search field"},searchPopup:{colTitle:"Title",saveBtn:"Save"}},text:{copySuccess:"Copied to clipboard",copyError:"This operation is not supported in the current environment"},countdown:{formats:{yyyy:"Year",MM:"Month",dd:"Day",HH:"Hour",mm:"Minute",ss:"Second"}},contextMenu:{loadingText:"Loading..."},switch:{onText:"On",offText:"Off"},gantt:{tFullFormat:{year:"{yyyy}",quarter:"Q{q} {yyyy}",month:"{MM}/{yyyy}",week:"Week {W}, {yyyy}",day:"{MM}/{dd}/{yyyy} {eLabel}",date:"{MM}/{dd}/{yyyy}",hour:"{MM}/{dd}/{yyyy} {HH}:00",minute:"{MM}/{dd}/{yyyy} {HH}:{mm}",second:"{MM}/{dd}/{yyyy} {HH}:{mm}:{ss}"},tSimpleFormat:{year:"{yyyy}",quarter:"Q{q}",month:"{M}",week:"W{W}",day:"{eLabel}",date:"{d}",hour:"{HH}",minute:"{mm}",second:"{ss}"},stepFormat:{year:"{start.yyyy}~{end.yyyy}",quarter:"Q{start.q}~Q{end.q}",month:"{start.M}~{end.M}",week:"W{start.W}~W{end.W}",day:"{sE}~{eE}",date:"{start.d}~{end.d}",hour:"{start.HH}~{end.HH}",minute:"{start.mm}~{end.mm}",second:"{start.ss}~{end.ss}"},dayss:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"},days:{w0:"Sun",w1:"Mon",w2:"Tue",w3:"Wed",w4:"Thu",w5:"Fri",w6:"Sat"}},plugins:{extendCellArea:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",selectErr:"Cannot operate on cells in the specified area",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation",cpInvalidErr:"This operation cannot be performed because the selected area contains prohibited columns ({0})"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},body:{row:"Row: {0}",col:"Column: {0}"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},extendPivotTable:{aggregation:{grouping:"Group",values:"Values",groupPlaceholder:"Drag here to group",valuesPlaceholder:"Drag here to aggregate",dragExistCol:"This column already exists",sortHelpTip:"Click the icon to start dragging"},aggFuncs:{sum:"Sum",count:"Count",avg:"Average",min:"Min",max:"Max",first:"First",last:"Last"}},filterComplexInput:{menus:{fixedColumn:"Fixed column",fixedGroup:"Fixed group",cancelFixed:"Unfix",fixedLeft:"Fix left",fixedRight:"Fix right"},cases:{equal:"Equals",gt:"Greater",lt:"Less",begin:"Begins",endin:"Ends",include:"Contains",isSensitive:"Case sensitive"}},filterCombination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Available? Represents a single character<br/>Use * Represents any multiple characters"},cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Start",notbegin:"It's not at the beginning",endin:"End",notendin:"The ending is not",include:"Include",exclude:"Not included",between:"Between",isAfter:"Is after",eqAfter:"Is on or after",isBefore:"Is before",eqBefore:"Is on or before",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",before:"Before",after:"After",tomorrow:"Tomorrow",today:"Today",yesterday:"Yesterday",nextWeek:"Next Week",thisWeek:"This Week",lastWeek:"Last Week",nextMonth:"Next Month",thisMonth:"This Month",lastMonth:"Last Month",nextYear:"Next Year",thisYear:"This Year",lastYear:"Last Year",yearToDate:"Year to Date",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},empty:"(blank)",notData:"No matches"}},pro:{area:{mergeErr:"This operation cannot be performed on merged cells",multiErr:"This operation cannot be performed on multiple selected areas",extendErr:"To perform this operation, all merged cells must be the same size",pasteMultiErr:"Cannot paste. The copied area and the paste area must be the same size to perform this operation"},fnr:{title:"Find and replace",titleFd:"Find",titleRe:"Replace",findLabel:"Find",replaceLabel:"Replace",findTitle:"Find what:",replaceTitle:"Replace with:",tabs:{find:"Find",replace:"Replace"},filter:{re:"Regular expression",whole:"Match whole word",sensitive:"Case sensitive"},btns:{findNext:"Find next",findAll:"Find all",replace:"Replace",replaceAll:"Replace all",cancel:"Cancel"},header:{seq:"#",cell:"Cell",value:"Value"},empty:"(empty)",reError:"Invalid regular expression",recordCount:"{0} cells found",notCell:"No matching cell found",replaceSuccess:"Successfully replaced {0} cells"}},renderer:{search:"Search",cases:{equal:"Equals",unequal:"Not equal",gt:"Greater",ge:"Greater or equal",lt:"Less",le:"Less or equal",begin:"Begins",notbegin:"Not begin",endin:"Ends",notendin:"Not end",include:"Contains",exclude:"Not contain",between:"Between",top10:"Top 10",aboveAverage:"Above average",belowAverage:"Below average",custom:"Custom filter",insensitive:"Case insensitive",isSensitive:"Case sensitive"},combination:{menus:{sort:"Sort",clearSort:"Clear sort",sortAsc:"Ascending",sortDesc:"Descending",fixedColumn:"Freeze column",fixedGroup:"Freeze group",cancelFixed:"Unfreeze",fixedLeft:"Fix left",fixedRight:"Fix right",clearFilter:"Clear filter",textOption:"Text filter",numberOption:"Number filter",dateOption:"Date filter"},popup:{title:"Custom filter method",currColumnTitle:"Show rows:",and:"And",or:"Or",describeHtml:"Use ? for a single character<br/>Use * for any number of characters"},empty:"(blank)",notData:"No matches"}}}};const Kb=jt(Wb);Mr.VxeUI.setI18n("zh-CN",Lb);Mr.VxeUI.setI18n("en-US",Kb);const Qb=(e,t)=>{e.component("ab-drawer",Ts),e.component("ab-table",Vl),e.component("ab-table-detail",ml);const{isZhCN:r}=Se();r()?Mr.VxeUI.setLanguage("zh-CN"):Mr.VxeUI.setLanguage("en-US")},Zb={class:"ab-detail__title"},Xb=l.defineComponent({name:"AbDetail",__name:"ab-detail",props:l.mergeModels({title:{},id:{},idField:{},idFieldTable:{},modelValue:{},rule:{},validRules:{},permiPrefix:{},getHandler:{},createHandler:{},updateHandler:{},deleteHandler:{},vertical:{type:Boolean},detailLevel:{default:1},editable:{type:Boolean,default:!0},readonly:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["open","close"],["update:modelValue"]),setup(e,{expose:t,emit:r}){const n=r,i=e,{t:o}=Xe(),a=lr.useRoute(),s=l.ref(),u=l.ref({}),c=l.ref({}),d=l.useModel(e,"modelValue");l.ref(i.vertical);const f=l.ref(i.readonly);l.watch(()=>i.readonly,x=>f.value=x,{immediate:!0}),l.computed(()=>i.detailLevel&&i.detailLevel<5?`${76-i.detailLevel*8}%`:"32%");const h=l.computed(()=>i.id),p=l.computed(()=>{var x,_;return!((x=d.value)!=null&&x[i.idField])||((_=d.value)==null?void 0:_[i.idField])==="new"}),m=l.computed(()=>p.value?`${o("action.create")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:f.value?`${o("action.detail")} - ${i.title||(a==null?void 0:a.meta.title)||""}`:`${o("action.edit")} - ${i.title||(a==null?void 0:a.meta.title)||""}`),g=l.computed(()=>{var x;return((x=i.rule)!=null?x:[]).map(_=>typeof _.getRule=="function"?_.getRule():_)}),y=()=>{var x;f.value=!1,(x=u.value)==null||x.refresh()},v=()=>me(this,null,function*(){T.value=!0;let x;p.value&&typeof i.createHandler=="function"?(x=yield i.createHandler(d.value),x&&(d.value[i.idField]=x),yield l.nextTick()):!p.value&&typeof i.updateHandler=="function"&&(x=yield i.updateHandler(d.value)),console.warn("saveHandler: ",JSON.stringify(d.value,null,2)),T.value=!1}),S=()=>{var x;f.value=!0,(x=u.value)==null||x.refresh()},$=()=>N(),V=l.computed(()=>{let x=st(g.value.find(_=>_.type!==de.OPERATE&&_.field===de.OPERATE));return x||(x={type:"ElRow",field:de.OPERATE,title:"操作",width:260,fixed:"right",children:[]}),x.children=wt(x==null?void 0:x.children,_=>_.field!==de.DETAIL),x!=null&&x.children&&Array.isArray(x==null?void 0:x.children)&&x.children.push({type:"ElButton",children:[{type:"icon",props:{icon:"ep:edit-pen"}},o("action.edit")],props:{type:"primary"},computed:{hidden:!f.value},on:{click:y}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:check"}},o("action.save")],props:{type:"success",plain:!0},computed:{hidden:f.value},on:{click:v}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:refresh-right"}},o("action.cancel")],computed:{hidden:f.value},on:{click:S}},{type:"ElButton",children:[{type:"icon",props:{icon:"ep:back"}},o("action.return")],on:{click:$}}),x}),P=l.computed(()=>l.reactive(wt(g.value,x=>x.type!==de.OPERATE&&x.field!==de.OPERATE).map(x=>zf(x,(_,F)=>{if(F==="component"&&_&&typeof _=="object")return l.markRaw(l.toRaw(_))})))),T=l.ref(!1),E=()=>me(this,null,function*(){T.value=!0,console.log("abDetail.init: ",h==null?void 0:h.value,V.value),h.value&&typeof i.getHandler=="function"?d.value=yield i.getHandler(h.value):d.value={},T.value=!1});l.onMounted(()=>E());const k=(x=void 0,_=!1)=>me(this,null,function*(){var F,A;if(f.value=_,T.value=!0,typeof i.getHandler=="function"&&(x!=null&&x[i.idField])){const C=yield i.getHandler(x==null?void 0:x[i.idField]);d.value=C||{}}else{const C=st(x)||{};(F=i.rule)==null||F.forEach(I=>{const D=typeof I.getRule=="function"?I.getRule():I;D.field&&D.field!==de.OPERATE&&typeof(C==null?void 0:C[D.field])=="undefined"&&typeof D.edit=="undefined"&&typeof D.itemRender=="undefined"&&(C[D.field]="")}),d.value=C}yield l.nextTick(),(A=u.value)==null||A.refresh(),n("open",d.value),T.value=!1}),N=()=>{f.value=!0,d.value={},n("close")};return t({open:k,close:N,toggle:(x=!1,_=void 0,F=!1)=>x?k(_,F):N(),reload:()=>me(this,null,function*(){if(typeof i.getHandler!="function"||!d.value[i.idField]){console.error("abTableDetail.reload: no getHandler or no idField!");return}const x=yield i.getHandler(d.value[i.idField]);k(x,f.value)})}),(x,_)=>{const F=l.resolveComponent("el-card"),A=l.resolveComponent("ab-form"),C=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(F,{class:"ab-detail__header w-full sticky top-0 z-9",shadow:"never"},{default:l.withCtx(()=>[l.createElementVNode("div",Zb,l.toDisplayString(m.value),1),l.withDirectives(l.createVNode(Zr,{class:"ab-detail__opr","permi-prefix":e.permiPrefix,rule:V.value,"model-value":d.value,api:c.value,"onUpdate:api":_[0]||(_[0]=I=>c.value=I),plain:"",readonly:f.value},null,8,["permi-prefix","rule","model-value","api","readonly"]),[[C,T.value]])]),_:1}),l.createVNode(F,{class:"ab-detail__form",shadow:"never"},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(A,{ref_key:"formRef",ref:s,rule:P.value,modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=I=>d.value=I),api:u.value,"onUpdate:api":_[2]||(_[2]=I=>u.value=I),"id-field":e.idField,"id-field-table":e.idFieldTable,readonly:f.value},null,8,["rule","modelValue","api","id-field","id-field-table","readonly"]),[[C,T.value]])]),_:1})],64)}}}),ew=(e,t)=>{e.component("ab-detail",Xb)},tw={key:0,class:"ab-toolbar__title"},rw={class:"ab-toolbar__title"},nw=l.defineComponent({name:"AbToolbar",__name:"ab-toolbar",props:l.mergeModels({title:{},permiPrefix:{},rule:{},queryHandler:{},refreshEnable:{type:Boolean,default:!0},exportEnable:{type:Boolean,default:!1},settingEnable:{type:Boolean,default:!0},btnTreeEnable:{type:Boolean},classNmae:{}},{vertical:{type:Boolean,default:!1},verticalModifiers:{}}),emits:["update:vertical"],setup(e,{expose:t}){const r=e,n=l.inject("abTableRef",null),i=lr.useRoute(),{wsCache:o}=Se(),a=l.computed(()=>o.getCurrentSize||"default"),s=l.computed(()=>pl(a.value));l.useModel(e,"vertical");const u=l.ref(!1),c=l.computed(()=>{var g;if(!r.rule||Array.isArray(r.rule)&&!((g=r.rule)!=null&&g.length))return;const p=st(r.rule);return Array.isArray(p)?{type:"ElRow",children:[...p]}:p}),d=l.computed(()=>{var p;if(r.queryHandler)return r.queryHandler;if(typeof((p=n==null?void 0:n.value)==null?void 0:p.reload)=="function")return n.value.reload}),f=l.ref();return l.onMounted(()=>{var p;(p=n.value)==null||p.tableRef.connect(f.value)}),t({getTitle:()=>r.title}),(p,m)=>{const g=l.resolveComponent("vxe-toolbar");return l.openBlock(),l.createBlock(g,{ref_key:"toolbarRef",ref:f,class:"ab-toolbar","class-name":e.classNmae,size:s.value,loading:u.value,export:e.exportEnable,refresh:e.refreshEnable,"refresh-options":e.refreshEnable&&d.value?{queryMethod:d.value}:void 0,custom:!!e.settingEnable},{buttons:l.withCtx(()=>[e.title?(l.openBlock(),l.createElementBlock("div",tw,[l.renderSlot(p.$slots,"icon"),l.createTextVNode(" "+l.toDisplayString(e.title),1)])):l.renderSlot(p.$slots,"buttons",{},()=>{var y,v;return[l.createElementVNode("div",rw,l.toDisplayString(((v=(y=l.unref(i))==null?void 0:y.meta)==null?void 0:v.title)||""),1)]},void 0,1)]),tools:l.withCtx(()=>[l.renderSlot(p.$slots,"tools"),l.createVNode(Zr,{"permi-prefix":e.permiPrefix,rule:c.value,plain:""},null,8,["permi-prefix","rule"])]),_:3},8,["class-name","size","loading","export","refresh","refresh-options","custom"])}}}),iw=(e,t)=>{e.component("ab-toolbar",nw)},nn=Ob();typeof window!="undefined"&&(window.abForm=nn);const ow=nn.maker;function aw(e,t){t!=null&&t.upload&&e.provide(bs,t.upload),Ms(e,{AbForm:nn}),ah(e),Pb(e),Qb(e),ew(e),iw(e)}exports.AbForm=nn;exports.AbTable=Vl;exports.AbTableDetail=ml;exports.AbTableEnum=de;exports.AbUploadFile=ws;exports.CACHE_KEY=at;exports.en=Va;exports.getCurrentSize=Ga;exports.getLang=cr;exports.getTheme=Ua;exports.getUser=Ja;exports.isDark=qa;exports.isZhCN=xt;exports.maker=ow;exports.setCurrentSize=Ya;exports.setLang=Ha;exports.setTheme=za;exports.setUser=Wa;exports.setupArchbizKit=aw;exports.useCache=Se;exports.zhCN=La;