kouxiangtang 0.1.29 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +411 -411
- package/dist/{AttachmentUploader-Gl4uwpi0.js → AttachmentUploader-kjI75NG4.js} +16 -16
- package/dist/AttachmentUploader-kjI75NG4.js.map +1 -0
- package/dist/{ImageUploader-Ecxbu5yB.js → ImageUploader-CDBMZ9Q4.js} +15 -15
- package/dist/ImageUploader-CDBMZ9Q4.js.map +1 -0
- package/dist/{ImagesUploader-DiaKghBH.js → ImagesUploader-DR1NdrIX.js} +7 -7
- package/dist/ImagesUploader-DR1NdrIX.js.map +1 -0
- package/dist/{RichTextEditor-bJlEkb34.js → RichTextEditor-M8WpX6JI.js} +2 -2
- package/dist/{RichTextEditor-bJlEkb34.js.map → RichTextEditor-M8WpX6JI.js.map} +1 -1
- package/dist/color-DbNhHNpt.js.map +1 -1
- package/dist/{config-Bmby6rfL.js → config-2BP5-eb_.js} +5 -5
- package/dist/config-2BP5-eb_.js.map +1 -0
- package/dist/{config-DQerJfRt.js → config-BAjlIeLU.js} +2 -2
- package/dist/config-BAjlIeLU.js.map +1 -0
- package/dist/{config-ys3nFgYd.js → config-BQByyFaI.js} +2 -2
- package/dist/config-BQByyFaI.js.map +1 -0
- package/dist/{config-BMdtWu5R.js → config-CQA1bx3f.js} +15 -15
- package/dist/config-CQA1bx3f.js.map +1 -0
- package/dist/{config-CEbwLzea.js → config-CVao0Cla.js} +6 -6
- package/dist/config-CVao0Cla.js.map +1 -0
- package/dist/{config-Dr_SXi5U.js → config-CVslr70e.js} +2 -2
- package/dist/config-CVslr70e.js.map +1 -0
- package/dist/{config-C8MFDKwG.js → config-C_d1djj4.js} +2 -2
- package/dist/config-C_d1djj4.js.map +1 -0
- package/dist/{config-CDG1L4Oi.js → config-CqR0uCa_.js} +3 -3
- package/dist/config-CqR0uCa_.js.map +1 -0
- package/dist/{config-DSE87t_O.js → config-Csw0On0x.js} +8 -8
- package/dist/config-Csw0On0x.js.map +1 -0
- package/dist/{config-yVymOXO_.js → config-D_FDegBc.js} +2 -2
- package/dist/config-D_FDegBc.js.map +1 -0
- package/dist/{config-Xk01hDVk.js → config-DbXMEYLj.js} +2 -2
- package/dist/config-DbXMEYLj.js.map +1 -0
- package/dist/{config-Bbs_ly6P.js → config-Dq4y7P21.js} +2 -2
- package/dist/config-Dq4y7P21.js.map +1 -0
- package/dist/{config-B04hLt3e.js → config-HKkdk6wZ.js} +3 -3
- package/dist/config-HKkdk6wZ.js.map +1 -0
- package/dist/{config-KtTeOyV6.js → config-LPjXlVUG.js} +2 -2
- package/dist/config-LPjXlVUG.js.map +1 -0
- package/dist/{config-BNxcHvPM.js → config-Ob9gEzh5.js} +12 -12
- package/dist/config-Ob9gEzh5.js.map +1 -0
- package/dist/{config-Dh16WhJb.js → config-czbw2bDq.js} +14 -14
- package/dist/config-czbw2bDq.js.map +1 -0
- package/dist/{config-ssH8d7K9.js → config-d7n2dlpo.js} +2 -2
- package/dist/config-d7n2dlpo.js.map +1 -0
- package/dist/{config-DrJPQ_iz.js → config-h20uQgYE.js} +11 -11
- package/dist/config-h20uQgYE.js.map +1 -0
- package/dist/{config-BSYmo88x.js → config-jR1X5xVh.js} +2 -2
- package/dist/config-jR1X5xVh.js.map +1 -0
- package/dist/{config-CE-gN7KM.js → config-z9izRzg4.js} +15 -15
- package/dist/config-z9izRzg4.js.map +1 -0
- package/dist/{index-lFCbFvdk.js → index-DXK7K7iB.js} +78 -83
- package/dist/index-DXK7K7iB.js.map +1 -0
- package/dist/kouxiangtang.js +1 -1
- package/dist/kouxiangtang.umd.cjs +4 -4
- package/dist/kouxiangtang.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +56 -56
- package/dist/AttachmentUploader-Gl4uwpi0.js.map +0 -1
- package/dist/ImageUploader-Ecxbu5yB.js.map +0 -1
- package/dist/ImagesUploader-DiaKghBH.js.map +0 -1
- package/dist/config-B04hLt3e.js.map +0 -1
- package/dist/config-BMdtWu5R.js.map +0 -1
- package/dist/config-BNxcHvPM.js.map +0 -1
- package/dist/config-BSYmo88x.js.map +0 -1
- package/dist/config-Bbs_ly6P.js.map +0 -1
- package/dist/config-Bmby6rfL.js.map +0 -1
- package/dist/config-C8MFDKwG.js.map +0 -1
- package/dist/config-CDG1L4Oi.js.map +0 -1
- package/dist/config-CE-gN7KM.js.map +0 -1
- package/dist/config-CEbwLzea.js.map +0 -1
- package/dist/config-DQerJfRt.js.map +0 -1
- package/dist/config-DSE87t_O.js.map +0 -1
- package/dist/config-Dh16WhJb.js.map +0 -1
- package/dist/config-DrJPQ_iz.js.map +0 -1
- package/dist/config-Dr_SXi5U.js.map +0 -1
- package/dist/config-KtTeOyV6.js.map +0 -1
- package/dist/config-Xk01hDVk.js.map +0 -1
- package/dist/config-ssH8d7K9.js.map +0 -1
- package/dist/config-yVymOXO_.js.map +0 -1
- package/dist/config-ys3nFgYd.js.map +0 -1
- package/dist/index-lFCbFvdk.js.map +0 -1
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Qr]=this[Qr]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ut(i);r[c]||(Js(s,i),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}}be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(be.prototype,({value:o},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>o,set(r){this[n]=r}}}),$.freezeMethods(be);function ho(o,t){const n=this||Lt,r=t||n,s=be.from(r.headers);let a=r.data;return $.forEach(o,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Yr(o){return!!(o&&o.__CANCEL__)}function zt(o,t,n){P.call(this,o??"canceled",P.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(zt,P,{__CANCEL__:!0});function Xs(o,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?o(n):t(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Zs=Ne.hasStandardBrowserEnv?{write(o,t,n,r,s,a){const i=[o+"="+encodeURIComponent(t)];$.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$.isString(r)&&i.push("path="+r),$.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(o){const t=document.cookie.match(new RegExp("(^|;\\s*)("+o+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(o){this.write(o,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vs(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function ei(o,t){return t?o.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):o}function Kr(o,t){return o&&!vs(t)?ei(o,t):t}const ti=Ne.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(a){let i=a;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=$.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function ni(o){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return t&&t[1]||""}function oi(o,t){o=o||10;const n=new Array(o),r=new Array(o);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),u=r[a];i||(i=f),n[s]=d,r[s]=f;let p=a,g=0;for(;p!==s;)g+=n[p++],p=p%o;if(s=(s+1)%o,s===a&&(a=(a+1)%o),f-i<t)return;const B=u&&f-u;return B?Math.round(g*1e3/B):void 0}}function Jr(o,t){let n=0;const r=oi(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=r(c),f=a<=i;n=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&f?(i-a)/d:void 0,event:s};u[t?"download":"upload"]=!0,o(u)}}const mo={http:As,xhr:typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(n,r){let s=o.data;const a=be.from(o.headers).normalize();let{responseType:i,withXSRFToken:c}=o,d;function f(){o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let u;if($.isFormData(s)){if(Ne.hasStandardBrowserEnv||Ne.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((u=a.getContentType())!==!1){const[m,...x]=u?u.split(";").map(k=>k.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...x].join("; "))}}let p=new XMLHttpRequest;if(o.auth){const m=o.auth.username||"",x=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+x))}const g=Kr(o.baseURL,o.url);p.open(o.method.toUpperCase(),Hr(g,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function B(){if(!p)return;const m=be.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:m,config:o,request:p};Xs(function(S){n(S),f()},function(S){r(S),f()},k),p=null}if("onloadend"in p?p.onloadend=B:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(B)},p.onabort=function(){p&&(r(new P("Request aborted",P.ECONNABORTED,o,p)),p=null)},p.onerror=function(){r(new P("Network Error",P.ERR_NETWORK,o,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||qr;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new P(x,k.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,o,p)),p=null},Ne.hasStandardBrowserEnv&&(c&&$.isFunction(c)&&(c=c(o)),c||c!==!1&&ti(g))){const m=o.xsrfHeaderName&&o.xsrfCookieName&&Zs.read(o.xsrfCookieName);m&&a.set(o.xsrfHeaderName,m)}s===void 0&&a.setContentType(null),"setRequestHeader"in p&&$.forEach(a.toJSON(),function(x,k){p.setRequestHeader(k,x)}),$.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",Jr(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",Jr(o.onUploadProgress)),(o.cancelToken||o.signal)&&(d=m=>{p&&(r(!m||m.type?new zt(null,o,p):m),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const y=ni(g);if(y&&Ne.protocols.indexOf(y)===-1){r(new P("Unsupported protocol "+y+":",P.ERR_BAD_REQUEST,o));return}p.send(s||null)})}};$.forEach(mo,(o,t)=>{if(o){try{Object.defineProperty(o,"name",{value:t})}catch{}Object.defineProperty(o,"adapterName",{value:t})}});const Xr=o=>`- ${o}`,ri=o=>$.isFunction(o)||o===null||o===!1,Zr={getAdapter:o=>{o=$.isArray(o)?o:[o];const{length:t}=o;let n,r;const s={};for(let a=0;a<t;a++){n=o[a];let i;if(r=n,!ri(n)&&(r=mo[(i=String(n)).toLowerCase()],r===void 0))throw new P(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+a]=r}if(!r){const a=Object.entries(s).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
4
|
`+a.map(Xr).join(`
|
|
5
5
|
`):" "+Xr(a[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:mo};function go(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new zt(null,o)}function vr(o){return go(o),o.headers=be.from(o.headers),o.data=ho.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),Zr.getAdapter(o.adapter||Lt.adapter)(o).then(function(r){return go(o),r.data=ho.call(o,o.transformResponse,r),r.headers=be.from(r.headers),r},function(r){return Yr(r)||(go(o),r&&r.response&&(r.response.data=ho.call(o,o.transformResponse,r.response),r.response.headers=be.from(r.response.headers))),Promise.reject(r)})}const ea=o=>o instanceof be?{...o}:o;function _t(o,t){t=t||{};const n={};function r(f,u,p){return $.isPlainObject(f)&&$.isPlainObject(u)?$.merge.call({caseless:p},f,u):$.isPlainObject(u)?$.merge({},u):$.isArray(u)?u.slice():u}function s(f,u,p){if($.isUndefined(u)){if(!$.isUndefined(f))return r(void 0,f,p)}else return r(f,u,p)}function a(f,u){if(!$.isUndefined(u))return r(void 0,u)}function i(f,u){if($.isUndefined(u)){if(!$.isUndefined(f))return r(void 0,f)}else return r(void 0,u)}function c(f,u,p){if(p in t)return r(f,u);if(p in o)return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(f,u)=>s(ea(f),ea(u),!0)};return $.forEach(Object.keys(Object.assign({},o,t)),function(u){const p=d[u]||s,g=p(o[u],t[u],u);$.isUndefined(g)&&p!==c||(n[u]=g)}),n}const ta="1.6.8",_o={};["object","boolean","number","function","string","symbol"].forEach((o,t)=>{_o[o]=function(r){return typeof r===o||"a"+(t<1?"n ":" ")+o}});const na={};_o.transitional=function(t,n,r){function s(a,i){return"[Axios v"+ta+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,c)=>{if(t===!1)throw new P(s(i," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!na[i]&&(na[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,c):!0}};function ai(o,t,n){if(typeof o!="object")throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const r=Object.keys(o);let s=r.length;for(;s-- >0;){const a=r[s],i=t[a];if(i){const c=o[a],d=c===void 0||i(c,a,o);if(d!==!0)throw new P("option "+a+" must be "+d,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+a,P.ERR_BAD_OPTION)}}const yo={assertOptions:ai,validators:_o},ve=yo.validators;class st{constructor(t){this.defaults=t,this.interceptors={request:new Pr,response:new Pr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
-
`+a):r.stack=a}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&yo.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:yo.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=be.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,p=0,g;if(!d){const y=[vr.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),g=y.length,u=Promise.resolve(n);p<g;)u=u.then(y[p++],y[p++]);return u}g=c.length;let B=n;for(p=0;p<g;){const y=c[p++],m=c[p++];try{B=y(B)}catch(x){m.call(this,x);break}}try{u=vr.call(this,B)}catch(y){return Promise.reject(y)}for(p=0,g=f.length;p<g;)u=u.then(f[p++],f[p++]);return u}getUri(t){t=_t(this.defaults,t);const n=Kr(t.baseURL,t.url);return Hr(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,r){return this.request(_t(r||{},{method:t,url:n,data:(r||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class bo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(s);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new zt(a,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bo(function(s){t=s}),cancel:t}}}function si(o){return function(n){return o.apply(null,n)}}function ii(o){return $.isObject(o)&&o.isAxiosError===!0}const wo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wo).forEach(([o,t])=>{wo[t]=o});function oa(o){const t=new st(o),n=Cr(st.prototype.request,t);return $.extend(n,st.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oa(_t(o,s))},n}const v=oa(Lt);v.Axios=st,v.CanceledError=zt,v.CancelToken=bo,v.isCancel=Yr,v.VERSION=ta,v.toFormData=bn,v.AxiosError=P,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=si,v.isAxiosError=ii,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Gr($.isHTMLForm(o)?new FormData(o):o),v.getAdapter=Zr.getAdapter,v.HttpStatusCode=wo,v.default=v;let yt=null;function li(o){yt=v.create(o)}function ci(){return yt}async function di(o,t={},n={}){return new Promise((r,s)=>{yt.get(o,{headers:n,params:t}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function ui(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function fi(o,t,n={}){return new Promise((r,s)=>{yt.delete(o,{data:t,headers:n}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function pi(o,t,n={}){return new Promise((r,s)=>{yt.put(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}const he={get:di,post:ui,put:pi,remove:fi,setupAxios:li,getAxiosInstance:ci};var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function hi(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var aa={exports:{}};(function(o,t){(function(n,r){typeof hi=="function"?o.exports=r():n.pluralize=r()})(ae,function(){var n=[],r=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function f(m,x){return m.replace(/\$(\d{1,2})/g,function(k,_){return x[_]||""})}function u(m,x){return m.replace(x[0],function(k,_){var S=f(x[1],arguments);return d(k===""?m[_-1]:k,S)})}function p(m,x,k){if(!m.length||s.hasOwnProperty(m))return x;for(var _=k.length;_--;){var S=k[_];if(S[0].test(x))return u(x,S)}return x}function g(m,x,k){return function(_){var S=_.toLowerCase();return x.hasOwnProperty(S)?d(_,S):m.hasOwnProperty(S)?d(_,m[S]):p(S,_,k)}}function B(m,x,k,_){return function(S){var E=S.toLowerCase();return x.hasOwnProperty(E)?!0:m.hasOwnProperty(E)?!1:p(E,E,k)===E}}function y(m,x,k){var _=x===1?y.singular(m):y.plural(m);return(k?x+" ":"")+_}return y.plural=g(i,a,n),y.isPlural=B(i,a,n),y.singular=g(a,i,r),y.isSingular=B(a,i,r),y.addPluralRule=function(m,x){n.push([c(m),x])},y.addSingularRule=function(m,x){r.push([c(m),x])},y.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}y.addPluralRule(m,"$0"),y.addSingularRule(m,"$0")},y.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(m){return y.addIrregularRule(m[0],m[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(m){return y.addPluralRule(m[0],m[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(m){return y.addSingularRule(m[0],m[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})})(aa);var mi=aa.exports;const sa=ra(mi),ko=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",Eo="RESTORE",ia="ENABLE",gi=[kn,En,xn,Bn,bt,ia];class _i{constructor(t,n,r=gi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.operations=r,this.operations.forEach(s=>{const a=ko(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(kn)){console.log(`${this.side}/${this.domain} 不支持 ${kn} 操作`);return}return he.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return he.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return he.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(Eo)){console.log(`${this.side}/${this.domain} 不支持 ${Eo} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class yi{constructor(t,n,r){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.listQuerys=r}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),he.get(`${this.side}/${this.resources}`,n)}getOne(t){return he.get(`${this.side}/${this.resources}/${t.id}`)}}const bi={Client:_i,ReadOnlyClient:yi,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:Eo,ENABLE:ia},wi=(o,t,n)=>{const r=o[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},ki=["createdAt","updatedAt","deletedAt"];class ee{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.info=t.info?"("+(t==null?void 0:t.info)+")":"",this.label=t.label+this.info,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.placeholder=t.placeholder||"",this.prefix=t.prefix||"",this.suffix=t.suffix||"",this.extendDetail=t.extendDetail||!1,this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss",this.change=(t==null?void 0:t.change)||null,this.waterMark=(t==null?void 0:t.waterMark)||"",this.elConfig=(t==null?void 0:t.elConfig)||{}}computeWidth(t){return t.width?t.width:ki.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(this);if(n.every(a=>r.includes(a)))return;const s=n.filter(a=>!r.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function la(o,t,n){console.warn(`${o}.${t} => ${n}`)}const xo={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},"radio-group":{config:"radio-group"},component:{config:"component"},"input-number":{config:"input-number"}};async function ca(o,t,n){const r=await wi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>Dd),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>jd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>Ud),"./field/cascader/config.js":()=>Promise.resolve().then(()=>Wd),"./field/component/config.js":()=>Promise.resolve().then(()=>Qd),"./field/date/config.js":()=>Promise.resolve().then(()=>Zd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>ou),"./field/image/config.js":()=>Promise.resolve().then(()=>uu),"./field/images/config.js":()=>Promise.resolve().then(()=>bu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>Bu),"./field/json/config.js":()=>Promise.resolve().then(()=>Vu),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>Pu),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Ju),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zu),"./field/select/config.js":()=>Promise.resolve().then(()=>of),"./field/string/config.js":()=>Promise.resolve().then(()=>uf),"./field/switch/config.js":()=>Promise.resolve().then(()=>gf),"./field/text/config.js":()=>Promise.resolve().then(()=>kf),"./field/time/config.js":()=>Promise.resolve().then(()=>Cf),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Df)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function Sn(o,t="unknown"){return o==null?void 0:o.map(r=>{if(r instanceof ee)return r;if(r.code==="id"?r.type="row-id":r.component&&(r.type="component"),Object.keys(xo).includes(r.type)){const s=xo[r.type];return s.deprecated&&la(r.domain||t,r.code,s.deprecated),ca(xo[r.type].config,r,r.domain||t)}return ca("string",r,r.domain||t)})}let Bo={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function Ei(o){Bo={...Bo,...o},wt=o.domainConfigs}function xi(o){Object.keys(wt).forEach(t=>{const n=wt[t];Object.keys(n).forEach(r=>{const s=n[r];s.load=o(t,r)})})}function et(){return Bo}function So(){return wt}function Ht(o,t){return wt[o][t].load().then(n=>wt[o][t].load().then(r=>{const s=r.default;return Promise.all(s.fields).then(a=>{var i;if(s.fields=a,((i=s.detailGroupFields)==null?void 0:i.length)>0){const c=s.detailGroupFields.map(d=>{var f;return((f=d.childrenFields)==null?void 0:f.length)>0?Promise.all(d.childrenFields).then(u=>(d.childrenFields=u,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class Bi{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=Sn(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:Sn(a.childrenFields,r.code)})),!r.simple&&(this.name=So()[t][r.code].name,this.filters=r.filters||[],this.coverField=r.coverField,this.nameField=r.nameField||"name",this.showSubmit=r.showSubmit||!0,this.showEdit=this.setupShowEdit(r.showEdit),this.submitConfirm=r.submitConfirm,this.removeConfirm=r.removeConfirm,this.showCreate=this.setupShowCreate(r.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=r.detailSubType?"list":"tabs",this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[],this.displayMode=n.displayMode||{},this.showPagination=n.showPagination??!0,this.extendTableColumnfields=n.extendTableColumnfields||null,this.formStyleConfig=this.getFormStyleConfig(n.formConfig),this.delText=n.delText||"确定要删除该条数据吗?",this.showDetailInfo=n.showDetailInfo,this.detailComponent=n.detailComponent||null)}wrapFields(t,n){return Sn(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const r=t.hasOne(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const r=t.hasMany(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const r=t.pageActions(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const r=t.rowActions(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,r)=>t(n,r):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return r=>{const s=this.showCreate(r);return{...n,creatable:n.creatable&&s}}}getFormStyleConfig(t){return{...{labelPosition:"top",labelWidth:100},...t||{}}}}function da(o,t){return new Bi(o,t)}const R=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},Si={class:"card-header"},Ci={class:"title"},ua=R({__name:"Widget",props:{title:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createElementVNode("span",Ci,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-0f4cee53"]]),$i={key:0},Vi={key:1},Oi={key:0},Di={key:1},fa=R({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(o){const t=o;let n="#f7faff",r="10px";return t.background&&(n=t.background,n=="none"&&(r="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(r)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",$i,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Vi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Oi,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Di,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-3122281d"]]),Ti=R({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(ua,null,{default:e.withCtx(()=>[e.createVNode(fa,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-a711a147"]]),Ni={},Fi={style:{padding:"20px 0"}};function Ai(o,t){return e.openBlock(),e.createElementBlock("div",Fi,[e.renderSlot(o.$slots,"default")])}const ji=R(Ni,[["render",Ai]]),Ri=R({__name:"DashboardRow",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-a22ec57e"]]);/*! Element Plus Icons Vue v2.3.1 */var Ii=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Mi=Ii,Li=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Ui=Li,zi=e.defineComponent({name:"CirclePlus",__name:"circle-plus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),e.createElementVNode("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Hi=zi,Pi=e.defineComponent({name:"Close",__name:"close",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),pa=Pi,qi=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ha=qi,Wi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Gi=Wi,Qi=e.defineComponent({name:"Delete",__name:"delete",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ma=Qi,Yi=e.defineComponent({name:"Document",__name:"document",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ga=Yi,Ki=e.defineComponent({name:"Download",__name:"download",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Ji=Ki,Xi=e.defineComponent({name:"EditPen",__name:"edit-pen",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),Zi=Xi,vi=e.defineComponent({name:"Finished",__name:"finished",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),el=vi,tl=e.defineComponent({name:"Grid",__name:"grid",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),nl=tl,ol=e.defineComponent({name:"Loading",__name:"loading",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),_a=ol,rl=e.defineComponent({name:"Minus",__name:"minus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),al=rl,sl=e.defineComponent({name:"Operation",__name:"operation",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),il=sl,ll=e.defineComponent({name:"Plus",__name:"plus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Co=ll,cl=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),ya=cl,dl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),ul=dl,fl=e.defineComponent({name:"Refresh",__name:"refresh",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),pl=fl,hl=e.defineComponent({name:"Search",__name:"search",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),ml=hl,gl=e.defineComponent({name:"Setting",__name:"setting",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),_l=gl,yl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),bl=yl,wl=e.defineComponent({name:"View",__name:"view",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),kl=wl;function Y(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=ko(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function El(o){const t=o.length,n=Math.floor(24/t);return{type:"row",cols:o.map(s=>({type:"col",span:n,field:s}))}}function $o(o){return o.map(t=>El(t))}const xl={key:0,class:"classify-wrap"},Bl=R({__name:"FormLayout",props:{layout:Object,fields:Array},setup(o){const t=o,n=e.computed(()=>{var a;if(t.layout.length==0){if(((a=t.fields)==null?void 0:a.filter(d=>{var f;return!((f=d.code)!=null&&f.includes("classify"))}).length)<=6){const d=s(t.fields,1);return $o(d)}console.log(t.fields);const c=s(t.fields,2);return $o(c)}return t.layout});function r(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){var f;const c=a.map(u=>u.code),d=[];if(i==2)for(let u=0;u<c.length;u+=i)c[u].includes("classify")?(d.push([c[u]]),c.splice(c[u].includes("classify")?u:u+1,1),u-=i):(f=c[u+1])!=null&&f.includes("classify")?(d.push([c[u]]),d.push([c[u+1]])):d.push(c.slice(u,u+i));else for(let u=0;u<c.length;u+=i)d.push(c.slice(u,u+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>{var f,u,p;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(f=r(d.field))!=null&&f.wholeRow?24:((u=c.cols)==null?void 0:u.length)==1&&!((p=d.field)!=null&&p.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var g,B;return[(g=d.field)!=null&&g.includes("classify")&&((B=r(d.field))!=null&&B.label)?(e.openBlock(),e.createElementBlock("div",xl,e.toDisplayString(r(d.field).label),1)):e.renderSlot(a.$slots,"default",{key:1,field:r(d.field)},void 0,!0)]}),_:2},1032,["span"])}),256))]),_:2},1024))),256))]))}},[["__scopeId","data-v-285a71e5"]]),Sl={style:{width:"100%"}},Cl={class:"footer"},$l={key:1},Vl=R({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.ref(!1),i=o,c=$o(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},f=e.reactive({...i.data}),u=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,V)=>(E[V.code]=y(V.rules),E),{}),g=e.computed(S),B=e.computed(()=>i.config.fields.filter(E=>{const V=E.editable(f,r),O=E.visible(f,r);return E.disabled=O&&!V,V||O}));function y(E){return typeof E=="object"?E:typeof E=="function"?E(f):[]}function m(E){a.value=!0,s("submit",E,f,()=>{a.value=!1})}async function x(){await u.value.validate(async(E,V)=>{var G,K;if(!E)return console.log("error submit!",V),!1;const O=(G=i.config.fields.find(re=>["images","attachments","attachment"].includes(re.type)))==null?void 0:G.code,I={...f};if(O&&(I[O]=(K=I[O])==null?void 0:K.map(re=>re.id)),i.config.submitConfirm){await i.config.submitConfirm(I)&&m(I);return}m(I)})}function k(){s("remove",f)}function _(){if(i.config.removeConfirm){i.config.removeConfirm(f,k);return}w.ElMessageBox.confirm(i.config.delText,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{k()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(r,f):!0}return e.watch(()=>({...f}),(E,V)=>{const I=Object.keys(E).filter(K=>V[K]!==E[K]).map(K=>{var re;return(re=u.value)==null||re.clearValidate(K),{field:K,newValue:E[K],oldValue:V[K]}});B.value.filter(K=>!K.disabled).forEach(K=>{K.formChange&&K.formChange(f,I)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(V=>{f[V]=E[V]})},{immediate:!0}),(E,V)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:u,model:f,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Bl,{layout:e.unref(c),fields:B.value},{default:e.withCtx(({field:O})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:O.code,label:O.label,prop:O.code},{default:e.withCtx(()=>[e.createElementVNode("div",Sl,[O!=null&&O.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.editor),{key:0,modelValue:f[O.code],"onUpdate:modelValue":I=>f[O.code]=I,field:O,disabled:O.disabled,"form-data":f,"domain-config":i.config,row:f},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${O.code}(${O.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Cl,[f.id&&!f.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",icon:e.unref(ma),plain:"",type:"danger",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1},8,["icon"])):(e.openBlock(),e.createElementBlock("div",$l)),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",icon:e.unref(el),type:"primary",loading:a.value,onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["icon","loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"]))}},[["__scopeId","data-v-52a4310f"]]);function Ol(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const Pt={getValue:Ol},Dl={style:{"font-weight":"700","font-size":"22px",color:"#333"}},Cn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:f.value})),d=e.computed(()=>a.config.fields.filter(m=>{var x;if(!((x=m.code)!=null&&x.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),f=e.ref(""),u=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`新增${a.config.name}`);function g(y,m,x){i.value=m,s("submit",y,async()=>{f.value=await Pt.getValue(),x()})}function B(y,m){s("remove",y,async()=>{f.value=await Pt.getValue(),m()})}return e.watch(()=>u,async()=>{f.value=await Pt.getValue()},{immediate:!0}),(y,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=x=>u.value=x),width:d.value,top:"20px",title:null,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3,style:{"border-radius":"12px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Dl,e.toDisplayString(p.value),1)]),default:e.withCtx(()=>[e.createVNode(Vl,{config:a.config,data:c.value,removable:a.removable,onSubmit:g,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width"]))}},Tl={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object},formStyleConfig:{type:Object}},setup(o){const t=o,n=e.ref(t.row),r=e.ref(!1),s=e.shallowRef(null),a=U.useRoute(),i=Y(a),c=e.computed(()=>{const p=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},...p}}),d=da("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:c.value});Promise.all(d.fields).then(p=>{d.fields=p,d.restRepeat=t.restRepeat,d.rest=t.rest,d.formStyleConfig=c.value,s.value=d});async function f(){const p=t.rest;if(p!=null&&p.getOne){const{data:g}=await p.getOne({...t.row,...i});n.value=g}r.value=!0}function u(p,g){t.onSubmit(p,g).then(()=>{r.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),g()})}return(p,g)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),r.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=B=>r.value=B),title:t.text,config:s.value,data:n.value,onSubmit:u},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Nl={class:"not-found"},fe=R({__name:"EmptyTip",props:{text:{type:String,default:"--"}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("span",Nl,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-765bd99b"]]),ba={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ff)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(u){let p=-1;u.id&&(p=i.value.findIndex(g=>g.id===u.id)),u.url&&(p=i.value.findIndex(g=>g.url===u.url)),p>=0&&(i.value.splice(p,1),s("update:modelValue",i.value))}function f(u){console.log(u),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,u).then(p=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const g=c(p.data);i.value=i.value?[...i.value,g]:[g],s("update:modelValue",i.value)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:f,onOnRemove:d},null,8,["images","props"])]))}},Fe=De.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(o){o&&(this.mode=o)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),kt=(o,t,n,r)=>De.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Fl(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Vo(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Vo(o,t,this.filters)}}});function Fl(o,t,n,r,s){let i={...Al(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Vo(o,t,i)}function Al(o,t,n){const r=`filters---${t}---${o}`;let s={};return localStorage.getItem(r)&&(s=JSON.parse(localStorage.getItem(r))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Vo(o,t,n){const r=`filters---${t}---${o}`,s=jl(n);return localStorage.setItem(r,JSON.stringify(s)),s}function jl(o){return Object.keys(o).filter(t=>o[t]!==null&&o[t]!==void 0&&o[t]!=="").reduce((t,n)=>(t[n]=o[n],t),{})}const Rl={class:"sorters-box"},Il=["onClick"],Ml={class:"sorters-label"},Ll={class:"sorters-arrow-box"},Ul=["onClick"],zl=["onClick"],Hl=R({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(o,{emit:t}){const n=t,r=o,s=e.ref([]);async function a(){typeof r.sorters.sortersList=="function"?s.value=await r.sorters.sortersList():s.value=r.sorters.sortersList}a(),e.watch(()=>r.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(r.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let u=0;u<r.value.length;u++){const p=r.value[u];f.field===p.field&&(f.order=p.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const u=s.value;f?u[d].order=f:u[d].order?u[d].order==="ASC"?u[d].order="DESC":u[d].order==="DESC"&&(u[d].order=""):u[d].order="ASC",n("updateSorters",u.filter(p=>p.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:g=>c(p,"")},[e.createElementVNode("div",Ml,e.toDisplayString(u.name),1),e.createElementVNode("div",Ll,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",u.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(g=>c(p,"ASC"),["stop"])},null,10,Ul),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",u.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(g=>c(p,"DESC"),["stop"])},null,10,zl)])],8,Il))),256))]))}},[["__scopeId","data-v-9eb39193"]]),Pl={class:"ranges-box"},ql={class:"range-item"},Wl={class:"range-label"},Gl={class:"range-input-box"},Ql=R({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive(r.ranges.rangesList);e.watch(()=>r.value,()=>{a()});function a(){r.value&&r.value.length>0?s.forEach(c=>{r.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,f){const u=[...s];u.forEach(p=>{p.field===d&&(p[f]=c)}),n("updateRanges",u.filter(p=>p.min||p.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",ql,[e.createElementVNode("div",Wl,e.toDisplayString(f.name),1),e.createElementVNode("div",Gl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":u=>f.min=u,"controls-position":"right",class:"input-box",onChange:u=>{i(u,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":u=>f.max=u,"controls-position":"right",class:"input-box",type:"number",onChange:u=>{i(u,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-852a7796"]]),Yl={key:0},Kl=R({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=U.useRoute(),s=Y(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=kt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((_,S)=>{S.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(E=>{i[E]=void 0}),i.isDeleted=S.filters.isDeleted)});function f(_){return typeof _=="boolean"?_:typeof _=="function"?_(s):!0}async function u(_,S){var E;if(typeof _.options=="function")c[_.code]=await _.options(i,s,S);else if(Array.isArray(_.options))c[_.code]=_.options;else if(typeof _.options=="object"){const V=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(!S&&Array.isArray(i[_.code])&&i[_.code].length>0)c[_.code]=[],i[_.code].forEach(O=>{V.getOne({id:O}).then(I=>{c[_.code].push({code:I.data[_.options.data.value]||I.data.id,name:I.data[_.options.data.label]||I.data.name})})});else if(!S&&!Array.isArray(i[_.code])&&i[_.code])V.getOne({id:i[_.code]}).then(O=>{c[_.code]=[{code:O.data[_.options.data.value]||O.data.id,name:O.data[_.options.data.label]||O.data.name}]});else{const O=_.options.query.keyWord.toString(),I=_.options.method?_.options.method:"getList";_.options.url[I]({..._.options.query,[O]:S}).then(G=>{c[_.code]=G.data.rows.map(K=>({code:K[_.options.data.value]||K.id,name:K[_.options.data.label]||K.name}))})}}if(c[_.code]&&_.type!="tree-select"){const V=c[_.code].map(O=>O.code);i[_.code]&&(_.multiple?i[_.code]=i[_.code].filter(O=>(console.log(V.includes(O)),V.includes(O))):i[_.code]=(E=c[_.code].find(O=>O.code==i[_.code]))==null?void 0:E.code,x())}}function p(_){if(_.remote)return S=>{u(_,S)}}function g(_){i.sorters=_,x()}function B(_){i.filters=_}function y(){Object.keys(i).forEach(_=>{i[_]=void 0}),a.value=Object.keys(t.settings.filters).filter(_=>f(t.settings.filters[_].visible)).map(_=>{const S={...t.settings.filters[_],code:_};return i[_]=m(_),(S.type==="select"||S.type==="selectV2"||S.type==="tree"||S.type==="tree-select")&&u(S),{...S,dateType:S.dateType||"datetimerange",format:S.format||"YYYY-MM-DD HH:mm:ss"}}).filter(_=>_.code!=="isDeleted")}function m(_){const S=t.settings.filters[_],E=d.validFilters[_];return S.type==="boolean"&&typeof E!="boolean"?S.value:E}function x(){let _=JSON.parse(JSON.stringify(i));const S=t.settings.filterHook;S!=null&&S.preSubmit&&(_=S.preSubmit(_,s)),_!==!1&&d.change(_)}function k(){d.$reset({}),y(),x()}return e.watch(()=>t.settings,()=>{y(),x()},{immediate:!0}),e.watch(()=>({...i}),(_,S)=>{const V=Object.keys(_).filter(O=>S[O]!==_[O]).map(O=>({field:O,newValue:_[O],oldValue:S[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,V)})}),(_,S)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(e.unref(w.ElForm),{model:i,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[E.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",placeholder:`是否${E.name}`,"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${E.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${E.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:E.name,multiple:E.multiple,"collapse-tags":"",class:e.normalizeClass(E.multiple?"tags-selects-input":""),"multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c[E.code],V=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:V.code,label:V.name,value:V.code,title:V.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):E.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",options:c[E.code]?c[E.code]:[],props:{label:"name",value:"code"},multiple:E.multiple,placeholder:E.name,clearable:"","value-on-clear":null,onChange:x},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(Hl,{key:3,value:i[E.code],sorters:E,onUpdateSorters:g},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(Ql,{key:4,value:i[E.code],ranges:E,onUpdateRanges:B},null,8,["value","ranges"])):E.type==="tree-select"?(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{key:5,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,placeholder:E.name,data:c[E.code],props:n,"node-key":"id",multiple:E.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"","check-strictly":E.checkStrictly,remote:"","show-checkbox":"",filterable:"","collapse-tags":"","multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),onCheck:x,onChange:x},null,8,["modelValue","onUpdate:modelValue","placeholder","data","multiple","check-strictly","multiple-limit","remote-method"])):E.type==="date"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:7,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:8,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:E.dateType,format:E.format,"value-format":E.format,"start-placeholder":E.name,"end-placeholder":E.name,placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:9,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,modelModifiers:{trim:!0},placeholder:E.name,type:E.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),a.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{icon:e.unref(ml),type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1},8,["icon"]),e.createVNode(e.unref(w.ElButton),{icon:e.unref(pl),onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1},8,["icon"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-5c926745"]]),Jl={class:"data-page-title"},Xl={class:"title"},Zl={class:"data-page-toolbar"},vl={key:0,class:"show-detail-info"},ec=R({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=e.ref([]),r=t.tableName?t.tableName:t.settings.name,s=U.useRoute(),a=Y(s),i=Fe(),c=kt(t.settings.code,s.path,t.settings.filters,t.settings.filterHook)(),d=e.useSlots(),f=e.computed(()=>c.validFilters.isDeleted||!1),u=e.computed(()=>t.settings.displayMode.normalMode);function p(){c.$reset({isDeleted:!f.value})}async function g(){var x,k;const y=`table-view-${s.path}-${t.settings.code}`,m=localStorage.getItem(y)?localStorage.getItem(y):u.value;if(i.change(m),(x=t.settings)!=null&&x.showDetailInfo){const _=(k=t.settings)==null?void 0:k.showDetailInfo;n.value=await _(a)}}function B(y){i.change(y);const m=`table-view-${s.path}-${t.settings.code}`;localStorage.setItem(m,i.mode)}return e.onMounted(g),(y,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Xl,e.toDisplayString(f.value?`已删除的${e.unref(r)}`:e.unref(r)),1),e.createElementVNode("div",Zl,[e.unref(d).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:B},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(w.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Mi))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(w.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"deleted",onClick:p},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(f.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),n.value.length?(e.openBlock(),e.createElementBlock("div",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElTag),{key:x.auditStatus,type:x.type,effect:"dark",class:"show-detail-info-item"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name)+": "+e.toDisplayString(x.num),1)]),_:2},1032,["type"]))),128))])):e.createCommentVNode("",!0),e.createVNode(Kl,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-a67d4553"]]),tc={class:"kst-field-row-id"},nc={key:0},oc={key:1,class:"mono-data"},rc={key:1},wa=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=e.useSlots(),n=U.useRoute(),r=o,s=n.meta.side,a=e.computed(()=>r.row[r.field.code]),i=e.computed(()=>({path:`/${s}/${r.field.domain}/${a.value}`,query:{...Y(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,Y(n))}return(d,f)=>{const u=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",tc,[a.value?(e.openBlock(),e.createElementBlock("span",nc,[c()?(e.openBlock(),e.createBlock(u,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(a.value),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",oc,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",rc," NO ID "))])}}},[["__scopeId","data-v-f68a9cd4"]]);function ac(o){w.ElMessage(o)}const sc={show:ac},ka=10,$n=De.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ka&&(this.history=this.history.slice(2-ka),this.history.unshift(this.root)),this.history.push({title:o,code:t,path:n}))},setupRootPath(o,t){this.root={title:o,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(o){this.history=this.history.filter(t=>t.code!=o)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(o,t){const n=this.history.find(r=>r.code==o);n&&(n.title=t)}}}),Oo={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(o){var y;const t=$n(),n=Fe(),r=U.useRoute(),s=U.useRouter(),a=Y(r),i=o,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var m,x;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((x=i.operations)!=null&&x.removable)}),u=e.ref((y=i.operations)==null?void 0:y.removable);async function p(){const m=i.settings.formHook,x=i.settings.btnVisible,k=i.settings.rest,{data:_}=await k.getOne({...i.row,...a});c.value=_,m.setupUpdate&&(c.value=await m.setupUpdate(c.value,a)),x.showRemove&&(u.value=x.showRemove(c.value)),d.value=!0}function g(m,x){const k=i.settings.formHook,_=i.settings.rest;Object.keys(a).forEach(S=>{m[S]=a[S]}),k!=null&&k.preUpdateSubmit&&(m=k.preUpdateSubmit(m)),_.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{x()})}function B(m,x){i.settings.rest.remove(m).then(()=>{sc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(_=>{r.fullPath.includes(_.path)&&(t.remove(_.code),s.back())}),n.fireRemoved()}).catch(()=>{x()})}return(m,x)=>f.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Zi),type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=k=>d.value=k),config:i.settings,data:c.value,removable:u.value,onSubmit:g,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},ic=o=>(e.pushScopeId("data-v-af19c26f"),o=o(),e.popScopeId(),o),lc={class:"data-grid-wrapper"},cc={key:0,class:"cover"},dc=ic(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),uc={class:"header"},fc={key:0},pc={class:"key"},hc={class:"value"},mc={key:1,class:"footer tools"},gc=R({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=U.useRoute(),n=Y(t),r=e.useSlots(),s=o,a=kt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=De.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),f=e.shallowRef(null),u=e.ref(!1);async function p(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{p().then(k=>{u.value=k})});const g=e.computed(()=>{var k,_;return!!((k=s.operations)!=null&&k.updatable&&u||(_=s.operations)!=null&&_.removable&&u)}),B=e.computed(()=>s.settings.displayMode.gridWidth),y=e.computed(()=>s.settings.displayMode.heightAuto);function m(){f.value=s.settings.fields.find(k=>k.code==="id"),d.value=s.settings.fields.filter(k=>k.code===s.settings.coverField||k.code===s.settings.nameField||k.code==="id"?!1:k.showInList(n,c.value))}function x(k){return s.settings.nameField?k[s.settings.nameField]:k.name?k.name:`${k.id}`}return e.watch(i,k=>{c.value=k,m()}),m(),(k,_)=>(e.openBlock(),e.createElementBlock("div",lc,[o.data.length===0?(e.openBlock(),e.createBlock(e.unref(w.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(w.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},span:B.value?B.value:24,xs:B.value?{}:24,sm:B.value?{}:12,md:B.value?{}:8,lg:B.value?{}:6,xl:B.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(r).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",cc,[e.unref(r).cover?e.renderSlot(k.$slots,"cover",{key:0,row:S},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:S[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[dc]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",uc,[e.createVNode(wa,{field:f.value,row:S},e.createSlots({_:2},[S[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(S)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(y.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",fc,[e.renderSlot(k.$slots,"body",{row:S},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,E=>(e.openBlock(),e.createElementBlock("div",{key:E.code,class:"field mono-data"},[e.createElementVNode("div",pc,e.toDisplayString(E.label)+" ",1),e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:S,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||g.value?(e.openBlock(),e.createElementBlock("div",mc,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"actions",{row:S},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:S,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-af19c26f"]]);function _c(o,t){const n=o.fields.map(s=>s.code),r=Object.keys(t);n.forEach(s=>{r.includes(s)||console.error(`${o.code}.${s} : 与服务端数据不匹配`)})}const yc=o=>(e.pushScopeId("data-v-e559c7b6"),o=o(),e.popScopeId(),o),bc={class:"empty-box"},wc=yc(()=>e.createElementVNode("div",{class:"empty-text"},"暂无数据",-1)),Ea=R({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.useSlots(),i=o,c={background:"#F3F6F9",color:"#303133"},d=kt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:f}=De.storeToRefs(d),u=e.ref(f.value),p=e.shallowRef([]),g=e.ref(!1);async function B(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{B().then(S=>{g.value=S})});const y=e.computed(()=>{var S,E;return!!((S=i.operations)!=null&&S.updatable&&g.value||(E=i.operations)!=null&&E.removable&&g.value)});function m(S){s("sort-column",S)}function x(S){s("enable-item",S)}function k(){var E,V;const S=[...i.settings.fields];if((E=i.settings)!=null&&E.extendTableColumnfields){const O=i.settings.extendTableColumnfields((V=i.data)==null?void 0:V[0]);S.push(...O)}p.value=S.filter(O=>O.showInList(r,u.value))}function _(S){s("select-change",{routeQuery:r,data:S})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(_c(i.settings,i.data[0]),k())}),e.watch(f,S=>{u.value=S,k()}),(S,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","header-cell-style":c,"row-key":"id",onSelectionChange:_,onSortChange:m},{empty:e.withCtx(()=>[e.createElementVNode("div",bc,[e.createVNode(e.unref(w.ElEmpty),{class:"empty-img",description:" ",image:"https://bloodcare-1251596343.cos.ap-shanghai.myqcloud.com/assets/empty/empty-web.png","image-size":"400"}),wc])]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,V=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:V.code,label:V.label,width:V.width,prop:V.code,sortable:V.sortable?"custom":!1,fixed:V.fixed},e.createSlots({_:2},[V.type==="switch"?{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{field:V,row:O,mode:"list",onEnable:x},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{key:O.updatedAt,field:V,row:O,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"actions",{row:V},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:V,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-e559c7b6"]]),kc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Fe();t.$reset();const{mode:n}=De.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(Ea);function i(c){c=="grid"?a.value=gc:a.value=Ea}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(r),(f,u)=>({name:u,fn:e.withCtx(p=>[e.renderSlot(c.$slots,u,e.normalizeProps(e.guardReactiveProps(p||{})))])}))]),1040))}},Ec={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){const t=Fe(),n=U.useRoute(),r=Y(n),s=o,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var p;return await((p=s.operations)==null?void 0:p.creatable)}e.watchEffect(()=>{d().then(p=>{c.value=p})});async function f(){const p=s.settings.formHook,g=s.settings.fields.reduce((B,y)=>(B[y.code]=y.default,B),{});a.value=g,p.setupCreate&&(a.value=await p.setupCreate(a.value,r)),i.value=!0}function u(p,g){const B=s.settings.formHook,y=s.settings.rest;Object.keys(r).forEach(m=>{p[m]=r[m]}),B!=null&&B.preCreateSubmit&&(p=B.preCreateSubmit(p)),y.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{g()})}return(p,g)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Hi),type:"success",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 新增 "),i.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=B=>i.value=B),config:s.settings,data:a.value,removable:!1,onSubmit:u},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},xa={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=U.useRouter(),n=Fe(),r=o,s=e.shallowRef([]);let a="";async function i(d,f){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,f);return}const u=await Pt.getValue();try{await d.action({...f,...r.query,idempotentToken:u}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.isVisible(r.row,r.query,r.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{key:0,row:o.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:u.type?u.type:"primary",onClick:p=>i(u,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},xc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Fe(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var u,p;return((p=(u=n.tableDataSelect)==null?void 0:u.data)==null?void 0:p.length)>0});e.ref(!1),e.watch(()=>n.filterForm,u=>{s.value=u});const c=e.ref(!1);async function d(u){c.value=!0;const p=await Pt.getValue();try{await u.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:p}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function f(u){return typeof f=="boolean"?u:typeof u=="function"?u(s.value,r):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(u,p)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f(g.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.component),{key:0,item:g,settings:o.settings,query:e.unref(r),"table-data-select":o.tableDataSelect,"filter-form":o.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):g.tooltip&&g.tooltip.content?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:1,effect:g.tooltip.effect||"dark",content:g.tooltip.content||"default tip",placement:g.tooltip.placement||"top-start"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"])]),_:2},1032,["effect","content","placement"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},Bc={class:"pagination-wrapper"},Sc=R({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(o,{emit:t}){const n=t,r=U.useRouter(),s=U.useRoute(),a=o,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,g=>{d.value=g}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function u(g){i.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function p(g){c.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(g,B)=>(e.openBlock(),e.createElementBlock("div",Bc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":f.value,total:d.value,"current-page":o.page,layout:"->,total,sizes, prev, pager, next, jumper",onCurrentChange:u,onSizeChange:p},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-5542d11e"]]);var Ba;const Sa=typeof window<"u";Sa&&((Ba=window==null?void 0:window.navigator)!=null&&Ba.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Cc(o){return typeof o=="function"?o():e.unref(o)}function $c(o){return o}function Vc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function Oc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function Dc(o){var t;const n=Cc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const Tc=Sa?window:void 0;function Nc(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),Oc(r,t),n}const Ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Ca[$a]=Ca[$a]||{};var Va=Object.getOwnPropertySymbols,Fc=Object.prototype.hasOwnProperty,Ac=Object.prototype.propertyIsEnumerable,jc=(o,t)=>{var n={};for(var r in o)Fc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Va)for(var r of Va(o))t.indexOf(r)<0&&Ac.call(o,r)&&(n[r]=o[r]);return n};function Oa(o,t,n={}){const r=n,{window:s=Tc}=r,a=jc(r,["window"]);let i;const c=Nc(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Dc(o),p=>{d(),c.value&&s&&p&&(i=new ResizeObserver(t),i.observe(p,a))},{immediate:!0,flush:"post"}),u=()=>{d(),f()};return Vc(u),{isSupported:c,stop:u}}var Da;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Da||(Da={}));var Rc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ic=Object.prototype.hasOwnProperty,Mc=Object.prototype.propertyIsEnumerable,Na=(o,t,n)=>t in o?Rc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Lc=(o,t)=>{for(var n in t||(t={}))Ic.call(t,n)&&Na(o,n,t[n]);if(Ta)for(var n of Ta(t))Mc.call(t,n)&&Na(o,n,t[n]);return o};Lc({linear:$c},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Do=R({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,Bt;e.useCssVars(z=>({f471d0ac:Pe.value}));const t=U.useRoute(),n=Y(t),r=o,s=kt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=De.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,z=>{_.value=z,G()});const c=Fe(),{created:d,updated:f,removed:u}=De.storeToRefs(c);e.watch([d,f,u],([z,Z,M])=>{(z||Z||M)&&G()});const p=e.ref(!0),g=e.ref([]),B=e.ref(0),y=e.ref({}),m=e.ref({}),x=e.ref(null),k=e.ref(null),_=e.ref({}),S=e.ref(parseInt(t.query.pageSize)||30),E=e.ref(parseInt(t.query.page)||1),V=(Bt=r.hasMany)==null?void 0:Bt.tableContentHeight;function O(z){let Z=null;if(z.order==="ascending"?Z="ASC":z.order==="descending"&&(Z="DESC"),_.value.sorters){let M=[];_.value.sorters.some(we=>we.field===z.prop)?_.value.sorters.forEach(we=>{we.field===z.prop&&(we.order=Z,we.name||M.push(we)),we.name&&M.push(we)}):M=[..._.value.sorters,{field:z.prop,order:Z}],_.value.sorters=M}else _.value.sorters=[{field:z.prop,order:Z}];G()}function I(){m.value=r.settings.operations(n)}function G(z){p.value=!0,z=="again"&&(E.value=E.value-1<1?1:E.value-1);const Z={..._.value,...n,...r.query,page:E.value,size:S.value};r.settings.rest.getList(Z).then(M=>{y.value.data=[],g.value=M.data.rows,B.value=M.data.count,p.value=!1,B.value&&g.value.length==0&&G("again")})}function K(z){E.value=z.page,S.value=z.size,G()}function re(z){const Z={id:z.id,enable:!z.enable};r.settings.rest.enable(Z).then(()=>{G()})}function D(z){if(z.enable){const Z=z.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${Z}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{re(z)}).catch(()=>{})}else re(z)}function L(z){y.value=z}const X=e.ref(0),Se=e.ref(0);Oa(x,z=>{var Z;X.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0}),Oa(k,z=>{var Z;Se.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0});const Pe=e.computed(()=>V&&B.value>0?`${V-14}px`:`calc(100% - ${X.value+Se.value+14}px)`);return I(),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"},class:"aa"},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x,class:"header-wrap"},[e.createVNode(ec,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(xc,{settings:r.settings,"table-data-select":y.value,query:e.unref(n),"filter-form":_.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(Ec,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(kc,{class:"data-table-box",data:g.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:D,onSelectChange:L},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:M})=>[e.createVNode(xa,{mode:"list",row:M,settings:r.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(w.vLoading),p.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:k},[e.createVNode(Sc,{page:E.value,size:S.value,total:B.value,onPageChange:K},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-a69d8019"]]);/*! Element Plus v2.11.2 */var Uc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const zc={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(o){const t=o,n=e.computed(()=>t.content?t.content.toString():"");return(r,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(w.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}},Hc={class:"header-box"},Pc={class:"header-box-left"},qc={class:"page-title"},Wc={class:"tabs-container"},Gc={class:"user-profile"},Qc=R({__name:"HeaderMenu",props:{config:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=$n(),s=e.ref("首页"),a=o,i=n.fullPath.split("/")[1],c=B();r.setupRootPath("首页",`/${i}/home`);function d(y){var S,E;const m=y.meta.side,x=y.params.domain;let k=(S=y.meta)==null?void 0:S.title,_=(E=y.meta)==null?void 0:E.code;if(m&&x){k=So()[m][y.params.domain].name,_=y.params.domain;const V=y.params.id;V&&V!="detail"&&(k=`${k} - ${y.params.id}`,_=`${y.params.domain}-${y.params.id}`)}else{const V=c.find(O=>O.route===y.path);V&&(k=V.title,_=V.route)}k&&_&&(r.push(k,_,y.fullPath),s.value=_)}function f(y){const m=r.history.find(x=>x.code==y.props.name);t.push(m.path)}function u(y){if(r.remove(y),y==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const p=(y,m)=>{const x=r.history.length;return y===0&&m==="self"||y<2&&m==="left"||y===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function g(y,m){const x=[],k=r.history;switch(m){case"self":x.push(k[y].code);break;case"left":for(let _=0;_<y;_++)_!==0&&x.push(k[_].code);break;case"right":for(let _=y+1;_<k.length;_++)x.push(k[_].code);break;case"all":for(let _=0;_<k.length;_++)_!==0&&x.push(k[_].code);break;case"other":for(let _=1;_<k.length;_++)_!==y&&x.push(k[_].code);break}for(let _=0;_<x.length;_++)u(x[_])}function B(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,m)=>(e.openBlock(),e.createElementBlock("div",Hc,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",qc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Wc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:f,onTabRemove:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(x,k)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[p(k,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:_=>g(k,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:_=>g(k,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:_=>g(k,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Gi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:_=>g(k,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(al))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:_=>g(k,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(zc,{content:x.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Gc,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-325547cd"]]),Yc=o=>(e.pushScopeId("data-v-0d17ba7a"),o=o(),e.popScopeId(),o),Kc={key:2,class:"dot-wrapper"},Jc=[Yc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Fa=R({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(o){const t=o;return(n,r)=>o.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:o.data.title},{title:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data.children,s=>(e.openBlock(),e.createBlock(Fa,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:o.data.route,route:o.data.route,class:"menu-item"},{default:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Kc,Jc)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-0d17ba7a"]]),Xc=R({__name:"SideBar",props:{sideMenus:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=e.ref(n.fullPath),s=o,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;n.params.id=="detail"?r.value=`/${d}/${n.params.domain}/detail`:r.value=`/${d}/${n.params.domain}/list`}else r.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),{"wrap-class":"scrollbar-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":r.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(Fa,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-c309dc86"]]),Zc=R({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(o){const t=U.useRoute(),n=o,r={...et(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(w.ElConfigProvider),{locale:e.unref(Uc)},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Qc,{config:r},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(w.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>{var d;return[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Xc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:e.normalizeClass(["page-content-main",(d=e.unref(t).fullPath)!=null&&d.includes("/list")?"list-main":""])},{default:e.withCtx(()=>[e.unref(t).params.domain?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(({Component:f,route:u})=>[e.createVNode(e.Transition,{name:"KxtFade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{key:s.value}))]),_:2},1024)]),_:1})):(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1},8,["class"])]}),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-7ead3030"]]),vc={key:1,class:"loading-wrapper"},Aa=R({__name:"List",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return Ht(r,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(Do,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",vc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-34bb8e6d"]]),ed={key:0},td={class:"key"},nd={class:"value"},od={style:{color:"#111","font-size":"14px","font-weight":"500"}},rd={key:1,class:"loading-wrapper"},ja=R({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute(),a=Y(s),i=Fe(),{updated:c}=De.storeToRefs(i),d=e.ref(null),f=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.ref([]),p=e.computed(()=>[...r.settings.fields.filter(S=>S.showInDetail(d.value,{...a,...r.query})),...u.value]),g=e.computed(()=>p.value.find(k=>k.code===r.settings.coverField)),B=e.computed(()=>p.value.filter(k=>!f.includes(k.type)&&!k.extendDetail)),y=e.computed(()=>{var _;const k=(_=g.value)==null?void 0:_.code;return p.value.filter(S=>f.includes(S.type)||S.extendDetail).filter(S=>S.code!==k)}),m=e.computed({get(){return y.value.map(k=>k.code)},set(k){}});async function x(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,k.data.custumFileds?Promise.all(Sn(k.data.custumFileds,"form-management-result")).then(_=>{u.value=_}):u.value=[],d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{x()},{immediate:!0}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value.display),{field:g.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:g.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:S.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>{var E;return[e.createElementVNode("div",td,e.toDisplayString(S.label),1),e.createElementVNode("div",nd,[S.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):S.display?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{key:2,field:S,row:d.value,mode:"description"},null,8,["field","row"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((E=d.value[S.code])==null?void 0:E.toString()),1)],64))])]}),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),y.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:m.value,"onUpdate:modelValue":_[0]||(_[0]=S=>m.value=S),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:null,name:S.code,class:"mono-data"},{title:e.withCtx(()=>[e.createElementVNode("span",od,e.toDisplayString(S.label),1)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",rd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-38f9a185"]]),ad={key:0},sd={class:"group-item-head"},id={class:"key"},ld={class:"value"},cd={key:1,class:"loading-wrapper"},dd=R({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute();Y(s);const a=Fe(),{updated:i}=De.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],f=e.computed(()=>{var p,g;return((g=(p=r.settings)==null?void 0:p.detailGroupFields)==null?void 0:g.map(B=>{var m,x,k,_;const y=((x=(m=B==null?void 0:B.childrenFields)==null?void 0:m.filter(S=>d.includes(S.type)||S.extendDetail))==null?void 0:x.filter(S=>S.code!==(B==null?void 0:B.coverField)))||[];return{...B,coverField:(k=B==null?void 0:B.childrenFields)==null?void 0:k.find(S=>S.code===B.coverField),detailFields:(_=B==null?void 0:B.childrenFields)==null?void 0:_.filter(S=>!d.includes(S.type)&&!S.extendDetail),extendFields:y,activeFields:(y==null?void 0:y.map(S=>S.code))||[]}}))||[]});function u(){r.settings.rest.getOne(r.query).then(p=>{p.data.isDeleted=!!p.data.deletedAt,c.value=p.data,n("done",p.data)})}return e.watch(i,()=>{u()},{immediate:!0}),(p,g)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${B.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[B.coverField?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.coverField.display),{field:B.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:B.coverField?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.detailFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:y.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",id,e.toDisplayString(y.label),1),e.createElementVNode("div",ld,[y.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{key:1,field:y,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),B&&B.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:B.activeFields,"onUpdate:modelValue":y=>B.activeFields=y,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.extendFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:y.label,name:y.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{field:y,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[B.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",sd,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",cd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-efd9932c"]]),ud={class:"data-page-title"},fd={class:"title"},pd=R({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(o,{emit:t}){$n();const n=U.useRoute(),r=Y(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const f=s.settings;if(f.displayMode.normalMode=="detail")a.value=`${f.name}`;else{const p=`${f.formatName(d)}`;a.value=p?`${f.name}:${p}`:`${f.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,f)=>(e.openBlock(),e.createElementBlock("div",ud,[e.createElementVNode("div",fd,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(xa,{row:s.data,settings:s.settings,query:e.unref(r),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(r),"detail")?(e.openBlock(),e.createBlock(Oo,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-789f7fa7"]]),hd=R({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=Y(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(f){a.value=f.props.name,t.push({name:`${n.meta.side}-association`,params:{association:f.props.name},query:r})}function d(f){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const u=s.associations.find(p=>p.domain===n.params.association);i.value={...u,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},f&&f()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:r})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(f,u)=>{const p=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElTabs),{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=g=>a.value=g),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,g=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:g.name,name:g.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(p,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bb704011"]]),md={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(o){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.associations,r=>(e.openBlock(),e.createElementBlock("div",null,[r.type=="has-many"?(e.openBlock(),e.createBlock(Aa,{key:0,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0),r.type=="has-one"?(e.openBlock(),e.createBlock(Ra,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},gd=R({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){U.useRouter();const t=U.useRoute(),n=Y(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,f;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(pd,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(f=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&f.length?(e.openBlock(),e.createBlock(dd,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(ja,{key:1,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])),r.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(hd,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(md,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-f928d31a"]]),_d={key:0,class:"detail"},yd={key:2,class:"loading-wrapper"},Ra=R({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=Y(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);Ht(s,a).then(f=>{const u=f,p=d("has-many",u.hasMany(r)),g=d("has-one",u.hasOne(r));i.value=u,c.value=g.concat(p)});function d(f,u){return(u||[]).map(p=>typeof p=="object"?{type:f,domain:p.code,name:p.name,tableName:p.tableName,tableContentHeight:p.tableContentHeight,query:p.query||(()=>({}))}:{type:f,domain:p,name:So()[s][p].name,query:()=>({})})}return(f,u)=>i.value&&i.value.detailComponent?(e.openBlock(),e.createElementBlock("div",_d,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value.detailComponent),{"route-query":e.unref(r)},null,8,["route-query"]))])):i.value?(e.openBlock(),e.createBlock(gd,{key:1,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",yd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-d50f54e1"]]),bd={key:0},wd={key:1,class:"loading-wrapper"},kd=R({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=U.useRoute(),n=t.meta.side,r=Y(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{Ht(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",bd,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Do,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(ja,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(r),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",wd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-fa1c18aa"]]),Ed={key:0},xd={class:"file-name"},Bd={class:"name"},Sd={class:"file-type"},Cd={key:1},$d=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]);function r(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",Ed,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",xd,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",Bd,e.toDisplayString(c.name),1),e.createElementVNode("span",Sd,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>r(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(Ji))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(w.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(kl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",Cd,[e.createVNode(fe)]))}},[["__scopeId","data-v-76764c63"]]),Vd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Rf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(u){a.value=a.value?[...a.value,u]:[u]}function c(u){const p=a.value.findIndex(g=>g.id===u.id);a.value.splice(p,1)}async function d(u){const p=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(u.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await p.updateFilesName(u).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function f(u,p){if(p=="success"){i(u),r("update:modelValue",a.value);return}if(p=="remove"){c(u),r("update:modelValue",a.value);return}if(p=="change"){d(u);return}}return(u,p)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:p[0]||(p[0]=g=>f(g,"success")),onOnRemove:p[1]||(p[1]=g=>f(g,"remove")),onOnChange:p[2]||(p[2]=g=>f(g,"change"))},null,8,["pics","props"]))}};class Od extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=$d,this.editor=Vd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Od},Symbol.toStringTag,{value:"Module"})),Td={key:3},Nd=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=o,r=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${r}/${a}`,query:{...Y(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let u=null;const p=Ht(s,r).then(m=>(u=m.formatName,Promise.resolve(m.rest)));function g(m){return n.field.isRouter(n.row,Y(t))&&!Y(t)[n.field.code]}function B(){p.then(m=>{var S;c.value=!0;const x=n.row[n.field.code],k=n.row[ko(`${r}-name`)];if(!x){y(!1),c.value=!1;return}if(x&&k){y({id:x,name:k}),c.value=!1;return}if((S=n.field)!=null&&S.notGetOne){y({id:x,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const _={id:x};m.getOne(_).then(E=>{y(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function y(m){if(d.value=!1,n.field.showName){la(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=m[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){f.value=m.name;return}if(!m){d.value=!0;return}f.value=u(m)}return e.watch(()=>n.row,B,{immediate:!0}),(m,x)=>{const k=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})):d.value?(e.openBlock(),e.createBlock(fe,{key:1})):g(o.row)?(e.openBlock(),e.createBlock(k,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",Td,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-4fc1db1d"]]),Fd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class Ad extends ee{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=Nd,this.editor=Fd,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.notGetOne=t.notGetOne||!1,this.codeName=t.codeName||"",this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const jd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Rd={style:{display:"flex","align-items":"center"}},Id={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.computed(()=>t.row[t.field.code]);return(r,s)=>(e.openBlock(),e.createElementBlock("span",Rd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#2DAD28",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#FF444A",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(Ui))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#85888E",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(ul))]),_:1}))]))}},Md={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>{var d,f,u,p,g,B;return e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=y=>s.value=y),disabled:r.disabled,"active-text":((f=(d=r.field)==null?void 0:d.elConfig)==null?void 0:f.activeText)||"是","inactive-text":((p=(u=r.field)==null?void 0:u.elConfig)==null?void 0:p.inactiveText)||"否","inline-prompt":((B=(g=r.field)==null?void 0:g.elConfig)==null?void 0:B.inlinePrompt)!==!1,onChange:a},null,8,["modelValue","disabled","active-text","inactive-text","inline-prompt"])}}};class Ld extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Id,this.editor=Md,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Ld},Symbol.toStringTag,{value:"Module"})),zd={key:0},Hd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",zd,e.toDisplayString(r.value),1))]))}},Pd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}d();function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:f},null,8,["modelValue","props","options"]))}};class qd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=Hd,this.editor=Pd,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const Wd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"}));class Gd extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Qd=Object.freeze(Object.defineProperty({__proto__:null,default:Gd},Symbol.toStringTag,{value:"Module"})),Yd={key:0},Kd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Yd,e.toDisplayString(r.value),1))}},Jd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}};class Xd extends ee{constructor(t,n){super(t,n),this.display=Kd,this.editor=Jd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"})),vd={key:0},eu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",vd,e.toDisplayString(r.value),1))}},tu=R({__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}},[["__scopeId","data-v-145e36e2"]]);class nu extends ee{constructor(t,n){super(t,n),this.display=eu,this.editor=tu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:nu},Symbol.toStringTag,{value:"Module"})),Ia=o=>(e.pushScopeId("data-v-9f5b0d8a"),o=o(),e.popScopeId(),o),ru={class:"loading-error"},au=Ia(()=>e.createElementVNode("div",null,"加载失败",-1)),su={key:1,class:"loading-error"},iu=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],lu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref("");e.watch(()=>t.row,()=>{t.field.waterMark?n.value=i(t.row[t.field.code],t.field.waterMark):n.value=t.row[t.field.code]},{immediate:!0});function r(c){const d=document.createElement("canvas");return d.width=c.width,d.height=c.height,d.getContext("2d").drawImage(c,0,0),d}function s(c,d){return new Promise(f=>{const u=c.getContext("2d"),p=a(d);u.fillStyle=u.createPattern(p,"repeat"),u.fillRect(0,0,c.width,c.height),f(c.toDataURL())})}function a(c){const d=document.createElement("canvas");d.width=500,d.height=200;const f=d.getContext("2d");return f.textAlign="left",f.textBaseline="middle",f.font="26px Microsoft Yahei",f.fillStyle="rgba(0, 0, 0, 0.3)",f.rotate(-20*Math.PI/180),f.fillText(c,10,200),d}function i(c,d){const f=new Image;f.crossOrigin="Anonymous",f.src=c,f.onload=async()=>{const u=r(f),p=await s(u,d);n.value=p}}return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":[n.value],class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",ru,[au,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",su,iu))],2))}},[["__scopeId","data-v-9f5b0d8a"]]),cu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Lf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){r("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,props:s.field.props,onOnSuccess:i},null,8,["image-url","disabled","props"]))}};class du extends ee{constructor(t,n){super(t,n),this.display=lu,this.editor=cu,this.props=t.props||{},this.checkValidProperties(t)}}const uu=Object.freeze(Object.defineProperty({__proto__:null,default:du},Symbol.toStringTag,{value:"Module"})),Ma=o=>(e.pushScopeId("data-v-e4bc2c79"),o=o(),e.popScopeId(),o),fu={class:"image-card",style:{"margin-bottom":"20px"}},pu={class:"loading-error"},hu=Ma(()=>e.createElementVNode("div",null,"图片加载失败",-1)),mu={key:1,class:"loading-error"},gu=[Ma(()=>e.createElementVNode("div",null,"暂无",-1))],_u=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(r.value=s.map(a=>a.url),n.value=r.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(w.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",fu,[i.url?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",pu,[hu,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",mu,gu))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-e4bc2c79"]]);class yu extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=_u,this.editor=ba,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={key:0},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",wu,e.toDisplayString(r.value),1))}},Eu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInputNumber),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,min:r.field.min,max:r.field.max,step:r.field.step,precision:r.field.precision,"step-atrictly":r.field.stepAtrictly,onChange:a},null,8,["modelValue","disabled","min","max","step","precision","step-atrictly"]))}};class xu extends ee{constructor(t,n){super(t,n),this.display=ku,this.editor=Eu,this.min=t.min,this.max=t.max,this.step=t.step||1,this.precision=t.precision,this.stepAtrictly=t.stepAtrictly||!1,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=o,r=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{r.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(r.value=!0,s.value=a)},{immediate:!0}),(a,i)=>r.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(fe,{key:1}))}},Cu={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,r("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class $u extends ee{constructor(t,n){super(t,n),this.display=Su,this.editor=Cu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Vu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));var A=function(o,t,n){if(!t.has(o))throw new TypeError("attempted to set private field on non-instance");return t.set(o,n),n},T=function(o,t){if(!t.has(o))throw new TypeError("attempted to get private field on non-instance");return t.get(o)},tt,it,Ee,Et,qt,Ae,je,Re,Ie,Me,Le,Ue,ze,lt,xt,nt,Vn,ot;const Ou=function(o){var t=131,n=137,r=0;o+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<o.length;a++)r>s&&(r=Math.floor(r/n)),r=r*t+o.charCodeAt(a);return r},N="0123456789abcdef".split(""),Du=[-2147483648,8388608,32768,128],xe=[24,16,8,0],On=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],oe=[];class Tu{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),Et.set(this,void 0),qt.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),Ue.set(this,void 0),ze.set(this,void 0),lt.set(this,void 0),xt.set(this,void 0),nt.set(this,void 0),Vn.set(this,0),ot.set(this,void 0),this.init(t,n)}init(t,n){n?(oe[0]=oe[16]=oe[1]=oe[2]=oe[3]=oe[4]=oe[5]=oe[6]=oe[7]=oe[8]=oe[9]=oe[10]=oe[11]=oe[12]=oe[13]=oe[14]=oe[15]=0,A(this,it,oe)):A(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(A(this,Ae,3238371032),A(this,je,914150663),A(this,Re,812702999),A(this,Ie,4144912697),A(this,Me,4290775857),A(this,Le,1750603025),A(this,Ue,1694076839),A(this,ze,3204075428)):(A(this,Ae,1779033703),A(this,je,3144134277),A(this,Re,1013904242),A(this,Ie,2773480762),A(this,Me,1359893119),A(this,Le,2600822924),A(this,Ue,528734635),A(this,ze,1541459225)),A(this,tt,A(this,ot,A(this,Ee,A(this,xt,0)))),A(this,Et,A(this,lt,!1)),A(this,qt,!0),A(this,nt,t)}update(t){if(T(this,Et))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=T(this,it);for(;r<s;){let i;if(T(this,lt)&&(A(this,lt,!1),a[0]=T(this,tt),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=T(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=T(this,ot);r<s&&i<64;++r){let c=n.charCodeAt(r);c<128?a[i>>2]|=c<<xe[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++r)&1023),a[i>>2]|=(240|c>>18)<<xe[i++&3],a[i>>2]|=(128|c>>12&63)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3])}A(this,Vn,i),A(this,Ee,T(this,Ee)+(i-T(this,ot))),i>=64?(A(this,tt,a[16]),A(this,ot,i-64),this.hash(),A(this,lt,!0)):A(this,ot,i)}return T(this,Ee)>4294967295&&(A(this,xt,T(this,xt)+(T(this,Ee)/4294967296<<0)),A(this,Ee,T(this,Ee)%4294967296)),this}finalize(){if(T(this,Et))return;A(this,Et,!0);const t=T(this,it),n=T(this,Vn);t[16]=T(this,tt),t[n>>2]|=Du[n&3],A(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=T(this,xt)<<3|T(this,Ee)>>>29,t[15]=T(this,Ee)<<3,this.hash()}hash(){let t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);const f=T(this,it);let u,p,g,B,y,m,x,k,_,S;for(let E=16;E<64;++E)B=f[E-15],u=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=f[E-2],p=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,f[E]=f[E-16]+u+f[E-7]+p<<0;S=n&r;for(let E=0;E<64;E+=4)T(this,qt)?(T(this,nt)?(x=300032,B=f[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(x=704751109,B=f[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),A(this,qt,!1)):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,g=x^t&r^S,m=a&i^~a&c,B=d+p+m+On[E]+f[E],y=u+g,d=s+B<<0,s=B+y<<0),u=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),p=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),k=s&t,g=k^s&n^x,m=d&a^~d&i,B=c+p+m+On[E+1]+f[E+1],y=u+g,c=r+B<<0,r=B+y<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),_=r&s,g=_^r&t^k,m=c&d^~c&a,B=i+p+m+On[E+2]+f[E+2],y=u+g,i=n+B<<0,n=B+y<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),S=n&r,g=S^n&s^_,m=i&c^~i&d,B=a+p+m+On[E+3]+f[E+3],y=u+g,a=t+B<<0,t=B+y<<0;A(this,Ae,T(this,Ae)+t<<0),A(this,je,T(this,je)+n<<0),A(this,Re,T(this,Re)+r<<0),A(this,Ie,T(this,Ie)+s<<0),A(this,Me,T(this,Me)+a<<0),A(this,Le,T(this,Le)+i<<0),A(this,Ue,T(this,Ue)+c<<0),A(this,ze,T(this,ze)+d<<0)}hex(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);let f=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[r>>28&15]+N[r>>24&15]+N[r>>20&15]+N[r>>16&15]+N[r>>12&15]+N[r>>8&15]+N[r>>4&15]+N[r&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(f+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return T(this,nt)||f.push(d>>24&255,d>>16&255,d>>8&255,d&255),f}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,Ae)),n.setUint32(4,T(this,je)),n.setUint32(8,T(this,Re)),n.setUint32(12,T(this,Ie)),n.setUint32(16,T(this,Me)),n.setUint32(20,T(this,Le)),n.setUint32(24,T(this,Ue)),T(this,nt)||n.setUint32(28,T(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,Et=new WeakMap,qt=new WeakMap,Ae=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,Ue=new WeakMap,ze=new WeakMap,lt=new WeakMap,xt=new WeakMap,nt=new WeakMap,Vn=new WeakMap,ot=new WeakMap;function Nu(o){const t=new Tu;return t.update(o),parseInt(t.hex().substring(0,8),16)}const Fu=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},Au=function(o,t,n){o/=360;var r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;return[o+1/3,o,o-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(r-s)*6*a:a<.5?a=r:a<2/3?a=s+(r-s)*6*(2/3-a):a=s,Math.round(a*255)})};class ju{constructor(t={}){const[n,r]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=r,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=Nu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=Ou)}hsl(t){var n,r,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),r=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,r,s]}rgb(t){var n=this.hsl(t);return Au.apply(this,n)}hex(t){var n=this.rgb(t);return Fu(n)}}const Ru=new ju;function Iu(o){const t=Ru.hex(`abc${o}cba`);return Mu(t.replace("#",""),-20)}function Mu(o,t){let n=parseInt(o.substring(1,3),16),r=parseInt(o.substring(3,5),16),s=parseInt(o.substring(5,7),16);n=parseInt(n*(100+t)/100),r=parseInt(r*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,r=r<255?r:255,s=s<255?s:255,n=Math.round(n),r=Math.round(r),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const La={strToHexColor:Iu},Lu={key:0,class:"radio-fields"},Uu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u="";if(u=f.filter(p=>d===p.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",Lu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"radio-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-66131aaa"]]),zu={__name:"FieldEditor",props:{modelValue:[String,Number],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){var u;s("update:modelValue",i.value),(u=a==null?void 0:a.field)!=null&&u.change&&a.field.change(i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElRadio),{key:g.code,label:g.code,disabled:g.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"]))}};class Hu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Uu,this.editor=zu,this.checkValidProperties(t)}}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),qu={class:"editor-field"},Wu=["innerHTML"],Gu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",qu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Wu)]))}},[["__scopeId","data-v-e54b04b3"]]),Qu={style:{width:"100%"}},Yu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>tp)),r=t,s=o,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{r("update:modelValue",a.value)}),e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Qu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class Ku extends ee{constructor(t,n){super(t,n),this.display=Gu,this.editor=Yu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ju=Object.freeze(Object.defineProperty({__proto__:null,default:Ku},Symbol.toStringTag,{value:"Module"}));class Xu extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const Zu=Object.freeze(Object.defineProperty({__proto__:null,default:Xu},Symbol.toStringTag,{value:"Module"})),vu={key:0,class:"select-fields"},ef=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u=[];if(r.field.multiple?u=f.filter(p=>d.includes(p.code)):u=f.filter(p=>d===p.code),u.length===0){s.value="--",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-a4302e50"]]),tf={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:o.field.placeholder,remote:"","remote-method":d,onChange:f},e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0]),1032,["modelValue","multiple","disabled","placeholder"]))}};class nf extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=ef,this.editor=tf,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const of=Object.freeze(Object.defineProperty({__proto__:null,default:nf},Symbol.toStringTag,{value:"Module"})),rf={key:0},af={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){var c;if((c=t.field)!=null&&c.formatter){r.value=t.field.formatter(t.row),n.value=!r.value;return}const i=t.field.code.toString().split(".").reduce((d,f)=>d[f],t.row);i==null||`${i}`.trim()===""?n.value=!0:(r.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",rf,e.toDisplayString(r.value),1))}},sf={class:"annotation"},lf={class:"annotation"},cf=R({__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:o.field.type,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},e.createSlots({_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createElementVNode("div",sf,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",lf,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-449013dd"]]);class df extends ee{constructor(t,n){super(t,n),this.display=af,this.editor=cf,this.formatter=t.formatter,this.checkValidProperties(t)}}const uf=Object.freeze(Object.defineProperty({__proto__:null,default:df},Symbol.toStringTag,{value:"Module"})),ff={style:{display:"flex","align-items":"center"}},pf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(o,{emit:t}){const n=t,r=o,s=e.ref(r.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,u)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",ff,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),size:"small",disabled:!!s.value,"before-change":f=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},hf={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class mf extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=pf,this.editor=hf,this.checkValidProperties(t)}}const gf=Object.freeze(Object.defineProperty({__proto__:null,default:mf},Symbol.toStringTag,{value:"Module"})),_f={key:0},yf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",_f,e.toDisplayString(r.value),1))}},bf={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},null,8,["modelValue","disabled","placeholder"]))}};class wf extends ee{constructor(t,n){super(t,n),this.display=yf,this.editor=bf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const kf=Object.freeze(Object.defineProperty({__proto__:null,default:wf},Symbol.toStringTag,{value:"Module"})),Ef={key:0},xf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Ef,e.toDisplayString(r.value),1))}},Bf={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,format:r.field.format,"value-format":r.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Sf extends ee{constructor(t,n){super(t,n),this.display=xf,this.editor=Bf,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cf=Object.freeze(Object.defineProperty({__proto__:null,default:Sf},Symbol.toStringTag,{value:"Module"})),$f=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]),r=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],r.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,f)=>i.value?(e.openBlock(),e.createBlock(e.unref(w.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:r.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(fe,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-f3f99ac4"]]),Vf={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(g){c.value=await a.field.options(a.formData,r,g)}function u(g,B){var y;return(y=a.field)!=null&&y.useApiSearchKeyword||!g?!0:B.name.includes(g)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(g,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":B[0]||(B[0]=y=>i.value=y),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"",clearable:"","filter-node-method":u,"remote-method":f,onCheck:p,onChange:p},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Of extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.useApiSearchKeyword=t.useApiSearchKeyword||!1,this.display=$f,this.editor=Vf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Df=Object.freeze(Object.defineProperty({__proto__:null,default:Of},Symbol.toStringTag,{value:"Module"})),Tf={class:"el-upload__tip"},Nf=["src"],Ff=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*",tip:""}}}},emits:["on-remove","on-upload"],setup(o,{emit:t}){const n=t,r=e.ref(""),s=e.ref(!1),a=o,i=e.computed(()=>a.images.map(g=>{if(!(g!=null&&g.url))return{...g,name:"unknown",fileType:"unknown"};const B=g.url.substring(g.url.lastIndexOf(".")+1),y=g.url.split("/");return{...g,name:y[y.length-1],fileType:B}}));function c(g){var B,y;if(a.props.deleteParams){const m=(B=a.props.deleteParams)!=null&&B.data?(y=a.props.deleteParams)==null?void 0:y.data:{};he.remove(`${a.props.deleteParams.url}/${g.id}/attachment`,m,m).then(()=>{n("on-remove",g)})}else n("on-remove",g)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(g){r.value=g.url,s.value=!0}function u(g){return g.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function p(g){const B=new FormData;B.append("file",g.file),n("on-upload",B)}return(g,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(w.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":f,multiple:!0,"before-upload":u,"http-request":p,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},e.createSlots({default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:2},[a.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Tf,e.toDisplayString(a.props.tip),1)]),key:"0"}:void 0]),1032,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,Nf)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-b9c6d702"]])},Symbol.toStringTag,{value:"Module"})),Af=["src"],jf={class:"file-type"},Rf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(o,{emit:t}){const n=t,r=o,s=e.computed(()=>r.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const k=m.url.split("/");return{...m,name:k[k.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(k,_){return m.type.startsWith("image/")?(x.onload=async S=>{const E=new Image;E.src=S.target.result,E.onload=()=>{const V=document.createElement("canvas"),O=V.getContext("2d");V.width=E.width,V.height=E.height,O.drawImage(E,0,0,V.width,V.height),V.toBlob(I=>{const G=new File([I],m.name,{type:m.type,lastModified:Date.now()});k(G)},m.type,.5)}},!1):(k(m),!1)})},f=m=>{var x,k;if(m.status==="success")if(r.props.deleteParams){const _=(x=r.props.deleteParams)!=null&&x.data?(k=r.props.deleteParams)==null?void 0:k.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,_,_).then(()=>{n("on-remove",m)})}else n("on-remove",m)},u=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},p=m=>{a.value=m.url,i.value=!0},g=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(_=>_.size/1024/1024<5?(y(_),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(m,x){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function y(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,k)=>{const _=new FormData;_.append("file",m),v.post(c,_,{}).then(S=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",S.data.data),x(S.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),k("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:r.props.limit,accept:r.props.accept,"list-type":r.props.listType,"on-remove":f,"before-upload":g,"on-exceed":u,"on-preview":p,multiple:!0,"http-request":()=>!1,"show-file-list":r.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=r.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[r.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=k=>i.value=k)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Af)]),_:1},8,["modelValue"]),r.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:_,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:k.name,"onUpdate:modelValue":S=>k.name=S,onChange:S=>B(k)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",jf,"."+e.toDisplayString(k.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:S=>f(k)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-28b29d8a"]])},Symbol.toStringTag,{value:"Module"})),If={class:"image-slot"},Mf={class:"el-upload__tip"},Lf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImageUploader",props:{imageUrl:{type:String},props:{type:Object,default(){return{accept:"image/*",tip:""}}}},emits:["on-success"],setup(o,{emit:t}){const n=t,r=o,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=f=>{if(!(f.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=f=>{n("on-success",f.data.imageUrl)};function c(){n("on-success","")}function d(f){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((u,p)=>{const g=new FormData;g.append("image",f.file),v.post(s,g,{}).then(B=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),u(B.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),p("Upload failed")})})}return(f,u)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,accept:r.props.accept,"on-success":i,"before-upload":a,"http-request":d},e.createSlots({default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:r.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",If,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Mf,e.toDisplayString(r.props.tip),1)]),key:"0"}:void 0]),1032,["action","accept"]))}},[["__scopeId","data-v-2aeefc1e"]])},Symbol.toStringTag,{value:"Module"}));var He=-1,Be=1,me=0;function Wt(o,t,n,r){if(o===t)return o?[[me,o]]:[];if(n!=null){var s=qf(o,t,n);if(s)return s}var a=To(o,t),i=o.substring(0,a);o=o.substring(a),t=t.substring(a),a=No(o,t);var c=o.substring(o.length-a);o=o.substring(0,o.length-a),t=t.substring(0,t.length-a);var d=Uf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),za(d,r),d}function Uf(o,t){var n;if(!o)return[[Be,t]];if(!t)return[[He,o]];var r=o.length>t.length?o:t,s=o.length>t.length?t:o,a=r.indexOf(s);if(a!==-1)return n=[[Be,r.substring(0,a)],[me,s],[Be,r.substring(a+s.length)]],o.length>t.length&&(n[0][0]=n[2][0]=He),n;if(s.length===1)return[[He,o],[Be,t]];var i=Hf(o,t);if(i){var c=i[0],d=i[1],f=i[2],u=i[3],p=i[4],g=Wt(c,f),B=Wt(d,u);return g.concat([[me,p]],B)}return zf(o,t)}function zf(o,t){for(var n=o.length,r=t.length,s=Math.ceil((n+r)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),f=0;f<i;f++)c[f]=-1,d[f]=-1;c[a+1]=0,d[a+1]=0;for(var u=n-r,p=u%2!==0,g=0,B=0,y=0,m=0,x=0;x<s;x++){for(var k=-x+g;k<=x-B;k+=2){var _=a+k,S;k===-x||k!==x&&c[_-1]<c[_+1]?S=c[_+1]:S=c[_-1]+1;for(var E=S-k;S<n&&E<r&&o.charAt(S)===t.charAt(E);)S++,E++;if(c[_]=S,S>n)B+=2;else if(E>r)g+=2;else if(p){var V=a+u-k;if(V>=0&&V<i&&d[V]!==-1){var O=n-d[V];if(S>=O)return Ua(o,t,S,E)}}}for(var I=-x+y;I<=x-m;I+=2){var V=a+I,O;I===-x||I!==x&&d[V-1]<d[V+1]?O=d[V+1]:O=d[V-1]+1;for(var G=O-I;O<n&&G<r&&o.charAt(n-O-1)===t.charAt(r-G-1);)O++,G++;if(d[V]=O,O>n)m+=2;else if(G>r)y+=2;else if(!p){var _=a+u-I;if(_>=0&&_<i&&c[_]!==-1){var S=c[_],E=a+S-_;if(O=n-O,S>=O)return Ua(o,t,S,E)}}}}return[[He,o],[Be,t]]}function Ua(o,t,n,r){var s=o.substring(0,n),a=t.substring(0,r),i=o.substring(n),c=t.substring(r),d=Wt(s,a),f=Wt(i,c);return d.concat(f)}function To(o,t){if(!o||!t||o.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(a,s)==t.substring(a,s)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Ha(o.charCodeAt(s-1))&&s--,s}function No(o,t){if(!o||!t||o.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(o.length-s,o.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Pa(o.charCodeAt(o.length-s))&&s--,s}function Hf(o,t){var n=o.length>t.length?o:t,r=o.length>t.length?t:o;if(n.length<4||r.length*2<n.length)return null;function s(B,y,m){for(var x=B.substring(m,m+Math.floor(B.length/4)),k=-1,_="",S,E,V,O;(k=y.indexOf(x,k+1))!==-1;){var I=To(B.substring(m),y.substring(k)),G=No(B.substring(0,m),y.substring(0,k));_.length<G+I&&(_=y.substring(k-G,k)+y.substring(k,k+I),S=B.substring(0,m-G),E=B.substring(m+I),V=y.substring(0,k-G),O=y.substring(k+I))}return _.length*2>=B.length?[S,E,V,O,_]:null}var a=s(n,r,Math.ceil(n.length/4)),i=s(n,r,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,f,u,p;o.length>t.length?(d=c[0],f=c[1],u=c[2],p=c[3]):(u=c[0],p=c[1],d=c[2],f=c[3]);var g=c[4];return[d,f,u,p,g]}function za(o,t){o.push([me,""]);for(var n=0,r=0,s=0,a="",i="",c;n<o.length;){if(n<o.length-1&&!o[n][1]){o.splice(n,1);continue}switch(o[n][0]){case Be:s++,i+=o[n][1],n++;break;case He:r++,a+=o[n][1],n++;break;case me:var d=n-s-r-1;if(t){if(d>=0&&Wa(o[d][1])){var f=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=f+a,i=f+i,!o[d][1]){o.splice(d,1),n--;var u=d-1;o[u]&&o[u][0]===Be&&(s++,i=o[u][1]+i,u--),o[u]&&o[u][0]===He&&(r++,a=o[u][1]+a,u--),d=u}}if(qa(o[n][1])){var f=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=f,i+=f}}if(n<o.length-1&&!o[n][1]){o.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=To(i,a),c!==0&&(d>=0?o[d][1]+=i.substring(0,c):(o.splice(0,0,[me,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=No(i,a),c!==0&&(o[n][1]=i.substring(i.length-c)+o[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var p=s+r;a.length===0&&i.length===0?(o.splice(n-p,p),n=n-p):a.length===0?(o.splice(n-p,p,[Be,i]),n=n-p+1):i.length===0?(o.splice(n-p,p,[He,a]),n=n-p+1):(o.splice(n-p,p,[He,a],[Be,i]),n=n-p+2)}n!==0&&o[n-1][0]===me?(o[n-1][1]+=o[n][1],o.splice(n,1)):n++,s=0,r=0,a="",i="";break}}o[o.length-1][1]===""&&o.pop();var g=!1;for(n=1;n<o.length-1;)o[n-1][0]===me&&o[n+1][0]===me&&(o[n][1].substring(o[n][1].length-o[n-1][1].length)===o[n-1][1]?(o[n][1]=o[n-1][1]+o[n][1].substring(0,o[n][1].length-o[n-1][1].length),o[n+1][1]=o[n-1][1]+o[n+1][1],o.splice(n-1,1),g=!0):o[n][1].substring(0,o[n+1][1].length)==o[n+1][1]&&(o[n-1][1]+=o[n+1][1],o[n][1]=o[n][1].substring(o[n+1][1].length)+o[n+1][1],o.splice(n+1,1),g=!0)),n++;g&&za(o,t)}function Ha(o){return o>=55296&&o<=56319}function Pa(o){return o>=56320&&o<=57343}function qa(o){return Pa(o.charCodeAt(0))}function Wa(o){return Ha(o.charCodeAt(o.length-1))}function Pf(o){for(var t=[],n=0;n<o.length;n++)o[n][1].length>0&&t.push(o[n]);return t}function Fo(o,t,n,r){return Wa(o)||qa(r)?null:Pf([[me,o],[He,t],[Be,n],[me,r]])}function qf(o,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=o.length,i=t.length;if(r.length===0&&(s===null||s.length===0)){var c=r.index,d=o.slice(0,c),f=o.slice(c),u=s?s.index:null;e:{var p=c+i-a;if(u!==null&&u!==p||p<0||p>i)break e;var g=t.slice(0,p),B=t.slice(p);if(B!==f)break e;var y=Math.min(c,p),m=d.slice(0,y),x=g.slice(0,y);if(m!==x)break e;var k=d.slice(y),_=g.slice(y);return Fo(m,k,_,f)}e:{if(u!==null&&u!==c)break e;var S=c,g=t.slice(0,S),B=t.slice(S);if(g!==d)break e;var E=Math.min(a-S,i-S),V=f.slice(f.length-E),O=B.slice(B.length-E);if(V!==O)break e;var k=f.slice(0,f.length-E),_=B.slice(0,B.length-E);return Fo(d,k,_,V)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),V=o.slice(r.index+r.length),y=m.length,E=V.length;if(i<y+E)break e;var x=t.slice(0,y),O=t.slice(i-E);if(m!==x||V!==O)break e;var k=o.slice(y,a-E),_=t.slice(y,i-E);return Fo(m,k,_,V)}return null}function Dn(o,t,n){return Wt(o,t,n,!0)}Dn.INSERT=Be,Dn.DELETE=He,Dn.EQUAL=me;var Wf=Dn,Tn={exports:{}};Tn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",u="[object Function]",p="[object GeneratorFunction]",g="[object Map]",B="[object Number]",y="[object Object]",m="[object Promise]",x="[object RegExp]",k="[object Set]",_="[object String]",S="[object Symbol]",E="[object WeakMap]",V="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",G="[object Float64Array]",K="[object Int8Array]",re="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",Pe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Bt=/\w*$/,z=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,M={};M[a]=M[i]=M[V]=M[O]=M[c]=M[d]=M[I]=M[G]=M[K]=M[re]=M[D]=M[g]=M[B]=M[y]=M[x]=M[k]=M[_]=M[S]=M[L]=M[X]=M[Se]=M[Pe]=!0,M[f]=M[u]=M[E]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Io=typeof self=="object"&&self&&self.Object===Object&&self,Ce=we||Io||Function("return this")(),Rn=t&&!t.nodeType&&t,J=Rn&&!0&&o&&!o.nodeType&&o,In=J&&J.exports===Rn;function Mo(l,h){return l.set(h[0],h[1]),l}function $e(l,h){return l.add(h),l}function Mn(l,h){for(var b=-1,C=l?l.length:0;++b<C&&h(l[b],b,l)!==!1;);return l}function Ln(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Yt(l,h,b,C){for(var j=-1,F=l?l.length:0;++j<F;)b=h(b,l[j],j,l);return b}function Kt(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Un(l,h){return l==null?void 0:l[h]}function Jt(l){var h=!1;if(l!=null&&typeof l.toString!="function")try{h=!!(l+"")}catch{}return h}function zn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function Xt(l,h){return function(b){return l(h(b))}}function Hn(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Lo=Array.prototype,Uo=Function.prototype,St=Object.prototype,Zt=Ce["__core-js_shared__"],Pn=function(){var l=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Uo.toString,qe=St.hasOwnProperty,Ct=St.toString,zo=RegExp("^"+qn.call(qe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=In?Ce.Buffer:void 0,$t=Ce.Symbol,vt=Ce.Uint8Array,ke=Xt(Object.getPrototypeOf,Object),Wn=Object.create,Gn=St.propertyIsEnumerable,Ho=Lo.splice,en=Object.getOwnPropertySymbols,Vt=ct?ct.isBuffer:void 0,Qn=Xt(Object.keys,Object),Ot=Oe(Ce,"DataView"),dt=Oe(Ce,"Map"),Ve=Oe(Ce,"Promise"),Dt=Oe(Ce,"Set"),tn=Oe(Ce,"WeakMap"),ut=Oe(Object,"create"),nn=pe(Ot),ft=pe(dt),on=pe(Ve),rn=pe(Dt),an=pe(tn),rt=$t?$t.prototype:void 0,Yn=rt?rt.valueOf:void 0;function Ke(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Po(){this.__data__=ut?ut(null):{}}function qo(l){return this.has(l)&&delete this.__data__[l]}function Wo(l){var h=this.__data__;if(ut){var b=h[l];return b===r?void 0:b}return qe.call(h,l)?h[l]:void 0}function Kn(l){var h=this.__data__;return ut?h[l]!==void 0:qe.call(h,l)}function sn(l,h){var b=this.__data__;return b[l]=ut&&h===void 0?r:h,this}Ke.prototype.clear=Po,Ke.prototype.delete=qo,Ke.prototype.get=Wo,Ke.prototype.has=Kn,Ke.prototype.set=sn;function ie(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=[]}function Qo(l){var h=this.__data__,b=Nt(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():Ho.call(h,b,1),!0}function Yo(l){var h=this.__data__,b=Nt(h,l);return b<0?void 0:h[b][1]}function Ko(l){return Nt(this.__data__,l)>-1}function Jo(l,h){var b=this.__data__,C=Nt(b,l);return C<0?b.push([l,h]):b[C][1]=h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__={hash:new Ke,map:new(dt||ie),string:new Ke}}function Zo(l){return ht(this,l).delete(l)}function vo(l){return ht(this,l).get(l)}function er(l){return ht(this,l).has(l)}function tr(l,h){return ht(this,l).set(l,h),this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){this.__data__=new ie(l)}function nr(){this.__data__=new ie}function or(l){return this.__data__.delete(l)}function rr(l){return this.__data__.get(l)}function ar(l){return this.__data__.has(l)}function sr(l,h){var b=this.__data__;if(b instanceof ie){var C=b.__data__;if(!dt||C.length<n-1)return C.push([l,h]),this;b=this.__data__=new ce(C)}return b.set(l,h),this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l,h){var b=un(l)||At(l)?Kt(l.length,String):[],C=b.length,j=!!C;for(var F in l)qe.call(l,F)&&!(j&&(F=="length"||wr(F,C)))&&b.push(F);return b}function Jn(l,h,b){var C=l[h];(!(qe.call(l,h)&&to(C,b))||b===void 0&&!(h in l))&&(l[h]=b)}function Nt(l,h){for(var b=l.length;b--;)if(to(l[b][0],h))return b;return-1}function We(l,h){return l&&dn(h,pn(h),l)}function ln(l,h,b,C,j,F,W){var q;if(C&&(q=F?C(l,j,F,W):C(l)),q!==void 0)return q;if(!Qe(l))return l;var te=un(l);if(te){if(q=yr(l),!h)return mr(l,q)}else{var Q=Xe(l),de=Q==u||Q==p;if(no(l))return Ft(l,h);if(Q==y||Q==a||de&&!F){if(Jt(l))return F?l:{};if(q=Ge(de?{}:l),!h)return gr(l,We(q,l))}else{if(!M[Q])return F?l:{};q=br(l,Q,ln,h)}}W||(W=new ge);var _e=W.get(l);if(_e)return _e;if(W.set(l,q),!te)var ne=b?_r(l):pn(l);return Mn(ne||l,function(ue,le){ne&&(le=ue,ue=l[le]),Jn(q,le,ln(ue,h,b,C,le,l,W))}),q}function ir(l){return Qe(l)?Wn(l):{}}function lr(l,h,b){var C=h(l);return un(l)?C:Ln(C,b(l))}function cr(l){return Ct.call(l)}function dr(l){if(!Qe(l)||Er(l))return!1;var h=fn(l)||Jt(l)?zo:z;return h.test(pe(l))}function ur(l){if(!vn(l))return Qn(l);var h=[];for(var b in Object(l))qe.call(l,b)&&b!="constructor"&&h.push(b);return h}function Ft(l,h){if(h)return l.slice();var b=new l.constructor(l.length);return l.copy(b),b}function cn(l){var h=new l.constructor(l.byteLength);return new vt(h).set(new vt(l)),h}function pt(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function Xn(l,h,b){var C=h?b(zn(l),!0):zn(l);return Yt(C,Mo,new l.constructor)}function Zn(l){var h=new l.constructor(l.source,Bt.exec(l));return h.lastIndex=l.lastIndex,h}function fr(l,h,b){var C=h?b(Hn(l),!0):Hn(l);return Yt(C,$e,new l.constructor)}function pr(l){return Yn?Object(Yn.call(l)):{}}function hr(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function mr(l,h){var b=-1,C=l.length;for(h||(h=Array(C));++b<C;)h[b]=l[b];return h}function dn(l,h,b,C){b||(b={});for(var j=-1,F=h.length;++j<F;){var W=h[j],q=void 0;Jn(b,W,q===void 0?l[W]:q)}return b}function gr(l,h){return dn(l,Je(l),h)}function _r(l){return lr(l,pn,Je)}function ht(l,h){var b=l.__data__;return kr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Oe(l,h){var b=Un(l,h);return dr(b)?b:void 0}var Je=en?Xt(en,Object):Br,Xe=cr;(Ot&&Xe(new Ot(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=g||Ve&&Xe(Ve.resolve())!=m||Dt&&Xe(new Dt)!=k||tn&&Xe(new tn)!=E)&&(Xe=function(l){var h=Ct.call(l),b=h==y?l.constructor:void 0,C=b?pe(b):void 0;if(C)switch(C){case nn:return O;case ft:return g;case on:return m;case rn:return k;case an:return E}return h});function yr(l){var h=l.length,b=l.constructor(h);return h&&typeof l[0]=="string"&&qe.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function Ge(l){return typeof l.constructor=="function"&&!vn(l)?ir(ke(l)):{}}function br(l,h,b,C){var j=l.constructor;switch(h){case V:return cn(l);case c:case d:return new j(+l);case O:return pt(l,C);case I:case G:case K:case re:case D:case L:case X:case Se:case Pe:return hr(l,C);case g:return Xn(l,C,b);case B:case _:return new j(l);case x:return Zn(l);case k:return fr(l,C,b);case S:return pr(l)}}function wr(l,h){return h=h??s,!!h&&(typeof l=="number"||Z.test(l))&&l>-1&&l%1==0&&l<h}function kr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function Er(l){return!!Pn&&Pn in l}function vn(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||St;return l===b}function pe(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l){return ln(l,!0,!0)}function to(l,h){return l===h||l!==l&&h!==h}function At(l){return xr(l)&&qe.call(l,"callee")&&(!Gn.call(l,"callee")||Ct.call(l)==a)}var un=Array.isArray;function jt(l){return l!=null&&oo(l.length)&&!fn(l)}function xr(l){return ro(l)&&jt(l)}var no=Vt||Sr;function fn(l){var h=Qe(l)?Ct.call(l):"";return h==u||h==p}function oo(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Qe(l){var h=typeof l;return!!l&&(h=="object"||h=="function")}function ro(l){return!!l&&typeof l=="object"}function pn(l){return jt(l)?Tt(l):ur(l)}function Br(){return[]}function Sr(){return!1}o.exports=eo}(Tn,Tn.exports);var Ga=Tn.exports,Nn={exports:{}};Nn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",p="[object Date]",g="[object Error]",B="[object Function]",y="[object GeneratorFunction]",m="[object Map]",x="[object Number]",k="[object Null]",_="[object Object]",S="[object Promise]",E="[object Proxy]",V="[object RegExp]",O="[object Set]",I="[object String]",G="[object Symbol]",K="[object Undefined]",re="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Ye="[object Int16Array]",Bt="[object Int32Array]",z="[object Uint8Array]",Z="[object Uint8ClampedArray]",M="[object Uint16Array]",we="[object Uint32Array]",Io=/[\\^$.*+?()[\]{}|]/g,Ce=/^\[object .+?Constructor\]$/,Rn=/^(?:0|[1-9]\d*)$/,J={};J[X]=J[Se]=J[Pe]=J[Ye]=J[Bt]=J[z]=J[Z]=J[M]=J[we]=!0,J[c]=J[d]=J[D]=J[u]=J[L]=J[p]=J[g]=J[B]=J[m]=J[x]=J[_]=J[V]=J[O]=J[I]=J[re]=!1;var In=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,$e=In||Mo||Function("return this")(),Mn=t&&!t.nodeType&&t,Ln=Mn&&!0&&o&&!o.nodeType&&o,Yt=Ln&&Ln.exports===Mn,Kt=Yt&&In.process,Un=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Un&&Un.isTypedArray;function zn(l,h){for(var b=-1,C=l==null?0:l.length,j=0,F=[];++b<C;){var W=l[b];h(W,b,l)&&(F[j++]=W)}return F}function Xt(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Hn(l,h){for(var b=-1,C=l==null?0:l.length;++b<C;)if(h(l[b],b,l))return!0;return!1}function Lo(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Uo(l){return function(h){return l(h)}}function St(l,h){return l.has(h)}function Zt(l,h){return l==null?void 0:l[h]}function Pn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function qn(l,h){return function(b){return l(h(b))}}function qe(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Ct=Array.prototype,zo=Function.prototype,ct=Object.prototype,$t=$e["__core-js_shared__"],vt=zo.toString,ke=ct.hasOwnProperty,Wn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Gn=ct.toString,Ho=RegExp("^"+vt.call(ke).replace(Io,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Yt?$e.Buffer:void 0,Vt=$e.Symbol,Qn=$e.Uint8Array,Ot=ct.propertyIsEnumerable,dt=Ct.splice,Ve=Vt?Vt.toStringTag:void 0,Dt=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Je($e,"DataView"),ft=Je($e,"Map"),on=Je($e,"Promise"),rn=Je($e,"Set"),an=Je($e,"WeakMap"),rt=Je(Object,"create"),Yn=pe(nn),Ke=pe(ft),Po=pe(on),qo=pe(rn),Wo=pe(an),Kn=Vt?Vt.prototype:void 0,sn=Kn?Kn.valueOf:void 0;function ie(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=rt?rt(null):{},this.size=0}function Qo(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function Yo(l){var h=this.__data__;if(rt){var b=h[l];return b===r?void 0:b}return ke.call(h,l)?h[l]:void 0}function Ko(l){var h=this.__data__;return rt?h[l]!==void 0:ke.call(h,l)}function Jo(l,h){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=rt&&h===void 0?r:h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__=[],this.size=0}function Zo(l){var h=this.__data__,b=Ft(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():dt.call(h,b,1),--this.size,!0}function vo(l){var h=this.__data__,b=Ft(h,l);return b<0?void 0:h[b][1]}function er(l){return Ft(this.__data__,l)>-1}function tr(l,h){var b=this.__data__,C=Ft(b,l);return C<0?(++this.size,b.push([l,h])):b[C][1]=h,this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function nr(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function or(l){var h=Oe(this,l).delete(l);return this.size-=h?1:0,h}function rr(l){return Oe(this,l).get(l)}function ar(l){return Oe(this,l).has(l)}function sr(l,h){var b=Oe(this,l),C=b.size;return b.set(l,h),this.size+=b.size==C?0:1,this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l){var h=-1,b=l==null?0:l.length;for(this.__data__=new ge;++h<b;)this.add(l[h])}function Jn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Jn,Tt.prototype.has=Nt;function We(l){var h=this.__data__=new ce(l);this.size=h.size}function ln(){this.__data__=new ce,this.size=0}function ir(l){var h=this.__data__,b=h.delete(l);return this.size=h.size,b}function lr(l){return this.__data__.get(l)}function cr(l){return this.__data__.has(l)}function dr(l,h){var b=this.__data__;if(b instanceof ce){var C=b.__data__;if(!ft||C.length<n-1)return C.push([l,h]),this.size=++b.size,this;b=this.__data__=new ge(C)}return b.set(l,h),this.size=b.size,this}We.prototype.clear=ln,We.prototype.delete=ir,We.prototype.get=lr,We.prototype.has=cr,We.prototype.set=dr;function ur(l,h){var b=At(l),C=!b&&to(l),j=!b&&!C&&jt(l),F=!b&&!C&&!j&&ro(l),W=b||C||j||F,q=W?Lo(l.length,String):[],te=q.length;for(var Q in l)ke.call(l,Q)&&!(W&&(Q=="length"||j&&(Q=="offset"||Q=="parent")||F&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||br(Q,te)))&&q.push(Q);return q}function Ft(l,h){for(var b=l.length;b--;)if(eo(l[b][0],h))return b;return-1}function cn(l,h,b){var C=h(l);return At(l)?C:Xt(C,b(l))}function pt(l){return l==null?l===void 0?K:k:Ve&&Ve in Object(l)?Xe(l):vn(l)}function Xn(l){return Qe(l)&&pt(l)==c}function Zn(l,h,b,C,j){return l===h?!0:l==null||h==null||!Qe(l)&&!Qe(h)?l!==l&&h!==h:fr(l,h,b,C,Zn,j)}function fr(l,h,b,C,j,F){var W=At(l),q=At(h),te=W?d:Ge(l),Q=q?d:Ge(h);te=te==c?_:te,Q=Q==c?_:Q;var de=te==_,_e=Q==_,ne=te==Q;if(ne&&jt(l)){if(!jt(h))return!1;W=!0,de=!1}if(ne&&!de)return F||(F=new We),W||ro(l)?dn(l,h,b,C,j,F):gr(l,h,te,b,C,j,F);if(!(b&s)){var ue=de&&ke.call(l,"__wrapped__"),le=_e&&ke.call(h,"__wrapped__");if(ue||le){var at=ue?l.value():l,Ze=le?h.value():h;return F||(F=new We),j(at,Ze,b,C,F)}}return ne?(F||(F=new We),_r(l,h,b,C,j,F)):!1}function pr(l){if(!oo(l)||kr(l))return!1;var h=no(l)?Ho:Ce;return h.test(pe(l))}function hr(l){return Qe(l)&&fn(l.length)&&!!J[pt(l)]}function mr(l){if(!Er(l))return ut(l);var h=[];for(var b in Object(l))ke.call(l,b)&&b!="constructor"&&h.push(b);return h}function dn(l,h,b,C,j,F){var W=b&s,q=l.length,te=h.length;if(q!=te&&!(W&&te>q))return!1;var Q=F.get(l);if(Q&&F.get(h))return Q==h;var de=-1,_e=!0,ne=b&a?new Tt:void 0;for(F.set(l,h),F.set(h,l);++de<q;){var ue=l[de],le=h[de];if(C)var at=W?C(le,ue,de,h,l,F):C(ue,le,de,l,h,F);if(at!==void 0){if(at)continue;_e=!1;break}if(ne){if(!Hn(h,function(Ze,mt){if(!St(ne,mt)&&(ue===Ze||j(ue,Ze,b,C,F)))return ne.push(mt)})){_e=!1;break}}else if(!(ue===le||j(ue,le,b,C,F))){_e=!1;break}}return F.delete(l),F.delete(h),_e}function gr(l,h,b,C,j,F,W){switch(b){case L:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case D:return!(l.byteLength!=h.byteLength||!F(new Qn(l),new Qn(h)));case u:case p:case x:return eo(+l,+h);case g:return l.name==h.name&&l.message==h.message;case V:case I:return l==h+"";case m:var q=Pn;case O:var te=C&s;if(q||(q=qe),l.size!=h.size&&!te)return!1;var Q=W.get(l);if(Q)return Q==h;C|=a,W.set(l,h);var de=dn(q(l),q(h),C,j,F,W);return W.delete(l),de;case G:if(sn)return sn.call(l)==sn.call(h)}return!1}function _r(l,h,b,C,j,F){var W=b&s,q=ht(l),te=q.length,Q=ht(h),de=Q.length;if(te!=de&&!W)return!1;for(var _e=te;_e--;){var ne=q[_e];if(!(W?ne in h:ke.call(h,ne)))return!1}var ue=F.get(l);if(ue&&F.get(h))return ue==h;var le=!0;F.set(l,h),F.set(h,l);for(var at=W;++_e<te;){ne=q[_e];var Ze=l[ne],mt=h[ne];if(C)var va=W?C(mt,Ze,ne,h,l,F):C(Ze,mt,ne,l,h,F);if(!(va===void 0?Ze===mt||j(Ze,mt,b,C,F):va)){le=!1;break}at||(at=ne=="constructor")}if(le&&!at){var ao=l.constructor,so=h.constructor;ao!=so&&"constructor"in l&&"constructor"in h&&!(typeof ao=="function"&&ao instanceof ao&&typeof so=="function"&&so instanceof so)&&(le=!1)}return F.delete(l),F.delete(h),le}function ht(l){return cn(l,pn,yr)}function Oe(l,h){var b=l.__data__;return wr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Je(l,h){var b=Zt(l,h);return pr(b)?b:void 0}function Xe(l){var h=ke.call(l,Ve),b=l[Ve];try{l[Ve]=void 0;var C=!0}catch{}var j=Gn.call(l);return C&&(h?l[Ve]=b:delete l[Ve]),j}var yr=Dt?function(l){return l==null?[]:(l=Object(l),zn(Dt(l),function(h){return Ot.call(l,h)}))}:Br,Ge=pt;(nn&&Ge(new nn(new ArrayBuffer(1)))!=L||ft&&Ge(new ft)!=m||on&&Ge(on.resolve())!=S||rn&&Ge(new rn)!=O||an&&Ge(new an)!=re)&&(Ge=function(l){var h=pt(l),b=h==_?l.constructor:void 0,C=b?pe(b):"";if(C)switch(C){case Yn:return L;case Ke:return m;case Po:return S;case qo:return O;case Wo:return re}return h});function br(l,h){return h=h??i,!!h&&(typeof l=="number"||Rn.test(l))&&l>-1&&l%1==0&&l<h}function wr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function kr(l){return!!Wn&&Wn in l}function Er(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||ct;return l===b}function vn(l){return Gn.call(l)}function pe(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l,h){return l===h||l!==l&&h!==h}var to=Xn(function(){return arguments}())?Xn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Ot.call(l,"callee")},At=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!no(l)}var jt=tn||Sr;function xr(l,h){return Zn(l,h)}function no(l){if(!oo(l))return!1;var h=pt(l);return h==B||h==y||h==f||h==E}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function oo(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function Qe(l){return l!=null&&typeof l=="object"}var ro=Jt?Uo(Jt):hr;function pn(l){return un(l)?ur(l):mr(l)}function Br(){return[]}function Sr(){return!1}o.exports=xr}(Nn,Nn.exports);var Qa=Nn.exports,Ao={},Ya=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ao,"__esModule",{value:!0});var Gf=Ya(Ga),Qf=Ya(Qa),jo;(function(o){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Gf.default(i);c||(d=Object.keys(d).reduce(function(u,p){return d[p]!=null&&(u[p]=d[p]),u},{}));for(var f in a)a[f]!==void 0&&i[f]===void 0&&(d[f]=a[f]);return Object.keys(d).length>0?d:void 0}o.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,f){return Qf.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}o.diff=n;function r(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,f){return i[f]!==a[f]&&a[f]!==void 0&&(d[f]=i[f]),d},{});return Object.keys(a).reduce(function(d,f){return a[f]!==i[f]&&i[f]===void 0&&(d[f]=null),d},c)}o.invert=r;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(f,u){return a[u]===void 0&&(f[u]=i[u]),f},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(jo||(jo={})),Ao.default=jo;var Fn={},An={},Ka;function Yf(){if(Ka)return An;Ka=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});var t=o(Xa()),n=function(){function r(s){this.ops=s,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},r}();return An.default=n,An}var Ja;function Xa(){if(Ja)return Fn;Ja=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fn,"__esModule",{value:!0});var t=o(Yf()),n;return function(r){function s(i){return new t.default(i)}r.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}r.length=a}(n||(n={})),Fn.default=n,Fn}var Gt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},jn=Gt(Wf),Kf=Gt(Ga),Ro=Gt(Qa),Qt=Gt(Ao),se=Gt(Xa()),Jf="\0",Xf=function(){function o(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return o.prototype.insert=function(t,n){var r={};return typeof t=="string"&&t.length===0?this:(r.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},o.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},o.prototype.retain=function(t,n){if(t<=0)return this;var r={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},o.prototype.push=function(t){var n=this.ops.length,r=this.ops[n-1];if(t=Kf.default(t),typeof r=="object"){if(typeof t.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+t.delete},this;if(typeof r.delete=="number"&&t.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(t),this;if(Ro.default(t.attributes,r.attributes)){if(typeof t.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},o.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},o.prototype.filter=function(t){return this.ops.filter(t)},o.prototype.forEach=function(t){this.ops.forEach(t)},o.prototype.map=function(t){return this.ops.map(t)},o.prototype.partition=function(t){var n=[],r=[];return this.forEach(function(s){var a=t(s)?n:r;a.push(s)}),[n,r]},o.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},o.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+se.default.length(n):n.delete?t-n.delete:t},0)},o.prototype.length=function(){return this.reduce(function(t,n){return t+se.default.length(n)},0)},o.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var r=[],s=se.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),r.push(i)),a+=se.default.length(i)}return new o(r)},o.prototype.compose=function(t){var n=se.default.iterator(this.ops),r=se.default.iterator(t.ops),s=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&r.next(a.retain-i)}for(var c=new o(s);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")c.push(r.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),r.peekLength()),f=n.next(d),u=r.next(d);if(typeof u.retain=="number"){var p={};typeof f.retain=="number"?p.retain=d:p.insert=f.insert;var g=Qt.default.compose(f.attributes,u.attributes,typeof f.retain=="number");if(g&&(p.attributes=g),c.push(p),!r.hasNext()&&Ro.default(c.ops[c.ops.length-1],p)){var B=new o(n.rest());return c.concat(B).chop()}}else typeof u.delete=="number"&&typeof f.retain=="number"&&c.push(u)}return c.chop()},o.prototype.concat=function(t){var n=new o(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},o.prototype.diff=function(t,n){if(this.ops===t.ops)return new o;var r=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Jf;var u=d===t?"on":"with";throw new Error("diff() called "+u+" non-document")}).join("")}),s=new o,a=jn.default(r[0],r[1],n),i=se.default.iterator(this.ops),c=se.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var u=0;switch(d[0]){case jn.default.INSERT:u=Math.min(c.peekLength(),f),s.push(c.next(u));break;case jn.default.DELETE:u=Math.min(f,i.peekLength()),i.next(u),s.delete(u);break;case jn.default.EQUAL:u=Math.min(i.peekLength(),c.peekLength(),f);var p=i.next(u),g=c.next(u);Ro.default(p.insert,g.insert)?s.retain(u,Qt.default.diff(p.attributes,g.attributes)):s.push(g).delete(u);break}f-=u}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
7
|
-
`);for(var r=se.default.iterator(this.ops),s=new o,a=0;r.hasNext();){if(r.peekType()!=="insert")return;var i=r.peek(),c=se.default.length(i)-r.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(r.next());else if(d>0)s.push(r.next(d));else{if(t(s,r.next(1).attributes||{},a)===!1)return;a+=1,s=new o}}s.length()>0&&t(s,{},a)},o.prototype.invert=function(t){var n=new o;return this.reduce(function(r,s){if(s.insert)n.delete(se.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),r+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(r,r+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(se.default.length(c),Qt.default.invert(s.attributes,c.attributes))}),r+a}}return r},0),n.chop()},o.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var r=t,s=se.default.iterator(this.ops),a=se.default.iterator(r.ops),i=new o;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(se.default.length(s.next()));else if(a.peekType()==="insert")i.push(a.next());else{var c=Math.min(s.peekLength(),a.peekLength()),d=s.next(c),f=a.next(c);if(d.delete)continue;f.delete?i.push(f):i.retain(c,Qt.default.transform(d.attributes,f.attributes,n))}return i.chop()},o.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var r=se.default.iterator(this.ops),s=0;r.hasNext()&&s<=t;){var a=r.peekLength(),i=r.peekType();if(r.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},o.Op=se.default,o.AttributeMap=Qt.default,o}(),
|
|
6
|
+
`+a):r.stack=a}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&yo.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:yo.assertOptions(s,{encode:ve.function,serialize:ve.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","common"],y=>{delete a[y]}),n.headers=be.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,p=0,g;if(!d){const y=[vr.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),g=y.length,u=Promise.resolve(n);p<g;)u=u.then(y[p++],y[p++]);return u}g=c.length;let B=n;for(p=0;p<g;){const y=c[p++],m=c[p++];try{B=y(B)}catch(x){m.call(this,x);break}}try{u=vr.call(this,B)}catch(y){return Promise.reject(y)}for(p=0,g=f.length;p<g;)u=u.then(f[p++],f[p++]);return u}getUri(t){t=_t(this.defaults,t);const n=Kr(t.baseURL,t.url);return Hr(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){st.prototype[t]=function(n,r){return this.request(_t(r||{},{method:t,url:n,data:(r||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,c){return this.request(_t(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}st.prototype[t]=n(),st.prototype[t+"Form"]=n(!0)});class bo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{r.subscribe(c),a=c}).then(s);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,c){r.reason||(r.reason=new zt(a,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bo(function(s){t=s}),cancel:t}}}function si(o){return function(n){return o.apply(null,n)}}function ii(o){return $.isObject(o)&&o.isAxiosError===!0}const wo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wo).forEach(([o,t])=>{wo[t]=o});function oa(o){const t=new st(o),n=Cr(st.prototype.request,t);return $.extend(n,st.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return oa(_t(o,s))},n}const v=oa(Lt);v.Axios=st,v.CanceledError=zt,v.CancelToken=bo,v.isCancel=Yr,v.VERSION=ta,v.toFormData=bn,v.AxiosError=P,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=si,v.isAxiosError=ii,v.mergeConfig=_t,v.AxiosHeaders=be,v.formToJSON=o=>Gr($.isHTMLForm(o)?new FormData(o):o),v.getAdapter=Zr.getAdapter,v.HttpStatusCode=wo,v.default=v;let yt=null;function li(o){yt=v.create(o)}function ci(){return yt}async function di(o,t={},n={}){return new Promise((r,s)=>{yt.get(o,{headers:n,params:t}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function ui(o,t,n={}){return new Promise((r,s)=>{yt.post(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}async function fi(o,t,n={}){return new Promise((r,s)=>{yt.delete(o,{data:t,headers:n}).then(a=>{r(a.data)}).catch(a=>{s(a)})})}async function pi(o,t,n={}){return new Promise((r,s)=>{yt.put(o,t,{headers:n}).then(a=>{r(a)}).catch(a=>{s(a)})})}const he={get:di,post:ui,put:pi,remove:fi,setupAxios:li,getAxiosInstance:ci};var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ra(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function hi(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var aa={exports:{}};(function(o,t){(function(n,r){typeof hi=="function"?o.exports=r():n.pluralize=r()})(ae,function(){var n=[],r=[],s={},a={},i={};function c(m){return typeof m=="string"?new RegExp("^"+m+"$","i"):m}function d(m,x){return m===x?x:m===m.toLowerCase()?x.toLowerCase():m===m.toUpperCase()?x.toUpperCase():m[0]===m[0].toUpperCase()?x.charAt(0).toUpperCase()+x.substr(1).toLowerCase():x.toLowerCase()}function f(m,x){return m.replace(/\$(\d{1,2})/g,function(k,_){return x[_]||""})}function u(m,x){return m.replace(x[0],function(k,_){var S=f(x[1],arguments);return d(k===""?m[_-1]:k,S)})}function p(m,x,k){if(!m.length||s.hasOwnProperty(m))return x;for(var _=k.length;_--;){var S=k[_];if(S[0].test(x))return u(x,S)}return x}function g(m,x,k){return function(_){var S=_.toLowerCase();return x.hasOwnProperty(S)?d(_,S):m.hasOwnProperty(S)?d(_,m[S]):p(S,_,k)}}function B(m,x,k,_){return function(S){var E=S.toLowerCase();return x.hasOwnProperty(E)?!0:m.hasOwnProperty(E)?!1:p(E,E,k)===E}}function y(m,x,k){var _=x===1?y.singular(m):y.plural(m);return(k?x+" ":"")+_}return y.plural=g(i,a,n),y.isPlural=B(i,a,n),y.singular=g(a,i,r),y.isSingular=B(a,i,r),y.addPluralRule=function(m,x){n.push([c(m),x])},y.addSingularRule=function(m,x){r.push([c(m),x])},y.addUncountableRule=function(m){if(typeof m=="string"){s[m.toLowerCase()]=!0;return}y.addPluralRule(m,"$0"),y.addSingularRule(m,"$0")},y.addIrregularRule=function(m,x){x=x.toLowerCase(),m=m.toLowerCase(),i[m]=x,a[x]=m},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(m){return y.addIrregularRule(m[0],m[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(m){return y.addPluralRule(m[0],m[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(m){return y.addSingularRule(m[0],m[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(y.addUncountableRule),y})})(aa);var mi=aa.exports;const sa=ra(mi),ko=o=>o.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),kn="GET_LIST",En="GET_ONE",xn="CREATE",Bn="UPDATE",bt="REMOVE",Eo="RESTORE",ia="ENABLE",gi=[kn,En,xn,Bn,bt,ia];class _i{constructor(t,n,r=gi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.operations=r,this.operations.forEach(s=>{const a=ko(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(kn)){console.log(`${this.side}/${this.domain} 不支持 ${kn} 操作`);return}return he.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(En)){console.log(`${this.side}/${this.domain} 不支持 ${En} 操作`);return}return he.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(xn)){console.log(`${this.side}/${this.domain} 不支持 ${xn} 操作`);return}return he.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(Bn)){console.log(`${this.side}/${this.domain} 不支持 ${Bn} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(Eo)){console.log(`${this.side}/${this.domain} 不支持 ${Eo} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(bt)){console.log(`${this.side}/${this.domain} 不支持 ${bt} 操作`);return}return he.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class yi{constructor(t,n,r){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=sa(n),this.listQuerys=r}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),he.get(`${this.side}/${this.resources}`,n)}getOne(t){return he.get(`${this.side}/${this.resources}/${t.id}`)}}const bi={Client:_i,ReadOnlyClient:yi,GET_LIST:kn,GET_ONE:En,CREATE:xn,UPDATE:Bn,REMOVE:bt,RESTORE:Eo,ENABLE:ia},wi=(o,t,n)=>{const r=o[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((s,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},ki=["createdAt","updatedAt","deletedAt"];class ee{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.info=t.info?"("+(t==null?void 0:t.info)+")":"",this.label=t.label+this.info,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),this.placeholder=t.placeholder||"",this.prefix=t.prefix||"",this.suffix=t.suffix||"",this.extendDetail=t.extendDetail||!1,this.rules=t.rules||[],this.editable=this._editable(t),this.visible=this._visible(t),this.width=this.computeWidth(t),this.span=t.span||6,this.wholeRow=(t==null?void 0:t.wholeRow)||!1,this.fixed=!1,this.maxImageCounts=t.maxImageCounts,this.format=t.format||"HH:mm:ss",this.change=(t==null?void 0:t.change)||null,this.waterMark=(t==null?void 0:t.waterMark)||"",this.elConfig=(t==null?void 0:t.elConfig)||{}}computeWidth(t){return t.width?t.width:ki.includes(t.code)?200:t.code==="id"||t.type==="image"?100:null}defaultBy(t,n){return t??n}checkValidProperties(t){const n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(this);if(n.every(a=>r.includes(a)))return;const s=n.filter(a=>!r.includes(a));console.error(`invalid field config props: [${s}] for ${this.domain}:${this.code}`)}_showInList(t){const n=t.showInList;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if("showInList"in this.defaultConfig())return()=>this.defaultConfig().showInList;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInList : ${n}`)}_showInDetail(t){const n=t.showInDetail;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid showInDetail : ${n}`)}_editable(t){const n=t.editable;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!1;throw new Exception(`invalid editable : ${n}`)}_visible(t){const n=t.visible;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return this._editable(t);throw new Exception(`invalid visible : ${n}`)}defaultConfig(){return{}}}function la(o,t,n){console.warn(`${o}.${t} => ${n}`)}const xo={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},date:{config:"date"},time:{config:"time"},editor:{config:"rich-text",deprecated:"editor 字段类型即将废弃,请使用 rich-text"},"rich-text":{config:"rich-text"},image:{config:"image"},images:{config:"images"},attachment:{config:"attachment"},attachments:{config:"attachment",deprecated:"attachments 字段类型即将废弃,请使用 attachment"},json:{config:"json"},"row-id":{config:"row-id"},string:{config:"string"},text:{config:"text"},textarea:{config:"text",deprecated:"textarea 字段类型即将废弃,请使用 text"},tree:{config:"tree-select",deprecated:"tree 字段类型即将废弃,请使用 tree-select"},"tree-select":{config:"tree-select"},cascader:{config:"cascader"},"radio-group":{config:"radio-group"},component:{config:"component"},"input-number":{config:"input-number"}};async function ca(o,t,n){const r=await wi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>Od),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>Ad),"./field/boolean/config.js":()=>Promise.resolve().then(()=>Ld),"./field/cascader/config.js":()=>Promise.resolve().then(()=>qd),"./field/component/config.js":()=>Promise.resolve().then(()=>Gd),"./field/date/config.js":()=>Promise.resolve().then(()=>Xd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>nu),"./field/image/config.js":()=>Promise.resolve().then(()=>du),"./field/images/config.js":()=>Promise.resolve().then(()=>yu),"./field/input-number/config.js":()=>Promise.resolve().then(()=>xu),"./field/json/config.js":()=>Promise.resolve().then(()=>$u),"./field/radio-group/config.js":()=>Promise.resolve().then(()=>Hu),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>Ku),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Xu),"./field/select/config.js":()=>Promise.resolve().then(()=>nf),"./field/string/config.js":()=>Promise.resolve().then(()=>df),"./field/switch/config.js":()=>Promise.resolve().then(()=>mf),"./field/text/config.js":()=>Promise.resolve().then(()=>wf),"./field/time/config.js":()=>Promise.resolve().then(()=>Sf),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Of)}),`./field/${o}/config.js`,4);return new r.default(t,n)}function Sn(o,t="unknown"){return o==null?void 0:o.map(r=>{if(r instanceof ee)return r;if(r.code==="id"?r.type="row-id":r.component&&(r.type="component"),Object.keys(xo).includes(r.type)){const s=xo[r.type];return s.deprecated&&la(r.domain||t,r.code,s.deprecated),ca(xo[r.type].config,r,r.domain||t)}return ca("string",r,r.domain||t)})}let Bo={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},wt={};function Ei(o){Bo={...Bo,...o},wt=o.domainConfigs}function xi(o){Object.keys(wt).forEach(t=>{const n=wt[t];Object.keys(n).forEach(r=>{const s=n[r];s.load=o(t,r)})})}function et(){return Bo}function So(){return wt}function Ht(o,t){return wt[o][t].load().then(n=>wt[o][t].load().then(r=>{const s=r.default;return Promise.all(s.fields).then(a=>{var i;if(s.fields=a,((i=s.detailGroupFields)==null?void 0:i.length)>0){const c=s.detailGroupFields.map(d=>{var f;return((f=d.childrenFields)==null?void 0:f.length)>0?Promise.all(d.childrenFields).then(u=>(d.childrenFields=u,d)):Promise.resolve(d)});return Promise.all(c).then(()=>s)}return s})}))}class Bi{constructor(t,n){var s;this.side=t;const r=n.config?n.config:n;this.code=r.code,this.fields=Sn(r.fields,r.code),this.detailGroupFields=(s=r==null?void 0:r.detailGroupFields)==null?void 0:s.map(a=>({...a,childrenFields:Sn(a.childrenFields,r.code)})),!r.simple&&(this.name=So()[t][r.code].name,this.filters=r.filters||[],this.coverField=r.coverField,this.nameField=r.nameField||"name",this.showSubmit=r.showSubmit||!0,this.showEdit=this.setupShowEdit(r.showEdit),this.submitConfirm=r.submitConfirm,this.removeConfirm=r.removeConfirm,this.showCreate=this.setupShowCreate(r.showCreate),this.hasMany=this.createHasMany(n),this.hasOne=this.createHasOne(n),this.detailSubType=r.detailSubType?"list":"tabs",this.formatName=this.createFormatName(n.formatName),this.rest=this.createRestClient(n.rest),this.rowActions=this.setupRowActions(n),this.pageActions=this.setupPageActions(n),this.actionsWidth=n.actionsWidth||150,this.formHook=n.form||{},this.filterHook=n.filterForm||{},this.restRepeat=this.restRepeat(n.restRepeat),this.btnVisible=n.btnVisible||{},this.operations=this.setupOperations(),this.formLayout=n.formLayout||[],this.displayMode=n.displayMode||{},this.showPagination=n.showPagination??!0,this.extendTableColumnfields=n.extendTableColumnfields||null,this.formStyleConfig=this.getFormStyleConfig(n.formConfig),this.delText=n.delText||"确定要删除该条数据吗?",this.showDetailInfo=n.showDetailInfo)}wrapFields(t,n){return Sn(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:n.id?`#${n.id}`:""}createHasOne(t){return n=>{if(typeof t.hasOne>"u")return[];if(Array.isArray(t.hasOne))return t.hasOne;if(typeof t.hasOne=="function"){const r=t.hasOne(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasOne 必须返回数组`),[])}return console.warn(`${this.code} --> hasOne 必须返回数组`),[]}}createHasMany(t){return n=>{if(typeof t.hasMany>"u")return[];if(Array.isArray(t.hasMany))return t.hasMany;if(typeof t.hasMany=="function"){const r=t.hasMany(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> hasMany 必须返回数组`),[])}return console.warn(`${this.code} --> hasMany 必须返回数组`),[]}}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const r=t.pageActions(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> page actions 必须返回数组`),[])}return console.warn(`${this.code} --> page actions 必须返回数组`),[]}}setupRowActions(t){return n=>{if(typeof t.rowActions>"u")return[];if(Array.isArray(t.rowActions))return t.rowActions;if(typeof t.rowActions=="function"){const r=t.rowActions(n);return Array.isArray(r)?r:(console.warn(`${this.code} --> row actions 必须返回数组`),[])}return console.warn(`${this.code} --> row actions 必须返回数组`),[]}}setupShowCreate(t){return typeof t=="boolean"?()=>t:typeof t=="function"?n=>t(n):()=>!0}setupShowEdit(t){return typeof t=="boolean"?()=>t:typeof t=="function"?(n,r)=>t(n,r):()=>!0}restRepeat(t){return typeof t=="function"?n=>t():()=>""}setupOperations(t){const n={creatable:this.rest.create!=null,updatable:this.rest.update!=null,removable:this.rest.remove!=null,restorable:this.rest.restore!=null,showable:this.rest.getOne!=null};return r=>{const s=this.showCreate(r);return{...n,creatable:n.creatable&&s}}}getFormStyleConfig(t){return{...{labelPosition:"top",labelWidth:100},...t||{}}}}function da(o,t){return new Bi(o,t)}const R=(o,t)=>{const n=o.__vccOpts||o;for(const[r,s]of t)n[r]=s;return n},Si={class:"card-header"},Ci={class:"title"},ua=R({__name:"Widget",props:{title:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{shadow:"never"},e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:2},[t.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createElementVNode("span",Ci,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),$i={key:0},Vi={key:1},Oi={key:0},Di={key:1},fa=R({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(o){const t=o;let n="#f7faff",r="10px";return t.background&&(n=t.background,n=="none"&&(r="0px")),(s,a)=>{const i=e.resolveComponent("RouterLink");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"container",style:e.normalizeStyle(`background: ${e.unref(n)}; padding: ${e.unref(r)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",$i,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Vi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Oi,[e.createVNode(i,{to:t.link},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElLink),{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},8,["to"])])):(e.openBlock(),e.createElementBlock("span",Di,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),Ti=R({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createBlock(ua,null,{default:e.withCtx(()=>[e.createVNode(fa,{title:t.title,value:t.value,icon:t.icon,background:t.background,align:t.align,link:t.link},null,8,["title","value","icon","background","align","link"])]),_:1}))}},[["__scopeId","data-v-f338c407"]]),Ni={},Fi={style:{padding:"20px 0"}};function Ai(o,t){return e.openBlock(),e.createElementBlock("div",Fi,[e.renderSlot(o.$slots,"default")])}const ji=R(Ni,[["render",Ai]]),Ri=R({__name:"DashboardRow",setup(o){return(t,n)=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{style:{"margin-bottom":"20px"},class:"row"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3}))}},[["__scopeId","data-v-5b091760"]]);/*! Element Plus Icons Vue v2.3.1 */var Ii=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Mi=Ii,Li=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),Ui=Li,zi=e.defineComponent({name:"CirclePlus",__name:"circle-plus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),e.createElementVNode("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Hi=zi,Pi=e.defineComponent({name:"Close",__name:"close",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),pa=Pi,qi=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),ha=qi,Wi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Gi=Wi,Qi=e.defineComponent({name:"Delete",__name:"delete",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ma=Qi,Yi=e.defineComponent({name:"Document",__name:"document",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),ga=Yi,Ki=e.defineComponent({name:"Download",__name:"download",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Ji=Ki,Xi=e.defineComponent({name:"EditPen",__name:"edit-pen",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),Zi=Xi,vi=e.defineComponent({name:"Finished",__name:"finished",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M280.768 753.728 691.456 167.04a32 32 0 1 1 52.416 36.672L314.24 817.472a32 32 0 0 1-45.44 7.296l-230.4-172.8a32 32 0 0 1 38.4-51.2l203.968 152.96zM736 448a32 32 0 1 1 0-64h192a32 32 0 1 1 0 64zM608 640a32 32 0 0 1 0-64h319.936a32 32 0 1 1 0 64zM480 832a32 32 0 1 1 0-64h447.936a32 32 0 1 1 0 64z"})]))}}),el=vi,tl=e.defineComponent({name:"Grid",__name:"grid",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M640 384v256H384V384zm64 0h192v256H704zm-64 512H384V704h256zm64 0V704h192v192zm-64-768v192H384V128zm64 0h192v192H704zM320 384v256H128V384zm0 512H128V704h192zm0-768v192H128V128z"})]))}}),nl=tl,ol=e.defineComponent({name:"Loading",__name:"loading",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),_a=ol,rl=e.defineComponent({name:"Minus",__name:"minus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),al=rl,sl=e.defineComponent({name:"Operation",__name:"operation",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),il=sl,ll=e.defineComponent({name:"Plus",__name:"plus",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),Co=ll,cl=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M224 318.336V896h576V318.336L552.512 115.84a64 64 0 0 0-81.024 0zM593.024 66.304l259.2 212.096A32 32 0 0 1 864 303.168V928a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V303.168a32 32 0 0 1 11.712-24.768l259.2-212.096a128 128 0 0 1 162.112 0z"}),e.createElementVNode("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256"})]))}}),ya=cl,dl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),ul=dl,fl=e.defineComponent({name:"Refresh",__name:"refresh",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),pl=fl,hl=e.defineComponent({name:"Search",__name:"search",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),ml=hl,gl=e.defineComponent({name:"Setting",__name:"setting",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),_l=gl,yl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),bl=yl,wl=e.defineComponent({name:"View",__name:"view",setup(o){return(t,n)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),kl=wl;function Y(o){const t={...o.query,...o.params};if(o.params.domain&&o.params.id){const n=ko(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function El(o){const t=o.length,n=Math.floor(24/t);return{type:"row",cols:o.map(s=>({type:"col",span:n,field:s}))}}function $o(o){return o.map(t=>El(t))}const xl={key:0,class:"classify-wrap"},Bl=R({__name:"FormLayout",props:{layout:Object,fields:Array},setup(o){const t=o,n=e.computed(()=>{var a;if(t.layout.length==0){if(((a=t.fields)==null?void 0:a.filter(d=>{var f;return!((f=d.code)!=null&&f.includes("classify"))}).length)<=6){const d=s(t.fields,1);return $o(d)}console.log(t.fields);const c=s(t.fields,2);return $o(c)}return t.layout});function r(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){var f;const c=a.map(u=>u.code),d=[];if(i==2)for(let u=0;u<c.length;u+=i)c[u].includes("classify")?(d.push([c[u]]),c.splice(c[u].includes("classify")?u:u+1,1),u-=i):(f=c[u+1])!=null&&f.includes("classify")?(d.push([c[u]]),d.push([c[u+1]])):d.push(c.slice(u,u+i));else for(let u=0;u<c.length;u+=i)d.push(c.slice(u,u+i));return d}return(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.cols,d=>{var f,u,p;return e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:(f=r(d.field))!=null&&f.wholeRow?24:((u=c.cols)==null?void 0:u.length)==1&&!((p=d.field)!=null&&p.includes("classify"))&&t.fields.length>6?12:d.span},{default:e.withCtx(()=>{var g,B;return[(g=d.field)!=null&&g.includes("classify")&&((B=r(d.field))!=null&&B.label)?(e.openBlock(),e.createElementBlock("div",xl,e.toDisplayString(r(d.field).label),1)):e.renderSlot(a.$slots,"default",{key:1,field:r(d.field)},void 0,!0)]}),_:2},1032,["span"])}),256))]),_:2},1024))),256))]))}},[["__scopeId","data-v-16950b22"]]),Sl={style:{width:"100%"}},Cl={class:"footer"},$l={key:1},Vl=R({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.ref(!1),i=o,c=$o(i.config.formLayout||[]),d=i.config.formStyleConfig||{labelPosition:"top",labelWidth:100},f=e.reactive({...i.data}),u=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,V)=>(E[V.code]=y(V.rules),E),{}),g=e.computed(S),B=e.computed(()=>i.config.fields.filter(E=>{const V=E.editable(f,r),O=E.visible(f,r);return E.disabled=O&&!V,V||O}));function y(E){return typeof E=="object"?E:typeof E=="function"?E(f):[]}function m(E){a.value=!0,s("submit",E,f,()=>{a.value=!1})}async function x(){await u.value.validate(async(E,V)=>{var G,K;if(!E)return console.log("error submit!",V),!1;const O=(G=i.config.fields.find(re=>["images","attachments","attachment"].includes(re.type)))==null?void 0:G.code,I={...f};if(O&&(I[O]=(K=I[O])==null?void 0:K.map(re=>re.id)),i.config.submitConfirm){await i.config.submitConfirm(I)&&m(I);return}m(I)})}function k(){s("remove",f)}function _(){if(i.config.removeConfirm){i.config.removeConfirm(f,k);return}w.ElMessageBox.confirm(i.config.delText,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{k()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function S(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(r,f):!0}return e.watch(()=>({...f}),(E,V)=>{const I=Object.keys(E).filter(K=>V[K]!==E[K]).map(K=>{var re;return(re=u.value)==null||re.clearValidate(K),{field:K,newValue:E[K],oldValue:V[K]}});B.value.filter(K=>!K.disabled).forEach(K=>{K.formChange&&K.formChange(f,I)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(V=>{f[V]=E[V]})},{immediate:!0}),(E,V)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:u,model:f,"label-width":e.unref(d).labelWidth,"label-position":e.unref(d).labelPosition,rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Bl,{layout:e.unref(c),fields:B.value},{default:e.withCtx(({field:O})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:O.code,label:O.label,prop:O.code},{default:e.withCtx(()=>[e.createElementVNode("div",Sl,[O!=null&&O.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.editor),{key:0,modelValue:f[O.code],"onUpdate:modelValue":I=>f[O.code]=I,field:O,disabled:O.disabled,"form-data":f,"domain-config":i.config,row:f},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config","row"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${O.code}(${O.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Cl,[f.id&&!f.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",icon:e.unref(ma),plain:"",type:"danger",onClick:_},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1},8,["icon"])):(e.openBlock(),e.createElementBlock("div",$l)),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",icon:e.unref(el),type:"primary",loading:a.value,onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["icon","loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","label-width","label-position","rules"]))}},[["__scopeId","data-v-5334c489"]]);function Ol(){return et().idempotentUrl?he.get(et().idempotentUrl).then(o=>o.data):""}const Pt={getValue:Ol},Dl={style:{"font-weight":"700","font-size":"22px",color:"#333"}},Cn={__name:"FormEditor",props:{modelValue:{type:Boolean},config:{type:Object},data:{type:Object},title:{type:String},removable:{type:Boolean,default:!1}},emits:["update:modelValue","submit","remove"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.ref(a.data),c=e.computed(()=>({...i.value,idempotentToken:f.value})),d=e.computed(()=>a.config.fields.filter(m=>{var x;if(!((x=m.code)!=null&&x.includes("classify")))return m.visible(c,r)}).length>=6?"60%":"40%"),f=e.ref(""),u=e.computed({get(){return a.modelValue},set(y){s("update:modelValue",y)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`新增${a.config.name}`);function g(y,m,x){i.value=m,s("submit",y,async()=>{f.value=await Pt.getValue(),x()})}function B(y,m){s("remove",y,async()=>{f.value=await Pt.getValue(),m()})}return e.watch(()=>u,async()=>{f.value=await Pt.getValue()},{immediate:!0}),(y,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:u.value,"onUpdate:modelValue":m[0]||(m[0]=x=>u.value=x),width:d.value,top:"20px",title:null,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":2e3,style:{"border-radius":"12px"}},{title:e.withCtx(()=>[e.createElementVNode("div",Dl,e.toDisplayString(p.value),1)]),default:e.withCtx(()=>[e.createVNode(Vl,{config:a.config,data:c.value,removable:a.removable,onSubmit:g,onRemove:B},null,8,["config","data","removable"])]),_:1},8,["modelValue","width"]))}},Tl={__name:"RowActionFormEditor",props:{row:{type:Object},text:{type:String},code:{type:String},fields:{type:Array},onSubmit:{type:Function},type:{type:String,default:"primary"},restRepeat:{type:Function,default:()=>""},rest:{type:Object},formStyleConfig:{type:Object}},setup(o){const t=o,n=e.ref(t.row),r=e.ref(!1),s=e.shallowRef(null),a=U.useRoute(),i=Y(a),c=e.computed(()=>{const p=t.formStyleConfig||{};return{...{labelPosition:"top",labelWidth:100},...p}}),d=da("simple",{simple:!0,code:t.code,fields:t.fields,formStyleConfig:c.value});Promise.all(d.fields).then(p=>{d.fields=p,d.restRepeat=t.restRepeat,d.rest=t.rest,d.formStyleConfig=c.value,s.value=d});async function f(){const p=t.rest;if(p!=null&&p.getOne){const{data:g}=await p.getOne({...t.row,...i});n.value=g}r.value=!0}function u(p,g){t.onSubmit(p,g).then(()=>{r.value=!1,w.ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"}),console.log("success")}).catch(()=>{console.log("请求失败"),g()})}return(p,g)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),r.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=B=>r.value=B),title:t.text,config:s.value,data:n.value,onSubmit:u},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},Nl={class:"not-found"},fe=R({__name:"EmptyTip",props:{text:{type:String,default:"--"}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("span",Nl,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-4d787802"]]),ba={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Nf)),r=et().fileUploadUrl,s=t,a=o,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(u){let p=-1;u.id&&(p=i.value.findIndex(g=>g.id===u.id)),u.url&&(p=i.value.findIndex(g=>g.url===u.url)),p>=0&&(i.value.splice(p,1),s("update:modelValue",i.value))}function f(u){console.log(u),w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),he.post(r,u).then(p=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const g=c(p.data);i.value=i.value?[...i.value,g]:[g],s("update:modelValue",i.value)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"})})}return e.watch(()=>a.modelValue,async()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(n),{images:i.value,props:a.field.props,onOnUpload:f,onOnRemove:d},null,8,["images","props"])]))}},Fe=De.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(o){o&&(this.mode=o)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),kt=(o,t,n,r)=>De.defineStore(`${t}-${o}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Fl(o,t,this.filters,n,r)}},actions:{change(s){this.filters={...this.filters,...s},Vo(o,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},Vo(o,t,this.filters)}}});function Fl(o,t,n,r,s){let i={...Al(o,t,r),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),Vo(o,t,i)}function Al(o,t,n){const r=`filters---${t}---${o}`;let s={};return localStorage.getItem(r)&&(s=JSON.parse(localStorage.getItem(r))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function Vo(o,t,n){const r=`filters---${t}---${o}`,s=jl(n);return localStorage.setItem(r,JSON.stringify(s)),s}function jl(o){return Object.keys(o).filter(t=>o[t]!==null&&o[t]!==void 0&&o[t]!=="").reduce((t,n)=>(t[n]=o[n],t),{})}const Rl={class:"sorters-box"},Il=["onClick"],Ml={class:"sorters-label"},Ll={class:"sorters-arrow-box"},Ul=["onClick"],zl=["onClick"],Hl=R({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(o,{emit:t}){const n=t,r=o,s=e.ref([]);async function a(){typeof r.sorters.sortersList=="function"?s.value=await r.sorters.sortersList():s.value=r.sorters.sortersList}a(),e.watch(()=>r.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(r.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let u=0;u<r.value.length;u++){const p=r.value[u];f.field===p.field&&(f.order=p.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const u=s.value;f?u[d].order=f:u[d].order?u[d].order==="ASC"?u[d].order="DESC":u[d].order==="DESC"&&(u[d].order=""):u[d].order="ASC",n("updateSorters",u.filter(p=>p.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:g=>c(p,"")},[e.createElementVNode("div",Ml,e.toDisplayString(u.name),1),e.createElementVNode("div",Ll,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",u.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(g=>c(p,"ASC"),["stop"])},null,10,Ul),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",u.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(g=>c(p,"DESC"),["stop"])},null,10,zl)])],8,Il))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),Pl={class:"ranges-box"},ql={class:"range-item"},Wl={class:"range-label"},Gl={class:"range-input-box"},Ql=R({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive(r.ranges.rangesList);e.watch(()=>r.value,()=>{a()});function a(){r.value&&r.value.length>0?s.forEach(c=>{r.value.forEach(d=>{c.field===d.field&&(c.min=d.min?Number(d.min):null,c.max=d.max?Number(d.max):null)})}):s.forEach(c=>{c.min=null,c.max=null})}function i(c,d,f){const u=[...s];u.forEach(p=>{p.field===d&&(p[f]=c)}),n("updateRanges",u.filter(p=>p.min||p.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",ql,[e.createElementVNode("div",Wl,e.toDisplayString(f.name),1),e.createElementVNode("div",Gl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":u=>f.min=u,"controls-position":"right",class:"input-box",onChange:u=>{i(u,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":u=>f.max=u,"controls-position":"right",class:"input-box",type:"number",onChange:u=>{i(u,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Yl={key:0},Kl=R({__name:"FiltersEditor",props:{settings:{type:Object}},setup(o){const t=o,n={label:"name",children:"children",value:"id"},r=U.useRoute(),s=Y(r),a=e.ref([]),i=e.reactive({}),c=e.reactive({}),d=kt(t.settings.code,r.path,t.settings.filters,t.settings.filterHook)();d.$subscribe((_,S)=>{S.filters.isDeleted!==i.isDeleted&&(Object.keys(i).forEach(E=>{i[E]=void 0}),i.isDeleted=S.filters.isDeleted)});function f(_){return typeof _=="boolean"?_:typeof _=="function"?_(s):!0}async function u(_,S){var E;if(typeof _.options=="function")c[_.code]=await _.options(i,s,S);else if(Array.isArray(_.options))c[_.code]=_.options;else if(typeof _.options=="object"){const V=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(!S&&Array.isArray(i[_.code])&&i[_.code].length>0)c[_.code]=[],i[_.code].forEach(O=>{V.getOne({id:O}).then(I=>{c[_.code].push({code:I.data[_.options.data.value]||I.data.id,name:I.data[_.options.data.label]||I.data.name})})});else if(!S&&!Array.isArray(i[_.code])&&i[_.code])V.getOne({id:i[_.code]}).then(O=>{c[_.code]=[{code:O.data[_.options.data.value]||O.data.id,name:O.data[_.options.data.label]||O.data.name}]});else{const O=_.options.query.keyWord.toString(),I=_.options.method?_.options.method:"getList";_.options.url[I]({..._.options.query,[O]:S}).then(G=>{c[_.code]=G.data.rows.map(K=>({code:K[_.options.data.value]||K.id,name:K[_.options.data.label]||K.name}))})}}if(c[_.code]&&_.type!="tree-select"){const V=c[_.code].map(O=>O.code);i[_.code]&&(_.multiple?i[_.code]=i[_.code].filter(O=>(console.log(V.includes(O)),V.includes(O))):i[_.code]=(E=c[_.code].find(O=>O.code==i[_.code]))==null?void 0:E.code,x())}}function p(_){if(_.remote)return S=>{u(_,S)}}function g(_){i.sorters=_,x()}function B(_){i.filters=_}function y(){Object.keys(i).forEach(_=>{i[_]=void 0}),a.value=Object.keys(t.settings.filters).filter(_=>f(t.settings.filters[_].visible)).map(_=>{const S={...t.settings.filters[_],code:_};return i[_]=m(_),(S.type==="select"||S.type==="selectV2"||S.type==="tree"||S.type==="tree-select")&&u(S),{...S,dateType:S.dateType||"datetimerange",format:S.format||"YYYY-MM-DD HH:mm:ss"}}).filter(_=>_.code!=="isDeleted")}function m(_){const S=t.settings.filters[_],E=d.validFilters[_];return S.type==="boolean"&&typeof E!="boolean"?S.value:E}function x(){let _=JSON.parse(JSON.stringify(i));const S=t.settings.filterHook;S!=null&&S.preSubmit&&(_=S.preSubmit(_,s)),_!==!1&&d.change(_)}function k(){d.$reset({}),y(),x()}return e.watch(()=>t.settings,()=>{y(),x()},{immediate:!0}),e.watch(()=>({...i}),(_,S)=>{const V=Object.keys(_).filter(O=>S[O]!==_[O]).map(O=>({field:O,newValue:_[O],oldValue:S[O]}));a.value.forEach(O=>{O.formChange&&O.formChange(i,V)})}),(_,S)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(e.unref(w.ElForm),{model:i,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,E=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[E.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",placeholder:`是否${E.name}`,"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${E.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${E.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:E.name,multiple:E.multiple,"collapse-tags":"",class:e.normalizeClass(E.multiple?"tags-selects-input":""),"multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),"value-on-clear":null,onChange:x},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c[E.code],V=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:V.code,label:V.name,value:V.code,title:V.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):E.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,filterable:"",options:c[E.code]?c[E.code]:[],props:{label:"name",value:"code"},multiple:E.multiple,placeholder:E.name,clearable:"","value-on-clear":null,onChange:x},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):E.type==="sorters"?(e.openBlock(),e.createBlock(Hl,{key:3,value:i[E.code],sorters:E,onUpdateSorters:g},null,8,["value","sorters"])):E.type==="range"?(e.openBlock(),e.createBlock(Ql,{key:4,value:i[E.code],ranges:E,onUpdateRanges:B},null,8,["value","ranges"])):E.type==="tree-select"?(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{key:5,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,placeholder:E.name,data:c[E.code],props:n,"node-key":"id",multiple:E.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"","check-strictly":E.checkStrictly,remote:"","show-checkbox":"",filterable:"","collapse-tags":"","multiple-limit":E.multipleLimit?E.multipleLimit:0,"remote-method":p(E),onCheck:x,onChange:x},null,8,["modelValue","onUpdate:modelValue","placeholder","data","multiple","check-strictly","multiple-limit","remote-method"])):E.type==="date"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:7,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):E.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:8,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,type:E.dateType,format:E.format,"value-format":E.format,"start-placeholder":E.name,"end-placeholder":E.name,placeholder:E.name},null,8,["modelValue","onUpdate:modelValue","type","format","value-format","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:9,modelValue:i[E.code],"onUpdate:modelValue":V=>i[E.code]=V,modelModifiers:{trim:!0},placeholder:E.name,type:E.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),a.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{icon:e.unref(ml),type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1},8,["icon"]),e.createVNode(e.unref(w.ElButton),{icon:e.unref(pl),onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1},8,["icon"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-8ce141d0"]]),Jl={class:"data-page-title"},Xl={class:"title"},Zl={class:"data-page-toolbar"},vl={key:0,class:"show-detail-info"},ec=R({__name:"DataTableHeader",props:{settings:{type:Object},tableName:{type:String}},setup(o){const t=o,n=e.ref([]),r=t.tableName?t.tableName:t.settings.name,s=U.useRoute(),a=Y(s),i=Fe(),c=kt(t.settings.code,s.path,t.settings.filters,t.settings.filterHook)(),d=e.useSlots(),f=e.computed(()=>c.validFilters.isDeleted||!1),u=e.computed(()=>t.settings.displayMode.normalMode);function p(){c.$reset({isDeleted:!f.value})}async function g(){var x,k;const y=`table-view-${s.path}-${t.settings.code}`,m=localStorage.getItem(y)?localStorage.getItem(y):u.value;if(i.change(m),(x=t.settings)!=null&&x.showDetailInfo){const _=(k=t.settings)==null?void 0:k.showDetailInfo;n.value=await _(a)}}function B(y){i.change(y);const m=`table-view-${s.path}-${t.settings.code}`;localStorage.setItem(m,i.mode)}return e.onMounted(g),(y,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Xl,e.toDisplayString(f.value?`已删除的${e.unref(r)}`:e.unref(r)),1),e.createElementVNode("div",Zl,[e.unref(d).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:B},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"list"},{default:e.withCtx(()=>[e.createTextVNode(" 列表 ")]),_:1}),e.createVNode(e.unref(w.ElDropdownItem),{command:"grid"},{default:e.withCtx(()=>[e.createTextVNode(" 网格 ")]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Mi))]),_:1})]),_:1})]),_:1}),t.settings.filters.isDeleted?(e.openBlock(),e.createBlock(e.unref(w.ElDropdown),{key:1,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownItem),{command:"deleted",onClick:p},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(f.value?"未删除":"已删除"),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),n.value.length?(e.openBlock(),e.createElementBlock("div",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,x=>(e.openBlock(),e.createBlock(e.unref(w.ElTag),{key:x.auditStatus,type:x.type,effect:"dark",class:"show-detail-info-item"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name)+": "+e.toDisplayString(x.num),1)]),_:2},1032,["type"]))),128))])):e.createCommentVNode("",!0),e.createVNode(Kl,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-1a5f0667"]]),tc={class:"kst-field-row-id"},nc={key:0},oc={key:1,class:"mono-data"},rc={key:1},wa=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=e.useSlots(),n=U.useRoute(),r=o,s=n.meta.side,a=e.computed(()=>r.row[r.field.code]),i=e.computed(()=>({path:`/${s}/${r.field.domain}/${a.value}`,query:{...Y(n),...r.field.rowQuery(r.row)}}));function c(){return r.field.isRouter(r.row,Y(n))}return(d,f)=>{const u=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",tc,[a.value?(e.openBlock(),e.createElementBlock("span",nc,[c()?(e.openBlock(),e.createBlock(u,{key:0,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(a.value),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",oc,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(d.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(a.value)+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.value),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",rc," NO ID "))])}}},[["__scopeId","data-v-00021e61"]]);function ac(o){w.ElMessage(o)}const sc={show:ac},ka=10,$n=De.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(o,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ka&&(this.history=this.history.slice(2-ka),this.history.unshift(this.root)),this.history.push({title:o,code:t,path:n}))},setupRootPath(o,t){this.root={title:o,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(o){this.history=this.history.filter(t=>t.code!=o)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(o,t){const n=this.history.find(r=>r.code==o);n&&(n.title=t)}}}),Oo={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(o){var y;const t=$n(),n=Fe(),r=U.useRoute(),s=U.useRouter(),a=Y(r),i=o,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var m,x;return i.row.deletedAt?!1:(m=i.operations)!=null&&m.updatable?!0:!!((x=i.operations)!=null&&x.removable)}),u=e.ref((y=i.operations)==null?void 0:y.removable);async function p(){const m=i.settings.formHook,x=i.settings.btnVisible,k=i.settings.rest,{data:_}=await k.getOne({...i.row,...a});c.value=_,m.setupUpdate&&(c.value=await m.setupUpdate(c.value,a)),x.showRemove&&(u.value=x.showRemove(c.value)),d.value=!0}function g(m,x){const k=i.settings.formHook,_=i.settings.rest;Object.keys(a).forEach(S=>{m[S]=a[S]}),k!=null&&k.preUpdateSubmit&&(m=k.preUpdateSubmit(m)),_.update(m).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{x()})}function B(m,x){i.settings.rest.remove(m).then(()=>{sc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(_=>{r.fullPath.includes(_.path)&&(t.remove(_.code),s.back())}),n.fireRemoved()}).catch(()=>{x()})}return(m,x)=>f.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Zi),type:"primary",onClick:p},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:d.value,"onUpdate:modelValue":x[0]||(x[0]=k=>d.value=k),config:i.settings,data:c.value,removable:u.value,onSubmit:g,onRemove:B},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},ic=o=>(e.pushScopeId("data-v-0941be48"),o=o(),e.popScopeId(),o),lc={class:"data-grid-wrapper"},cc={key:0,class:"cover"},dc=ic(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),uc={class:"header"},fc={key:0},pc={class:"key"},hc={class:"value"},mc={key:1,class:"footer tools"},gc=R({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(o){const t=U.useRoute(),n=Y(t),r=e.useSlots(),s=o,a=kt(s.settings.code,t.path,s.settings.filters,s.settings.filterHook)(),{filters:i}=De.storeToRefs(a),c=e.ref(i.value),d=e.shallowRef([]),f=e.shallowRef(null),u=e.ref(!1);async function p(){return await s.settings.showEdit(n,"grid")}e.watchEffect(()=>{p().then(k=>{u.value=k})});const g=e.computed(()=>{var k,_;return!!((k=s.operations)!=null&&k.updatable&&u||(_=s.operations)!=null&&_.removable&&u)}),B=e.computed(()=>s.settings.displayMode.gridWidth),y=e.computed(()=>s.settings.displayMode.heightAuto);function m(){f.value=s.settings.fields.find(k=>k.code==="id"),d.value=s.settings.fields.filter(k=>k.code===s.settings.coverField||k.code===s.settings.nameField||k.code==="id"?!1:k.showInList(n,c.value))}function x(k){return s.settings.nameField?k[s.settings.nameField]:k.name?k.name:`${k.id}`}return e.watch(i,k=>{c.value=k,m()}),m(),(k,_)=>(e.openBlock(),e.createElementBlock("div",lc,[o.data.length===0?(e.openBlock(),e.createBlock(e.unref(w.ElEmpty),{key:0,description:"暂无数据"})):(e.openBlock(),e.createBlock(e.unref(w.ElRow),{key:1,gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},span:B.value?B.value:24,xs:B.value?{}:24,sm:B.value?{}:12,md:B.value?{}:8,lg:B.value?{}:6,xl:B.value?{}:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(r).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",cc,[e.unref(r).cover?e.renderSlot(k.$slots,"cover",{key:0,row:S},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:S[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[dc]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",uc,[e.createVNode(wa,{field:f.value,row:S},e.createSlots({_:2},[S[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x(S)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",{class:e.normalizeClass(y.value?"body heightAuto":"body")},[e.unref(r).body?(e.openBlock(),e.createElementBlock("div",fc,[e.renderSlot(k.$slots,"body",{row:S},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,E=>(e.openBlock(),e.createElementBlock("div",{key:E.code,class:"field mono-data"},[e.createElementVNode("div",pc,e.toDisplayString(E.label)+" ",1),e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E.display),{field:E,row:S,mode:"grid"},null,8,["field","row"]))])]))),128))],2),e.unref(r).actions||g.value?(e.openBlock(),e.createElementBlock("div",mc,[e.unref(r).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(k.$slots,"actions",{row:S},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:S,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["span","xs","sm","md","lg","xl"]))),256))]),_:3}))]))}},[["__scopeId","data-v-0941be48"]]);function _c(o,t){const n=o.fields.map(s=>s.code),r=Object.keys(t);n.forEach(s=>{r.includes(s)||console.error(`${o.code}.${s} : 与服务端数据不匹配`)})}const yc=o=>(e.pushScopeId("data-v-5cf3ddfc"),o=o(),e.popScopeId(),o),bc={class:"empty-box"},wc=yc(()=>e.createElementVNode("div",{class:"empty-text"},"暂无数据",-1)),Ea=R({__name:"DataList",props:{settings:{type:Object},data:{type:Array,default:()=>[]},operations:{type:Object,default:()=>{}},operationsWidth:{type:Number,default:100},actionsWidth:{type:Number,default:150}},emits:["sort-column","select-change","enable-item"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=e.useSlots(),i=o,c={background:"#F3F6F9",color:"#303133"},d=kt(i.settings.code,n.path,i.settings.filters,i.settings.filterHook)(),{filters:f}=De.storeToRefs(d),u=e.ref(f.value),p=e.shallowRef([]),g=e.ref(!1);async function B(){return await i.settings.showEdit(r,"list")}e.watchEffect(()=>{B().then(S=>{g.value=S})});const y=e.computed(()=>{var S,E;return!!((S=i.operations)!=null&&S.updatable&&g.value||(E=i.operations)!=null&&E.removable&&g.value)});function m(S){s("sort-column",S)}function x(S){s("enable-item",S)}function k(){var E,V;const S=[...i.settings.fields];if((E=i.settings)!=null&&E.extendTableColumnfields){const O=i.settings.extendTableColumnfields((V=i.data)==null?void 0:V[0]);S.push(...O)}p.value=S.filter(O=>O.showInList(r,u.value))}function _(S){s("select-change",{routeQuery:r,data:S})}return k(),e.watch(()=>i.data,()=>{i.data.length>0&&(_c(i.settings,i.data[0]),k())}),e.watch(f,S=>{u.value=S,k()}),(S,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","header-cell-style":c,"row-key":"id",onSelectionChange:_,onSortChange:m},{empty:e.withCtx(()=>[e.createElementVNode("div",bc,[e.createVNode(e.unref(w.ElEmpty),{class:"empty-img",description:" ",image:"https://bloodcare-1251596343.cos.ap-shanghai.myqcloud.com/assets/empty/empty-web.png","image-size":"400"}),wc])]),default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,V=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:V.code,label:V.label,width:V.width,prop:V.code,sortable:V.sortable?"custom":!1,fixed:V.fixed},e.createSlots({_:2},[V.type==="switch"?{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{field:V,row:O,mode:"list",onEnable:x},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:O})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.display),{key:O.updatedAt,field:V,row:O,mode:"list"},null,8,["field","row"]))]),key:"1"}]),1032,["label","width","prop","sortable","fixed"]))),128)),e.unref(a).actions?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:0,label:"管理",fixed:"right",width:i.actionsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(S.$slots,"actions",{row:V},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:V})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Oo,{row:V,settings:i.settings,operations:i.operations},null,8,["row","settings","operations"])]),_:2},1024)]),_:1},8,["width"])):e.createCommentVNode("",!0)]),_:3},8,["data"]))}},[["__scopeId","data-v-5cf3ddfc"]]),kc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(o){const t=Fe();t.$reset();const{mode:n}=De.storeToRefs(t),r=e.useSlots(),s=o,a=e.shallowRef(Ea);function i(c){c=="grid"?a.value=gc:a.value=Ea}return e.watch(n,c=>{i(c)}),(c,d)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),e.normalizeProps(e.guardReactiveProps(s)),e.createSlots({_:2},[e.renderList(e.unref(r),(f,u)=>({name:u,fn:e.withCtx(p=>[e.renderSlot(c.$slots,u,e.normalizeProps(e.guardReactiveProps(p||{})))])}))]),1040))}},Ec={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(o){const t=Fe(),n=U.useRoute(),r=Y(n),s=o,a=e.ref({}),i=e.ref(!1),c=e.ref(!1);async function d(){var p;return await((p=s.operations)==null?void 0:p.creatable)}e.watchEffect(()=>{d().then(p=>{c.value=p})});async function f(){const p=s.settings.formHook,g=s.settings.fields.reduce((B,y)=>(B[y.code]=y.default,B),{});a.value=g,p.setupCreate&&(a.value=await p.setupCreate(a.value,r)),i.value=!0}function u(p,g){const B=s.settings.formHook,y=s.settings.rest;Object.keys(r).forEach(m=>{p[m]=r[m]}),B!=null&&B.preCreateSubmit&&(p=B.preCreateSubmit(p)),y.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{g()})}return(p,g)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,icon:e.unref(Hi),type:"success",onClick:f},{default:e.withCtx(()=>[e.createTextVNode(" 新增 "),i.value?(e.openBlock(),e.createBlock(Cn,{key:0,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=B=>i.value=B),config:s.settings,data:a.value,removable:!1,onSubmit:u},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["icon"])):e.createCommentVNode("",!0)}},xa={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object},mode:{type:String}},setup(o){const t=U.useRouter(),n=Fe(),r=o,s=e.shallowRef([]);let a="";async function i(d,f){if(a=w.ElLoading.service({fullscreen:!0}),d.path){a.close(),c(d,f);return}const u=await Pt.getValue();try{await d.action({...f,...r.query,idempotentToken:u}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,r.query))}return e.watch(()=>r.row,()=>{s.value=r.settings.rowActions(r.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.isVisible(r.row,r.query,r.mode)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{key:0,row:o.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:u.type?u.type:"primary",onClick:p=>i(u,r.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},xc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object},filterForm:{type:Object}},setup(o){const t=Fe(),n=o,r=n.query,s=e.ref({}),a=e.shallowRef([]),i=e.computed(()=>{var u,p;return((p=(u=n.tableDataSelect)==null?void 0:u.data)==null?void 0:p.length)>0});e.ref(!1),e.watch(()=>n.filterForm,u=>{s.value=u});const c=e.ref(!1);async function d(u){c.value=!0;const p=await Pt.getValue();try{await u.action({...n.tableDataSelect,filterForms:s.value,query:r,idempotentToken:p}),c.value=!1,t.fireUpdated()}catch{c.value=!1,t.fireUpdated()}}function f(u){return typeof f=="boolean"?u:typeof u=="function"?u(s.value,r):!0}return e.watch(()=>n.row,()=>{a.value=n.settings.pageActions(n.query)},{immediate:!0}),(u,p)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f(g.isVisible)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.component),{key:0,item:g,settings:o.settings,query:e.unref(r),"table-data-select":o.tableDataSelect,"filter-form":o.filterForm},null,8,["item","settings","query","table-data-select","filter-form"])):g.tooltip&&g.tooltip.content?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:1,effect:g.tooltip.effect||"dark",content:g.tooltip.content||"default tip",placement:g.tooltip.placement||"top-start"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"])]),_:2},1032,["effect","content","placement"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,type:g.type,loading:c.value,disabled:!g.enable&&!i.value,onClick:B=>d(g)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},Bc={class:"pagination-wrapper"},Sc=R({__name:"Pagination",props:{total:{type:Number},page:{type:Number,default:1},size:{type:Number,default:30},pageSizes:{type:Array,default:()=>[30,60,90,120]}},emits:["page-change"],setup(o,{emit:t}){const n=t,r=U.useRouter(),s=U.useRoute(),a=o,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,g=>{d.value=g}),e.watch(()=>[s.query.page,s.query.pageSize],()=>{!s.query.page||!s.query.pageSize?(i.value=1,c.value=30):(i.value=parseInt(s.query.page),c.value=parseInt(s.query.pageSize)),n("page-change",{page:i.value,size:c.value})});function u(g){i.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function p(g){c.value=g,r.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(g,B)=>(e.openBlock(),e.createElementBlock("div",Bc,[e.createVNode(e.unref(w.ElPagination),{background:"","page-size":c.value,"page-sizes":f.value,total:d.value,"current-page":o.page,layout:"->,total,sizes, prev, pager, next, jumper",onCurrentChange:u,onSizeChange:p},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-a8f2f51d"]]);var Ba;const Sa=typeof window<"u";Sa&&((Ba=window==null?void 0:window.navigator)!=null&&Ba.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Cc(o){return typeof o=="function"?o():e.unref(o)}function $c(o){return o}function Vc(o){return e.getCurrentScope()?(e.onScopeDispose(o),!0):!1}function Oc(o,t=!0){e.getCurrentInstance()?e.onMounted(o):t?o():e.nextTick(o)}function Dc(o){var t;const n=Cc(o);return(t=n==null?void 0:n.$el)!=null?t:n}const Tc=Sa?window:void 0;function Nc(o,t=!1){const n=e.ref(),r=()=>n.value=!!o();return r(),Oc(r,t),n}const Ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a="__vueuse_ssr_handlers__";Ca[$a]=Ca[$a]||{};var Va=Object.getOwnPropertySymbols,Fc=Object.prototype.hasOwnProperty,Ac=Object.prototype.propertyIsEnumerable,jc=(o,t)=>{var n={};for(var r in o)Fc.call(o,r)&&t.indexOf(r)<0&&(n[r]=o[r]);if(o!=null&&Va)for(var r of Va(o))t.indexOf(r)<0&&Ac.call(o,r)&&(n[r]=o[r]);return n};function Oa(o,t,n={}){const r=n,{window:s=Tc}=r,a=jc(r,["window"]);let i;const c=Nc(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Dc(o),p=>{d(),c.value&&s&&p&&(i=new ResizeObserver(t),i.observe(p,a))},{immediate:!0,flush:"post"}),u=()=>{d(),f()};return Vc(u),{isSupported:c,stop:u}}var Da;(function(o){o.UP="UP",o.RIGHT="RIGHT",o.DOWN="DOWN",o.LEFT="LEFT",o.NONE="NONE"})(Da||(Da={}));var Rc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ic=Object.prototype.hasOwnProperty,Mc=Object.prototype.propertyIsEnumerable,Na=(o,t,n)=>t in o?Rc(o,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[t]=n,Lc=(o,t)=>{for(var n in t||(t={}))Ic.call(t,n)&&Na(o,n,t[n]);if(Ta)for(var n of Ta(t))Mc.call(t,n)&&Na(o,n,t[n]);return o};Lc({linear:$c},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Do=R({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object},hasMany:{type:Object}},setup(o){var Ye,Bt;e.useCssVars(z=>({"58e286a0":Pe.value}));const t=U.useRoute(),n=Y(t),r=o,s=kt(r.settings.code,t.path,r.settings.filters,r.settings.filterHook)(),{filters:a}=De.storeToRefs(s),i=(Ye=r==null?void 0:r.hasMany)==null?void 0:Ye.tableName;e.watch(a,z=>{_.value=z,G()});const c=Fe(),{created:d,updated:f,removed:u}=De.storeToRefs(c);e.watch([d,f,u],([z,Z,M])=>{(z||Z||M)&&G()});const p=e.ref(!0),g=e.ref([]),B=e.ref(0),y=e.ref({}),m=e.ref({}),x=e.ref(null),k=e.ref(null),_=e.ref({}),S=e.ref(parseInt(t.query.pageSize)||30),E=e.ref(parseInt(t.query.page)||1),V=(Bt=r.hasMany)==null?void 0:Bt.tableContentHeight;function O(z){let Z=null;if(z.order==="ascending"?Z="ASC":z.order==="descending"&&(Z="DESC"),_.value.sorters){let M=[];_.value.sorters.some(we=>we.field===z.prop)?_.value.sorters.forEach(we=>{we.field===z.prop&&(we.order=Z,we.name||M.push(we)),we.name&&M.push(we)}):M=[..._.value.sorters,{field:z.prop,order:Z}],_.value.sorters=M}else _.value.sorters=[{field:z.prop,order:Z}];G()}function I(){m.value=r.settings.operations(n)}function G(z){p.value=!0,z=="again"&&(E.value=E.value-1<1?1:E.value-1);const Z={..._.value,...n,...r.query,page:E.value,size:S.value};r.settings.rest.getList(Z).then(M=>{y.value.data=[],g.value=M.data.rows,B.value=M.data.count,p.value=!1,B.value&&g.value.length==0&&G("again")})}function K(z){E.value=z.page,S.value=z.size,G()}function re(z){const Z={id:z.id,enable:!z.enable};r.settings.rest.enable(Z).then(()=>{G()})}function D(z){if(z.enable){const Z=z.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${Z}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{re(z)}).catch(()=>{})}else re(z)}function L(z){y.value=z}const X=e.ref(0),Se=e.ref(0);Oa(x,z=>{var Z;X.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0}),Oa(k,z=>{var Z;Se.value=((Z=z[0])==null?void 0:Z.contentRect.height)||0});const Pe=e.computed(()=>V&&B.value>0?`${V-14}px`:`calc(100% - ${X.value+Se.value+14}px)`);return I(),(z,Z)=>(e.openBlock(),e.createElementBlock("div",{key:r.settings.code,style:{height:"100%"},class:"aa"},[e.createElementVNode("div",{ref_key:"pageHeader",ref:x,class:"header-wrap"},[e.createVNode(ec,{settings:r.settings,"table-name":e.unref(i)},{operations:e.withCtx(()=>[e.createVNode(xc,{settings:r.settings,"table-data-select":y.value,query:e.unref(n),"filter-form":_.value},null,8,["settings","table-data-select","query","filter-form"]),e.createVNode(Ec,{settings:r.settings,operations:m.value},null,8,["settings","operations"])]),_:1},8,["settings","table-name"])],512),e.withDirectives((e.openBlock(),e.createBlock(kc,{class:"data-table-box",data:g.value,operations:m.value,settings:r.settings,"actions-width":r.settings.actionsWidth,onSortColumn:O,onEnableItem:D,onSelectChange:L},e.createSlots({_:2},[r.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:M})=>[e.createVNode(xa,{mode:"list",row:M,settings:r.settings,query:e.unref(n)},null,8,["row","settings","query"])]),key:"0"}:void 0]),1032,["data","operations","settings","actions-width"])),[[e.unref(w.vLoading),p.value]]),r.settings.showPagination?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pagination",ref:k},[e.createVNode(Sc,{page:E.value,size:S.value,total:B.value,onPageChange:K},null,8,["page","size","total"])],512)):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-86ca027c"]]);/*! Element Plus v2.11.2 */var Uc={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},dropdown:{toggleDropdown:"切换下拉选项"},mention:{loading:"加载中"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const zc={__name:"TooltipText",props:{content:{type:[Number,String],default:""},lineClamp:{type:[Number,String],default:1},className:{type:String},tipShowLength:{type:[Number,String]},textType:{type:String}},setup(o){const t=o,n=e.computed(()=>t.content?t.content.toString():"");return(r,s)=>(e.openBlock(),e.createElementBlock("div",null,[n.value.length>t.tipShowLength?(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{key:0,content:n.value,effect:"light"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElText),{class:e.normalizeClass(t.className),type:t.textType,"line-clamp":t.lineClamp},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["class","type","line-clamp"])]),_:1},8,["content"])):(e.openBlock(),e.createBlock(e.unref(w.ElText),{key:1,type:t.textType,class:e.normalizeClass(t.className)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.value),1)]),_:1},8,["type","class"]))]))}},Hc={class:"header-box"},Pc={class:"header-box-left"},qc={class:"page-title"},Wc={class:"tabs-container"},Gc={class:"user-profile"},Qc=R({__name:"HeaderMenu",props:{config:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=$n(),s=e.ref("首页"),a=o,i=n.fullPath.split("/")[1],c=B();r.setupRootPath("首页",`/${i}/home`);function d(y){var S,E;const m=y.meta.side,x=y.params.domain;let k=(S=y.meta)==null?void 0:S.title,_=(E=y.meta)==null?void 0:E.code;if(m&&x){k=So()[m][y.params.domain].name,_=y.params.domain;const V=y.params.id;V&&V!="detail"&&(k=`${k} - ${y.params.id}`,_=`${y.params.domain}-${y.params.id}`)}else{const V=c.find(O=>O.route===y.path);V&&(k=V.title,_=V.route)}k&&_&&(r.push(k,_,y.fullPath),s.value=_)}function f(y){const m=r.history.find(x=>x.code==y.props.name);t.push(m.path)}function u(y){if(r.remove(y),y==s.value){const m=r.getLast();s.value=m.title,t.push(m.path)}}const p=(y,m)=>{const x=r.history.length;return y===0&&m==="self"||y<2&&m==="left"||y===x-1&&m==="right"||x===1&&m==="all"?!1:!(x<2&&m==="other")};function g(y,m){const x=[],k=r.history;switch(m){case"self":x.push(k[y].code);break;case"left":for(let _=0;_<y;_++)_!==0&&x.push(k[_].code);break;case"right":for(let _=y+1;_<k.length;_++)x.push(k[_].code);break;case"all":for(let _=0;_<k.length;_++)_!==0&&x.push(k[_].code);break;case"other":for(let _=1;_<k.length;_++)_!==y&&x.push(k[_].code);break}for(let _=0;_<x.length;_++)u(x[_])}function B(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,m)=>(e.openBlock(),e.createElementBlock("div",Hc,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",qc,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",Wc,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=x=>s.value=x),type:"card",class:"tabs",onTabClick:f,onTabRemove:u},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).history,(x,k)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:x.title!="首页",label:x.title,name:x.code},{label:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdown),{trigger:"contextmenu"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(w.ElDropdownMenu),null,{default:e.withCtx(()=>[p(k,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:_=>g(k,"self")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1}),e.createTextVNode(" 关闭当前标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:_=>g(k,"left")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1}),e.createTextVNode(" 关闭左侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:_=>g(k,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Gi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:_=>g(k,"all")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(al))]),_:1}),e.createTextVNode(" 关闭全部标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),p(k,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:_=>g(k,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(il))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(zc,{content:x.title,"line-clamp":1,"class-name":"tab-pane-label","tip-show-length":"6"},null,8,["content"])]),_:2},1024)]),_:2},1032,["closable","label","name"]))),256))]),_:1},8,["modelValue"]),e.createElementVNode("span",{class:"back-icon",onClick:m[1]||(m[1]=x=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Gc,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-906bae66"]]),Yc=o=>(e.pushScopeId("data-v-9a00f172"),o=o(),e.popScopeId(),o),Kc={key:2,class:"dot-wrapper"},Jc=[Yc(()=>e.createElementVNode("span",{class:"dot"},null,-1))],Fa=R({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(o){const t=o;return(n,r)=>o.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:o.data.title},{title:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data.children,s=>(e.openBlock(),e.createBlock(Fa,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:o.data.route,route:o.data.route,class:"menu-item"},{default:e.withCtx(()=>[o.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",Kc,Jc)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ya))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(o.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-9a00f172"]]),Xc=R({__name:"SideBar",props:{sideMenus:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=e.ref(n.fullPath),s=o,a=n.fullPath.split("/")[1],i=s.sideMenus[a];return e.watch(()=>t.currentRoute.value,()=>{var c;if((c=n.meta)!=null&&c.side){const d=n.meta.side;n.params.id=="detail"?r.value=`/${d}/${n.params.domain}/detail`:r.value=`/${d}/${n.params.domain}/list`}else r.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),{"wrap-class":"scrollbar-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":r.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(Fa,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-bbb38e99"]]),Zc=R({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(o){const t=U.useRoute(),n=o,r={...et(),...n.config},s=e.computed(()=>t.params.domain?t.params.domain:t.fullPath);return(a,i)=>{const c=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(e.unref(w.ElConfigProvider),{locale:e.unref(Uc)},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElContainer),{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElHeader),{class:"page-header"},{default:e.withCtx(()=>[e.createVNode(Qc,{config:r},{"user-profile":e.withCtx(()=>[e.renderSlot(a.$slots,"user-profile",{},void 0,!0)]),_:3})]),_:3}),e.createVNode(e.unref(w.ElContainer),{class:"page-content-container"},{default:e.withCtx(()=>{var d;return[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Xc,{"side-menus":r.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:e.normalizeClass(["page-content-main",(d=e.unref(t).fullPath)!=null&&d.includes("/list")?"list-main":""])},{default:e.withCtx(()=>[e.unref(t).params.domain?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(({Component:f,route:u})=>[e.createVNode(e.Transition,{name:"KxtFade",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f),{key:s.value}))]),_:2},1024)]),_:1})):(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1},8,["class"])]}),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-a8d15917"]]),vc={key:1,class:"loading-wrapper"},Aa=R({__name:"List",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=n.meta.side,s=t.domain||n.params.domain,a=e.shallowRef(null);return Ht(r,s).then(i=>{a.value=i}),(i,c)=>a.value?(e.openBlock(),e.createBlock(Do,{key:0,settings:a.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",vc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-2d9c8e98"]]),ed={key:0},td={class:"key"},nd={class:"value"},od={style:{color:"#111","font-size":"14px","font-weight":"500"}},rd={key:1,class:"loading-wrapper"},ja=R({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute(),a=Y(s),i=Fe(),{updated:c}=De.storeToRefs(i),d=e.ref(null),f=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],u=e.ref([]),p=e.computed(()=>[...r.settings.fields.filter(S=>S.showInDetail(d.value,{...a,...r.query})),...u.value]),g=e.computed(()=>p.value.find(k=>k.code===r.settings.coverField)),B=e.computed(()=>p.value.filter(k=>!f.includes(k.type)&&!k.extendDetail)),y=e.computed(()=>{var _;const k=(_=g.value)==null?void 0:_.code;return p.value.filter(S=>f.includes(S.type)||S.extendDetail).filter(S=>S.code!==k)}),m=e.computed({get(){return y.value.map(k=>k.code)},set(k){}});async function x(){r.settings.rest.getOne(r.query).then(k=>{k.data.isDeleted=!!k.data.deletedAt,k.data.custumFileds?Promise.all(Sn(k.data.custumFileds,"form-management-result")).then(_=>{u.value=_}):u.value=[],d.value=k.data,n("done",k.data)})}return e.watch(c,()=>{x()},{immediate:!0}),(k,_)=>(e.openBlock(),e.createElementBlock("div",null,[d.value?(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[g.value?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value.display),{field:g.value,row:d.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:g.value?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:S.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>{var E;return[e.createElementVNode("div",td,e.toDisplayString(S.label),1),e.createElementVNode("div",nd,[S.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.value.id),1)],64)):S.display?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{key:2,field:S,row:d.value,mode:"description"},null,8,["field","row"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((E=d.value[S.code])==null?void 0:E.toString()),1)],64))])]}),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),y.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:m.value,"onUpdate:modelValue":_[0]||(_[0]=S=>m.value=S),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,S=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:null,name:S.code,class:"mono-data"},{title:e.withCtx(()=>[e.createElementVNode("span",od,e.toDisplayString(S.label),1)]),default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S.display),{field:S,row:d.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",rd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-b4065dcd"]]),ad={key:0},sd={class:"group-item-head"},id={class:"key"},ld={class:"value"},cd={key:1,class:"loading-wrapper"},dd=R({__name:"DomainDescriptionGroup",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(o,{emit:t}){const n=t,r=o,s=U.useRoute();Y(s);const a=Fe(),{updated:i}=De.storeToRefs(a),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json","tree-select"],f=e.computed(()=>{var p,g;return((g=(p=r.settings)==null?void 0:p.detailGroupFields)==null?void 0:g.map(B=>{var m,x,k,_;const y=((x=(m=B==null?void 0:B.childrenFields)==null?void 0:m.filter(S=>d.includes(S.type)||S.extendDetail))==null?void 0:x.filter(S=>S.code!==(B==null?void 0:B.coverField)))||[];return{...B,coverField:(k=B==null?void 0:B.childrenFields)==null?void 0:k.find(S=>S.code===B.coverField),detailFields:(_=B==null?void 0:B.childrenFields)==null?void 0:_.filter(S=>!d.includes(S.type)&&!S.extendDetail),extendFields:y,activeFields:(y==null?void 0:y.map(S=>S.code))||[]}}))||[]});function u(){r.settings.rest.getOne(r.query).then(p=>{p.data.isDeleted=!!p.data.deletedAt,c.value=p.data,n("done",p.data)})}return e.watch(i,()=>{u()},{immediate:!0}),(p,g)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElCard),{class:"group-item",shadow:"hover",style:e.normalizeStyle(`background: ${B.background||"#fff"}`)},e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[B.coverField?(e.openBlock(),e.createBlock(e.unref(w.ElCol),{key:0,span:6,style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.coverField.display),{field:B.coverField,row:c.value},null,8,["field","row"]))]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:B.coverField?18:24},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.detailFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:y.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",id,e.toDisplayString(y.label),1),e.createElementVNode("div",ld,[y.code==="id"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.id),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{key:1,field:y,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:2},1024)]),_:2},1032,["span"])]),_:2},1024),B&&B.extendFields.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:B.activeFields,"onUpdate:modelValue":y=>B.activeFields=y,class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.extendFields,y=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:y.label,name:y.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.display),{field:y,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:2},[B.title?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",sd,[e.createVNode(e.unref(w.ElText),{class:"group-title",tag:"b",size:"large"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.title),1)]),_:2},1024)])]),key:"0"}:void 0]),1032,["style"]))),256))])):e.withDirectives((e.openBlock(),e.createElementBlock("div",cd,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-50c9cb06"]]),ud={class:"data-page-title"},fd={class:"title"},pd=R({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(o,{emit:t}){$n();const n=U.useRoute(),r=Y(n),s=o,a=e.ref("加载中..."),i=e.ref({});function c(d){const f=s.settings;if(f.displayMode.normalMode=="detail")a.value=`${f.name}`;else{const p=`${f.formatName(d)}`;a.value=p?`${f.name}:${p}`:`${f.name}`}}return e.watch(()=>s.data,d=>{d&&(i.value=s.settings.operations(r),c(d))},{immediate:!0}),(d,f)=>(e.openBlock(),e.createElementBlock("div",ud,[e.createElementVNode("div",fd,e.toDisplayString(a.value),1),e.createElementVNode("div",null,[s.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(xa,{row:s.data,settings:s.settings,query:e.unref(r),mode:"detail"},null,8,["row","settings","query"]),s.settings.showEdit(e.unref(r),"detail")?(e.openBlock(),e.createBlock(Oo,{key:0,row:s.data,settings:s.settings,operations:i.value,"is-detail":!0},null,8,["row","settings","operations"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-f9999537"]]),hd=R({__name:"DetailPageTabs",props:{associations:{type:Array},domainData:{type:Object}},setup(o){const t=U.useRouter(),n=U.useRoute(),r=Y(n),s=o,a=e.ref(""),i=e.shallowRef(null);function c(f){a.value=f.props.name,t.push({name:`${n.meta.side}-association`,params:{association:f.props.name},query:r})}function d(f){if(s.associations.length>0)if(n.params.association){a.value=n.params.association;const u=s.associations.find(p=>p.domain===n.params.association);i.value={...u,domainData:s.domainData}}else a.value=s.associations[0].domain,i.value={...s.associations[0],domainData:s.domainData},f&&f()}return e.watch(()=>s.domainData,()=>{d(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:a.value},query:r})})},{immediate:!0}),e.watch(()=>n.params,()=>{d()},{immediate:!0}),(f,u)=>{const p=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElTabs),{modelValue:a.value,"onUpdate:modelValue":u[0]||(u[0]=g=>a.value=g),class:"association-tabs",onTabClick:c},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,g=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:g.name,name:g.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),i.value?(e.openBlock(),e.createBlock(p,{key:i.value,association:i.value},null,8,["association"])):e.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-0dc49aad"]]),md={__name:"DetailPageList",props:{associations:{type:Array},domainData:{type:Object}},setup(o){return(t,n)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.associations,r=>(e.openBlock(),e.createElementBlock("div",null,[r.type=="has-many"?(e.openBlock(),e.createBlock(Aa,{key:0,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0),r.type=="has-one"?(e.openBlock(),e.createBlock(Ra,{key:1,domain:r.domain},null,8,["domain"])):e.createCommentVNode("",!0)]))),256))}},gd=R({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(o){U.useRouter();const t=U.useRoute(),n=Y(t),r=o,s=e.ref(null);function a(i){s.value=i}return(i,c)=>{var d,f;return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).params.domain}-${e.unref(t).params.id}`},[e.createVNode(pd,{data:s.value,settings:r.settings,query:{...e.unref(t).params,...e.unref(n)}},null,8,["data","settings","query"]),(f=(d=r.settings)==null?void 0:d.detailGroupFields)!=null&&f.length?(e.openBlock(),e.createBlock(dd,{key:0,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])):(e.openBlock(),e.createBlock(ja,{key:1,query:{...e.unref(t).params,...e.unref(n)},settings:r.settings,onDone:a},null,8,["query","settings"])),r.settings.detailSubType==="tabs"?(e.openBlock(),e.createBlock(hd,{key:2,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"])):(e.openBlock(),e.createBlock(md,{key:3,associations:o.associations,"domain-data":s.value},null,8,["associations","domain-data"]))])}}},[["__scopeId","data-v-8b30eefd"]]),_d={key:1,class:"loading-wrapper"},Ra=R({__name:"Detail",props:{domain:{type:String}},setup(o){const t=o,n=U.useRoute(),r=Y(n),s=n.meta.side,a=t.domain||n.params.domain,i=e.shallowRef(null),c=e.shallowRef([]);Ht(s,a).then(f=>{const u=f,p=d("has-many",u.hasMany(r)),g=d("has-one",u.hasOne(r));i.value=u,c.value=g.concat(p)});function d(f,u){return(u||[]).map(p=>typeof p=="object"?{type:f,domain:p.code,name:p.name,tableName:p.tableName,tableContentHeight:p.tableContentHeight,query:p.query||(()=>({}))}:{type:f,domain:p,name:So()[s][p].name,query:()=>({})})}return(f,u)=>i.value?(e.openBlock(),e.createBlock(gd,{key:0,settings:i.value,associations:c.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",_d,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-896e8698"]]),yd={key:0},bd={key:1,class:"loading-wrapper"},wd=R({__name:"DetailTab",props:{association:{type:Object}},setup(o){const t=U.useRoute(),n=t.meta.side,r=Y(t),s=o,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{Ht(n,t.params.association).then(i=>{a.value={...s.association,settings:i}})},{immediate:!0}),(i,c)=>a.value&&s.association.domainData?(e.openBlock(),e.createElementBlock("div",yd,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Do,{key:`has-many-${a.value.domain}`,settings:a.value.settings,"has-many":s.association,query:a.value.query(s.association.domainData)},null,8,["settings","has-many","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(ja,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(r),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",bd,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-79eac380"]]),kd={key:0},Ed={class:"file-name"},xd={class:"name"},Bd={class:"file-type"},Sd={key:1},Cd=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]);function r(a){fetch(a.url).then(i=>i.blob()).then(i=>{const c=document.createElement("a");i.type=="application/x-rar-compressed"?c.href=a.url:c.href=URL.createObjectURL(i),c.download=a.name,document.body.appendChild(c),c.click()})}function s(a){return["jpg","jpeg","png","gif","webp","bmp","pdf"].includes(a)}return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code].map(a=>{const i=a.url.substring(a.url.lastIndexOf(".")+1);return{...a,fileType:i,isPreview:s(i)}})},{immediate:!0}),(a,i)=>n.value.length>0?(e.openBlock(),e.createElementBlock("div",kd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Ed,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createElementVNode("span",xd,e.toDisplayString(c.name),1),e.createElementVNode("span",Bd,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>r(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(Ji))]),_:2},1032,["onClick"]),c.isPreview?(e.openBlock(),e.createBlock(e.unref(w.ElLink),{key:0,type:"primary",href:c.url,target:"_blank",underline:!1},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(kl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",Sd,[e.createVNode(fe)]))}},[["__scopeId","data-v-196b9bff"]]),$d={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>jf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(u){a.value=a.value?[...a.value,u]:[u]}function c(u){const p=a.value.findIndex(g=>g.id===u.id);a.value.splice(p,1)}async function d(u){const p=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(u.name)){w.ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await p.updateFilesName(u).then(()=>{w.ElMessage({message:"附件名称已修改!",type:"success"})})}function f(u,p){if(p=="success"){i(u),r("update:modelValue",a.value);return}if(p=="remove"){c(u),r("update:modelValue",a.value);return}if(p=="change"){d(u);return}}return(u,p)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:p[0]||(p[0]=g=>f(g,"success")),onOnRemove:p[1]||(p[1]=g=>f(g,"remove")),onOnChange:p[2]||(p[2]=g=>f(g,"change"))},null,8,["pics","props"]))}};class Vd extends ee{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=Cd,this.editor=$d,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Od=Object.freeze(Object.defineProperty({__proto__:null,default:Vd},Symbol.toStringTag,{value:"Module"})),Dd={key:3},Td=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=o,r=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${r}/${a}`,query:{...Y(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let u=null;const p=Ht(s,r).then(m=>(u=m.formatName,Promise.resolve(m.rest)));function g(m){return n.field.isRouter(n.row,Y(t))&&!Y(t)[n.field.code]}function B(){p.then(m=>{var S;c.value=!0;const x=n.row[n.field.code],k=n.row[ko(`${r}-name`)];if(!x){y(!1),c.value=!1;return}if(x&&k){y({id:x,name:k}),c.value=!1;return}if((S=n.field)!=null&&S.notGetOne){y({id:x,name:n.field.codeName?n.row[n.field.codeName]:""}),c.value=!1;return}const _={id:x};m.getOne(_).then(E=>{y(E.data),c.value=!1}).catch(E=>{console.log(E)})})}function y(m){if(d.value=!1,n.field.showName){la(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=m[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(m,n.row);return}if(m.id&&m.name){f.value=m.name;return}if(!m){d.value=!0;return}f.value=u(m)}return e.watch(()=>n.row,B,{immediate:!0}),(m,x)=>{const k=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("span",null,[c.value?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,class:"loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})):d.value?(e.openBlock(),e.createBlock(fe,{key:1})):g(o.row)?(e.openBlock(),e.createBlock(k,{key:2,class:"bld-link mono-data",to:i.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value),1)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("div",Dd,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-a7249bb7"]]),Nd={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:"",remote:"","remote-method":d,onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class Fd extends ee{constructor(t,n){super(t,n),this.belongsTo=t.belongsTo,this.formChange=t.formChange||(()=>{}),this.isRouter=this.isRouter(t),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.display=Td,this.editor=Nd,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),this.notGetOne=t.notGetOne||!1,this.codeName=t.codeName||"",this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const Ad=Object.freeze(Object.defineProperty({__proto__:null,default:Fd},Symbol.toStringTag,{value:"Module"})),jd={style:{display:"flex","align-items":"center"}},Rd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.computed(()=>t.row[t.field.code]);return(r,s)=>(e.openBlock(),e.createElementBlock("span",jd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#2DAD28",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(bl))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#FF444A",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(Ui))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#85888E",size:24},{default:e.withCtx(()=>[e.createVNode(e.unref(ul))]),_:1}))]))}},Id={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>{var d,f,u,p,g,B;return e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=y=>s.value=y),disabled:r.disabled,"active-text":((f=(d=r.field)==null?void 0:d.elConfig)==null?void 0:f.activeText)||"是","inactive-text":((p=(u=r.field)==null?void 0:u.elConfig)==null?void 0:p.inactiveText)||"否","inline-prompt":((B=(g=r.field)==null?void 0:g.elConfig)==null?void 0:B.inlinePrompt)!==!1,onChange:a},null,8,["modelValue","disabled","active-text","inactive-text","inline-prompt"])}}};class Md extends ee{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=Rd,this.editor=Id,this.formChange=t.formChange||(()=>{}),this.checkValidProperties(t)}}const Ld=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),Ud={key:0},zd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Ud,e.toDisplayString(r.value),1))]))}},Hd={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}d();function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),props:a.field.props,options:c.value,clearable:"",style:{width:"100%"},onChange:f},null,8,["modelValue","props","options"]))}};class Pd extends ee{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=zd,this.editor=Hd,this.multiple=this.defaultBy(t.multiple,!1),this.options=t.options||(()=>[{id:0,name:"未实现"}]),this.checkValidProperties(t)}}const qd=Object.freeze(Object.defineProperty({__proto__:null,default:Pd},Symbol.toStringTag,{value:"Module"}));class Wd extends ee{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const Gd=Object.freeze(Object.defineProperty({__proto__:null,default:Wd},Symbol.toStringTag,{value:"Module"})),Qd={key:0},Yd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Qd,e.toDisplayString(r.value),1))}},Kd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"date",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}};class Jd extends ee{constructor(t,n){super(t,n),this.display=Yd,this.editor=Kd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Xd=Object.freeze(Object.defineProperty({__proto__:null,default:Jd},Symbol.toStringTag,{value:"Module"})),Zd={key:0},vd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",Zd,e.toDisplayString(r.value),1))}},eu=R({__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:o.field.placeholder,onChange:a},null,8,["modelValue","disabled","placeholder"]))}},[["__scopeId","data-v-6a5d3aec"]]);class tu extends ee{constructor(t,n){super(t,n),this.display=vd,this.editor=eu,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),Ia=o=>(e.pushScopeId("data-v-5401b120"),o=o(),e.popScopeId(),o),ou={class:"loading-error"},ru=Ia(()=>e.createElementVNode("div",null,"加载失败",-1)),au={key:1,class:"loading-error"},su=[Ia(()=>e.createElementVNode("div",null,"暂无",-1))],iu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(o){const t=o,n=e.ref("");e.watch(()=>t.row,()=>{t.field.waterMark?n.value=i(t.row[t.field.code],t.field.waterMark):n.value=t.row[t.field.code]},{immediate:!0});function r(c){const d=document.createElement("canvas");return d.width=c.width,d.height=c.height,d.getContext("2d").drawImage(c,0,0),d}function s(c,d){return new Promise(f=>{const u=c.getContext("2d"),p=a(d);u.fillStyle=u.createPattern(p,"repeat"),u.fillRect(0,0,c.width,c.height),f(c.toDataURL())})}function a(c){const d=document.createElement("canvas");d.width=500,d.height=200;const f=d.getContext("2d");return f.textAlign="left",f.textBaseline="middle",f.font="26px Microsoft Yahei",f.fillStyle="rgba(0, 0, 0, 0.3)",f.rotate(-20*Math.PI/180),f.fillText(c,10,200),d}function i(c,d){const f=new Image;f.crossOrigin="Anonymous",f.src=c,f.onload=async()=>{const u=r(f),p=await s(u,d);n.value=p}}return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[n.value?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":[n.value],class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",ou,[ru,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",au,su))],2))}},[["__scopeId","data-v-5401b120"]]),lu={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mf)),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){r("update:modelValue",c)}return e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{"image-url":a.value,disabled:s.disabled,props:s.field.props,onOnSuccess:i},null,8,["image-url","disabled","props"]))}};class cu extends ee{constructor(t,n){super(t,n),this.display=iu,this.editor=lu,this.props=t.props||{},this.checkValidProperties(t)}}const du=Object.freeze(Object.defineProperty({__proto__:null,default:cu},Symbol.toStringTag,{value:"Module"})),Ma=o=>(e.pushScopeId("data-v-56e18295"),o=o(),e.popScopeId(),o),uu={class:"image-card",style:{"margin-bottom":"20px"}},fu={class:"loading-error"},pu=Ma(()=>e.createElementVNode("div",null,"图片加载失败",-1)),hu={key:1,class:"loading-error"},mu=[Ma(()=>e.createElementVNode("div",null,"暂无",-1))],gu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(null),r=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(r.value=s.map(a=>a.url),n.value=r.value[0])},{immediate:!0}),(s,a)=>t.row[t.field.code].length>0?(e.openBlock(),e.createBlock(e.unref(w.ElSpace),{key:0,wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.row[t.field.code],i=>(e.openBlock(),e.createElementBlock("div",uu,[i.url?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,src:i.url,fit:"contain","preview-src-list":r.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",fu,[pu,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",hu,mu))]))),256))]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1}))}},[["__scopeId","data-v-56e18295"]]);class _u extends ee{constructor(t,n){super(t,n),this.props=t.props,this.display=gu,this.editor=ba,this.converter=this.defaultBy(t.converter,r=>r),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const yu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),bu={key:0},wu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",bu,e.toDisplayString(r.value),1))}},ku={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInputNumber),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,min:r.field.min,max:r.field.max,step:r.field.step,precision:r.field.precision,"step-atrictly":r.field.stepAtrictly,onChange:a},null,8,["modelValue","disabled","min","max","step","precision","step-atrictly"]))}};class Eu extends ee{constructor(t,n){super(t,n),this.display=wu,this.editor=ku,this.min=t.min,this.max=t.max,this.step=t.step||1,this.precision=t.precision,this.stepAtrictly=t.stepAtrictly||!1,this.checkValidProperties(t)}}const xu=Object.freeze(Object.defineProperty({__proto__:null,default:Eu},Symbol.toStringTag,{value:"Module"})),Bu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=o,r=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{r.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(r.value=!0,s.value=a)},{immediate:!0}),(a,i)=>r.value?(e.openBlock(),e.createBlock(e.unref(t),{key:0,modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),mode:"text","main-menu-bar":!1,"navigation-bar":!1,"read-only":!0},null,8,["modelValue"])):(e.openBlock(),e.createBlock(fe,{key:1}))}},Su={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),r=t,s=o,a=e.reactive({value:s.modelValue});function i(c){a.value=c.text,r("update:modelValue",a.value)}return e.watch(()=>s.modelValue,()=>{a.value=s.modelValue},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=f=>a.value=f),style:{width:"100%",height:"300px"},mode:"text","main-menu-bar":!1,"navigation-bar":!1,onChange:i},null,8,["modelValue"]))}};class Cu extends ee{constructor(t,n){super(t,n),this.display=Bu,this.editor=Su,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const $u=Object.freeze(Object.defineProperty({__proto__:null,default:Cu},Symbol.toStringTag,{value:"Module"}));var A=function(o,t,n){if(!t.has(o))throw new TypeError("attempted to set private field on non-instance");return t.set(o,n),n},T=function(o,t){if(!t.has(o))throw new TypeError("attempted to get private field on non-instance");return t.get(o)},tt,it,Ee,Et,qt,Ae,je,Re,Ie,Me,Le,Ue,ze,lt,xt,nt,Vn,ot;const Vu=function(o){var t=131,n=137,r=0;o+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<o.length;a++)r>s&&(r=Math.floor(r/n)),r=r*t+o.charCodeAt(a);return r},N="0123456789abcdef".split(""),Ou=[-2147483648,8388608,32768,128],xe=[24,16,8,0],On=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],oe=[];class Du{constructor(t=!1,n=!1){tt.set(this,void 0),it.set(this,void 0),Ee.set(this,void 0),Et.set(this,void 0),qt.set(this,void 0),Ae.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Me.set(this,void 0),Le.set(this,void 0),Ue.set(this,void 0),ze.set(this,void 0),lt.set(this,void 0),xt.set(this,void 0),nt.set(this,void 0),Vn.set(this,0),ot.set(this,void 0),this.init(t,n)}init(t,n){n?(oe[0]=oe[16]=oe[1]=oe[2]=oe[3]=oe[4]=oe[5]=oe[6]=oe[7]=oe[8]=oe[9]=oe[10]=oe[11]=oe[12]=oe[13]=oe[14]=oe[15]=0,A(this,it,oe)):A(this,it,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(A(this,Ae,3238371032),A(this,je,914150663),A(this,Re,812702999),A(this,Ie,4144912697),A(this,Me,4290775857),A(this,Le,1750603025),A(this,Ue,1694076839),A(this,ze,3204075428)):(A(this,Ae,1779033703),A(this,je,3144134277),A(this,Re,1013904242),A(this,Ie,2773480762),A(this,Me,1359893119),A(this,Le,2600822924),A(this,Ue,528734635),A(this,ze,1541459225)),A(this,tt,A(this,ot,A(this,Ee,A(this,xt,0)))),A(this,Et,A(this,lt,!1)),A(this,qt,!0),A(this,nt,t)}update(t){if(T(this,Et))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let r=0;const s=n.length,a=T(this,it);for(;r<s;){let i;if(T(this,lt)&&(A(this,lt,!1),a[0]=T(this,tt),a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),typeof n!="string")for(i=T(this,ot);r<s&&i<64;++r)a[i>>2]|=n[r]<<xe[i++&3];else for(i=T(this,ot);r<s&&i<64;++r){let c=n.charCodeAt(r);c<128?a[i>>2]|=c<<xe[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++r)&1023),a[i>>2]|=(240|c>>18)<<xe[i++&3],a[i>>2]|=(128|c>>12&63)<<xe[i++&3],a[i>>2]|=(128|c>>6&63)<<xe[i++&3],a[i>>2]|=(128|c&63)<<xe[i++&3])}A(this,Vn,i),A(this,Ee,T(this,Ee)+(i-T(this,ot))),i>=64?(A(this,tt,a[16]),A(this,ot,i-64),this.hash(),A(this,lt,!0)):A(this,ot,i)}return T(this,Ee)>4294967295&&(A(this,xt,T(this,xt)+(T(this,Ee)/4294967296<<0)),A(this,Ee,T(this,Ee)%4294967296)),this}finalize(){if(T(this,Et))return;A(this,Et,!0);const t=T(this,it),n=T(this,Vn);t[16]=T(this,tt),t[n>>2]|=Ou[n&3],A(this,tt,t[16]),n>=56&&(T(this,lt)||this.hash(),t[0]=T(this,tt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=T(this,xt)<<3|T(this,Ee)>>>29,t[15]=T(this,Ee)<<3,this.hash()}hash(){let t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);const f=T(this,it);let u,p,g,B,y,m,x,k,_,S;for(let E=16;E<64;++E)B=f[E-15],u=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=f[E-2],p=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,f[E]=f[E-16]+u+f[E-7]+p<<0;S=n&r;for(let E=0;E<64;E+=4)T(this,qt)?(T(this,nt)?(x=300032,B=f[0]-1413257819,d=B-150054599<<0,s=B+24177077<<0):(x=704751109,B=f[0]-210244248,d=B-1521486534<<0,s=B+143694565<<0),A(this,qt,!1)):(u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&n,g=x^t&r^S,m=a&i^~a&c,B=d+p+m+On[E]+f[E],y=u+g,d=s+B<<0,s=B+y<<0),u=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),p=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),k=s&t,g=k^s&n^x,m=d&a^~d&i,B=c+p+m+On[E+1]+f[E+1],y=u+g,c=r+B<<0,r=B+y<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),_=r&s,g=_^r&t^k,m=c&d^~c&a,B=i+p+m+On[E+2]+f[E+2],y=u+g,i=n+B<<0,n=B+y<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),S=n&r,g=S^n&s^_,m=i&c^~i&d,B=a+p+m+On[E+3]+f[E+3],y=u+g,a=t+B<<0,t=B+y<<0;A(this,Ae,T(this,Ae)+t<<0),A(this,je,T(this,je)+n<<0),A(this,Re,T(this,Re)+r<<0),A(this,Ie,T(this,Ie)+s<<0),A(this,Me,T(this,Me)+a<<0),A(this,Le,T(this,Le)+i<<0),A(this,Ue,T(this,Ue)+c<<0),A(this,ze,T(this,ze)+d<<0)}hex(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze);let f=N[t>>28&15]+N[t>>24&15]+N[t>>20&15]+N[t>>16&15]+N[t>>12&15]+N[t>>8&15]+N[t>>4&15]+N[t&15]+N[n>>28&15]+N[n>>24&15]+N[n>>20&15]+N[n>>16&15]+N[n>>12&15]+N[n>>8&15]+N[n>>4&15]+N[n&15]+N[r>>28&15]+N[r>>24&15]+N[r>>20&15]+N[r>>16&15]+N[r>>12&15]+N[r>>8&15]+N[r>>4&15]+N[r&15]+N[s>>28&15]+N[s>>24&15]+N[s>>20&15]+N[s>>16&15]+N[s>>12&15]+N[s>>8&15]+N[s>>4&15]+N[s&15]+N[a>>28&15]+N[a>>24&15]+N[a>>20&15]+N[a>>16&15]+N[a>>12&15]+N[a>>8&15]+N[a>>4&15]+N[a&15]+N[i>>28&15]+N[i>>24&15]+N[i>>20&15]+N[i>>16&15]+N[i>>12&15]+N[i>>8&15]+N[i>>4&15]+N[i&15]+N[c>>28&15]+N[c>>24&15]+N[c>>20&15]+N[c>>16&15]+N[c>>12&15]+N[c>>8&15]+N[c>>4&15]+N[c&15];return T(this,nt)||(f+=N[d>>28&15]+N[d>>24&15]+N[d>>20&15]+N[d>>16&15]+N[d>>12&15]+N[d>>8&15]+N[d>>4&15]+N[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=T(this,Ae),n=T(this,je),r=T(this,Re),s=T(this,Ie),a=T(this,Me),i=T(this,Le),c=T(this,Ue),d=T(this,ze),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,s>>24&255,s>>16&255,s>>8&255,s&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,c>>24&255,c>>16&255,c>>8&255,c&255];return T(this,nt)||f.push(d>>24&255,d>>16&255,d>>8&255,d&255),f}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(T(this,nt)?28:32),n=new DataView(t);return n.setUint32(0,T(this,Ae)),n.setUint32(4,T(this,je)),n.setUint32(8,T(this,Re)),n.setUint32(12,T(this,Ie)),n.setUint32(16,T(this,Me)),n.setUint32(20,T(this,Le)),n.setUint32(24,T(this,Ue)),T(this,nt)||n.setUint32(28,T(this,ze)),t}}tt=new WeakMap,it=new WeakMap,Ee=new WeakMap,Et=new WeakMap,qt=new WeakMap,Ae=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Le=new WeakMap,Ue=new WeakMap,ze=new WeakMap,lt=new WeakMap,xt=new WeakMap,nt=new WeakMap,Vn=new WeakMap,ot=new WeakMap;function Tu(o){const t=new Du;return t.update(o),parseInt(t.hex().substring(0,8),16)}const Nu=function(o){var t="#";return o.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},Fu=function(o,t,n){o/=360;var r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;return[o+1/3,o,o-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(r-s)*6*a:a<.5?a=r:a<2/3?a=s+(r-s)*6*(2/3-a):a=s,Math.round(a*255)})};class Au{constructor(t={}){const[n,r]=[t.lightness,t.saturation].map(function(s){return s=s!==void 0?s:[.35,.5,.65],Array.isArray(s)?s.concat():[s]});this.L=n,this.S=r,typeof t.hue=="number"&&(t.hue={min:t.hue,max:t.hue}),typeof t.hue=="object"&&!Array.isArray(t.hue)&&(t.hue=[t.hue]),typeof t.hue>"u"&&(t.hue=[]),this.hueRanges=t.hue.map(function(s){return{min:typeof s.min>"u"?0:s.min,max:typeof s.max>"u"?360:s.max}}),this.hash=Tu,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=Vu)}hsl(t){var n,r,s,a=this.hash(t),i=727;if(this.hueRanges.length){const c=this.hueRanges[a%this.hueRanges.length];n=a/this.hueRanges.length%i*(c.max-c.min)/i+c.min}else n=a%359;return a=Math.ceil(a/360),r=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,r,s]}rgb(t){var n=this.hsl(t);return Fu.apply(this,n)}hex(t){var n=this.rgb(t);return Nu(n)}}const ju=new Au;function Ru(o){const t=ju.hex(`abc${o}cba`);return Iu(t.replace("#",""),-20)}function Iu(o,t){let n=parseInt(o.substring(1,3),16),r=parseInt(o.substring(3,5),16),s=parseInt(o.substring(5,7),16);n=parseInt(n*(100+t)/100),r=parseInt(r*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,r=r<255?r:255,s=s<255?s:255,n=Math.round(n),r=Math.round(r),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const La={strToHexColor:Ru},Mu={key:0,class:"radio-fields"},Lu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u="";if(u=f.filter(p=>d===p.code),u.length===0){s.value="<无>",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",Mu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"radio-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-c0b98ff6"]]),Uu={__name:"FieldEditor",props:{modelValue:[String,Number],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){var u;s("update:modelValue",i.value),(u=a==null?void 0:a.field)!=null&&u.change&&a.field.change(i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElRadioGroup),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},disabled:a.disabled,placeholder:"",onChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElRadio),{key:g.code,label:g.code,disabled:g.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.name),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"]))}};class zu extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=Lu,this.editor=Uu,this.checkValidProperties(t)}}const Hu=Object.freeze(Object.defineProperty({__proto__:null,default:zu},Symbol.toStringTag,{value:"Module"})),Pu={class:"editor-field"},qu=["innerHTML"],Wu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o;return(n,r)=>(e.openBlock(),e.createElementBlock("div",Pu,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,qu)]))}},[["__scopeId","data-v-6cf9056d"]]),Gu={style:{width:"100%"}},Qu={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>ep)),r=t,s=o,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{r("update:modelValue",a.value)}),e.watch(()=>s.modelValue,async()=>{a.value=s.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Gu,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d),field:s.field},null,8,["content","field"])]))}};class Yu extends ee{constructor(t,n){super(t,n),this.display=Wu,this.editor=Qu,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ku=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));class Ju extends ee{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=this.isRouter(t),this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}isRouter(t){const n=t.isRouter;if(typeof n=="boolean")return()=>n;if(typeof n=="function")return n;if(typeof n>"u")return()=>!0;throw new Exception(`invalid isRouter : ${n}`)}}const Xu=Object.freeze(Object.defineProperty({__proto__:null,default:Ju},Symbol.toStringTag,{value:"Module"})),Zu={key:0,class:"select-fields"},vu=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=U.useRoute(),n=Y(t),r=o,s=e.ref("..."),a=e.ref(!1),i=e.ref([]);async function c(){const d=r.row[r.field.code];if(r.field.label,d==null){s.value="--",a.value=!1;return}const f=await r.field.options(r.row,n);if(!f){s.value="<无>",a.value=!1;return}let u=[];if(r.field.multiple?u=f.filter(p=>d.includes(p.code)):u=f.filter(p=>d===p.code),u.length===0){s.value="--",a.value=!1;return}i.value=u.map(p=>({bgColor:La.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),a.value=!0}return e.watch(()=>r.row,c,{immediate:!0}),(d,f)=>a.value?(e.openBlock(),e.createElementBlock("div",Zu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${u.name}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"select-field found",style:e.normalizeStyle(`background: ${u.bgColor}`)},e.toDisplayString(u.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(fe,{key:1,text:s.value},null,8,["text"]))}},[["__scopeId","data-v-48df8735"]]),ef={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(u){c.value=await a.field.options(a.formData,r,u)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(u,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value=g),style:{width:"100%"},filterable:"","reserve-keyword":"","remote-show-suffix":"",clearable:"","fit-input-width":"",multiple:a.field.multiple,disabled:a.disabled,placeholder:o.field.placeholder,remote:"","remote-method":d,onChange:f},e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,g=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:g.code,label:g.name,value:g.code,title:g.name,disabled:g.disabled},null,8,["label","value","title","disabled"]))),128))]),_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0]),1032,["modelValue","multiple","disabled","placeholder"]))}};class tf extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=vu,this.editor=ef,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const nf=Object.freeze(Object.defineProperty({__proto__:null,default:tf},Symbol.toStringTag,{value:"Module"})),of={key:0},rf={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){var c;if((c=t.field)!=null&&c.formatter){r.value=t.field.formatter(t.row),n.value=!r.value;return}const i=t.field.code.toString().split(".").reduce((d,f)=>d[f],t.row);i==null||`${i}`.trim()===""?n.value=!0:(r.value=i,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",of,e.toDisplayString(r.value),1))}},af={class:"annotation"},sf={class:"annotation"},lf=R({__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:o.field.type,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},e.createSlots({_:2},[o.field.prefix?{name:"prefix",fn:e.withCtx(()=>[e.createElementVNode("div",af,e.toDisplayString(o.field.prefix),1)]),key:"0"}:void 0,o.field.suffix?{name:"suffix",fn:e.withCtx(()=>[e.createElementVNode("div",sf,e.toDisplayString(o.field.suffix),1)]),key:"1"}:void 0]),1032,["modelValue","type","disabled","placeholder"]))}},[["__scopeId","data-v-4c74bd97"]]);class cf extends ee{constructor(t,n){super(t,n),this.display=rf,this.editor=lf,this.formatter=t.formatter,this.checkValidProperties(t)}}const df=Object.freeze(Object.defineProperty({__proto__:null,default:cf},Symbol.toStringTag,{value:"Module"})),uf={style:{display:"flex","align-items":"center"}},ff={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(o,{emit:t}){const n=t,r=o,s=e.ref(r.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,u)=>{n("enable",c)})}const i=e.computed(()=>r.row[r.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",uf,[e.createVNode(e.unref(w.ElSwitch),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=f=>i.value=f),size:"small",disabled:!!s.value,"before-change":f=>a(o.row,o.field.label)},null,8,["modelValue","disabled","before-change"])]))}},pf={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElSwitch),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class hf extends ee{constructor(t,n){super(t,n),this.formChange=t.formChange||(()=>{}),this.default=t.default||!1,this.display=ff,this.editor=pf,this.checkValidProperties(t)}}const mf=Object.freeze(Object.defineProperty({__proto__:null,default:hf},Symbol.toStringTag,{value:"Module"})),gf={key:0},_f={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",gf,e.toDisplayString(r.value),1))}},yf={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElInput),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"textarea",rows:5,clearable:"",disabled:r.disabled,placeholder:o.field.placeholder,onInput:a},null,8,["modelValue","disabled","placeholder"]))}};class bf extends ee{constructor(t,n){super(t,n),this.display=_f,this.editor=yf,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const wf=Object.freeze(Object.defineProperty({__proto__:null,default:bf},Symbol.toStringTag,{value:"Module"})),kf={key:0},Ef={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref(!1),r=e.ref("...");async function s(){const a=t.row[t.field.code];a==null||`${a}`.trim()===""?n.value=!0:(r.value=a,n.value=!1)}return e.watch(()=>t.row,s,{immediate:!0}),(a,i)=>n.value?(e.openBlock(),e.createBlock(fe,{key:1})):(e.openBlock(),e.createElementBlock("span",kf,e.toDisplayString(r.value),1))}},xf={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(o,{emit:t}){const n=t,r=o,s=e.reactive({value:r.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>r.modelValue,()=>{s.value=r.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElTimePicker),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),disabled:r.disabled,format:r.field.format,"value-format":r.field.format,onChange:a},null,8,["modelValue","disabled","format","value-format"]))}};class Bf extends ee{constructor(t,n){super(t,n),this.display=Ef,this.editor=xf,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Sf=Object.freeze(Object.defineProperty({__proto__:null,default:Bf},Symbol.toStringTag,{value:"Module"})),Cf=R({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(o){const t=o,n=e.ref([]),r=e.ref([]),s={label:"name",children:"children",value:"id"},a=e.ref("..."),i=e.ref(!1);e.ref([]);async function c(){n.value=t.row[t.field.code],r.value=await t.field.options(),i.value=!0}return e.watch(()=>t.row,c,{immediate:!0}),(d,f)=>i.value?(e.openBlock(),e.createBlock(e.unref(w.ElTree),{key:0,"default-checked-keys":n.value,style:{width:"100%"},data:r.value,props:s,"node-key":"id",multiple:t.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:"true","check-strictly":t.field.checkStrictly,"show-checkbox":"",filterable:""},null,8,["default-checked-keys","data","multiple","check-strictly"])):(e.openBlock(),e.createBlock(fe,{key:1,text:a.value},null,8,["text"]))}},[["__scopeId","data-v-fbd0b556"]]),$f={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(o,{emit:t}){const n=U.useRoute(),r=Y(n),s=t,a=o,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(g){c.value=await a.field.options(a.formData,r,g)}function u(g,B){var y;return(y=a.field)!=null&&y.useApiSearchKeyword||!g?!0:B.name.includes(g)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(g,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":B[0]||(B[0]=y=>i.value=y),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":a.field.checkStrictly,remote:"","show-checkbox":"",filterable:"",clearable:"","filter-node-method":u,"remote-method":f,onCheck:p,onChange:p},null,8,["modelValue","data","multiple","disabled","check-strictly"]))}};class Vf extends ee{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.checkStrictly=this.defaultBy(t.checkStrictly,!0),this.useApiSearchKeyword=t.useApiSearchKeyword||!1,this.display=Cf,this.editor=$f,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Of=Object.freeze(Object.defineProperty({__proto__:null,default:Vf},Symbol.toStringTag,{value:"Module"})),Df={class:"el-upload__tip"},Tf=["src"],Nf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*",tip:""}}}},emits:["on-remove","on-upload"],setup(o,{emit:t}){const n=t,r=e.ref(""),s=e.ref(!1),a=o,i=e.computed(()=>a.images.map(g=>{if(!(g!=null&&g.url))return{...g,name:"unknown",fileType:"unknown"};const B=g.url.substring(g.url.lastIndexOf(".")+1),y=g.url.split("/");return{...g,name:y[y.length-1],fileType:B}}));function c(g){var B,y;if(a.props.deleteParams){const m=(B=a.props.deleteParams)!=null&&B.data?(y=a.props.deleteParams)==null?void 0:y.data:{};he.remove(`${a.props.deleteParams.url}/${g.id}/attachment`,m,m).then(()=>{n("on-remove",g)})}else n("on-remove",g)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(g){r.value=g.url,s.value=!0}function u(g){return g.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function p(g){const B=new FormData;B.append("file",g.file),n("on-upload",B)}return(g,B)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(w.ElUpload),{"file-list":i.value,limit:a.props.limit,accept:a.props.accept,"list-type":a.props.listType,"on-remove":c,"on-exceed":d,"on-preview":f,multiple:!0,"before-upload":u,"http-request":p,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:B[0]||(B[0]=e.withModifiers(()=>{},["prevent"]))},e.createSlots({default:e.withCtx(()=>[a.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:2},[a.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",Df,e.toDisplayString(a.props.tip),1)]),key:"0"}:void 0]),1032,["file-list","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":B[1]||(B[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:r.value,alt:"Preview Image"},null,8,Tf)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-ee6aad72"]])},Symbol.toStringTag,{value:"Module"})),Ff=["src"],Af={class:"file-type"},jf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"AttachmentUploader",props:{pics:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-success","on-remove","on-change"],setup(o,{emit:t}){const n=t,r=o,s=e.computed(()=>r.pics.map(m=>{const x=m.url.substring(m.url.lastIndexOf(".")+1);if(typeof m.name!==void 0)return m.fileType=x,m;if(m.url){const k=m.url.split("/");return{...m,name:k[k.length-1],fileType:x}}return{...m,name:m.id,fileType:x}})),a=e.ref(""),i=e.ref(!1);e.ref(r);const c=et().fileUploadUrl;`${localStorage.getItem("token")}`;const d=m=>{const x=new FileReader;return x.readAsDataURL(m),new Promise(function(k,_){return m.type.startsWith("image/")?(x.onload=async S=>{const E=new Image;E.src=S.target.result,E.onload=()=>{const V=document.createElement("canvas"),O=V.getContext("2d");V.width=E.width,V.height=E.height,O.drawImage(E,0,0,V.width,V.height),V.toBlob(I=>{const G=new File([I],m.name,{type:m.type,lastModified:Date.now()});k(G)},m.type,.5)}},!1):(k(m),!1)})},f=m=>{var x,k;if(m.status==="success")if(r.props.deleteParams){const _=(x=r.props.deleteParams)!=null&&x.data?(k=r.props.deleteParams)==null?void 0:k.data:{};he.remove(`${r.props.deleteParams.url}/${m.id}/attachment`,_,_).then(()=>{n("on-remove",m)})}else n("on-remove",m)},u=()=>{w.ElMessage({message:`最多只能上传 ${r.props.limit} 个文件!`,type:"warning"})},p=m=>{a.value=m.url,i.value=!0},g=m=>{const x=m.name.substring(0,m.name.lastIndexOf("."));if(!/^[\u4e00-\u9fa5\w-_]+$/.test(x))return w.ElMessage({message:"请勿输入特殊字符!",type:"warning"}),!1;d(m).then(_=>_.size/1024/1024<5?(y(_),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function B(m,x){if(!m.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",m)}function y(m){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((x,k)=>{const _=new FormData;_.append("file",m),v.post(c,_,{}).then(S=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",S.data.data),x(S.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),k("Upload failed")})})}return(m,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:r.props.limit,accept:r.props.accept,"list-type":r.props.listType,"on-remove":f,"before-upload":g,"on-exceed":u,"on-preview":p,multiple:!0,"http-request":()=>!1,"show-file-list":r.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=r.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[r.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,class:"upload-button",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(" 上传附件 ")]),_:1}))]),_:1},8,["file-list","action","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:i.value,"onUpdate:modelValue":x[1]||(x[1]=k=>i.value=k)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Ff)]),_:1},8,["modelValue"]),r.props.listType=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElForm),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(k,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:_,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:k.name,"onUpdate:modelValue":S=>k.name=S,onChange:S=>B(k)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Af,"."+e.toDisplayString(k.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:S=>f(k)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-4c31cc76"]])},Symbol.toStringTag,{value:"Module"})),Rf={class:"image-slot"},If={class:"el-upload__tip"},Mf=Object.freeze(Object.defineProperty({__proto__:null,default:R({__name:"ImageUploader",props:{imageUrl:{type:String},props:{type:Object,default(){return{accept:"image/*",tip:""}}}},emits:["on-success"],setup(o,{emit:t}){const n=t,r=o,s=et().imageUploadUrl;`${localStorage.getItem("token")}`;const a=f=>{if(!(f.size/1024/1024<5))return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1},i=f=>{n("on-success",f.data.imageUrl)};function c(){n("on-success","")}function d(f){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((u,p)=>{const g=new FormData;g.append("image",f.file),v.post(s,g,{}).then(B=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),u(B.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),p("Upload failed")})})}return(f,u)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,accept:r.props.accept,"on-success":i,"before-upload":a,"http-request":d},e.createSlots({default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:r.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Rf,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Co))]),_:1})),r.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,class:"delete-icon",onClick:e.withModifiers(c,["stop","prevent"])},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})):e.createCommentVNode("",!0)]),_:2},[r.props.tip?{name:"tip",fn:e.withCtx(()=>[e.createElementVNode("div",If,e.toDisplayString(r.props.tip),1)]),key:"0"}:void 0]),1032,["action","accept"]))}},[["__scopeId","data-v-4344bdad"]])},Symbol.toStringTag,{value:"Module"}));var He=-1,Be=1,me=0;function Wt(o,t,n,r){if(o===t)return o?[[me,o]]:[];if(n!=null){var s=Pf(o,t,n);if(s)return s}var a=To(o,t),i=o.substring(0,a);o=o.substring(a),t=t.substring(a),a=No(o,t);var c=o.substring(o.length-a);o=o.substring(0,o.length-a),t=t.substring(0,t.length-a);var d=Lf(o,t);return i&&d.unshift([me,i]),c&&d.push([me,c]),za(d,r),d}function Lf(o,t){var n;if(!o)return[[Be,t]];if(!t)return[[He,o]];var r=o.length>t.length?o:t,s=o.length>t.length?t:o,a=r.indexOf(s);if(a!==-1)return n=[[Be,r.substring(0,a)],[me,s],[Be,r.substring(a+s.length)]],o.length>t.length&&(n[0][0]=n[2][0]=He),n;if(s.length===1)return[[He,o],[Be,t]];var i=zf(o,t);if(i){var c=i[0],d=i[1],f=i[2],u=i[3],p=i[4],g=Wt(c,f),B=Wt(d,u);return g.concat([[me,p]],B)}return Uf(o,t)}function Uf(o,t){for(var n=o.length,r=t.length,s=Math.ceil((n+r)/2),a=s,i=2*s,c=new Array(i),d=new Array(i),f=0;f<i;f++)c[f]=-1,d[f]=-1;c[a+1]=0,d[a+1]=0;for(var u=n-r,p=u%2!==0,g=0,B=0,y=0,m=0,x=0;x<s;x++){for(var k=-x+g;k<=x-B;k+=2){var _=a+k,S;k===-x||k!==x&&c[_-1]<c[_+1]?S=c[_+1]:S=c[_-1]+1;for(var E=S-k;S<n&&E<r&&o.charAt(S)===t.charAt(E);)S++,E++;if(c[_]=S,S>n)B+=2;else if(E>r)g+=2;else if(p){var V=a+u-k;if(V>=0&&V<i&&d[V]!==-1){var O=n-d[V];if(S>=O)return Ua(o,t,S,E)}}}for(var I=-x+y;I<=x-m;I+=2){var V=a+I,O;I===-x||I!==x&&d[V-1]<d[V+1]?O=d[V+1]:O=d[V-1]+1;for(var G=O-I;O<n&&G<r&&o.charAt(n-O-1)===t.charAt(r-G-1);)O++,G++;if(d[V]=O,O>n)m+=2;else if(G>r)y+=2;else if(!p){var _=a+u-I;if(_>=0&&_<i&&c[_]!==-1){var S=c[_],E=a+S-_;if(O=n-O,S>=O)return Ua(o,t,S,E)}}}}return[[He,o],[Be,t]]}function Ua(o,t,n,r){var s=o.substring(0,n),a=t.substring(0,r),i=o.substring(n),c=t.substring(r),d=Wt(s,a),f=Wt(i,c);return d.concat(f)}function To(o,t){if(!o||!t||o.charAt(0)!==t.charAt(0))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(a,s)==t.substring(a,s)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Ha(o.charCodeAt(s-1))&&s--,s}function No(o,t){if(!o||!t||o.slice(-1)!==t.slice(-1))return 0;for(var n=0,r=Math.min(o.length,t.length),s=r,a=0;n<s;)o.substring(o.length-s,o.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):r=s,s=Math.floor((r-n)/2+n);return Pa(o.charCodeAt(o.length-s))&&s--,s}function zf(o,t){var n=o.length>t.length?o:t,r=o.length>t.length?t:o;if(n.length<4||r.length*2<n.length)return null;function s(B,y,m){for(var x=B.substring(m,m+Math.floor(B.length/4)),k=-1,_="",S,E,V,O;(k=y.indexOf(x,k+1))!==-1;){var I=To(B.substring(m),y.substring(k)),G=No(B.substring(0,m),y.substring(0,k));_.length<G+I&&(_=y.substring(k-G,k)+y.substring(k,k+I),S=B.substring(0,m-G),E=B.substring(m+I),V=y.substring(0,k-G),O=y.substring(k+I))}return _.length*2>=B.length?[S,E,V,O,_]:null}var a=s(n,r,Math.ceil(n.length/4)),i=s(n,r,Math.ceil(n.length/2)),c;if(!a&&!i)return null;i?a?c=a[4].length>i[4].length?a:i:c=i:c=a;var d,f,u,p;o.length>t.length?(d=c[0],f=c[1],u=c[2],p=c[3]):(u=c[0],p=c[1],d=c[2],f=c[3]);var g=c[4];return[d,f,u,p,g]}function za(o,t){o.push([me,""]);for(var n=0,r=0,s=0,a="",i="",c;n<o.length;){if(n<o.length-1&&!o[n][1]){o.splice(n,1);continue}switch(o[n][0]){case Be:s++,i+=o[n][1],n++;break;case He:r++,a+=o[n][1],n++;break;case me:var d=n-s-r-1;if(t){if(d>=0&&Wa(o[d][1])){var f=o[d][1].slice(-1);if(o[d][1]=o[d][1].slice(0,-1),a=f+a,i=f+i,!o[d][1]){o.splice(d,1),n--;var u=d-1;o[u]&&o[u][0]===Be&&(s++,i=o[u][1]+i,u--),o[u]&&o[u][0]===He&&(r++,a=o[u][1]+a,u--),d=u}}if(qa(o[n][1])){var f=o[n][1].charAt(0);o[n][1]=o[n][1].slice(1),a+=f,i+=f}}if(n<o.length-1&&!o[n][1]){o.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=To(i,a),c!==0&&(d>=0?o[d][1]+=i.substring(0,c):(o.splice(0,0,[me,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=No(i,a),c!==0&&(o[n][1]=i.substring(i.length-c)+o[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var p=s+r;a.length===0&&i.length===0?(o.splice(n-p,p),n=n-p):a.length===0?(o.splice(n-p,p,[Be,i]),n=n-p+1):i.length===0?(o.splice(n-p,p,[He,a]),n=n-p+1):(o.splice(n-p,p,[He,a],[Be,i]),n=n-p+2)}n!==0&&o[n-1][0]===me?(o[n-1][1]+=o[n][1],o.splice(n,1)):n++,s=0,r=0,a="",i="";break}}o[o.length-1][1]===""&&o.pop();var g=!1;for(n=1;n<o.length-1;)o[n-1][0]===me&&o[n+1][0]===me&&(o[n][1].substring(o[n][1].length-o[n-1][1].length)===o[n-1][1]?(o[n][1]=o[n-1][1]+o[n][1].substring(0,o[n][1].length-o[n-1][1].length),o[n+1][1]=o[n-1][1]+o[n+1][1],o.splice(n-1,1),g=!0):o[n][1].substring(0,o[n+1][1].length)==o[n+1][1]&&(o[n-1][1]+=o[n+1][1],o[n][1]=o[n][1].substring(o[n+1][1].length)+o[n+1][1],o.splice(n+1,1),g=!0)),n++;g&&za(o,t)}function Ha(o){return o>=55296&&o<=56319}function Pa(o){return o>=56320&&o<=57343}function qa(o){return Pa(o.charCodeAt(0))}function Wa(o){return Ha(o.charCodeAt(o.length-1))}function Hf(o){for(var t=[],n=0;n<o.length;n++)o[n][1].length>0&&t.push(o[n]);return t}function Fo(o,t,n,r){return Wa(o)||qa(r)?null:Hf([[me,o],[He,t],[Be,n],[me,r]])}function Pf(o,t,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=o.length,i=t.length;if(r.length===0&&(s===null||s.length===0)){var c=r.index,d=o.slice(0,c),f=o.slice(c),u=s?s.index:null;e:{var p=c+i-a;if(u!==null&&u!==p||p<0||p>i)break e;var g=t.slice(0,p),B=t.slice(p);if(B!==f)break e;var y=Math.min(c,p),m=d.slice(0,y),x=g.slice(0,y);if(m!==x)break e;var k=d.slice(y),_=g.slice(y);return Fo(m,k,_,f)}e:{if(u!==null&&u!==c)break e;var S=c,g=t.slice(0,S),B=t.slice(S);if(g!==d)break e;var E=Math.min(a-S,i-S),V=f.slice(f.length-E),O=B.slice(B.length-E);if(V!==O)break e;var k=f.slice(0,f.length-E),_=B.slice(0,B.length-E);return Fo(d,k,_,V)}}if(r.length>0&&s&&s.length===0)e:{var m=o.slice(0,r.index),V=o.slice(r.index+r.length),y=m.length,E=V.length;if(i<y+E)break e;var x=t.slice(0,y),O=t.slice(i-E);if(m!==x||V!==O)break e;var k=o.slice(y,a-E),_=t.slice(y,i-E);return Fo(m,k,_,V)}return null}function Dn(o,t,n){return Wt(o,t,n,!0)}Dn.INSERT=Be,Dn.DELETE=He,Dn.EQUAL=me;var qf=Dn,Tn={exports:{}};Tn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",u="[object Function]",p="[object GeneratorFunction]",g="[object Map]",B="[object Number]",y="[object Object]",m="[object Promise]",x="[object RegExp]",k="[object Set]",_="[object String]",S="[object Symbol]",E="[object WeakMap]",V="[object ArrayBuffer]",O="[object DataView]",I="[object Float32Array]",G="[object Float64Array]",K="[object Int8Array]",re="[object Int16Array]",D="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",Se="[object Uint16Array]",Pe="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Bt=/\w*$/,z=/^\[object .+?Constructor\]$/,Z=/^(?:0|[1-9]\d*)$/,M={};M[a]=M[i]=M[V]=M[O]=M[c]=M[d]=M[I]=M[G]=M[K]=M[re]=M[D]=M[g]=M[B]=M[y]=M[x]=M[k]=M[_]=M[S]=M[L]=M[X]=M[Se]=M[Pe]=!0,M[f]=M[u]=M[E]=!1;var we=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Io=typeof self=="object"&&self&&self.Object===Object&&self,Ce=we||Io||Function("return this")(),Rn=t&&!t.nodeType&&t,J=Rn&&!0&&o&&!o.nodeType&&o,In=J&&J.exports===Rn;function Mo(l,h){return l.set(h[0],h[1]),l}function $e(l,h){return l.add(h),l}function Mn(l,h){for(var b=-1,C=l?l.length:0;++b<C&&h(l[b],b,l)!==!1;);return l}function Ln(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Yt(l,h,b,C){for(var j=-1,F=l?l.length:0;++j<F;)b=h(b,l[j],j,l);return b}function Kt(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Un(l,h){return l==null?void 0:l[h]}function Jt(l){var h=!1;if(l!=null&&typeof l.toString!="function")try{h=!!(l+"")}catch{}return h}function zn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function Xt(l,h){return function(b){return l(h(b))}}function Hn(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Lo=Array.prototype,Uo=Function.prototype,St=Object.prototype,Zt=Ce["__core-js_shared__"],Pn=function(){var l=/[^.]+$/.exec(Zt&&Zt.keys&&Zt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),qn=Uo.toString,qe=St.hasOwnProperty,Ct=St.toString,zo=RegExp("^"+qn.call(qe).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=In?Ce.Buffer:void 0,$t=Ce.Symbol,vt=Ce.Uint8Array,ke=Xt(Object.getPrototypeOf,Object),Wn=Object.create,Gn=St.propertyIsEnumerable,Ho=Lo.splice,en=Object.getOwnPropertySymbols,Vt=ct?ct.isBuffer:void 0,Qn=Xt(Object.keys,Object),Ot=Oe(Ce,"DataView"),dt=Oe(Ce,"Map"),Ve=Oe(Ce,"Promise"),Dt=Oe(Ce,"Set"),tn=Oe(Ce,"WeakMap"),ut=Oe(Object,"create"),nn=pe(Ot),ft=pe(dt),on=pe(Ve),rn=pe(Dt),an=pe(tn),rt=$t?$t.prototype:void 0,Yn=rt?rt.valueOf:void 0;function Ke(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Po(){this.__data__=ut?ut(null):{}}function qo(l){return this.has(l)&&delete this.__data__[l]}function Wo(l){var h=this.__data__;if(ut){var b=h[l];return b===r?void 0:b}return qe.call(h,l)?h[l]:void 0}function Kn(l){var h=this.__data__;return ut?h[l]!==void 0:qe.call(h,l)}function sn(l,h){var b=this.__data__;return b[l]=ut&&h===void 0?r:h,this}Ke.prototype.clear=Po,Ke.prototype.delete=qo,Ke.prototype.get=Wo,Ke.prototype.has=Kn,Ke.prototype.set=sn;function ie(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=[]}function Qo(l){var h=this.__data__,b=Nt(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():Ho.call(h,b,1),!0}function Yo(l){var h=this.__data__,b=Nt(h,l);return b<0?void 0:h[b][1]}function Ko(l){return Nt(this.__data__,l)>-1}function Jo(l,h){var b=this.__data__,C=Nt(b,l);return C<0?b.push([l,h]):b[C][1]=h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l?l.length:0;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__={hash:new Ke,map:new(dt||ie),string:new Ke}}function Zo(l){return ht(this,l).delete(l)}function vo(l){return ht(this,l).get(l)}function er(l){return ht(this,l).has(l)}function tr(l,h){return ht(this,l).set(l,h),this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){this.__data__=new ie(l)}function nr(){this.__data__=new ie}function or(l){return this.__data__.delete(l)}function rr(l){return this.__data__.get(l)}function ar(l){return this.__data__.has(l)}function sr(l,h){var b=this.__data__;if(b instanceof ie){var C=b.__data__;if(!dt||C.length<n-1)return C.push([l,h]),this;b=this.__data__=new ce(C)}return b.set(l,h),this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l,h){var b=un(l)||At(l)?Kt(l.length,String):[],C=b.length,j=!!C;for(var F in l)qe.call(l,F)&&!(j&&(F=="length"||wr(F,C)))&&b.push(F);return b}function Jn(l,h,b){var C=l[h];(!(qe.call(l,h)&&to(C,b))||b===void 0&&!(h in l))&&(l[h]=b)}function Nt(l,h){for(var b=l.length;b--;)if(to(l[b][0],h))return b;return-1}function We(l,h){return l&&dn(h,pn(h),l)}function ln(l,h,b,C,j,F,W){var q;if(C&&(q=F?C(l,j,F,W):C(l)),q!==void 0)return q;if(!Qe(l))return l;var te=un(l);if(te){if(q=yr(l),!h)return mr(l,q)}else{var Q=Xe(l),de=Q==u||Q==p;if(no(l))return Ft(l,h);if(Q==y||Q==a||de&&!F){if(Jt(l))return F?l:{};if(q=Ge(de?{}:l),!h)return gr(l,We(q,l))}else{if(!M[Q])return F?l:{};q=br(l,Q,ln,h)}}W||(W=new ge);var _e=W.get(l);if(_e)return _e;if(W.set(l,q),!te)var ne=b?_r(l):pn(l);return Mn(ne||l,function(ue,le){ne&&(le=ue,ue=l[le]),Jn(q,le,ln(ue,h,b,C,le,l,W))}),q}function ir(l){return Qe(l)?Wn(l):{}}function lr(l,h,b){var C=h(l);return un(l)?C:Ln(C,b(l))}function cr(l){return Ct.call(l)}function dr(l){if(!Qe(l)||Er(l))return!1;var h=fn(l)||Jt(l)?zo:z;return h.test(pe(l))}function ur(l){if(!vn(l))return Qn(l);var h=[];for(var b in Object(l))qe.call(l,b)&&b!="constructor"&&h.push(b);return h}function Ft(l,h){if(h)return l.slice();var b=new l.constructor(l.length);return l.copy(b),b}function cn(l){var h=new l.constructor(l.byteLength);return new vt(h).set(new vt(l)),h}function pt(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function Xn(l,h,b){var C=h?b(zn(l),!0):zn(l);return Yt(C,Mo,new l.constructor)}function Zn(l){var h=new l.constructor(l.source,Bt.exec(l));return h.lastIndex=l.lastIndex,h}function fr(l,h,b){var C=h?b(Hn(l),!0):Hn(l);return Yt(C,$e,new l.constructor)}function pr(l){return Yn?Object(Yn.call(l)):{}}function hr(l,h){var b=h?cn(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function mr(l,h){var b=-1,C=l.length;for(h||(h=Array(C));++b<C;)h[b]=l[b];return h}function dn(l,h,b,C){b||(b={});for(var j=-1,F=h.length;++j<F;){var W=h[j],q=void 0;Jn(b,W,q===void 0?l[W]:q)}return b}function gr(l,h){return dn(l,Je(l),h)}function _r(l){return lr(l,pn,Je)}function ht(l,h){var b=l.__data__;return kr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Oe(l,h){var b=Un(l,h);return dr(b)?b:void 0}var Je=en?Xt(en,Object):Br,Xe=cr;(Ot&&Xe(new Ot(new ArrayBuffer(1)))!=O||dt&&Xe(new dt)!=g||Ve&&Xe(Ve.resolve())!=m||Dt&&Xe(new Dt)!=k||tn&&Xe(new tn)!=E)&&(Xe=function(l){var h=Ct.call(l),b=h==y?l.constructor:void 0,C=b?pe(b):void 0;if(C)switch(C){case nn:return O;case ft:return g;case on:return m;case rn:return k;case an:return E}return h});function yr(l){var h=l.length,b=l.constructor(h);return h&&typeof l[0]=="string"&&qe.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function Ge(l){return typeof l.constructor=="function"&&!vn(l)?ir(ke(l)):{}}function br(l,h,b,C){var j=l.constructor;switch(h){case V:return cn(l);case c:case d:return new j(+l);case O:return pt(l,C);case I:case G:case K:case re:case D:case L:case X:case Se:case Pe:return hr(l,C);case g:return Xn(l,C,b);case B:case _:return new j(l);case x:return Zn(l);case k:return fr(l,C,b);case S:return pr(l)}}function wr(l,h){return h=h??s,!!h&&(typeof l=="number"||Z.test(l))&&l>-1&&l%1==0&&l<h}function kr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function Er(l){return!!Pn&&Pn in l}function vn(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||St;return l===b}function pe(l){if(l!=null){try{return qn.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l){return ln(l,!0,!0)}function to(l,h){return l===h||l!==l&&h!==h}function At(l){return xr(l)&&qe.call(l,"callee")&&(!Gn.call(l,"callee")||Ct.call(l)==a)}var un=Array.isArray;function jt(l){return l!=null&&oo(l.length)&&!fn(l)}function xr(l){return ro(l)&&jt(l)}var no=Vt||Sr;function fn(l){var h=Qe(l)?Ct.call(l):"";return h==u||h==p}function oo(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Qe(l){var h=typeof l;return!!l&&(h=="object"||h=="function")}function ro(l){return!!l&&typeof l=="object"}function pn(l){return jt(l)?Tt(l):ur(l)}function Br(){return[]}function Sr(){return!1}o.exports=eo}(Tn,Tn.exports);var Ga=Tn.exports,Nn={exports:{}};Nn.exports,function(o,t){var n=200,r="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",p="[object Date]",g="[object Error]",B="[object Function]",y="[object GeneratorFunction]",m="[object Map]",x="[object Number]",k="[object Null]",_="[object Object]",S="[object Promise]",E="[object Proxy]",V="[object RegExp]",O="[object Set]",I="[object String]",G="[object Symbol]",K="[object Undefined]",re="[object WeakMap]",D="[object ArrayBuffer]",L="[object DataView]",X="[object Float32Array]",Se="[object Float64Array]",Pe="[object Int8Array]",Ye="[object Int16Array]",Bt="[object Int32Array]",z="[object Uint8Array]",Z="[object Uint8ClampedArray]",M="[object Uint16Array]",we="[object Uint32Array]",Io=/[\\^$.*+?()[\]{}|]/g,Ce=/^\[object .+?Constructor\]$/,Rn=/^(?:0|[1-9]\d*)$/,J={};J[X]=J[Se]=J[Pe]=J[Ye]=J[Bt]=J[z]=J[Z]=J[M]=J[we]=!0,J[c]=J[d]=J[D]=J[u]=J[L]=J[p]=J[g]=J[B]=J[m]=J[x]=J[_]=J[V]=J[O]=J[I]=J[re]=!1;var In=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Mo=typeof self=="object"&&self&&self.Object===Object&&self,$e=In||Mo||Function("return this")(),Mn=t&&!t.nodeType&&t,Ln=Mn&&!0&&o&&!o.nodeType&&o,Yt=Ln&&Ln.exports===Mn,Kt=Yt&&In.process,Un=function(){try{return Kt&&Kt.binding&&Kt.binding("util")}catch{}}(),Jt=Un&&Un.isTypedArray;function zn(l,h){for(var b=-1,C=l==null?0:l.length,j=0,F=[];++b<C;){var W=l[b];h(W,b,l)&&(F[j++]=W)}return F}function Xt(l,h){for(var b=-1,C=h.length,j=l.length;++b<C;)l[j+b]=h[b];return l}function Hn(l,h){for(var b=-1,C=l==null?0:l.length;++b<C;)if(h(l[b],b,l))return!0;return!1}function Lo(l,h){for(var b=-1,C=Array(l);++b<l;)C[b]=h(b);return C}function Uo(l){return function(h){return l(h)}}function St(l,h){return l.has(h)}function Zt(l,h){return l==null?void 0:l[h]}function Pn(l){var h=-1,b=Array(l.size);return l.forEach(function(C,j){b[++h]=[j,C]}),b}function qn(l,h){return function(b){return l(h(b))}}function qe(l){var h=-1,b=Array(l.size);return l.forEach(function(C){b[++h]=C}),b}var Ct=Array.prototype,zo=Function.prototype,ct=Object.prototype,$t=$e["__core-js_shared__"],vt=zo.toString,ke=ct.hasOwnProperty,Wn=function(){var l=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Gn=ct.toString,Ho=RegExp("^"+vt.call(ke).replace(Io,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),en=Yt?$e.Buffer:void 0,Vt=$e.Symbol,Qn=$e.Uint8Array,Ot=ct.propertyIsEnumerable,dt=Ct.splice,Ve=Vt?Vt.toStringTag:void 0,Dt=Object.getOwnPropertySymbols,tn=en?en.isBuffer:void 0,ut=qn(Object.keys,Object),nn=Je($e,"DataView"),ft=Je($e,"Map"),on=Je($e,"Promise"),rn=Je($e,"Set"),an=Je($e,"WeakMap"),rt=Je(Object,"create"),Yn=pe(nn),Ke=pe(ft),Po=pe(on),qo=pe(rn),Wo=pe(an),Kn=Vt?Vt.prototype:void 0,sn=Kn?Kn.valueOf:void 0;function ie(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Go(){this.__data__=rt?rt(null):{},this.size=0}function Qo(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function Yo(l){var h=this.__data__;if(rt){var b=h[l];return b===r?void 0:b}return ke.call(h,l)?h[l]:void 0}function Ko(l){var h=this.__data__;return rt?h[l]!==void 0:ke.call(h,l)}function Jo(l,h){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=rt&&h===void 0?r:h,this}ie.prototype.clear=Go,ie.prototype.delete=Qo,ie.prototype.get=Yo,ie.prototype.has=Ko,ie.prototype.set=Jo;function ce(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function Xo(){this.__data__=[],this.size=0}function Zo(l){var h=this.__data__,b=Ft(h,l);if(b<0)return!1;var C=h.length-1;return b==C?h.pop():dt.call(h,b,1),--this.size,!0}function vo(l){var h=this.__data__,b=Ft(h,l);return b<0?void 0:h[b][1]}function er(l){return Ft(this.__data__,l)>-1}function tr(l,h){var b=this.__data__,C=Ft(b,l);return C<0?(++this.size,b.push([l,h])):b[C][1]=h,this}ce.prototype.clear=Xo,ce.prototype.delete=Zo,ce.prototype.get=vo,ce.prototype.has=er,ce.prototype.set=tr;function ge(l){var h=-1,b=l==null?0:l.length;for(this.clear();++h<b;){var C=l[h];this.set(C[0],C[1])}}function nr(){this.size=0,this.__data__={hash:new ie,map:new(ft||ce),string:new ie}}function or(l){var h=Oe(this,l).delete(l);return this.size-=h?1:0,h}function rr(l){return Oe(this,l).get(l)}function ar(l){return Oe(this,l).has(l)}function sr(l,h){var b=Oe(this,l),C=b.size;return b.set(l,h),this.size+=b.size==C?0:1,this}ge.prototype.clear=nr,ge.prototype.delete=or,ge.prototype.get=rr,ge.prototype.has=ar,ge.prototype.set=sr;function Tt(l){var h=-1,b=l==null?0:l.length;for(this.__data__=new ge;++h<b;)this.add(l[h])}function Jn(l){return this.__data__.set(l,r),this}function Nt(l){return this.__data__.has(l)}Tt.prototype.add=Tt.prototype.push=Jn,Tt.prototype.has=Nt;function We(l){var h=this.__data__=new ce(l);this.size=h.size}function ln(){this.__data__=new ce,this.size=0}function ir(l){var h=this.__data__,b=h.delete(l);return this.size=h.size,b}function lr(l){return this.__data__.get(l)}function cr(l){return this.__data__.has(l)}function dr(l,h){var b=this.__data__;if(b instanceof ce){var C=b.__data__;if(!ft||C.length<n-1)return C.push([l,h]),this.size=++b.size,this;b=this.__data__=new ge(C)}return b.set(l,h),this.size=b.size,this}We.prototype.clear=ln,We.prototype.delete=ir,We.prototype.get=lr,We.prototype.has=cr,We.prototype.set=dr;function ur(l,h){var b=At(l),C=!b&&to(l),j=!b&&!C&&jt(l),F=!b&&!C&&!j&&ro(l),W=b||C||j||F,q=W?Lo(l.length,String):[],te=q.length;for(var Q in l)ke.call(l,Q)&&!(W&&(Q=="length"||j&&(Q=="offset"||Q=="parent")||F&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||br(Q,te)))&&q.push(Q);return q}function Ft(l,h){for(var b=l.length;b--;)if(eo(l[b][0],h))return b;return-1}function cn(l,h,b){var C=h(l);return At(l)?C:Xt(C,b(l))}function pt(l){return l==null?l===void 0?K:k:Ve&&Ve in Object(l)?Xe(l):vn(l)}function Xn(l){return Qe(l)&&pt(l)==c}function Zn(l,h,b,C,j){return l===h?!0:l==null||h==null||!Qe(l)&&!Qe(h)?l!==l&&h!==h:fr(l,h,b,C,Zn,j)}function fr(l,h,b,C,j,F){var W=At(l),q=At(h),te=W?d:Ge(l),Q=q?d:Ge(h);te=te==c?_:te,Q=Q==c?_:Q;var de=te==_,_e=Q==_,ne=te==Q;if(ne&&jt(l)){if(!jt(h))return!1;W=!0,de=!1}if(ne&&!de)return F||(F=new We),W||ro(l)?dn(l,h,b,C,j,F):gr(l,h,te,b,C,j,F);if(!(b&s)){var ue=de&&ke.call(l,"__wrapped__"),le=_e&&ke.call(h,"__wrapped__");if(ue||le){var at=ue?l.value():l,Ze=le?h.value():h;return F||(F=new We),j(at,Ze,b,C,F)}}return ne?(F||(F=new We),_r(l,h,b,C,j,F)):!1}function pr(l){if(!oo(l)||kr(l))return!1;var h=no(l)?Ho:Ce;return h.test(pe(l))}function hr(l){return Qe(l)&&fn(l.length)&&!!J[pt(l)]}function mr(l){if(!Er(l))return ut(l);var h=[];for(var b in Object(l))ke.call(l,b)&&b!="constructor"&&h.push(b);return h}function dn(l,h,b,C,j,F){var W=b&s,q=l.length,te=h.length;if(q!=te&&!(W&&te>q))return!1;var Q=F.get(l);if(Q&&F.get(h))return Q==h;var de=-1,_e=!0,ne=b&a?new Tt:void 0;for(F.set(l,h),F.set(h,l);++de<q;){var ue=l[de],le=h[de];if(C)var at=W?C(le,ue,de,h,l,F):C(ue,le,de,l,h,F);if(at!==void 0){if(at)continue;_e=!1;break}if(ne){if(!Hn(h,function(Ze,mt){if(!St(ne,mt)&&(ue===Ze||j(ue,Ze,b,C,F)))return ne.push(mt)})){_e=!1;break}}else if(!(ue===le||j(ue,le,b,C,F))){_e=!1;break}}return F.delete(l),F.delete(h),_e}function gr(l,h,b,C,j,F,W){switch(b){case L:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case D:return!(l.byteLength!=h.byteLength||!F(new Qn(l),new Qn(h)));case u:case p:case x:return eo(+l,+h);case g:return l.name==h.name&&l.message==h.message;case V:case I:return l==h+"";case m:var q=Pn;case O:var te=C&s;if(q||(q=qe),l.size!=h.size&&!te)return!1;var Q=W.get(l);if(Q)return Q==h;C|=a,W.set(l,h);var de=dn(q(l),q(h),C,j,F,W);return W.delete(l),de;case G:if(sn)return sn.call(l)==sn.call(h)}return!1}function _r(l,h,b,C,j,F){var W=b&s,q=ht(l),te=q.length,Q=ht(h),de=Q.length;if(te!=de&&!W)return!1;for(var _e=te;_e--;){var ne=q[_e];if(!(W?ne in h:ke.call(h,ne)))return!1}var ue=F.get(l);if(ue&&F.get(h))return ue==h;var le=!0;F.set(l,h),F.set(h,l);for(var at=W;++_e<te;){ne=q[_e];var Ze=l[ne],mt=h[ne];if(C)var va=W?C(mt,Ze,ne,h,l,F):C(Ze,mt,ne,l,h,F);if(!(va===void 0?Ze===mt||j(Ze,mt,b,C,F):va)){le=!1;break}at||(at=ne=="constructor")}if(le&&!at){var ao=l.constructor,so=h.constructor;ao!=so&&"constructor"in l&&"constructor"in h&&!(typeof ao=="function"&&ao instanceof ao&&typeof so=="function"&&so instanceof so)&&(le=!1)}return F.delete(l),F.delete(h),le}function ht(l){return cn(l,pn,yr)}function Oe(l,h){var b=l.__data__;return wr(h)?b[typeof h=="string"?"string":"hash"]:b.map}function Je(l,h){var b=Zt(l,h);return pr(b)?b:void 0}function Xe(l){var h=ke.call(l,Ve),b=l[Ve];try{l[Ve]=void 0;var C=!0}catch{}var j=Gn.call(l);return C&&(h?l[Ve]=b:delete l[Ve]),j}var yr=Dt?function(l){return l==null?[]:(l=Object(l),zn(Dt(l),function(h){return Ot.call(l,h)}))}:Br,Ge=pt;(nn&&Ge(new nn(new ArrayBuffer(1)))!=L||ft&&Ge(new ft)!=m||on&&Ge(on.resolve())!=S||rn&&Ge(new rn)!=O||an&&Ge(new an)!=re)&&(Ge=function(l){var h=pt(l),b=h==_?l.constructor:void 0,C=b?pe(b):"";if(C)switch(C){case Yn:return L;case Ke:return m;case Po:return S;case qo:return O;case Wo:return re}return h});function br(l,h){return h=h??i,!!h&&(typeof l=="number"||Rn.test(l))&&l>-1&&l%1==0&&l<h}function wr(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function kr(l){return!!Wn&&Wn in l}function Er(l){var h=l&&l.constructor,b=typeof h=="function"&&h.prototype||ct;return l===b}function vn(l){return Gn.call(l)}function pe(l){if(l!=null){try{return vt.call(l)}catch{}try{return l+""}catch{}}return""}function eo(l,h){return l===h||l!==l&&h!==h}var to=Xn(function(){return arguments}())?Xn:function(l){return Qe(l)&&ke.call(l,"callee")&&!Ot.call(l,"callee")},At=Array.isArray;function un(l){return l!=null&&fn(l.length)&&!no(l)}var jt=tn||Sr;function xr(l,h){return Zn(l,h)}function no(l){if(!oo(l))return!1;var h=pt(l);return h==B||h==y||h==f||h==E}function fn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function oo(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function Qe(l){return l!=null&&typeof l=="object"}var ro=Jt?Uo(Jt):hr;function pn(l){return un(l)?ur(l):mr(l)}function Br(){return[]}function Sr(){return!1}o.exports=xr}(Nn,Nn.exports);var Qa=Nn.exports,Ao={},Ya=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Ao,"__esModule",{value:!0});var Wf=Ya(Ga),Gf=Ya(Qa),jo;(function(o){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Wf.default(i);c||(d=Object.keys(d).reduce(function(u,p){return d[p]!=null&&(u[p]=d[p]),u},{}));for(var f in a)a[f]!==void 0&&i[f]===void 0&&(d[f]=a[f]);return Object.keys(d).length>0?d:void 0}o.compose=t;function n(a,i){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var c=Object.keys(a).concat(Object.keys(i)).reduce(function(d,f){return Gf.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}o.diff=n;function r(a,i){a===void 0&&(a={}),i===void 0&&(i={}),a=a||{};var c=Object.keys(i).reduce(function(d,f){return i[f]!==a[f]&&a[f]!==void 0&&(d[f]=i[f]),d},{});return Object.keys(a).reduce(function(d,f){return a[f]!==i[f]&&i[f]===void 0&&(d[f]=null),d},c)}o.invert=r;function s(a,i,c){if(c===void 0&&(c=!1),typeof a!="object")return i;if(typeof i=="object"){if(!c)return i;var d=Object.keys(i).reduce(function(f,u){return a[u]===void 0&&(f[u]=i[u]),f},{});return Object.keys(d).length>0?d:void 0}}o.transform=s})(jo||(jo={})),Ao.default=jo;var Fn={},An={},Ka;function Qf(){if(Ka)return An;Ka=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(An,"__esModule",{value:!0});var t=o(Xa()),n=function(){function r(s){this.ops=s,this.index=0,this.offset=0}return r.prototype.hasNext=function(){return this.peekLength()<1/0},r.prototype.next=function(s){s||(s=1/0);var a=this.ops[this.index];if(a){var i=this.offset,c=t.default.length(a);if(s>=c-i?(s=c-i,this.index+=1,this.offset=0):this.offset+=s,typeof a.delete=="number")return{delete:s};var d={};return a.attributes&&(d.attributes=a.attributes),typeof a.retain=="number"?d.retain=s:typeof a.insert=="string"?d.insert=a.insert.substr(i,s):d.insert=a.insert,d}else return{retain:1/0}},r.prototype.peek=function(){return this.ops[this.index]},r.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},r.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},r.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,a=this.index,i=this.next(),c=this.ops.slice(this.index);return this.offset=s,this.index=a,[i].concat(c)}else return[]},r}();return An.default=n,An}var Ja;function Xa(){if(Ja)return Fn;Ja=1;var o=ae&&ae.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fn,"__esModule",{value:!0});var t=o(Qf()),n;return function(r){function s(i){return new t.default(i)}r.iterator=s;function a(i){return typeof i.delete=="number"?i.delete:typeof i.retain=="number"?i.retain:typeof i.insert=="string"?i.insert.length:1}r.length=a}(n||(n={})),Fn.default=n,Fn}var Gt=ae&&ae.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},jn=Gt(qf),Yf=Gt(Ga),Ro=Gt(Qa),Qt=Gt(Ao),se=Gt(Xa()),Kf="\0",Jf=function(){function o(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return o.prototype.insert=function(t,n){var r={};return typeof t=="string"&&t.length===0?this:(r.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r))},o.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},o.prototype.retain=function(t,n){if(t<=0)return this;var r={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(r.attributes=n),this.push(r)},o.prototype.push=function(t){var n=this.ops.length,r=this.ops[n-1];if(t=Yf.default(t),typeof r=="object"){if(typeof t.delete=="number"&&typeof r.delete=="number")return this.ops[n-1]={delete:r.delete+t.delete},this;if(typeof r.delete=="number"&&t.insert!=null&&(n-=1,r=this.ops[n-1],typeof r!="object"))return this.ops.unshift(t),this;if(Ro.default(t.attributes,r.attributes)){if(typeof t.insert=="string"&&typeof r.insert=="string")return this.ops[n-1]={insert:r.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof r.retain=="number")return this.ops[n-1]={retain:r.retain+t.retain},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this}}return n===this.ops.length?this.ops.push(t):this.ops.splice(n,0,t),this},o.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},o.prototype.filter=function(t){return this.ops.filter(t)},o.prototype.forEach=function(t){this.ops.forEach(t)},o.prototype.map=function(t){return this.ops.map(t)},o.prototype.partition=function(t){var n=[],r=[];return this.forEach(function(s){var a=t(s)?n:r;a.push(s)}),[n,r]},o.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},o.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+se.default.length(n):n.delete?t-n.delete:t},0)},o.prototype.length=function(){return this.reduce(function(t,n){return t+se.default.length(n)},0)},o.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var r=[],s=se.default.iterator(this.ops),a=0;a<n&&s.hasNext();){var i=void 0;a<t?i=s.next(t-a):(i=s.next(n-a),r.push(i)),a+=se.default.length(i)}return new o(r)},o.prototype.compose=function(t){var n=se.default.iterator(this.ops),r=se.default.iterator(t.ops),s=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){for(var i=a.retain;n.peekType()==="insert"&&n.peekLength()<=i;)i-=n.peekLength(),s.push(n.next());a.retain-i>0&&r.next(a.retain-i)}for(var c=new o(s);n.hasNext()||r.hasNext();)if(r.peekType()==="insert")c.push(r.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),r.peekLength()),f=n.next(d),u=r.next(d);if(typeof u.retain=="number"){var p={};typeof f.retain=="number"?p.retain=d:p.insert=f.insert;var g=Qt.default.compose(f.attributes,u.attributes,typeof f.retain=="number");if(g&&(p.attributes=g),c.push(p),!r.hasNext()&&Ro.default(c.ops[c.ops.length-1],p)){var B=new o(n.rest());return c.concat(B).chop()}}else typeof u.delete=="number"&&typeof f.retain=="number"&&c.push(u)}return c.chop()},o.prototype.concat=function(t){var n=new o(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},o.prototype.diff=function(t,n){if(this.ops===t.ops)return new o;var r=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Kf;var u=d===t?"on":"with";throw new Error("diff() called "+u+" non-document")}).join("")}),s=new o,a=jn.default(r[0],r[1],n),i=se.default.iterator(this.ops),c=se.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var u=0;switch(d[0]){case jn.default.INSERT:u=Math.min(c.peekLength(),f),s.push(c.next(u));break;case jn.default.DELETE:u=Math.min(f,i.peekLength()),i.next(u),s.delete(u);break;case jn.default.EQUAL:u=Math.min(i.peekLength(),c.peekLength(),f);var p=i.next(u),g=c.next(u);Ro.default(p.insert,g.insert)?s.retain(u,Qt.default.diff(p.attributes,g.attributes)):s.push(g).delete(u);break}f-=u}}),s.chop()},o.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
7
|
+
`);for(var r=se.default.iterator(this.ops),s=new o,a=0;r.hasNext();){if(r.peekType()!=="insert")return;var i=r.peek(),c=se.default.length(i)-r.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(r.next());else if(d>0)s.push(r.next(d));else{if(t(s,r.next(1).attributes||{},a)===!1)return;a+=1,s=new o}}s.length()>0&&t(s,{},a)},o.prototype.invert=function(t){var n=new o;return this.reduce(function(r,s){if(s.insert)n.delete(se.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),r+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(r,r+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(se.default.length(c),Qt.default.invert(s.attributes,c.attributes))}),r+a}}return r},0),n.chop()},o.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var r=t,s=se.default.iterator(this.ops),a=se.default.iterator(r.ops),i=new o;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(se.default.length(s.next()));else if(a.peekType()==="insert")i.push(a.next());else{var c=Math.min(s.peekLength(),a.peekLength()),d=s.next(c),f=a.next(c);if(d.delete)continue;f.delete?i.push(f):i.retain(c,Qt.default.transform(d.attributes,f.attributes,n))}return i.chop()},o.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var r=se.default.iterator(this.ops),s=0;r.hasNext()&&s<=t;){var a=r.peekLength(),i=r.peekType();if(r.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},o.Op=se.default,o.AttributeMap=Qt.default,o}(),Xf=Jf;const Zf=ra(Xf);/*!
|
|
8
8
|
* VueQuill @vueup/vue-quill v1.2.0
|
|
9
9
|
* https://vueup.github.io/vue-quill/
|
|
10
10
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Copyright (c) 2023 Ahmad Luthfi Masruri
|
|
15
15
|
* Released under the MIT license
|
|
16
16
|
* Date: 2023-05-12T08:44:03.742Z
|
|
17
|
-
*/const Za={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},
|
|
17
|
+
*/const Za={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},vf=e.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:o=>["delta","html","text"].includes(o)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:o=>["snow","bubble",""].includes(o)},toolbar:{type:[String,Array,Object],required:!1,validator:o=>typeof o=="string"&&o!==""?o.charAt(0)==="#"?!0:Object.keys(Za).indexOf(o)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(o,t)=>{e.onMounted(()=>{a()}),e.onBeforeUnmount(()=>{n=null});let n,r;const s=e.ref(),a=()=>{var D;if(s.value){if(r=i(),o.modules)if(Array.isArray(o.modules))for(const L of o.modules)hn.register(`modules/${L.name}`,L.module);else hn.register(`modules/${o.modules.name}`,o.modules.module);n=new hn(s.value,r),S(o.content),n.on("text-change",p),n.on("selection-change",B),n.on("editor-change",y),o.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),o.theme!=="snow"&&s.value.classList.remove("ql-snow"),(D=n.getModule("toolbar"))===null||D===void 0||D.container.addEventListener("mousedown",L=>{L.preventDefault()}),t.emit("ready",n)}},i=()=>{const D={};if(o.theme!==""&&(D.theme=o.theme),o.readOnly&&(D.readOnly=o.readOnly),o.placeholder&&(D.placeholder=o.placeholder),o.toolbar&&o.toolbar!==""&&(D.modules={toolbar:(()=>{if(typeof o.toolbar=="object")return o.toolbar;if(typeof o.toolbar=="string")return o.toolbar.charAt(0)==="#"?o.toolbar:Za[o.toolbar]})()}),o.modules){const L=(()=>{var X,Se;const Pe={};if(Array.isArray(o.modules))for(const Ye of o.modules)Pe[Ye.name]=(X=Ye.options)!==null&&X!==void 0?X:{};else Pe[o.modules.name]=(Se=o.modules.options)!==null&&Se!==void 0?Se:{};return Pe})();D.modules=Object.assign({},D.modules,L)}return Object.assign({},o.globalOptions,o.options,D)},c=D=>typeof D=="object"&&D?D.slice():D,d=D=>Object.values(D.ops).some(L=>!L.retain||Object.keys(L).length!==1);let f;const u=D=>{if(typeof f==typeof D){if(D===f)return!0;if(typeof D=="object"&&D&&typeof f=="object"&&f)return!d(f.diff(D))}return!1},p=(D,L,X)=>{f=c(_()),u(o.content)||t.emit("update:content",f),t.emit("textChange",{delta:D,oldContents:L,source:X})},g=e.ref(),B=(D,L,X)=>{g.value=!!(n!=null&&n.hasFocus()),t.emit("selectionChange",{range:D,oldRange:L,source:X})};e.watch(g,D=>{D?t.emit("focus",s):t.emit("blur",s)});const y=(...D)=>{D[0]==="text-change"&&t.emit("editorChange",{name:D[0],delta:D[1],oldContents:D[2],source:D[3]}),D[0]==="selection-change"&&t.emit("editorChange",{name:D[0],range:D[1],oldRange:D[2],source:D[3]})},m=()=>s.value,x=()=>{var D;return(D=n==null?void 0:n.getModule("toolbar"))===null||D===void 0?void 0:D.container},k=()=>{if(n)return n;throw`The quill editor hasn't been instantiated yet,
|
|
18
18
|
make sure to call this method when the editor ready
|
|
19
|
-
or use v-on:ready="onReady(quill)" event instead.`},_=(D,L)=>o.contentType==="html"?O():o.contentType==="text"?E(D,L):n==null?void 0:n.getContents(D,L),S=(D,L="api")=>{const X=D||(o.contentType==="delta"?new
|
|
19
|
+
or use v-on:ready="onReady(quill)" event instead.`},_=(D,L)=>o.contentType==="html"?O():o.contentType==="text"?E(D,L):n==null?void 0:n.getContents(D,L),S=(D,L="api")=>{const X=D||(o.contentType==="delta"?new Zf:"");o.contentType==="html"?I(X):o.contentType==="text"?V(X,L):n==null||n.setContents(X,L),f=c(X)},E=(D,L)=>{var X;return(X=n==null?void 0:n.getText(D,L))!==null&&X!==void 0?X:""},V=(D,L="api")=>{n==null||n.setText(D,L)},O=()=>{var D;return(D=n==null?void 0:n.root.innerHTML)!==null&&D!==void 0?D:""},I=D=>{n&&(n.root.innerHTML=D)},G=(D,L="api")=>{const X=n==null?void 0:n.clipboard.convert(D);X&&(n==null||n.setContents(X,L))},K=()=>{n==null||n.focus()},re=()=>{e.nextTick(()=>{var D;!t.slots.toolbar&&n&&((D=n.getModule("toolbar"))===null||D===void 0||D.container.remove()),a()})};return e.watch(()=>o.content,D=>{if(!n||!D||u(D))return;const L=n.getSelection();L&&e.nextTick(()=>n==null?void 0:n.setSelection(L)),S(D)},{deep:!0}),e.watch(()=>o.enable,D=>{n&&n.enable(D)}),{editor:s,getEditor:m,getToolbar:x,getQuill:k,getContents:_,setContents:S,getHTML:O,setHTML:I,pasteHTML:G,focus:K,getText:E,setText:V,reinit:re}},render(){var o,t;return[(t=(o=this.$slots).toolbar)===null||t===void 0?void 0:t.call(o),e.h("div",{ref:"editor",...this.$attrs})]}}),ep=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"RichTextEditor",props:{field:Object},setup(o){const t=o,n=e.computed(()=>t.field.maxImageCounts),r=["SimSun","SimHei","Microsoft-YaHei","KaiTi","FangSong","Arial","Times-New-Roman","sans-serif"],s=[!1,"16px","18px","20px","22px","26px","28px","30px"],a=Rt.default.imports["formats/size"];a.whitelist=s;const i=Rt.default.imports["formats/font"];i.whitelist=r,Rt.default.register(i,!0);const c=Rt.imports["attributors/style/align"];c.whitelist=["right","center","justify"],Rt.default.register(c,!0);const d=e.ref(),f={container:[[{font:r}],[{size:s}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{align:[]}],["link","image"]],handlers:{image:function(){const p=(m,x)=>(m.match(new RegExp(x,"g"))||[]).length,g=d.value.content,B=g?p(g,"<img "):0;if(B>=n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}const y=document.createElement("input");y.setAttribute("type","file"),y.setAttribute("accept","image/*"),y.setAttribute("multiple",!0),y.click(),y.onchange=()=>{const m=y.files;if(m.length+B>n.value){w.ElMessage({message:`${t.field.label}最多只能上传${n.value}张图片!`,type:"warning"});return}for(const k of m)if(k.size<5242880)u(k);else return w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1}}}};function u(p){const g=new FormData;return g.append("image",p),new Promise((B,y)=>{v.post(et().imageUploadUrl,g,{}).then(m=>{const x=m.data.data.imageUrl,k=d.value.getQuill(),_=k.getSelection().index;k.insertEmbed(_,"image",x),k.setSelection(_+1),B(m)}).catch(m=>{console.log("图片上传失败。",m),y("图片上传失败。")})})}return(p,g)=>(e.openBlock(),e.createBlock(e.unref(vf),{ref_key:"quillEditor",ref:d,toolbar:f,"content-type":"html"},null,512))}}},Symbol.toStringTag,{value:"Module"}));H.BaseLayout=Zc,H.DashboardPage=ji,H.DashboardRow=Ri,H.DataTablePage=Do,H.Detail=Ra,H.DetailTab=wd,H.EmptyTip=fe,H.FormEditor=Cn,H.ImagesUploader=ba,H.List=Aa,H.RowActionFormEditor=Tl,H.Statistic=fa,H.StatisticCard=Ti,H.Widget=ua,H.defineDomain=da,H.getConfig=et,H.getDomainConfig=Ht,H.http=he,H.rest=bi,H.setupAppConfig=Ei,H.setupDomainConfigLoader=xi,H.useDataTableStore=Fe,H.useRouteHistoryStore=$n,H.useTableFilterStore=kt,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|
|
20
20
|
//# sourceMappingURL=kouxiangtang.umd.cjs.map
|