kouxiangtang 0.0.39 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AttachmentUploader-BdDkTump.js → AttachmentUploader-DkBTVZW9.js} +2 -2
- package/dist/{AttachmentUploader-BdDkTump.js.map → AttachmentUploader-DkBTVZW9.js.map} +1 -1
- package/dist/{ImageUploader-CHkIpPtj.js → ImageUploader-CI5IMfbX.js} +2 -2
- package/dist/{ImageUploader-CHkIpPtj.js.map → ImageUploader-CI5IMfbX.js.map} +1 -1
- package/dist/{ImagesUploader-p9a3bu1Q.js → ImagesUploader-DP3H4CgN.js} +2 -2
- package/dist/{ImagesUploader-p9a3bu1Q.js.map → ImagesUploader-DP3H4CgN.js.map} +1 -1
- package/dist/{RichTextEditor-DJYZD9vY.js → RichTextEditor-CmWUYWbU.js} +2 -2
- package/dist/{RichTextEditor-DJYZD9vY.js.map → RichTextEditor-CmWUYWbU.js.map} +1 -1
- package/dist/{config-B1iWoDgQ.js → config-BHQjTR1P.js} +3 -3
- package/dist/{config-B1iWoDgQ.js.map → config-BHQjTR1P.js.map} +1 -1
- package/dist/{config-DuvmS9LR.js → config-BNwOB5hl.js} +2 -2
- package/dist/{config-DuvmS9LR.js.map → config-BNwOB5hl.js.map} +1 -1
- package/dist/{config-BDG6ljUO.js → config-BwOPNyIw.js} +2 -2
- package/dist/{config-BDG6ljUO.js.map → config-BwOPNyIw.js.map} +1 -1
- package/dist/{config-BmOWXJKs.js → config-C-L6-5nl.js} +3 -3
- package/dist/{config-BmOWXJKs.js.map → config-C-L6-5nl.js.map} +1 -1
- package/dist/{config-trKFYrjO.js → config-C77NlS42.js} +2 -2
- package/dist/{config-trKFYrjO.js.map → config-C77NlS42.js.map} +1 -1
- package/dist/{config-Xu4Cnivk.js → config-CI8auEwd.js} +2 -2
- package/dist/{config-Xu4Cnivk.js.map → config-CI8auEwd.js.map} +1 -1
- package/dist/{config-BeivkfGi.js → config-CscLYdNf.js} +2 -2
- package/dist/{config-BeivkfGi.js.map → config-CscLYdNf.js.map} +1 -1
- package/dist/{config-CzMS2zhn.js → config-CtTzTOfQ.js} +2 -2
- package/dist/{config-CzMS2zhn.js.map → config-CtTzTOfQ.js.map} +1 -1
- package/dist/{config-C7y05luV.js → config-DiYB27JS.js} +2 -2
- package/dist/{config-C7y05luV.js.map → config-DiYB27JS.js.map} +1 -1
- package/dist/{config-BbXDjdqk.js → config-Dv3oakjJ.js} +2 -2
- package/dist/{config-BbXDjdqk.js.map → config-Dv3oakjJ.js.map} +1 -1
- package/dist/{config-ClsjosNk.js → config-ZW08WCha.js} +2 -2
- package/dist/{config-ClsjosNk.js.map → config-ZW08WCha.js.map} +1 -1
- package/dist/{config-C5CioVqt.js → config-cPSnYR_W.js} +3 -3
- package/dist/{config-C5CioVqt.js.map → config-cPSnYR_W.js.map} +1 -1
- package/dist/{config-SWYlqm92.js → config-imtlNR-t.js} +2 -2
- package/dist/{config-SWYlqm92.js.map → config-imtlNR-t.js.map} +1 -1
- package/dist/{config-DTVPd1QF.js → config-pxsBixPq.js} +2 -2
- package/dist/{config-DTVPd1QF.js.map → config-pxsBixPq.js.map} +1 -1
- package/dist/{config-CsDCisYj.js → config-rtFPHOZL.js} +2 -2
- package/dist/{config-CsDCisYj.js.map → config-rtFPHOZL.js.map} +1 -1
- package/dist/{config-BUyzXYu7.js → config-uT5A3c5i.js} +2 -2
- package/dist/{config-BUyzXYu7.js.map → config-uT5A3c5i.js.map} +1 -1
- package/dist/{index-BX1xTWzJ.js → index-BF3lUmGn.js} +230 -231
- package/dist/{index-BX1xTWzJ.js.map → index-BF3lUmGn.js.map} +1 -1
- package/dist/kouxiangtang.js +1 -1
- package/dist/kouxiangtang.umd.cjs +1 -1
- package/dist/kouxiangtang.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Wo]=this[Wo]={accessors:{}}).accessors,s=this.prototype;function a(i){const c=Ft(i);o[c]||(Gs(s,i),o[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(ge.prototype,({value:r},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[n]=o}}}),$.freezeMethods(ge);function lr(r,t){const n=this||Dt,o=t||n,s=ge.from(o.headers);let a=o.data;return $.forEach(r,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Go(r){return!!(r&&r.__CANCEL__)}function jt(r,t,n){U.call(this,r??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(jt,U,{__CANCEL__:!0});function Qs(r,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?r(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Js=Oe.hasStandardBrowserEnv?{write(r,t,n,o,s,a){const i=[r+"="+encodeURIComponent(t)];$.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),$.isString(o)&&i.push("path="+o),$.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(r){const t=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ks(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Ys(r,t){return t?r.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):r}function Qo(r,t){return r&&!Ks(t)?Ys(r,t):t}const vs=Oe.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;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 o=s(window.location.href),function(i){const c=$.isString(i)?s(i):i;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}();function Xs(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function Zs(r,t){r=r||10;const n=new Array(r),o=new Array(r);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=o[a];i||(i=f),n[s]=d,o[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%r;if(s=(s+1)%r,s===a&&(a=(a+1)%r),f-i<t)return;const x=p&&f-p;return x?Math.round(b*1e3/x):void 0}}function Jo(r,t){let n=0;const o=Zs(50,250);return s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-n,d=o(c),f=a<=i;n=a;const p={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};p[t?"download":"upload"]=!0,r(p)}}const cr={http:Ts,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(n,o){let s=r.data;const a=ge.from(r.headers).normalize();let{responseType:i,withXSRFToken:c}=r,d;function f(){r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let p;if($.isFormData(s)){if(Oe.hasStandardBrowserEnv||Oe.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((p=a.getContentType())!==!1){const[h,...k]=p?p.split(";").map(_=>_.trim()).filter(Boolean):[];a.setContentType([h||"multipart/form-data",...k].join("; "))}}let m=new XMLHttpRequest;if(r.auth){const h=r.auth.username||"",k=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";a.set("Authorization","Basic "+btoa(h+":"+k))}const b=Qo(r.baseURL,r.url);m.open(r.method.toUpperCase(),Uo(b,r.params,r.paramsSerializer),!0),m.timeout=r.timeout;function x(){if(!m)return;const h=ge.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:h,config:r,request:m};Qs(function(B){n(B),f()},function(B){o(B),f()},_),m=null}if("onloadend"in m?m.onloadend=x:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(x)},m.onabort=function(){m&&(o(new U("Request aborted",U.ECONNABORTED,r,m)),m=null)},m.onerror=function(){o(new U("Network Error",U.ERR_NETWORK,r,m)),m=null},m.ontimeout=function(){let k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const _=r.transitional||Ho;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),o(new U(k,_.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,r,m)),m=null},Oe.hasStandardBrowserEnv&&(c&&$.isFunction(c)&&(c=c(r)),c||c!==!1&&vs(b))){const h=r.xsrfHeaderName&&r.xsrfCookieName&&Js.read(r.xsrfCookieName);h&&a.set(r.xsrfHeaderName,h)}s===void 0&&a.setContentType(null),"setRequestHeader"in m&&$.forEach(a.toJSON(),function(k,_){m.setRequestHeader(_,k)}),$.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),i&&i!=="json"&&(m.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&m.addEventListener("progress",Jo(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",Jo(r.onUploadProgress)),(r.cancelToken||r.signal)&&(d=h=>{m&&(o(!h||h.type?new jt(null,r,m):h),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const y=Xs(b);if(y&&Oe.protocols.indexOf(y)===-1){o(new U("Unsupported protocol "+y+":",U.ERR_BAD_REQUEST,r));return}m.send(s||null)})}};$.forEach(cr,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const Ko=r=>`- ${r}`,ei=r=>$.isFunction(r)||r===null||r===!1,Yo={getAdapter:r=>{r=$.isArray(r)?r:[r];const{length:t}=r;let n,o;const s={};for(let a=0;a<t;a++){n=r[a];let i;if(o=n,!ei(n)&&(o=cr[(i=String(n)).toLowerCase()],o===void 0))throw new U(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+a]=o}if(!o){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(Ko).join(`
|
|
5
5
|
`):" "+Ko(a[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:cr};function dr(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new jt(null,r)}function vo(r){return dr(r),r.headers=ge.from(r.headers),r.data=lr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Yo.getAdapter(r.adapter||Dt.adapter)(r).then(function(o){return dr(r),o.data=lr.call(r,r.transformResponse,o),o.headers=ge.from(o.headers),o},function(o){return Go(o)||(dr(r),o&&o.response&&(o.response.data=lr.call(r,r.transformResponse,o.response),o.response.headers=ge.from(o.response.headers))),Promise.reject(o)})}const Xo=r=>r instanceof ge?{...r}:r;function mt(r,t){t=t||{};const n={};function o(f,p,m){return $.isPlainObject(f)&&$.isPlainObject(p)?$.merge.call({caseless:m},f,p):$.isPlainObject(p)?$.merge({},p):$.isArray(p)?p.slice():p}function s(f,p,m){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f,m)}else return o(f,p,m)}function a(f,p){if(!$.isUndefined(p))return o(void 0,p)}function i(f,p){if($.isUndefined(p)){if(!$.isUndefined(f))return o(void 0,f)}else return o(void 0,p)}function c(f,p,m){if(m in t)return o(f,p);if(m in r)return o(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,p)=>s(Xo(f),Xo(p),!0)};return $.forEach(Object.keys(Object.assign({},r,t)),function(p){const m=d[p]||s,b=m(r[p],t[p],p);$.isUndefined(b)&&m!==c||(n[p]=b)}),n}const Zo="1.6.8",ur={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{ur[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const ea={};ur.transitional=function(t,n,o){function s(a,i){return"[Axios v"+Zo+"] Transitional option '"+a+"'"+i+(o?". "+o:"")}return(a,i,c)=>{if(t===!1)throw new U(s(i," has been removed"+(n?" in "+n:"")),U.ERR_DEPRECATED);return n&&!ea[i]&&(ea[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 ti(r,t,n){if(typeof r!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let s=o.length;for(;s-- >0;){const a=o[s],i=t[a];if(i){const c=r[a],d=c===void 0||i(c,a,r);if(d!==!0)throw new U("option "+a+" must be "+d,U.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new U("Unknown option "+a,U.ERR_BAD_OPTION)}}const fr={assertOptions:ti,validators:ur},Ye=fr.validators;class rt{constructor(t){this.defaults=t,this.interceptors={request:new zo,response:new zo}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?a&&!String(o.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
6
|
-
`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&fr.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:fr.assertOptions(s,{encode:Ye.function,serialize:Ye.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=ge.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(d=d&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let p,m=0,b;if(!d){const y=[vo.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),b=y.length,p=Promise.resolve(n);m<b;)p=p.then(y[m++],y[m++]);return p}b=c.length;let x=n;for(m=0;m<b;){const y=c[m++],h=c[m++];try{x=y(x)}catch(k){h.call(this,k);break}}try{p=vo.call(this,x)}catch(y){return Promise.reject(y)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=mt(this.defaults,t);const n=Qo(t.baseURL,t.url);return Uo(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,o){return this.request(mt(o||{},{method:t,url:n,data:(o||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(mt(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});class pr{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 o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new jt(a,i,c),n(o.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 pr(function(s){t=s}),cancel:t}}}function ni(r){return function(n){return r.apply(null,n)}}function ri(r){return $.isObject(r)&&r.isAxiosError===!0}const hr={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(hr).forEach(([r,t])=>{hr[t]=r});function ta(r){const t=new rt(r),n=Bo(rt.prototype.request,t);return $.extend(n,rt.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ta(mt(r,s))},n}const v=ta(Dt);v.Axios=rt,v.CanceledError=jt,v.CancelToken=pr,v.isCancel=Go,v.VERSION=Zo,v.toFormData=pn,v.AxiosError=U,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ni,v.isAxiosError=ri,v.mergeConfig=mt,v.AxiosHeaders=ge,v.formToJSON=r=>Po($.isHTMLForm(r)?new FormData(r):r),v.getAdapter=Yo.getAdapter,v.HttpStatusCode=hr,v.default=v;let gt=null;function oi(r){gt=v.create(r)}function ai(){return gt}async function si(r,t={},n={}){return new Promise((o,s)=>{gt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ii(r,t,n={}){return new Promise((o,s)=>{gt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function li(r,t,n={}){return new Promise((o,s)=>{gt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ci(r,t,n={}){return new Promise((o,s)=>{gt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const _e={get:si,post:ii,put:ci,remove:li,setupAxios:oi,getAxiosInstance:ai};var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function di(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ra={exports:{}};(function(r,t){(function(n,o){typeof di=="function"?r.exports=o():n.pluralize=o()})(te,function(){var n=[],o=[],s={},a={},i={};function c(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function d(h,k){return h===k?k:h===h.toLowerCase()?k.toLowerCase():h===h.toUpperCase()?k.toUpperCase():h[0]===h[0].toUpperCase()?k.charAt(0).toUpperCase()+k.substr(1).toLowerCase():k.toLowerCase()}function f(h,k){return h.replace(/\$(\d{1,2})/g,function(_,E){return k[E]||""})}function p(h,k){return h.replace(k[0],function(_,E){var B=f(k[1],arguments);return d(_===""?h[E-1]:_,B)})}function m(h,k,_){if(!h.length||s.hasOwnProperty(h))return k;for(var E=_.length;E--;){var B=_[E];if(B[0].test(k))return p(k,B)}return k}function b(h,k,_){return function(E){var B=E.toLowerCase();return k.hasOwnProperty(B)?d(E,B):h.hasOwnProperty(B)?d(E,h[B]):m(B,E,_)}}function x(h,k,_,E){return function(B){var C=B.toLowerCase();return k.hasOwnProperty(C)?!0:h.hasOwnProperty(C)?!1:m(C,C,_)===C}}function y(h,k,_){var E=k===1?y.singular(h):y.plural(h);return(_?k+" ":"")+E}return y.plural=b(i,a,n),y.isPlural=x(i,a,n),y.singular=b(a,i,o),y.isSingular=x(a,i,o),y.addPluralRule=function(h,k){n.push([c(h),k])},y.addSingularRule=function(h,k){o.push([c(h),k])},y.addUncountableRule=function(h){if(typeof h=="string"){s[h.toLowerCase()]=!0;return}y.addPluralRule(h,"$0"),y.addSingularRule(h,"$0")},y.addIrregularRule=function(h,k){k=k.toLowerCase(),h=h.toLowerCase(),i[h]=k,a[k]=h},[["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(h){return y.addIrregularRule(h[0],h[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(h){return y.addPluralRule(h[0],h[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(h){return y.addSingularRule(h[0],h[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})})(ra);var ui=ra.exports;const oa=na(ui),mr=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),mn="GET_LIST",gn="GET_ONE",_n="CREATE",yn="UPDATE",_t="REMOVE",gr="RESTORE",aa="ENABLE",fi=[mn,gn,_n,yn,_t,aa];class pi{constructor(t,n,o=fi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.operations=o,this.operations.forEach(s=>{const a=mr(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(mn)){console.log(`${this.side}/${this.domain} 不支持 ${mn} 操作`);return}return _e.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(gn)){console.log(`${this.side}/${this.domain} 不支持 ${gn} 操作`);return}return _e.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(_n)){console.log(`${this.side}/${this.domain} 不支持 ${_n} 操作`);return}return _e.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(yn)){console.log(`${this.side}/${this.domain} 不支持 ${yn} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(gr)){console.log(`${this.side}/${this.domain} 不支持 ${gr} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class hi{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),_e.get(`${this.side}/${this.resources}`,n)}getOne(t){return _e.get(`${this.side}/${this.resources}/${t.id}`)}}const mi={Client:pi,ReadOnlyClient:hi,GET_LIST:mn,GET_ONE:gn,CREATE:_n,UPDATE:yn,REMOVE:_t,RESTORE:gr,ENABLE:aa},gi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):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.":""))))})},_i=["createdAt","updatedAt","deletedAt"];class ne{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),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.fixed=!1}computeWidth(t){return t.width?t.width:_i.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),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.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 o=>!o[t.code];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 sa(r,t,n){console.warn(`${r}.${t} => ${n}`)}const _r={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},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"},component:{config:"component"}};async function ia(r,t,n){const o=await gi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>od),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>cd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>hd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>bd),"./field/component/config.js":()=>Promise.resolve().then(()=>kd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Cd),"./field/image/config.js":()=>Promise.resolve().then(()=>Dd),"./field/images/config.js":()=>Promise.resolve().then(()=>Ud),"./field/json/config.js":()=>Promise.resolve().then(()=>Pd),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>vd),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zd),"./field/select/config.js":()=>Promise.resolve().then(()=>hu),"./field/string/config.js":()=>Promise.resolve().then(()=>bu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Bu),"./field/text/config.js":()=>Promise.resolve().then(()=>Ou),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Fu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function la(r,t="unknown"){return r.map(o=>{if(o instanceof ne)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(_r).includes(o.type)){const s=_r[o.type];return s.deprecated&&sa(t,o.code,s.deprecated),ia(_r[o.type].config,o,t)}return ia("string",o,t)})}let yr={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Rt={};function yi(r){yr={...yr,...r},Rt=r.domainConfigs}function bi(r){Object.keys(Rt).forEach(t=>{const n=Rt[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function ot(){return yr}function br(){return Rt}function bn(r,t){return Rt[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class wi{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=la(o.fields,o.code),!o.simple&&(this.name=br()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showCreate=o.showCreate||!0,this.showSubmit=o.showSubmit||!0,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=n.hasMany||[],this.hasOne=n.hasOne||[],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||[])}wrapFields(t,n){return la(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(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 o=t.rowActions(n);return Array.isArray(o)?o:(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}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 o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function ca(r,t){return new wi(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},ki={class:"card-header"},Ei={class:"title"},da=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(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",ki,[e.createElementVNode("span",Ei,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),xi={key:0},Bi={key:1},Si={key:0},Ci={key:1},ua=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="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(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",xi,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Bi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Si,[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",Ci,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),$i=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(da,null,{default:e.withCtx(()=>[e.createVNode(ua,{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"]]),Vi={},Oi={style:{padding:"20px 0"}};function Ti(r,t){return e.openBlock(),e.createElementBlock("div",Oi,[e.renderSlot(r.$slots,"default")])}const Ni=M(Vi,[["render",Ti]]),Ai=M({__name:"DashboardRow",setup(r){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"]]);function re(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=mr(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Di(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function wr(r){return r.map(t=>Di(t))}const Fi={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return wr(i)}const a=s(t.fields,2);return wr(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(f=>f.code),d=[];for(let f=0;f<c.length;f+=i)d.push(c.slice(f,f+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=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},ji={style:{width:"100%"}},Ri={class:"footer"},Ii={key:1},Li=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=e.ref(!1),i=r,c=wr(i.config.formLayout||[]),d=e.reactive({...i.data}),f=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,B)=>(E[B.code]=x(B.rules),E),{}),m=e.computed(_),b=e.computed(()=>i.config.fields.filter(E=>{const B=E.editable(d,o),C=E.visible(d,o);return E.disabled=C&&!B,B||C}));function x(E){return typeof E=="object"?E:typeof E=="function"?E(d):[]}async function y(){await f.value.validate((E,B)=>{var D,R;if(!E)return console.log("error submit!",B),!1;const C=(D=i.config.fields.find(Y=>["images","attachments","attachment"].includes(Y.type)))==null?void 0:D.code,N={...d};C&&(N[C]=(R=N[C])==null?void 0:R.map(Y=>Y.id)),a.value=!0,s("submit",N,()=>{a.value=!1})})}function h(){s("remove",d)}function k(){if(i.config.removeConfirm){i.config.removeConfirm(d,h);return}w.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{h()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function _(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(o,d):!0}return e.watch(()=>({...d}),(E,B)=>{const N=Object.keys(E).filter(R=>B[R]!==E[R]).map(R=>({field:R,newValue:E[R],oldValue:B[R]}));b.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,N)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(B=>{d[B]=E[B]})},{immediate:!0}),(E,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:f,model:d,"label-width":"100px","label-position":"top",rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Fi,{layout:e.unref(c),fields:b.value},{default:e.withCtx(({field:C})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:C.code,label:C.label,prop:C.code},{default:e.withCtx(()=>[e.createElementVNode("div",ji,[C!=null&&C.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.editor),{key:0,modelValue:d[C.code],"onUpdate:modelValue":N=>d[C.code]=N,field:C,disabled:C.disabled,"form-data":d,"domain-config":i.config},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${C.code}(${C.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Ri,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",type:"danger",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Ii)),m.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-a1a45e4a"]]);function Mi(){return ot().idempotentUrl?_e.get(ot().idempotentUrl).then(r=>r.data):""}const It={getValue:Mi},wn={__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(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.computed(()=>({...a.data,idempotentToken:d.value})),c=e.computed(()=>a.config.fields.filter(y=>y.visible(i,o)).length>=6?"60%":"40%"),d=e.ref(""),f=e.computed({get(){return a.modelValue},set(x){s("update:modelValue",x)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function m(x,y){s("submit",x,async()=>{d.value=await It.getValue(),y()})}function b(x,y){s("remove",x,async()=>{d.value=await It.getValue(),y()})}return e.watch(()=>f,async()=>{d.value=await It.getValue()},{immediate:!0}),(x,y)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:f.value,"onUpdate:modelValue":y[0]||(y[0]=h=>f.value=h),width:c.value,top:"20px",title:p.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":1e3},{default:e.withCtx(()=>[e.createVNode(Li,{config:a.config,data:i.value,removable:a.removable,onSubmit:m,onRemove:b},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Ui={__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:()=>""}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=ca("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(a.fields).then(d=>{a.fields=d,a.restRepeat=t.restRepeat,s.value=a});async function i(){o.value=!0}function c(d,f){t.onSubmit(d).then(()=>{o.value=!1,ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"})}).catch(()=>{console.log("请求失败"),f()})}return(d,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),title:t.text,config:s.value,data:n.value,onSubmit:c},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},zi={class:"not-found"},we=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),fa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ru)),o=ot().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(p){const m=i.value.findIndex(b=>b.id===p.id);i.value.splice(m,1),s("update:modelValue",i.value)}function f(p){w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),_e.post(o,p).then(m=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const b=c(m.data);i.value=i.value?[...i.value,b]:[b],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}),(p,m)=>(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"])]))}};/*! Element Plus v2.7.2 */var Hi={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",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:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},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 qi={__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(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,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"]))]))}};/*! Element Plus Icons Vue v2.3.1 */var Pi=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){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"})]))}}),Wi=Pi,Gi=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){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"})]))}}),Qi=Gi,Ji=e.defineComponent({name:"Close",__name:"close",setup(r){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=Ji,Ki=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){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=Ki,Yi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){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"})]))}}),vi=Yi,Xi=e.defineComponent({name:"Delete",__name:"delete",setup(r){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"})]))}}),Zi=Xi,el=e.defineComponent({name:"Document",__name:"document",setup(r){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"})]))}}),ma=el,tl=e.defineComponent({name:"Download",__name:"download",setup(r){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"})]))}}),nl=tl,rl=e.defineComponent({name:"Grid",__name:"grid",setup(r){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"})]))}}),ol=rl,al=e.defineComponent({name:"Loading",__name:"loading",setup(r){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"})]))}}),ga=al,sl=e.defineComponent({name:"Minus",__name:"minus",setup(r){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"})]))}}),il=sl,ll=e.defineComponent({name:"Operation",__name:"operation",setup(r){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"})]))}}),cl=ll,dl=e.defineComponent({name:"Plus",__name:"plus",setup(r){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"})]))}}),kr=dl,ul=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){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"})]))}}),_a=ul,fl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){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"})]))}}),pl=fl,hl=e.defineComponent({name:"Setting",__name:"setting",setup(r){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"})]))}}),ml=hl,gl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){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"})]))}}),_l=gl,yl=e.defineComponent({name:"View",__name:"view",setup(r){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"})]))}}),bl=yl;const ya=10,kn=Ke.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ya&&(this.history=this.history.slice(2-ya),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),wl={class:"header-box"},kl={class:"header-box-left"},El={class:"page-title"},xl={class:"tabs-container"},Bl={class:"user-profile"},Sl=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=kn(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=x();o.setupRootPath("首页",`/${i}/home`);function d(y){var B,C;const h=y.meta.side,k=y.params.domain;let _=(B=y.meta)==null?void 0:B.title,E=(C=y.meta)==null?void 0:C.code;if(h&&k)_=br()[h][y.params.domain].name,E=y.params.domain,y.params.id&&(_=`${_} - ${y.params.id}`,E=`${y.params.domain}-${y.params.id}`);else{const N=c.find(D=>D.route===y.path);N&&(_=N.title,E=N.route)}_&&E&&(o.push(_,E,y.fullPath),s.value=E)}function f(y){const h=o.history.find(k=>k.code==y.props.name);t.push(h.path)}function p(y){if(o.remove(y),y==s.value){const h=o.getLast();s.value=h.title,t.push(h.path)}}const m=(y,h)=>{const k=o.history.length;return y===0&&h==="self"||y<2&&h==="left"||y===k-1&&h==="right"||k===1&&h==="all"?!1:!(k<2&&h==="other")};function b(y,h){const k=[],_=o.history;switch(h){case"self":k.push(_[y].code);break;case"left":for(let E=0;E<y;E++)E!==0&&k.push(_[E].code);break;case"right":for(let E=y+1;E<_.length;E++)k.push(_[E].code);break;case"all":for(let E=0;E<_.length;E++)E!==0&&k.push(_[E].code);break;case"other":for(let E=1;E<_.length;E++)E!==y&&k.push(_[E].code);break}for(let E=0;E<k.length;E++)p(k[E])}function x(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",null,[e.createElementVNode("div",kl,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",El,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",xl,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=k=>s.value=k),type:"card",class:"tabs",onTabClick:f,onTabRemove:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(k,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:k.title!="首页",label:k.title,name:k.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(()=>[m(_,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:E=>b(_,"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),m(_,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:E=>b(_,"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),m(_,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:E=>b(_,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(vi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:E=>b(_,"all")},{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),m(_,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:E=>b(_,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(cl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(qi,{content:k.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:h[1]||(h[1]=k=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Bl,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-ff10d720"]]),Cl=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),$l={key:2,class:"dot-wrapper"},Vl=[Cl(()=>e.createElementVNode("span",{class:"dot"},null,-1))],ba=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(ba,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",$l,Vl)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),Ol=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=e.ref(n.fullPath),s=r,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;o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(ba,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-4b892735"]]),Tl=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=G.useRoute(),n=r,o={...ot(),...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(Hi)},{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(Sl,{config:o},{"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(()=>[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Ol,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Te=Ke.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),Er=(r,t,n,o)=>Ke.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Nl(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},xr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},xr(r,t,this.filters)}}});function Nl(r,t,n,o,s){let i={...Al(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),xr(r,t,i)}function Al(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function xr(r,t,n){const o=`filters---${t}---${r}`,s=Dl(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Dl(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Fl={class:"sorters-box"},jl=["onClick"],Rl={class:"sorters-label"},Il={class:"sorters-arrow-box"},Ll=["onClick"],Ml=["onClick"],Ul=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let p=0;p<o.value.length;p++){const m=o.value[p];f.field===m.field&&(f.order=m.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const p=s.value;f?p[d].order=f:p[d].order?p[d].order==="ASC"?p[d].order="DESC":p[d].order==="DESC"&&(p[d].order=""):p[d].order="ASC",n("updateSorters",p.filter(m=>m.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:b=>c(m,"")},[e.createElementVNode("div",Rl,e.toDisplayString(p.name),1),e.createElementVNode("div",Il,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",p.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(b=>c(m,"ASC"),["stop"])},null,10,Ll),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",p.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(b=>c(m,"DESC"),["stop"])},null,10,Ml)])],8,jl))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),zl={class:"ranges-box"},Hl={class:"range-item"},ql={class:"range-label"},Pl={class:"range-input-box"},Wl=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.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 p=[...s];p.forEach(m=>{m.field===d&&(m[f]=c)}),n("updateRanges",p.filter(m=>m.min||m.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",Hl,[e.createElementVNode("div",ql,e.toDisplayString(f.name),1),e.createElementVNode("div",Pl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":p=>f.min=p,"controls-position":"right",class:"input-box",onChange:p=>{i(p,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":p=>f.max=p,"controls-position":"right",class:"input-box",type:"number",onChange:p=>{i(p,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Gl={key:0},Ql=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=G.useRoute(),o=re(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=Er(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((_,E)=>{E.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(B=>{a[B]=void 0}),a.isDeleted=E.filters.isDeleted)});function d(_){return typeof _=="boolean"?_:typeof _=="function"?_(o):!0}async function f(_,E){if(typeof _.options=="function")i[_.code]=await _.options(a,o,E);else if(Array.isArray(_.options))i[_.code]=_.options;else if(typeof _.options=="object"){const B=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(Array.isArray(a[_.code])&&a[_.code].length>0)i[_.code]=[],a[_.code].forEach(C=>{B.getOne({id:C}).then(N=>{i[_.code].push({code:N.data[_.options.data.value]||N.data.id,name:N.data[_.options.data.label]||N.data.name})})});else if(!Array.isArray(a[_.code])&&a[_.code])B.getOne({id:a[_.code]}).then(C=>{i[_.code]=[{code:C.data[_.options.data.value]||C.data.id,name:C.data[_.options.data.label]||C.data.name}]});else{const C=_.options.query.keyWord.toString();_.options.url.getList({..._.options.query,[C]:E}).then(N=>{i[_.code]=N.data.rows.map(D=>({code:D[_.options.data.value]||D.id,name:D[_.options.data.label]||D.name}))})}}}function p(_){if(_.remote)return E=>{f(_,E)}}function m(_){a.sorters=_,h()}function b(_){a.filters=_}function x(){Object.keys(a).forEach(_=>{a[_]=void 0}),s.value=Object.keys(t.settings.filters).filter(_=>d(t.settings.filters[_].visible)).map(_=>{const E={...t.settings.filters[_],code:_};return a[_]=y(_),(E.type==="select"||E.type==="selectV2"||E.type==="tree")&&f(E),E}).filter(_=>_.code!=="isDeleted")}function y(_){const E=t.settings.filters[_],B=c.validFilters[_];return E.type==="boolean"&&typeof B!="boolean"?E.value:B}function h(){let _=JSON.parse(JSON.stringify(a));const E=t.settings.filterHook;E!=null&&E.preSubmit&&(_=E.preSubmit(_,o)),c.change(_)}function k(){c.$reset({}),x(),h()}return e.watch(()=>t.settings,()=>{x(),h()},{immediate:!0}),(_,E)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Gl,[e.createVNode(e.unref(w.ElForm),{modelValue:a,"onUpdate:modelValue":E[0]||(E[0]=B=>a=B),inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[B.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",clearable:"",placeholder:`是否${B.name}`,"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${B.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${B.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):B.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:B.name,multiple:B.multiple,"collapse-tags":"",class:e.normalizeClass(B.multiple?"tags-selects-input":""),"multiple-limit":B.multipleLimit?B.multipleLimit:0,"remote-method":p(B),"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[B.code],C=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:C.code,label:C.name,value:C.code,title:C.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):B.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",options:i[B.code]?i[B.code]:[],props:{label:"name",value:"code"},multiple:B.multiple,placeholder:B.name,clearable:"","value-on-clear":null,onChange:h},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):B.type==="sorters"?(e.openBlock(),e.createBlock(Ul,{key:3,value:a[B.code],sorters:B,onUpdateSorters:m},null,8,["value","sorters"])):B.type==="range"?(e.openBlock(),e.createBlock(Wl,{key:4,value:a[B.code],ranges:B,onUpdateRanges:b},null,8,["value","ranges"])):B.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:5,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:B.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):B.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,type:"datetimerange",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":B.name,"end-placeholder":B.name,placeholder:B.name},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:7,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,modelModifiers:{trim:!0},placeholder:B.name,type:B.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(w.ElButton),{onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-af66b6f0"]]),Jl={class:"data-page-title"},Kl={class:"title"},Yl={class:"data-page-toolbar"},vl=M({__name:"DataTableHeader",props:{settings:{type:Object}},setup(r){const t=r,n=t.settings.name,o=G.useRoute(),s=Te(),a=Er(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1);function d(){a.$reset({isDeleted:!c.value})}function f(){const m=`table-view-${o.path}-${t.settings.code}`,b=localStorage.getItem(m);s.change(b)}function p(m){s.change(m);const b=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(b,s.mode)}return e.onMounted(f),(m,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Kl,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Yl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:p},{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(ol))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi))]),_: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:d},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.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(ml))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(Ql,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-4bec2921"]]),Xl={class:"kst-field-row-id"},Zl={key:0},ec={key:1,class:"mono-data"},tc={key:1},wa=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=G.useRoute(),o=r,s=n.meta.side,a=o.row[o.field.code],i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a}`,query:{...re(n),...o.field.rowQuery(o.row)}}));return(c,d)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Xl,[e.unref(a)?(e.openBlock(),e.createElementBlock("span",Zl,[r.field.isRouter?(e.openBlock(),e.createBlock(f,{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(c.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(e.unref(a)),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",ec,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(a)),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",tc," NO ID "))])}}},[["__scopeId","data-v-346429d2"]]);function nc(r){w.ElMessage(r)}const rc={show:nc},Br={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var y;const t=kn(),n=Te(),o=G.useRoute(),s=G.useRouter(),a=re(o),i=r,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var h,k;return i.row.deletedAt?!1:(h=i.operations)!=null&&h.updatable?!0:!!((k=i.operations)!=null&&k.removable)}),p=e.ref((y=i.operations)==null?void 0:y.removable);async function m(){const h=i.settings.formHook,k=i.settings.btnVisible,_=i.settings.rest,{data:E}=await _.getOne({...i.row,...a});c.value=E,h.setupUpdate&&(c.value=h.setupUpdate(c.value)),k.showRemove&&(p.value=k.showRemove(c.value)),d.value=!0}function b(h,k){const _=i.settings.formHook,E=i.settings.rest;Object.keys(a).forEach(B=>{h[B]=a[B]}),_!=null&&_.preUpdateSubmit&&(h=_.preUpdateSubmit(h)),E.update(h).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{k()})}function x(h,k){i.settings.rest.remove(h).then(()=>{rc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(E=>{o.fullPath.includes(E.path)&&(t.remove(E.code),s.back())}),n.fireRemoved()}).catch(()=>{k()})}return(h,k)=>f.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:d.value,"onUpdate:modelValue":k[0]||(k[0]=_=>d.value=_),config:i.settings,data:c.value,removable:p.value,onSubmit:b,onRemove:x},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},oc=r=>(e.pushScopeId("data-v-c9404ecb"),r=r(),e.popScopeId(),r),ac={class:"data-grid-wrapper"},sc={key:0,class:"cover"},ic=oc(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),lc={class:"header"},cc={class:"body"},dc={key:0},uc={class:"key"},fc={class:"value"},pc={key:1,class:"footer tools"},hc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=G.useRoute(),n=re(t),o=e.useSlots(),s=r,a=e.shallowRef([]),i=e.shallowRef(null),c=e.computed(()=>{var p,m;return!!((p=s.operations)!=null&&p.updatable||(m=s.operations)!=null&&m.removable)});function d(){i.value=s.settings.fields.find(p=>p.code==="id"),a.value=s.settings.fields.filter(p=>p.code===s.settings.coverField||p.code===s.settings.nameField||p.code==="id"?!1:p.showInList(n))}function f(p){return s.settings.nameField?p[s.settings.nameField]:p.name?p.name:`${p.id}`}return d(),(p,m)=>(e.openBlock(),e.createElementBlock("div",ac,[r.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(r.data,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},xs:24,sm:12,md:8,lg:6,xl:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",sc,[e.unref(o).cover?e.renderSlot(p.$slots,"cover",{key:0,row:b},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:b[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[ic]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",lc,[e.createVNode(wa,{field:i.value,row:b},e.createSlots({_:2},[b[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(b)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",cc,[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",dc,[e.renderSlot(p.$slots,"body",{row:b},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,x=>(e.openBlock(),e.createElementBlock("div",{key:x.code,class:"field mono-data"},[e.createElementVNode("div",uc,e.toDisplayString(x.label)+" ",1),e.createElementVNode("div",fc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.display),{field:x,row:b,mode:"grid"},null,8,["field","row"]))])]))),128))]),e.unref(o).actions||c.value?(e.openBlock(),e.createElementBlock("div",pc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"actions",{row:b},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:b,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),256))]),_:3}))]))}},[["__scopeId","data-v-c9404ecb"]]);function mc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__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(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=e.useSlots(),i=r,c=e.shallowRef([]),d=e.computed(()=>{var x,y;return!!((x=i.operations)!=null&&x.updatable||(y=i.operations)!=null&&y.removable)});function f(x){s("sort-column",x)}function p(x){s("enable-item",x)}function m(){c.value=i.settings.fields.filter(x=>x.showInList(o))}function b(x){s("select-change",{routeQuery:o,data:x})}return m(),e.watch(()=>i.data,()=>{i.data.length>0&&mc(i.settings,i.data[0])}),(x,y)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:b,onSortChange:f},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,h=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:h.code,label:h.label,width:h.width,prop:h.code,sortable:h.sortable?"custom":!1,fixed:h.fixed},e.createSlots({_:2},[h.type==="switch"?{name:"default",fn:e.withCtx(({row:k})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.display),{field:h,row:k,mode:"list",onEnable:p},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:k})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.display),{key:k.updatedAt,field:h,row:k,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:h})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(x.$slots,"actions",{row:h},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:h})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:h,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-79b9c87c"]]),gc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Te();t.$reset();const{mode:n}=Ke.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=hc:a.value=ka}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(o),(f,p)=>({name:p,fn:e.withCtx(m=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040))}},_c={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Te(),n=G.useRoute(),o=re(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.computed(()=>{var p;return!!((p=s.operations)!=null&&p.creatable)});async function d(){const p=s.settings.formHook,m=s.settings.fields.reduce((b,x)=>(b[x.code]=x.default,b),{});a.value=m,p.setupCreate&&(a.value=p.setupCreate(a.value)),i.value=!0}function f(p,m){const b=s.settings.formHook,x=s.settings.rest;Object.keys(o).forEach(y=>{p[y]=o[y]}),b!=null&&b.preCreateSubmit&&(p=b.preCreateSubmit(p)),x.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{m()})}return(p,m)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"success",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),config:s.settings,data:a.value,removable:!1,onSubmit:f},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object}},setup(r){const t=G.useRouter(),n=Te(),o=r,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 p=await It.getValue();try{await d.action({...f,...o.query,idempotentToken:p}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.isVisible(o.row)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:p.type?p.type:"primary",onClick:m=>i(p,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},yc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object}},setup(r){const t=Te(),n=r,o=e.shallowRef([]),s=e.computed(()=>{var c,d;return((d=(c=n.tableDataSelect)==null?void 0:c.data)==null?void 0:d.length)>0}),a=e.ref(!1);async function i(c){a.value=!0;const d=await It.getValue();try{await c.action({...n.tableDataSelect,idempotentToken:d}),a.value=!1,t.fireUpdated()}catch{a.value=!1,t.fireUpdated()}}return e.watch(()=>n.row,()=>{o.value=n.settings.pageActions(n.query)},{immediate:!0}),(c,d)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,item:f,settings:r.settings,query:r.query,"table-data-select":r.tableDataSelect},null,8,["item","settings","query","table-data-select"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:f.type,loading:a.value,disabled:!f.enable&&!s.value,onClick:p=>i(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64))),256))}},bc={class:"pagination-wrapper"},wc=M({__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(r,{emit:t}){const n=t,o=G.useRouter(),s=G.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,b=>{d.value=b}),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 p(b){i.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function m(b){c.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(b,x)=>(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":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:p,onSizeChange:m},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kc(r){return typeof r=="function"?r():e.unref(r)}function Ec(r){return r}function xc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function Bc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function Sc(r){var t;const n=kc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const Cc=Ba?window:void 0;function $c(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),Bc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ca="__vueuse_ssr_handlers__";Sa[Ca]=Sa[Ca]||{};var $a=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,Tc=(r,t)=>{var n={};for(var o in r)Vc.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&$a)for(var o of $a(r))t.indexOf(o)<0&&Oc.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=Cc}=o,a=Tc(o,["window"]);let i;const c=$c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Sc(r),m=>{d(),c.value&&s&&m&&(i=new ResizeObserver(t),i.observe(m,a))},{immediate:!0,flush:"post"}),p=()=>{d(),f()};return xc(p),{isSupported:c,stop:p}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var Nc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Dc=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?Nc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Fc=(r,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))Dc.call(t,n)&&Na(r,n,t[n]);return r};Fc({linear:Ec},{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 Aa=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object}},setup(r){e.useCssVars(L=>({71828730:K.value}));const t=G.useRoute(),n=re(t),o=r,s=Er(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ke.storeToRefs(s);e.watch(a,L=>{_=L,D()});const i=Te(),{created:c,updated:d,removed:f}=Ke.storeToRefs(i);e.watch([c,d,f],([L,P,de])=>{(L||P||de)&&D()});const p=e.ref(!0),m=e.ref([]),b=e.ref(0),x=e.ref({}),y=e.ref({}),h=e.ref(null),k=e.ref(null);let _={};const E=e.ref(parseInt(t.query.pageSize)||30),B=e.ref(parseInt(t.query.page)||1);function C(L){let P=null;if(L.order==="ascending"?P="ASC":L.order==="descending"&&(P="DESC"),_.sorters){let de=[];_.sorters.some(ye=>ye.field===L.prop)?_.sorters.forEach(ye=>{ye.field===L.prop&&(ye.order=P,ye.name||de.push(ye)),ye.name&&de.push(ye)}):de=[..._.sorters,{field:L.prop,order:P}],_.sorters=de}else _.sorters=[{field:L.prop,order:P}];D()}function N(){y.value=o.settings.operations(n)}function D(){p.value=!0;const L={..._,...n,...o.query,page:B.value,size:E.value};o.settings.rest.getList(L).then(P=>{x.value.data=[],m.value=P.data.rows,b.value=P.data.count,p.value=!1})}function R(L){B.value=L.page,E.value=L.size,D()}function Y(L){const P={id:L.id,enable:!L.enable};o.settings.rest.enable(P).then(()=>{D()})}function et(L){if(L.enable){const P=L.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${P}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y(L)}).catch(()=>{})}else Y(L)}function Ue(L){x.value=L}const V=e.ref(0),I=e.ref(0);Va(h,L=>{var P;V.value=((P=L[0])==null?void 0:P.contentRect.height)||0}),Va(k,L=>{var P;I.value=((P=L[0])==null?void 0:P.contentRect.height)||0});const K=e.computed(()=>`${V.value+I.value}px`);return N(),(L,P)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:h},[e.createVNode(vl,{settings:o.settings},{operations:e.withCtx(()=>[e.createVNode(yc,{settings:o.settings,"table-data-select":x.value,query:e.unref(n)},null,8,["settings","table-data-select","query"]),e.createVNode(_c,{settings:o.settings,operations:y.value},null,8,["settings","operations"])]),_:1},8,["settings"])],512),e.withDirectives((e.openBlock(),e.createBlock(gc,{class:"data-table-box",data:m.value,operations:y.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:C,onEnableItem:et,onSelectChange:Ue},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:de})=>[e.createVNode(Ea,{row:de,settings:o.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]]),e.createElementVNode("div",{ref_key:"pagination",ref:k},[e.createVNode(wc,{page:B.value,size:E.value,total:b.value,onPageChange:R},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-9a31cd72"]]),jc={key:1,class:"loading-wrapper"},Rc=M({__name:"List",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null);return bn(n,o).then(a=>{s.value=a}),(a,i)=>s.value?(e.openBlock(),e.createBlock(Aa,{key:0,settings:s.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",jc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-49ae0ff6"]]),Ic={key:0},Lc={class:"key"},Mc={class:"value"},Uc={key:1,class:"loading-wrapper"},Da=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=Te(),{updated:a}=Ke.storeToRefs(s),i=e.shallowRef([]),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json"];i.value=o.settings.fields.filter(y=>y.showInDetail());const f=e.computed(()=>i.value.find(y=>y.code===o.settings.coverField)),p=e.computed(()=>i.value.filter(y=>!d.includes(y.type))),m=e.computed(()=>{var h;const y=(h=f.value)==null?void 0:h.code;return i.value.filter(k=>d.includes(k.type)).filter(k=>k.code!==y)}),b=e.computed({get(){return m.value.map(y=>y.code)},set(y){}});function x(){o.settings.rest.getOne(o.query).then(y=>{y.data.isDeleted=!!y.data.deletedAt,c.value=y.data,n("done",y.data)})}return e.watch(a,()=>{x()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[f.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(f.value.display),{field:f.value,row:c.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:f.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(p.value,k=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:k.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Lc,e.toDisplayString(k.label),1),e.createElementVNode("div",Mc,[k.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(k.display),{key:1,field:k,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),m.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:b.value,"onUpdate:modelValue":h[0]||(h[0]=k=>b.value=k),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,k=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:k.label,name:k.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.display),{field:k,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Uc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-27106b05"]]),zc={class:"data-page-title"},Hc={class:"title"},qc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){const n=kn(),o=G.useRoute(),s=re(o),a=r,i=e.ref("加载中..."),c=e.ref({});function d(p,m){const b=`${p}-${m}`;n.updateTitleByCode(b,i.value),document.title=i.value}function f(p){const m=a.settings;i.value=`${m.name}: ${m.formatName(p)}`,d(m.code,p.id)}return e.watch(()=>a.data,p=>{p&&(c.value=a.settings.operations(s),f(p))},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Hc,e.toDisplayString(i.value),1),e.createElementVNode("div",null,[a.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:a.data,settings:a.settings,query:e.unref(s)},null,8,["row","settings","query"]),e.createVNode(Br,{row:a.data,settings:a.settings,operations:c.value,"is-detail":!0},null,8,["row","settings","operations"])]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-b3976736"]]),Pc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=re(n),s=r,a=e.shallowRef([]),i=e.ref(""),c=e.shallowRef(null),d=e.ref(null),f=Te();Ke.storeToRefs(f),a.value=s.settings.fields.filter(x=>x.showInDetail!==!1);function p(x){d.value=x}function m(x){i.value=x.props.name,t.push({name:`${n.meta.side}-association`,params:{association:x.props.name},query:o})}function b(x){if(s.associations.length>0)if(n.params.association){i.value=n.params.association;const y=s.associations.find(h=>h.domain===n.params.association);c.value={...y,domainData:d.value}}else i.value=s.associations[0].domain,c.value={...s.associations[0],domainData:d.value},x&&x()}return e.watch(d,()=>{b(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:i.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d.value&&b()},{immediate:!0}),(x,y)=>{const h=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(n).params.domain}-${e.unref(n).params.id}`},[e.createVNode(qc,{data:d.value,settings:s.settings,query:{...e.unref(n).params,...e.unref(o)}},null,8,["data","settings","query"]),e.createVNode(Da,{query:{...e.unref(n).params,...e.unref(o)},settings:s.settings,onDone:p},null,8,["query","settings"]),e.createVNode(e.unref(w.ElTabs),{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=k=>i.value=k),class:"association-tabs",onTabClick:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,k=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:k.name,name:k.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),c.value?(e.openBlock(),e.createBlock(h,{key:c.value,association:c.value},null,8,["association"])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-4881eb36"]]),Wc={key:1,class:"loading-wrapper"},Gc=M({__name:"Detail",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null),a=e.shallowRef([]);bn(n,o).then(c=>{const d=c,f=i("has-many",d.hasMany),p=i("has-one",d.hasOne);s.value=d,a.value=f.concat(p)});function i(c,d){return(d||[]).map(f=>typeof f=="object"?{type:c,domain:f.code,name:f.name,query:f.query||(()=>({}))}:{type:c,domain:f,name:br()[n][f].name,query:()=>({})})}return(c,d)=>s.value?(e.openBlock(),e.createBlock(Pc,{key:0,settings:s.value,associations:a.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Wc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-7c232776"]]),Qc={key:0},Jc={key:1,class:"loading-wrapper"},Kc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=G.useRoute(),n=t.meta.side,o=re(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{bn(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",Qc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Aa,{key:`has-many-${a.value.domain}`,settings:a.value.settings,query:a.value.query(s.association.domainData)},null,8,["settings","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(Da,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Jc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-bb501ead"]]),Yc={key:0},vc={class:"file-name"},Xc={class:"name"},Zc={class:"file-type"},ed={key:1},td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(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",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vc,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createElementVNode("span",Xc,e.toDisplayString(c.name),1),e.createElementVNode("span",Zc,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_: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(bl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(we)]))}},[["__scopeId","data-v-196b9bff"]]),nd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(p){a.value=a.value?[...a.value,p]:[p]}function c(p){const m=a.value.findIndex(b=>b.id===p.id);a.value.splice(m,1)}async function d(p){const m=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(p.name)){ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await m.updateFilesName(p).then(()=>{ElMessage({message:"附件名称已修改!",type:"success"})})}function f(p,m){if(m=="success"){i(p),o("update:modelValue",a.value);return}if(m=="remove"){c(p),o("update:modelValue",a.value);return}if(m=="change"){d(p);return}}return(p,m)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:m[0]||(m[0]=b=>f(b,"success")),onOnRemove:m[1]||(m[1]=b=>f(b,"remove")),onOnChange:m[2]||(m[2]=b=>f(b,"change"))},null,8,["pics","props"]))}};class rd extends ne{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=td,this.editor=nd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const od=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),ad={key:3},sd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=G.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...re(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let p=null;const m=bn(s,o).then(h=>(p=h.formatName,Promise.resolve(h.rest)));function b(h){return n.field.isRouter(n.row,re(t))}function x(){m.then(h=>{c.value=!0;const k=n.row[n.field.code],_=n.row[mr(`${o}-name`)];if(!k){y(!1),c.value=!1;return}if(k&&_){y({id:k,name:_}),c.value=!1;return}const E={id:k};h.getOne(E).then(B=>{y(B.data),c.value=!1}).catch(B=>{console.log(B)})})}function y(h){if(d.value=!1,n.field.showName){sa(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=h[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(h);return}if(h.id&&h.name){f.value=h.name;return}if(!h){d.value=!0;return}f.value=p(h)}return e.watch(()=>n.row,x,{immediate:!0}),(h,k)=>{const _=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(ga))]),_:1})):d.value?(e.openBlock(),e.createBlock(we,{key:1})):b(r.row)?(e.openBlock(),e.createBlock(_,{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",ad,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-fb849d3e"]]),id={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}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(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),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,b=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class ld extends ne{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=sd,this.editor=id,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),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 cd=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),dd={style:{display:"flex","align-items":"center"}},ud={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",dd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Qi))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(pl))]),_:1}))]))}},fd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class pd extends ne{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ud,this.editor=fd,this.checkValidProperties(t)}}const hd=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),md={key:0},gd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",md,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},_d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class yd extends ne{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=gd,this.editor=_d,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"}));class wd extends ne{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"})),Ed={key:0},xd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Ed,e.toDisplayString(o.value),1))}},Bd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Sd extends ne{constructor(t,n){super(t,n),this.display=xd,this.editor=Bd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),$d=r=>(e.pushScopeId("data-v-35bc9ffb"),r=r(),e.popScopeId(),r),Vd={class:"loading-error"},Od=$d(()=>e.createElementVNode("div",null,"加载失败",-1)),Td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[e.createVNode(e.unref(w.ElImage),{src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Vd,[Od,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])],2))}},[["__scopeId","data-v-35bc9ffb"]]),Nd={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("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,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ad extends ne{constructor(t,n){super(t,n),this.display=Td,this.editor=Nd,this.checkValidProperties(t)}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Fd=r=>(e.pushScopeId("data-v-4cb2ce7b"),r=r(),e.popScopeId(),r),jd={class:"image-card",style:{"margin-bottom":"20px"}},Rd={class:"loading-error"},Id=Fd(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Ld=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.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",jd,[e.createVNode(e.unref(w.ElImage),{src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Rd,[Id,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])]))),256))]),_:1})):(e.openBlock(),e.createBlock(we,{key:1}))}},[["__scopeId","data-v-4cb2ce7b"]]);class Md extends ne{constructor(t,n){super(t,n),this.props=t.props,this.display=Ld,this.editor=fa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),zd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.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(we,{key:1}))}},Hd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(){o("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 qd extends ne{constructor(t,n){super(t,n),this.display=zd,this.editor=Hd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Pd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),Wd={class:"editor-field"},Gd=["innerHTML"],Qd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Gd)]))}},[["__scopeId","data-v-02b50564"]]),Jd={style:{width:"100%"}},Kd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rf)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Jd,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d)},null,8,["content"])]))}};class Yd extends ne{constructor(t,n){super(t,n),this.display=Qd,this.editor=Kd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const vd=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"}));class Xd extends ne{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=typeof t.isRouter>"u"?!0:t.isRouter,this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"}));var F=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},O=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},ve,at,ke,yt,Lt,Ne,Ae,De,Fe,je,Re,Ie,Le,st,bt,Xe,En,Ze;const eu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},T="0123456789abcdef".split(""),tu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],xn=[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],ee=[];class nu{constructor(t=!1,n=!1){ve.set(this,void 0),at.set(this,void 0),ke.set(this,void 0),yt.set(this,void 0),Lt.set(this,void 0),Ne.set(this,void 0),Ae.set(this,void 0),De.set(this,void 0),Fe.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Le.set(this,void 0),st.set(this,void 0),bt.set(this,void 0),Xe.set(this,void 0),En.set(this,0),Ze.set(this,void 0),this.init(t,n)}init(t,n){n?(ee[0]=ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0,F(this,at,ee)):F(this,at,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Ne,3238371032),F(this,Ae,914150663),F(this,De,812702999),F(this,Fe,4144912697),F(this,je,4290775857),F(this,Re,1750603025),F(this,Ie,1694076839),F(this,Le,3204075428)):(F(this,Ne,1779033703),F(this,Ae,3144134277),F(this,De,1013904242),F(this,Fe,2773480762),F(this,je,1359893119),F(this,Re,2600822924),F(this,Ie,528734635),F(this,Le,1541459225)),F(this,ve,F(this,Ze,F(this,ke,F(this,bt,0)))),F(this,yt,F(this,st,!1)),F(this,Lt,!0),F(this,Xe,t)}update(t){if(O(this,yt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=O(this,at);for(;o<s;){let i;if(O(this,st)&&(F(this,st,!1),a[0]=O(this,ve),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=O(this,Ze);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=O(this,Ze);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}F(this,En,i),F(this,ke,O(this,ke)+(i-O(this,Ze))),i>=64?(F(this,ve,a[16]),F(this,Ze,i-64),this.hash(),F(this,st,!0)):F(this,Ze,i)}return O(this,ke)>4294967295&&(F(this,bt,O(this,bt)+(O(this,ke)/4294967296<<0)),F(this,ke,O(this,ke)%4294967296)),this}finalize(){if(O(this,yt))return;F(this,yt,!0);const t=O(this,at),n=O(this,En);t[16]=O(this,ve),t[n>>2]|=tu[n&3],F(this,ve,t[16]),n>=56&&(O(this,st)||this.hash(),t[0]=O(this,ve),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]=O(this,bt)<<3|O(this,ke)>>>29,t[15]=O(this,ke)<<3,this.hash()}hash(){let t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le);const f=O(this,at);let p,m,b,x,y,h,k,_,E,B;for(let C=16;C<64;++C)x=f[C-15],p=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,x=f[C-2],m=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,f[C]=f[C-16]+p+f[C-7]+m<<0;B=n&o;for(let C=0;C<64;C+=4)O(this,Lt)?(O(this,Xe)?(k=300032,x=f[0]-1413257819,d=x-150054599<<0,s=x+24177077<<0):(k=704751109,x=f[0]-210244248,d=x-1521486534<<0,s=x+143694565<<0),F(this,Lt,!1)):(p=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),k=t&n,b=k^t&o^B,h=a&i^~a&c,x=d+m+h+xn[C]+f[C],y=p+b,d=s+x<<0,s=x+y<<0),p=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),m=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),_=s&t,b=_^s&n^k,h=d&a^~d&i,x=c+m+h+xn[C+1]+f[C+1],y=p+b,c=o+x<<0,o=x+y<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),m=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),E=o&s,b=E^o&t^_,h=c&d^~c&a,x=i+m+h+xn[C+2]+f[C+2],y=p+b,i=n+x<<0,n=x+y<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),B=n&o,b=B^n&s^E,h=i&c^~i&d,x=a+m+h+xn[C+3]+f[C+3],y=p+b,a=t+x<<0,t=x+y<<0;F(this,Ne,O(this,Ne)+t<<0),F(this,Ae,O(this,Ae)+n<<0),F(this,De,O(this,De)+o<<0),F(this,Fe,O(this,Fe)+s<<0),F(this,je,O(this,je)+a<<0),F(this,Re,O(this,Re)+i<<0),F(this,Ie,O(this,Ie)+c<<0),F(this,Le,O(this,Le)+d<<0)}hex(){this.finalize();const t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le);let f=T[t>>28&15]+T[t>>24&15]+T[t>>20&15]+T[t>>16&15]+T[t>>12&15]+T[t>>8&15]+T[t>>4&15]+T[t&15]+T[n>>28&15]+T[n>>24&15]+T[n>>20&15]+T[n>>16&15]+T[n>>12&15]+T[n>>8&15]+T[n>>4&15]+T[n&15]+T[o>>28&15]+T[o>>24&15]+T[o>>20&15]+T[o>>16&15]+T[o>>12&15]+T[o>>8&15]+T[o>>4&15]+T[o&15]+T[s>>28&15]+T[s>>24&15]+T[s>>20&15]+T[s>>16&15]+T[s>>12&15]+T[s>>8&15]+T[s>>4&15]+T[s&15]+T[a>>28&15]+T[a>>24&15]+T[a>>20&15]+T[a>>16&15]+T[a>>12&15]+T[a>>8&15]+T[a>>4&15]+T[a&15]+T[i>>28&15]+T[i>>24&15]+T[i>>20&15]+T[i>>16&15]+T[i>>12&15]+T[i>>8&15]+T[i>>4&15]+T[i&15]+T[c>>28&15]+T[c>>24&15]+T[c>>20&15]+T[c>>16&15]+T[c>>12&15]+T[c>>8&15]+T[c>>4&15]+T[c&15];return O(this,Xe)||(f+=T[d>>28&15]+T[d>>24&15]+T[d>>20&15]+T[d>>16&15]+T[d>>12&15]+T[d>>8&15]+T[d>>4&15]+T[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&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 O(this,Xe)||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(O(this,Xe)?28:32),n=new DataView(t);return n.setUint32(0,O(this,Ne)),n.setUint32(4,O(this,Ae)),n.setUint32(8,O(this,De)),n.setUint32(12,O(this,Fe)),n.setUint32(16,O(this,je)),n.setUint32(20,O(this,Re)),n.setUint32(24,O(this,Ie)),O(this,Xe)||n.setUint32(28,O(this,Le)),t}}ve=new WeakMap,at=new WeakMap,ke=new WeakMap,yt=new WeakMap,Lt=new WeakMap,Ne=new WeakMap,Ae=new WeakMap,De=new WeakMap,Fe=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Le=new WeakMap,st=new WeakMap,bt=new WeakMap,Xe=new WeakMap,En=new WeakMap,Ze=new WeakMap;function ru(r){const t=new nu;return t.update(r),parseInt(t.hex().substring(0,8),16)}const ou=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},au=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class su{constructor(t={}){const[n,o]=[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=o,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=ru,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=eu)}hsl(t){var n,o,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),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return au.apply(this,n)}hex(t){var n=this.rgb(t);return ou(n)}}const iu=new su;function lu(r){const t=iu.hex(`abc${r}cba`);return cu(t.replace("#",""),-20)}function cu(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Fa={strToHexColor:lu},du={key:0,class:"select-fields"},uu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code];if(t.field.label,i==null){n.value="<无>",o.value=!1;return}const c=await t.field.options();if(!c){n.value=`<未知: ${i}>`,o.value=!1;return}let d=[];if(t.field.multiple?d=c.filter(f=>i.includes(f.code)):d=c.filter(f=>i===f.code),d.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=d.map(f=>({bgColor:Fa.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>o.value?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${d.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${d.bgColor}`)},e.toDisplayString(d.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}},[["__scopeId","data-v-0f1a01e9"]]),fu={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),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,b=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class pu extends ne{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=uu,this.editor=fu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),mu={key:0},gu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",mu,e.toDisplayString(o.value),1))}},_u={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class yu extends ne{constructor(t,n){super(t,n),this.display=gu,this.editor=_u,this.checkValidProperties(t)}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={style:{display:"flex","align-items":"center"}},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,p)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",wu,[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(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Eu={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class xu extends ne{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ku,this.editor=Eu,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={key:0},Cu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(o.value),1))}},$u={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Vu extends ne{constructor(t,n){super(t,n),this.display=Cu,this.editor=$u,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ou=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Tu={key:0,class:"select-fields"},Nu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code],c=t.field.label;if(i==null){n.value="<无>",o.value=!1;return}const d=await t.field.options();if(!d){n.value=`<未知: ${c}>`,o.value=!1;return}let f=[];if(t.field.multiple?f=d.filter(p=>i.includes(p.code)):f=d.filter(p=>i===p.code),f.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=f.map(p=>({bgColor:Fa.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>{const d=e.resolveComponent("el-tooltip");return o.value?(e.openBlock(),e.createElementBlock("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createBlock(d,{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}}},[["__scopeId","data-v-ed986acf"]]),Au={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(m){c.value=await a.field.options(a.formData,o,m)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(m,b)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=x=>i.value=x),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"show-checkbox":"","check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":!0,remote:"",filterable:"","remote-method":f,onCheck:p},null,8,["modelValue","data","multiple","disabled"]))}};class Du extends ne{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.display=Nu,this.editor=Au,this.checkValidProperties(t)}}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju=["src"],Ru=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(b=>{if(!(b!=null&&b.url))return{...b,name:"unknown",fileType:"unknown"};const x=b.url.substring(b.url.lastIndexOf(".")+1),y=b.url.split("/");return{...b,name:y[y.length-1],fileType:x}}));function c(b){n("on-remove",b)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(b){o.value=b.url,s.value=!0}function p(b){return b.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function m(b){const x=new FormData;x.append("file",b.file),n("on-upload",x)}return(b,x)=>(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":p,"http-request":m,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{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(kr))]),_: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","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":x[1]||(x[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,ju)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),Iu=["src"],Lu={class:"file-type"},Mu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__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(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(h=>{const k=h.url.substring(h.url.lastIndexOf(".")+1);if(typeof h.name!==void 0)return h.fileType=k,h;if(h.url){const _=h.url.split("/");return{...h,name:_[_.length-1],fileType:k}}return{...h,name:h.id,fileType:k}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=ot().fileUploadUrl;`${localStorage.getItem("token")}`;const d=h=>{const k=new FileReader;return k.readAsDataURL(h),new Promise(function(_,E){return h.type.startsWith("image/")?(k.onload=async B=>{const C=new Image;C.src=B.target.result,C.onload=()=>{const N=document.createElement("canvas"),D=N.getContext("2d");N.width=C.width,N.height=C.height,D.drawImage(C,0,0,N.width,N.height),N.toBlob(R=>{const Y=new File([R],h.name,{type:h.type,lastModified:Date.now()});_(Y)},h.type,.5)}},!1):(_(h),!1)})},f=h=>{n("on-remove",h)},p=()=>{w.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},m=h=>{a.value=h.url,i.value=!0},b=h=>{d(h).then(k=>k.size/1024/1024<5?(y(k),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function x(h,k){if(!h.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",h)}function y(h){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((k,_)=>{const E=new FormData;E.append("file",h),v.post(c,E,{}).then(B=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",B.data.data),k(B.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),_("Upload failed")})})}return(h,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":f,"before-upload":b,"on-exceed":p,"on-preview":m,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(kr))]),_: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":k[1]||(k[1]=_=>i.value=_)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Iu)]),_:1},8,["modelValue"]),o.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,(_,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:E,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:_.name,"onUpdate:modelValue":B=>_.name=B,onChange:B=>x(_)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Lu,"."+e.toDisplayString(_.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:B=>f(_)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-c3169746"]])},Symbol.toStringTag,{value:"Module"})),Uu={class:"image-slot"},zu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=ot().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((p,m)=>{const b=new FormData;b.append("image",f.file),v.post(s,b,{}).then(x=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),p(x.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),m("Upload failed")})})}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(kr))]),_:1})),o.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(Zi))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Me=-1,xe=1,fe=0;function Mt(r,t,n,o){if(r===t)return r?[[fe,r]]:[];if(n!=null){var s=Gu(r,t,n);if(s)return s}var a=Sr(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Cr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=Hu(r,t);return i&&d.unshift([fe,i]),c&&d.push([fe,c]),Ra(d,o),d}function Hu(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Me,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[fe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Me),n;if(s.length===1)return[[Me,r],[xe,t]];var i=Pu(r,t);if(i){var c=i[0],d=i[1],f=i[2],p=i[3],m=i[4],b=Mt(c,f),x=Mt(d,p);return b.concat([[fe,m]],x)}return qu(r,t)}function qu(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/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 p=n-o,m=p%2!==0,b=0,x=0,y=0,h=0,k=0;k<s;k++){for(var _=-k+b;_<=k-x;_+=2){var E=a+_,B;_===-k||_!==k&&c[E-1]<c[E+1]?B=c[E+1]:B=c[E-1]+1;for(var C=B-_;B<n&&C<o&&r.charAt(B)===t.charAt(C);)B++,C++;if(c[E]=B,B>n)x+=2;else if(C>o)b+=2;else if(m){var N=a+p-_;if(N>=0&&N<i&&d[N]!==-1){var D=n-d[N];if(B>=D)return ja(r,t,B,C)}}}for(var R=-k+y;R<=k-h;R+=2){var N=a+R,D;R===-k||R!==k&&d[N-1]<d[N+1]?D=d[N+1]:D=d[N-1]+1;for(var Y=D-R;D<n&&Y<o&&r.charAt(n-D-1)===t.charAt(o-Y-1);)D++,Y++;if(d[N]=D,D>n)h+=2;else if(Y>o)y+=2;else if(!m){var E=a+p-R;if(E>=0&&E<i&&c[E]!==-1){var B=c[E],C=a+B-E;if(D=n-D,B>=D)return ja(r,t,B,C)}}}}return[[Me,r],[xe,t]]}function ja(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Mt(s,a),f=Mt(i,c);return d.concat(f)}function Sr(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ia(r.charCodeAt(s-1))&&s--,s}function Cr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return La(r.charCodeAt(r.length-s))&&s--,s}function Pu(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(x,y,h){for(var k=x.substring(h,h+Math.floor(x.length/4)),_=-1,E="",B,C,N,D;(_=y.indexOf(k,_+1))!==-1;){var R=Sr(x.substring(h),y.substring(_)),Y=Cr(x.substring(0,h),y.substring(0,_));E.length<Y+R&&(E=y.substring(_-Y,_)+y.substring(_,_+R),B=x.substring(0,h-Y),C=x.substring(h+R),N=y.substring(0,_-Y),D=y.substring(_+R))}return E.length*2>=x.length?[B,C,N,D,E]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,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,p,m;r.length>t.length?(d=c[0],f=c[1],p=c[2],m=c[3]):(p=c[0],m=c[1],d=c[2],f=c[3]);var b=c[4];return[d,f,p,m,b]}function Ra(r,t){r.push([fe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Me:o++,a+=r[n][1],n++;break;case fe:var d=n-s-o-1;if(t){if(d>=0&&Ua(r[d][1])){var f=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=f+a,i=f+i,!r[d][1]){r.splice(d,1),n--;var p=d-1;r[p]&&r[p][0]===xe&&(s++,i=r[p][1]+i,p--),r[p]&&r[p][0]===Me&&(o++,a=r[p][1]+a,p--),d=p}}if(Ma(r[n][1])){var f=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=f,i+=f}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Sr(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[fe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Cr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var m=s+o;a.length===0&&i.length===0?(r.splice(n-m,m),n=n-m):a.length===0?(r.splice(n-m,m,[xe,i]),n=n-m+1):i.length===0?(r.splice(n-m,m,[Me,a]),n=n-m+1):(r.splice(n-m,m,[Me,a],[xe,i]),n=n-m+2)}n!==0&&r[n-1][0]===fe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var b=!1;for(n=1;n<r.length-1;)r[n-1][0]===fe&&r[n+1][0]===fe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),b=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),b=!0)),n++;b&&Ra(r,t)}function Ia(r){return r>=55296&&r<=56319}function La(r){return r>=56320&&r<=57343}function Ma(r){return La(r.charCodeAt(0))}function Ua(r){return Ia(r.charCodeAt(r.length-1))}function Wu(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function $r(r,t,n,o){return Ua(r)||Ma(o)?null:Wu([[fe,r],[Me,t],[xe,n],[fe,o]])}function Gu(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),f=r.slice(c),p=s?s.index:null;e:{var m=c+i-a;if(p!==null&&p!==m||m<0||m>i)break e;var b=t.slice(0,m),x=t.slice(m);if(x!==f)break e;var y=Math.min(c,m),h=d.slice(0,y),k=b.slice(0,y);if(h!==k)break e;var _=d.slice(y),E=b.slice(y);return $r(h,_,E,f)}e:{if(p!==null&&p!==c)break e;var B=c,b=t.slice(0,B),x=t.slice(B);if(b!==d)break e;var C=Math.min(a-B,i-B),N=f.slice(f.length-C),D=x.slice(x.length-C);if(N!==D)break e;var _=f.slice(0,f.length-C),E=x.slice(0,x.length-C);return $r(d,_,E,N)}}if(o.length>0&&s&&s.length===0)e:{var h=r.slice(0,o.index),N=r.slice(o.index+o.length),y=h.length,C=N.length;if(i<y+C)break e;var k=t.slice(0,y),D=t.slice(i-C);if(h!==k||N!==D)break e;var _=r.slice(y,a-C),E=t.slice(y,i-C);return $r(h,_,E,N)}return null}function Bn(r,t,n){return Mt(r,t,n,!0)}Bn.INSERT=xe,Bn.DELETE=Me,Bn.EQUAL=fe;var Qu=Bn,Sn={exports:{}};Sn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",b="[object Map]",x="[object Number]",y="[object Object]",h="[object Promise]",k="[object RegExp]",_="[object Set]",E="[object String]",B="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",Y="[object Float64Array]",et="[object Int8Array]",Ue="[object Int16Array]",V="[object Int32Array]",I="[object Uint8Array]",K="[object Uint8ClampedArray]",L="[object Uint16Array]",P="[object Uint32Array]",de=/[\\^$.*+?()[\]{}|]/g,ye=/\w*$/,Nr=/^\[object .+?Constructor\]$/,Ar=/^(?:0|[1-9]\d*)$/,Q={};Q[a]=Q[i]=Q[N]=Q[D]=Q[c]=Q[d]=Q[R]=Q[Y]=Q[et]=Q[Ue]=Q[V]=Q[b]=Q[x]=Q[y]=Q[k]=Q[_]=Q[E]=Q[B]=Q[I]=Q[K]=Q[L]=Q[P]=!0,Q[f]=Q[p]=Q[C]=!1;var Dr=typeof te=="object"&&te&&te.Object===Object&&te,Fr=typeof self=="object"&&self&&self.Object===Object&&self,Be=Dr||Fr||Function("return this")(),Tn=t&&!t.nodeType&&t,J=Tn&&!0&&r&&!r.nodeType&&r,Nn=J&&J.exports===Tn;function jr(l,u){return l.set(u[0],u[1]),l}function Se(l,u){return l.add(u),l}function An(l,u){for(var g=-1,S=l?l.length:0;++g<S&&u(l[g],g,l)!==!1;);return l}function Dn(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function Ht(l,u,g,S){for(var j=-1,A=l?l.length:0;++j<A;)g=u(g,l[j],j,l);return g}function qt(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Fn(l,u){return l==null?void 0:l[u]}function Pt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function jn(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Wt(l,u){return function(g){return l(u(g))}}function Rn(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var Rr=Array.prototype,Ir=Function.prototype,wt=Object.prototype,Gt=Be["__core-js_shared__"],In=function(){var l=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Ln=Ir.toString,ze=wt.hasOwnProperty,kt=wt.toString,Lr=RegExp("^"+Ln.call(ze).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),it=Nn?Be.Buffer:void 0,Et=Be.Symbol,Qt=Be.Uint8Array,be=Wt(Object.getPrototypeOf,Object),Mn=Object.create,Un=wt.propertyIsEnumerable,Mr=Rr.splice,Jt=Object.getOwnPropertySymbols,xt=it?it.isBuffer:void 0,zn=Wt(Object.keys,Object),Bt=$e(Be,"DataView"),lt=$e(Be,"Map"),Ce=$e(Be,"Promise"),St=$e(Be,"Set"),Kt=$e(Be,"WeakMap"),ct=$e(Object,"create"),Yt=ue(Bt),dt=ue(lt),vt=ue(Ce),Xt=ue(St),Zt=ue(Kt),tt=Et?Et.prototype:void 0,Hn=tt?tt.valueOf:void 0;function We(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Ur(){this.__data__=ct?ct(null):{}}function zr(l){return this.has(l)&&delete this.__data__[l]}function Hr(l){var u=this.__data__;if(ct){var g=u[l];return g===o?void 0:g}return ze.call(u,l)?u[l]:void 0}function qn(l){var u=this.__data__;return ct?u[l]!==void 0:ze.call(u,l)}function en(l,u){var g=this.__data__;return g[l]=ct&&u===void 0?o:u,this}We.prototype.clear=Ur,We.prototype.delete=zr,We.prototype.get=Hr,We.prototype.has=qn,We.prototype.set=en;function ae(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=[]}function Pr(l){var u=this.__data__,g=$t(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():Mr.call(u,g,1),!0}function Wr(l){var u=this.__data__,g=$t(u,l);return g<0?void 0:u[g][1]}function Gr(l){return $t(this.__data__,l)>-1}function Qr(l,u){var g=this.__data__,S=$t(g,l);return S<0?g.push([l,u]):g[S][1]=u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__={hash:new We,map:new(lt||ae),string:new We}}function Kr(l){return ft(this,l).delete(l)}function Yr(l){return ft(this,l).get(l)}function vr(l){return ft(this,l).has(l)}function Xr(l,u){return ft(this,l).set(l,u),this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){this.__data__=new ae(l)}function Zr(){this.__data__=new ae}function eo(l){return this.__data__.delete(l)}function to(l){return this.__data__.get(l)}function no(l){return this.__data__.has(l)}function ro(l,u){var g=this.__data__;if(g instanceof ae){var S=g.__data__;if(!lt||S.length<n-1)return S.push([l,u]),this;g=this.__data__=new ie(S)}return g.set(l,u),this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l,u){var g=on(l)||Ot(l)?qt(l.length,String):[],S=g.length,j=!!S;for(var A in l)ze.call(l,A)&&!(j&&(A=="length"||yo(A,S)))&&g.push(A);return g}function Pn(l,u,g){var S=l[u];(!(ze.call(l,u)&&Kn(S,g))||g===void 0&&!(u in l))&&(l[u]=g)}function $t(l,u){for(var g=l.length;g--;)if(Kn(l[g][0],u))return g;return-1}function He(l,u){return l&&rn(u,sn(u),l)}function tn(l,u,g,S,j,A,H){var z;if(S&&(z=A?S(l,j,A,H):S(l)),z!==void 0)return z;if(!Pe(l))return l;var X=on(l);if(X){if(z=go(l),!u)return po(l,z)}else{var W=Qe(l),le=W==p||W==m;if(Yn(l))return Vt(l,u);if(W==y||W==a||le&&!A){if(Pt(l))return A?l:{};if(z=qe(le?{}:l),!u)return ho(l,He(z,l))}else{if(!Q[W])return A?l:{};z=_o(l,W,tn,u)}}H||(H=new pe);var he=H.get(l);if(he)return he;if(H.set(l,z),!X)var Z=g?mo(l):sn(l);return An(Z||l,function(ce,se){Z&&(se=ce,ce=l[se]),Pn(z,se,tn(ce,u,g,S,se,l,H))}),z}function oo(l){return Pe(l)?Mn(l):{}}function ao(l,u,g){var S=u(l);return on(l)?S:Dn(S,g(l))}function so(l){return kt.call(l)}function io(l){if(!Pe(l)||wo(l))return!1;var u=an(l)||Pt(l)?Lr:Nr;return u.test(ue(l))}function lo(l){if(!Qn(l))return zn(l);var u=[];for(var g in Object(l))ze.call(l,g)&&g!="constructor"&&u.push(g);return u}function Vt(l,u){if(u)return l.slice();var g=new l.constructor(l.length);return l.copy(g),g}function nn(l){var u=new l.constructor(l.byteLength);return new Qt(u).set(new Qt(l)),u}function ut(l,u){var g=u?nn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function Wn(l,u,g){var S=u?g(jn(l),!0):jn(l);return Ht(S,jr,new l.constructor)}function Gn(l){var u=new l.constructor(l.source,ye.exec(l));return u.lastIndex=l.lastIndex,u}function co(l,u,g){var S=u?g(Rn(l),!0):Rn(l);return Ht(S,Se,new l.constructor)}function uo(l){return Hn?Object(Hn.call(l)):{}}function fo(l,u){var g=u?nn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function po(l,u){var g=-1,S=l.length;for(u||(u=Array(S));++g<S;)u[g]=l[g];return u}function rn(l,u,g,S){g||(g={});for(var j=-1,A=u.length;++j<A;){var H=u[j],z=void 0;Pn(g,H,z===void 0?l[H]:z)}return g}function ho(l,u){return rn(l,Ge(l),u)}function mo(l){return ao(l,sn,Ge)}function ft(l,u){var g=l.__data__;return bo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function $e(l,u){var g=Fn(l,u);return io(g)?g:void 0}var Ge=Jt?Wt(Jt,Object):Eo,Qe=so;(Bt&&Qe(new Bt(new ArrayBuffer(1)))!=D||lt&&Qe(new lt)!=b||Ce&&Qe(Ce.resolve())!=h||St&&Qe(new St)!=_||Kt&&Qe(new Kt)!=C)&&(Qe=function(l){var u=kt.call(l),g=u==y?l.constructor:void 0,S=g?ue(g):void 0;if(S)switch(S){case Yt:return D;case dt:return b;case vt:return h;case Xt:return _;case Zt:return C}return u});function go(l){var u=l.length,g=l.constructor(u);return u&&typeof l[0]=="string"&&ze.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function qe(l){return typeof l.constructor=="function"&&!Qn(l)?oo(be(l)):{}}function _o(l,u,g,S){var j=l.constructor;switch(u){case N:return nn(l);case c:case d:return new j(+l);case D:return ut(l,S);case R:case Y:case et:case Ue:case V:case I:case K:case L:case P:return fo(l,S);case b:return Wn(l,S,g);case x:case E:return new j(l);case k:return Gn(l);case _:return co(l,S,g);case B:return uo(l)}}function yo(l,u){return u=u??s,!!u&&(typeof l=="number"||Ar.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!In&&In in l}function Qn(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||wt;return l===g}function ue(l){if(l!=null){try{return Ln.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l){return tn(l,!0,!0)}function Kn(l,u){return l===u||l!==l&&u!==u}function Ot(l){return ko(l)&&ze.call(l,"callee")&&(!Un.call(l,"callee")||kt.call(l)==a)}var on=Array.isArray;function Tt(l){return l!=null&&vn(l.length)&&!an(l)}function ko(l){return Xn(l)&&Tt(l)}var Yn=xt||xo;function an(l){var u=Pe(l)?kt.call(l):"";return u==p||u==m}function vn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Pe(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function Xn(l){return!!l&&typeof l=="object"}function sn(l){return Tt(l)?Ct(l):lo(l)}function Eo(){return[]}function xo(){return!1}r.exports=Jn}(Sn,Sn.exports);var za=Sn.exports,Cn={exports:{}};Cn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",b="[object Error]",x="[object Function]",y="[object GeneratorFunction]",h="[object Map]",k="[object Number]",_="[object Null]",E="[object Object]",B="[object Promise]",C="[object Proxy]",N="[object RegExp]",D="[object Set]",R="[object String]",Y="[object Symbol]",et="[object Undefined]",Ue="[object WeakMap]",V="[object ArrayBuffer]",I="[object DataView]",K="[object Float32Array]",L="[object Float64Array]",P="[object Int8Array]",de="[object Int16Array]",ye="[object Int32Array]",Nr="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Q="[object Uint16Array]",Dr="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,Tn=/^(?:0|[1-9]\d*)$/,J={};J[K]=J[L]=J[P]=J[de]=J[ye]=J[Nr]=J[Ar]=J[Q]=J[Dr]=!0,J[c]=J[d]=J[V]=J[p]=J[I]=J[m]=J[b]=J[x]=J[h]=J[k]=J[E]=J[N]=J[D]=J[R]=J[Ue]=!1;var Nn=typeof te=="object"&&te&&te.Object===Object&&te,jr=typeof self=="object"&&self&&self.Object===Object&&self,Se=Nn||jr||Function("return this")(),An=t&&!t.nodeType&&t,Dn=An&&!0&&r&&!r.nodeType&&r,Ht=Dn&&Dn.exports===An,qt=Ht&&Nn.process,Fn=function(){try{return qt&&qt.binding&&qt.binding("util")}catch{}}(),Pt=Fn&&Fn.isTypedArray;function jn(l,u){for(var g=-1,S=l==null?0:l.length,j=0,A=[];++g<S;){var H=l[g];u(H,g,l)&&(A[j++]=H)}return A}function Wt(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function Rn(l,u){for(var g=-1,S=l==null?0:l.length;++g<S;)if(u(l[g],g,l))return!0;return!1}function Rr(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Ir(l){return function(u){return l(u)}}function wt(l,u){return l.has(u)}function Gt(l,u){return l==null?void 0:l[u]}function In(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Ln(l,u){return function(g){return l(u(g))}}function ze(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var kt=Array.prototype,Lr=Function.prototype,it=Object.prototype,Et=Se["__core-js_shared__"],Qt=Lr.toString,be=it.hasOwnProperty,Mn=function(){var l=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Un=it.toString,Mr=RegExp("^"+Qt.call(be).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jt=Ht?Se.Buffer:void 0,xt=Se.Symbol,zn=Se.Uint8Array,Bt=it.propertyIsEnumerable,lt=kt.splice,Ce=xt?xt.toStringTag:void 0,St=Object.getOwnPropertySymbols,Kt=Jt?Jt.isBuffer:void 0,ct=Ln(Object.keys,Object),Yt=Ge(Se,"DataView"),dt=Ge(Se,"Map"),vt=Ge(Se,"Promise"),Xt=Ge(Se,"Set"),Zt=Ge(Se,"WeakMap"),tt=Ge(Object,"create"),Hn=ue(Yt),We=ue(dt),Ur=ue(vt),zr=ue(Xt),Hr=ue(Zt),qn=xt?xt.prototype:void 0,en=qn?qn.valueOf:void 0;function ae(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=tt?tt(null):{},this.size=0}function Pr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Wr(l){var u=this.__data__;if(tt){var g=u[l];return g===o?void 0:g}return be.call(u,l)?u[l]:void 0}function Gr(l){var u=this.__data__;return tt?u[l]!==void 0:be.call(u,l)}function Qr(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=tt&&u===void 0?o:u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__=[],this.size=0}function Kr(l){var u=this.__data__,g=Vt(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():lt.call(u,g,1),--this.size,!0}function Yr(l){var u=this.__data__,g=Vt(u,l);return g<0?void 0:u[g][1]}function vr(l){return Vt(this.__data__,l)>-1}function Xr(l,u){var g=this.__data__,S=Vt(g,l);return S<0?(++this.size,g.push([l,u])):g[S][1]=u,this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Zr(){this.size=0,this.__data__={hash:new ae,map:new(dt||ie),string:new ae}}function eo(l){var u=$e(this,l).delete(l);return this.size-=u?1:0,u}function to(l){return $e(this,l).get(l)}function no(l){return $e(this,l).has(l)}function ro(l,u){var g=$e(this,l),S=g.size;return g.set(l,u),this.size+=g.size==S?0:1,this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new pe;++u<g;)this.add(l[u])}function Pn(l){return this.__data__.set(l,o),this}function $t(l){return this.__data__.has(l)}Ct.prototype.add=Ct.prototype.push=Pn,Ct.prototype.has=$t;function He(l){var u=this.__data__=new ie(l);this.size=u.size}function tn(){this.__data__=new ie,this.size=0}function oo(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function ao(l){return this.__data__.get(l)}function so(l){return this.__data__.has(l)}function io(l,u){var g=this.__data__;if(g instanceof ie){var S=g.__data__;if(!dt||S.length<n-1)return S.push([l,u]),this.size=++g.size,this;g=this.__data__=new pe(S)}return g.set(l,u),this.size=g.size,this}He.prototype.clear=tn,He.prototype.delete=oo,He.prototype.get=ao,He.prototype.has=so,He.prototype.set=io;function lo(l,u){var g=Ot(l),S=!g&&Kn(l),j=!g&&!S&&Tt(l),A=!g&&!S&&!j&&Xn(l),H=g||S||j||A,z=H?Rr(l.length,String):[],X=z.length;for(var W in l)be.call(l,W)&&!(H&&(W=="length"||j&&(W=="offset"||W=="parent")||A&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||_o(W,X)))&&z.push(W);return z}function Vt(l,u){for(var g=l.length;g--;)if(Jn(l[g][0],u))return g;return-1}function nn(l,u,g){var S=u(l);return Ot(l)?S:Wt(S,g(l))}function ut(l){return l==null?l===void 0?et:_:Ce&&Ce in Object(l)?Qe(l):Qn(l)}function Wn(l){return Pe(l)&&ut(l)==c}function Gn(l,u,g,S,j){return l===u?!0:l==null||u==null||!Pe(l)&&!Pe(u)?l!==l&&u!==u:co(l,u,g,S,Gn,j)}function co(l,u,g,S,j,A){var H=Ot(l),z=Ot(u),X=H?d:qe(l),W=z?d:qe(u);X=X==c?E:X,W=W==c?E:W;var le=X==E,he=W==E,Z=X==W;if(Z&&Tt(l)){if(!Tt(u))return!1;H=!0,le=!1}if(Z&&!le)return A||(A=new He),H||Xn(l)?rn(l,u,g,S,j,A):ho(l,u,X,g,S,j,A);if(!(g&s)){var ce=le&&be.call(l,"__wrapped__"),se=he&&be.call(u,"__wrapped__");if(ce||se){var nt=ce?l.value():l,Je=se?u.value():u;return A||(A=new He),j(nt,Je,g,S,A)}}return Z?(A||(A=new He),mo(l,u,g,S,j,A)):!1}function uo(l){if(!vn(l)||bo(l))return!1;var u=Yn(l)?Mr:Be;return u.test(ue(l))}function fo(l){return Pe(l)&&an(l.length)&&!!J[ut(l)]}function po(l){if(!wo(l))return ct(l);var u=[];for(var g in Object(l))be.call(l,g)&&g!="constructor"&&u.push(g);return u}function rn(l,u,g,S,j,A){var H=g&s,z=l.length,X=u.length;if(z!=X&&!(H&&X>z))return!1;var W=A.get(l);if(W&&A.get(u))return W==u;var le=-1,he=!0,Z=g&a?new Ct:void 0;for(A.set(l,u),A.set(u,l);++le<z;){var ce=l[le],se=u[le];if(S)var nt=H?S(se,ce,le,u,l,A):S(ce,se,le,l,u,A);if(nt!==void 0){if(nt)continue;he=!1;break}if(Z){if(!Rn(u,function(Je,pt){if(!wt(Z,pt)&&(ce===Je||j(ce,Je,g,S,A)))return Z.push(pt)})){he=!1;break}}else if(!(ce===se||j(ce,se,g,S,A))){he=!1;break}}return A.delete(l),A.delete(u),he}function ho(l,u,g,S,j,A,H){switch(g){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case V:return!(l.byteLength!=u.byteLength||!A(new zn(l),new zn(u)));case p:case m:case k:return Jn(+l,+u);case b:return l.name==u.name&&l.message==u.message;case N:case R:return l==u+"";case h:var z=In;case D:var X=S&s;if(z||(z=ze),l.size!=u.size&&!X)return!1;var W=H.get(l);if(W)return W==u;S|=a,H.set(l,u);var le=rn(z(l),z(u),S,j,A,H);return H.delete(l),le;case Y:if(en)return en.call(l)==en.call(u)}return!1}function mo(l,u,g,S,j,A){var H=g&s,z=ft(l),X=z.length,W=ft(u),le=W.length;if(X!=le&&!H)return!1;for(var he=X;he--;){var Z=z[he];if(!(H?Z in u:be.call(u,Z)))return!1}var ce=A.get(l);if(ce&&A.get(u))return ce==u;var se=!0;A.set(l,u),A.set(u,l);for(var nt=H;++he<X;){Z=z[he];var Je=l[Z],pt=u[Z];if(S)var Ja=H?S(pt,Je,Z,u,l,A):S(Je,pt,Z,l,u,A);if(!(Ja===void 0?Je===pt||j(Je,pt,g,S,A):Ja)){se=!1;break}nt||(nt=Z=="constructor")}if(se&&!nt){var Zn=l.constructor,er=u.constructor;Zn!=er&&"constructor"in l&&"constructor"in u&&!(typeof Zn=="function"&&Zn instanceof Zn&&typeof er=="function"&&er instanceof er)&&(se=!1)}return A.delete(l),A.delete(u),se}function ft(l){return nn(l,sn,go)}function $e(l,u){var g=l.__data__;return yo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Ge(l,u){var g=Gt(l,u);return uo(g)?g:void 0}function Qe(l){var u=be.call(l,Ce),g=l[Ce];try{l[Ce]=void 0;var S=!0}catch{}var j=Un.call(l);return S&&(u?l[Ce]=g:delete l[Ce]),j}var go=St?function(l){return l==null?[]:(l=Object(l),jn(St(l),function(u){return Bt.call(l,u)}))}:Eo,qe=ut;(Yt&&qe(new Yt(new ArrayBuffer(1)))!=I||dt&&qe(new dt)!=h||vt&&qe(vt.resolve())!=B||Xt&&qe(new Xt)!=D||Zt&&qe(new Zt)!=Ue)&&(qe=function(l){var u=ut(l),g=u==E?l.constructor:void 0,S=g?ue(g):"";if(S)switch(S){case Hn:return I;case We:return h;case Ur:return B;case zr:return D;case Hr:return Ue}return u});function _o(l,u){return u=u??i,!!u&&(typeof l=="number"||Tn.test(l))&&l>-1&&l%1==0&&l<u}function yo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function bo(l){return!!Mn&&Mn in l}function wo(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||it;return l===g}function Qn(l){return Un.call(l)}function ue(l){if(l!=null){try{return Qt.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l,u){return l===u||l!==l&&u!==u}var Kn=Wn(function(){return arguments}())?Wn:function(l){return Pe(l)&&be.call(l,"callee")&&!Bt.call(l,"callee")},Ot=Array.isArray;function on(l){return l!=null&&an(l.length)&&!Yn(l)}var Tt=Kt||xo;function ko(l,u){return Gn(l,u)}function Yn(l){if(!vn(l))return!1;var u=ut(l);return u==x||u==y||u==f||u==C}function an(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function vn(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function Pe(l){return l!=null&&typeof l=="object"}var Xn=Pt?Ir(Pt):fo;function sn(l){return on(l)?lo(l):po(l)}function Eo(){return[]}function xo(){return!1}r.exports=ko}(Cn,Cn.exports);var Ha=Cn.exports,Vr={},qa=te&&te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});var Ju=qa(za),Ku=qa(Ha),Or;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Ju.default(i);c||(d=Object.keys(d).reduce(function(p,m){return d[m]!=null&&(p[m]=d[m]),p},{}));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}r.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 Ku.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(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)}r.invert=o;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,p){return a[p]===void 0&&(f[p]=i[p]),f},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Or||(Or={})),Vr.default=Or;var $n={},Vn={},Pa;function Yu(){if(Pa)return Vn;Pa=1;var r=te&&te.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vn,"__esModule",{value:!0});var t=r(Ga()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.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}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.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"},o.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[]},o}();return Vn.default=n,Vn}var Wa;function Ga(){if(Wa)return $n;Wa=1;var r=te&&te.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($n,"__esModule",{value:!0});var t=r(Yu()),n;return function(o){function s(i){return new t.default(i)}o.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}o.length=a}(n||(n={})),$n.default=n,$n}var Ut=te&&te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},On=Ut(Qu),vu=Ut(za),Tr=Ut(Ha),zt=Ut(Vr),oe=Ut(Ga()),Xu="\0",Zu=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=vu.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(Tr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.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},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.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),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.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&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),f=n.next(d),p=o.next(d);if(typeof p.retain=="number"){var m={};typeof f.retain=="number"?m.retain=d:m.insert=f.insert;var b=zt.default.compose(f.attributes,p.attributes,typeof f.retain=="number");if(b&&(m.attributes=b),c.push(m),!o.hasNext()&&Tr.default(c.ops[c.ops.length-1],m)){var x=new r(n.rest());return c.concat(x).chop()}}else typeof p.delete=="number"&&typeof f.retain=="number"&&c.push(p)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Xu;var p=d===t?"on":"with";throw new Error("diff() called "+p+" non-document")}).join("")}),s=new r,a=On.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var p=0;switch(d[0]){case On.default.INSERT:p=Math.min(c.peekLength(),f),s.push(c.next(p));break;case On.default.DELETE:p=Math.min(f,i.peekLength()),i.next(p),s.delete(p);break;case On.default.EQUAL:p=Math.min(i.peekLength(),c.peekLength(),f);var m=i.next(p),b=c.next(p);Tr.default(m.insert,b.insert)?s.retain(p,zt.default.diff(m.attributes,b.attributes)):s.push(b).delete(p);break}f-=p}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
6
|
+
`+a):o.stack=a}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:a}=n;o!==void 0&&fr.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:fr.assertOptions(s,{encode:Ye.function,serialize:Ye.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=ge.concat(i,a);const c=[];let d=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(d=d&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const f=[];this.interceptors.response.forEach(function(h){f.push(h.fulfilled,h.rejected)});let p,m=0,b;if(!d){const y=[vo.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,f),b=y.length,p=Promise.resolve(n);m<b;)p=p.then(y[m++],y[m++]);return p}b=c.length;let x=n;for(m=0;m<b;){const y=c[m++],h=c[m++];try{x=y(x)}catch(k){h.call(this,k);break}}try{p=vo.call(this,x)}catch(y){return Promise.reject(y)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=mt(this.defaults,t);const n=Qo(t.baseURL,t.url);return Uo(n,t.params,t.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,o){return this.request(mt(o||{},{method:t,url:n,data:(o||{}).data}))}}),$.forEach(["post","put","patch"],function(t){function n(o){return function(a,i,c){return this.request(mt(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});class pr{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 o=this;this.promise.then(s=>{if(!o._listeners)return;let a=o._listeners.length;for(;a-- >0;)o._listeners[a](s);o._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(c=>{o.subscribe(c),a=c}).then(s);return i.cancel=function(){o.unsubscribe(a)},i},t(function(a,i,c){o.reason||(o.reason=new jt(a,i,c),n(o.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 pr(function(s){t=s}),cancel:t}}}function ni(r){return function(n){return r.apply(null,n)}}function ri(r){return $.isObject(r)&&r.isAxiosError===!0}const hr={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(hr).forEach(([r,t])=>{hr[t]=r});function ta(r){const t=new rt(r),n=Bo(rt.prototype.request,t);return $.extend(n,rt.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ta(mt(r,s))},n}const v=ta(Dt);v.Axios=rt,v.CanceledError=jt,v.CancelToken=pr,v.isCancel=Go,v.VERSION=Zo,v.toFormData=pn,v.AxiosError=U,v.Cancel=v.CanceledError,v.all=function(t){return Promise.all(t)},v.spread=ni,v.isAxiosError=ri,v.mergeConfig=mt,v.AxiosHeaders=ge,v.formToJSON=r=>Po($.isHTMLForm(r)?new FormData(r):r),v.getAdapter=Yo.getAdapter,v.HttpStatusCode=hr,v.default=v;let gt=null;function oi(r){gt=v.create(r)}function ai(){return gt}async function si(r,t={},n={}){return new Promise((o,s)=>{gt.get(r,{headers:n,params:t}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ii(r,t,n={}){return new Promise((o,s)=>{gt.post(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}async function li(r,t,n={}){return new Promise((o,s)=>{gt.delete(r,{data:t,headers:n}).then(a=>{o(a.data)}).catch(a=>{s(a)})})}async function ci(r,t,n={}){return new Promise((o,s)=>{gt.put(r,t,{headers:n}).then(a=>{o(a)}).catch(a=>{s(a)})})}const _e={get:si,post:ii,put:ci,remove:li,setupAxios:oi,getAxiosInstance:ai};var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function di(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ra={exports:{}};(function(r,t){(function(n,o){typeof di=="function"?r.exports=o():n.pluralize=o()})(te,function(){var n=[],o=[],s={},a={},i={};function c(h){return typeof h=="string"?new RegExp("^"+h+"$","i"):h}function d(h,k){return h===k?k:h===h.toLowerCase()?k.toLowerCase():h===h.toUpperCase()?k.toUpperCase():h[0]===h[0].toUpperCase()?k.charAt(0).toUpperCase()+k.substr(1).toLowerCase():k.toLowerCase()}function f(h,k){return h.replace(/\$(\d{1,2})/g,function(_,E){return k[E]||""})}function p(h,k){return h.replace(k[0],function(_,E){var B=f(k[1],arguments);return d(_===""?h[E-1]:_,B)})}function m(h,k,_){if(!h.length||s.hasOwnProperty(h))return k;for(var E=_.length;E--;){var B=_[E];if(B[0].test(k))return p(k,B)}return k}function b(h,k,_){return function(E){var B=E.toLowerCase();return k.hasOwnProperty(B)?d(E,B):h.hasOwnProperty(B)?d(E,h[B]):m(B,E,_)}}function x(h,k,_,E){return function(B){var C=B.toLowerCase();return k.hasOwnProperty(C)?!0:h.hasOwnProperty(C)?!1:m(C,C,_)===C}}function y(h,k,_){var E=k===1?y.singular(h):y.plural(h);return(_?k+" ":"")+E}return y.plural=b(i,a,n),y.isPlural=x(i,a,n),y.singular=b(a,i,o),y.isSingular=x(a,i,o),y.addPluralRule=function(h,k){n.push([c(h),k])},y.addSingularRule=function(h,k){o.push([c(h),k])},y.addUncountableRule=function(h){if(typeof h=="string"){s[h.toLowerCase()]=!0;return}y.addPluralRule(h,"$0"),y.addSingularRule(h,"$0")},y.addIrregularRule=function(h,k){k=k.toLowerCase(),h=h.toLowerCase(),i[h]=k,a[k]=h},[["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(h){return y.addIrregularRule(h[0],h[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(h){return y.addPluralRule(h[0],h[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(h){return y.addSingularRule(h[0],h[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})})(ra);var ui=ra.exports;const oa=na(ui),mr=r=>r.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),mn="GET_LIST",gn="GET_ONE",_n="CREATE",yn="UPDATE",_t="REMOVE",gr="RESTORE",aa="ENABLE",fi=[mn,gn,_n,yn,_t,aa];class pi{constructor(t,n,o=fi){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.operations=o,this.operations.forEach(s=>{const a=mr(s.toLowerCase());this[a]=this[`_${a}`]})}_getList(t){if(!this.operations.includes(mn)){console.log(`${this.side}/${this.domain} 不支持 ${mn} 操作`);return}return _e.get(`${this.side}/${this.resources}`,t)}_getOne(t){if(!this.operations.includes(gn)){console.log(`${this.side}/${this.domain} 不支持 ${gn} 操作`);return}return _e.get(`${this.side}/${this.resources}/${t.id}`)}_create(t){if(!this.operations.includes(_n)){console.log(`${this.side}/${this.domain} 不支持 ${_n} 操作`);return}return _e.post(`${this.side}/${this.resources}`,t)}_update(t){if(!this.operations.includes(yn)){console.log(`${this.side}/${this.domain} 不支持 ${yn} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}`,t)}_remove(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.remove(`${this.side}/${this.resources}/${t.id}`,t)}_restore(t){if(!this.operations.includes(gr)){console.log(`${this.side}/${this.domain} 不支持 ${gr} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/restore`,t)}_enable(t){if(!this.operations.includes(_t)){console.log(`${this.side}/${this.domain} 不支持 ${_t} 操作`);return}return _e.put(`${this.side}/${this.resources}/${t.id}/switch`,t)}}class hi{constructor(t,n,o){this.side=t=="platform"?"admin":t,this.domain=n,this.resources=oa(n),this.listQuerys=o}getList(t){let n=t;return this.listQuerys&&(n={...this.listQuerys,...t}),_e.get(`${this.side}/${this.resources}`,n)}getOne(t){return _e.get(`${this.side}/${this.resources}/${t.id}`)}}const mi={Client:pi,ReadOnlyClient:hi,GET_LIST:mn,GET_ONE:gn,CREATE:_n,UPDATE:yn,REMOVE:_t,RESTORE:gr,ENABLE:aa},gi=(r,t,n)=>{const o=r[t];return o?typeof o=="function"?o():Promise.resolve(o):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.":""))))})},_i=["createdAt","updatedAt","deletedAt"];class ne{constructor(t,n){this.domain=n,this.type=t.type||"string",this.code=t.code,this.label=t.label,this.showInList=this._showInList(t),this.showInDetail=this._showInDetail(t),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.fixed=!1}computeWidth(t){return t.width?t.width:_i.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),o=Object.getOwnPropertyNames(this);if(n.every(a=>o.includes(a)))return;const s=n.filter(a=>!o.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 o=>!o[t.code];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 sa(r,t,n){console.warn(`${r}.${t} => ${n}`)}const _r={select:{config:"select"},"belongs-to":{config:"belongs-to"},boolean:{config:"boolean"},switch:{config:"switch",deprecated:"switch 字段类型即将废弃,请使用 boolean"},datetime:{config:"datetime"},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"},component:{config:"component"}};async function ia(r,t,n){const o=await gi(Object.assign({"./field/attachment/config.js":()=>Promise.resolve().then(()=>od),"./field/belongs-to/config.js":()=>Promise.resolve().then(()=>cd),"./field/boolean/config.js":()=>Promise.resolve().then(()=>hd),"./field/cascader/config.js":()=>Promise.resolve().then(()=>bd),"./field/component/config.js":()=>Promise.resolve().then(()=>kd),"./field/datetime/config.js":()=>Promise.resolve().then(()=>Cd),"./field/image/config.js":()=>Promise.resolve().then(()=>Dd),"./field/images/config.js":()=>Promise.resolve().then(()=>Ud),"./field/json/config.js":()=>Promise.resolve().then(()=>Pd),"./field/rich-text/config.js":()=>Promise.resolve().then(()=>vd),"./field/row-id/config.js":()=>Promise.resolve().then(()=>Zd),"./field/select/config.js":()=>Promise.resolve().then(()=>hu),"./field/string/config.js":()=>Promise.resolve().then(()=>bu),"./field/switch/config.js":()=>Promise.resolve().then(()=>Bu),"./field/text/config.js":()=>Promise.resolve().then(()=>Ou),"./field/tree-select/config.js":()=>Promise.resolve().then(()=>Fu)}),`./field/${r}/config.js`,4);return new o.default(t,n)}function la(r,t="unknown"){return r.map(o=>{if(o instanceof ne)return o;if(o.code==="id"?o.type="row-id":o.component&&(o.type="component"),Object.keys(_r).includes(o.type)){const s=_r[o.type];return s.deprecated&&sa(t,o.code,s.deprecated),ia(_r[o.type].config,o,t)}return ia("string",o,t)})}let yr={name:"管理后台",logo:"",sideMenus:{},imageUploadUrl:"",fileUploadUrl:"",idempotentUrl:""},Rt={};function yi(r){yr={...yr,...r},Rt=r.domainConfigs}function bi(r){Object.keys(Rt).forEach(t=>{const n=Rt[t];Object.keys(n).forEach(o=>{const s=n[o];s.load=r(t,o)})})}function ot(){return yr}function br(){return Rt}function bn(r,t){return Rt[r][t].load().then(n=>{const o=n.default;return Promise.all(o.fields).then(s=>(o.fields=s,o))})}class wi{constructor(t,n){this.side=t;const o=n.config?n.config:n;this.code=o.code,this.fields=la(o.fields,o.code),!o.simple&&(this.name=br()[t][o.code].name,this.filters=o.filters||[],this.coverField=o.coverField,this.nameField=o.nameField||"name",this.showCreate=o.showCreate||!0,this.showSubmit=o.showSubmit||!0,this.removeConfirm=o.removeConfirm,this.showCreate=this.setupShowCreate(o.showCreate),this.hasMany=n.hasMany||[],this.hasOne=n.hasOne||[],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||[])}wrapFields(t,n){return la(t,n)}createRestClient(t){return t}createFormatName(t){return n=>t?`${t(n)}`:n.name?n.name:n.title?n.title:`#${n.id}`}setupPageActions(t){return n=>{if(typeof t.pageActions>"u")return[];if(Array.isArray(t.pageActions))return t.pageActions;if(typeof t.pageActions=="function"){const o=t.pageActions(n);return Array.isArray(o)?o:(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 o=t.rowActions(n);return Array.isArray(o)?o:(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}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 o=>{const s=this.showCreate(o);return{...n,creatable:n.creatable&&s}}}}function ca(r,t){return new wi(r,t)}const M=(r,t)=>{const n=r.__vccOpts||r;for(const[o,s]of t)n[o]=s;return n},ki={class:"card-header"},Ei={class:"title"},da=M({__name:"Widget",props:{title:{type:String}},setup(r){const t=r;return(n,o)=>(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",ki,[e.createElementVNode("span",Ei,e.toDisplayString(t.title),1)])]),key:"0"}:void 0]),1024))}},[["__scopeId","data-v-c5513c07"]]),xi={key:0},Bi={key:1},Si={key:0},Ci={key:1},ua=M({__name:"Statistic",props:{title:{type:String},value:{type:Number},background:{type:String},align:{type:String,default:"left"},link:{type:String}},setup(r){const t=r;let n="#f7faff",o="10px";return t.background&&(n=t.background,n=="none"&&(o="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(o)}`)},[e.createElementVNode("div",{class:"item-box-data mono-data",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.value!=null?(e.openBlock(),e.createElementBlock("span",xi,e.toDisplayString(t.value),1)):(e.openBlock(),e.createElementBlock("span",Bi,"..."))],4),e.createElementVNode("div",{class:"item-box-tip",style:e.normalizeStyle(`text-align: ${t.align};`)},[t.link?(e.openBlock(),e.createElementBlock("span",Si,[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",Ci,e.toDisplayString(t.title),1))],4)],4)),[[e.unref(w.vLoading),t.value==null]])}}},[["__scopeId","data-v-73228f1a"]]),$i=M({__name:"StatisticCard",props:{title:{type:String},value:{type:Number},icon:{type:String},background:{type:String},align:{type:String},link:{type:String}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createBlock(da,null,{default:e.withCtx(()=>[e.createVNode(ua,{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"]]),Vi={},Oi={style:{padding:"20px 0"}};function Ti(r,t){return e.openBlock(),e.createElementBlock("div",Oi,[e.renderSlot(r.$slots,"default")])}const Ni=M(Vi,[["render",Ti]]),Ai=M({__name:"DashboardRow",setup(r){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"]]);function re(r){const t={...r.query,...r.params};if(r.params.domain&&r.params.id){const n=mr(`${t.domain}-id`);t[n]=t.id}return delete t.domain,delete t.id,delete t.page,delete t.pageSize,t}function Di(r){const t=r.length,n=Math.floor(24/t);return{type:"row",cols:r.map(s=>({type:"col",span:n,field:s}))}}function wr(r){return r.map(t=>Di(t))}const Fi={__name:"FormLayout",props:{layout:Object,fields:Array},setup(r){const t=r,n=e.computed(()=>{if(t.layout.length==0){if(t.fields.length<=6){const i=s(t.fields,1);return wr(i)}const a=s(t.fields,2);return wr(a)}return t.layout});function o(a){return t.fields.find(c=>c.code==a)}function s(a,i=2){const c=a.map(f=>f.code),d=[];for(let f=0;f<c.length;f+=i)d.push(c.slice(f,f+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=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:d.span},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{field:o(d.field)})]),_:2},1032,["span"]))),256))]),_:2},1024))),256))]))}},ji={style:{width:"100%"}},Ri={class:"footer"},Ii={key:1},Li=M({__name:"PureForm",props:{config:{type:Object},data:{type:Object},removable:{type:Boolean,default:!1}},emits:["submit","remove"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=e.ref(!1),i=r,c=wr(i.config.formLayout||[]),d=e.reactive({...i.data}),f=e.ref(null),p=i.config.fields.filter(E=>E.rules).reduce((E,B)=>(E[B.code]=x(B.rules),E),{}),m=e.computed(_),b=e.computed(()=>i.config.fields.filter(E=>{const B=E.editable(d,o),C=E.visible(d,o);return E.disabled=C&&!B,B||C}));function x(E){return typeof E=="object"?E:typeof E=="function"?E(d):[]}async function y(){await f.value.validate((E,B)=>{var D,R;if(!E)return console.log("error submit!",B),!1;const C=(D=i.config.fields.find(Y=>["images","attachments","attachment"].includes(Y.type)))==null?void 0:D.code,N={...d};C&&(N[C]=(R=N[C])==null?void 0:R.map(Y=>Y.id)),a.value=!0,s("submit",N,()=>{a.value=!1})})}function h(){s("remove",d)}function k(){if(i.config.removeConfirm){i.config.removeConfirm(d,h);return}w.ElMessageBox.confirm("确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",appendTo:"#form"}).then(()=>{h()}).catch(()=>{w.ElMessage({type:"info",message:"取消删除"})})}function _(){const E=i.config.showSubmit;return typeof E=="boolean"?E:typeof E=="function"?E(o,d):!0}return e.watch(()=>({...d}),(E,B)=>{const N=Object.keys(E).filter(R=>B[R]!==E[R]).map(R=>({field:R,newValue:E[R],oldValue:B[R]}));b.value.filter(R=>!R.disabled).forEach(R=>{R.formChange&&R.formChange(d,N)})}),e.watch(()=>i.data,E=>{Object.keys(E).forEach(B=>{d[B]=E[B]})},{immediate:!0}),(E,B)=>(e.openBlock(),e.createBlock(e.unref(w.ElForm),{id:"form",ref_key:"formRef",ref:f,model:d,"label-width":"100px","label-position":"top",rules:e.unref(p)},{default:e.withCtx(()=>[e.createVNode(Fi,{layout:e.unref(c),fields:b.value},{default:e.withCtx(({field:C})=>[(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:C.code,label:C.label,prop:C.code},{default:e.withCtx(()=>[e.createElementVNode("div",ji,[C!=null&&C.editor?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C.editor),{key:0,modelValue:d[C.code],"onUpdate:modelValue":N=>d[C.code]=N,field:C,disabled:C.disabled,"form-data":d,"domain-config":i.config},null,8,["modelValue","onUpdate:modelValue","field","disabled","form-data","domain-config"])):(e.openBlock(),e.createBlock(e.unref(w.ElAlert),{key:1,title:`未找到 ${C.code}(${C.type}) 的编辑器`,type:"error",effect:"dark",closable:!1},null,8,["title"]))])]),_:2},1032,["label","prop"]))]),_:1},8,["layout","fields"]),e.createElementVNode("div",Ri,[d.id&&!d.deletedAt&&i.removable?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,size:"default",type:"danger",onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 删除 ")]),_:1})):(e.openBlock(),e.createElementBlock("div",Ii)),m.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:2,size:"default",type:"primary",loading:a.value,onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 提交 ")]),_:1},8,["loading"])):e.createCommentVNode("",!0)])]),_:1},8,["model","rules"]))}},[["__scopeId","data-v-a1a45e4a"]]);function Mi(){return ot().idempotentUrl?_e.get(ot().idempotentUrl).then(r=>r.data):""}const It={getValue:Mi},wn={__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(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.computed(()=>({...a.data,idempotentToken:d.value})),c=e.computed(()=>a.config.fields.filter(y=>y.visible(i,o)).length>=6?"60%":"40%"),d=e.ref(""),f=e.computed({get(){return a.modelValue},set(x){s("update:modelValue",x)}}),p=e.computed(()=>a.title?a.title:a.data.id?`编辑${a.config.name}`:`添加${a.config.name}`);function m(x,y){s("submit",x,async()=>{d.value=await It.getValue(),y()})}function b(x,y){s("remove",x,async()=>{d.value=await It.getValue(),y()})}return e.watch(()=>f,async()=>{d.value=await It.getValue()},{immediate:!0}),(x,y)=>(e.openBlock(),e.createBlock(e.unref(w.ElDialog),{modelValue:f.value,"onUpdate:modelValue":y[0]||(y[0]=h=>f.value=h),width:c.value,top:"20px",title:p.value,"close-on-click-modal":!1,"append-to-body":!0,"destroy-on-close":"","z-index":1e3},{default:e.withCtx(()=>[e.createVNode(Li,{config:a.config,data:i.value,removable:a.removable,onSubmit:m,onRemove:b},null,8,["config","data","removable"])]),_:1},8,["modelValue","width","title"]))}},Ui={__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:()=>""}},setup(r){const t=r,n=e.ref(t.row),o=e.ref(!1),s=e.shallowRef(null),a=ca("simple",{simple:!0,code:t.code,fields:t.fields});Promise.all(a.fields).then(d=>{a.fields=d,a.restRepeat=t.restRepeat,s.value=a});async function i(){o.value=!0}function c(d,f){t.onSubmit(d).then(()=>{o.value=!1,ElMessage({showClose:!0,grouping:!0,message:`${t.text}成功`,type:"success"})}).catch(()=>{console.log("请求失败"),f()})}return(d,f)=>(e.openBlock(),e.createBlock(e.unref(w.ElButton),{type:t.type,onClick:i},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text)+" ",1),o.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),title:t.text,config:s.value,data:n.value,onSubmit:c},null,8,["modelValue","title","config","data"])):e.createCommentVNode("",!0)]),_:1},8,["type"]))}},zi={class:"not-found"},we=M({__name:"EmptyTip",props:{text:{type:String,default:"<无>"}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("span",zi,e.toDisplayString(t.text),1))}},[["__scopeId","data-v-c97e855f"]]),fa={__name:"FieldEditor",props:{modelValue:{type:Array,default:()=>[]},field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Ru)),o=ot().fileUploadUrl,s=t,a=r,i=e.reactive({value:a.modelValue}),c=a.field.converter;function d(p){const m=i.value.findIndex(b=>b.id===p.id);i.value.splice(m,1),s("update:modelValue",i.value)}function f(p){w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),_e.post(o,p).then(m=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"});const b=c(m.data);i.value=i.value?[...i.value,b]:[b],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}),(p,m)=>(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"])]))}};/*! Element Plus v2.7.2 */var Hi={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",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:"六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!"},upload:{deleteTip:"按 delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计"},tour:{next:"下一步",previous:"上一步",finish:"结束导览"},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 qi={__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(r){const t=r,n=e.computed(()=>t.content?t.content.toString():"");return(o,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"]))]))}};/*! Element Plus Icons Vue v2.3.1 */var Pi=e.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(r){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"})]))}}),Wi=Pi,Gi=e.defineComponent({name:"CircleCloseFilled",__name:"circle-close-filled",setup(r){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"})]))}}),Qi=Gi,Ji=e.defineComponent({name:"Close",__name:"close",setup(r){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=Ji,Ki=e.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(r){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=Ki,Yi=e.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(r){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"})]))}}),vi=Yi,Xi=e.defineComponent({name:"Delete",__name:"delete",setup(r){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"})]))}}),Zi=Xi,el=e.defineComponent({name:"Document",__name:"document",setup(r){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"})]))}}),ma=el,tl=e.defineComponent({name:"Download",__name:"download",setup(r){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"})]))}}),nl=tl,rl=e.defineComponent({name:"Grid",__name:"grid",setup(r){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"})]))}}),ol=rl,al=e.defineComponent({name:"Loading",__name:"loading",setup(r){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"})]))}}),ga=al,sl=e.defineComponent({name:"Minus",__name:"minus",setup(r){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"})]))}}),il=sl,ll=e.defineComponent({name:"Operation",__name:"operation",setup(r){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"})]))}}),cl=ll,dl=e.defineComponent({name:"Plus",__name:"plus",setup(r){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"})]))}}),kr=dl,ul=e.defineComponent({name:"PriceTag",__name:"price-tag",setup(r){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"})]))}}),_a=ul,fl=e.defineComponent({name:"QuestionFilled",__name:"question-filled",setup(r){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"})]))}}),pl=fl,hl=e.defineComponent({name:"Setting",__name:"setting",setup(r){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"})]))}}),ml=hl,gl=e.defineComponent({name:"SuccessFilled",__name:"success-filled",setup(r){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"})]))}}),_l=gl,yl=e.defineComponent({name:"View",__name:"view",setup(r){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"})]))}}),bl=yl;const ya=10,kn=Ke.defineStore("route-history",{state:()=>({root:null,history:[]}),actions:{push(r,t,n){this.history.find(s=>s.code==t)||(this.history.length>=ya&&(this.history=this.history.slice(2-ya),this.history.unshift(this.root)),this.history.push({title:r,code:t,path:n}))},setupRootPath(r,t){this.root={title:r,code:t,path:t},this.history=this.history.filter(n=>n.code!=t),this.history.unshift(this.root)},remove(r){this.history=this.history.filter(t=>t.code!=r)},getLast(){return this.history[this.history.length-1]},clear(){this.history=[]},updateTitleByCode(r,t){const n=this.history.find(o=>o.code==r);n&&(n.title=t)}}}),wl={class:"header-box"},kl={class:"header-box-left"},El={class:"page-title"},xl={class:"tabs-container"},Bl={class:"user-profile"},Sl=M({__name:"HeaderMenu",props:{config:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=kn(),s=e.ref("首页"),a=r,i=n.fullPath.split("/")[1],c=x();o.setupRootPath("首页",`/${i}/home`);function d(y){var B,C;const h=y.meta.side,k=y.params.domain;let _=(B=y.meta)==null?void 0:B.title,E=(C=y.meta)==null?void 0:C.code;if(h&&k)_=br()[h][y.params.domain].name,E=y.params.domain,y.params.id&&(_=`${_} - ${y.params.id}`,E=`${y.params.domain}-${y.params.id}`);else{const N=c.find(D=>D.route===y.path);N&&(_=N.title,E=N.route)}_&&E&&(o.push(_,E,y.fullPath),s.value=E)}function f(y){const h=o.history.find(k=>k.code==y.props.name);t.push(h.path)}function p(y){if(o.remove(y),y==s.value){const h=o.getLast();s.value=h.title,t.push(h.path)}}const m=(y,h)=>{const k=o.history.length;return y===0&&h==="self"||y<2&&h==="left"||y===k-1&&h==="right"||k===1&&h==="all"?!1:!(k<2&&h==="other")};function b(y,h){const k=[],_=o.history;switch(h){case"self":k.push(_[y].code);break;case"left":for(let E=0;E<y;E++)E!==0&&k.push(_[E].code);break;case"right":for(let E=y+1;E<_.length;E++)k.push(_[E].code);break;case"all":for(let E=0;E<_.length;E++)E!==0&&k.push(_[E].code);break;case"other":for(let E=1;E<_.length;E++)E!==y&&k.push(_[E].code);break}for(let E=0;E<k.length;E++)p(k[E])}function x(){return a.config.sideMenus[i].map(y=>y.children?y.children:y).flat()}return e.watch(()=>t.currentRoute.value,()=>{d(n)},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",wl,[e.createElementVNode("div",null,[e.createElementVNode("div",kl,[e.createVNode(e.unref(w.ElImage),{class:"header-img",src:a.config.logo,fit:"scale-down"},null,8,["src"]),e.createElementVNode("div",El,e.toDisplayString(a.config.name),1)])]),e.createElementVNode("div",xl,[e.createVNode(e.unref(w.ElTabs),{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=k=>s.value=k),type:"card",class:"tabs",onTabClick:f,onTabRemove:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).history,(k,_)=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{closable:k.title!="首页",label:k.title,name:k.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(()=>[m(_,"self")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:0,onClick:E=>b(_,"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),m(_,"left")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:1,onClick:E=>b(_,"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),m(_,"right")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:2,onClick:E=>b(_,"right")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(vi))]),_:1}),e.createTextVNode(" 关闭右侧标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),m(_,"all")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:3,onClick:E=>b(_,"all")},{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),m(_,"other")?(e.openBlock(),e.createBlock(e.unref(w.ElDropdownItem),{key:4,onClick:E=>b(_,"other")},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(cl))]),_:1}),e.createTextVNode(" 关闭其他标签页 ")]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(qi,{content:k.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:h[1]||(h[1]=k=>e.unref(t).back())},[e.createVNode(e.unref(w.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ha))]),_:1})])]),e.createElementVNode("div",Bl,[e.renderSlot(y.$slots,"user-profile",{},void 0,!0)])]))}},[["__scopeId","data-v-ff10d720"]]),Cl=r=>(e.pushScopeId("data-v-22a49b3f"),r=r(),e.popScopeId(),r),$l={key:2,class:"dot-wrapper"},Vl=[Cl(()=>e.createElementVNode("span",{class:"dot"},null,-1))],ba=M({__name:"SideBarItem",props:{data:{type:Object},hasParent:{type:Boolean,default:!1}},setup(r){const t=r;return(n,o)=>r.data.children?(e.openBlock(),e.createBlock(e.unref(w.ElSubMenu),{key:0,index:r.data.title},{title:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.data.children,s=>(e.openBlock(),e.createBlock(ba,{data:s,"has-parent":!0},null,8,["data"]))),256))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(e.unref(w.ElMenuItem),{key:1,index:r.data.route,route:r.data.route,class:"menu-item"},{default:e.withCtx(()=>[r.data.icon?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.data.icon)))]),_:1})):t.hasParent?(e.openBlock(),e.createElementBlock("span",$l,Vl)):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(_a))]),_:1})),e.createElementVNode("span",null,e.toDisplayString(r.data.title),1)]),_:1},8,["index","route"]))}},[["__scopeId","data-v-22a49b3f"]]),Ol=M({__name:"SideBar",props:{sideMenus:{type:Object}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=e.ref(n.fullPath),s=r,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;o.value=`/${d}/${n.params.domain}/list`}else o.value=n.fullPath},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(w.ElScrollbar),null,{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElMenu),{class:"menu",router:!0,"default-active":o.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i),f=>(e.openBlock(),e.createBlock(ba,{data:f},null,8,["data"]))),256))]),_:1},8,["default-active"])]),_:1}))}},[["__scopeId","data-v-4b892735"]]),Tl=M({__name:"BaseLayout",props:{config:{type:Object,default:()=>({})}},setup(r){const t=G.useRoute(),n=r,o={...ot(),...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(Hi)},{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(Sl,{config:o},{"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(()=>[e.createVNode(e.unref(w.ElAside),{class:"page-content-aside"},{default:e.withCtx(()=>[e.createVNode(Ol,{"side-menus":o.sideMenus},null,8,["side-menus"])]),_:1}),e.createVNode(e.unref(w.ElMain),{class:"page-content-main"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(c,{key:s.value}))]),_:1})]),_:1})]),_:3})]),_:3},8,["locale"])}}},[["__scopeId","data-v-ea73195f"]]),Te=Ke.defineStore("data-table-mode",{state:()=>({mode:"list",created:-1,updated:-1,removed:-1}),actions:{change(r){r&&(this.mode=r)},fireCreated(){this.created=Date.now()},fireUpdated(){this.updated=Date.now()},fireRemoved(){this.removed=Date.now()}}}),Er=(r,t,n,o)=>Ke.defineStore(`${t}-${r}-filter`,{state:()=>({filters:{}}),getters:{validFilters(){return Nl(r,t,this.filters,n,o)}},actions:{change(s){this.filters={...this.filters,...s},xr(r,t,this.filters)},$reset(s){this.filters={isDeleted:this.filters.isDeleted,...s},xr(r,t,this.filters)}}});function Nl(r,t,n,o,s){let i={...Al(r,t,o),...n};return s!=null&&s.setupCreate&&(i=s.setupCreate(i)),xr(r,t,i)}function Al(r,t,n){const o=`filters---${t}---${r}`;let s={};return localStorage.getItem(o)&&(s=JSON.parse(localStorage.getItem(o))),Object.keys(s).filter(a=>Object.keys(n).includes(a)).reduce((a,i)=>(a[i]=s[i],a),{})}function xr(r,t,n){const o=`filters---${t}---${r}`,s=Dl(n);return localStorage.setItem(o,JSON.stringify(s)),s}function Dl(r){return Object.keys(r).filter(t=>r[t]!=null&&r[t]!=null&&r[t]!="").reduce((t,n)=>(t[n]=r[n],t),{})}const Fl={class:"sorters-box"},jl=["onClick"],Rl={class:"sorters-label"},Il={class:"sorters-arrow-box"},Ll=["onClick"],Ml=["onClick"],Ul=M({__name:"FiltersSorters",props:{sorters:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateSorters"],setup(r,{emit:t}){const n=t,o=r,s=e.ref([]);async function a(){typeof o.sorters.sortersList=="function"?s.value=await o.sorters.sortersList():s.value=o.sorters.sortersList}a(),e.watch(()=>o.value,()=>{i()}),e.watch(()=>s,()=>{i()},{immediate:!0});function i(){if(o.value.length>0)for(let d=0;d<s.value.length;d++){const f=s.value[d];for(let p=0;p<o.value.length;p++){const m=o.value[p];f.field===m.field&&(f.order=m.order)}}else for(let d=0;d<s.value.length;d++)s.value[d].order=""}function c(d,f){const p=s.value;f?p[d].order=f:p[d].order?p[d].order==="ASC"?p[d].order="DESC":p[d].order==="DESC"&&(p[d].order=""):p[d].order="ASC",n("updateSorters",p.filter(m=>m.order))}return(d,f)=>(e.openBlock(),e.createElementBlock("div",Fl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"sorters-item",onClick:b=>c(m,"")},[e.createElementVNode("div",Rl,e.toDisplayString(p.name),1),e.createElementVNode("div",Il,[e.createElementVNode("i",{class:e.normalizeClass(["sort-caret ascending",p.order==="ASC"?"ascending-active":""]),onClick:e.withModifiers(b=>c(m,"ASC"),["stop"])},null,10,Ll),e.createElementVNode("i",{class:e.normalizeClass(["sort-caret descending",p.order==="DESC"?"descending-active":""]),onClick:e.withModifiers(b=>c(m,"DESC"),["stop"])},null,10,Ml)])],8,jl))),256))]))}},[["__scopeId","data-v-fa20b02a"]]),zl={class:"ranges-box"},Hl={class:"range-item"},ql={class:"range-label"},Pl={class:"range-input-box"},Wl=M({__name:"FiltersRange",props:{ranges:{type:Object},value:{type:Array,default(){return[]}}},emits:["updateRanges"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive(o.ranges.rangesList);e.watch(()=>o.value,()=>{a()});function a(){o.value&&o.value.length>0?s.forEach(c=>{o.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 p=[...s];p.forEach(m=>{m.field===d&&(m[f]=c)}),n("updateRanges",p.filter(m=>m.min||m.max))}return a(),(c,d)=>(e.openBlock(),e.createElementBlock("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,f=>(e.openBlock(),e.createElementBlock("div",Hl,[e.createElementVNode("div",ql,e.toDisplayString(f.name),1),e.createElementVNode("div",Pl,[e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.min,"onUpdate:modelValue":p=>f.min=p,"controls-position":"right",class:"input-box",onChange:p=>{i(p,f.field,"min")}},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createVNode(e.unref(w.ElInputNumber),{modelValue:f.max,"onUpdate:modelValue":p=>f.max=p,"controls-position":"right",class:"input-box",type:"number",onChange:p=>{i(p,f.field,"max")}},null,8,["modelValue","onUpdate:modelValue","onChange"])])]))),256))]))}},[["__scopeId","data-v-30f46526"]]),Gl={key:0},Ql=M({__name:"FiltersEditor",props:{settings:{type:Object}},setup(r){const t=r,n=G.useRoute(),o=re(n),s=e.ref([]),a=e.reactive({}),i=e.reactive({}),c=Er(t.settings.code,n.path,t.settings.filters,t.settings.filterHook)();c.$subscribe((_,E)=>{E.filters.isDeleted!==a.isDeleted&&(Object.keys(a).forEach(B=>{a[B]=void 0}),a.isDeleted=E.filters.isDeleted)});function d(_){return typeof _=="boolean"?_:typeof _=="function"?_(o):!0}async function f(_,E){if(typeof _.options=="function")i[_.code]=await _.options(a,o,E);else if(Array.isArray(_.options))i[_.code]=_.options;else if(typeof _.options=="object"){const B=_.options.getOneUrl?_.options.getOneUrl:_.options.url;if(Array.isArray(a[_.code])&&a[_.code].length>0)i[_.code]=[],a[_.code].forEach(C=>{B.getOne({id:C}).then(N=>{i[_.code].push({code:N.data[_.options.data.value]||N.data.id,name:N.data[_.options.data.label]||N.data.name})})});else if(!Array.isArray(a[_.code])&&a[_.code])B.getOne({id:a[_.code]}).then(C=>{i[_.code]=[{code:C.data[_.options.data.value]||C.data.id,name:C.data[_.options.data.label]||C.data.name}]});else{const C=_.options.query.keyWord.toString();_.options.url.getList({..._.options.query,[C]:E}).then(N=>{i[_.code]=N.data.rows.map(D=>({code:D[_.options.data.value]||D.id,name:D[_.options.data.label]||D.name}))})}}}function p(_){if(_.remote)return E=>{f(_,E)}}function m(_){a.sorters=_,h()}function b(_){a.filters=_}function x(){Object.keys(a).forEach(_=>{a[_]=void 0}),s.value=Object.keys(t.settings.filters).filter(_=>d(t.settings.filters[_].visible)).map(_=>{const E={...t.settings.filters[_],code:_};return a[_]=y(_),(E.type==="select"||E.type==="selectV2"||E.type==="tree")&&f(E),E}).filter(_=>_.code!=="isDeleted")}function y(_){const E=t.settings.filters[_],B=c.validFilters[_];return E.type==="boolean"&&typeof B!="boolean"?E.value:B}function h(){let _=JSON.parse(JSON.stringify(a));const E=t.settings.filterHook;E!=null&&E.preSubmit&&(_=E.preSubmit(_,o)),c.change(_)}function k(){c.$reset({}),x(),h()}return e.watch(()=>t.settings,()=>{x(),h()},{immediate:!0}),(_,E)=>Object.keys(t.settings.filters).length>0?(e.openBlock(),e.createElementBlock("div",Gl,[e.createVNode(e.unref(w.ElForm),{model:a,inline:"",class:"form-editor"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,B=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),null,{default:e.withCtx(()=>[B.type==="boolean"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:0,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",clearable:"",placeholder:`是否${B.name}`,"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElOption),{value:!0,label:`已${B.name}`},null,8,["label"]),e.createVNode(e.unref(w.ElOption),{value:!1,label:`未${B.name}`},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):B.type==="select"?(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{key:1,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",clearable:"",remote:"","reserve-keyword":"","remote-show-suffix":"","fit-input-width":"",placeholder:B.name,multiple:B.multiple,"collapse-tags":"",class:e.normalizeClass(B.multiple?"tags-selects-input":""),"multiple-limit":B.multipleLimit?B.multipleLimit:0,"remote-method":p(B),"value-on-clear":null,onChange:h},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i[B.code],C=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:C.code,label:C.name,value:C.code,title:C.name},null,8,["label","value","title"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","multiple","class","multiple-limit","remote-method"])):B.type==="selectV2"?(e.openBlock(),e.createBlock(e.unref(w.ElSelectV2),{key:2,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,filterable:"",options:i[B.code]?i[B.code]:[],props:{label:"name",value:"code"},multiple:B.multiple,placeholder:B.name,clearable:"","value-on-clear":null,onChange:h},null,8,["modelValue","onUpdate:modelValue","options","multiple","placeholder"])):B.type==="sorters"?(e.openBlock(),e.createBlock(Ul,{key:3,value:a[B.code],sorters:B,onUpdateSorters:m},null,8,["value","sorters"])):B.type==="range"?(e.openBlock(),e.createBlock(Wl,{key:4,value:a[B.code],ranges:B,onUpdateRanges:b},null,8,["value","ranges"])):B.type==="datetime"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:5,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",placeholder:B.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):B.type==="datetime-range"?(e.openBlock(),e.createBlock(e.unref(w.ElDatePicker),{key:6,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,type:"datetimerange",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":B.name,"end-placeholder":B.name,placeholder:B.name},null,8,["modelValue","onUpdate:modelValue","start-placeholder","end-placeholder","placeholder"])):(e.openBlock(),e.createBlock(e.unref(w.ElInput),{key:7,modelValue:a[B.code],"onUpdate:modelValue":C=>a[B.code]=C,modelModifiers:{trim:!0},placeholder:B.name,type:B.type,clearable:""},null,8,["modelValue","onUpdate:modelValue","placeholder","type"]))]),_:2},1024))),256)),s.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:0},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElButton),{type:"primary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(" 查询 ")]),_:1}),e.createVNode(e.unref(w.ElButton),{onClick:k},{default:e.withCtx(()=>[e.createTextVNode(" 重置 ")]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["model"])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-cadbb5a7"]]),Jl={class:"data-page-title"},Kl={class:"title"},Yl={class:"data-page-toolbar"},vl=M({__name:"DataTableHeader",props:{settings:{type:Object}},setup(r){const t=r,n=t.settings.name,o=G.useRoute(),s=Te(),a=Er(t.settings.code,o.path,t.settings.filters,t.settings.filterHook)(),i=e.useSlots(),c=e.computed(()=>a.validFilters.isDeleted||!1);function d(){a.$reset({isDeleted:!c.value})}function f(){const m=`table-view-${o.path}-${t.settings.code}`,b=localStorage.getItem(m);s.change(b)}function p(m){s.change(m);const b=`table-view-${o.path}-${t.settings.code}`;localStorage.setItem(b,s.mode)}return e.onMounted(f),(m,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Kl,e.toDisplayString(c.value?`已删除的${e.unref(n)}`:e.unref(n)),1),e.createElementVNode("div",Yl,[e.unref(i).operations?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"operations",{},void 0,!0)]),_:3})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElButtonGroup),{class:"button-groups"},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"tools",{},void 0,!0)]),_:3}),e.createVNode(e.unref(w.ElDropdown),{trigger:"click",onCommand:p},{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(ol))]),_:1}),e.createVNode(e.unref(w.ElIcon),{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wi))]),_: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:d},{default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(c.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(ml))]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),e.createVNode(Ql,{settings:t.settings},null,8,["settings"])],64))}},[["__scopeId","data-v-4bec2921"]]),Xl={class:"kst-field-row-id"},Zl={key:0},ec={key:1,class:"mono-data"},tc={key:1},wa=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=e.useSlots(),n=G.useRoute(),o=r,s=n.meta.side,a=o.row[o.field.code],i=e.computed(()=>({path:`/${s}/${o.field.domain}/${a}`,query:{...re(n),...o.field.rowQuery(o.row)}}));return(c,d)=>{const f=e.resolveComponent("RouterLink");return e.openBlock(),e.createElementBlock("div",Xl,[e.unref(a)?(e.openBlock(),e.createElementBlock("span",Zl,[r.field.isRouter?(e.openBlock(),e.createBlock(f,{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(c.$slots,"name",{},void 0,!0),e.createTextVNode("(#"+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" #"+e.toDisplayString(e.unref(a)),1)],64))]),_:3},8,["to"])):(e.openBlock(),e.createElementBlock("span",ec,[e.unref(t).name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(c.$slots,"name",{},void 0,!0),e.createTextVNode("("+e.toDisplayString(e.unref(a))+") ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(a)),1)],64))]))])):(e.openBlock(),e.createElementBlock("span",tc," NO ID "))])}}},[["__scopeId","data-v-346429d2"]]);function nc(r){w.ElMessage(r)}const rc={show:nc},Br={__name:"DomainEdit",props:{row:{type:Object},settings:{type:Object},operations:{type:Object,default:()=>{}},isDetail:{type:Boolean,default:!1}},setup(r){var y;const t=kn(),n=Te(),o=G.useRoute(),s=G.useRouter(),a=re(o),i=r,c=e.ref({}),d=e.ref(!1),f=e.computed(()=>{var h,k;return i.row.deletedAt?!1:(h=i.operations)!=null&&h.updatable?!0:!!((k=i.operations)!=null&&k.removable)}),p=e.ref((y=i.operations)==null?void 0:y.removable);async function m(){const h=i.settings.formHook,k=i.settings.btnVisible,_=i.settings.rest,{data:E}=await _.getOne({...i.row,...a});c.value=E,h.setupUpdate&&(c.value=h.setupUpdate(c.value)),k.showRemove&&(p.value=k.showRemove(c.value)),d.value=!0}function b(h,k){const _=i.settings.formHook,E=i.settings.rest;Object.keys(a).forEach(B=>{h[B]=a[B]}),_!=null&&_.preUpdateSubmit&&(h=_.preUpdateSubmit(h)),E.update(h).then(()=>{d.value=!1,n.fireUpdated()}).catch(async()=>{k()})}function x(h,k){i.settings.rest.remove(h).then(()=>{rc.show({type:"success",message:"删除成功"}),d.value=!1,i.isDetail&&t.history.forEach(E=>{o.fullPath.includes(E.path)&&(t.remove(E.code),s.back())}),n.fireRemoved()}).catch(()=>{k()})}return(h,k)=>f.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"primary",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(" 编辑 "),d.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:d.value,"onUpdate:modelValue":k[0]||(k[0]=_=>d.value=_),config:i.settings,data:c.value,removable:p.value,onSubmit:b,onRemove:x},null,8,["modelValue","config","data","removable"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},oc=r=>(e.pushScopeId("data-v-c9404ecb"),r=r(),e.popScopeId(),r),ac={class:"data-grid-wrapper"},sc={key:0,class:"cover"},ic=oc(()=>e.createElementVNode("div",{class:"image-slot"},null,-1)),lc={class:"header"},cc={class:"body"},dc={key:0},uc={class:"key"},fc={class:"value"},pc={key:1,class:"footer tools"},hc=M({__name:"DataGrid",props:{settings:{type:Object},data:{type:Array},operations:{type:Object,default:()=>{}}},setup(r){const t=G.useRoute(),n=re(t),o=e.useSlots(),s=r,a=e.shallowRef([]),i=e.shallowRef(null),c=e.computed(()=>{var p,m;return!!((p=s.operations)!=null&&p.updatable||(m=s.operations)!=null&&m.removable)});function d(){i.value=s.settings.fields.find(p=>p.code==="id"),a.value=s.settings.fields.filter(p=>p.code===s.settings.coverField||p.code===s.settings.nameField||p.code==="id"?!1:p.showInList(n))}function f(p){return s.settings.nameField?p[s.settings.nameField]:p.name?p.name:`${p.id}`}return d(),(p,m)=>(e.openBlock(),e.createElementBlock("div",ac,[r.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(r.data,b=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{style:{"margin-bottom":"20px"},xs:24,sm:12,md:8,lg:6,xl:4},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElCard),{"body-style":{padding:"0px"},shadow:"hover"},{default:e.withCtx(()=>[e.unref(o).cover||s.settings.coverField?(e.openBlock(),e.createElementBlock("div",sc,[e.unref(o).cover?e.renderSlot(p.$slots,"cover",{key:0,row:b},void 0,!0):(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:1,src:b[s.settings.coverField],fit:"contain"},{error:e.withCtx(()=>[ic]),_:2},1032,["src"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",lc,[e.createVNode(wa,{field:i.value,row:b},e.createSlots({_:2},[b[s.settings.nameField]?{name:"name",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(b)),1)]),key:"0"}:void 0]),1032,["field","row"])]),e.createElementVNode("div",cc,[e.unref(o).body?(e.openBlock(),e.createElementBlock("div",dc,[e.renderSlot(p.$slots,"body",{row:b},void 0,!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.value,x=>(e.openBlock(),e.createElementBlock("div",{key:x.code,class:"field mono-data"},[e.createElementVNode("div",uc,e.toDisplayString(x.label)+" ",1),e.createElementVNode("div",fc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.display),{field:x,row:b,mode:"grid"},null,8,["field","row"]))])]))),128))]),e.unref(o).actions||c.value?(e.openBlock(),e.createElementBlock("div",pc,[e.unref(o).actions?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0,size:"small"},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"actions",{row:b},void 0,!0)]),_:2},1024)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:1,size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:b,settings:s.settings,operations:s.operations},null,8,["row","settings","operations"])]),_:2},1024)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),256))]),_:3}))]))}},[["__scopeId","data-v-c9404ecb"]]);function mc(r,t){const n=r.fields.map(s=>s.code),o=Object.keys(t);n.forEach(s=>{o.includes(s)||console.error(`${r.code}.${s} : 与服务端数据不匹配`)})}const ka=M({__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(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=e.useSlots(),i=r,c=e.shallowRef([]),d=e.computed(()=>{var x,y;return!!((x=i.operations)!=null&&x.updatable||(y=i.operations)!=null&&y.removable)});function f(x){s("sort-column",x)}function p(x){s("enable-item",x)}function m(){c.value=i.settings.fields.filter(x=>x.showInList(o))}function b(x){s("select-change",{routeQuery:o,data:x})}return m(),e.watch(()=>i.data,()=>{i.data.length>0&&mc(i.settings,i.data[0])}),(x,y)=>(e.openBlock(),e.createBlock(e.unref(w.ElTable),{ref:"dataTable",class:"table mono-data",data:i.data,"show-overflow-tooltip":"","highlight-current-row":"","row-key":"id",onSelectionChange:b,onSortChange:f},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElTableColumn),{type:"selection",width:"40"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,h=>(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:h.code,label:h.label,width:h.width,prop:h.code,sortable:h.sortable?"custom":!1,fixed:h.fixed},e.createSlots({_:2},[h.type==="switch"?{name:"default",fn:e.withCtx(({row:k})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.display),{field:h,row:k,mode:"list",onEnable:p},null,40,["field","row"]))]),key:"0"}:{name:"default",fn:e.withCtx(({row:k})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.display),{key:k.updatedAt,field:h,row:k,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:h})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.renderSlot(x.$slots,"actions",{row:h},void 0,!0)]),_:2},1024)]),_:3},8,["width"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createBlock(e.unref(w.ElTableColumn),{key:1,fixed:"right",label:"操作",width:i.operationsWidth},{default:e.withCtx(({row:h})=>[e.createVNode(e.unref(w.ElButtonGroup),{size:"small"},{default:e.withCtx(()=>[e.createVNode(Br,{row:h,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-79b9c87c"]]),gc={__name:"DataTable",props:{data:{type:Array},settings:{type:Object},operationsWidth:{type:Number},actionsWidth:{type:Number}},setup(r){const t=Te();t.$reset();const{mode:n}=Ke.storeToRefs(t),o=e.useSlots(),s=r,a=e.shallowRef(ka);function i(c){c=="grid"?a.value=hc:a.value=ka}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(o),(f,p)=>({name:p,fn:e.withCtx(m=>[e.renderSlot(c.$slots,p,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040))}},_c={__name:"DomainNew",props:{settings:{type:Object},operations:{type:Object,default:()=>{}}},setup(r){const t=Te(),n=G.useRoute(),o=re(n),s=r,a=e.ref({}),i=e.ref(!1),c=e.computed(()=>{var p;return!!((p=s.operations)!=null&&p.creatable)});async function d(){const p=s.settings.formHook,m=s.settings.fields.reduce((b,x)=>(b[x.code]=x.default,b),{});a.value=m,p.setupCreate&&(a.value=p.setupCreate(a.value)),i.value=!0}function f(p,m){const b=s.settings.formHook,x=s.settings.rest;Object.keys(o).forEach(y=>{p[y]=o[y]}),b!=null&&b.preCreateSubmit&&(p=b.preCreateSubmit(p)),x.create(p).then(()=>{i.value=!1,t.fireCreated()}).catch(async()=>{m()})}return(p,m)=>c.value?(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:0,type:"success",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(" 添加 "),i.value?(e.openBlock(),e.createBlock(wn,{key:0,modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),config:s.settings,data:a.value,removable:!1,onSubmit:f},null,8,["modelValue","config","data"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)}},Ea={__name:"RowActions",props:{row:{type:Object},settings:{type:Object},query:{type:Object}},setup(r){const t=G.useRouter(),n=Te(),o=r,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 p=await It.getValue();try{await d.action({...f,...o.query,idempotentToken:p}),a.close(),n.fireUpdated()}catch{a.close(),n.fireUpdated()}}function c(d,f){t.push(d.path(f,o.query))}return e.watch(()=>o.row,()=>{s.value=o.settings.rowActions(o.query)},{immediate:!0}),(d,f)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.isVisible(o.row)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.component),{key:0,row:r.row},null,8,["row"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:p.type?p.type:"primary",onClick:m=>i(p,o.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.name),1)]),_:2},1032,["type","onClick"]))],64)):e.createCommentVNode("",!0)],64))),256))}},yc={__name:"PageActions",props:{settings:{type:Object},tableDataSelect:{type:Object},query:{type:Object}},setup(r){const t=Te(),n=r,o=e.shallowRef([]),s=e.computed(()=>{var c,d;return((d=(c=n.tableDataSelect)==null?void 0:c.data)==null?void 0:d.length)>0}),a=e.ref(!1);async function i(c){a.value=!0;const d=await It.getValue();try{await c.action({...n.tableDataSelect,idempotentToken:d}),a.value=!1,t.fireUpdated()}catch{a.value=!1,t.fireUpdated()}}return e.watch(()=>n.row,()=>{o.value=n.settings.pageActions(n.query)},{immediate:!0}),(c,d)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.component),{key:0,item:f,settings:r.settings,query:r.query,"table-data-select":r.tableDataSelect},null,8,["item","settings","query","table-data-select"])):(e.openBlock(),e.createBlock(e.unref(w.ElButton),{key:1,type:f.type,loading:a.value,disabled:!f.enable&&!s.value,onClick:p=>i(f)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1032,["type","loading","disabled","onClick"]))],64))),256))}},bc={class:"pagination-wrapper"},wc=M({__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(r,{emit:t}){const n=t,o=G.useRouter(),s=G.useRoute(),a=r,i=e.ref(a.page),c=e.ref(a.size),d=e.ref(a.total),f=e.ref(a.pageSizes);e.watch(()=>a.total,b=>{d.value=b}),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 p(b){i.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}function m(b){c.value=b,o.push({path:s.path,query:{...s.query,page:i.value,pageSize:c.value}})}return(b,x)=>(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":r.page,layout:"total,sizes, prev, pager, next",onCurrentChange:p,onSizeChange:m},null,8,["page-size","page-sizes","total","current-page"])]))}},[["__scopeId","data-v-3c65f1a1"]]);var xa;const Ba=typeof window<"u";Ba&&((xa=window==null?void 0:window.navigator)!=null&&xa.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function kc(r){return typeof r=="function"?r():e.unref(r)}function Ec(r){return r}function xc(r){return e.getCurrentScope()?(e.onScopeDispose(r),!0):!1}function Bc(r,t=!0){e.getCurrentInstance()?e.onMounted(r):t?r():e.nextTick(r)}function Sc(r){var t;const n=kc(r);return(t=n==null?void 0:n.$el)!=null?t:n}const Cc=Ba?window:void 0;function $c(r,t=!1){const n=e.ref(),o=()=>n.value=!!r();return o(),Bc(o,t),n}const Sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ca="__vueuse_ssr_handlers__";Sa[Ca]=Sa[Ca]||{};var $a=Object.getOwnPropertySymbols,Vc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,Tc=(r,t)=>{var n={};for(var o in r)Vc.call(r,o)&&t.indexOf(o)<0&&(n[o]=r[o]);if(r!=null&&$a)for(var o of $a(r))t.indexOf(o)<0&&Oc.call(r,o)&&(n[o]=r[o]);return n};function Va(r,t,n={}){const o=n,{window:s=Cc}=o,a=Tc(o,["window"]);let i;const c=$c(()=>s&&"ResizeObserver"in s),d=()=>{i&&(i.disconnect(),i=void 0)},f=e.watch(()=>Sc(r),m=>{d(),c.value&&s&&m&&(i=new ResizeObserver(t),i.observe(m,a))},{immediate:!0,flush:"post"}),p=()=>{d(),f()};return xc(p),{isSupported:c,stop:p}}var Oa;(function(r){r.UP="UP",r.RIGHT="RIGHT",r.DOWN="DOWN",r.LEFT="LEFT",r.NONE="NONE"})(Oa||(Oa={}));var Nc=Object.defineProperty,Ta=Object.getOwnPropertySymbols,Ac=Object.prototype.hasOwnProperty,Dc=Object.prototype.propertyIsEnumerable,Na=(r,t,n)=>t in r?Nc(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Fc=(r,t)=>{for(var n in t||(t={}))Ac.call(t,n)&&Na(r,n,t[n]);if(Ta)for(var n of Ta(t))Dc.call(t,n)&&Na(r,n,t[n]);return r};Fc({linear:Ec},{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 Aa=M({__name:"DataTablePage",props:{settings:{type:Object},query:{type:Object}},setup(r){e.useCssVars(L=>({71828730:K.value}));const t=G.useRoute(),n=re(t),o=r,s=Er(o.settings.code,t.path,o.settings.filters,o.settings.filterHook)(),{filters:a}=Ke.storeToRefs(s);e.watch(a,L=>{_=L,D()});const i=Te(),{created:c,updated:d,removed:f}=Ke.storeToRefs(i);e.watch([c,d,f],([L,P,de])=>{(L||P||de)&&D()});const p=e.ref(!0),m=e.ref([]),b=e.ref(0),x=e.ref({}),y=e.ref({}),h=e.ref(null),k=e.ref(null);let _={};const E=e.ref(parseInt(t.query.pageSize)||30),B=e.ref(parseInt(t.query.page)||1);function C(L){let P=null;if(L.order==="ascending"?P="ASC":L.order==="descending"&&(P="DESC"),_.sorters){let de=[];_.sorters.some(ye=>ye.field===L.prop)?_.sorters.forEach(ye=>{ye.field===L.prop&&(ye.order=P,ye.name||de.push(ye)),ye.name&&de.push(ye)}):de=[..._.sorters,{field:L.prop,order:P}],_.sorters=de}else _.sorters=[{field:L.prop,order:P}];D()}function N(){y.value=o.settings.operations(n)}function D(){p.value=!0;const L={..._,...n,...o.query,page:B.value,size:E.value};o.settings.rest.getList(L).then(P=>{x.value.data=[],m.value=P.data.rows,b.value=P.data.count,p.value=!1})}function R(L){B.value=L.page,E.value=L.size,D()}function Y(L){const P={id:L.id,enable:!L.enable};o.settings.rest.enable(P).then(()=>{D()})}function et(L){if(L.enable){const P=L.label==="上架"?"下架":"停用";ElMessageBox.confirm(`确定要${P}该条数据吗?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y(L)}).catch(()=>{})}else Y(L)}function Ue(L){x.value=L}const V=e.ref(0),I=e.ref(0);Va(h,L=>{var P;V.value=((P=L[0])==null?void 0:P.contentRect.height)||0}),Va(k,L=>{var P;I.value=((P=L[0])==null?void 0:P.contentRect.height)||0});const K=e.computed(()=>`${V.value+I.value}px`);return N(),(L,P)=>(e.openBlock(),e.createElementBlock("div",{key:o.settings.code,style:{height:"100%"}},[e.createElementVNode("div",{ref_key:"pageHeader",ref:h},[e.createVNode(vl,{settings:o.settings},{operations:e.withCtx(()=>[e.createVNode(yc,{settings:o.settings,"table-data-select":x.value,query:e.unref(n)},null,8,["settings","table-data-select","query"]),e.createVNode(_c,{settings:o.settings,operations:y.value},null,8,["settings","operations"])]),_:1},8,["settings"])],512),e.withDirectives((e.openBlock(),e.createBlock(gc,{class:"data-table-box",data:m.value,operations:y.value,settings:o.settings,"actions-width":o.settings.actionsWidth,onSortColumn:C,onEnableItem:et,onSelectChange:Ue},e.createSlots({_:2},[o.settings.rowActions(e.unref(n)).length>0?{name:"actions",fn:e.withCtx(({row:de})=>[e.createVNode(Ea,{row:de,settings:o.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]]),e.createElementVNode("div",{ref_key:"pagination",ref:k},[e.createVNode(wc,{page:B.value,size:E.value,total:b.value,onPageChange:R},null,8,["page","size","total"])],512)]))}},[["__scopeId","data-v-9a31cd72"]]),jc={key:1,class:"loading-wrapper"},Rc=M({__name:"List",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null);return bn(n,o).then(a=>{s.value=a}),(a,i)=>s.value?(e.openBlock(),e.createBlock(Aa,{key:0,settings:s.value},null,8,["settings"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",jc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-49ae0ff6"]]),Ic={key:0},Lc={class:"key"},Mc={class:"value"},Uc={key:1,class:"loading-wrapper"},Da=M({__name:"DomainDescription",props:{settings:{type:Object},query:{type:Object}},emits:["done"],setup(r,{emit:t}){const n=t,o=r,s=Te(),{updated:a}=Ke.storeToRefs(s),i=e.shallowRef([]),c=e.ref(null),d=["image","images","attachments","attachment","editor","rich-text","textarea","text","json"];i.value=o.settings.fields.filter(y=>y.showInDetail());const f=e.computed(()=>i.value.find(y=>y.code===o.settings.coverField)),p=e.computed(()=>i.value.filter(y=>!d.includes(y.type))),m=e.computed(()=>{var h;const y=(h=f.value)==null?void 0:h.code;return i.value.filter(k=>d.includes(k.type)).filter(k=>k.code!==y)}),b=e.computed({get(){return m.value.map(y=>y.code)},set(y){}});function x(){o.settings.rest.getOne(o.query).then(y=>{y.data.isDeleted=!!y.data.deletedAt,c.value=y.data,n("done",y.data)})}return e.watch(a,()=>{x()},{immediate:!0}),(y,h)=>(e.openBlock(),e.createElementBlock("div",null,[c.value?(e.openBlock(),e.createElementBlock("div",Ic,[e.createVNode(e.unref(w.ElRow),{gutter:20},{default:e.withCtx(()=>[f.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(f.value.display),{field:f.value,row:c.value},null,8,["field","row"]))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(w.ElCol),{span:f.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(p.value,k=>(e.openBlock(),e.createBlock(e.unref(w.ElCol),{span:k.span,class:"mono-data",style:{"margin-bottom":"20px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Lc,e.toDisplayString(k.label),1),e.createElementVNode("div",Mc,[k.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(k.display),{key:1,field:k,row:c.value,mode:"description"},null,8,["field","row"]))])]),_:2},1032,["span"]))),256))]),_:1})]),_:1},8,["span"])]),_:1}),m.value.length>0?(e.openBlock(),e.createBlock(e.unref(w.ElCollapse),{key:0,modelValue:b.value,"onUpdate:modelValue":h[0]||(h[0]=k=>b.value=k),class:"extend-fields"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,k=>(e.openBlock(),e.createBlock(e.unref(w.ElCollapseItem),{title:k.label,name:k.code,class:"mono-data"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.display),{field:k,row:c.value,mode:"extend"},null,8,["field","row"]))]),_:2},1032,["title","name"]))),256))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Uc,null,512)),[[e.unref(w.vLoading),!0]])]))}},[["__scopeId","data-v-27106b05"]]),zc={class:"data-page-title"},Hc={class:"title"},qc=M({__name:"DataDetailHeader",props:{data:{type:Object},settings:{type:Object},query:{type:Object}},emits:["get-item"],setup(r,{emit:t}){const n=kn(),o=G.useRoute(),s=re(o),a=r,i=e.ref("加载中..."),c=e.ref({});function d(p,m){const b=`${p}-${m}`;n.updateTitleByCode(b,i.value),document.title=i.value}function f(p){const m=a.settings;i.value=`${m.name}: ${m.formatName(p)}`,d(m.code,p.id)}return e.watch(()=>a.data,p=>{p&&(c.value=a.settings.operations(s),f(p))},{immediate:!0}),(p,m)=>(e.openBlock(),e.createElementBlock("div",zc,[e.createElementVNode("div",Hc,e.toDisplayString(i.value),1),e.createElementVNode("div",null,[a.data?(e.openBlock(),e.createBlock(e.unref(w.ElButtonGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ea,{row:a.data,settings:a.settings,query:e.unref(s)},null,8,["row","settings","query"]),e.createVNode(Br,{row:a.data,settings:a.settings,operations:c.value,"is-detail":!0},null,8,["row","settings","operations"])]),_:1})):e.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-b3976736"]]),Pc=M({__name:"DataDetailPage",props:{settings:{type:Object},associations:{type:Array}},setup(r){const t=G.useRouter(),n=G.useRoute(),o=re(n),s=r,a=e.shallowRef([]),i=e.ref(""),c=e.shallowRef(null),d=e.ref(null),f=Te();Ke.storeToRefs(f),a.value=s.settings.fields.filter(x=>x.showInDetail!==!1);function p(x){d.value=x}function m(x){i.value=x.props.name,t.push({name:`${n.meta.side}-association`,params:{association:x.props.name},query:o})}function b(x){if(s.associations.length>0)if(n.params.association){i.value=n.params.association;const y=s.associations.find(h=>h.domain===n.params.association);c.value={...y,domainData:d.value}}else i.value=s.associations[0].domain,c.value={...s.associations[0],domainData:d.value},x&&x()}return e.watch(d,()=>{b(()=>{t.replace({name:`${n.meta.side}-association`,params:{association:i.value},query:o})})},{immediate:!0}),e.watch(()=>n.params,()=>{d.value&&b()},{immediate:!0}),(x,y)=>{const h=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{key:`${e.unref(n).params.domain}-${e.unref(n).params.id}`},[e.createVNode(qc,{data:d.value,settings:s.settings,query:{...e.unref(n).params,...e.unref(o)}},null,8,["data","settings","query"]),e.createVNode(Da,{query:{...e.unref(n).params,...e.unref(o)},settings:s.settings,onDone:p},null,8,["query","settings"]),e.createVNode(e.unref(w.ElTabs),{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=k=>i.value=k),class:"association-tabs",onTabClick:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.associations,k=>(e.openBlock(),e.createBlock(e.unref(w.ElTabPane),{label:k.name,name:k.domain},null,8,["label","name"]))),256))]),_:1},8,["modelValue"]),c.value?(e.openBlock(),e.createBlock(h,{key:c.value,association:c.value},null,8,["association"])):e.createCommentVNode("",!0)])}}},[["__scopeId","data-v-4881eb36"]]),Wc={key:1,class:"loading-wrapper"},Gc=M({__name:"Detail",setup(r){const t=G.useRoute(),n=t.meta.side,o=t.params.domain,s=e.shallowRef(null),a=e.shallowRef([]);bn(n,o).then(c=>{const d=c,f=i("has-many",d.hasMany),p=i("has-one",d.hasOne);s.value=d,a.value=f.concat(p)});function i(c,d){return(d||[]).map(f=>typeof f=="object"?{type:c,domain:f.code,name:f.name,query:f.query||(()=>({}))}:{type:c,domain:f,name:br()[n][f].name,query:()=>({})})}return(c,d)=>s.value?(e.openBlock(),e.createBlock(Pc,{key:0,settings:s.value,associations:a.value},null,8,["settings","associations"])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Wc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-7c232776"]]),Qc={key:0},Jc={key:1,class:"loading-wrapper"},Kc=M({__name:"DetailTab",props:{association:{type:Object}},setup(r){const t=G.useRoute(),n=t.meta.side,o=re(t),s=r,a=e.shallowRef(null);return e.watch(()=>t.params.association,()=>{bn(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",Qc,[a.value.type==="has-many"?(e.openBlock(),e.createBlock(Aa,{key:`has-many-${a.value.domain}`,settings:a.value.settings,query:a.value.query(s.association.domainData)},null,8,["settings","query"])):a.value.type==="has-one"?(e.openBlock(),e.createBlock(Da,{key:`has-one-${a.value.domain}`,style:{"padding-top":"20px"},query:e.unref(o),settings:a.value.settings},null,8,["query","settings"])):e.createCommentVNode("",!0)])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Jc,null,512)),[[e.unref(w.vLoading),!0]])}},[["__scopeId","data-v-bb501ead"]]),Yc={key:0},vc={class:"file-name"},Xc={class:"name"},Zc={class:"file-type"},ed={key:1},td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref([]);function o(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",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",vc,[e.createVNode(e.unref(w.ElIcon),{color:"#73767a"},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createElementVNode("span",Xc,e.toDisplayString(c.name),1),e.createElementVNode("span",Zc,"."+e.toDisplayString(c.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#409eff",size:"16",onClick:d=>o(c)},{default:e.withCtx(()=>[e.createVNode(e.unref(nl))]),_: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(bl))]),_:1})]),_:2},1032,["href"])):e.createCommentVNode("",!0)])]))),256))])):(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(we)]))}},[["__scopeId","data-v-196b9bff"]]),nd={__name:"FieldEditor",props:{modelValue:Array,field:Object,domainConfig:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>Mu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(p){a.value=a.value?[...a.value,p]:[p]}function c(p){const m=a.value.findIndex(b=>b.id===p.id);a.value.splice(m,1)}async function d(p){const m=s.domainConfig.rest;if(!/^[\u4e00-\u9fa5\w-_]+$/.test(p.name)){ElMessage({message:"请勿输入特殊字符!",type:"warning"});return}await m.updateFilesName(p).then(()=>{ElMessage({message:"附件名称已修改!",type:"success"})})}function f(p,m){if(m=="success"){i(p),o("update:modelValue",a.value);return}if(m=="remove"){c(p),o("update:modelValue",a.value);return}if(m=="change"){d(p);return}}return(p,m)=>(e.openBlock(),e.createBlock(e.unref(n),{pics:a.value,props:s.field.props?s.field.props:{},onOnSuccess:m[0]||(m[0]=b=>f(b,"success")),onOnRemove:m[1]||(m[1]=b=>f(b,"remove")),onOnChange:m[2]||(m[2]=b=>f(b,"change"))},null,8,["pics","props"]))}};class rd extends ne{constructor(t,n){super(t,n),this.attachmentType=t.attachmentType,this.props=t.props,this.display=td,this.editor=nd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const od=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),ad={key:3},sd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=G.useRoute(),n=r,o=n.field.belongsTo,s=t.meta.side,a=n.row[n.field.code],i=e.computed(()=>({path:`/${s}/${o}/${a}`,query:{...re(t),...n.field.rowQuery(n.row)}})),c=e.ref(!0),d=e.ref(!1),f=e.ref("");let p=null;const m=bn(s,o).then(h=>(p=h.formatName,Promise.resolve(h.rest)));function b(h){return n.field.isRouter(n.row,re(t))}function x(){m.then(h=>{c.value=!0;const k=n.row[n.field.code],_=n.row[mr(`${o}-name`)];if(!k){y(!1),c.value=!1;return}if(k&&_){y({id:k,name:_}),c.value=!1;return}const E={id:k};h.getOne(E).then(B=>{y(B.data),c.value=!1}).catch(B=>{console.log(B)})})}function y(h){if(d.value=!1,n.field.showName){sa(n.field.domain,n.field.code,"showName 即将废弃,请使用 formatter"),f.value=h[n.field.showName];return}if(n.field.formatter){f.value=n.field.formatter(h);return}if(h.id&&h.name){f.value=h.name;return}if(!h){d.value=!0;return}f.value=p(h)}return e.watch(()=>n.row,x,{immediate:!0}),(h,k)=>{const _=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(ga))]),_:1})):d.value?(e.openBlock(),e.createBlock(we,{key:1})):b(r.row)?(e.openBlock(),e.createBlock(_,{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",ad,e.toDisplayString(f.value),1))])}}},[["__scopeId","data-v-fb849d3e"]]),id={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}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(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),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,b=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class ld extends ne{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=sd,this.editor=id,this.showName=t.showName,this.formatter=t.formatter,this.rowQuery=t.rowQuery||(()=>({})),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 cd=Object.freeze(Object.defineProperty({__proto__:null,default:ld},Symbol.toStringTag,{value:"Module"})),dd={style:{display:"flex","align-items":"center"}},ud={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.computed(()=>t.row[t.field.code]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",dd,[n.value==!0?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,color:"#529b2e",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(_l))]),_:1})):n.value==!1?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,color:"#F56C6C",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(Qi))]),_:1})):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:2,color:"#73767a",size:20},{default:e.withCtx(()=>[e.createVNode(e.unref(pl))]),_:1}))]))}},fd={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class pd extends ne{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ud,this.editor=fd,this.checkValidProperties(t)}}const hd=Object.freeze(Object.defineProperty({__proto__:null,default:pd},Symbol.toStringTag,{value:"Module"})),md={key:0},gd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",md,e.toDisplayString(o.value),1)),e.createTextVNode(" edit ")]))}},_d={__name:"FieldEditor",props:{modelValue:Array,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.modelValue},{immediate:!0}),(i,c)=>(e.openBlock(),e.createBlock(e.unref(w.ElCascader),{modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),props:o.field.props,clearable:"",style:{width:"100%"},onChange:a},null,8,["modelValue","props"]))}};class yd extends ne{constructor(t,n){super(t,n),this.props=t.props||(()=>{}),this.formChange=t.formChange||(()=>{}),this.display=gd,this.editor=_d,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const bd=Object.freeze(Object.defineProperty({__proto__:null,default:yd},Symbol.toStringTag,{value:"Module"}));class wd extends ne{constructor(t,n){super(t,n),this.component=t.component,this.display=t.component,this.editor=t.component,this.checkValidProperties(t)}}const kd=Object.freeze(Object.defineProperty({__proto__:null,default:wd},Symbol.toStringTag,{value:"Module"})),Ed={key:0},xd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Ed,e.toDisplayString(o.value),1))}},Bd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,type:"datetime",format:"YYYY-MM-DD HH:mm:ss","value-format":"YYYY-MM-DD HH:mm:ss",onChange:a},null,8,["modelValue","disabled"]))}};class Sd extends ne{constructor(t,n){super(t,n),this.display=xd,this.editor=Bd,this.width=this.computeWidth(t),this.checkValidProperties(t)}computeWidth(t){return t.width?t.width:200}}const Cd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),$d=r=>(e.pushScopeId("data-v-35bc9ffb"),r=r(),e.popScopeId(),r),Vd={class:"loading-error"},Od=$d(()=>e.createElementVNode("div",null,"加载失败",-1)),Td=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object},mode:{type:String}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{n.value=t.row[t.field.code],o.value=[t.row[t.field.code]]},{immediate:!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`image-card ${t.mode}`)},[e.createVNode(e.unref(w.ElImage),{src:n.value,"preview-teleported":"",fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Vd,[Od,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:1},8,["src","preview-src-list"])],2))}},[["__scopeId","data-v-35bc9ffb"]]),Nd={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>zu)),o=t,s=r,a=e.reactive({value:s.modelValue});function i(c){o("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,onOnSuccess:i},null,8,["image-url","disabled"]))}};class Ad extends ne{constructor(t,n){super(t,n),this.display=Td,this.editor=Nd,this.checkValidProperties(t)}}const Dd=Object.freeze(Object.defineProperty({__proto__:null,default:Ad},Symbol.toStringTag,{value:"Module"})),Fd=r=>(e.pushScopeId("data-v-4cb2ce7b"),r=r(),e.popScopeId(),r),jd={class:"image-card",style:{"margin-bottom":"20px"}},Rd={class:"loading-error"},Id=Fd(()=>e.createElementVNode("div",null,"图片加载失败",-1)),Ld=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(null),o=e.ref([]);return e.watch(()=>t.row,()=>{const s=t.row[t.field.code];s&&(o.value=s.map(a=>a.url),n.value=o.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",jd,[e.createVNode(e.unref(w.ElImage),{src:i.url,fit:"contain","preview-src-list":o.value,class:"image"},{error:e.withCtx(()=>[e.createElementVNode("div",Rd,[Id,e.createElementVNode("div",null,e.toDisplayString(n.value),1)])]),_:2},1032,["src","preview-src-list"])]))),256))]),_:1})):(e.openBlock(),e.createBlock(we,{key:1}))}},[["__scopeId","data-v-4cb2ce7b"]]);class Md extends ne{constructor(t,n){super(t,n),this.props=t.props,this.display=Ld,this.editor=fa,this.converter=this.defaultBy(t.converter,o=>o),this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Md},Symbol.toStringTag,{value:"Module"})),zd={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=e.defineAsyncComponent(()=>import("json-editor-vue")),n=r,o=e.ref(!1),s=e.ref("加载中...");return e.watch(()=>n.row,()=>{o.value=!1;const a=n.row[n.field.code];a!=null&&`${a}`.trim()!==""&&(o.value=!0,s.value=a)},{immediate:!0}),(a,i)=>o.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(we,{key:1}))}},Hd={__name:"FieldEditor",props:{modelValue:Object,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>import("json-editor-vue")),o=t,s=r,a=e.reactive({value:s.modelValue});function i(){o("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 qd extends ne{constructor(t,n){super(t,n),this.display=zd,this.editor=Hd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Pd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"})),Wd={class:"editor-field"},Gd=["innerHTML"],Qd=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r;return(n,o)=>(e.openBlock(),e.createElementBlock("div",Wd,[e.createElementVNode("div",{class:"content",innerHTML:t.row[t.field.code]},null,8,Gd)]))}},[["__scopeId","data-v-02b50564"]]),Jd={style:{width:"100%"}},Kd={__name:"FieldEditor",props:{modelValue:String,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>rf)),o=t,s=r,a=e.reactive({value:s.modelValue});return e.watch(()=>a.value,()=>{o("update:modelValue",a.value)}),(i,c)=>(e.openBlock(),e.createElementBlock("div",Jd,[e.createVNode(e.unref(n),{content:a.value,"onUpdate:content":c[0]||(c[0]=d=>a.value=d)},null,8,["content"])]))}};class Yd extends ne{constructor(t,n){super(t,n),this.display=Qd,this.editor=Kd,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const vd=Object.freeze(Object.defineProperty({__proto__:null,default:Yd},Symbol.toStringTag,{value:"Module"}));class Xd extends ne{constructor(t,n){super(t,n),this.editable=()=>!1,this.isRouter=typeof t.isRouter>"u"?!0:t.isRouter,this.rowQuery=t.rowQuery||(()=>({})),this.display=wa,this.fixed=!0,this.checkValidProperties(t)}}const Zd=Object.freeze(Object.defineProperty({__proto__:null,default:Xd},Symbol.toStringTag,{value:"Module"}));var F=function(r,t,n){if(!t.has(r))throw new TypeError("attempted to set private field on non-instance");return t.set(r,n),n},O=function(r,t){if(!t.has(r))throw new TypeError("attempted to get private field on non-instance");return t.get(r)},ve,at,ke,yt,Lt,Ne,Ae,De,Fe,je,Re,Ie,Le,st,bt,Xe,En,Ze;const eu=function(r){var t=131,n=137,o=0;r+="x";var s=Math.floor(9007199254740991/n);for(let a=0;a<r.length;a++)o>s&&(o=Math.floor(o/n)),o=o*t+r.charCodeAt(a);return o},T="0123456789abcdef".split(""),tu=[-2147483648,8388608,32768,128],Ee=[24,16,8,0],xn=[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],ee=[];class nu{constructor(t=!1,n=!1){ve.set(this,void 0),at.set(this,void 0),ke.set(this,void 0),yt.set(this,void 0),Lt.set(this,void 0),Ne.set(this,void 0),Ae.set(this,void 0),De.set(this,void 0),Fe.set(this,void 0),je.set(this,void 0),Re.set(this,void 0),Ie.set(this,void 0),Le.set(this,void 0),st.set(this,void 0),bt.set(this,void 0),Xe.set(this,void 0),En.set(this,0),Ze.set(this,void 0),this.init(t,n)}init(t,n){n?(ee[0]=ee[16]=ee[1]=ee[2]=ee[3]=ee[4]=ee[5]=ee[6]=ee[7]=ee[8]=ee[9]=ee[10]=ee[11]=ee[12]=ee[13]=ee[14]=ee[15]=0,F(this,at,ee)):F(this,at,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(F(this,Ne,3238371032),F(this,Ae,914150663),F(this,De,812702999),F(this,Fe,4144912697),F(this,je,4290775857),F(this,Re,1750603025),F(this,Ie,1694076839),F(this,Le,3204075428)):(F(this,Ne,1779033703),F(this,Ae,3144134277),F(this,De,1013904242),F(this,Fe,2773480762),F(this,je,1359893119),F(this,Re,2600822924),F(this,Ie,528734635),F(this,Le,1541459225)),F(this,ve,F(this,Ze,F(this,ke,F(this,bt,0)))),F(this,yt,F(this,st,!1)),F(this,Lt,!0),F(this,Xe,t)}update(t){if(O(this,yt))return this;let n;t instanceof ArrayBuffer?n=new Uint8Array(t):n=t;let o=0;const s=n.length,a=O(this,at);for(;o<s;){let i;if(O(this,st)&&(F(this,st,!1),a[0]=O(this,ve),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=O(this,Ze);o<s&&i<64;++o)a[i>>2]|=n[o]<<Ee[i++&3];else for(i=O(this,Ze);o<s&&i<64;++o){let c=n.charCodeAt(o);c<128?a[i>>2]|=c<<Ee[i++&3]:c<2048?(a[i>>2]|=(192|c>>6)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):c<55296||c>=57344?(a[i>>2]|=(224|c>>12)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3]):(c=65536+((c&1023)<<10|n.charCodeAt(++o)&1023),a[i>>2]|=(240|c>>18)<<Ee[i++&3],a[i>>2]|=(128|c>>12&63)<<Ee[i++&3],a[i>>2]|=(128|c>>6&63)<<Ee[i++&3],a[i>>2]|=(128|c&63)<<Ee[i++&3])}F(this,En,i),F(this,ke,O(this,ke)+(i-O(this,Ze))),i>=64?(F(this,ve,a[16]),F(this,Ze,i-64),this.hash(),F(this,st,!0)):F(this,Ze,i)}return O(this,ke)>4294967295&&(F(this,bt,O(this,bt)+(O(this,ke)/4294967296<<0)),F(this,ke,O(this,ke)%4294967296)),this}finalize(){if(O(this,yt))return;F(this,yt,!0);const t=O(this,at),n=O(this,En);t[16]=O(this,ve),t[n>>2]|=tu[n&3],F(this,ve,t[16]),n>=56&&(O(this,st)||this.hash(),t[0]=O(this,ve),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]=O(this,bt)<<3|O(this,ke)>>>29,t[15]=O(this,ke)<<3,this.hash()}hash(){let t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le);const f=O(this,at);let p,m,b,x,y,h,k,_,E,B;for(let C=16;C<64;++C)x=f[C-15],p=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,x=f[C-2],m=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,f[C]=f[C-16]+p+f[C-7]+m<<0;B=n&o;for(let C=0;C<64;C+=4)O(this,Lt)?(O(this,Xe)?(k=300032,x=f[0]-1413257819,d=x-150054599<<0,s=x+24177077<<0):(k=704751109,x=f[0]-210244248,d=x-1521486534<<0,s=x+143694565<<0),F(this,Lt,!1)):(p=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),k=t&n,b=k^t&o^B,h=a&i^~a&c,x=d+m+h+xn[C]+f[C],y=p+b,d=s+x<<0,s=x+y<<0),p=(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10),m=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7),_=s&t,b=_^s&n^k,h=d&a^~d&i,x=c+m+h+xn[C+1]+f[C+1],y=p+b,c=o+x<<0,o=x+y<<0,p=(o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10),m=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),E=o&s,b=E^o&t^_,h=c&d^~c&a,x=i+m+h+xn[C+2]+f[C+2],y=p+b,i=n+x<<0,n=x+y<<0,p=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),B=n&o,b=B^n&s^E,h=i&c^~i&d,x=a+m+h+xn[C+3]+f[C+3],y=p+b,a=t+x<<0,t=x+y<<0;F(this,Ne,O(this,Ne)+t<<0),F(this,Ae,O(this,Ae)+n<<0),F(this,De,O(this,De)+o<<0),F(this,Fe,O(this,Fe)+s<<0),F(this,je,O(this,je)+a<<0),F(this,Re,O(this,Re)+i<<0),F(this,Ie,O(this,Ie)+c<<0),F(this,Le,O(this,Le)+d<<0)}hex(){this.finalize();const t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le);let f=T[t>>28&15]+T[t>>24&15]+T[t>>20&15]+T[t>>16&15]+T[t>>12&15]+T[t>>8&15]+T[t>>4&15]+T[t&15]+T[n>>28&15]+T[n>>24&15]+T[n>>20&15]+T[n>>16&15]+T[n>>12&15]+T[n>>8&15]+T[n>>4&15]+T[n&15]+T[o>>28&15]+T[o>>24&15]+T[o>>20&15]+T[o>>16&15]+T[o>>12&15]+T[o>>8&15]+T[o>>4&15]+T[o&15]+T[s>>28&15]+T[s>>24&15]+T[s>>20&15]+T[s>>16&15]+T[s>>12&15]+T[s>>8&15]+T[s>>4&15]+T[s&15]+T[a>>28&15]+T[a>>24&15]+T[a>>20&15]+T[a>>16&15]+T[a>>12&15]+T[a>>8&15]+T[a>>4&15]+T[a&15]+T[i>>28&15]+T[i>>24&15]+T[i>>20&15]+T[i>>16&15]+T[i>>12&15]+T[i>>8&15]+T[i>>4&15]+T[i&15]+T[c>>28&15]+T[c>>24&15]+T[c>>20&15]+T[c>>16&15]+T[c>>12&15]+T[c>>8&15]+T[c>>4&15]+T[c&15];return O(this,Xe)||(f+=T[d>>28&15]+T[d>>24&15]+T[d>>20&15]+T[d>>16&15]+T[d>>12&15]+T[d>>8&15]+T[d>>4&15]+T[d&15]),f}toString(){return this.hex()}digest(){this.finalize();const t=O(this,Ne),n=O(this,Ae),o=O(this,De),s=O(this,Fe),a=O(this,je),i=O(this,Re),c=O(this,Ie),d=O(this,Le),f=[t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,o>>24&255,o>>16&255,o>>8&255,o&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 O(this,Xe)||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(O(this,Xe)?28:32),n=new DataView(t);return n.setUint32(0,O(this,Ne)),n.setUint32(4,O(this,Ae)),n.setUint32(8,O(this,De)),n.setUint32(12,O(this,Fe)),n.setUint32(16,O(this,je)),n.setUint32(20,O(this,Re)),n.setUint32(24,O(this,Ie)),O(this,Xe)||n.setUint32(28,O(this,Le)),t}}ve=new WeakMap,at=new WeakMap,ke=new WeakMap,yt=new WeakMap,Lt=new WeakMap,Ne=new WeakMap,Ae=new WeakMap,De=new WeakMap,Fe=new WeakMap,je=new WeakMap,Re=new WeakMap,Ie=new WeakMap,Le=new WeakMap,st=new WeakMap,bt=new WeakMap,Xe=new WeakMap,En=new WeakMap,Ze=new WeakMap;function ru(r){const t=new nu;return t.update(r),parseInt(t.hex().substring(0,8),16)}const ou=function(r){var t="#";return r.forEach(function(n){n<16&&(t+=0),t+=n.toString(16)}),t},au=function(r,t,n){r/=360;var o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;return[r+1/3,r,r-1/3].map(function(a){return a<0&&a++,a>1&&a--,a<1/6?a=s+(o-s)*6*a:a<.5?a=o:a<2/3?a=s+(o-s)*6*(2/3-a):a=s,Math.round(a*255)})};class su{constructor(t={}){const[n,o]=[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=o,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=ru,typeof t.hash=="function"&&(this.hash=t.hash),t.hash==="bkdr"&&(this.hash=eu)}hsl(t){var n,o,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),o=this.S[a%this.S.length],a=Math.ceil(a/this.S.length),s=this.L[a%this.L.length],[n,o,s]}rgb(t){var n=this.hsl(t);return au.apply(this,n)}hex(t){var n=this.rgb(t);return ou(n)}}const iu=new su;function lu(r){const t=iu.hex(`abc${r}cba`);return cu(t.replace("#",""),-20)}function cu(r,t){let n=parseInt(r.substring(1,3),16),o=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);n=parseInt(n*(100+t)/100),o=parseInt(o*(100+t)/100),s=parseInt(s*(100+t)/100),n=n<255?n:255,o=o<255?o:255,s=s<255?s:255,n=Math.round(n),o=Math.round(o),s=Math.round(s);const a=n.toString(16).length==1?"0"+n.toString(16):n.toString(16),i=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+i+c}const Fa={strToHexColor:lu},du={key:0,class:"select-fields"},uu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code];if(t.field.label,i==null){n.value="<无>",o.value=!1;return}const c=await t.field.options();if(!c){n.value=`<未知: ${i}>`,o.value=!1;return}let d=[];if(t.field.multiple?d=c.filter(f=>i.includes(f.code)):d=c.filter(f=>i===f.code),d.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=d.map(f=>({bgColor:Fa.strToHexColor(`${f.code}-${f.name}`),code:f.code,name:f.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>o.value?(e.openBlock(),e.createElementBlock("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createBlock(e.unref(w.ElTooltip),{content:`${d.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${d.bgColor}`)},e.toDisplayString(d.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}},[["__scopeId","data-v-0f1a01e9"]]),fu={__name:"FieldEditor",props:{modelValue:[String,Number,Array],field:Object,type:String,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]);async function d(p){c.value=await a.field.options(a.formData,o,p)}function f(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),d(),(p,m)=>(e.openBlock(),e.createBlock(e.unref(w.ElSelect),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=b=>i.value=b),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,b=>(e.openBlock(),e.createBlock(e.unref(w.ElOption),{key:b.code,label:b.name,value:b.code,title:b.name,disabled:b.disabled},null,8,["label","value","title","disabled"]))),128))]),_:1},8,["modelValue","multiple","disabled"]))}};class pu extends ne{constructor(t,n){super(t,n),this.options=t.options||(()=>[{code:0,name:"未实现"}]),this.formChange=t.formChange||(()=>{}),this.display=uu,this.editor=fu,this.multiple=this.defaultBy(t.multiple,!1),this.checkValidProperties(t)}}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),mu={key:0},gu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",mu,e.toDisplayString(o.value),1))}},_u={__name:"FieldEditor",props:{modelValue:[Object,String,Number],field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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.type,clearable:"",disabled:o.disabled,onInput:a},null,8,["modelValue","type","disabled"]))}};class yu extends ne{constructor(t,n){super(t,n),this.display=gu,this.editor=_u,this.checkValidProperties(t)}}const bu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),wu={style:{display:"flex","align-items":"center"}},ku={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},emits:["enable"],setup(r,{emit:t}){const n=t,o=r,s=e.ref(o.row.deletedAt);function a(c,d){return c.label=d,new Promise((f,p)=>{n("enable",c)})}const i=e.computed(()=>o.row[o.field.code]);return(c,d)=>(e.openBlock(),e.createElementBlock("span",wu,[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(r.row,r.field.label)},null,8,["modelValue","disabled","before-change"])]))}},Eu={__name:"FieldEditor",props:{modelValue:Boolean,field:Object,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onChange:a},null,8,["modelValue","disabled"]))}};class xu extends ne{constructor(t,n){super(t,n),this.default=t.default||!1,this.display=ku,this.editor=Eu,this.checkValidProperties(t)}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"})),Su={key:0},Cu={__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref(!1),o=e.ref("..."),s=t.row[t.field.code];return s==null||`${s}`.trim()===""?n.value=!0:(o.value=s,n.value=!1),(a,i)=>n.value?(e.openBlock(),e.createBlock(we,{key:1})):(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(o.value),1))}},$u={__name:"FieldEditor",props:{modelValue:String,field:Object,type:String,disabled:Boolean},emits:["update:modelValue"],setup(r,{emit:t}){const n=t,o=r,s=e.reactive({value:o.modelValue});function a(){n("update:modelValue",s.value)}return e.watch(()=>o.modelValue,()=>{s.value=o.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:o.disabled,onInput:a},null,8,["modelValue","disabled"]))}};class Vu extends ne{constructor(t,n){super(t,n),this.display=Cu,this.editor=$u,this.checkValidProperties(t)}defaultConfig(){return{showInList:!1}}}const Ou=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Tu={key:0,class:"select-fields"},Nu=M({__name:"FieldDisplay",props:{field:{type:Object},row:{type:Object}},setup(r){const t=r,n=e.ref("..."),o=e.ref(!1),s=e.ref([]);async function a(){const i=t.row[t.field.code],c=t.field.label;if(i==null){n.value="<无>",o.value=!1;return}const d=await t.field.options();if(!d){n.value=`<未知: ${c}>`,o.value=!1;return}let f=[];if(t.field.multiple?f=d.filter(p=>i.includes(p.code)):f=d.filter(p=>i===p.code),f.length===0){n.value=`<未找到: ${i}>`,o.value=!1;return}s.value=f.map(p=>({bgColor:Fa.strToHexColor(`${p.code}-${p.name}`),code:p.code,name:p.name})),o.value=!0}return e.watch(()=>t.row,a,{immediate:!0}),(i,c)=>{const d=e.resolveComponent("el-tooltip");return o.value?(e.openBlock(),e.createElementBlock("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,f=>(e.openBlock(),e.createBlock(d,{content:`${f.code}`,placement:"top"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"select-field found",style:e.normalizeStyle(`background: ${f.bgColor}`)},e.toDisplayString(f.name),5)]),_:2},1032,["content"]))),256))])):(e.openBlock(),e.createBlock(we,{key:1,text:n.value},null,8,["text"]))}}},[["__scopeId","data-v-ed986acf"]]),Au={__name:"FieldEditor",props:{modelValue:Number,field:Object,disabled:Boolean,formData:Object},emits:["update:modelValue"],setup(r,{emit:t}){const n=G.useRoute(),o=re(n),s=t,a=r,i=e.reactive({value:a.modelValue}),c=e.ref([]),d={label:"name",children:"children",value:"id"};async function f(m){c.value=await a.field.options(a.formData,o,m)}function p(){s("update:modelValue",i.value)}return e.watch(()=>a.modelValue,()=>{i.value=a.modelValue},{immediate:!0}),f(),(m,b)=>(e.openBlock(),e.createBlock(e.unref(w.ElTreeSelect),{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=x=>i.value=x),style:{width:"100%"},data:c.value,props:d,"node-key":"id",multiple:a.field.multiple,"render-after-expand":!1,"show-checkbox":"","check-on-click-node":"","expand-on-click-node":!1,"default-expand-all":"","highlight-current":"",disabled:a.field.disabled,"check-strictly":!0,remote:"",filterable:"","remote-method":f,onCheck:p},null,8,["modelValue","data","multiple","disabled"]))}};class Du extends ne{constructor(t,n){super(t,n),this.options=t.options||(()=>[]),this.formChange=t.formChange||(()=>{}),this.multiple=this.defaultBy(t.multiple,!1),this.display=Nu,this.editor=Au,this.checkValidProperties(t)}}const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Du},Symbol.toStringTag,{value:"Module"})),ju=["src"],Ru=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImagesUploader",props:{images:{type:Array,default(){return[]}},limit:{type:Number},props:{type:Object,default(){return{listType:"picture-card",limit:5,accept:"image/*"}}}},emits:["on-remove","on-upload"],setup(r,{emit:t}){const n=t,o=e.ref(""),s=e.ref(!1),a=r,i=e.computed(()=>a.images.map(b=>{if(!(b!=null&&b.url))return{...b,name:"unknown",fileType:"unknown"};const x=b.url.substring(b.url.lastIndexOf(".")+1),y=b.url.split("/");return{...b,name:y[y.length-1],fileType:x}}));function c(b){n("on-remove",b)}function d(){w.ElMessage({message:`最多只能上传 ${a.props.limit} 个文件!`,type:"warning"})}function f(b){o.value=b.url,s.value=!0}function p(b){return b.size>5242880?(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1):!0}function m(b){const x=new FormData;x.append("file",b.file),n("on-upload",x)}return(b,x)=>(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":p,"http-request":m,"show-file-list":a.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":i.value.length>=a.props.limit}]),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"]))},{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(kr))]),_: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","limit","accept","list-type","show-file-list","class"]),e.createVNode(e.unref(w.ElDialog),{modelValue:s.value,"onUpdate:modelValue":x[1]||(x[1]=y=>s.value=y)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:o.value,alt:"Preview Image"},null,8,ju)]),_:1},8,["modelValue"])]))}},[["__scopeId","data-v-cb22ed8f"]])},Symbol.toStringTag,{value:"Module"})),Iu=["src"],Lu={class:"file-type"},Mu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__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(r,{emit:t}){const n=t,o=r,s=e.computed(()=>o.pics.map(h=>{const k=h.url.substring(h.url.lastIndexOf(".")+1);if(typeof h.name!==void 0)return h.fileType=k,h;if(h.url){const _=h.url.split("/");return{...h,name:_[_.length-1],fileType:k}}return{...h,name:h.id,fileType:k}})),a=e.ref(""),i=e.ref(!1);e.ref(o);const c=ot().fileUploadUrl;`${localStorage.getItem("token")}`;const d=h=>{const k=new FileReader;return k.readAsDataURL(h),new Promise(function(_,E){return h.type.startsWith("image/")?(k.onload=async B=>{const C=new Image;C.src=B.target.result,C.onload=()=>{const N=document.createElement("canvas"),D=N.getContext("2d");N.width=C.width,N.height=C.height,D.drawImage(C,0,0,N.width,N.height),N.toBlob(R=>{const Y=new File([R],h.name,{type:h.type,lastModified:Date.now()});_(Y)},h.type,.5)}},!1):(_(h),!1)})},f=h=>{n("on-remove",h)},p=()=>{w.ElMessage({message:`最多只能上传 ${o.props.limit} 个文件!`,type:"warning"})},m=h=>{a.value=h.url,i.value=!0},b=h=>{d(h).then(k=>k.size/1024/1024<5?(y(k),!1):(w.ElMessage({message:"上传大小不能超过 5MB!",type:"warning"}),!1))};function x(h,k){if(!h.name){w.ElMessage({message:"附件名称不能为空!",type:"warning"});return}n("on-change",h)}function y(h){return w.ElLoading.service({text:"上传中,请稍后",background:"rgba(0,0,0,0.3)"}),new Promise((k,_)=>{const E=new FormData;E.append("file",h),v.post(c,E,{}).then(B=>(w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),n("on-success",B.data.data),k(B.data),!1)).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),_("Upload failed")})})}return(h,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(w.ElUpload),{"file-list":s.value,action:e.unref(c),limit:o.props.limit,accept:o.props.accept,"list-type":o.props.listType,"on-remove":f,"before-upload":b,"on-exceed":p,"on-preview":m,multiple:!0,"http-request":()=>!1,"show-file-list":o.props.listType!=="text",class:e.normalizeClass(["upload-main",{"disable-upload":s.value.length>=o.props.limit}]),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[o.props.listType!=="text"?(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:0,disabled:!0},{default:e.withCtx(()=>[e.createVNode(e.unref(kr))]),_: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":k[1]||(k[1]=_=>i.value=_)},{default:e.withCtx(()=>[e.createElementVNode("img",{"w-full":"",src:a.value,alt:"Preview Image"},null,8,Iu)]),_:1},8,["modelValue"]),o.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,(_,E)=>(e.openBlock(),e.createBlock(e.unref(w.ElFormItem),{key:E,class:"file-list"},{default:e.withCtx(()=>[e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:14},{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1}),e.createVNode(e.unref(w.ElInput),{modelValue:_.name,"onUpdate:modelValue":B=>_.name=B,onChange:B=>x(_)},null,8,["modelValue","onUpdate:modelValue","onChange"]),e.createElementVNode("span",Lu,"."+e.toDisplayString(_.fileType),1),e.createVNode(e.unref(w.ElIcon),{color:"#73767a",size:12,onClick:B=>f(_)},{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-c3169746"]])},Symbol.toStringTag,{value:"Module"})),Uu={class:"image-slot"},zu=Object.freeze(Object.defineProperty({__proto__:null,default:M({__name:"ImageUploader",props:{imageUrl:{type:String}},emits:["on-success"],setup(r,{emit:t}){const n=t,o=r,s=ot().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((p,m)=>{const b=new FormData;b.append("image",f.file),v.post(s,b,{}).then(x=>{w.ElLoading.service().close(),w.ElMessage({message:"上传成功",type:"success"}),p(x.data)}).catch(()=>{w.ElLoading.service().close(),w.ElMessage({message:"上传失败",type:"warning"}),m("Upload failed")})})}return(f,p)=>(e.openBlock(),e.createBlock(e.unref(w.ElUpload),{class:"image-uploader",action:e.unref(s),name:"image","show-file-list":!1,"on-success":i,"before-upload":a,"http-request":d},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"default",{},void 0,!0),o.imageUrl?(e.openBlock(),e.createBlock(e.unref(w.ElImage),{key:0,class:"image",src:o.imageUrl,fit:"scale-down"},{placeholder:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(e.unref(w.ElIcon),{class:"placeholder-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ga))]),_:1})])]),_:1},8,["src"])):(e.openBlock(),e.createBlock(e.unref(w.ElIcon),{key:1,class:"uploader-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(kr))]),_:1})),o.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(Zi))]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["action"]))}},[["__scopeId","data-v-ae965bb4"]])},Symbol.toStringTag,{value:"Module"}));var Me=-1,xe=1,fe=0;function Mt(r,t,n,o){if(r===t)return r?[[fe,r]]:[];if(n!=null){var s=Gu(r,t,n);if(s)return s}var a=Sr(r,t),i=r.substring(0,a);r=r.substring(a),t=t.substring(a),a=Cr(r,t);var c=r.substring(r.length-a);r=r.substring(0,r.length-a),t=t.substring(0,t.length-a);var d=Hu(r,t);return i&&d.unshift([fe,i]),c&&d.push([fe,c]),Ra(d,o),d}function Hu(r,t){var n;if(!r)return[[xe,t]];if(!t)return[[Me,r]];var o=r.length>t.length?r:t,s=r.length>t.length?t:r,a=o.indexOf(s);if(a!==-1)return n=[[xe,o.substring(0,a)],[fe,s],[xe,o.substring(a+s.length)]],r.length>t.length&&(n[0][0]=n[2][0]=Me),n;if(s.length===1)return[[Me,r],[xe,t]];var i=Pu(r,t);if(i){var c=i[0],d=i[1],f=i[2],p=i[3],m=i[4],b=Mt(c,f),x=Mt(d,p);return b.concat([[fe,m]],x)}return qu(r,t)}function qu(r,t){for(var n=r.length,o=t.length,s=Math.ceil((n+o)/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 p=n-o,m=p%2!==0,b=0,x=0,y=0,h=0,k=0;k<s;k++){for(var _=-k+b;_<=k-x;_+=2){var E=a+_,B;_===-k||_!==k&&c[E-1]<c[E+1]?B=c[E+1]:B=c[E-1]+1;for(var C=B-_;B<n&&C<o&&r.charAt(B)===t.charAt(C);)B++,C++;if(c[E]=B,B>n)x+=2;else if(C>o)b+=2;else if(m){var N=a+p-_;if(N>=0&&N<i&&d[N]!==-1){var D=n-d[N];if(B>=D)return ja(r,t,B,C)}}}for(var R=-k+y;R<=k-h;R+=2){var N=a+R,D;R===-k||R!==k&&d[N-1]<d[N+1]?D=d[N+1]:D=d[N-1]+1;for(var Y=D-R;D<n&&Y<o&&r.charAt(n-D-1)===t.charAt(o-Y-1);)D++,Y++;if(d[N]=D,D>n)h+=2;else if(Y>o)y+=2;else if(!m){var E=a+p-R;if(E>=0&&E<i&&c[E]!==-1){var B=c[E],C=a+B-E;if(D=n-D,B>=D)return ja(r,t,B,C)}}}}return[[Me,r],[xe,t]]}function ja(r,t,n,o){var s=r.substring(0,n),a=t.substring(0,o),i=r.substring(n),c=t.substring(o),d=Mt(s,a),f=Mt(i,c);return d.concat(f)}function Sr(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(a,s)==t.substring(a,s)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return Ia(r.charCodeAt(s-1))&&s--,s}function Cr(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var n=0,o=Math.min(r.length,t.length),s=o,a=0;n<s;)r.substring(r.length-s,r.length-a)==t.substring(t.length-s,t.length-a)?(n=s,a=n):o=s,s=Math.floor((o-n)/2+n);return La(r.charCodeAt(r.length-s))&&s--,s}function Pu(r,t){var n=r.length>t.length?r:t,o=r.length>t.length?t:r;if(n.length<4||o.length*2<n.length)return null;function s(x,y,h){for(var k=x.substring(h,h+Math.floor(x.length/4)),_=-1,E="",B,C,N,D;(_=y.indexOf(k,_+1))!==-1;){var R=Sr(x.substring(h),y.substring(_)),Y=Cr(x.substring(0,h),y.substring(0,_));E.length<Y+R&&(E=y.substring(_-Y,_)+y.substring(_,_+R),B=x.substring(0,h-Y),C=x.substring(h+R),N=y.substring(0,_-Y),D=y.substring(_+R))}return E.length*2>=x.length?[B,C,N,D,E]:null}var a=s(n,o,Math.ceil(n.length/4)),i=s(n,o,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,p,m;r.length>t.length?(d=c[0],f=c[1],p=c[2],m=c[3]):(p=c[0],m=c[1],d=c[2],f=c[3]);var b=c[4];return[d,f,p,m,b]}function Ra(r,t){r.push([fe,""]);for(var n=0,o=0,s=0,a="",i="",c;n<r.length;){if(n<r.length-1&&!r[n][1]){r.splice(n,1);continue}switch(r[n][0]){case xe:s++,i+=r[n][1],n++;break;case Me:o++,a+=r[n][1],n++;break;case fe:var d=n-s-o-1;if(t){if(d>=0&&Ua(r[d][1])){var f=r[d][1].slice(-1);if(r[d][1]=r[d][1].slice(0,-1),a=f+a,i=f+i,!r[d][1]){r.splice(d,1),n--;var p=d-1;r[p]&&r[p][0]===xe&&(s++,i=r[p][1]+i,p--),r[p]&&r[p][0]===Me&&(o++,a=r[p][1]+a,p--),d=p}}if(Ma(r[n][1])){var f=r[n][1].charAt(0);r[n][1]=r[n][1].slice(1),a+=f,i+=f}}if(n<r.length-1&&!r[n][1]){r.splice(n,1);break}if(a.length>0||i.length>0){a.length>0&&i.length>0&&(c=Sr(i,a),c!==0&&(d>=0?r[d][1]+=i.substring(0,c):(r.splice(0,0,[fe,i.substring(0,c)]),n++),i=i.substring(c),a=a.substring(c)),c=Cr(i,a),c!==0&&(r[n][1]=i.substring(i.length-c)+r[n][1],i=i.substring(0,i.length-c),a=a.substring(0,a.length-c)));var m=s+o;a.length===0&&i.length===0?(r.splice(n-m,m),n=n-m):a.length===0?(r.splice(n-m,m,[xe,i]),n=n-m+1):i.length===0?(r.splice(n-m,m,[Me,a]),n=n-m+1):(r.splice(n-m,m,[Me,a],[xe,i]),n=n-m+2)}n!==0&&r[n-1][0]===fe?(r[n-1][1]+=r[n][1],r.splice(n,1)):n++,s=0,o=0,a="",i="";break}}r[r.length-1][1]===""&&r.pop();var b=!1;for(n=1;n<r.length-1;)r[n-1][0]===fe&&r[n+1][0]===fe&&(r[n][1].substring(r[n][1].length-r[n-1][1].length)===r[n-1][1]?(r[n][1]=r[n-1][1]+r[n][1].substring(0,r[n][1].length-r[n-1][1].length),r[n+1][1]=r[n-1][1]+r[n+1][1],r.splice(n-1,1),b=!0):r[n][1].substring(0,r[n+1][1].length)==r[n+1][1]&&(r[n-1][1]+=r[n+1][1],r[n][1]=r[n][1].substring(r[n+1][1].length)+r[n+1][1],r.splice(n+1,1),b=!0)),n++;b&&Ra(r,t)}function Ia(r){return r>=55296&&r<=56319}function La(r){return r>=56320&&r<=57343}function Ma(r){return La(r.charCodeAt(0))}function Ua(r){return Ia(r.charCodeAt(r.length-1))}function Wu(r){for(var t=[],n=0;n<r.length;n++)r[n][1].length>0&&t.push(r[n]);return t}function $r(r,t,n,o){return Ua(r)||Ma(o)?null:Wu([[fe,r],[Me,t],[xe,n],[fe,o]])}function Gu(r,t,n){var o=typeof n=="number"?{index:n,length:0}:n.oldRange,s=typeof n=="number"?null:n.newRange,a=r.length,i=t.length;if(o.length===0&&(s===null||s.length===0)){var c=o.index,d=r.slice(0,c),f=r.slice(c),p=s?s.index:null;e:{var m=c+i-a;if(p!==null&&p!==m||m<0||m>i)break e;var b=t.slice(0,m),x=t.slice(m);if(x!==f)break e;var y=Math.min(c,m),h=d.slice(0,y),k=b.slice(0,y);if(h!==k)break e;var _=d.slice(y),E=b.slice(y);return $r(h,_,E,f)}e:{if(p!==null&&p!==c)break e;var B=c,b=t.slice(0,B),x=t.slice(B);if(b!==d)break e;var C=Math.min(a-B,i-B),N=f.slice(f.length-C),D=x.slice(x.length-C);if(N!==D)break e;var _=f.slice(0,f.length-C),E=x.slice(0,x.length-C);return $r(d,_,E,N)}}if(o.length>0&&s&&s.length===0)e:{var h=r.slice(0,o.index),N=r.slice(o.index+o.length),y=h.length,C=N.length;if(i<y+C)break e;var k=t.slice(0,y),D=t.slice(i-C);if(h!==k||N!==D)break e;var _=r.slice(y,a-C),E=t.slice(y,i-C);return $r(h,_,E,N)}return null}function Bn(r,t,n){return Mt(r,t,n,!0)}Bn.INSERT=xe,Bn.DELETE=Me,Bn.EQUAL=fe;var Qu=Bn,Sn={exports:{}};Sn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",b="[object Map]",x="[object Number]",y="[object Object]",h="[object Promise]",k="[object RegExp]",_="[object Set]",E="[object String]",B="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",D="[object DataView]",R="[object Float32Array]",Y="[object Float64Array]",et="[object Int8Array]",Ue="[object Int16Array]",V="[object Int32Array]",I="[object Uint8Array]",K="[object Uint8ClampedArray]",L="[object Uint16Array]",P="[object Uint32Array]",de=/[\\^$.*+?()[\]{}|]/g,ye=/\w*$/,Nr=/^\[object .+?Constructor\]$/,Ar=/^(?:0|[1-9]\d*)$/,Q={};Q[a]=Q[i]=Q[N]=Q[D]=Q[c]=Q[d]=Q[R]=Q[Y]=Q[et]=Q[Ue]=Q[V]=Q[b]=Q[x]=Q[y]=Q[k]=Q[_]=Q[E]=Q[B]=Q[I]=Q[K]=Q[L]=Q[P]=!0,Q[f]=Q[p]=Q[C]=!1;var Dr=typeof te=="object"&&te&&te.Object===Object&&te,Fr=typeof self=="object"&&self&&self.Object===Object&&self,Be=Dr||Fr||Function("return this")(),Tn=t&&!t.nodeType&&t,J=Tn&&!0&&r&&!r.nodeType&&r,Nn=J&&J.exports===Tn;function jr(l,u){return l.set(u[0],u[1]),l}function Se(l,u){return l.add(u),l}function An(l,u){for(var g=-1,S=l?l.length:0;++g<S&&u(l[g],g,l)!==!1;);return l}function Dn(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function Ht(l,u,g,S){for(var j=-1,A=l?l.length:0;++j<A;)g=u(g,l[j],j,l);return g}function qt(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Fn(l,u){return l==null?void 0:l[u]}function Pt(l){var u=!1;if(l!=null&&typeof l.toString!="function")try{u=!!(l+"")}catch{}return u}function jn(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Wt(l,u){return function(g){return l(u(g))}}function Rn(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var Rr=Array.prototype,Ir=Function.prototype,wt=Object.prototype,Gt=Be["__core-js_shared__"],In=function(){var l=/[^.]+$/.exec(Gt&&Gt.keys&&Gt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Ln=Ir.toString,ze=wt.hasOwnProperty,kt=wt.toString,Lr=RegExp("^"+Ln.call(ze).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),it=Nn?Be.Buffer:void 0,Et=Be.Symbol,Qt=Be.Uint8Array,be=Wt(Object.getPrototypeOf,Object),Mn=Object.create,Un=wt.propertyIsEnumerable,Mr=Rr.splice,Jt=Object.getOwnPropertySymbols,xt=it?it.isBuffer:void 0,zn=Wt(Object.keys,Object),Bt=$e(Be,"DataView"),lt=$e(Be,"Map"),Ce=$e(Be,"Promise"),St=$e(Be,"Set"),Kt=$e(Be,"WeakMap"),ct=$e(Object,"create"),Yt=ue(Bt),dt=ue(lt),vt=ue(Ce),Xt=ue(St),Zt=ue(Kt),tt=Et?Et.prototype:void 0,Hn=tt?tt.valueOf:void 0;function We(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Ur(){this.__data__=ct?ct(null):{}}function zr(l){return this.has(l)&&delete this.__data__[l]}function Hr(l){var u=this.__data__;if(ct){var g=u[l];return g===o?void 0:g}return ze.call(u,l)?u[l]:void 0}function qn(l){var u=this.__data__;return ct?u[l]!==void 0:ze.call(u,l)}function en(l,u){var g=this.__data__;return g[l]=ct&&u===void 0?o:u,this}We.prototype.clear=Ur,We.prototype.delete=zr,We.prototype.get=Hr,We.prototype.has=qn,We.prototype.set=en;function ae(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=[]}function Pr(l){var u=this.__data__,g=$t(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():Mr.call(u,g,1),!0}function Wr(l){var u=this.__data__,g=$t(u,l);return g<0?void 0:u[g][1]}function Gr(l){return $t(this.__data__,l)>-1}function Qr(l,u){var g=this.__data__,S=$t(g,l);return S<0?g.push([l,u]):g[S][1]=u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l?l.length:0;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__={hash:new We,map:new(lt||ae),string:new We}}function Kr(l){return ft(this,l).delete(l)}function Yr(l){return ft(this,l).get(l)}function vr(l){return ft(this,l).has(l)}function Xr(l,u){return ft(this,l).set(l,u),this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){this.__data__=new ae(l)}function Zr(){this.__data__=new ae}function eo(l){return this.__data__.delete(l)}function to(l){return this.__data__.get(l)}function no(l){return this.__data__.has(l)}function ro(l,u){var g=this.__data__;if(g instanceof ae){var S=g.__data__;if(!lt||S.length<n-1)return S.push([l,u]),this;g=this.__data__=new ie(S)}return g.set(l,u),this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l,u){var g=on(l)||Ot(l)?qt(l.length,String):[],S=g.length,j=!!S;for(var A in l)ze.call(l,A)&&!(j&&(A=="length"||yo(A,S)))&&g.push(A);return g}function Pn(l,u,g){var S=l[u];(!(ze.call(l,u)&&Kn(S,g))||g===void 0&&!(u in l))&&(l[u]=g)}function $t(l,u){for(var g=l.length;g--;)if(Kn(l[g][0],u))return g;return-1}function He(l,u){return l&&rn(u,sn(u),l)}function tn(l,u,g,S,j,A,H){var z;if(S&&(z=A?S(l,j,A,H):S(l)),z!==void 0)return z;if(!Pe(l))return l;var X=on(l);if(X){if(z=go(l),!u)return po(l,z)}else{var W=Qe(l),le=W==p||W==m;if(Yn(l))return Vt(l,u);if(W==y||W==a||le&&!A){if(Pt(l))return A?l:{};if(z=qe(le?{}:l),!u)return ho(l,He(z,l))}else{if(!Q[W])return A?l:{};z=_o(l,W,tn,u)}}H||(H=new pe);var he=H.get(l);if(he)return he;if(H.set(l,z),!X)var Z=g?mo(l):sn(l);return An(Z||l,function(ce,se){Z&&(se=ce,ce=l[se]),Pn(z,se,tn(ce,u,g,S,se,l,H))}),z}function oo(l){return Pe(l)?Mn(l):{}}function ao(l,u,g){var S=u(l);return on(l)?S:Dn(S,g(l))}function so(l){return kt.call(l)}function io(l){if(!Pe(l)||wo(l))return!1;var u=an(l)||Pt(l)?Lr:Nr;return u.test(ue(l))}function lo(l){if(!Qn(l))return zn(l);var u=[];for(var g in Object(l))ze.call(l,g)&&g!="constructor"&&u.push(g);return u}function Vt(l,u){if(u)return l.slice();var g=new l.constructor(l.length);return l.copy(g),g}function nn(l){var u=new l.constructor(l.byteLength);return new Qt(u).set(new Qt(l)),u}function ut(l,u){var g=u?nn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function Wn(l,u,g){var S=u?g(jn(l),!0):jn(l);return Ht(S,jr,new l.constructor)}function Gn(l){var u=new l.constructor(l.source,ye.exec(l));return u.lastIndex=l.lastIndex,u}function co(l,u,g){var S=u?g(Rn(l),!0):Rn(l);return Ht(S,Se,new l.constructor)}function uo(l){return Hn?Object(Hn.call(l)):{}}function fo(l,u){var g=u?nn(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function po(l,u){var g=-1,S=l.length;for(u||(u=Array(S));++g<S;)u[g]=l[g];return u}function rn(l,u,g,S){g||(g={});for(var j=-1,A=u.length;++j<A;){var H=u[j],z=void 0;Pn(g,H,z===void 0?l[H]:z)}return g}function ho(l,u){return rn(l,Ge(l),u)}function mo(l){return ao(l,sn,Ge)}function ft(l,u){var g=l.__data__;return bo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function $e(l,u){var g=Fn(l,u);return io(g)?g:void 0}var Ge=Jt?Wt(Jt,Object):Eo,Qe=so;(Bt&&Qe(new Bt(new ArrayBuffer(1)))!=D||lt&&Qe(new lt)!=b||Ce&&Qe(Ce.resolve())!=h||St&&Qe(new St)!=_||Kt&&Qe(new Kt)!=C)&&(Qe=function(l){var u=kt.call(l),g=u==y?l.constructor:void 0,S=g?ue(g):void 0;if(S)switch(S){case Yt:return D;case dt:return b;case vt:return h;case Xt:return _;case Zt:return C}return u});function go(l){var u=l.length,g=l.constructor(u);return u&&typeof l[0]=="string"&&ze.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function qe(l){return typeof l.constructor=="function"&&!Qn(l)?oo(be(l)):{}}function _o(l,u,g,S){var j=l.constructor;switch(u){case N:return nn(l);case c:case d:return new j(+l);case D:return ut(l,S);case R:case Y:case et:case Ue:case V:case I:case K:case L:case P:return fo(l,S);case b:return Wn(l,S,g);case x:case E:return new j(l);case k:return Gn(l);case _:return co(l,S,g);case B:return uo(l)}}function yo(l,u){return u=u??s,!!u&&(typeof l=="number"||Ar.test(l))&&l>-1&&l%1==0&&l<u}function bo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function wo(l){return!!In&&In in l}function Qn(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||wt;return l===g}function ue(l){if(l!=null){try{return Ln.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l){return tn(l,!0,!0)}function Kn(l,u){return l===u||l!==l&&u!==u}function Ot(l){return ko(l)&&ze.call(l,"callee")&&(!Un.call(l,"callee")||kt.call(l)==a)}var on=Array.isArray;function Tt(l){return l!=null&&vn(l.length)&&!an(l)}function ko(l){return Xn(l)&&Tt(l)}var Yn=xt||xo;function an(l){var u=Pe(l)?kt.call(l):"";return u==p||u==m}function vn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Pe(l){var u=typeof l;return!!l&&(u=="object"||u=="function")}function Xn(l){return!!l&&typeof l=="object"}function sn(l){return Tt(l)?Ct(l):lo(l)}function Eo(){return[]}function xo(){return!1}r.exports=Jn}(Sn,Sn.exports);var za=Sn.exports,Cn={exports:{}};Cn.exports,function(r,t){var n=200,o="__lodash_hash_undefined__",s=1,a=2,i=9007199254740991,c="[object Arguments]",d="[object Array]",f="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",b="[object Error]",x="[object Function]",y="[object GeneratorFunction]",h="[object Map]",k="[object Number]",_="[object Null]",E="[object Object]",B="[object Promise]",C="[object Proxy]",N="[object RegExp]",D="[object Set]",R="[object String]",Y="[object Symbol]",et="[object Undefined]",Ue="[object WeakMap]",V="[object ArrayBuffer]",I="[object DataView]",K="[object Float32Array]",L="[object Float64Array]",P="[object Int8Array]",de="[object Int16Array]",ye="[object Int32Array]",Nr="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Q="[object Uint16Array]",Dr="[object Uint32Array]",Fr=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,Tn=/^(?:0|[1-9]\d*)$/,J={};J[K]=J[L]=J[P]=J[de]=J[ye]=J[Nr]=J[Ar]=J[Q]=J[Dr]=!0,J[c]=J[d]=J[V]=J[p]=J[I]=J[m]=J[b]=J[x]=J[h]=J[k]=J[E]=J[N]=J[D]=J[R]=J[Ue]=!1;var Nn=typeof te=="object"&&te&&te.Object===Object&&te,jr=typeof self=="object"&&self&&self.Object===Object&&self,Se=Nn||jr||Function("return this")(),An=t&&!t.nodeType&&t,Dn=An&&!0&&r&&!r.nodeType&&r,Ht=Dn&&Dn.exports===An,qt=Ht&&Nn.process,Fn=function(){try{return qt&&qt.binding&&qt.binding("util")}catch{}}(),Pt=Fn&&Fn.isTypedArray;function jn(l,u){for(var g=-1,S=l==null?0:l.length,j=0,A=[];++g<S;){var H=l[g];u(H,g,l)&&(A[j++]=H)}return A}function Wt(l,u){for(var g=-1,S=u.length,j=l.length;++g<S;)l[j+g]=u[g];return l}function Rn(l,u){for(var g=-1,S=l==null?0:l.length;++g<S;)if(u(l[g],g,l))return!0;return!1}function Rr(l,u){for(var g=-1,S=Array(l);++g<l;)S[g]=u(g);return S}function Ir(l){return function(u){return l(u)}}function wt(l,u){return l.has(u)}function Gt(l,u){return l==null?void 0:l[u]}function In(l){var u=-1,g=Array(l.size);return l.forEach(function(S,j){g[++u]=[j,S]}),g}function Ln(l,u){return function(g){return l(u(g))}}function ze(l){var u=-1,g=Array(l.size);return l.forEach(function(S){g[++u]=S}),g}var kt=Array.prototype,Lr=Function.prototype,it=Object.prototype,Et=Se["__core-js_shared__"],Qt=Lr.toString,be=it.hasOwnProperty,Mn=function(){var l=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}(),Un=it.toString,Mr=RegExp("^"+Qt.call(be).replace(Fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jt=Ht?Se.Buffer:void 0,xt=Se.Symbol,zn=Se.Uint8Array,Bt=it.propertyIsEnumerable,lt=kt.splice,Ce=xt?xt.toStringTag:void 0,St=Object.getOwnPropertySymbols,Kt=Jt?Jt.isBuffer:void 0,ct=Ln(Object.keys,Object),Yt=Ge(Se,"DataView"),dt=Ge(Se,"Map"),vt=Ge(Se,"Promise"),Xt=Ge(Se,"Set"),Zt=Ge(Se,"WeakMap"),tt=Ge(Object,"create"),Hn=ue(Yt),We=ue(dt),Ur=ue(vt),zr=ue(Xt),Hr=ue(Zt),qn=xt?xt.prototype:void 0,en=qn?qn.valueOf:void 0;function ae(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function qr(){this.__data__=tt?tt(null):{},this.size=0}function Pr(l){var u=this.has(l)&&delete this.__data__[l];return this.size-=u?1:0,u}function Wr(l){var u=this.__data__;if(tt){var g=u[l];return g===o?void 0:g}return be.call(u,l)?u[l]:void 0}function Gr(l){var u=this.__data__;return tt?u[l]!==void 0:be.call(u,l)}function Qr(l,u){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=tt&&u===void 0?o:u,this}ae.prototype.clear=qr,ae.prototype.delete=Pr,ae.prototype.get=Wr,ae.prototype.has=Gr,ae.prototype.set=Qr;function ie(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Jr(){this.__data__=[],this.size=0}function Kr(l){var u=this.__data__,g=Vt(u,l);if(g<0)return!1;var S=u.length-1;return g==S?u.pop():lt.call(u,g,1),--this.size,!0}function Yr(l){var u=this.__data__,g=Vt(u,l);return g<0?void 0:u[g][1]}function vr(l){return Vt(this.__data__,l)>-1}function Xr(l,u){var g=this.__data__,S=Vt(g,l);return S<0?(++this.size,g.push([l,u])):g[S][1]=u,this}ie.prototype.clear=Jr,ie.prototype.delete=Kr,ie.prototype.get=Yr,ie.prototype.has=vr,ie.prototype.set=Xr;function pe(l){var u=-1,g=l==null?0:l.length;for(this.clear();++u<g;){var S=l[u];this.set(S[0],S[1])}}function Zr(){this.size=0,this.__data__={hash:new ae,map:new(dt||ie),string:new ae}}function eo(l){var u=$e(this,l).delete(l);return this.size-=u?1:0,u}function to(l){return $e(this,l).get(l)}function no(l){return $e(this,l).has(l)}function ro(l,u){var g=$e(this,l),S=g.size;return g.set(l,u),this.size+=g.size==S?0:1,this}pe.prototype.clear=Zr,pe.prototype.delete=eo,pe.prototype.get=to,pe.prototype.has=no,pe.prototype.set=ro;function Ct(l){var u=-1,g=l==null?0:l.length;for(this.__data__=new pe;++u<g;)this.add(l[u])}function Pn(l){return this.__data__.set(l,o),this}function $t(l){return this.__data__.has(l)}Ct.prototype.add=Ct.prototype.push=Pn,Ct.prototype.has=$t;function He(l){var u=this.__data__=new ie(l);this.size=u.size}function tn(){this.__data__=new ie,this.size=0}function oo(l){var u=this.__data__,g=u.delete(l);return this.size=u.size,g}function ao(l){return this.__data__.get(l)}function so(l){return this.__data__.has(l)}function io(l,u){var g=this.__data__;if(g instanceof ie){var S=g.__data__;if(!dt||S.length<n-1)return S.push([l,u]),this.size=++g.size,this;g=this.__data__=new pe(S)}return g.set(l,u),this.size=g.size,this}He.prototype.clear=tn,He.prototype.delete=oo,He.prototype.get=ao,He.prototype.has=so,He.prototype.set=io;function lo(l,u){var g=Ot(l),S=!g&&Kn(l),j=!g&&!S&&Tt(l),A=!g&&!S&&!j&&Xn(l),H=g||S||j||A,z=H?Rr(l.length,String):[],X=z.length;for(var W in l)be.call(l,W)&&!(H&&(W=="length"||j&&(W=="offset"||W=="parent")||A&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||_o(W,X)))&&z.push(W);return z}function Vt(l,u){for(var g=l.length;g--;)if(Jn(l[g][0],u))return g;return-1}function nn(l,u,g){var S=u(l);return Ot(l)?S:Wt(S,g(l))}function ut(l){return l==null?l===void 0?et:_:Ce&&Ce in Object(l)?Qe(l):Qn(l)}function Wn(l){return Pe(l)&&ut(l)==c}function Gn(l,u,g,S,j){return l===u?!0:l==null||u==null||!Pe(l)&&!Pe(u)?l!==l&&u!==u:co(l,u,g,S,Gn,j)}function co(l,u,g,S,j,A){var H=Ot(l),z=Ot(u),X=H?d:qe(l),W=z?d:qe(u);X=X==c?E:X,W=W==c?E:W;var le=X==E,he=W==E,Z=X==W;if(Z&&Tt(l)){if(!Tt(u))return!1;H=!0,le=!1}if(Z&&!le)return A||(A=new He),H||Xn(l)?rn(l,u,g,S,j,A):ho(l,u,X,g,S,j,A);if(!(g&s)){var ce=le&&be.call(l,"__wrapped__"),se=he&&be.call(u,"__wrapped__");if(ce||se){var nt=ce?l.value():l,Je=se?u.value():u;return A||(A=new He),j(nt,Je,g,S,A)}}return Z?(A||(A=new He),mo(l,u,g,S,j,A)):!1}function uo(l){if(!vn(l)||bo(l))return!1;var u=Yn(l)?Mr:Be;return u.test(ue(l))}function fo(l){return Pe(l)&&an(l.length)&&!!J[ut(l)]}function po(l){if(!wo(l))return ct(l);var u=[];for(var g in Object(l))be.call(l,g)&&g!="constructor"&&u.push(g);return u}function rn(l,u,g,S,j,A){var H=g&s,z=l.length,X=u.length;if(z!=X&&!(H&&X>z))return!1;var W=A.get(l);if(W&&A.get(u))return W==u;var le=-1,he=!0,Z=g&a?new Ct:void 0;for(A.set(l,u),A.set(u,l);++le<z;){var ce=l[le],se=u[le];if(S)var nt=H?S(se,ce,le,u,l,A):S(ce,se,le,l,u,A);if(nt!==void 0){if(nt)continue;he=!1;break}if(Z){if(!Rn(u,function(Je,pt){if(!wt(Z,pt)&&(ce===Je||j(ce,Je,g,S,A)))return Z.push(pt)})){he=!1;break}}else if(!(ce===se||j(ce,se,g,S,A))){he=!1;break}}return A.delete(l),A.delete(u),he}function ho(l,u,g,S,j,A,H){switch(g){case I:if(l.byteLength!=u.byteLength||l.byteOffset!=u.byteOffset)return!1;l=l.buffer,u=u.buffer;case V:return!(l.byteLength!=u.byteLength||!A(new zn(l),new zn(u)));case p:case m:case k:return Jn(+l,+u);case b:return l.name==u.name&&l.message==u.message;case N:case R:return l==u+"";case h:var z=In;case D:var X=S&s;if(z||(z=ze),l.size!=u.size&&!X)return!1;var W=H.get(l);if(W)return W==u;S|=a,H.set(l,u);var le=rn(z(l),z(u),S,j,A,H);return H.delete(l),le;case Y:if(en)return en.call(l)==en.call(u)}return!1}function mo(l,u,g,S,j,A){var H=g&s,z=ft(l),X=z.length,W=ft(u),le=W.length;if(X!=le&&!H)return!1;for(var he=X;he--;){var Z=z[he];if(!(H?Z in u:be.call(u,Z)))return!1}var ce=A.get(l);if(ce&&A.get(u))return ce==u;var se=!0;A.set(l,u),A.set(u,l);for(var nt=H;++he<X;){Z=z[he];var Je=l[Z],pt=u[Z];if(S)var Ja=H?S(pt,Je,Z,u,l,A):S(Je,pt,Z,l,u,A);if(!(Ja===void 0?Je===pt||j(Je,pt,g,S,A):Ja)){se=!1;break}nt||(nt=Z=="constructor")}if(se&&!nt){var Zn=l.constructor,er=u.constructor;Zn!=er&&"constructor"in l&&"constructor"in u&&!(typeof Zn=="function"&&Zn instanceof Zn&&typeof er=="function"&&er instanceof er)&&(se=!1)}return A.delete(l),A.delete(u),se}function ft(l){return nn(l,sn,go)}function $e(l,u){var g=l.__data__;return yo(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Ge(l,u){var g=Gt(l,u);return uo(g)?g:void 0}function Qe(l){var u=be.call(l,Ce),g=l[Ce];try{l[Ce]=void 0;var S=!0}catch{}var j=Un.call(l);return S&&(u?l[Ce]=g:delete l[Ce]),j}var go=St?function(l){return l==null?[]:(l=Object(l),jn(St(l),function(u){return Bt.call(l,u)}))}:Eo,qe=ut;(Yt&&qe(new Yt(new ArrayBuffer(1)))!=I||dt&&qe(new dt)!=h||vt&&qe(vt.resolve())!=B||Xt&&qe(new Xt)!=D||Zt&&qe(new Zt)!=Ue)&&(qe=function(l){var u=ut(l),g=u==E?l.constructor:void 0,S=g?ue(g):"";if(S)switch(S){case Hn:return I;case We:return h;case Ur:return B;case zr:return D;case Hr:return Ue}return u});function _o(l,u){return u=u??i,!!u&&(typeof l=="number"||Tn.test(l))&&l>-1&&l%1==0&&l<u}function yo(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function bo(l){return!!Mn&&Mn in l}function wo(l){var u=l&&l.constructor,g=typeof u=="function"&&u.prototype||it;return l===g}function Qn(l){return Un.call(l)}function ue(l){if(l!=null){try{return Qt.call(l)}catch{}try{return l+""}catch{}}return""}function Jn(l,u){return l===u||l!==l&&u!==u}var Kn=Wn(function(){return arguments}())?Wn:function(l){return Pe(l)&&be.call(l,"callee")&&!Bt.call(l,"callee")},Ot=Array.isArray;function on(l){return l!=null&&an(l.length)&&!Yn(l)}var Tt=Kt||xo;function ko(l,u){return Gn(l,u)}function Yn(l){if(!vn(l))return!1;var u=ut(l);return u==x||u==y||u==f||u==C}function an(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=i}function vn(l){var u=typeof l;return l!=null&&(u=="object"||u=="function")}function Pe(l){return l!=null&&typeof l=="object"}var Xn=Pt?Ir(Pt):fo;function sn(l){return on(l)?lo(l):po(l)}function Eo(){return[]}function xo(){return!1}r.exports=ko}(Cn,Cn.exports);var Ha=Cn.exports,Vr={},qa=te&&te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vr,"__esModule",{value:!0});var Ju=qa(za),Ku=qa(Ha),Or;(function(r){function t(a,i,c){a===void 0&&(a={}),i===void 0&&(i={}),typeof a!="object"&&(a={}),typeof i!="object"&&(i={});var d=Ju.default(i);c||(d=Object.keys(d).reduce(function(p,m){return d[m]!=null&&(p[m]=d[m]),p},{}));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}r.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 Ku.default(a[f],i[f])||(d[f]=i[f]===void 0?null:i[f]),d},{});return Object.keys(c).length>0?c:void 0}r.diff=n;function o(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)}r.invert=o;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,p){return a[p]===void 0&&(f[p]=i[p]),f},{});return Object.keys(d).length>0?d:void 0}}r.transform=s})(Or||(Or={})),Vr.default=Or;var $n={},Vn={},Pa;function Yu(){if(Pa)return Vn;Pa=1;var r=te&&te.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Vn,"__esModule",{value:!0});var t=r(Ga()),n=function(){function o(s){this.ops=s,this.index=0,this.offset=0}return o.prototype.hasNext=function(){return this.peekLength()<1/0},o.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}},o.prototype.peek=function(){return this.ops[this.index]},o.prototype.peekLength=function(){return this.ops[this.index]?t.default.length(this.ops[this.index])-this.offset:1/0},o.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"},o.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[]},o}();return Vn.default=n,Vn}var Wa;function Ga(){if(Wa)return $n;Wa=1;var r=te&&te.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($n,"__esModule",{value:!0});var t=r(Yu()),n;return function(o){function s(i){return new t.default(i)}o.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}o.length=a}(n||(n={})),$n.default=n,$n}var Ut=te&&te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},On=Ut(Qu),vu=Ut(za),Tr=Ut(Ha),zt=Ut(Vr),oe=Ut(Ga()),Xu="\0",Zu=function(){function r(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return r.prototype.insert=function(t,n){var o={};return typeof t=="string"&&t.length===0?this:(o.insert=t,n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o))},r.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},r.prototype.retain=function(t,n){if(t<=0)return this;var o={retain:t};return n!=null&&typeof n=="object"&&Object.keys(n).length>0&&(o.attributes=n),this.push(o)},r.prototype.push=function(t){var n=this.ops.length,o=this.ops[n-1];if(t=vu.default(t),typeof o=="object"){if(typeof t.delete=="number"&&typeof o.delete=="number")return this.ops[n-1]={delete:o.delete+t.delete},this;if(typeof o.delete=="number"&&t.insert!=null&&(n-=1,o=this.ops[n-1],typeof o!="object"))return this.ops.unshift(t),this;if(Tr.default(t.attributes,o.attributes)){if(typeof t.insert=="string"&&typeof o.insert=="string")return this.ops[n-1]={insert:o.insert+t.insert},typeof t.attributes=="object"&&(this.ops[n-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof o.retain=="number")return this.ops[n-1]={retain:o.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},r.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},r.prototype.filter=function(t){return this.ops.filter(t)},r.prototype.forEach=function(t){this.ops.forEach(t)},r.prototype.map=function(t){return this.ops.map(t)},r.prototype.partition=function(t){var n=[],o=[];return this.forEach(function(s){var a=t(s)?n:o;a.push(s)}),[n,o]},r.prototype.reduce=function(t,n){return this.ops.reduce(t,n)},r.prototype.changeLength=function(){return this.reduce(function(t,n){return n.insert?t+oe.default.length(n):n.delete?t-n.delete:t},0)},r.prototype.length=function(){return this.reduce(function(t,n){return t+oe.default.length(n)},0)},r.prototype.slice=function(t,n){t===void 0&&(t=0),n===void 0&&(n=1/0);for(var o=[],s=oe.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),o.push(i)),a+=oe.default.length(i)}return new r(o)},r.prototype.compose=function(t){var n=oe.default.iterator(this.ops),o=oe.default.iterator(t.ops),s=[],a=o.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&&o.next(a.retain-i)}for(var c=new r(s);n.hasNext()||o.hasNext();)if(o.peekType()==="insert")c.push(o.next());else if(n.peekType()==="delete")c.push(n.next());else{var d=Math.min(n.peekLength(),o.peekLength()),f=n.next(d),p=o.next(d);if(typeof p.retain=="number"){var m={};typeof f.retain=="number"?m.retain=d:m.insert=f.insert;var b=zt.default.compose(f.attributes,p.attributes,typeof f.retain=="number");if(b&&(m.attributes=b),c.push(m),!o.hasNext()&&Tr.default(c.ops[c.ops.length-1],m)){var x=new r(n.rest());return c.concat(x).chop()}}else typeof p.delete=="number"&&typeof f.retain=="number"&&c.push(p)}return c.chop()},r.prototype.concat=function(t){var n=new r(this.ops.slice());return t.ops.length>0&&(n.push(t.ops[0]),n.ops=n.ops.concat(t.ops.slice(1))),n},r.prototype.diff=function(t,n){if(this.ops===t.ops)return new r;var o=[this,t].map(function(d){return d.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:Xu;var p=d===t?"on":"with";throw new Error("diff() called "+p+" non-document")}).join("")}),s=new r,a=On.default(o[0],o[1],n),i=oe.default.iterator(this.ops),c=oe.default.iterator(t.ops);return a.forEach(function(d){for(var f=d[1].length;f>0;){var p=0;switch(d[0]){case On.default.INSERT:p=Math.min(c.peekLength(),f),s.push(c.next(p));break;case On.default.DELETE:p=Math.min(f,i.peekLength()),i.next(p),s.delete(p);break;case On.default.EQUAL:p=Math.min(i.peekLength(),c.peekLength(),f);var m=i.next(p),b=c.next(p);Tr.default(m.insert,b.insert)?s.retain(p,zt.default.diff(m.attributes,b.attributes)):s.push(b).delete(p);break}f-=p}}),s.chop()},r.prototype.eachLine=function(t,n){n===void 0&&(n=`
|
|
7
7
|
`);for(var o=oe.default.iterator(this.ops),s=new r,a=0;o.hasNext();){if(o.peekType()!=="insert")return;var i=o.peek(),c=oe.default.length(i)-o.peekLength(),d=typeof i.insert=="string"?i.insert.indexOf(n,c)-c:-1;if(d<0)s.push(o.next());else if(d>0)s.push(o.next(d));else{if(t(s,o.next(1).attributes||{},a)===!1)return;a+=1,s=new r}}s.length()>0&&t(s,{},a)},r.prototype.invert=function(t){var n=new r;return this.reduce(function(o,s){if(s.insert)n.delete(oe.default.length(s));else{if(s.retain&&s.attributes==null)return n.retain(s.retain),o+s.retain;if(s.delete||s.retain&&s.attributes){var a=s.delete||s.retain,i=t.slice(o,o+a);return i.forEach(function(c){s.delete?n.push(c):s.retain&&s.attributes&&n.retain(oe.default.length(c),zt.default.invert(s.attributes,c.attributes))}),o+a}}return o},0),n.chop()},r.prototype.transform=function(t,n){if(n===void 0&&(n=!1),n=!!n,typeof t=="number")return this.transformPosition(t,n);for(var o=t,s=oe.default.iterator(this.ops),a=oe.default.iterator(o.ops),i=new r;s.hasNext()||a.hasNext();)if(s.peekType()==="insert"&&(n||a.peekType()!=="insert"))i.retain(oe.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,zt.default.transform(d.attributes,f.attributes,n))}return i.chop()},r.prototype.transformPosition=function(t,n){n===void 0&&(n=!1),n=!!n;for(var o=oe.default.iterator(this.ops),s=0;o.hasNext()&&s<=t;){var a=o.peekLength(),i=o.peekType();if(o.next(),i==="delete"){t-=Math.min(a,t-s);continue}else i==="insert"&&(s<t||!n)&&(t+=a);s+=a}return t},r.Op=oe.default,r.AttributeMap=zt.default,r}(),ef=Zu;const tf=na(ef);/*!
|
|
8
8
|
* VueQuill @vueup/vue-quill v1.2.0
|
|
9
9
|
* https://vueup.github.io/vue-quill/
|