halov 0.26.316 → 0.26.401
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/components/ObjectTreeView.vue.d.ts +19 -47
- package/dist/composables/useGridConfigTool.d.ts +1 -1
- package/dist/halov.es.js +3371 -3393
- package/dist/halov.umd.cjs +7 -7
- package/package.json +1 -1
package/dist/halov.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("img[data-v-f7799232]{display:block;max-width:100%}.app-tab-item[data-v-df170cc3]{border-top-width:2px}[data-v-e7319d81] .n-upload-trigger{display:block}.item-box[data-v-e7319d81]{display:block;flex-grow:1}.form-input[data-v-e7319d81]{display:block}.text-input[data-v-e7319d81]{font-size:small;display:block;text-align:end;padding-right:4px}div[data-v-
|
|
2
|
-
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("axios"),require("vue-router"),require("naive-ui"),require("pinia"),require("moment"),require("mustache"),require("vue-draggable-plus")):typeof define=="function"&&define.amd?define(["exports","vue","axios","vue-router","naive-ui","pinia","moment","mustache","vue-draggable-plus"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.halov={},M.Vue,M.axios,M.VueRouter,M.NaiveUI,M.Pinia,M.moment,M.Mustache,M.VueDraggablePlus))})(this,function(M,e,le,ce,u,$e,se,Ce,Wt){"use strict";var wd=Object.defineProperty;var Cd=(M,e,le)=>e in M?wd(M,e,{enumerable:!0,configurable:!0,writable:!0,value:le}):M[e]=le;var J=(M,e,le)=>Cd(M,typeof e!="symbol"?e+"":e,le);var et=typeof document<"u"?document.currentScript:null;const tt=window,Zt="halo-lang";class cl{constructor(l,o=!0){J(this,"langCode","");J(this,"ignoreCase",!1);this.ignoreCase=o,this.swtichLang(l)}loadScript(l){const o=document.createElement("script");return o.src=l,o.id=Zt,document.head.appendChild(o),o}unloadScript(){const l=document.getElementById(Zt);return l&&l.parentNode?(l.parentNode.removeChild(l),!0):!1}swtichLang(l){if(this.langCode!=l){this.langCode=l;const o=`/api/core/Languages/embed.js?code=${encodeURIComponent(l)}&caseType=lowercase`;this.unloadScript(),this.loadScript(o)}}t(l){var n;if(!l)return"";const o=(n=tt.lang)==null?void 0:n.words;return o&&o[this.ignoreCase?l.toLowerCase():l]||l}t2(l,o){var r;if(!l&&!o)return"";const n=(r=tt.lang)==null?void 0:r.words;if(n){if(l){const a=n[this.ignoreCase?l.toLowerCase():l];if(a)return a}if(o){const a=n[this.ignoreCase?o.toLowerCase():o];if(a)return a}}return l||o}info(){const l=tt.lang;if(l)return{code:l.code,name:l.name,displayName:l.displayName,nativeName:l.nativeName,revision:l.revision,rtl:l.rtl}}}const Yt=Symbol("halo-i18n");let ot=null;function Qt(t,l){return ot||(ot=new cl(t,l)),ot}function Xt(t,l,o=!0){const n=Qt(l,o);t.config.globalProperties.$t=r=>n.t(r),t.provide(Yt,n)}function Z(){const t=e.inject(Yt);if(!t)throw new Error("I18n not initialized. Ensure I18nPlugin is installed.");return{i18n:t,t:t.t.bind(t),switchLang:t.swtichLang.bind(t),lang:t.info}}const dl=()=>{let t=localStorage.getItem("Client-Device-Id");return t||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?t=crypto.randomUUID():t="c-"+Math.random().toString(36).substring(2)+Date.now().toString(36),localStorage.setItem("Client-Device-Id",t)),t};le.defaults.headers["Client-Device-Id"]=dl(),le.defaults.headers["Content-type"]="application/json",le.defaults.timeout=1e3*60,le.interceptors.request.use(t=>{const l=localStorage.getItem("sessionToken");return l&&t.headers&&(t.headers.Authorization=`Bearer ${l}`),t},t=>(console.log(t),Promise.reject(t))),le.interceptors.response.use(t=>t.status==200?t.data:Promise.reject(t.statusText),t=>{if(t&&t.response&&t.response.status){const l=ce.useRouter();switch(t.response.status){case 401:l==null||l.push({name:"Unauthorized"});break}}return Promise.reject(t)});const fl=["src"],ul=e.defineComponent({__name:"AppLogoBox",props:{src:{type:String,required:!0},height:{type:String,default:"40px"},defaultSrc:{type:String,default:new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgaW5rc2NhcGU6dmVyc2lvbj0iMS4xIChjNjhlMjJjMzg3LCAyMDIxLTA1LTIzKSIKICAgaW5rc2NhcGU6ZXhwb3J0LXlkcGk9IjUuNjExNzEyIgogICBpbmtzY2FwZTpleHBvcnQteGRwaT0iNS42MTE3MTIiCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT0iRDpcQ29kZXNcSk1DX0ZyYW1lX0FuZG9uXEFydHNcbG9nb18yMC5wbmciCiAgIHNvZGlwb2RpOmRvY25hbWU9ImxvZ28uc3ZnIgogICB3aWR0aD0iODAuNjk3OTE0bW0iCiAgIGhlaWdodD0iNzYuOTQ2MjEzbW0iCiAgIHZpZXdCb3g9IjAgMCA4MC42OTc5MTQgNzYuOTQ2MjEzIgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmc4IgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIKICAgeG1sbnM6Y2M9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zIyIKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIj4KICA8c29kaXBvZGk6bmFtZWR2aWV3CiAgICAgaW5rc2NhcGU6ZG9jdW1lbnQtcm90YXRpb249IjAiCiAgICAgaW5rc2NhcGU6Y3VycmVudC1sYXllcj0iZzQ1NDMiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTgiCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii04IgogICAgIGlua3NjYXBlOmN5PSIxNDQuOTI4NiIKICAgICBpbmtzY2FwZTpjeD0iNjcuMDg0ODUzIgogICAgIGlua3NjYXBlOnpvb209IjAuNzkwMDQ0MjIiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlkPSJuYW1lZHZpZXc4NTMiCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyIKICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE5MjAiCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBndWlkZXRvbGVyYW5jZT0iMTAiCiAgICAgZ3JpZHRvbGVyYW5jZT0iMTAiCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCIKICAgICBib3JkZXJvcGFjaXR5PSIxIgogICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IgogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIKICAgICBpbmtzY2FwZTpwYWdlY2hlY2tlcmJvYXJkPSIwIgogICAgIGlua3NjYXBlOmRvY3VtZW50LXVuaXRzPSJtbSIgLz4KICA8ZGVmcwogICAgIGlkPSJkZWZzMiI+CiAgICA8Y2xpcFBhdGgKICAgICAgIGNsaXBQYXRoVW5pdHM9InVzZXJTcGFjZU9uVXNlIgogICAgICAgaWQ9ImNsaXBQYXRoNDU2MyI+CiAgICAgIDxyZWN0CiAgICAgICAgIHN0eWxlPSJvcGFjaXR5OjE7ZmlsbDojZmYyYTJhO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDozLjQyNzE2NjQ2O3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgICAgIGlkPSJyZWN0NDU2NSIKICAgICAgICAgd2lkdGg9IjgwLjY5NzkxNCIKICAgICAgICAgaGVpZ2h0PSI3Ni45OTM3NTIiCiAgICAgICAgIHg9Ijg0Ljc1ODIxNyIKICAgICAgICAgeT0iNjUuMTk2NjQ4IgogICAgICAgICByeD0iMTAiCiAgICAgICAgIHJ5PSIxMCIgLz4KICAgIDwvY2xpcFBhdGg+CiAgPC9kZWZzPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTUiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxnCiAgICAgaWQ9ImxheWVyMSIKICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtODQuNzU4MjE3LC02NS4yNDQxODMpIj4KICAgIDxnCiAgICAgICBpZD0iZzQ1NDMiCiAgICAgICBjbGlwLXBhdGg9InVybCgjY2xpcFBhdGg0NTYzKSI+CiAgICAgIDxwYXRoCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIGlkPSJwYXRoNDUzMiIKICAgICAgICAgZD0ibSAxMjIuNjcxMDEsOTkuMDkwNTY2IDM0LjY3MTkyLC0zMy44NDYzODMgaCAyMy41NjQ0NSBsIC0zOC44NjA2OCwzNS44MTE3NjcgMjMuNDA5NDIsNDEuMTM0NDQgdiAwIEggMTQzLjU5NyBsIC0xNy4zMTE2MSwtMzEuMTYwODkgLTcuNDE0MDgsNi40NTc0MiIKICAgICAgICAgc3R5bGU9ImZvbnQtc3R5bGU6aXRhbGljO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6Ym9sZDtmb250LXN0cmV0Y2g6bm9ybWFsO2ZvbnQtc2l6ZToxMDUuODMzcHg7bGluZS1oZWlnaHQ6MS4yNTtmb250LWZhbWlseTpzYW5zLXNlcmlmOy1pbmtzY2FwZS1mb250LXNwZWNpZmljYXRpb246J3NhbnMtc2VyaWYgQm9sZCBJdGFsaWMnO2xldHRlci1zcGFjaW5nOjBweDt3b3JkLXNwYWNpbmc6MHB4O2ZpbGw6IzVlMzViMTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6bm9uZTtzdHJva2Utd2lkdGg6MC4yNjQ1ODMiIC8+CiAgICAgIDxwYXRoCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIGQ9Im0gMTE5LjkyOTY1LDExNi44MTcyNyBjIC0yLjEwMTUxLDkuMDI2MTUgLTYuMDQ2MTMsMTUuNzA5NjMgLTExLjgzMzkxLDIwLjA1MDQ1IC01Ljc4Nzc2LDQuMzQwODIgLTEzLjcxMTQ4LDYuNTExMjMgLTIzLjc3MTE1OSw2LjUxMTIzIC0zLjY4NjI1MiwwIC03LjAxMDc2OSwtMC4xMzc4IC05Ljk3MzU1MSwtMC40MTM0MSAtMi45NjI3ODMsLTAuMjQxMTUgLTUuNjE1NTA2LC0wLjYwMjg5IC03Ljk1ODE3MSwtMS4wODUyIGwgMy42NjkwMjcsLTE1LjI4NjUxIGMgNC41Njc1NzYsMC42NTExNyA5LjIxNjI0OSwxLjg4Njg3IDEzLjI4MDg0MywxLjkwMjMxIDUuMjcwOTk2LDAgOS4yMTU2MywtMS4yNTc0NiAxMS44MzM5MDUsLTMuNzcyMzggMi42MTgyNywtMi41MTQ5MiA0Ljc1NDIzLC03LjQwNjk2IDYuNDA3ODc2LC0xNC42NzYxMSBsIDcuMDc5NjgsLTMwLjY0NDEyNCBIIDkxLjA5NDE5NCBMIDk0LjM0OTgwOSw2NS4yNDQxODMgSCAxMzEuODY2OSBaIgogICAgICAgICBzdHlsZT0iZm9udC1zdHlsZTppdGFsaWM7Zm9udC12YXJpYW50Om5vcm1hbDtmb250LXdlaWdodDpib2xkO2ZvbnQtc3RyZXRjaDpub3JtYWw7Zm9udC1zaXplOjEwNS44MzNweDtsaW5lLWhlaWdodDoxLjI1O2ZvbnQtZmFtaWx5OnNhbnMtc2VyaWY7LWlua3NjYXBlLWZvbnQtc3BlY2lmaWNhdGlvbjonc2Fucy1zZXJpZiBCb2xkIEl0YWxpYyc7bGV0dGVyLXNwYWNpbmc6MHB4O3dvcmQtc3BhY2luZzowcHg7ZGlzcGxheTppbmxpbmU7ZmlsbDojMzExYjkyO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDowLjI2NDU4MyIKICAgICAgICAgaWQ9InBhdGg0NDg5IiAvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("halov.umd.cjs",document.baseURI).href).href}},setup(t){const l=t,o=e.ref(l.src);e.watch(()=>l.src,r=>{o.value=r});function n(){o.value=l.defaultSrc}return(r,a)=>(e.openBlock(),e.createElementBlock("img",{src:o.value,style:e.normalizeStyle({height:t.height,objectFit:"contain"}),onError:n,alt:"App Logo"},null,44,fl))}}),re=(t,l)=>{const o=t.__vccOpts||t;for(const[n,r]of l)o[n]=r;return o},Jt=re(ul,[["__scopeId","data-v-f7799232"]]);function pl(){try{const t=sessionStorage.getItem("tabs");return t?JSON.parse(t):null}catch{return null}}const nt=$e.defineStore("tabs",{state:()=>({tabs:pl(),selectedTab:sessionStorage.getItem("selectedTab")}),actions:{setTabs(t){this.tabs=t,t?(sessionStorage.setItem("tabs",JSON.stringify(t)),t.length||this.setSelectedTab(null)):(sessionStorage.removeItem("tabs"),this.setSelectedTab(null))},setSelectedTab(t){this.selectedTab=t,t?sessionStorage.setItem("selectedTab",t):sessionStorage.removeItem("selectedTab")},addTab(t){let l=this.tabs;l?l.find(o=>o.id==t.id)||l.push(t):l=[t],this.setTabs(l),this.setSelectedTab(t.id)},selectTab(t){this.setSelectedTab(t)},closeTab(t){const l=this.tabs;if(l){const o=l.findIndex(n=>n.id==t);o>-1&&(l.splice(o,1),this.setTabs(l))}},changeTabId(t,l){const o=this.tabs;if(o){const n=o.find(r=>r.id==t);n&&!o.find(r=>r.id==l)&&(n.id=l,this.setTabs(o))}},clearTabs(){this.setTabs([]),this.setSelectedTab(null)}}});var ml=typeof global=="object"&&global&&global.Object===Object&&global,hl=typeof self=="object"&&self&&self.Object===Object&&self,gl=ml||hl||Function("return this")(),be=gl.Symbol,qt=Object.prototype,yl=qt.hasOwnProperty,wl=qt.toString,Ae=be?be.toStringTag:void 0;function Cl(t){var l=yl.call(t,Ae),o=t[Ae];try{t[Ae]=void 0;var n=!0}catch{}var r=wl.call(t);return n&&(l?t[Ae]=o:delete t[Ae]),r}var bl=Object.prototype,kl=bl.toString;function Nl(t){return kl.call(t)}var xl="[object Null]",Sl="[object Undefined]",Ut=be?be.toStringTag:void 0;function Il(t){return t==null?t===void 0?Sl:xl:Ut&&Ut in Object(t)?Cl(t):Nl(t)}function Bl(t){return t!=null&&typeof t=="object"}var Vl="[object Symbol]";function Ml(t){return typeof t=="symbol"||Bl(t)&&Il(t)==Vl}function Tl(t,l){for(var o=-1,n=t==null?0:t.length,r=Array(n);++o<n;)r[o]=l(t[o],o,t);return r}var Al=Array.isArray,vt=be?be.prototype:void 0,eo=vt?vt.toString:void 0;function to(t){if(typeof t=="string")return t;if(Al(t))return Tl(t,to)+"";if(Ml(t))return eo?eo.call(t):"";var l=t+"";return l=="0"&&1/t==-1/0?"-0":l}function lt(t){return t==null?"":to(t)}function El(t,l,o){var n=-1,r=t.length;l<0&&(l=-l>r?0:r+l),o=o>r?r:o,o<0&&(o+=r),r=l>o?0:o-l>>>0,l>>>=0;for(var a=Array(r);++n<r;)a[n]=t[n+l];return a}function _l(t,l,o){var n=t.length;return o=o===void 0?n:o,!l&&o>=n?t:El(t,l,o)}var zl="\\ud800-\\udfff",Ll="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",$l="\\u20d0-\\u20ff",Rl=Ll+Dl+$l,Ol="\\ufe0e\\ufe0f",jl="\\u200d",Fl=RegExp("["+jl+zl+Rl+Ol+"]");function oo(t){return Fl.test(t)}function Pl(t){return t.split("")}var no="\\ud800-\\udfff",Hl="\\u0300-\\u036f",Gl="\\ufe20-\\ufe2f",Kl="\\u20d0-\\u20ff",Wl=Hl+Gl+Kl,Zl="\\ufe0e\\ufe0f",Yl="["+no+"]",rt="["+Wl+"]",at="\\ud83c[\\udffb-\\udfff]",Ql="(?:"+rt+"|"+at+")",lo="[^"+no+"]",ro="(?:\\ud83c[\\udde6-\\uddff]){2}",ao="[\\ud800-\\udbff][\\udc00-\\udfff]",Xl="\\u200d",so=Ql+"?",io="["+Zl+"]?",Jl="(?:"+Xl+"(?:"+[lo,ro,ao].join("|")+")"+io+so+")*",ql=io+so+Jl,Ul="(?:"+[lo+rt+"?",rt,ro,ao,Yl].join("|")+")",vl=RegExp(at+"(?="+at+")|"+Ul+ql,"g");function er(t){return t.match(vl)||[]}function tr(t){return oo(t)?er(t):Pl(t)}function or(t){return function(l){l=lt(l);var o=oo(l)?tr(l):void 0,n=o?o[0]:l.charAt(0),r=o?_l(o,1).join(""):l.slice(1);return n[t]()+r}}var nr=or("toUpperCase");function lr(t,l,o,n){for(var r=-1,a=t==null?0:t.length;++r<a;)o=l(o,t[r],r,t);return o}function rr(t){return function(l){return t==null?void 0:t[l]}}var ar={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},sr=rr(ar),ir=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cr="\\u0300-\\u036f",dr="\\ufe20-\\ufe2f",fr="\\u20d0-\\u20ff",ur=cr+dr+fr,pr="["+ur+"]",mr=RegExp(pr,"g");function hr(t){return t=lt(t),t&&t.replace(ir,sr).replace(mr,"")}var gr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function yr(t){return t.match(gr)||[]}var wr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Cr(t){return wr.test(t)}var co="\\ud800-\\udfff",br="\\u0300-\\u036f",kr="\\ufe20-\\ufe2f",Nr="\\u20d0-\\u20ff",xr=br+kr+Nr,fo="\\u2700-\\u27bf",uo="a-z\\xdf-\\xf6\\xf8-\\xff",Sr="\\xac\\xb1\\xd7\\xf7",Ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Br="\\u2000-\\u206f",Vr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",po="A-Z\\xc0-\\xd6\\xd8-\\xde",Mr="\\ufe0e\\ufe0f",mo=Sr+Ir+Br+Vr,ho="['’]",go="["+mo+"]",Tr="["+xr+"]",yo="\\d+",Ar="["+fo+"]",wo="["+uo+"]",Co="[^"+co+mo+yo+fo+uo+po+"]",Er="\\ud83c[\\udffb-\\udfff]",_r="(?:"+Tr+"|"+Er+")",zr="[^"+co+"]",bo="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",ke="["+po+"]",Lr="\\u200d",No="(?:"+wo+"|"+Co+")",Dr="(?:"+ke+"|"+Co+")",xo="(?:"+ho+"(?:d|ll|m|re|s|t|ve))?",So="(?:"+ho+"(?:D|LL|M|RE|S|T|VE))?",Io=_r+"?",Bo="["+Mr+"]?",$r="(?:"+Lr+"(?:"+[zr,bo,ko].join("|")+")"+Bo+Io+")*",Rr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Or="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",jr=Bo+Io+$r,Fr="(?:"+[Ar,bo,ko].join("|")+")"+jr,Pr=RegExp([ke+"?"+wo+"+"+xo+"(?="+[go,ke,"$"].join("|")+")",Dr+"+"+So+"(?="+[go,ke+No,"$"].join("|")+")",ke+"?"+No+"+"+xo,ke+"+"+So,Or,Rr,yo,Fr].join("|"),"g");function Hr(t){return t.match(Pr)||[]}function Gr(t,l,o){return t=lt(t),l=l,l===void 0?Cr(t)?Hr(t):yr(t):t.match(l)||[]}var Kr="['’]",Wr=RegExp(Kr,"g");function Zr(t){return function(l){return lr(Gr(hr(l).replace(Wr,"")),t,"")}}var Yr=Zr(function(t,l,o){return t+(o?" ":"")+nr(l)});const Ee="YYYY/MM/DD HH:mm:ss",ge="YYYY/MM/DD",_e="HH:mm:ss";function te(t){return t.length?Yr(t):t}function de(t){if(t!=null){if(typeof t=="boolean"||t instanceof Boolean)return t;if(typeof t=="number"||typeof t=="bigint")return t>0;if(typeof t=="string"||typeof t=="object")switch(t==null?void 0:t.toString().toLowerCase().trim()){case"true":case"yes":case"1":case"y":return!0;case"false":case"no":case"0":case"n":return!1}else if(typeof t=="function"){const l=t.call(null);if(l)return de(l)}}}function Re(t,l){const o=de(t);return o===void 0?l||!1:o}function Vo(t,l){if(t!=null){if(t instanceof Date)return t;if(typeof t=="number")return new Date(t);if(typeof t=="string")return se(t,l||Ee).toDate()}}function Mo(t){return typeof t=="object"&&t!==null&&"hour"in t&&"minute"in t}function Qr(t){const l=t%1e3;t/=1e3;const o=t%60;t/=60;const n=t%60;return t/=60,{hour:t%24,minute:n,second:o,millisecond:l}}function To(t){const l=t%60;t/=60;const o=t%60;return t/=60,{hour:t%24,minute:o,second:l,millisecond:0}}function Ao(t,l){const o=se(t,l||_e);if(o)return{hour:o.hour(),minute:o.minute(),second:o.second(),millisecond:o.millisecond()}}function Eo(t,l){var o,n;if(t){if(typeof t=="string")return(n=(o=se(t,l||Ee))==null?void 0:o.toDate())==null?void 0:n.getTime();if(typeof t=="number")return t;if(t instanceof Date)return t.getTime()}}function _o(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||_e);if(t instanceof Date)return se(t).format(l||_e);if(Mo(t))return se(new Date(2e3,1,1,t.hour,t.minute,t.second)).format(l||_e);if(typeof t=="object")return t==null?void 0:t.toString()}}function zo(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||ge);if(t instanceof Date)return se(t).format(l||ge);if(typeof t=="object")return t==null?void 0:t.toString()}}function st(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||Ee);if(t instanceof Date)return se(t).format(l||Ee);if(typeof t=="object")return t==null?void 0:t.toString()}}function Lo(t){if(t){const l=t.lastIndexOf(":");if(l>-1&&l<t.length-1)return t.substring(0,l+1)+Math.round(Number(t.substring(l+1,t.length)))}return t}function Do(t){const l={},o=t.split("&").map(n=>n.trim()).filter(n=>n);for(const n of o){let r,a;const s=n.indexOf("=");if(s>-1?(r=n.substring(0,s),a=n.substring(s+1)):r=n,r in l){if(a){const c=l[r];Array.isArray(c)?c.push(a):c?l[r]=[c,a]:l[r]=a}}else l[r]=a}return l}function Xr(t,l){let o=t;if(l){const n=[];for(const r in l){const a=l[r];if(Array.isArray(a))for(const s of a)n.push(`${r}=${encodeURIComponent(s)}`);else a?n.push(`${r}=${encodeURIComponent(a)}`):n.push(r)}n.length&&(o+="?"+n.join("&"))}return o}function v(t,l,o=!0){if(!l||Object.keys(l).length==0)return t;let n=t,r={};const a=t.indexOf("?");a>-1&&(n=t.substring(0,a),r=Do(t.substring(a+1)));let s={};const c=Array.isArray(l)?l:[l];for(let m of c)if(m)if(typeof m=="string")s=Do(m);else for(const i in m){const d=m[i];Array.isArray(d)?s[i]=d.map(g=>g==null?void 0:g.toString()):d!=null?s[i]=d.toString():s[i]=void 0}else continue;if(Object.keys(s).length==0)return t;if(r.length)for(const m in s)if(m in r&&!o){const i=r[m],d=s[m];Array.isArray(i)?Array.isArray(d)?i.push(...d):i.push(d):i?Array.isArray(d)?r[m]=[i,...d]:r[m]=[i,d]:r[m]=s[m]}else r[m]=s[m];else for(const m in s)r[m]=s[m];return Xr(n,r)}function Oe(t,l,o){if(t==null)return t;switch(l){case"number":return Number(t);case"boolean":case"bool":return de(t);case"date":case"datetime":return st(t);default:return o&&typeof t=="string"&&(o.includes("code-u")?t=t.toUpperCase():o.includes("code-l")&&(t=t.toLowerCase())),t}}function $o(t){switch(t){case"number":return 0;case"boolean":case"bool":return!1;case"date":case"datetime":return new Date}}function Jr(){return new Date().getTime().toString()}function qr(t,l){const o={};if(t)if(l)for(const n of l)typeof n=="string"?o[te(n)]=t[n]:o[te(n.name)]=t[n.name];else for(const n in t)o[te(n)]=t[n];return o}function Ur(t,l){return se(t,ge).add(l,"days").format(ge)}function vr(t,l){if(!t||!l){const o=new Date;t||(t=o.getFullYear()),l||(l=o.getMonth())}return new Date(t,l,1)}function ea(t,l){if(!t||!l){const o=new Date;t||(t=o.getFullYear()),l||(l=o.getMonth())}return new Date(t,l+1,0)}function ta(t,l=!0,o=!0){var r,a;let n=(a=(r=t==null?void 0:t.split(/\s*,\s*|\r?\n+/))==null?void 0:r.map(s=>s.trim()))==null?void 0:a.filter(s=>!l||s.length>0);return n&&o&&(n=n.filter((s,c,m)=>s&&m.indexOf(s)==c)),n}function oa(t,l=!0,o=!0){var r,a;let n=(a=(r=t==null?void 0:t.split(/\r?\n/))==null?void 0:r.map(s=>s.trim()))==null?void 0:a.filter(s=>!l||s.length>0);return n&&o&&(n=n.filter((s,c,m)=>s&&m.indexOf(s)==c)),n}function na(t){const l=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return!!t.toLowerCase().match(l)}function Ro(t,l=!1){switch(typeof t){case"number":return l?Math.max(0,Math.max(100,t*100)):t*100;case"string":const o=t.indexOf("%");if(o>-1){t=t.substring(0,o-1);const n=Number(t);if(!Number.isNaN(n))return l?Math.max(0,Math.max(100,n)):n}else{const n=Number(t);if(!Number.isNaN(n))return l?Math.max(0,Math.max(100,n*100)):n*100}}}function Oo(t){return t==null?!0:/^\s*$/.test(t)}function la(t,l){return Oo(t)?l:t}const Ne=$e.defineStore("common",{state:()=>({themeName:localStorage.getItem("theme"),menuCollapsed:Re(localStorage.getItem("menu-collapsed")),isFullscreen:!1,sharedData:{}}),getters:{isDarkTheme:t=>t.themeName=="darkTheme"},actions:{toggleTheme(){this.themeName=="darkTheme"?this.setThemeName(null):this.setThemeName("darkTheme")},setThemeName(t){this.themeName=t,t?localStorage.setItem("theme",t):localStorage.removeItem("theme")},setMenuCollapsed(t){this.menuCollapsed=t,localStorage.setItem("menu-collapsed",t.toString())},setIsFullscreen(t){this.isFullscreen=t},async fetchSharedData(t,l){let o=this.sharedData[t];if(o||(o={key:t,isLoading:!1,data:void 0,error:void 0,promise:void 0},this.sharedData[t]=o),o.data!==void 0)return o.data;if(o.isLoading&&o.promise)return o.promise;try{o.isLoading=!0,o.promise=l();const n=await o.promise;return o.data=n,o.isLoading=!1,o.promise=void 0,n}catch(n){throw o.isLoading=!1,o.error=n,o.promise=void 0,n}}}}),ra={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},aa=e.defineComponent({name:"ArrowDropDownOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ra,o[0]||(o[0]=[e.createElementVNode("path",{d:"M7 10l5 5l5-5H7z",fill:"currentColor"},null,-1)]))}}),sa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ia=e.defineComponent({name:"CheckFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",sa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z",fill:"currentColor"},null,-1)]))}}),ca={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jo=e.defineComponent({name:"ClearFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ca,o[0]||(o[0]=[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z",fill:"currentColor"},null,-1)]))}}),da={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},fa=e.defineComponent({name:"CloseOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",da,o[0]||(o[0]=[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"},null,-1)]))}}),ua={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pa=e.defineComponent({name:"ColorizeFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ua,o[0]||(o[0]=[e.createElementVNode("path",{d:"M20.71 5.63l-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12l-1.93-1.91l-1.41 1.41l1.42 1.42L3 16.25V21h4.75l8.92-8.92l1.42 1.42l1.41-1.41l-1.92-1.92l3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06l1.92 1.92L6.92 19z",fill:"currentColor"},null,-1)]))}}),ma={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ha=e.defineComponent({name:"DarkModeOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ma,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1)]))}}),ga={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fo=e.defineComponent({name:"EditFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ga,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83l3.75 3.75l1.83-1.83z",fill:"currentColor"},null,-1)]))}}),ya={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wa=e.defineComponent({name:"ExpandLessFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ya,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12 8l-6 6l1.41 1.41L12 10.83l4.59 4.58L18 14z",fill:"currentColor"},null,-1)]))}}),Ca={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ba=e.defineComponent({name:"ExpandMoreFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ca,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10l6 6l6-6z",fill:"currentColor"},null,-1)]))}}),ka={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Po=e.defineComponent({name:"FolderTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ka,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M11.17 8l-.58-.59L9.17 6H4v12h16V8h-8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l1.41 1.41l.59.59H20v10z",fill:"currentColor"},null,-1)]))}}),Na={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},xa=e.defineComponent({name:"FullscreenExitFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Na,o[0]||(o[0]=[e.createElementVNode("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z",fill:"currentColor"},null,-1)]))}}),Sa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ia=e.defineComponent({name:"FullscreenFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Sa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z",fill:"currentColor"},null,-1)]))}}),Ba={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Va=e.defineComponent({name:"ImportExportFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ba,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z",fill:"currentColor"},null,-1)]))}}),Ma={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ta=e.defineComponent({name:"LogOutFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ma,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 2h9a2 2 0 0 1 2 2v2h-2V4H6v16h9v-2h2v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16.09 15.59L17.5 17l5-5l-5-5l-1.41 1.41L18.67 11H9v2h9.67z",fill:"currentColor"},null,-1)]))}}),Aa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ea=e.defineComponent({name:"ManageAccountsOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Aa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01c.1-.7.3-1.37.59-1.98c-.22-.02-.44-.03-.67-.03c-2.42 0-4.68.67-6.61 1.82c-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2H4zm6-6c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2s-2-.9-2-2s.9-2 2-2zm10.75 10c0-.22-.03-.42-.06-.63l1.14-1.01l-1-1.73l-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49l-1 1.73l1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01l1 1.73l1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49l1-1.73l-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"},null,-1)]))}}),_a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},it=e.defineComponent({name:"MenuFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",_a,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",fill:"currentColor"},null,-1)]))}}),za={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},La=e.defineComponent({name:"MenuOpenFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",za,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12L21 8.41L19.59 7l-5 5l5 5L21 15.59z",fill:"currentColor"},null,-1)]))}}),Da={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$a=e.defineComponent({name:"MoreHorizFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Da,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1)]))}}),Ra={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Oa=e.defineComponent({name:"NotificationsNoneTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ra,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M12 6.5c-2.49 0-4 2.02-4 4.5v6h8v-6c0-2.48-1.51-4.5-4-4.5z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 16v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6zm-4 5c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2z",fill:"currentColor"},null,-1)]))}}),ja={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fa=e.defineComponent({name:"PasswordFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ja,o[0]||(o[0]=[e.createElementVNode("path",{d:"M2 17h20v2H2v-2zm1.15-4.05L4 11.47l.85 1.48l1.3-.75l-.85-1.48H7v-1.5H5.3l.85-1.47L4.85 7L4 8.47L3.15 7l-1.3.75l.85 1.47H1v1.5h1.7l-.85 1.48l1.3.75zm6.7-.75l1.3.75l.85-1.48l.85 1.48l1.3-.75l-.85-1.48H15v-1.5h-1.7l.85-1.47l-1.3-.75L12 8.47L11.15 7l-1.3.75l.85 1.47H9v1.5h1.7l-.85 1.48zM23 9.22h-1.7l.85-1.47l-1.3-.75L20 8.47L19.15 7l-1.3.75l.85 1.47H17v1.5h1.7l-.85 1.48l1.3.75l.85-1.48l.85 1.48l1.3-.75l-.85-1.48H23v-1.5z",fill:"currentColor"},null,-1)]))}}),Pa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ha=e.defineComponent({name:"PlaylistAddCheckTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Pa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07l-4.25 4.24l-2.12-2.12l-1.41 1.41L16.34 19L22 13.34z",fill:"currentColor"},null,-1)]))}}),Ga={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ka=e.defineComponent({name:"PlaylistAddFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ga,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 10H3v2h11v-2zm0-4H3v2h11V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM3 16h7v-2H3v2z",fill:"currentColor"},null,-1)]))}}),Wa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Za=e.defineComponent({name:"PrintTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Wa,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M8 5h8v3H8z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"18",cy:"11.5",r:"1",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 14H8v-4h8v4zm4-4h-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{opacity:".3",d:"M6 13h12v2h2v-4c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4h2v-2zm12-2.5c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z",fill:"currentColor"},null,-1)]))}}),Ya={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qa=e.defineComponent({name:"ReadMoreFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ya,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 7h9v2h-9zm0 8h9v2h-9zm3-4h6v2h-6zm-3 1L8 7v4H2v2h6v4z",fill:"currentColor"},null,-1)]))}}),Xa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},je=e.defineComponent({name:"RefreshFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Xa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"currentColor"},null,-1)]))}}),Ja={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pe=e.defineComponent({name:"SearchFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ja,o[0]||(o[0]=[e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z",fill:"currentColor"},null,-1)]))}}),qa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ua=e.defineComponent({name:"UnarchiveOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",qa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM6.24 5h11.52l.83 1H5.42l.82-1zM5 19V8h14v11H5zm3-5h2.55v3h2.9v-3H16l-4-4z",fill:"currentColor"},null,-1)]))}}),Ho={rootMenuName:"MainMenu",menuPosition:"side"},ct=Symbol("HalovConfig");function dt(){return e.inject(ct)}const va=["src"],xe=e.defineComponent({__name:"MenuIcon",props:{path:{},size:{default:16}},setup(t){const l=t,o=e.ref(n(l.path));function n(r){if(r)return`/api/core/SystemIcons/Icons?path=${encodeURIComponent(r)}`}return e.watch(()=>l.path,r=>o.value=n(r)),(r,a)=>o.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"menu-icon",src:o.value,style:e.normalizeStyle({width:r.size+"px",height:r.size+"px"})},null,12,va)):e.createCommentVNode("",!0)}}),Go=re(e.defineComponent({__name:"AppTabs",props:{tabs:{default:()=>[]},currentTab:{}},emits:["update:currentTab","closeTab","closeAll","closeOthers"],setup(t,{emit:l}){var N;const o=t,n=l,{t:r}=Z(),a=nt(),s=Ne(),c=e.computed(()=>s.menuCollapsed),m=((N=dt())==null?void 0:N.menuPosition)??"side",i=()=>s.setMenuCollapsed(!s.menuCollapsed),d=e.ref(o.currentTab),g=e.computed(()=>[{label:r("Close"),key:"close-current"},{label:r("Close All"),key:"close-all"},{label:r("Close Others"),key:"close-others"},{type:"divider",key:"------------1"},...o.tabs.map(S=>({label:r(S.title),key:S.id,url:S.url}))]);function f(S){o.tabs.find(T=>T.id==S)&&a.closeTab(S),n("closeTab",S)}function h(S){if(S.key=="close-current"||S.key=="close-all"||S.key=="close-others")return e.h(u.NIcon,null,{default:()=>e.h(fa)});if(S.key&&S.key==d.value)return e.h(u.NIcon,null,{default:()=>e.h(ia)})}function b(S){if(typeof S=="string"&&S)switch(S){case"close-current":n("closeTab",d.value);break;case"close-all":n("closeAll");break;case"close-others":n("closeOthers",d.value);break;default:d.value=S;break}}return e.watch(()=>o.currentTab,S=>{d.value=S}),e.watch(d,S=>{S!=o.currentTab&&n("update:currentTab",S)}),(S,P)=>S.tabs.length?(e.openBlock(),e.createBlock(e.unref(u.NTabs),{key:0,type:"card",closable:"",onClose:f,"tab-style":"min-width: 80px;",value:d.value,"onUpdate:value":P[0]||(P[0]=T=>d.value=T)},{prefix:e.withCtx(()=>[e.renderSlot(S.$slots,"prefix",{},()=>[e.unref(m)=="side"?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,text:"",style:{"margin-left":"8px"},onClick:i,title:c.value?e.unref(r)("Expand Menu"):e.unref(r)("Collapse Menu")},{icon:e.withCtx(()=>[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(La),{key:0})),c.value?(e.openBlock(),e.createBlock(e.unref(it),{key:1})):e.createCommentVNode("",!0)]),_:1},8,["title"])):e.createCommentVNode("",!0)],!0)]),suffix:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{text:"",style:{"font-size":"24px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NDropdown),{trigger:"click",options:g.value,placement:"bottom-end",onSelect:b,"render-icon":h},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(aa))]),_:1})]),_:1},8,["options"])]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.tabs,T=>(e.openBlock(),e.createBlock(e.unref(u.NTab),{key:T.id,name:T.id,title:T.id,closable:T.closable,class:"app-tab-item",style:e.normalizeStyle({"border-top-color":T.color})},{default:e.withCtx(()=>[T.icon?(e.openBlock(),e.createBlock(xe,{key:0,path:T.icon,style:{"margin-right":"4px"}},null,8,["path"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(r)(T.title)),1)]),_:2},1032,["name","title","closable","style"]))),128))]),_:3},8,["value"])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-df170cc3"]]),es=e.defineComponent({props:{direction:{type:String,default:"Right"},step:{type:Number,default:1},intervalFrames:{type:Number,default:1}},setup(t){const l=e.ref(void 0);let o=0;function n(){const s=l.value;if(s){const c=t.step||1;switch(t.direction){case"Left":s.scrollWidth>s.clientWidth&&(s.scrollLeft+s.clientWidth>s.scrollWidth-3?s.scrollLeft=0:s.scrollLeft+=c);break;case"Bottom":s.scrollHeight>s.clientHeight&&(s.scrollTop<3?s.scrollTop=s.scrollHeight:s.scrollTop-=c);break;case"Top":s.scrollHeight>s.clientHeight&&(s.scrollTop+s.clientHeight>s.scrollHeight-3?s.scrollTop=0:s.scrollTop+=c);break;case"Right":default:s.scrollWidth>s.clientWidth&&(s.scrollLeft<3?s.scrollLeft=s.scrollWidth:s.scrollLeft-=c);break}}}function r(){o++,o>1e8&&(o=0);let s=t.intervalFrames||1;s<=0&&(s=1),o%s==0&&n(),l.value&&requestAnimationFrame(r)}function a(){const s=l.value;if(s){switch(t.direction){case"Left":s.scrollLeft=0;break;case"Bottom":s.scrollTop=s.scrollHeight;break;case"Top":s.scrollTop=0;break;case"Right":default:s.scrollLeft=s.scrollWidth;break}s.addEventListener("resize",()=>{console.log("resize me.")})}}return e.onMounted(()=>{a(),requestAnimationFrame(r)}),e.watch(()=>t.direction,()=>a()),{areaRef:l}}}),ts={ref:"areaRef",style:{overflow:"hidden"}};function os(t,l,o,n,r,a){return e.openBlock(),e.createElementBlock("div",ts,[e.renderSlot(t.$slots,"default")],512)}const Ko=re(es,[["render",os]]);function Wo(t,l){let o=`/api/core/Barcode/${l.render=="svg"?"Svg":"Image"}?code=${encodeURIComponent(t)}&format=${l.format||"QR_CODE"}`;return l.width&&(o+=`&width=${l.width}`),l.height&&(o+=`&height=${l.height}`),l.showText&&(o+=`&showText=${l.showText}`),l.base64&&(o+=`&base64=${l.base64}`),l.backColor&&(o+=`&backColor=${encodeURIComponent(l.backColor)}`),l.foreColor&&(o+=`&foreColor=${encodeURIComponent(l.foreColor)}`),l.fontSize&&(o+=`&fontSize=${l.fontSize}`),l.margin&&(o+=`&margin=${encodeURIComponent(l.margin)}`),l.gs1Format&&(o+=`&gs1Format=${l.gs1Format}`),o}const Zo=e.defineComponent({__name:"BarcodeImage",props:{code:{},render:{},format:{},width:{},height:{},showText:{type:Boolean},base64:{type:Boolean},backColor:{},foreColor:{},fontSize:{},margin:{},gs1Format:{type:Boolean}},setup(t){const l=t,o=e.ref(void 0),n=()=>{o.value=Wo(l.code||"",{render:l.render,format:l.format,width:l.width,height:l.height,showText:l.showText,base64:l.base64,backColor:l.backColor,foreColor:l.foreColor,fontSize:l.fontSize,margin:l.margin,gs1Format:l.gs1Format})};return e.watch([l.render,l.code,l.format,l.width,l.height,l.showText,l.base64,l.backColor,l.foreColor,l.fontSize,l.margin,l.gs1Format],()=>n()),e.onMounted(()=>n()),(r,a)=>(e.openBlock(),e.createBlock(e.unref(u.NImage),{src:o.value,width:r.width,height:r.height},null,8,["src","width","height"]))}});function Yo(t){for(const l of t)l.guid&&(l.guid=l.guid.toLowerCase()),l.items&&Yo(l.items)}function ns(){try{const t=localStorage.getItem("userInfo");return t?JSON.parse(t):null}catch{return null}}const Se=$e.defineStore("account",{state:()=>({userInfo:ns(),lastUserName:localStorage.getItem("lastUserName"),sessionToken:localStorage.getItem("sessionToken"),isLoadingMenu:!1,menus:null,messages:JSON.parse(localStorage.getItem("_msgs")??"[]")}),actions:{setSession(t){this.sessionToken=t,t?localStorage.setItem("sessionToken",t):localStorage.removeItem("sessionToken")},setLastUserName(t){this.lastUserName=t,t?localStorage.setItem("lastUserName",t):localStorage.removeItem("lastUserName")},setUser(t){this.userInfo=t,t?localStorage.setItem("userInfo",JSON.stringify(t)):localStorage.removeItem("userInfo")},setAvatar(t){this.userInfo&&(this.userInfo.avatar=t,localStorage.setItem("userInfo",JSON.stringify(this.userInfo)))},clearUser(){this.userInfo=null,localStorage.removeItem("userInfo"),localStorage.removeItem("_msgs")},setMenus(t){this.menus=t},setIsLoadingMenu(t){this.isLoadingMenu=t},logout(){localStorage.removeItem("userInfo"),localStorage.removeItem("sessionToken"),this.clearUser(),this.setMenus(null),localStorage.removeItem("_msgs")},async loadMenus(t){var l;this.setIsLoadingMenu(!0);try{t||(t=((l=dt())==null?void 0:l.rootMenuName)??"MainMenu");const o=await le.get(`/api/core/account/menus?rootName=${encodeURIComponent(t)}`);if(o.isSuccess){const n=o.value||[];Yo(n),this.setMenus(n)}else console.log(o.errorMessage||"get remote menus error.")}catch(o){console.log(o)}finally{this.setIsLoadingMenu(!1)}},addMessage(t){this.messages.push(t),localStorage.setItem("_msgs",JSON.stringify(this.messages))}}}),ls={key:0,style:{"padding-left":"1rem"}},ft=e.defineComponent({__name:"ChangePassword",props:{show:{type:Boolean}},emits:["close"],setup(t,{emit:l}){const o=l,{t:n}=Z(),r=u.useMessage(),a=e.inject("axios"),s=Se(),c=e.ref({oldPassword:"",newPassword:"",confirmPassword:""}),m=e.ref(!1),i=e.ref(null),d=e.computed(()=>{var S;return(S=s.userInfo)==null?void 0:S.userName}),g=e.ref([]),f={oldPassword:[{required:!0,message:n("Required here.")}],newPassword:[{required:!0,message:n("Required here.")}],confirmPassword:[{required:!0,message:n("Required here.")}]};function h(){var S;d.value&&!m.value&&i.value&&((S=i.value)==null||S.validate(P=>{if(!P)if(c.value.confirmPassword!=c.value.newPassword){r.error(n("Confirm the password is inconsistent, please check and re-enter."));return}else if(c.value.newPassword==c.value.oldPassword){r.error(n("The new password must not be the same as the old password!"));return}else b(d.value,c.value.oldPassword,c.value.newPassword)}))}async function b(S,P,T){try{const k={userName:S,oldPassword:P,newPassword:T},x=await a.post("/api/core/account/changePassword",k);x.isSuccess?(r.success(n("Password has been successfully modified!")),o("close")):r.error(n(x.errorMessage||"Error"))}catch(k){r.error((k==null?void 0:k.toString())||n("Error"))}}async function N(){try{const S=await a.get("/api/core/system/passwordOptions");S.isSuccess&&S.value!=null?g.value=S.value:r.error(n(S.errorMessage||"Error"))}catch(S){console.error(S),r.error((S==null?void 0:S.toString())||n("Error"))}}return e.onMounted(()=>{N()}),(S,P)=>{const T=e.resolveComponent("n-input"),k=e.resolveComponent("n-form-item"),x=e.resolveComponent("n-spin"),V=e.resolveComponent("n-text"),E=e.resolveComponent("n-button"),O=e.resolveComponent("n-modal");return e.openBlock(),e.createBlock(O,{show:S.show,onClose:P[3]||(P[3]=()=>S.$emit("close")),class:"custom-card",title:e.unref(n)("Change Password"),style:{width:"300px"},preset:"card",size:"medium"},{footer:e.withCtx(()=>[g.value.length?(e.openBlock(),e.createElementBlock("ul",ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,j=>(e.openBlock(),e.createElementBlock("li",{key:j},[e.createVNode(V,{depth:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(j),1)]),_:2},1024)]))),128))])):e.createCommentVNode("",!0)]),action:e.withCtx(()=>[e.createVNode(E,{type:"primary",block:"",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("OK")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NForm),{model:c.value,ref_key:"formRef",ref:i,rules:f},{default:e.withCtx(()=>[e.createVNode(x,{show:m.value},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(n)("User Name")},{default:e.withCtx(()=>[e.createVNode(T,{value:d.value,readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"oldPassword",label:e.unref(n)("Old Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.oldPassword,"onUpdate:value":P[0]||(P[0]=j=>c.value.oldPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"newPassword",label:e.unref(n)("New Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.newPassword,"onUpdate:value":P[1]||(P[1]=j=>c.value.newPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"confirmPassword",label:e.unref(n)("Confirm New Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.confirmPassword,"onUpdate:value":P[2]||(P[2]=j=>c.value.confirmPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["show"])]),_:1},8,["model"])]),_:1},8,["show","title"])}}}),ut=e.defineComponent({__name:"ColorInput",props:{value:{},label:{},readonly:{type:Boolean},placeholder:{},clearable:{type:Boolean}},emits:["update:value"],setup(t){return(l,o)=>(e.openBlock(),e.createBlock(e.unref(u.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInput),{readonly:l.readonly,value:l.value,placeholder:l.placeholder,clearable:l.clearable,"onUpdate:value":o[0]||(o[0]=n=>l.$emit("update:value",n))},null,8,["readonly","value","placeholder","clearable"]),e.createVNode(e.unref(u.NColorPicker),{value:l.value,"show-preview":"",modes:["hex"],placeholder:"",disabled:l.readonly,style:{"max-width":"80px"},"onUpdate:value":o[1]||(o[1]=n=>l.$emit("update:value",n))},{label:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pa))]),_:1})]),_:1},8,["value","disabled"])]),_:1}))}});function Qo(t){return typeof t=="object"&&t!==null&&"source"in t}function Ie(t){return typeof t=="object"&&t!==null&&"name"in t}function rs(t){for(const l in t)delete t[l]}function Xo(t){const l={};for(const o of t){const n=o.name,r=l[n];if(o.nullable==!1)switch(o.dataType){case"number":l[n]=Number(r)||0;break;case"boolean":case"bool":l[n]=de(r)||!1;break;default:const a=$o(o.dataType);a!=null&&(l[n]=a)}}return l}function Jo(t,l,o){for(const n of l){const r=n.name,a=t[r];switch(n.dataType){case"number":n.nullable==!1?o[r]=Number(a)||0:o[r]=Number(a)||null;break;case"boolean":case"bool":n.nullable==!1?o[r]=de(a)||!1:o[r]=de(a)||null;break;default:o[r]=a||null;break}}}function qo(t,l){const o={};return Object.assign(o,t),Jo(t,l,o),o}function as(t){if(!t)return!0;switch(t){case"number":case"boolean":return!1;default:return!0}}function Uo(t,l){const o=l||(r=>r.toString()),n=[];if(t.length){for(const r of t)if(typeof r=="string"&&r)n.push({name:r,label:o(te(r)),visibility:!0,editor:"text"});else if(Ie(r)&&r.editing!="hidden"&&r.name){const a={name:r.name,role:r.role&&!Array.isArray(r.role)?[r.role]:r.role,dataType:r.dataType,minValue:r.minValue,maxValue:r.maxValue,group:r.group,nullable:r.required==null?as(r.dataType):!r.required,label:r.title?o(r.title):o(te(r.name)),visibility:!0,readonly:r.readonly,sortable:r.sortable,editor:r.editor||r.dataType||"text",editorConfig:r.editorConfig,tagSource:r.tagSource,description:r.description};r.editing=="readonly"?a.readonly=!0:(r.editing=="create"||r.editing=="edit")&&(a.visibility=[r.editing]),r.required!=null&&(a.nullable=!r.required),r.values&&(Array.isArray(r.values)?(a.values=r.values,a.valueSource={type:"static",isLoading:!1,values:r.values.map(s=>{if(typeof s=="string"){let c=s;return c&&(r.prefix&&(c=r.prefix+c),r.suffix&&(c=c+r.suffix)),{value:s,label:o(c)}}else return s})}):typeof r.values=="function"?a.valueSource={type:"function",func:r.values,isLoading:!1}:Array.isArray(r.values.source)?a.valueSource={type:"static",isLoading:!1,values:r.values.source.map(s=>{if(typeof s=="string"){let c=s;return c&&(r.prefix&&(c=r.prefix+c),r.suffix&&(c=c+r.suffix)),{value:s,label:o(c)}}else return s})}:a.valueSource={type:"remote",isLoading:!1,key:r.values.key,label:r.values.label,subLabel:r.values.subLabel,renderLabel:r.values.renderLabel,labelTemplate:r.values.labelTemplate,prefix:r.values.prefix,suffix:r.values.suffix,i18n:r.i18n,filterable:r.values.filterable,sourceUrl:r.values.source,values:[]}),n.push(a)}}return n}function pt(t){if(t){if(typeof t=="number")return t;switch(t){case"x-large":return 480;case"large":return 300;case"medium":return 160;case"small":return 60;case"x-small":return 30;default:return t}}else return t}function Be(t){const l=new Array;for(const o of t)if(typeof o=="string")l.push({name:o,title:te(o),sortIndex:0,visible:!0});else if(Ie(o)&&o.grid!="none"){if(o.visible!=null&&(typeof o.visible=="boolean"&&!o.visible||typeof o.visible=="function"&&!o.visible.call(null)))continue;const n={name:o.name,title:o.title,role:o.role&&!Array.isArray(o.role)?[o.role]:o.role,behavior:o.grid,align:o.align,fixed:o.gridFixed,dataType:o.dataType,href:o.href,i18n:o.i18n,template:o.template,prefix:o.prefix,suffix:o.suffix,formatter:o.formatter,display:o.display,values:o.values,width:pt(o.size),minWidth:pt(o.minWidth),textOverflow:o.textOverflow,sortIndex:0,sortable:o.sortable==null?!0:o.sortable,referencePage:o.referencePage,tagSource:o.tagSource,visible:!0,className:o.className,render:o.render,click:o.click};o.children&&o.children.length&&(n.children=Be(o.children)),l.push(n)}return l.sort((o,n)=>(o.sortIndex||0)-(n.sortIndex||0)),l}function ss(t,l){return Ce.render(t,l)}function vo(t,l){var r;const o=l||(a=>a.toString()),n=new Array;for(const a of t)if(Ie(a)&&a.search){const s={name:a.name,role:a.role&&!Array.isArray(a.role)?[a.role]:a.role,label:a.title?o(a.title):o(te(a.name)),editor:a.editor||a.dataType||"text",dataType:a.dataType,nullable:!0,searchMethod:"normal",template:a.template,prefix:a.prefix,suffix:a.suffix};if(typeof a.search=="boolean")s.searchMethod="normal";else if(typeof a.search=="string")a.search=="range"&&(s.searchMethod=a.search);else{if(a.search.editor&&(s.editor=a.search.editor),a.search.method=="range"?s.searchMethod="range":s.searchMethod="normal",a.search.required&&(s.nullable=!1),a.search.role){const c=Array.isArray(a.search.role)?a.search.role:[a.search.role];if(s.role)for(let m of c)s.role.includes(m)||s.role.push(m);else s.role=c}a.search.field&&(s.searchField=a.search.field),s.defaultValue=a.search.default}if(a.values&&(Array.isArray(a.values)?s.valueSource={type:"static",isLoading:!1,values:a.values.map(c=>{if(typeof c=="string"){let m=c;return a.formatter&&(m=a.formatter.call(null,m,null)??m),m&&(s.prefix&&(m=s.prefix+m),s.suffix&&(m=m+s.suffix)),{value:c,label:o(m)}}else return c})}:typeof a.values=="function"?s.valueSource={type:"function",func:a.values,isLoading:!1}:Array.isArray(a.values.source)?s.valueSource={type:"static",isLoading:!1,values:a.values.source.map(c=>{var m;return typeof c=="string"?{value:c,label:o(((m=a.formatter)==null?void 0:m.call(null,c,null))||c)}:c})}:s.valueSource={type:"remote",isLoading:!1,key:a.values.key,label:a.values.label,subLabel:a.values.subLabel,renderLabel:a.values.renderLabel,labelTemplate:a.values.labelTemplate,prefix:a.values.prefix,suffix:a.values.suffix,filterable:a.values.filterable,i18n:a.values.i18n,sourceUrl:a.values.source,values:[]},s.dataType=="boolean"&&Array.isArray((r=s.valueSource)==null?void 0:r.values))){const c=s.valueSource.values;c.length<=2&&c.splice(0,0,{value:"",label:""})}n.push(s)}return n}async function Fe(t,l,o,n,r){if(l.sourceUrl){l.isLoading=!0,l.values?l.values.length=0:l.values=[];try{let a=l.sourceUrl;o&&(a=v(a,o));const s=await t.get(a);if(s.isSuccess&&s.value!=null){let c=s.value;if(!Array.isArray(c)&&"rows"in c&&Array.isArray(c.rows)&&(c=c.rows),Array.isArray(c)){const m=c.filter(i=>i&&!0).map(i=>{if(typeof i=="string")return{value:i,label:n?n(i):i};{let d;if(l.renderLabel)d=l.renderLabel(i);else if(l.labelTemplate)d=Ce.render(l.labelTemplate,i);else{if(d=i[l.label||"label"],n&&(d=n(d)),l.subLabel){const g=i[l.subLabel];typeof g=="string"&&(d+=" "+(n?n(g):g))}d&&(l.prefix&&(d=l.prefix+d),l.suffix&&(d=d+l.suffix))}return{value:i[l.key||"value"],label:d}}});r&&m.splice(0,0,{value:void 0,label:""}),l.values.length=0,l.values.push(...m)}}}finally{l.isLoading=!1}}}function mt(t,l){return()=>e.h(u.NIcon,l?{color:l}:null,{default:()=>e.h(t)})}function is(t,l,o){if(t)return e.h(u.NIcon,o?{color:o}:null,{default:()=>e.h(l)})}function cs(t,l,o){return e.h(u.NButton,Object.assign({text:!0,onClick:l},o),{default:()=>e.h(u.NIcon,{size:20},{default:()=>e.h(t)})})}function ds(t,l){const o=t[l];let n="";return typeof o=="number"&&(o>0?n="text-positive":o<0&&(n="text-negative")),e.h("span",{class:n},o==null?void 0:o.toString())}const Pe=e.defineComponent({__name:"HaloDatePicker",props:{value:{},type:{},readonly:{type:Boolean},clearable:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=c=>{const m=Eo(c);return m===void 0?null:m},a=e.ref(r(o.value)),s=c=>{if(c!=null){a.value=c;const m=st(c);n("update:value",m,c)}else n("update:value",null,c)};return e.watch(()=>o.value,c=>a.value=r(c)),(c,m)=>(e.openBlock(),e.createBlock(e.unref(u.NDatePicker),{value:a.value,type:c.type,placeholder:"",disabled:c.readonly,"onUpdate:value":s,clearable:c.clearable},null,8,["value","type","disabled","clearable"]))}}),ht=e.defineComponent({__name:"HaloTimePicker",props:{value:{},type:{},readonly:{type:Boolean},clearable:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=c=>{if(c==null)return null;if(typeof c=="number"){const m=new Date(2e3,1,1);return m.setSeconds(c),m.getTime()}else if(typeof c=="string"){const m=Ao(c);if(!m)return null;const i=new Date(2e3,1,1);return i.setMilliseconds(m.millisecond+m.second*1e3+m.minute*60*1e3+m.hour*60*60*1e3),i.getTime()}else return c instanceof Date?c.getTime():null},a=c=>{if(c!=null){s.value=c;const m=new Date;m.setTime(c);const i=m.getSeconds()+m.getMinutes()*60+m.getHours()*60*60;n("update:value",i)}else n("update:value",null)},s=e.ref(r(o.value));return e.watch(()=>o.value,c=>s.value=r(c)),(c,m)=>(e.openBlock(),e.createBlock(e.unref(u.NTimePicker),{value:s.value,type:c.type,placeholder:"",disabled:c.readonly,"onUpdate:value":a,clearable:c.clearable},null,8,["value","type","disabled","clearable"]))}}),gt=e.defineComponent({__name:"NullableBooleanInput",props:{value:{type:Boolean},readonly:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(typeof o.value=="boolean"?o.value.toString():""),s=[{value:null,label:""},{value:"true",label:r("Yes")},{value:"false",label:r("No")}],c=m=>{const i=de(m);i==null?n("update:value",null):n("update:value",i)};return e.watch(()=>o.value,()=>a.value=typeof o.value=="boolean"?o.value.toString():""),(m,i)=>(e.openBlock(),e.createBlock(e.unref(u.NSelect),{value:a.value,options:s,placeholder:"",disabled:m.readonly,clearable:"","onUpdate:value":i[0]||(i[0]=d=>c(d))},null,8,["value","disabled"]))}}),yt=()=>{const{t}=Z(),l=u.useMessage(),o=u.useDialog(),n=u.useModal(),r=b=>b&&t(b),a=b=>e.h("div",{},b.split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`+t.t(await m.response.data.text()):
|
|
5
|
-
`+t.t(m.response.data.toString()),console.log(
|
|
6
|
-
`):((
|
|
7
|
-
`):o.value},c=()=>{var d,g,f;return m.value?((f=(g=(d=m.value)==null?void 0:d.split(/\r?\n/))==null?void 0:g.map(h=>h.trim()))==null?void 0:f.filter((h,b,N)=>h&&N.indexOf(h)==b)).join(","):""},m=e.ref(s());return e.watch(()=>o.value,()=>{m.value=s()}),(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{title:i.title,show:i.show,preset:"card",style:{width:"350px"},draggable:"",onClose:d[2]||(d[2]=()=>i.$emit("update:show",!1))},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:a,disabled:i.readonly},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["disabled"]),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:d[1]||(d[1]=()=>i.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.message),1)]),_:1}),e.createVNode(e.unref(u.NInput),{value:m.value,"onUpdate:value":d[0]||(d[0]=g=>m.value=g),placeholder:i.placeholder,maxlength:i.maxLength,type:"textarea",readonly:i.readonly,rows:16,class:"halo-form-code"},null,8,["value","placeholder","maxlength","readonly"])]),_:1})]),_:1},8,["title","show"]))}}),bt=e.defineComponent({__name:"HaloModalInput",props:{value:{},label:{},inputReadOnly:{type:Boolean},placeholder:{},config:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(!1),s=o.config;function c(){a.value=!a.value}function m(i){i!=null&&(n("update:value",i),a.value=!1)}return e.watch(()=>o.value,i=>{console.log(`value changed: [${i}]`)}),e.onMounted(()=>{console.log("Modal-Input onMounted")}),(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInput),{readonly:i.inputReadOnly,value:i.value,placeholder:i.placeholder,"onUpdate:value":d[0]||(d[0]=g=>i.$emit("update:value",g))},null,8,["readonly","value","placeholder"]),e.createVNode(e.unref(u.NButton),{ghost:"",onClick:c},{default:e.withCtx(()=>d[4]||(d[4]=[e.createTextVNode(" … ",-1)])),_:1,__:[4]}),e.createVNode(e.unref(u.NModal),{show:a.value,"onUpdate:show":d[2]||(d[2]=g=>a.value=g),title:e.unref(r)(e.unref(s).title??i.label??""),onClose:d[3]||(d[3]=()=>a.value=!1),preset:"card",style:e.normalizeStyle(e.unref(s).modalStyle),"content-style":"display: flex; flex-direction: column;"},{default:e.withCtx(()=>[e.unref(s).componentType?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s).componentType),{key:0,style:e.normalizeStyle(e.unref(s).style),"onUpdate:selected":d[1]||(d[1]=g=>m(g))},null,40,["style"])):e.createCommentVNode("",!0)]),_:1},8,["show","title","style"])]),_:1}))}}),ks={key:0,style:{"flex-grow":"1"}},Ns={key:0,style:{"text-align":"right"}},xs=["readonly","disabled"],Ss=["readonly","disabled"],Ve=e.defineComponent({__name:"FormInput",props:{value:{},readonly:{type:Boolean},formItem:{},label:{},placeholder:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=e.ref(o.value),{t:a}=Z(),s=e.inject("axios"),c=e.ref(void 0),m=e.ref(!1),i=e.ref(!1);function d(f){if(f.target instanceof HTMLInputElement){const h=f.target.files;h!=null&&h.length?r.value=h[0]:r.value=null}}async function g(f){var b,N;const h=(b=o.formItem)==null?void 0:b.valueSource;h&&h.type=="remote"&&h.sourceUrl&&h.filterable&&Fe(s,h,{searchWords:f},S=>h.i18n?a(S):S,((N=o.formItem)==null?void 0:N.nullable)!=!1)}return e.watch(r,f=>{n("update:value",f)}),e.watch(()=>o.value,f=>{r.value=f}),e.onMounted(()=>{var f,h;(h=(f=o.formItem)==null?void 0:f.role)!=null&&h.length&&(m.value=o.formItem.role.includes("list"),c.value=o.formItem.role.map(b=>`halo-form-${b}`).join(" "))}),(f,h)=>{var E,O,j,D,H,B,y,I,A,L,z,F,Y,U,ee,oe,ne,W;const b=e.resolveComponent("n-switch"),N=e.resolveComponent("n-text"),S=e.resolveComponent("n-select"),P=e.resolveComponent("n-input-number"),T=e.resolveComponent("n-checkbox"),k=e.resolveComponent("n-input"),x=e.resolveComponent("n-icon"),V=e.resolveComponent("n-button");return f.formItem?(e.openBlock(),e.createElementBlock("div",ks,[typeof f.formItem.editor=="function"?(e.openBlock(),e.createBlock(e.KeepAlive,{key:0},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.formItem.editor),{value:r.value,"onUpdate:value":h[0]||(h[0]=K=>r.value=K)},null,40,["value"]))],1024)):((E=f.formItem.editor)==null?void 0:E.startsWith("@"))==!0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f.formItem.editor.substring(1)),{key:1,value:r.value,"onUpdate:value":h[1]||(h[1]=K=>r.value=K),config:f.formItem.editorConfig,label:f.formItem.label,readonly:f.readonly,disabled:f.readonly},null,40,["value","config","label","readonly","disabled"])):f.formItem.editor=="modal"?(e.openBlock(),e.createBlock(bt,{key:2,value:r.value,"onUpdate:value":h[2]||(h[2]=K=>r.value=K),config:f.formItem.editorConfig,label:f.formItem.label},null,8,["value","config","label"])):f.formItem.editor=="boolean"&&Array.isArray(f.formItem.values)&&f.formItem.values.length>1?(e.openBlock(),e.createBlock(b,{key:3,value:r.value,"onUpdate:value":h[3]||(h[3]=K=>r.value=K),style:e.normalizeStyle((O=f.formItem.editorConfig)==null?void 0:O.style)},{checked:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.formItem.values[0]),1)]),unchecked:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.formItem.values[1]),1)]),_:1},8,["value","style"])):f.formItem.valueSource?(e.openBlock(),e.createBlock(S,{key:4,value:r.value,"onUpdate:value":h[4]||(h[4]=K=>r.value=K),remote:f.formItem.valueSource.type=="remote",loading:f.formItem.valueSource.isLoading,options:f.formItem.valueSource.values,filterable:f.formItem.valueSource.filterable,multiple:((j=f.formItem.role)==null?void 0:j.includes("list"))==!0,placeholder:"",disabled:f.readonly,clearable:f.formItem.nullable,style:e.normalizeStyle((D=f.formItem.editorConfig)==null?void 0:D.style),onSearch:g},{action:e.withCtx(()=>[f.formItem.valueSource.filterable?(e.openBlock(),e.createElementBlock("div",Ns,[e.createVNode(N,{depth:"3",italic:""},{default:e.withCtx(()=>[e.createElementVNode("small",null,e.toDisplayString(e.unref(a)("Enter text to filter the result list.")),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1},8,["value","remote","loading","options","filterable","multiple","disabled","clearable","style"])):f.formItem.editor=="number"?(e.openBlock(),e.createBlock(P,{key:5,value:r.value,"onUpdate:value":h[5]||(h[5]=K=>r.value=K),min:f.formItem.minValue,max:f.formItem.maxValue,clearable:f.formItem.nullable,readonly:f.readonly,placeholder:f.placeholder,style:e.normalizeStyle((H=f.formItem.editorConfig)==null?void 0:H.style)},null,8,["value","min","max","clearable","readonly","placeholder","style"])):f.formItem.editor=="boolean"&&f.formItem.nullable?(e.openBlock(),e.createBlock(gt,{key:6,value:r.value,"onUpdate:value":h[6]||(h[6]=K=>r.value=K),placeholder:"",disabled:f.readonly,style:e.normalizeStyle((B=f.formItem.editorConfig)==null?void 0:B.style)},null,8,["value","disabled","style"])):f.formItem.editor=="boolean"?(e.openBlock(),e.createBlock(T,{key:7,checked:r.value,"onUpdate:checked":h[7]||(h[7]=K=>r.value=K),disabled:f.readonly,style:e.normalizeStyle((y=f.formItem.editorConfig)==null?void 0:y.style)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:1},8,["checked","disabled","style"])):f.formItem.editor=="datetime"?(e.openBlock(),e.createBlock(Pe,{key:8,value:r.value,"onUpdate:value":h[8]||(h[8]=K=>r.value=K),type:"datetime",placeholder:"",disabled:f.readonly,clearable:f.formItem.nullable,style:e.normalizeStyle((I=f.formItem.editorConfig)==null?void 0:I.style)},null,8,["value","disabled","clearable","style"])):f.formItem.editor=="date"?(e.openBlock(),e.createBlock(Pe,{key:9,value:r.value,"onUpdate:value":h[9]||(h[9]=K=>r.value=K),type:"date",placeholder:"",disabled:f.readonly,clearable:f.formItem.nullable,style:e.normalizeStyle((A=f.formItem.editorConfig)==null?void 0:A.style)},null,8,["value","disabled","clearable","style"])):f.formItem.editor=="time"?(e.openBlock(),e.createBlock(ht,{key:10,value:r.value,"onUpdate:value":h[10]||(h[10]=K=>r.value=K),placeholder:"",disabled:f.readonly,clearable:f.formItem.nullable,style:e.normalizeStyle((L=f.formItem.editorConfig)==null?void 0:L.style)},null,8,["value","disabled","clearable","style"])):f.formItem.editor=="color"?(e.openBlock(),e.createBlock(ut,{key:11,value:r.value,"onUpdate:value":h[11]||(h[11]=K=>r.value=K),placeholder:"",disabled:f.readonly,readonly:f.readonly,clearable:f.formItem.nullable,style:e.normalizeStyle((z=f.formItem.editorConfig)==null?void 0:z.style)},null,8,["value","disabled","readonly","clearable","style"])):f.formItem.editor=="tags"?(e.openBlock(),e.createBlock(wt,{key:12,value:r.value,"onUpdate:value":h[12]||(h[12]=K=>r.value=K),tagSource:f.formItem.tagSource,placeholder:"",disabled:f.readonly,style:e.normalizeStyle((F=f.formItem.editorConfig)==null?void 0:F.style)},null,8,["value","tagSource","disabled","style"])):f.formItem.editor=="image"?(e.openBlock(),e.createElementBlock("input",{key:13,type:"file",onChange:d,readonly:f.readonly,disabled:f.readonly,style:e.normalizeStyle((Y=f.formItem.editorConfig)==null?void 0:Y.style)},null,44,xs)):f.formItem.editor=="file"?(e.openBlock(),e.createElementBlock("input",{key:14,type:"file",onChange:d,readonly:f.readonly,disabled:f.readonly,style:e.normalizeStyle((U=f.formItem.editorConfig)==null?void 0:U.style)},null,44,Ss)):f.formItem.editor=="password"?(e.openBlock(),e.createBlock(k,{key:15,value:r.value,"onUpdate:value":h[13]||(h[13]=K=>r.value=K),class:e.normalizeClass(c.value),placeholder:f.placeholder??"",type:"password",readonly:f.readonly,style:e.normalizeStyle((ee=f.formItem.editorConfig)==null?void 0:ee.style)},null,8,["value","class","placeholder","readonly","style"])):f.formItem.editor=="textarea"?(e.openBlock(),e.createBlock(k,{key:16,value:r.value,"onUpdate:value":h[14]||(h[14]=K=>r.value=K),class:e.normalizeClass(c.value),type:"textarea",placeholder:f.placeholder??"",readonly:f.readonly,style:e.normalizeStyle((oe=f.formItem.editorConfig)==null?void 0:oe.style)},null,8,["value","class","placeholder","readonly","style"])):(e.openBlock(),e.createBlock(k,{key:17,value:r.value,"onUpdate:value":h[16]||(h[16]=K=>r.value=K),class:e.normalizeClass(c.value),placeholder:f.placeholder??"",readonly:f.readonly,clearable:f.formItem.nullable,type:f.formItem.editor,style:e.normalizeStyle((ne=f.formItem.editorConfig)==null?void 0:ne.style)},{suffix:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(V,{key:0,text:"",title:e.unref(a)("If there are multiple items, separate them with commas."),onClick:h[15]||(h[15]=()=>i.value=!0)},{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ha))]),_:1})]),_:1},8,["title"])):e.createCommentVNode("",!0)]),_:1},8,["value","class","placeholder","readonly","clearable","type","style"])),m.value?(e.openBlock(),e.createBlock(Ct,{key:18,show:i.value,"onUpdate:show":h[17]||(h[17]=K=>i.value=K),title:f.formItem.label,readonly:f.readonly,message:e.unref(a)("Please enter a list, separated by lines or commas."),value:r.value,"onUpdate:value":h[18]||(h[18]=K=>r.value=K),style:e.normalizeStyle((W=f.formItem.editorConfig)==null?void 0:W.style)},null,8,["show","title","readonly","message","value","style"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),Is=e.defineComponent({name:"DefaultPropertyForm",components:{FormInput:Ve,NForm:u.NForm,NFormItem:u.NFormItem},props:{readOnly:{type:Boolean,default:!1},method:String,columns:Number,groupLayout:String,formItems:Array,data:Object,original:Object},emits:["itemChange"],setup(t,l){const{t:o}=Z(),n=e.inject("axios"),r=e.ref(null),a=e.ref([]),s=e.ref(t.columns||1),c=e.ref({}),m=e.ref(g(t.formItems)),i=h(t.formItems),d=e.ref(void 0);function g(k){return k?[...new Set(k.map(V=>V.group))].map(V=>({label:V||"General",items:k.filter(E=>E.group==V)})):[]}function f(k){return k.dataType=="boolean"&&!k.nullable?" ":k.label}function h(k){const x={};if(k&&k.length)for(const V of k){const E=[];V.nullable==!1&&V.dataType!="boolean"&&E.push({required:!0,message:o("Must be filled here.")}),E.length&&(x[V.name]=E)}return x}async function b(k,x){var V;if(x.type=="remote"&&x.sourceUrl)Fe(n,x,null,E=>x.i18n?o(E):E,k.nullable);else if(x.type=="function"&&x.func){x.isLoading=!0;try{const E=(V=x.func)==null?void 0:V.call(void 0);E&&(x.values=E)}finally{x.isLoading=!1}}}function N(){var k;(k=t.formItems)==null||k.forEach(x=>{x.valueSource&&(x.valueSource.type=="remote"||x.valueSource.type=="function")&&b(x,x.valueSource)})}function S(k,x){l.emit("itemChange",{item:k,data:t.data,value:x})}function P(k){return!!(k.readonly==!0||t.readOnly==!0||t.method&&Array.isArray(k.readonly)&&k.readonly.includes(t.method))}function T(k){return!!(k.visibility==!0||t.method&&Array.isArray(k.visibility)&&k.visibility.includes(t.method))}return e.onMounted(()=>{N(),t.data&&(c.value=t.data)}),e.watch(()=>t.data,k=>c.value=k||{}),{t:o,formRef:r,formItemsRef:a,getItemLabel:f,originalModel:d,model:c,rules:i,formColumns:s,updateValue:S,formGroups:m,isReadonly:P,isVisible:T}}}),Bs={class:"item-box"},Vs={class:"item-box"},Ms={class:"item-box"};function Ts(t,l,o,n,r,a){const s=e.resolveComponent("form-input"),c=e.resolveComponent("n-text"),m=e.resolveComponent("n-form-item-grid-item"),i=e.resolveComponent("n-grid"),d=e.resolveComponent("n-tab-pane"),g=e.resolveComponent("n-tabs"),f=e.resolveComponent("n-grid-item"),h=e.resolveComponent("n-form");return e.openBlock(),e.createBlock(h,{ref:"formRef",model:t.model,rules:t.rules,"label-placement":"left","label-width":160},{default:e.withCtx(()=>[t.groupLayout=="tab"?(e.openBlock(),e.createBlock(g,{key:0,type:"line"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formGroups,b=>(e.openBlock(),e.createBlock(d,{key:b,name:b.label,tab:t.t(b.label)},{default:e.withCtx(()=>[e.createVNode(i,{cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.items,N=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:N.name,label:t.getItemLabel(N),path:N.name,feedback:N.errorMessage,"validation-status":N.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Bs,[e.createVNode(s,{"form-item":N,value:t.model[N.name],"onUpdate:value":[S=>t.model[N.name]=S,S=>t.updateValue(N,S)],readonly:t.isReadonly(N),label:N.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),N.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(N.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(N)]])),128))]),_:2},1032,["cols"])]),_:2},1032,["name","tab"]))),128)),e.renderSlot(t.$slots,"more-tabs",{},void 0,!0)]),_:3})):t.groupLayout=="column"?(e.openBlock(),e.createBlock(i,{key:1,cols:t.formGroups.length,"x-gap":"8"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formGroups,b=>(e.openBlock(),e.createBlock(f,{key:b},{default:e.withCtx(()=>[e.createVNode(i,{cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.items,N=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:N.name,label:t.getItemLabel(N),path:N.name,feedback:N.errorMessage,"validation-status":N.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[e.createVNode(s,{"form-item":N,value:t.model[N.name],"onUpdate:value":[S=>t.model[N.name]=S,S=>t.updateValue(N,S)],readonly:t.isReadonly(N),label:N.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),N.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(N.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(N)]])),128))]),_:2},1032,["cols"])]),_:2},1024))),128))]),_:1},8,["cols"])):(e.openBlock(),e.createBlock(i,{key:2,cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formItems,b=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:b.name,label:t.getItemLabel(b),path:b.name,feedback:b.errorMessage,"validation-status":b.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[e.createVNode(s,{"form-item":b,value:t.model[b.name],"onUpdate:value":[N=>t.model[b.name]=N,N=>t.updateValue(b,N)],readonly:t.isReadonly(b),label:b.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),b.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(b.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(b)]])),128))]),_:1},8,["cols"]))]),_:3},8,["model","rules"])}const kt=re(Is,[["render",Ts],["__scopeId","data-v-e7319d81"]]),As={class:"pg-value flex-grow-1"},Nt=e.defineComponent({__name:"PropertyGrid",props:{columns:{default:1},hideEmpty:{type:Boolean},data:{},names:{},justify:{}},setup(t){const l=t,{t:o}=Z(),n=e.ref(a());function r(){n.value=a()}function a(){var d;const s=new Array,c=l.data,m=l.names,i=l.hideEmpty;if(c)if(m)for(const g of m)if(typeof g=="string")(!i||c[g])&&s.push({label:o(te(g)),value:c[g],span:1});else{const f={label:o(g.label||te(g.name)),value:c[g.name],span:g.span||1,dataType:g.dataType,role:g.role};f.value!=null&&(f.dataType=="boolean"?f.value=de(f.value)?o("Yes"):o("No"):g.i18n&&(f.value=o((d=f.value)==null?void 0:d.toString()))),(!i||f.value)&&s.push(f)}else if(Array.isArray(c))for(const g of c)(!i||g.value)&&s.push({label:o(te(g.label)),value:g.value,span:1});else for(const g in c)(!i||c[g])&&s.push({label:o(te(g)),value:c[g],span:1});return s}return e.watch(()=>l.data,()=>r()),e.watch(()=>l.hideEmpty,()=>r()),(s,c)=>(e.openBlock(),e.createBlock(e.unref(u.NGrid),{cols:s.columns,"item-responsive":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.filter(m=>!s.hideEmpty||m.value),m=>(e.openBlock(),e.createBlock(e.unref(u.NGridItem),{class:"pg-item",key:m.label,span:m.span},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{label:m.label,value:m.value},()=>[e.createElementVNode("div",{class:"flex-row justify",style:e.normalizeStyle({"justify-content":s.justify})},[e.createVNode(e.unref(u.NText),{class:"pg-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label)+":",1)]),_:2},1024),e.createElementVNode("div",As,[m.role=="percent"?(e.openBlock(),e.createBlock(e.unref(u.NProgress),{key:0,type:"line",percentage:Number(m.value),title:m.value+"%",style:{"margin-top":"auto","max-width":"80%"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value)+" % ",1)]),_:2},1032,["percentage","title"])):(e.openBlock(),e.createBlock(e.unref(u.NText),{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:2},1024))])],4)])]),_:2},1032,["span"]))),128))]),_:3},8,["cols"]))}}),Es={key:0},_s={class:"flex-column gap1 flex-grow-1"},zs={class:"flex-row",style:{"justify-content":"space-between"}},Ls={class:"text-monospace",style:{"font-size":"24pt"}},Ds={key:0},$s=["src"],Rs=["src"],Os={style:{"text-align":"right"}},rn=e.defineComponent({__name:"DetailPage",props:{loading:{type:Boolean},title:{},subject:{},data:{},properties:{},showBarcode:{type:Boolean,default:!0},columns:{default:3}},emits:["refresh"],setup(t){const{t:l}=Z(),o=e.ref(!0);return(n,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(u.NSpin),{show:n.loading,style:{"align-self":"center",margin:"1em"},class:"flex-grow-1 flex-column","content-class":"flex-column flex-grow-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NCard),{embedded:"",style:{width:"1080px"},segmented:{content:!0,footer:"soft"},class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createVNode(e.unref(u.NH2),{style:{"margin-bottom":"2px"}},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon"),n.title?(e.openBlock(),e.createElementBlock("span",Es,e.toDisplayString(e.unref(l)(n.title)),1)):e.createCommentVNode("",!0)]),_:3})]),"header-extra":e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{text:"",onClick:r[0]||(r[0]=()=>n.$emit("refresh"))},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(l)("Refresh")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createElementVNode("div",zs,[e.createElementVNode("div",null,[e.createElementVNode("div",Ls,e.toDisplayString(n.subject),1),n.showBarcode?(e.openBlock(),e.createElementBlock("div",Ds,[e.createElementVNode("img",{src:"/api/core/Barcode/Image?code="+n.subject+"&format=CODE_128&height=30&margin=4,2"},null,8,$s)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[n.showBarcode?(e.openBlock(),e.createElementBlock("img",{key:0,src:"/api/core/QR/Image?code="+n.subject+"&format=CODE_128&width=100&height=100"},null,8,Rs)):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(u.NCollapse),{"display-directive":"show","default-expanded-names":"info"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NCollapseItem),{name:"info",title:e.unref(l)("Property")},{default:e.withCtx(()=>[e.createVNode(Nt,{data:n.data,columns:n.columns,names:n.properties,"hide-empty":o.value},null,8,["data","columns","names","hide-empty"]),e.createElementVNode("div",Os,[e.createVNode(e.unref(u.NButton),{text:"",onClick:r[1]||(r[1]=a=>o.value=!o.value),title:e.unref(l)("More")},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref($a))]),_:1})]),_:1},8,["title"])])]),_:1},8,["title"])]),_:1}),e.renderSlot(n.$slots,"default")])]),_:3})]),_:3},8,["show"])]))}}),js={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Fs=e.defineComponent({name:"ArrowDown",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",js,o[0]||(o[0]=[e.createElementVNode("path",{d:"M24.59 16.59L17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10l10-10l-1.41-1.41z",fill:"currentColor"},null,-1)]))}}),Ps={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Hs=e.defineComponent({name:"ArrowLeft",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ps,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 26l1.41-1.41L7.83 17H28v-2H7.83l7.58-7.59L14 6L4 16l10 10z",fill:"currentColor"},null,-1)]))}}),Gs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ks=e.defineComponent({name:"ArrowRight",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Gs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M18 6l-1.43 1.393L24.15 15H4v2h20.15l-7.58 7.573L18 26l10-10L18 6z",fill:"currentColor"},null,-1)]))}}),Ws={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Zs=e.defineComponent({name:"ArrowUp",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ws,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16 4L6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14L16 4z",fill:"currentColor"},null,-1)]))}}),Ys={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},an=e.defineComponent({name:"Checkbox",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ys,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM6 26V6h20v20z",fill:"currentColor"},null,-1)]))}}),Qs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},sn=e.defineComponent({name:"CheckboxChecked",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Qs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM6 26V6h20v20z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M14 21.5l-5-4.96L10.59 15L14 18.35L21.41 11L23 12.58l-9 8.92z",fill:"currentColor"},null,-1)]))}}),Xs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Js=e.defineComponent({name:"Checkmark",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Xs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9L13 24z",fill:"currentColor"},null,-1)]))}}),qs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},xt=e.defineComponent({name:"ChevronDown",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",qs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z",fill:"currentColor"},null,-1)]))}}),Us={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},vs=e.defineComponent({name:"CollapseAll",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Us,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 15h-2V7H13V5h15a2.002 2.002 0 0 1 2 2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M25 20h-2v-8H8v-2h15a2.002 2.002 0 0 1 2 2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 27H4a2.002 2.002 0 0 1-2-2v-8a2.002 2.002 0 0 1 2-2h14a2.002 2.002 0 0 1 2 2v8a2.002 2.002 0 0 1-2 2zM4 17v8h14.001L18 17z",fill:"currentColor"},null,-1)]))}}),ei={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},cn=e.defineComponent({name:"Cube",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ei,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864zM16 3.158L26.016 9L16 14.842L5.984 9zM5 10.74l10 5.833V28.26L5 22.426zM17 28.26V16.574l10-5.833v11.685z",fill:"currentColor"},null,-1)]))}}),ti={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},dn=e.defineComponent({name:"DocumentDownload",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ti,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 25l-1.414-1.414L26 26.172V18h-2v8.172l-2.586-2.586L20 25l5 5l5-5z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h10zm0-23.6l5.6 5.6H18z",fill:"currentColor"},null,-1)]))}}),oi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},St=e.defineComponent({name:"DocumentExport",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",oi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 21h13.17l-2.58 2.59L25 25l5-5l-5-5l-1.41 1.41L26.17 19H13v2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M22 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 14 2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H4V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L19.59 10z",fill:"currentColor"},null,-1)]))}}),ni={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},It=e.defineComponent({name:"DocumentImport",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ni,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 19H14.83l2.58-2.59L16 15l-5 5l5 5l1.41-1.41L14.83 21H28v-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L21.59 10z",fill:"currentColor"},null,-1)]))}}),li={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},fn=e.defineComponent({name:"Draggable",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",li,o[0]||(o[0]=[e.createStaticVNode('<path d="M10 6h4v4h-4z" fill="currentColor"></path><path d="M18 6h4v4h-4z" fill="currentColor"></path><path d="M10 14h4v4h-4z" fill="currentColor"></path><path d="M18 14h4v4h-4z" fill="currentColor"></path><path d="M10 22h4v4h-4z" fill="currentColor"></path><path d="M18 22h4v4h-4z" fill="currentColor"></path>',6)]))}}),ri={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},ai=e.defineComponent({name:"ExpandAll",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ri,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12 10h14a2.002 2.002 0 0 0 2-2V4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6V2H4v23a2.002 2.002 0 0 0 2 2h4v1a2.002 2.002 0 0 0 2 2h14a2.002 2.002 0 0 0 2-2v-4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6v-8h4v1a2.002 2.002 0 0 0 2 2h14a2.002 2.002 0 0 0 2-2v-4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6V7h4v1a2.002 2.002 0 0 0 2 2zm0-6h14l.001 4H12zm0 20h14l.001 4H12zm0-10h14l.001 4H12z",fill:"currentColor"},null,-1)]))}}),si={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Bt=e.defineComponent({name:"Folder",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",si,o[0]||(o[0]=[e.createElementVNode("path",{d:"M11.17 6l3.42 3.41l.58.59H28v16H4V6h7.17m0-2H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2H16l-3.41-3.41A2 2 0 0 0 11.17 4z",fill:"currentColor"},null,-1)]))}}),ii={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},ci=e.defineComponent({name:"FolderOpen",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ii,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 8h-7.172l-3.414-3.414A2 2 0 0 0 16 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2zM8 26V14h8v6.17l-2.59-2.58L12 19l5 5l5-5l-1.41-1.41L18 20.17V14a2.002 2.002 0 0 0-2-2H8a2.002 2.002 0 0 0-2 2v12H4V6h12l4 4h8v2h-6v2h6v12z",fill:"currentColor"},null,-1)]))}}),di={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},fi=e.defineComponent({name:"IbmCloudPakApplications",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",di,o[0]||(o[0]=[e.createElementVNode("path",{d:"M21 22h-6a2.002 2.002 0 0 1-2-2v-4a2.002 2.002 0 0 1 2-2h6a2.002 2.002 0 0 1 2 2v4a2.002 2.002 0 0 1-2 2zm-6-6v4h6v-4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M11 17H9v-5a2.002 2.002 0 0 1 2-2h6v2h-6z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16 31a.999.999 0 0 1-.504-.136l-12-7A1 1 0 0 1 3 23V9a1 1 0 0 1 .496-.864l12-7a1 1 0 0 1 1.008 0l12 7l-1.008 1.728L16 3.158L5 9.574v12.852l11 6.417l11-6.417V15h2v8a1 1 0 0 1-.496.864l-12 7A.999.999 0 0 1 16 31z",fill:"currentColor"},null,-1)]))}}),ui={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},pi=e.defineComponent({name:"NewTab",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ui,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 26H6V6h10V4H6a2.002 2.002 0 0 0-2 2v20a2.002 2.002 0 0 0 2 2h20a2.002 2.002 0 0 0 2-2V16h-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M26 26H6V6h10V4H6a2.002 2.002 0 0 0-2 2v20a2.002 2.002 0 0 0 2 2h20a2.002 2.002 0 0 0 2-2V16h-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M26 6V2h-2v4h-4v2h4v4h2V8h4V6h-4z",fill:"currentColor"},null,-1)]))}}),mi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},hi=e.defineComponent({name:"NotAvailable",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",mi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M4 15h10v2H4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 15h10v2H18z",fill:"currentColor"},null,-1)]))}}),gi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},yi=e.defineComponent({name:"QrCode",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",gi,o[0]||(o[0]=[e.createStaticVNode('<path d="M24 28v-2h2v2z" fill="currentColor"></path><path d="M18 24v-2h2v2z" fill="currentColor"></path><path d="M18 30h4v-2h-2v-2h-2v4z" fill="currentColor"></path><path d="M26 26v-4h2v4z" fill="currentColor"></path><path d="M28 26h2v4h-4v-2h2v-2z" fill="currentColor"></path><path d="M26 20v-2h4v4h-2v-2h-2z" fill="currentColor"></path><path d="M24 20h-2v4h-2v2h4v-6z" fill="currentColor"></path><path d="M18 20v-2h4v2z" fill="currentColor"></path><path d="M6 22h4v4H6z" fill="currentColor"></path><path d="M14 30H2V18h12zM4 28h8v-8H4z" fill="currentColor"></path><path d="M22 6h4v4h-4z" fill="currentColor"></path><path d="M30 14H18V2h12zm-10-2h8V4h-8z" fill="currentColor"></path><path d="M6 6h4v4H6z" fill="currentColor"></path><path d="M14 14H2V2h12zM4 12h8V4H4z" fill="currentColor"></path>',14)]))}}),wi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},un=e.defineComponent({name:"Search",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",wi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29zM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9z",fill:"currentColor"},null,-1)]))}}),Ci={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},pn=e.defineComponent({name:"SearchLocate",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ci,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 28.586l-4.689-4.688a8.028 8.028 0 1 0-1.414 1.414L28.586 30zM19 25a6 6 0 1 1 6-6a6.007 6.007 0 0 1-6 6z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 12h8v2H2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 2h16v2H2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 7h16v2H2z",fill:"currentColor"},null,-1)]))}}),bi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},ki=e.defineComponent({name:"SelectWindow",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",bi,o[0]||(o[0]=[e.createStaticVNode('<path d="M8 26H4a2.002 2.002 0 0 1-2-2v-4h2v4h4z" fill="currentColor"></path><path d="M2 12h2v4H2z" fill="currentColor"></path><path d="M26 8h-2V4h-4V2h4a2.002 2.002 0 0 1 2 2z" fill="currentColor"></path><path d="M12 2h4v2h-4z" fill="currentColor"></path><path d="M4 8H2V4a2.002 2.002 0 0 1 2-2h4v2H4z" fill="currentColor"></path><path d="M27 32a.997.997 0 0 1-.707-.293l-6.138-6.138l-3.323 4.986a1 1 0 0 1-1.79-.268l-6-20a1 1 0 0 1 1.245-1.245l20 6a1 1 0 0 1 .268 1.79l-4.986 3.323l6.138 6.138a1 1 0 0 1 0 1.414l-4 4A.997.997 0 0 1 27 32zm0-2.414L29.586 27l-7.155-7.155l5.246-3.498l-16.185-4.855l4.855 16.185l3.498-5.246z" fill="currentColor"></path>',6)]))}}),Ni={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},xi=e.defineComponent({name:"TableBuilt",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ni,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 8h-4V4a2.002 2.002 0 0 0-2-2H4a2.002 2.002 0 0 0-2 2v18a2.002 2.002 0 0 0 2 2h4v4a2.002 2.002 0 0 0 2 2h18a2.002 2.002 0 0 0 2-2V10a2.002 2.002 0 0 0-2-2zm-6 14h-8v-5h8zm0-7h-8v-5h8zm-10 0H4v-5h8zM22 4v4H4V4zM4 22v-5h8v5zm24 6H10v-4h12a2.002 2.002 0 0 0 2-2V10h4z",fill:"currentColor"},null,-1)]))}}),Si={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ii=e.defineComponent({name:"TagEdit",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Si,o[0]||(o[0]=[e.createElementVNode("path",{d:"M29.707 7.293l-3-3a1 1 0 0 0-1.414 0L16 13.586V18h4.414l9.293-9.293a1 1 0 0 0 0-1.414zM19.586 16H18v-1.586l5-5L24.586 11zM26 9.586L24.414 8L26 6.414L27.586 8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M10 14a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4zm0-6a2 2 0 1 0 1.998 2.004A2.002 2.002 0 0 0 10 8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M27.006 14.235l-1.414 1.414L28 18.058L18.058 28L4 13.941V4h9.942l4.406 4.407l1.415-1.415l-4.407-4.406A2 2 0 0 0 13.94 2H4a2 2 0 0 0-2 2v9.941a2 2 0 0 0 .586 1.414l14.058 14.06a2.001 2.001 0 0 0 2.828 0l9.943-9.943a2.001 2.001 0 0 0 0-2.828z",fill:"currentColor"},null,-1)]))}}),Bi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Vi=e.defineComponent({name:"Upload",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Bi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 18l1.41 1.41L15 11.83V30h2V11.83l7.59 7.58L26 18L16 8L6 18z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M6 8V4h20v4h2V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4z",fill:"currentColor"},null,-1)]))}}),Mi={style:{"min-height":"50px"}},Vt=e.defineComponent({__name:"ExportModal",props:{show:{type:Boolean},range:{},supportedFormats:{},supportedRanges:{}},emits:["export","close"],setup(t){const l=t,{t:o}=Z(),n=e.ref(null),r=e.ref(c()),a=e.ref(null),s=e.ref(m());function c(){let i=[{label:o("Excel"),value:"excel"},{label:o("Json"),value:"json"},{label:o("Text"),value:"text"},{label:o("XML"),value:"xml"}];const d=l.supportedFormats;return d&&(i=i.filter(g=>d.includes(g.value))),n.value=i.length?i[0].value:null,i}function m(){const i=l.supportedRanges||["empty","selection","page","all"],d=[{label:o("Selection"),value:"selection"},{label:o("Current Page"),value:"page"},{label:o("Search"),value:"search"},{label:o("All"),value:"all"},{label:o("Empty(Template)"),value:"empty"}].filter(g=>i.includes(g.value));return l.range?a.value=l.range:a.value=d.length?d[0].value:null,d}return e.watch(()=>l.range,i=>{i&&(a.value=i)}),(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{show:i.show,preset:"card",title:e.unref(o)("Export Options"),style:{"max-width":"400px"},draggable:"",onClose:d[4]||(d[4]=()=>i.$emit("close"))},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{onClick:d[2]||(d[2]=()=>i.$emit("export",n.value,a.value)),style:{"min-width":"100px"},type:"primary"},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(dn))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(o)("Export")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:d[3]||(d[3]=()=>i.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Mi,[r.value.length>1?(e.openBlock(),e.createBlock(e.unref(u.NFormItem),{key:0,label:e.unref(o)("File Format")},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSelect),{options:r.value,value:n.value,"onUpdate:value":d[0]||(d[0]=g=>n.value=g)},null,8,["options","value"])]),_:1},8,["label"])):e.createCommentVNode("",!0),s.value.length>1?(e.openBlock(),e.createBlock(e.unref(u.NFormItem),{key:1,label:e.unref(o)("Data Range")},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSelect),{options:s.value,value:a.value,"onUpdate:value":d[1]||(d[1]=g=>a.value=g)},null,8,["options","value"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"options")])]),_:3},8,["show","title"]))}}),Ti={class:"flex-column gap1",style:{"justify-content":"center","align-items":"center"}},mn=e.defineComponent({__name:"EmptyDetailView",props:{message:{default:"Please select a object."}},setup(t){const{t:l}=Z();return(o,n)=>(e.openBlock(),e.createElementBlock("div",Ti,[e.createVNode(e.unref(u.NIcon),{depth:5,size:48},{default:e.withCtx(()=>[e.createVNode(e.unref(ki))]),_:1}),e.createVNode(e.unref(u.NText),{depth:"3",style:{opacity:"0.6"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(o.message)),1)]),_:1})]))}}),Ai=e.defineComponent({components:{FullscreenIcon:Ia,ExitFullscreenIcon:xa},emits:["change"],setup(t,l){const{t:o}=Z(),n=Ne(),r=e.computed(()=>n.isFullscreen);function a(i){i||(i=document.body),i.requestFullscreen&&i.requestFullscreen()}function s(){document.exitFullscreen&&document.exitFullscreen()}function c(i){var d;if(r.value)s();else{const g=(d=i.target)==null?void 0:d.closest(".fullscreen-view");a(g)}}function m(){const i=!!document.fullscreenElement;n.setIsFullscreen(i),l.emit("change",i)}return e.onMounted(()=>{document.addEventListener("fullscreenchange",m),document.addEventListener("mozfullscreenchange",m),document.addEventListener("webkitfullscreenchange",m),document.addEventListener("msfullscreenchange",m)}),{t:o,isFullscreen:r,toggleFullscreen:c}}});function Ei(t,l,o,n,r,a){const s=e.resolveComponent("fullscreen-icon"),c=e.resolveComponent("exit-fullscreen-icon"),m=e.resolveComponent("n-icon"),i=e.resolveComponent("n-button");return e.openBlock(),e.createBlock(i,{onClick:t.toggleFullscreen},{icon:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[t.isFullscreen?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0})),t.isFullscreen?(e.openBlock(),e.createBlock(c,{key:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.t("Toggle Fullscreen")),1)]),_:1},8,["onClick"])}const hn=re(Ai,[["render",Ei]]),Mt=t=>{const l=e.inject("axios"),o={},n=[],r=[];t.forEach(g=>{typeof g=="string"?(o[g]=!1,n.push(g)):(o[g.id]=!1,o[g.name]=!1,n.push(g.id),r.push(g))});let a=0;async function s(g){a||await m(g)}function c(){for(let g in o)o[g]=!1}async function m(g){c();const f=n.filter(h=>(h==null?void 0:h.length)==32);if(f.length)try{let h=await l.get(`/api/core/Account/CheckPermissions?permissions=${encodeURIComponent(f.join())}`);h.isSuccess&&h.value!=null?(a++,h.value.forEach(b=>{o[b]=!0;const N=r.find(S=>S.id==b);N&&(o[N.name]=!0)}),g==null||g.call(null,o)):console.error(h.errorMessage)}catch(h){console.error(h)}}function i(){for(let g in o)if(!o[g])return!1;return!0}function d(){for(let g in o)if(o[g])return!0;return!1}return{flags:o,check:m,checkOnce:s,all:i,any:d}},_i={key:0,class:"flex-row",style:{"align-items":"center","justify-content":"space-between",gap:"0.25em","margin-bottom":"1em"}},zi={style:{display:"grid","grid-template-columns":"auto 1fr",gap:"0.5em","margin-top":"1em","align-items":"center"}},gn=200,Tt=e.defineComponent({__name:"GridConfigModal",props:{gridId:{},show:{type:Boolean},pageSize:{},gridColumns:{}},emits:["close","update:pageSize","update:config"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=e.inject("axios"),c=u.useMessage(),m=Mt(["2E2466DDD34847C8B33460E4277A6528"]),i=e.ref(o.pageSize),d=e.ref(!1),g=e.ref(!1),f=x=>x?x.map((V,E)=>({columnId:V.name,title:V.title?r(V.title):r(te(V.name)),visible:!0,sortIndex:E})).sort((V,E)=>V.sortIndex-E.sortIndex):[],h=x=>(V,E)=>{let O=null;if(x=="visible"){const j=Re(V[x]);O=e.h(u.NIcon,{size:"20"},{default:()=>j?e.h(sn):e.h(an)})}else x=="move_up"?O=e.h(u.NIcon,{size:"20"},{default:()=>e.h(Zs)}):x=="move_down"&&(O=e.h(u.NIcon,{size:"20"},{default:()=>e.h(Fs)}));return e.h(u.NButton,{text:!0,onClick:j=>{b(V,E,x),j.stopPropagation()}},{default:()=>O})};function b(x,V,E){switch(E){case"visible":x.visible=!x.visible;break;case"move_up":if(V>0&&T.value){const O=T.value.splice(V,1);T.value.splice(V-1,0,O[0])}break;case"move_down":if(T.value&&V<T.value.length-1){const O=T.value.splice(V,1);T.value.splice(V+1,0,O[0])}break}}const N=()=>{const x=o.gridId;x&&a.confirmToPost("Reset","Are you sure reset the configuration of this data grid?",{url:`/api/core/UserDataGrids/Reset?dataGridId=${x}`,successMessage:"The configuration has been reset, please refresh the page.",success:()=>{n("update:config",null)}})};async function S(){if(!o.gridId)return;const x={dataGridId:o.gridId,pageSize:i.value,columns:T.value.filter(V=>V.columnId).map((V,E)=>({columnId:V.columnId,visible:V.visible,sortIndex:E}))};x.pageSize&&(x.pageSize=Math.max(1,Math.min(gn,x.pageSize)));try{const V=d.value&&g.value,E=await s.post(`/api/core/UserDataGrids/Save?isDefault=${V}`,x);(E==null?void 0:E.isSuccess)==!0?(c.success(r("The configuration has been saved, please refresh the page.")),n("update:pageSize",i.value),n("update:config",x)):c.error((E==null?void 0:E.errorMessage)||r("Error"))}catch(V){c.error((V==null?void 0:V.toString())||r("Error"))}}async function P(){if(o.gridId&&T.value.length)try{const x=d.value&&g.value,V=await s.get(`/api/core/UserDataGrids/Entity?dataGridId=${encodeURIComponent(o.gridId)}?isDefault=${x}`);if(V!=null&&V.isSuccess)if(V.value){i.value=V.value.pageSize;for(const E of V.value.columns){const O=T.value.find(j=>j.columnId==E.columnId);O&&(O.visible=E.visible,O.sortIndex=E.sortIndex),T.value.sort((j,D)=>j.sortIndex-D.sortIndex)}}else T.value=f(o.gridColumns),i.value=o.pageSize;else console.log(V==null?void 0:V.errorMessage)}catch(x){console.log(x)}}e.watch(()=>o.show,x=>{x&&(m.checkOnce(V=>{g.value=V["2E2466DDD34847C8B33460E4277A6528"]}),P())}),e.watch(()=>o.gridColumns,()=>T.value=f(o.gridColumns)),e.watch(d,()=>P());const T=e.ref(f(o.gridColumns)),k=[{title:r("Name"),key:"title"},{title:r("Visible"),key:"visible",width:80,align:"center",fixed:"right",render:h("visible")},{key:"move_up",width:30,align:"center",fixed:"right",render:h("move_up")},{key:"move_down",width:30,align:"center",fixed:"right",render:h("move_down")},{key:"empty",width:20,fixed:"right"}];return(x,V)=>{const E=e.resolveComponent("n-space");return e.openBlock(),e.createBlock(e.unref(u.NModal),{show:x.show,preset:"card",title:e.unref(r)("Config Data Grid"),style:{"max-width":"500px"},draggable:"",onClose:V[3]||(V[3]=()=>x.$emit("close"))},{action:e.withCtx(()=>[e.createVNode(E,{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{onClick:S,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Save")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:N,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Reset")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:V[2]||(V[2]=()=>x.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("System Default")),1),e.createVNode(e.unref(u.NSwitch),{value:d.value,"onUpdate:value":V[0]||(V[0]=O=>d.value=O)},null,8,["value"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.NDataTable),{columns:k,data:T.value,"max-height":450,size:"small"},null,8,["data"]),e.createElementVNode("div",zi,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Page Size")),1),e.createVNode(e.unref(u.NInputNumber),{value:i.value,"onUpdate:value":V[1]||(V[1]=O=>i.value=O),max:gn,min:1,style:{"max-width":"200px"}},null,8,["value"])])]),_:1},8,["show","title"])}}}),yn=e.defineComponent({__name:"HaloButtonSelect",props:{value:{},sourceUrl:{},additionalQuery:{},labelFormatter:{type:Function},keyField:{},labelField:{},subLabelField:{},size:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.inject("axios"),s=e.ref(!1),c=e.ref([]);async function m(d){let g=o.sourceUrl;if(g){const f=o.labelFormatter,h=o.keyField,b=o.labelField,N=o.subLabelField,S=o.additionalQuery;s.value=!0,c.value=[];try{S&&(g=v(g,S,!0));const P=await a.get(g);if(P.isSuccess&&P.value!=null){let T=P.value;if(!Array.isArray(T)&&"rows"in T&&Array.isArray(T.rows)&&(T=T.rows),Array.isArray(T)){const k=T.filter(x=>x&&!0).map(x=>{if(typeof x=="string")return{value:x,label:f?f(x):r(x)};{let V=x[b||"label"];if(f&&(V=f(V)),N){const E=x[N];typeof E=="string"&&(V+=" "+(f?f(E):E))}return{value:x[h||"value"],label:V}}});c.value=k}}}finally{s.value=!1}}}function i(d,g){n("update:value",d,g)}return e.watch(()=>o.sourceUrl,()=>m()),e.onMounted(()=>{m()}),(d,g)=>{const f=e.resolveComponent("n-radio-button"),h=e.resolveComponent("n-radio-group");return e.openBlock(),e.createBlock(h,{value:d.value,size:d.size,"onUpdate:value":i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,b=>(e.openBlock(),e.createBlock(f,{key:b.value,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:1},8,["value","size"])}}}),Ke=re(e.defineComponent({__name:"SearchForm",props:{searchItems:{},searchArgs:{},groupOptions:{},groupBy:{}},emits:["update:searchArgs","update:groupBy"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=e.inject("axios"),c=T=>T==null?void 0:T.map(k=>typeof k=="string"?{label:a(k),value:k}:k),m=()=>{const T=new Array;if(n.searchItems)for(const k of n.searchItems)if(typeof k=="string")T.push({name:k,label:te(k),editor:"text",nullable:!0,visibility:!0,searchMethod:"normal"});else{let x=k;k.searchField&&(x=Object.assign({},k),x.name=k.searchField),T.push(x)}return T},i=()=>{const T={};if(N.forEach(k=>{T[k.name]=null,k.searchMethod=="range"&&(T[k.name+"From"]=null,T[k.name+"To"]=null)}),n.searchArgs)for(const k in T)n.searchArgs[k]!=null&&(T[k]=n.searchArgs[k]);return T},d=()=>{for(const T in S)S[T]=null},g=async T=>{var x,V;const k=T.valueSource;if(k){if(k.type=="remote"&&k.sourceUrl)await Fe(s,k,null,E=>k.i18n?a(E):E,!1),T.nullable==!1&&((x=k.values)!=null&&x.length)&&(S[T.name]=k.values[0].value);else if(k.type=="function"&&k.func){k.isLoading=!0;try{const E=(V=k.func)==null?void 0:V.call(void 0);E&&(k.values=E)}finally{k.isLoading=!1}}}},f=()=>{var k;const T={};for(const x of N){const V=x.searchField??x.name;if(x.searchMethod=="range"){const E=h(V+"From",x);E!=null&&(T[V+"From"]=E);let O=h(V+"To",x);O!=null&&(x.editor=="date"&&typeof O=="string"&&(O=se(O,ge).add(1,"days").format(ge)),T[V+"To"]=O)}else{const E=h(V,x);E!=null&&(((k=x.role)==null?void 0:k.includes("list"))==!0&&typeof E=="string"?E.includes(",")?T[V]=E.split(","):T[V]=[E]:T[V]=E)}}return T},h=(T,k)=>{var V,E;let x=S[T];if(!(typeof x=="string"&&(x=x.trim(),x==""&&!k.valueSource))){if(Array.isArray((V=k.valueSource)==null?void 0:V.values)){const O=(E=k.valueSource)==null?void 0:E.values;if(O){if(O.some(j=>j.value==S[T]))x=S[T];else if(x=="")return;if(k.dataType=="boolean"){if(typeof x=="boolean")return x;const j=O.findIndex(D=>D.value==x);return j>-1&&(O.length==2?x=j==0:O.length==3&&j>0&&(x=j==1)),typeof x=="boolean"?x:Oe(x,k.dataType,k.role)}}}return Oe(x,k.dataType,k.role)}},b=()=>{r("update:searchArgs",f())},N=m(),S=e.reactive(i()),P=e.ref(c(n.groupOptions));return e.watch(()=>n.groupOptions,()=>P.value=c(n.groupOptions)),e.onMounted(()=>{i(),N.forEach(T=>{T.valueSource&&(T.valueSource.type=="remote"||T.valueSource.type=="function"?g(T):T.valueSource.type=="static")})}),l({reset:d,updateValues:b,pickValues:f}),(T,k)=>(e.openBlock(),e.createBlock(e.unref(u.NForm),{model:S,"label-placement":"left","label-width":"auto"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NGrid),{"x-gap":"12",cols:"1 700:2 1200:3"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N),x=>(e.openBlock(),e.createBlock(e.unref(u.NGridItem),{key:x.name},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NFormItem),{label:e.unref(a)(x.label==null?x.name:x.label),path:x.name},{default:e.withCtx(()=>[x.searchMethod=="range"?(e.openBlock(),e.createBlock(e.unref(u.NInputGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ve,{"form-item":x,value:S[x.name+"From"],"onUpdate:value":V=>S[x.name+"From"]=V,style:{"flex-grow":"1"},onInput:k[0]||(k[0]=()=>b())},null,8,["form-item","value","onUpdate:value"]),e.createVNode(e.unref(u.NInputGroupLabel),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("to")),1)]),_:1}),e.createVNode(Ve,{"form-item":x,value:S[x.name+"To"],"onUpdate:value":V=>S[x.name+"To"]=V,style:{"flex-grow":"1"},onInput:k[1]||(k[1]=()=>b())},null,8,["form-item","value","onUpdate:value"])]),_:2},1024)):(e.openBlock(),e.createBlock(Ve,{key:1,"form-item":x,value:S[x.name],"onUpdate:value":V=>S[x.name]=V,onInput:k[2]||(k[2]=()=>b())},null,8,["form-item","value","onUpdate:value"]))]),_:2},1032,["label","path"])]),_:2},1024))),128))]),_:1}),P.value?(e.openBlock(),e.createBlock(e.unref(u.NGrid),{key:0,"x-gap":"12",cols:"1 700:2 1200:3"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NGridItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NFormItem),{label:e.unref(a)("Group By")},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSelect),{value:T.groupBy,options:P.value,"onUpdate:value":k[3]||(k[3]=x=>T.$emit("update:groupBy",x))},null,8,["value","options"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["model"]))}}),[["__scopeId","data-v-8b391a0f"]]),Li={class:"flex-row gap05"},At=e.defineComponent({__name:"TagsView",props:{tags:{},tagSource:{},size:{default:"small"}},setup(t){const l=t,o=Ne(),n=ie(),r=e.ref([]);async function a(){var c;const s=((c=l.tags)==null?void 0:c.map(m=>({value:m,text:m})))??[];if(r.value=s,l.tagSource){const m=await o.fetchSharedData(`tags:${l.tagSource}`,async()=>await n.get({url:`/api/core/CommonCodeItems/list?commonCode=${l.tagSource}`})??[]);for(const i of s){const d=m.find(g=>g.code==i.value);d&&(i.desc=d.name,i.color=d.color)}r.value=[...s]}}return e.watch(()=>l.tags,()=>a()),e.onMounted(()=>a()),(s,c)=>(e.openBlock(),e.createElementBlock("div",Li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,m=>(e.openBlock(),e.createBlock(e.unref(u.NTag),{key:m.value,title:m.desc,color:{borderColor:m.color},size:s.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1032,["title","color","size"]))),128))]))}}),We=e.defineComponent({__name:"HaloGrid",props:{keyField:{default:"__key__"},checkable:{type:Boolean,default:!0},dragSorting:{type:Boolean},columns:{},data:{},withEdit:{type:Boolean,default:!1},withDelete:{type:Boolean,default:!1},withDetails:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},maxHeight:{},height:{},selectedId:{},selectedIds:{},flexHeight:{type:Boolean,default:!0}},emits:["editRow","deleteRow","showDetails","columnButtonClick","update:selectedIds","update:selectedId","update:sorter","rowSorting"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=ce.useRouter(),c=yt(),m=e.ref(void 0),i=e.ref(P()),d=e.ref([]),g=e.ref(void 0),f=e.ref(h());function h(){const y={};return typeof n.height=="number"?y.height=`${n.height}px`:typeof n.height=="string"&&(y.height=n.height),y}function b(){var A;const y=d.value,I=(A=n.data)==null?void 0:A.filter(L=>y.includes(L[n.keyField]));r("update:selectedIds",y,I),y.length&&r("update:selectedId",y[0])}function N(y){return y[n.keyField]}function S(y,I){let A=0,L=0;for(const z of I){let F,Y;if(typeof z=="string")F={key:z,title:a(te(z))};else if(!(z.behavior=="none"||z.visible==!1))if(z.behavior=="link"||z.behavior=="router-link")F={key:z.name||`column_${A}`,title:z.title?a(z.title):void 0,align:z.align,fixed:z.fixed||void 0,width:z.width,sorter:z.sortable==!0,render:z.render||T(z)};else if(z.behavior=="button")F={key:z.name||`column_${A}`,title:z.title?a(z.title):void 0,align:z.align||"center",fixed:z.fixed||void 0,width:z.width,sorter:z.sortable==!0,render:z.render||T(z)};else{let U=z.align,ee=[];if(!z.display)switch(z.dataType){case"number":U=U||"right",Y=60,ee.push("text-num");break;case"boolean":U=U||"center",Y=60;break;case"date":Y=100;break;case"datetime":Y=180;break;case"timespan":U=U||"center",Y=80;break;case"time":Y=80,ee.push(`text-${z.dataType}`);break}if(F={key:z.name||`column_${A}`,title:z.title==null?a(te(z.name)):z?a(z.title):void 0,titleAlign:"center",align:U,width:z.width||Y,sorter:z.sortable==!0,minWidth:z.minWidth,resizable:!0,fixed:z.fixed,render:z.render||T(z)},typeof z.className=="string"?ee.push(z.className):Array.isArray(z.className)&&ee.push(...z.className),ee.length&&(F.className=ee.join(" ")),!F.width&&F.minWidth&&(F.width=F.minWidth),z.referencePage&&typeof F.width=="number"&&(F.width+=30),z.role&&z.role.includes("qr")&&typeof F.width=="number"&&(F.width+=30),z.role&&z.role.includes("percent")&&typeof F.width=="number"&&(F.width+=30,F.align||(F.align="right")),(z.textOverflow=="ellipsis"||z.textOverflow=="clip")&&(F.ellipsis={tooltip:!0},F.resizable=!0,Y||(Y=400)),z.children&&z.children.length){const oe=[];S(oe,z.children),F.children=oe,oe.some(ne=>ne.width)&&(F.width=void 0)}}F&&(y.push(F),typeof z=="object"&&typeof z.width=="number"?L+=z.width:L+=Y||150)}return L}function P(){if(n.columns){const y=[];let I=0;return n.checkable&&(y.push({type:"selection",fixed:"left"}),I+=30),I+=S(y,n.columns),n.withEdit&&(y.push({key:"btn-edit",width:30,fixed:"right",render(A,L){return e.h(u.NButton,{text:!0,titie:a("Edit"),onClick:z=>{r("editRow",A,L),z.stopPropagation()}},{default:()=>e.h(u.NIcon,{color:"#5C6BC0",size:"20"},{default:()=>e.h(Fo)})})}}),I+=30),n.withDelete&&(y.push({key:"btn-delete",width:30,fixed:"right",render(A,L){return e.h(u.NButton,{text:!0,titie:a("Delete"),onClick:z=>{r("deleteRow",A,L),z.stopPropagation()}},{default:()=>e.h(u.NIcon,{color:"#f44336",size:"20"},{default:()=>e.h(jo)})})}}),I+=30),n.withDetails&&(y.push({key:"btn-details",width:30,fixed:"right",render(A,L){return e.h(u.NButton,{text:!0,titie:a("Details"),onClick:z=>{r("showDetails",A,L),z.stopPropagation()}},{default:()=>e.h(u.NIcon,{color:"#4CAF50",size:"20"},{default:()=>e.h(Qa)})})}}),I+=30),n.dragSorting&&(y.push({key:"drag-sorting-handler",width:30,fixed:"right",render(){return e.h(u.NIcon,{color:"#90A4AE",size:"20",class:"drag-sorting-handle"},{default:()=>e.h(fn)})}}),I+=30),m.value=I,y}else return[]}function T(y){return(I,A)=>{var ee,oe,ne;let L=null;const z=y.display||y.name;if(y.template&&typeof y.template=="function")L=y.template.call(null,I,A);else if(y.dataType=="bool"||y.dataType=="boolean"){const W=Re(I[z]);if(y.values&&y.values.length>1)return y.i18n?a(W?y.values[0]:y.values[1]):W?y.values[0]:y.values[1];W!=null?L=e.h(u.NIcon,{size:"20",class:W?"cell-checked":"cell-unchecked"},{default:()=>W?e.h(Js):e.h(hi)}):L=e.h("span")}else if(y.dataType=="date")L=zo(Vo(I[z]));else if(y.dataType=="time")L=_o(To(I[z]));else if(y.dataType=="timespan")L=Lo(I[z]);else{let W=I[z];y.formatter?W=y.formatter(W,I):y.template&&(W=Ce.render(y.template,I)),typeof W=="string"&&(y.prefix&&(W=y.prefix+W),y.suffix&&(W=W+y.suffix),y.i18n&&(W=a(W))),L=W}let F=y.role;if(F&&!Array.isArray(F)&&(F=[F]),F!=null&&F.length)if(F.includes("tag")){let W;Array.isArray(I[z])?W=I[z]:W=(ne=(oe=(ee=I[z])==null?void 0:ee.toString())==null?void 0:oe.split(","))==null?void 0:ne.filter(K=>K.length),W&&W.length&&(L=e.h(At,{tags:W,tagSource:y.tagSource},{}))}else L&&(L=e.h("span",{class:F.map(W=>{switch(W){case"status":return`status-tag status-${I[z]}`;default:return`halo-form-${W}`}}).join(" ")},[L]));const Y=typeof y.href=="function"?y.href(I):y.href;if(y.behavior=="link")Y?L=e.h("a",{href:Ce.render(Y,I),target:"_blank"},[L]):L=e.h("a",{href:"#",onClick:W=>{var K;r("columnButtonClick",y.name,I,A),(K=y==null?void 0:y.click)==null||K.call(null,I,A),W.stopPropagation()}},[L]);else if(y.behavior=="router-link"&&Y){const W=L;L=e.h(ce.RouterLink,{to:Ce.render(Y,I)},{default:()=>W})}else if(y.behavior=="button"){const W=L;L=e.h(u.NButton,{size:"tiny",tag:"a",onClick:K=>{var fe;r("columnButtonClick",y.name,I,A),(fe=y==null?void 0:y.click)==null||fe.call(null,I,A),K.stopPropagation()}},{default:()=>W})}const U=[];if(y.role&&(y.role.includes("qr")&&U.push(e.h(u.NButton,{quaternary:!0,size:"tiny",class:"btn-cell-qr",title:a("QR Code"),onClick:()=>x(y,A)},{default:()=>e.h(u.NIcon,{},{default:()=>e.h(yi)})})),y.role.includes("percent"))){const W=Ro(I[z]);U.push(e.h(u.NProgress,{showIndicator:!1,type:"circle",status:W&&W>100?"error":"success",percentage:W||0,class:"percent-mark",style:"width: 1em; margin-bottom: auto; margin-top: auto"}))}return y.referencePage&&U.push(e.h(u.NButton,{quaternary:!0,size:"tiny",class:"btn-cell-ref",title:a("Details"),onClick:()=>k(y,A)},{default:()=>e.h(u.NIcon,{},{default:()=>e.h(un)})})),U.length?e.h("div",{style:"display: flex; justify-content: space-between;"},[e.h("div",{style:"flex-shrink: 1; flex-grow: 1; overflow: hidden;"},[L]),e.h("div",{},...U)]):L}}function k(y,I){if(Array.isArray(n.data)&&I!=null&&I>=0&&I<n.data.length&&y.referencePage){const A=n.data[I],L=Ce.render(y.referencePage,A);L.startsWith("/")&&s.push({path:L})}}function x(y,I){if(Array.isArray(n.data)&&I!=null&&I>=0&&I<n.data.length){const A=n.data[I][y.name];if(typeof A=="string"){const L=a(y.title??te(y.name));c.showQrModal(A,L)}}}function V(y,I){return{onClick:A=>{if(A.target instanceof HTMLElement&&A.target.classList.contains("n-checkbox-box__border")==!1){const L=N(y);L!==void 0&&!d.value.includes(L)&&(d.value=[L],b())}},ondblclick:A=>{A.target instanceof HTMLTableCellElement&&r("editRow",y,I)}}}function E(y,I){I!=!1||!n.multiSelect?(d.value=[y],b()):d.value.includes(y)||(d.value.push(y),b())}function O(y,I){if(I!=!1||!n.multiSelect)d.value=y,b();else{const A=d.value.slice();for(const L of y)A.includes(L)||A.push(L);d.value.length<A.length&&(d.value=A,b())}}function j(y){n.multiSelect?d.value=y:d.value=y.slice(0,1),b()}function D(){return d.value}function H(y,I){Array.isArray(n.data)&&y>-1&&ln(n.data,y,I)}function B(){var A;const y=(A=g.value)==null?void 0:A.$el,I=y==null?void 0:y.querySelector("tbody.n-data-table-tbody");if(I&&Array.isArray(n.data)){const L=e.ref(n.data);Wt.useDraggable(I,L,{animation:150,ghostClass:"draging-ghost",handle:".drag-sorting-handle",onUpdate(z){var U;const F=z.oldIndex,Y=z.newIndex;if(F!=null&&Y!=null&&n.data&&F<((U=n.data)==null?void 0:U.length)){const ee=n.data[F];console.log(F,Y,ee==null?void 0:ee.id),r("rowSorting",{oldIndex:F,newIndex:Y,source:ee,updateGrid:()=>H(F,Y)})}}})}}return e.watch(()=>n.data,y=>{const A=y.map(L=>L[n.keyField]);d.value=d.value.filter(L=>A.includes(L)),b()}),e.watch(()=>n.columns,()=>i.value=P()),e.watch(()=>n.height,()=>f.value=h()),e.onMounted(()=>{n.dragSorting&&setTimeout(()=>{B()},500)}),l({selectRow:E,selectRows:O,getSelectedRowKeys:D}),(y,I)=>(e.openBlock(),e.createBlock(e.unref(u.NDataTable),{ref_key:"nTableRef",ref:g,columns:i.value,data:y.data,size:"small","row-key":N,"row-props":V,loading:y.loading,"single-line":!1,"max-height":y.maxHeight,"scroll-x":m.value,striped:"",remote:"","flex-height":y.flexHeight,style:e.normalizeStyle(f.value),"checked-row-keys":d.value,"onUpdate:checkedRowKeys":[I[0]||(I[0]=A=>d.value=A),j],"scrollbar-props":{trigger:"none"},"onUpdate:sorter":I[1]||(I[1]=A=>y.$emit("update:sorter",A))},null,8,["columns","data","loading","max-height","scroll-x","flex-height","style","checked-row-keys"]))}}),Di={class:"flex-column gap05"},$i={class:"flex-row gap05",style:{"justify-content":"space-between"}},Ze=e.defineComponent({__name:"SearchPanel",props:{title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean},additionQuery:{}},emits:["searchBack","resultSelected"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=u.useMessage(),c=e.inject("axios"),m=e.ref(null),i=e.ref(1),d=e.ref(0),g=e.ref(!1),f=e.ref(Array()),h=e.ref(Array());let b=!0;function N(V){if(V){const E=V.rows;E.forEach((O,j)=>{O.__key__=j}),f.value=E,d.value=V.pageCount||1,i.value=V.pageIndex+1}}function S(){f.value=[],d.value=0,i.value=1}function P(V){T(V)}async function T(V){var j,D,H;const E=((j=m.value)==null?void 0:j.pickValues())||{},O=(D=n.config)==null?void 0:D.searchAction;if(E&&O){const B={pageSize:((H=n.config)==null?void 0:H.pageSize)||10,pageIndex:(V||i.value)-1};Object.assign(B,E),n.additionQuery&&(typeof n.additionQuery=="function"?Object.assign(B,n.additionQuery.call(null)):Object.assign(B,n.additionQuery));try{g.value=!0;const y=await c.post(O,B);y.isSuccess&&y.value!=null?(b=!1,N(y.value)):s.error(a(y.errorMessage||"Error"))}catch(y){s.error(y==null?void 0:y.toString())}finally{g.value=!1}}}function k(){const V=h.value;if(V!=null&&V.length){const E=f.value.filter(O=>V.includes(O.__key__));r("searchBack",E,n.config),n.autoClose==!0&&close()}}function x(){n.searchOnMounted&&b&&T(1)}return e.watch(()=>n.config,V=>{V&&(b=!0),S()}),e.onMounted(()=>x()),l({searchPage:T,returnAndClose:k}),(V,E)=>(e.openBlock(),e.createElementBlock("div",Di,[e.createVNode(Ke,{ref_key:"searchFormRef",ref:m,cols:2,"search-items":V.config.searchFields},null,8,["search-items"]),e.createElementVNode("div",$i,[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:E[0]||(E[0]=()=>T(1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Search")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:E[1]||(E[1]=()=>{var O;return(O=m.value)==null?void 0:O.reset()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Reset")),1)]),_:1})]),e.createVNode(We,{class:"flex-grow-1",style:{height:"200px"},columns:V.config.gridColumns,loading:g.value,data:f.value,multiSelect:V.multiSelect,selectedIds:h.value,"onUpdate:selectedIds":[E[2]||(E[2]=O=>h.value=O),E[3]||(E[3]=(O,j)=>V.$emit("resultSelected",O,j))],onDblclickRow:E[4]||(E[4]=O=>V.$emit("searchBack",[O]))},null,8,["columns","loading","data","multiSelect","selectedIds"]),e.createVNode(e.unref(u.NPagination),{page:i.value,"onUpdate:page":[E[5]||(E[5]=O=>i.value=O),P],"page-count":d.value,"show-quick-jumper":"",style:{"align-self":"self-end"}},null,8,["page","page-count"])]))}}),Ri={key:0,class:"flex-column flex-grow-1"},Oi={class:"flex-row",style:{"align-items":"center"}},ji={style:{"margin-left":"0.5em"}},Fi={class:"flex-row",style:{"justify-content":"space-between"}},Et=e.defineComponent({__name:"SearchModal",props:{show:{type:Boolean},width:{},height:{},title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean,default:!1},additionQuery:{}},emits:["searchBack","update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(void 0);let s=!0;const c=e.ref([]);function m(f,h){c.value=h??[]}function i(f){f&&f.length&&n("searchBack",f,o.config)}function d(){c.value&&c.value.length&&(n("searchBack",c.value,o.config),o.autoClose==!0&&g())}function g(){n("update:show",!1)}return e.watch(()=>o.config,f=>{f&&(s=!0)}),e.watch(a,()=>{var f;o.searchOnMounted&&s&&(s=!1,(f=a.value)==null||f.searchPage(1))}),e.watch(()=>o.show,f=>{var h;f&&o.searchOnMounted&&s&&(s=!1,(h=a.value)==null||h.searchPage(1))}),(f,h)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{show:f.show,style:e.normalizeStyle({width:f.width??"900px",height:f.height??"650px"}),preset:"card","display-directive":"show","content-class":"flex-column",onClose:h[0]||(h[0]=()=>g())},{header:e.withCtx(()=>[e.createElementVNode("div",Oi,[e.createVNode(e.unref(u.NIcon),{color:"#3F51B5",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createElementVNode("span",ji,e.toDisplayString(e.unref(r)(f.title)),1)])]),action:e.withCtx(()=>[e.createElementVNode("div",Fi,[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})])]),default:e.withCtx(()=>[f.config?(e.openBlock(),e.createElementBlock("div",Ri,[e.createVNode(Ze,{ref_key:"searchPanelRef",ref:a,class:"flex-grow-1",config:f.config,"multi-select":f.multiSelect,"auto-close":f.autoClose,"addition-query":f.additionQuery,onResultSelected:m,onSearchBack:i},null,8,["config","multi-select","auto-close","addition-query"])])):e.createCommentVNode("",!0)]),_:1},8,["show","style"]))}}),Pi={style:{"margin-bottom":"12px","min-height":"100px"}},Ye=re(e.defineComponent({__name:"ImportModal",props:{title:{default:"Import File"},multiple:{type:Boolean},action:{},accept:{},show:{type:Boolean},timeout:{},additionParams:{},templateCode:{},templateUrl:{},beforeUpload:{},disabled:{type:Boolean}},emits:["uploaded","update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=u.useMessage(),s=u.useLoadingBar(),c=e.inject("axios"),m=ie(),i=e.reactive({}),d=e.ref(!1),g=e.ref(new Array),f=e.ref(!1),h=e.ref(void 0),b=e.ref(N());function N(){if(o.templateUrl)return o.templateUrl;if(o.templateCode)return`/api/core/DataExchangeTemplates/ImportTemplate?templateCode=${o.templateCode}`}async function S(){var x;if(f.value)return a.warning("Is uploading..."),!1;let k=typeof o.action=="function"?o.action.call(void 0):o.action;if(k&&o.templateCode&&(k=v(k,{templateCode:o.templateCode})),(x=g.value)!=null&&x.length&&k){if(!o.multiple&&g.value.length>1)return a.error("Only one file can be uploaded."),!1;if(o.beforeUpload&&o.beforeUpload.call(null,{files:g})==!1)return!1;try{f.value=!0;const V=g.value.filter(E=>E.status=="pending"||E.status=="error").map(E=>P(E,k));await Promise.all(V),g.value.every(E=>E.status=="finished")&&(g.value.length=0,a.success(r("Upload Success.")),d.value=!1)}catch(V){h.value=(V==null?void 0:V.toString())||r("Error")}finally{f.value=!1}}}async function P(k,x){const V=new FormData;V.append("file",k.file);const E={timeout:o.timeout||1e3*60*10,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:j=>{k.percentage=Math.round(j.loaded*100/j.total)}};k.percentage=0,k.status="uploading";let O=x;o.additionParams&&(O=v(x,o.additionParams)),i&&(O=v(O,i));try{const j=await c.post(O,V,E);j.isSuccess?(k.status="finished",n("uploaded",j.value),n("update:show",!1)):(k.status="error",k.errorMessage=j.errorMessage,h.value=r(j.errorMessage||"Error"))}catch(j){k.status="error",k.errorMessage=j==null?void 0:j.toString(),h.value=(j==null?void 0:j.toString())||r("Error")}}async function T(){const k=b.value;if(k)try{s.start(),await me(k)}catch(x){a.error(await m.getHttpErrorMessage(x,"Error"))}finally{s.finish()}}return e.watch(()=>o.show,()=>{h.value=void 0,g.value=[]}),(k,x)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{show:k.show,"onUpdate:show":x[3]||(x[3]=V=>k.$emit("update:show",V)),preset:"card",title:e.unref(r)(k.title),style:{"max-width":"600px"},draggable:""},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px"},onClick:S,disabled:k.disabled||!k.action||f.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Vi))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Upload")),1)]),_:1},8,["disabled"]),e.createVNode(e.unref(u.NSpace),null,{default:e.withCtx(()=>[b.value?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,style:{"min-width":"100px"},onClick:T},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(dn))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Download Template")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:x[2]||(x[2]=()=>k.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpin),{show:f.value},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NUpload),{multiple:k.multiple,"default-upload":!1,"file-list":g.value,"onUpdate:fileList":x[0]||(x[0]=V=>g.value=V),accept:k.accept,disabled:!k.action,"show-retry-button":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NUploadDragger),null,{default:e.withCtx(()=>[e.createElementVNode("div",Pi,[e.createVNode(e.unref(u.NIcon),{size:"48",depth:3},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua))]),_:1})]),e.createVNode(e.unref(u.NText),{style:{"font-size":"16px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Click or drag files to this area to upload.")),1)]),_:1})]),_:1})]),_:1},8,["multiple","file-list","accept","disabled"]),e.renderSlot(k.$slots,"options",{options:i},void 0,!0)]),_:3})]),_:3},8,["show"]),h.value?(e.openBlock(),e.createBlock(e.unref(u.NAlert),{key:0,type:"error",class:"my-1",closable:"",onClose:x[1]||(x[1]=()=>h.value=void 0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["show","title"]))}}),[["__scopeId","data-v-18129d6e"]]),_t=e.defineComponent({__name:"InputModal",props:{title:{},message:{},value:{},placeholder:{},maxLength:{},type:{},lines:{},clearable:{type:Boolean},show:{type:Boolean},submitting:{type:Boolean}},emits:["close","commit","update:show","update:value"],setup(t,{emit:l}){var m;const o=t,n=l,{t:r}=Z(),a=e.ref((m=o.value)==null?void 0:m.toString()),s=()=>{n("close"),n("update:show",!1)},c=()=>{n("commit",a.value),n("update:value",a.value)};return e.watch(()=>o.value,i=>a.value=i==null?void 0:i.toString()),(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{title:i.title,show:i.show,preset:"card",style:{width:"400px"},onClose:s},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},loading:i.submitting,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["loading"]),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpin),{show:i.submitting},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.message),1)]),_:1}),e.createVNode(e.unref(u.NInput),{value:a.value,"onUpdate:value":d[0]||(d[0]=g=>a.value=g),placeholder:i.placeholder,maxlength:i.maxLength,type:i.type,rows:i.lines,clearable:i.clearable},null,8,["value","placeholder","maxlength","type","rows","clearable"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title","show"]))}}),Hi={key:0,class:"flex-row",style:{"align-items":"center","justify-content":"space-between",gap:"0.25em","margin-bottom":"1em"}},Gi={key:1},Ki={class:"flex-row gap05"},Wi={style:{display:"grid","grid-template-columns":"auto 1fr",gap:"0.5em","align-items":"center"}},Zi={class:"flex-row gap05",style:{"justify-content":"space-between"}},wn=200,Yi=e.defineComponent({__name:"GridConfigBox",props:{gridId:{},pageSize:{},gridColumns:{}},emits:["close","reset","update:pageSize","update:config"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=Mt(["2E2466DDD34847C8B33460E4277A6528"]),c=ce.useRouter(),m=e.ref(o.pageSize),i=e.ref(!1),d=e.ref(!1),g=e.ref(void 0),f=e.ref(void 0),h=e.ref(!1),b=e.ref(!1),N=B=>B?B.map((y,I)=>({columnId:y.name,title:y.title?r(y.title):r(te(y.name)),visible:!0,sortIndex:I})).sort((y,I)=>y.sortIndex-I.sortIndex):[],S=e.ref(N(o.gridColumns)),P=()=>{const B=o.gridId;if(!B)return;const I=i.value&&d.value?`/api/core/UserDataGrids/ResetGlobal?dataGridId=${B}`:`/api/core/UserDataGrids/Reset?dataGridId=${B}`;a.confirmToPost("Reset","Are you sure reset the configuration of this data grid?",{url:I,successMessage:"The configuration has been reset, please refresh the page.",success:()=>{n("reset")}})},T=()=>{if(!o.gridId)return;const B={dataGridId:o.gridId,pageSize:m.value,columns:S.value.filter(A=>A.columnId).map(A=>({columnId:A.columnId,visible:A.visible,customTitle:A.customTitle,sortIndex:A.sortIndex}))};B.pageSize&&(B.pageSize=Math.max(1,Math.min(wn,B.pageSize)));const y=i.value&&d.value,I=y?`/api/core/UserDataGrids/SaveGlobal?isDefault=${y}`:`/api/core/UserDataGrids/Save?isDefault=${y}`;a.post({url:I,data:B,successMessage:"The configuration has been saved, please refresh the page.",success:()=>{n("update:pageSize",m.value),n("update:config",B)}})},k=()=>{if(!o.gridId||!S.value.length)return;const B=i.value&&d.value;a.get({url:`/api/core/UserDataGrids/${encodeURIComponent(o.gridId)}?isDefault=${B}`,callback:y=>{if(y){m.value=y.pageSize;for(const I of y.columns){const A=S.value.find(L=>L.columnId==I.columnId);A&&(A.visible=I.visible,A.sortIndex=I.sortIndex,A.customTitle=I.customTitle),S.value.sort((L,z)=>L.sortIndex-z.sortIndex)}}else S.value=N(o.gridColumns),m.value=o.pageSize}})},x=()=>{var I;const B=(I=g.value)==null?void 0:I.$el,y=B==null?void 0:B.querySelector("tbody.n-data-table-tbody");y&&S&&Wt.useDraggable(y,S,{animation:150,ghostClass:"draging-ghost",handle:".drag-sorting-handle",onUpdate:()=>{const A=S.value;for(let L=0;L<A.length;L++)A[L].sortIndex=L;console.log(S.value)}})},V=B=>{var y;h.value=!1,f.value&&(f.value.customTitle=B,i.value&&a.post({url:"/api/core/UserDataGrids/UpdateCustomTitleGlobal",data:{dataGridId:o.gridId,columnId:(y=f.value)==null?void 0:y.columnId,customTitle:B}}))},E=()=>{o.gridId&&a.downloadFile({url:`/api/core/UserDataGrids/export?dataGridId=${encodeURIComponent(o.gridId)}`})},O=B=>e.h("div",{class:"flex-row gap05"},[B.customTitle?e.h("span",null,`${B.customTitle} (${B.title})`):e.h("span",null,`${B.title}`),e.h(u.NButton,{text:!0,title:r("Edit"),class:"edit-title-btn",onClick:()=>{f.value=B,h.value=!0}},{default:()=>e.h(u.NIcon,{size:16},{default:()=>e.h(Ii)})})]),j=B=>e.h(u.NButton,{text:!0,onClick:y=>{B.visible=!B.visible,y.stopPropagation()}},{default:()=>e.h(u.NIcon,{size:20},{default:()=>B.visible?e.h(sn):e.h(an)})}),D=()=>{var y;const B={dataGridId:o.gridId,pageSize:o.pageSize,columns:(y=o.gridColumns)==null?void 0:y.map(I=>({columnId:I.name,sortIndex:I.sortIndex,visible:I.visible,title:I.title}))};B.dataGridId&&a.post({url:"/api/core/DataGrids/getOrCreate",data:B,success:I=>{I&&c.push({name:"DataGrid",params:{id:I}})}})},H=[{title:r("Name"),key:"title",render:O},{title:r("Visible"),key:"visible",width:80,align:"center",fixed:"right",render:j},{width:30,align:"center",fixed:"right",render:()=>e.h(u.NIcon,{color:"#90A4AE",size:"20",class:"drag-sorting-handle"},{default:()=>e.h(fn)})},{key:"empty",width:20,fixed:"right"}];return e.watch(()=>o.gridColumns,()=>S.value=N(o.gridColumns)),e.watch(i,()=>k()),e.watch(S,()=>x()),e.onMounted(()=>{setTimeout(()=>{x()},500),s.checkOnce(B=>{d.value=B["2E2466DDD34847C8B33460E4277A6528"]})}),(B,y)=>{var I;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"grid-config-global-mode":i.value},"flex-column gap05"])},[d.value?(e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(e.unref(u.NButton),{onClick:D},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("System Default")),1)]),_:1})])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",Gi,[e.createElementVNode("div",Ki,[e.createVNode(e.unref(u.NButton),{onClick:y[0]||(y[0]=()=>b.value=!0)},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(It))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Import")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(St))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Export")),1)]),_:1})])])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.NDataTable),{ref_key:"nTableRef",ref:g,columns:H,data:S.value,"max-height":"60vh",size:"small"},null,8,["data"]),e.createElementVNode("div",Wi,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Page Size")),1),e.createVNode(e.unref(u.NInputNumber),{value:m.value,"onUpdate:value":y[1]||(y[1]=A=>m.value=A),max:wn,min:1,style:{"max-width":"200px"}},null,8,["value"])]),e.createVNode(_t,{show:h.value,"onUpdate:show":y[2]||(y[2]=A=>h.value=A),value:((I=f.value)==null?void 0:I.customTitle)??"",title:e.unref(r)("Custom Title"),clearable:"","onUpdate:value":V},null,8,["show","value","title"]),e.createVNode(Ye,{show:b.value,"onUpdate:show":y[3]||(y[3]=A=>b.value=A),action:"/api/UserDataGrids/Import",onUploaded:y[4]||(y[4]=()=>k())},null,8,["show"]),e.createElementVNode("div",Zi,[e.createVNode(e.unref(u.NButton),{onClick:T,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Save")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:P,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Reset")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:y[5]||(y[5]=()=>B.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})])],2)}}}),Qi=t=>{const l=u.useModal(),{t:o}=Z(),n=ie();return{showConfigModal:s=>{const c=t.gridId??s.gridId;if(!c)return;const m=l.create({title:o("Config Data Grid"),preset:"card",contentClass:"flex-column",style:"width: 500px;",draggable:!0,content:()=>e.h(Yi,{gridId:c,pageSize:s.pageSize,gridColumns:s.gridColumns,class:"flex-grow-1",onClose:()=>m.destroy(),onReset:()=>{var i;(i=t.onReset)==null||i.call(null),m.destroy()},"onUpdate:pageSize":i=>{var d;i>0&&((d=t.onPageSizeChanged)==null||d.call(null,i))},"onUpdate:config":i=>{var d;(d=t.onConfigChanged)==null||d.call(null,i),m.destroy()}})})},loadGridConfig:()=>{t.gridId&&n.get({url:`/api/core/UserDataGrids/Entity?dataGridId=${encodeURIComponent(t.gridId)}`,callback:s=>{var c;(c=t.onConfigChanged)==null||c.call(null,s)}})}}},Xi={class:"flex-column flex-grow-1",style:{gap:"0.25em"}},Ji={key:0,class:"flex-row",style:{"justify-content":"space-between"}},qi={style:{"margin-left":"8px"}},Ui={style:{display:"flex"}},vi={style:{"flex-grow":"1"}},Cn=e.defineComponent({__name:"HaloForm",props:{name:{},autoLoad:{type:Boolean,default:!0},columns:{},keys:{default:"id"},allowNew:{type:Boolean,default:!0},allowEdit:{type:Boolean,default:!0},searchAction:{},getListAction:{},getEntityAction:{},initEntityAction:{},deleteAction:{},deleteBatchAction:{},deleteMethod:{default:"DELETE"},saveAction:{},exportAction:{},importAction:{},detailsPage:{},detailsPageName:{},detailsKeys:{},dataExchangeCode:{},exportFormats:{},exportRanges:{},exportOptions:{},importOptions:{},importTimeout:{},importTemplateCode:{},gridMaxHeight:{},gridHeight:{},gridCheckable:{type:Boolean,default:!0},gridDragSorting:{type:Boolean},chainCreating:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},pageSize:{default:20},multiSelect:{type:Boolean,default:!0},quickSearch:{type:Boolean,default:!0},gridFlexHeight:{type:Boolean,default:!0},parentKey:{},parentValue:{},verifyParentKey:{type:[Boolean,Function]},selectedId:{},selectedIds:{},modalColumns:{},modalStyle:{},formGroupLayout:{},enctype:{},batchAdds:{},beforeSave:{},defaultSearchArgs:{},extendedMenus:{},additionKeys:{},searchGroupOptions:{},defaultSortBy:{},defaultSortDirection:{},propertyModal:{}},emits:["update:selectedIds","update:selectedId","update:data","columnButtonClick","saved","beforeShow","itemChange","commitEdit","extendedMenuSelect","beforeRenderPage","searchReturn","rowSorting"],setup(t,{expose:l,emit:o}){var il;const n=t,r=o,{t:a}=Z(),s=e.inject("axios"),c=e.ref(Array()),m=u.useDialog(),i=u.useMessage(),d=u.useLoadingBar(),g=ce.useRouter(),f=e.ref(Uo(n.columns||[],a)),h=e.ref(Be(n.columns||[])),b=e.ref(vo(n.columns||[],a));let N=1;const S=e.ref(1),P=e.ref(0),T=e.ref(0),k=e.ref(n.pageSize),x=e.ref(!0),V=e.ref(!1),E=e.ref(!1),O=e.ref(""),j=e.ref(n.searchAction&&((il=n.columns)==null?void 0:il.some(p=>Ie(p)&&p.search))),D=e.ref(j.value&&!n.getListAction),H=e.ref(D.value&&!0),B=e.ref(!1),y=e.ref(null),I=e.ref(null),A=e.ref(new Array),L=e.ref(!1),z=e.ref(void 0),F=e.ref(void 0),Y=e.ref(void 0),U=e.ref(!1),ee=e.ref(n.readOnly),oe=e.ref(a("Property")),ne=e.ref(!1),W=e.ref(!1);let K;const fe=e.ref([]),Dt=e.ref(Rt("page")),Hn=e.ref(Wc()),$t=e.ref(void 0),he=e.ref([]),Me=e.ref(void 0),Xe=e.ref(!1);let ye;const Gn=e.ref(void 0),we=e.ref(void 0),Te=e.ref(void 0);let ze=[],Le=0;const Kc=e.ref({width:Zc(n.modalColumns)});function Wc(){var w;const p={};if(n.defaultSearchArgs)for(const C in n.defaultSearchArgs)p[C]=n.defaultSearchArgs[C];return(w=b.value)==null||w.forEach(C=>{C.defaultValue!=null&&(C.searchMethod=="range"?Array.isArray(C.defaultValue)&&(C.defaultValue.length>0&&C.defaultValue[0]!=null&&(p[`${C.name}From`]=C.defaultValue[0]),C.defaultValue.length>1&&C.defaultValue[1]!=null&&(p[`${C.name}To`]=C.defaultValue[1])):p[C.name]=C.defaultValue)}),p}function Rt(p){return n.exportRanges&&n.exportRanges.length&&!n.exportRanges.includes(p)?n.exportRanges[0]:p}function Zc(p){return p?p>4?"100%":p>1?450*p+"px":"600px":"600px"}function Je(p){if(n.keys){if(typeof n.keys=="string")return p[n.keys];if(n.keys.length==1&&typeof n.keys[0]=="string")return p[n.keys[0]];if(n.keys.length>1)return n.keys.map(w=>p[w]).join()}return""}function qe(p){if(p.__key__=Je(p),n.columns)for(const w of n.columns){let C;if(typeof w=="string")C=w;else if(Ie(w))C=w.name;else continue;C&&!(C in p)&&(p[C]=null)}}function Kn(p){if(p){r("beforeRenderPage",{data:p});const C=p.rows;C.forEach(_=>qe(_)),c.value=C,r("update:data",c.value),T.value=p.totalRecords||0,P.value=p.pageCount||1,S.value=p.pageIndex+1,x.value=!0}}function Wn(p){if(p){const w={data:p};r("beforeRenderPage",w),p=w.data,p.forEach(C=>qe(C)),c.value=p,r("update:data",c.value),P.value=1,S.value=1,x.value=!1}}async function ue(p){var w,C;if(!(V.value||n.disabled)&&n.getListAction){const _={pageSize:k.value,pageIndex:p},$=(w=O.value)==null?void 0:w.trim();if(n.quickSearch&&$&&(_.searchWords=$),n.additionKeys&&Object.assign(_,n.additionKeys),n.parentKey&&!ae(_))return;(we.value||n.defaultSortBy)&&(_.sortBy=we.value??n.defaultSortBy,_.sortDirection=Te.value??n.defaultSortDirection);try{V.value=!0;let G=n.getListAction;typeof G=="function"&&(G=G.call(void 0));const X=v(G,_),R=await s.get(X);R!=null&&R.isSuccess&&R.value?(Le++,R.value&&(Array.isArray(R.value)?Wn(R.value):Kn(R.value))):i.error(a((R==null?void 0:R.errorMessage)??((C=R==null?void 0:R.value)==null?void 0:C.toString())??"Error"))}catch(G){i.error((G==null?void 0:G.toString())??a("Error")),console.error(G)}finally{V.value=!1}}}function De(p){if(!n.disabled)if(H.value&&ye){const w=Object.assign({},ye);w.sortBy=we.value,w.sortDirection=Te.value,Ft(w)}else p!=null?ue(p):ue(S.value-1)}function Ot(){ue(0)}function Yc(){O.value="",ue(0)}function Qc(p){if(n.additionKeys)for(const w in n.additionKeys){const C=n.additionKeys[w];C!=null&&(p[w]=C)}}function Zn(){if(!n.parentKey||!n.verifyParentKey)return!0;if(n.verifyParentKey==!0)return!(n.parentValue==null||Array.isArray(n.parentKey)&&Array.isArray(n.parentValue)&&n.parentValue.some(p=>p==null));if(typeof n.verifyParentKey=="function"){const p=n.verifyParentKey({key:n.parentKey,value:n.parentValue});if(typeof p=="boolean")return p}return!0}function ae(p){if(n.verifyParentKey&&Zn()==!1)return!1;if(n.parentKey){const w={};if(Array.isArray(n.parentKey))if(Array.isArray(n.parentValue))for(let C=0;C<n.parentKey.length;C++){const _=n.parentKey[C];(typeof _=="string"||typeof _=="number")&&n.parentValue.length>C&&(w[_]=n.parentValue[C])}else for(let C=0;C<n.parentKey.length;C++){const _=n.parentKey[C];(typeof _=="string"||typeof _=="number")&&(w[_]=n.parentValue)}else n.parentKey&&(w[n.parentKey]=n.parentValue);p&&Object.assign(p,w)}return!0}async function jt(){var w;if(n.disabled)return;const p=(w=y.value)==null?void 0:w.pickValues();if(p&&n.searchAction){const C={};Object.assign(C,p),Qc(C),C.pageSize=k.value,C.pageIndex=0,C.sortBy=we.value??n.defaultSortBy,C.sortDirection=Te.value??n.defaultSortDirection,C.groupBy=$t.value,Ft(C)}}async function Ft(p){if(!V.value)try{V.value=!0;let w=n.searchAction;if(typeof w=="function"&&(w=w.call(void 0,p)),!w)return;const C={};if(!ae(C))return;w=v(w,C);const _=await s.post(w,p);_.isSuccess&&_.value!=null?(Le++,ye=p,r("searchReturn",{data:_.value,query:p,action:w}),Array.isArray(_.value)?Wn(_.value):Kn(_.value)):i.error(a(_.errorMessage||"Error"))}catch(w){i.error(w==null?void 0:w.toString())}finally{V.value=!1}}function Yn(p,w){const C={};if(ae(C)){if(typeof n.keys=="string"?C[n.keys]=p[n.keys]:n.keys.forEach($=>C[$]=p[$]),Array.isArray(n.detailsKeys))n.detailsKeys.map($=>$.toString()).forEach($=>C[$]=p[$]);else if(typeof n.detailsKeys=="object"){const $=n.detailsKeys;for(const G in $){var _=$[G];_&&(C[G]=p[_])}}else typeof n.detailsKeys=="function"?n.detailsKeys.call(null,C):n.detailsKeys&&(C[n.detailsKeys]=p[n.detailsKeys]);if(n.detailsPageName)g.push({name:n.detailsPageName,params:C});else if(n.detailsPage)if(typeof n.detailsPage=="function"){const $=n.detailsPage(p,w);(typeof $=="string"||typeof $=="object")&&g.push($)}else g.push({path:n.detailsPage,query:C})}}async function Pt(p,w){var C;if(!n.disabled)if(n.getEntityAction){const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;typeof n.keys=="string"?_[n.keys]=p[n.keys]:n.keys.forEach($=>_[$]=p[$]);try{let $=n.getEntityAction;typeof $=="function"&&($=$.call(void 0,p,w));const G=v($,_),X=await s.get(G);X.isSuccess&&X.value!=null?Ue(X.value,n.readOnly||!n.saveAction||!n.allowEdit?"view":"edit"):i.error(a((X==null?void 0:X.errorMessage)??((C=X==null?void 0:X.value)==null?void 0:C.toString())??"Error"))}catch($){i.error(($==null?void 0:$.toString())??a("Error")),console.error($)}}else Ue(p,n.readOnly||!n.saveAction||!n.allowEdit?"view":"edit")}function Ht(p,w){n.readOnly||n.disabled||n.deleteAction&&p&&p.__key__&&m.warning({title:a("Delete"),content:a("Are you sure you want to delete this row?"),positiveText:a("Delete"),negativeText:a("Cancel"),onPositiveClick:()=>{Xc(p,w)}})}async function Xc(p,w){var C;if(n.deleteAction&&n.keys.length)try{const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;typeof n.keys=="string"?_[n.keys]=p[n.keys]:n.keys.forEach(q=>_[q]=p[q]);const $=p.__key__;let G=n.deleteAction;typeof G=="function"&&(G=G.call(void 0,p,w));const X=v(G,_);let R;if(n.deleteMethod=="POST"?R=await s.post(X):R=await s.delete(X),R.isSuccess){let q=c.value.indexOf(p);if(q>-1&&(c.value.splice(q,1),i.success(a("The data has been deleted."))),A.value&&(q=A.value.findIndex(Q=>Q==$),q>-1)){A.value.splice(q,1);const Q=(C=c.value)==null?void 0:C.filter(yd=>A.value.includes(yd["__key__]"]));r("update:selectedIds",A.value,Q),A.value.length?r("update:selectedId",A.value[0],Q!=null&&Q.length?Q[0]:void 0):r("update:selectedId",void 0,void 0)}}else i.error(a(R.errorMessage||"Error"))}catch(_){console.error(_),i.error(_==null?void 0:_.toString())}}function Jc(p){n.readOnly||n.disabled||n.deleteBatchAction&&p&&p.length&&m.warning({title:a("Delete"),content:a("Are you sure you want to delete selected rows?"),positiveText:a("Delete"),negativeText:a("Cancel"),onPositiveClick:()=>{qc(p)}})}async function qc(p){if(n.deleteBatchAction&&p.length)try{const w={ids:p.join()};if(n.additionKeys&&Object.assign(w,n.additionKeys),!ae(w))return;let C=n.deleteBatchAction;typeof C=="function"&&(C=C.call(void 0));const _=v(C,w);let $;if(n.deleteMethod=="POST"?$=await s.post(_):$=await s.delete(_),$.isSuccess){for(const G of p){const X=c.value.findIndex(R=>R.__key__==G);X>-1&&c.value.splice(X,1)}A.value=A.value.filter(G=>!p.includes(G)),i.success(a("The data has been deleted."))}else i.error(a($.errorMessage||"Error"))}catch(w){i.error(w),console.error(w==null?void 0:w.toString())}}function Qn(){if(A.value.length){const p=c.value.find(w=>w.__key__==A.value[0]);p&&Pt(p,c.value.indexOf(p))}}function Xn(){if(A.value.length>1&&n.deleteBatchAction)Jc(A.value);else if(A.value.length){const p=c.value.find(w=>w.__key__==A.value[0]);p&&Ht(p,c.value.indexOf(p))}}function Ue(p,w){const C={method:w,original:p,value:qo(p,f.value)};switch(r("beforeShow",C),Y.value=p,z.value=C.value,F.value=w,U.value=!0,ee.value=w!="create"&&w!="edit",w){case"create":oe.value=a("New");break;case"edit":oe.value=a("Edit");break;default:oe.value=a("Property");break}}function Jn(){Y.value=void 0,z.value=void 0,F.value=void 0,U.value=!1,oe.value=a("Property")}async function Gt(){var p;if(!(n.readOnly||n.disabled||!n.saveAction))if(n.initEntityAction){let w=n.initEntityAction;typeof w=="function"&&(w=w.call(void 0));let C=w;const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;C=v(C,_);try{const $=await s.get(C);$!=null&&$.isSuccess&&$.value?Ue($.value||{},"create"):i.error(a(($==null?void 0:$.errorMessage)??((p=$==null?void 0:$.value)==null?void 0:p.toString())??"Error"))}catch($){i.error(a(($==null?void 0:$.toString())??"Error")),console.error($)}}else{const w=Xo(f.value);Ue(w,"create")}}async function Uc(p,w){var $;if(n.readOnly||n.disabled)return;const C=Me.value;if(!C||C.searchConfig!=w||!C.actionUrl)return;let _;if(C.dataBuilder)_=C.dataBuilder(p);else{let G;if(C.keyPicker?G=C.keyPicker(p):G=p.map(X=>X.id),!G||!G.length)return;_={},_[C.keyName||"ids"]=G}if(_){let G=C.actionUrl;n.additionKeys&&Object.assign(_,n.additionKeys);const X={};ae(X)&&(G=v(G,X),Object.assign(_,X));try{const R=await s.post(G,_);if(R.isSuccess){if(R.value){for(const Q of R.value)ve(Q);const q=R.value.map(Q=>Je(Q));($=I.value)==null||$.selectRows(q),Xe.value=!1}}else i.error(a(R.errorMessage||"Error"))}catch(R){i.error(a((R==null?void 0:R.toString())||"Error")),console.error(R)}}}function qn(p){Me.value=p,Xe.value=!0}function vc(p){const w=f.value;if(!w||!w.length)return!1;w.forEach(C=>{C.validationStatus=void 0,C.errorMessage=void 0});for(const C of w)C.nullable===!1&&!C.readonly&&(p[C.name]==null||p[C.name]===null||!C.dataType&&(p[C.name]==null||p[C.name]==null)?(C.validationStatus="error",C.errorMessage=a("Required here.")):(C.validationStatus="success",C.errorMessage=void 0));return!w.some(C=>C.validationStatus=="error"||C.validationStatus=="warning")}function ed(){if(n.readOnly||n.disabled)return;const p=f.value;if(!p||!p.length)return;const w=F.value;if(w!="create"&&w!="edit")return;const C=z.value,_=Y.value;if(C&&_){const $=Object.assign({},_);for(let G of p){if(G.readonly==!0||Array.isArray(G.readonly)&&G.readonly.includes(w))continue;let X=Oe(C[G.name],G.dataType,G.role);$[G.name]=X}if(r("commitEdit",{data:$,current:C,original:_,method:w}),n.beforeSave&&n.beforeSave($,w)===!1)return;vc($)?Un({data:$,original:_,method:w}):i.error(a("Form validation failed."))}}async function Un(p){var w;if(!(n.readOnly||n.disabled||!n.saveAction))try{let C;const _={};if(n.additionKeys)for(const q in n.additionKeys)n.additionKeys[q]!=null&&(p.data[q]=n.additionKeys[q]);const $={};if(!ae($))return;if(Object.assign(p.data,$),n.enctype=="multipart/form-data"){C=new FormData;const q=Object.keys(p.data);for(const Q of q)p.data[Q]&&C.set(Q,p.data[Q]);_["Content-Type"]="multipart/form-data"}else C=p.data,_["Content-Type"]="application/json;charset=utf-8";let G=n.saveAction;typeof G=="function"&&(G=G.call(void 0));let X=v(G,$);E.value=!0;const R=await s.post(X,C,{headers:_});if(R.isSuccess){if(i.success(a("The data is saved.")),R.value){p.method=="create"?ve(R.value):p.method=="edit"&&vn(R.value),(w=I.value)==null||w.selectRow(Je(R.value)),p.method=="create"&&n.chainCreating?Gt():Jn();try{r("saved",{value:R.value,method:p.method})}catch(q){console.error("emit(saved) fail."+(q==null?void 0:q.toString()))}}}else i.error(a(R.errorMessage||"Error")),R.errors&&td(f.value,R.errors)}catch(C){i.error((C==null?void 0:C.toString())||a("Error")),console.error(C)}finally{E.value=!1}}function td(p,w){if(p&&p.length)for(const C of w){const _=p.find($=>$.name.toLowerCase()==C.key.toLowerCase());_&&(_.validationStatus="error",_.errorMessage=C.value)}}function ve(p){qe(p);const w=p.__key__,C=c.value.findIndex(_=>_.__key__==w);C>-1?c.value.splice(C,1,p):c.value.push(p)}function vn(p){qe(p);const w=p.__key__,C=c.value.find(_=>_.__key__==w);if(C)for(const _ in p)C[_]=p[_]}function od(p){if(H.value&&ye){const w=Object.assign({},ye);w.pageIndex=Math.max(0,p-1),Ft(w)}else p>0?ue(p-1):ue(0)}function nd(p){p&&(k.value=p)}function ld(p,w){A.value=p,r("update:selectedIds",p,w),r("update:selectedId",p.length?p[0]:void 0,w.length?w[0]:void 0)}async function rd(p,w){n.exportAction?await ad(p,w)&&(ne.value=!1):n.dataExchangeCode&&(tl(p,w),ne.value=!1)}function el(p,w,C){const _={outputType:p,dataRange:w,searchArgs:JSON.stringify(ye)};if(n.importTemplateCode&&(_.templateCode=n.importTemplateCode),!ye&&(n.additionKeys||n.parentKey)){const $={pageSize:k.value,pageIndex:S.value,sortBy:we.value,sortDirection:Te.value};n.additionKeys&&Object.assign($,n.additionKeys),ae($),_.searchArgs=JSON.stringify($)}switch(C&&Object.assign(_,C),w){case"selection":if(!A.value||!A.value.length)throw a("Please select the rows to be exported.");_.selectedKeys=A.value;break;case"page":_.pageSize=k.value,_.pageIndex=Math.max(0,S.value-1);break}return _}async function ad(p,w){let C=n.exportAction;if(typeof C=="function"&&(C=C.call(void 0)),C){try{if(!Zn())return console.log("Invalid parent key."),!1;const _=el(p,w,n.exportOptions);ae(_),d.start(),C=v(C,_),await me(C)}catch(_){console.log(_),i.error((_==null?void 0:_.toString())||a("Error"))}finally{d.finish()}return!0}else return!1}function sd(){n.importAction&&(L.value=!0)}async function id(){const p=n.importTemplateCode;if(p){const w=`/api/core/DataExchangeTemplates/ImportTemplate?templateCode=${p}`;try{d.start(),await me(w)}finally{d.finish()}}}async function tl(p,w,C=!1){var q;const _=n.dataExchangeCode;if(!_)return;if(w.toLowerCase()=="empty"){const Q=`/api/core/dataExchange/importTemplate?templateCode=${_}&engineName=${p}`;try{d.start(),await me(Q)}finally{d.finish()}return}const $={name:_,engineName:p,dataRange:w};n.importTemplateCode&&($.templateCode=n.importTemplateCode);const G={pageSize:k.value,pageIndex:S.value-1};switch(w.toLowerCase()){case"empty":G.pageSize=0,G.pageIndex=0;break;case"all":G.pageSize=2e3,G.pageIndex=0;break}if(!ae(G)){console.log("Invalid parent key.");return}let X=n.exportAction||n.getListAction;typeof X=="function"&&(X=X.call(void 0));let R=X;if(C)try{const Q=await s.post("/api/core/tempData/add",{value:JSON.stringify($)});if(Q.isSuccess){if(G.exportOptionId=Q.value,R){R=v(R,G);try{d.start(),await me(R)}finally{d.finish()}}}else i.error((Q==null?void 0:Q.errorMessage)??((q=Q==null?void 0:Q.value)==null?void 0:q.toString())??a("Error"))}catch(Q){i.error((Q==null?void 0:Q.toString())??a("Error")),console.error(Q)}else if(G.exportOption=btoa(JSON.stringify($)),R){R=v(R,G);try{d.start(),await me(R)}finally{d.finish()}}}function ol(p){if(p)switch(p){case"menu_export_action":A.value&&A.value.length?Dt.value=Rt("selection"):Dt.value=Rt("page"),ne.value=!0;break;case"menu_export_template_action":id();break;case"menu_import_action":sd();break;case"menu_export":ne.value=!0;break;case"menu_export_template":tl("Excel","Empty");break;case"menu_import":break;default:{const w=ze.find(C=>C.key==p);w&&nl(w)}break}}function nl(p){var _;const w=A.value,C={selectedId:w!=null&&w.length?w[0]:void 0,selectedIds:w?[...w]:void 0,data:c.value};typeof p!="string"&&((_=p.click)==null||_.call(null,C)),r("extendedMenuSelect",C)}function cd(p){const w=[];n.exportAction&&w.push({label:a("Export")+"…",key:"menu_export_action",icon:()=>e.h(u.NIcon,null,{default:()=>e.h(St)})}),n.importTemplateCode&&w.push({label:a("Download Template")+"…",key:"menu_export_template_action"}),n.importAction&&!n.readOnly&&w.push({label:a("Import"),key:"menu_import_action",icon:()=>e.h(u.NIcon,null,{default:()=>e.h(It)})}),n.dataExchangeCode&&(w.push({label:a("Export")+"…",key:"menu_export",icon:()=>e.h(u.NIcon,null,{default:()=>e.h(St)})}),w.push({label:a("Export Template"),key:"menu_export_template"}),n.readOnly||(w.push({type:"divider",key:"------------1"}),w.push({label:a("Import"),key:"menu_import",icon:()=>e.h(u.NIcon,null,{default:()=>e.h(It)})}))),p&&p.length&&(w.push({type:"divider",key:"----------e--1"}),p.forEach(C=>{const _={label:C.label,key:C.key};C.icon?_.icon=mt(C.icon):C.renderIcon&&(_.icon=C.renderIcon),w.push(_)})),fe.value=w}Qi({gridId:n.name,onConfigChanged:p=>Kt(p),onPageSizeChanged:p=>k.value=p,onReset:()=>fd}).loadGridConfig();const Kt=(p,w)=>{if(p){K=p,k.value=p.pageSize,w||(w=[...h.value]),w.forEach(C=>{C.sortIndex=99999});for(const C of p.columns){const _=w.find($=>$.name==C.columnId);_&&(_.visible=C.visible,_.sortIndex=C.sortIndex)}w.sort((C,_)=>(C.sortIndex||0)-(_.sortIndex||0)),h.value=w}};function dd(p){p?Kt(p):(h.value=Be(n.columns||[]),k.value=n.pageSize||20),W.value=!1}const fd=()=>{h.value=Be(n.columns||[]),k.value=n.pageSize||20},ud=()=>{n.name&&(W.value=!0)};function pd(p,w){var C;for(const _ of p)ve(_);if(w){const _=p.map($=>Je($));(C=I.value)==null||C.selectRows(_)}}function ll(p){if(!p)return;const w=ze==null?void 0:ze.find(C=>C.key==p);w&&nl(w)}function md(p){var w,C;Array.isArray(p)?(we.value=(w=p[0].columnKey)==null?void 0:w.toString(),Te.value=p[0].order=="ascend"?"Asc":"Desc"):p&&(we.value=(C=p.columnKey)==null?void 0:C.toString(),Te.value=p.order=="ascend"?"Asc":"Desc"),De()}function rl(){const p=new Array;if(n.extendedMenus)for(const C of n.extendedMenus)typeof C=="string"?p.push({label:a(C),key:N++}):(C.key||(C.key=N++),p.push(C));ze=p,hd(p);const w=p.filter(C=>C.group=="import"||C.group=="export");cd(w)}function hd(p){if(p){const w=p.filter(C=>!C.group).map(C=>C.label=="-"?{type:"divider"}:C.icon?{label:C.label,key:C.key,icon:mt(C.icon)}:C.renderIcon?{label:C.label,key:C.key,icon:C.renderIcon()}:{label:C.label,key:C.key});he.value=w}else he.value=[]}function al(){const p={};return n.parentKey&&ae(p),n.additionKeys&&Object.assign(p,n.additionKeys),p}function sl(){const p=Object.assign({},al(),n.importOptions);Gn.value=Object.keys(p).length?p:void 0}function gd(){D?B.value=!B.value:B.value=!1}return e.onMounted(()=>{sl(),n.autoLoad!=!1&&(D.value?n.autoLoad&&jt():ue(0)),rl()}),e.watch(e.computed(al),(p,w)=>{JSON.stringify(p)!=JSON.stringify(w)&&(sl(),n.autoLoad!=!1&&Le>0&&De())}),e.watch(()=>n.extendedMenus,()=>rl()),e.watch(()=>n.parentValue,()=>{(n.autoLoad!=!1||Le>0)&&ue(0)}),e.watch(()=>n.getListAction,(p,w)=>{w&&(n.autoLoad!=!1||Le>0)&&ue(0)}),e.watch(k,(p,w)=>{if(p&&w){var C=void 0,_=S.value,$=T.value;if(_>0&&$){const G=Math.ceil($/p);G<_&&(C=Math.max(0,G-1))}De(C)}}),e.watch(()=>n.columns,()=>{const p=Be(n.columns||[]);K?Kt(K,p):h.value=p}),l({reloadPage:De,addRow:Gt,addBatch:qn,editSelectedRow:Qn,deleteSelectedRows:Xn,saveData:Un,doQuickSearch:Ot,clearQuickSearch:Yc,advancedSerach:jt,checkedRowKeys:A,editRow:Pt,deleteRow:Ht,showDetails:Yn,insertRow:ve,updateRow:vn,appendRows:pd,buildExportArgs:el}),(p,w)=>{var C,_,$,G,X;return e.openBlock(),e.createElementBlock("div",Xi,[e.renderSlot(p.$slots,"header"),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ji,[e.createVNode(e.unref(u.NButtonGroup),null,{default:e.withCtx(()=>[e.renderSlot(p.$slots,"prefix-tools"),p.readOnly?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p.batchAdds,R=>(e.openBlock(),e.createBlock(e.unref(u.NButton),{onClick:()=>qn(R),disabled:p.readOnly||p.disabled,key:R.id},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#388e3c"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ka))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)(R.label||"Batch Add")),1)]),_:2},1032,["onClick","disabled"]))),128)),p.saveAction&&!p.readOnly&&p.allowNew?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:1,onClick:Gt,disabled:p.readOnly||p.disabled},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#388e3c"},{default:e.withCtx(()=>[e.createVNode(e.unref(pi))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("New")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),p.saveAction&&!p.readOnly&&p.allowEdit?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:2,onClick:Qn,disabled:p.readOnly||p.disabled||!A.value.length},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#5c6bc0"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fo))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Edit")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(p.deleteAction||p.deleteBatchAction)&&!p.readOnly?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:3,onClick:Xn,disabled:p.readOnly||p.disabled||!A.value.length},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#f44336"},{default:e.withCtx(()=>[e.createVNode(e.unref(jo))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Delete")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.NButton),{onClick:w[0]||(w[0]=()=>De()),disabled:p.disabled},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#689f38"},{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Refresh")),1)]),_:1},8,["disabled"]),e.renderSlot(p.$slots,"suffix-tools"),fe.value.length?(e.openBlock(),e.createBlock(e.unref(u.NDropdown),{key:4,options:fe.value,disabled:p.disabled,onSelect:ol},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#009688"},{default:e.withCtx(()=>[e.createVNode(e.unref(Va))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Import/Export"))+" ",1),e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options","disabled"])):e.createCommentVNode("",!0),he.value&&he.value.length?(e.openBlock(),e.createBlock(e.unref(u.NDropdown),{key:5,options:he.value,disabled:p.disabled,onSelect:ll},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#3F51B5"},{default:e.withCtx(()=>[e.createVNode(e.unref(it))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Advanced"))+" ",1),e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options","disabled"])):e.createCommentVNode("",!0)]),_:3}),e.renderSlot(p.$slots,"tools"),p.quickSearch?(e.openBlock(),e.createBlock(e.unref(u.NInputGroup),{key:0,class:"flex-row quick-search-box",style:{width:"inherit"}},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(u.NInput),{class:"flex-grow-1",style:{width:"260px"},value:O.value,"onUpdate:value":w[1]||(w[1]=R=>O.value=R),placeholder:e.unref(a)("Quick Search"),clearable:"",onChange:Ot},{prefix:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["value","placeholder"]),[[e.vShow,!H.value]]),e.withDirectives(e.createVNode(e.unref(u.NButton),{title:e.unref(a)("Search"),onClick:w[2]||(w[2]=()=>Ot()),style:{padding:"0 8px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["title"]),[[e.vShow,!H.value]]),j.value?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,title:e.unref(a)("More"),style:{padding:"0 8px"},onClick:w[3]||(w[3]=()=>H.value=!H.value)},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ba),{key:0})),H.value?(e.openBlock(),e.createBlock(e.unref(wa),{key:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])),e.renderSlot(p.$slots,"neck"),j.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(u.NCard),{key:1,size:"small",hoverable:"",closable:!D.value,onClose:w[8]||(w[8]=()=>H.value=!1)},{header:e.withCtx(()=>[e.createElementVNode("div",{class:"flex-row",style:e.normalizeStyle([{"align-items":"center"},{cursor:D.value?"pointer":"unset"}]),onClick:gd},[e.createVNode(e.unref(u.NIcon),{size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Search"))+" ",1),e.withDirectives(e.createElementVNode("span",qi," … ",512),[[e.vShow,B.value]])],4)]),action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px"},onClick:jt},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Search")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:w[6]||(w[6]=()=>{var R;return(R=y.value)==null?void 0:R.reset()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Reset")),1)]),_:1}),fe.value.length==1&&D.value?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,style:{"min-width":"100px"},onClick:w[7]||(w[7]=()=>ne.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Export")),1)]),_:1})):e.createCommentVNode("",!0),fe.value.length>1&&D.value?(e.openBlock(),e.createBlock(e.unref(u.NDropdown),{key:1,options:fe.value,onSelect:ol},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Export")),1)]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"search-tools"),D.value&&he.value&&he.value.length?(e.openBlock(),e.createBlock(e.unref(u.NDropdown),{key:2,options:he.value,onSelect:ll},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),{color:"#3F51B5"},{default:e.withCtx(()=>[e.createVNode(e.unref(it))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Advanced"))+" ",1),e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)]),_:3})]),_:3})]),default:e.withCtx(()=>[e.withDirectives(e.createVNode(Ke,{"search-items":b.value,ref_key:"searchFormRef",ref:y,"search-args":Hn.value,"onUpdate:searchArgs":w[4]||(w[4]=R=>Hn.value=R),"group-options":p.searchGroupOptions,"group-by":$t.value,"onUpdate:groupBy":w[5]||(w[5]=R=>$t.value=R)},null,8,["search-items","search-args","group-options","group-by"]),[[e.vShow,!B.value]])]),_:3},8,["closable"])),[[e.vShow,H.value]]):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"grid",{data:c.value,columns:h.value,loading:V.value,style:"background-color: chartreuse;"},()=>[e.createVNode(We,{ref_key:"dataGridRef",ref:I,data:c.value,columns:h.value,loading:V.value,class:"halo-form-grid flex-grow-1",style:{height:"80px","min-height":"80px"},"drag-sorting":p.gridDragSorting,"flex-height":p.gridFlexHeight,"with-edit":!!p.saveAction&&!p.readOnly&&p.allowEdit,"with-delete":(!!p.deleteAction||!!p.deleteBatchAction)&&!p.readOnly,"with-details":!!p.detailsPage||!!p.detailsPageName,"multi-select":p.multiSelect,"max-height":p.gridMaxHeight,height:p.gridHeight,checkable:p.gridCheckable,onEditRow:Pt,onDeleteRow:Ht,onShowDetails:Yn,"onUpdate:selectedIds":ld,onColumnButtonClick:w[9]||(w[9]=(R,q,Q)=>p.$emit("columnButtonClick",R,q,Q)),"onUpdate:sorter":w[10]||(w[10]=R=>md(R)),onRowSorting:w[11]||(w[11]=R=>p.$emit("rowSorting",R))},null,8,["data","columns","loading","drag-sorting","flex-height","with-edit","with-delete","with-details","multi-select","max-height","height","checkable"])]),e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[x.value?(e.openBlock(),e.createBlock(e.unref(u.NPagination),{key:0,page:S.value,"onUpdate:page":[w[12]||(w[12]=R=>S.value=R),od],"item-count":T.value,"page-size":k.value,"page-sizes":[10,20,30,40,50,100],"show-quick-jumper":"","show-size-picker":"","onUpdate:pageSize":nd},{suffix:e.withCtx(({startIndex:R,endIndex:q,itemCount:Q})=>[Q?(e.openBlock(),e.createBlock(e.unref(u.NText),{key:0,italic:"",depth:"3"},{default:e.withCtx(()=>[e.createTextVNode("["+e.toDisplayString(R+1)+"~"+e.toDisplayString(q+1)+"] / "+e.toDisplayString(Q),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:1},8,["page","item-count","page-size"])):e.createCommentVNode("",!0),p.name?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:1,text:"",onClick:w[13]||(w[13]=()=>ud())},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xi))]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.renderSlot(p.$slots,"default"),e.renderSlot(p.$slots,"bottom",{formItems:f.value,currentData:z.value,list:c.value,selectedKeys:A.value}),e.createVNode(e.unref(u.NModal),{class:"custom-card",show:U.value,"onUpdate:show":w[15]||(w[15]=R=>U.value=R),preset:"card",draggable:"",style:e.normalizeStyle([Kc.value,p.modalStyle]),title:oe.value,"close-on-esc":!1,"mask-closable":!1},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[F.value=="create"||F.value=="edit"?(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,onClick:ed,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Save")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.NButton),{onClick:Jn,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Close")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpin),{show:E.value},{default:e.withCtx(()=>[e.createElementVNode("div",Ui,[e.createElementVNode("div",null,[e.renderSlot(p.$slots,"entity-form-left",{data:z.value,original:Y.value,method:F.value})]),e.createElementVNode("div",vi,[e.renderSlot(p.$slots,"entity-form",{formItems:f.value,data:z.value,original:Y.value,method:F.value},()=>[e.createVNode(kt,{"form-items":f.value,columns:p.modalColumns,data:z.value,original:Y.value,method:F.value,"group-layout":p.formGroupLayout,"read-only":ee.value,onItemChange:w[14]||(w[14]=R=>p.$emit("itemChange",R))},null,8,["form-items","columns","data","original","method","group-layout","read-only"])])]),e.createElementVNode("div",null,[e.renderSlot(p.$slots,"entity-form-right",{data:z.value,original:Y.value,method:F.value})])])]),_:3},8,["show"])]),_:3},8,["show","style","title"]),(C=p.batchAdds)!=null&&C.length?(e.openBlock(),e.createBlock(Et,{key:2,show:Xe.value,"onUpdate:show":w[16]||(w[16]=R=>Xe.value=R),draggable:"",config:(_=Me.value)==null?void 0:_.searchConfig,title:($=Me.value)==null?void 0:$.searchTitle,"multi-select":((G=Me.value)==null?void 0:G.singleOne)!=!0,"addition-query":(X=Me.value)==null?void 0:X.additionQuery,onSearchBack:Uc},null,8,["show","config","title","multi-select","addition-query"])):e.createCommentVNode("",!0),p.importAction?(e.openBlock(),e.createBlock(Ye,{key:3,show:L.value,"onUpdate:show":w[17]||(w[17]=R=>L.value=R),draggable:"",action:p.importAction,"addition-params":Gn.value,timeout:p.importTimeout,"template-code":p.importTemplateCode},{options:e.withCtx(({options:R})=>[e.renderSlot(p.$slots,"import-options",{options:R})]),_:3},8,["show","action","addition-params","timeout","template-code"])):e.createCommentVNode("",!0),p.dataExchangeCode||p.exportAction?(e.openBlock(),e.createBlock(Vt,{key:4,show:ne.value,draggable:"","supported-formats":p.exportFormats,"supported-ranges":p.exportRanges,onClose:w[18]||(w[18]=()=>ne.value=!1),onExport:rd,range:Dt.value,"template-code":p.importTemplateCode},{options:e.withCtx(()=>[e.renderSlot(p.$slots,"export-options")]),_:3},8,["show","supported-formats","supported-ranges","range","template-code"])):e.createCommentVNode("",!0),p.name?(e.openBlock(),e.createBlock(Tt,{key:5,"grid-id":p.name,draggable:"","grid-columns":h.value,pageSize:k.value,"onUpdate:pageSize":w[19]||(w[19]=R=>k.value=R),show:W.value,onClose:w[20]||(w[20]=()=>W.value=!1),"onUpdate:config":dd},null,8,["grid-id","grid-columns","pageSize","show"])):e.createCommentVNode("",!0)])}}}),ec={class:"flex-row gap05",style:{"align-items":"center"}},bn=e.defineComponent({__name:"HaloModal",props:{show:{type:Boolean},title:{},submitting:{type:Boolean},hideOkButton:{type:Boolean},width:{default:"600px"}},emits:["submit","update:show"],setup(t){const{t:l}=Z();return(o,n)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{class:"custom-card",show:o.show,preset:"card",style:e.normalizeStyle({width:o.width}),draggable:"",onClose:n[2]||(n[2]=()=>o.$emit("update:show",!1))},{header:e.withCtx(()=>[e.createElementVNode("div",ec,[e.renderSlot(o.$slots,"icon"),e.createElementVNode("div",null,e.toDisplayString(o.title),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[o.hideOkButton?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(u.NButton),{key:0,onClick:n[0]||(n[0]=r=>o.$emit("submit")),style:{"min-width":"100px"},type:"primary",loading:o.submitting},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("OK")),1)]),_:1},8,["loading"])),e.createVNode(e.unref(u.NButton),{onClick:n[1]||(n[1]=()=>o.$emit("update:show",!1)),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["show","style"]))}}),tc={key:0,style:{"text-align":"right"}},kn=e.defineComponent({__name:"HaloSelect",props:{multiple:{type:Boolean},filterable:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},value:{},sourceUrl:{},additionalQuery:{},labelFormatter:{},keyField:{},labelField:{},subLabelField:{},prefix:{},suffix:{},insertBlank:{type:Boolean},autoSelect:{type:Boolean},i18n:{type:Boolean,default:!0}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.inject("axios"),s=e.ref(!1),c=e.ref([]);let m;const i=f=>{(!m||m!=f)&&(m=f,d(f))},d=async f=>{let h=o.sourceUrl;if(h){const b=o.labelFormatter,N=o.keyField,S=o.labelField,P=o.subLabelField,T=o.insertBlank,k=o.additionalQuery;s.value=!0,c.value=[];try{f&&(h=v(h,{searchWords:f})),k&&(h=v(h,k,!0));const x=await a.get(h);if(x.isSuccess&&x.value!=null){let V=x.value;if(!Array.isArray(V)&&"rows"in V&&Array.isArray(V.rows)&&(V=V.rows),Array.isArray(V)){const E=V.filter(O=>O&&!0).map(O=>{if(typeof O=="string")return{value:O,label:b?b(O):r(O)};{let j=O[S||"label"];if(b&&(j=b(j)),o.prefix&&(j=o.prefix+j),o.suffix&&(j=j+o.suffix),o.i18n&&(j=r(j)),P){let D=O[P];typeof D=="string"&&(b&&(D=b(D)),o.i18n&&(D=r(D)),D&&(j+=" "+D))}return{value:O[N||"value"],label:j,data:O}}});T&&E.splice(0,0,{value:"",label:""}),c.value=E,o.autoSelect&&!o.value&&E.length&&n("update:value",E[0].value,E[0],E[0].data)}}}finally{s.value=!1}}},g=(f,h)=>{var N;const b=(N=c.value.find(S=>S.value==f))==null?void 0:N.data;n("update:value",f,h,b)};return e.watch(()=>o.sourceUrl,()=>d()),e.watch(()=>o.additionalQuery,(f,h)=>{JSON.stringify(h)!=JSON.stringify(f)&&d()}),e.onMounted(()=>d()),(f,h)=>(e.openBlock(),e.createBlock(e.unref(u.NSelect),{value:f.value,remote:"",loading:s.value,options:c.value,filterable:f.filterable,multiple:f.multiple,placeholder:"",disabled:f.readonly,clearable:f.clearable,onSearch:i,"onUpdate:value":g},{action:e.withCtx(()=>[f.filterable?(e.openBlock(),e.createElementBlock("div",tc,[e.createVNode(e.unref(u.NText),{depth:"3",italic:""},{default:e.withCtx(()=>[e.createElementVNode("small",null,e.toDisplayString(e.unref(r)("Enter text to filter the result list.")),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1},8,["value","loading","options","filterable","multiple","disabled","clearable"]))}}),oc=e.defineComponent({components:{SearchIcon:un,LeftIcon:Hs,RightIcon:Ks},props:{sourceList:Object,selectedItems:Object,loading:Boolean,placeholder:{type:String,default:"Search"}},emits:["search","update:selectedItems"],setup(t,l){const{t:o}=Z(),n=e.ref(void 0),r=e.ref(s(t.sourceList)),a=e.ref([]);function s(f){return f?f.map(h=>({isSelected:!1,value:h})):[]}function c(){n.value&&l.emit("search",n.value)}function m(){nn(a.value,f=>f.isSelected)>0&&l.emit("update:selectedItems",a.value.map(f=>f.value))}function i(){a.value.forEach(h=>h.isSelected=!1);let f=!1;r.value.forEach(h=>{h.isSelected&&!a.value.some(b=>b.value==h.value)&&(a.value.push({value:h.value,isSelected:!1}),f=!0)}),f&&l.emit("update:selectedItems",a.value.map(h=>h.value))}function d(f){f.forEach(h=>h.isSelected=!0)}function g(f){f.forEach(h=>h.isSelected=!h.isSelected)}return e.watch(()=>t.sourceList,f=>r.value=s(f)),{t:o,searchWords:n,searchMaterials:c,source:r,target:a,moveRight:i,moveLeft:m,selectAll:d,inverseSelect:g}}}),nc={class:"flex-row gap1"},lc={class:"flex-column flex-grow-1 gap25",style:{width:"100px",height:"400px"}},rc={class:"flex-row gap1",style:{"justify-content":"flex-end"}},ac={class:"flex-column gap1",style:{width:"60px","justify-content":"center"}},sc={class:"flex-column flex-grow-1 gap25",style:{width:"100px",height:"400px"}},ic={class:"flex-row gap1",style:{"justify-content":"flex-end"}};function cc(t,l,o,n,r,a){const s=e.resolveComponent("search-icon"),c=e.resolveComponent("n-icon"),m=e.resolveComponent("n-input"),i=e.resolveComponent("n-checkbox"),d=e.resolveComponent("n-scrollbar"),g=e.resolveComponent("n-spin"),f=e.resolveComponent("n-button"),h=e.resolveComponent("right-icon"),b=e.resolveComponent("left-icon");return e.openBlock(),e.createElementBlock("div",nc,[e.createElementVNode("div",lc,[e.createVNode(m,{placeholder:t.placeholder,value:t.searchWords,"onUpdate:value":l[0]||(l[0]=N=>t.searchWords=N),onInput:t.searchMaterials},{suffix:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1},8,["placeholder","value","onInput"]),e.createVNode(g,{show:t.loading,class:"flex-grow-1 flex-column","content-class":"flex-column flex-grow-1"},{default:e.withCtx(()=>[e.createVNode(d,{class:"flex-grow-1 bordered",style:{height:"50px"},"content-class":"flex-column gap25","content-style":"padding: 4px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.source,N=>(e.openBlock(),e.createBlock(i,{checked:N.isSelected,"onUpdate:checked":S=>N.isSelected=S,style:{"align-items":"center"}},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"source",{item:N.value,isSelected:N.isSelected},()=>[e.createTextVNode(e.toDisplayString(N.value),1)])]),_:2},1032,["checked","onUpdate:checked"]))),256))]),_:3})]),_:3},8,["show"]),e.createElementVNode("div",rc,[e.createVNode(f,{text:"",onClick:l[1]||(l[1]=()=>t.selectAll(t.source))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Select All")),1)]),_:1}),e.createVNode(f,{text:"",onClick:l[2]||(l[2]=()=>t.inverseSelect(t.source))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Inverse Selection")),1)]),_:1})])]),e.createElementVNode("div",ac,[e.createVNode(f,{onClick:t.moveRight},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),_:1},8,["onClick"]),e.createVNode(f,{onClick:t.moveLeft},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(b)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",sc,[e.createVNode(d,{class:"flex-grow-1 bordered","content-class":"flex-column gap25","content-style":"padding: 4px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.target,N=>(e.openBlock(),e.createBlock(i,{checked:N.isSelected,"onUpdate:checked":S=>N.isSelected=S,style:{"align-items":"center"}},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"target",{item:N.value,isSelected:N.isSelected},()=>[e.createTextVNode(e.toDisplayString(N.value),1)])]),_:2},1032,["checked","onUpdate:checked"]))),256))]),_:3}),e.createElementVNode("div",ic,[e.createVNode(f,{text:"",onClick:l[3]||(l[3]=()=>t.selectAll(t.target))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Select All")),1)]),_:1}),e.createVNode(f,{text:"",onClick:l[4]||(l[4]=()=>t.inverseSelect(t.target))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Inverse Selection")),1)]),_:1})])])])}const Nn=re(oc,[["render",cc]]),xn=re(e.defineComponent({__name:"MainDetailPanel",props:{direction:{default:"vertical"},initialRatio:{default:.618},minSize:{default:100},mainPanelStyle:{},mainPanelClass:{},detailPanelStyle:{},detailPanelClass:{},detailFolded:{type:Boolean,default:!1}},setup(t){const l=t,o=e.ref(l.initialRatio),n=e.ref(!1),r=e.ref(void 0),a=e.computed(()=>l.detailFolded?{[l.direction==="horizontal"?"width":"height"]:"100%",[l.direction==="horizontal"?"height":"width"]:"100%"}:{[l.direction==="horizontal"?"width":"height"]:`${o.value*100}%`,[l.direction==="horizontal"?"height":"width"]:"100%"}),s=e.computed(()=>l.detailFolded?{[l.direction==="horizontal"?"width":"height"]:"100%",[l.direction==="horizontal"?"height":"width"]:"100%"}:{[l.direction==="horizontal"?"width":"height"]:`${(1-o.value)*100}%`,[l.direction==="horizontal"?"height":"width"]:"100%"}),c=d=>{d.preventDefault(),l.detailFolded||(n.value=!0)},m=d=>{if(!n.value||!r.value||l.detailFolded)return;const g=r.value.getBoundingClientRect();let f;l.direction==="horizontal"?f=(d.clientX-g.left)/g.width:f=(d.clientY-g.top)/g.height;const h=l.minSize/(l.direction==="horizontal"?g.width:g.height),b=1-h;o.value=Math.max(h,Math.min(b,f))},i=()=>{n.value=!1};return e.onMounted(()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",i)}),e.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",i)}),(d,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["main-detail-panel",[d.direction]]),ref_key:"container",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(["panel main-panel",d.mainPanelClass]),style:e.normalizeStyle([[d.mainPanelStyle,a.value],{}])},[e.renderSlot(d.$slots,"main",{},void 0,!0)],6),d.detailFolded?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["divider",{dragging:n.value}]),onMousedown:c},null,34)),d.detailFolded?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["panel detail-panel",d.detailPanelClass]),style:e.normalizeStyle([[d.detailPanelStyle,s.value],{}])},[e.renderSlot(d.$slots,"detail",{},void 0,!0)],6))],2))}}),[["__scopeId","data-v-ca4664e2"]]),Sn=e.defineComponent({__name:"NumberInputModal",props:{title:{},message:{},value:{},show:{type:Boolean}},emits:["update:show","commit"],setup(t,{emit:l}){const o=t,{t:n}=Z(),r=e.ref(o.value);return e.watch(()=>o.value,()=>r.value=o.value),(a,s)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{title:a.title,show:a.show,preset:"card",style:{width:"400px"},draggable:"",onClose:s[3]||(s[3]=()=>a.$emit("update:show",!1))},{action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:s[1]||(s[1]=()=>a.$emit("commit",r.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("OK")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:s[2]||(s[2]=()=>a.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NForm),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NGrid),{cols:24,"x-gap":24},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NFormItemGi),{span:24,label:a.message},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInputNumber),{value:r.value,"onUpdate:value":s[0]||(s[0]=c=>r.value=c)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["title","show"]))}}),dc={class:"flex-column"},In=e.defineComponent({__name:"ObjectTreeView",props:{selectedId:[Number,String],rootId:{type:[Number,String],default:"0"},rootName:{type:String,default:"Root"},data:Array,loadTreeAction:{type:String,required:!0},moveAction:String,sortAction:String,treeNodeMapper:Function,labelRender:Function,searchWords:String,iconRender:Function},emits:["update:selectedId","update:path"],setup(t,{emit:l}){var H;const o=l,n=t,{t:r}=Z(),a=ie(),s=e.ref(b(n.data)),c=e.ref(new Array),m=e.ref(void 0),i=e.ref(((H=s.value)==null?void 0:H.map(B=>B.key))??[]);function d(B,y){for(const I of B){if(I.key==y)return[I];if(I.key!=null&&I.key!=null&&I.children&&!I.isLeaf){const A=d(I.children,y);if(A.length)return A.push(I),A}}return[]}function g(B,y){for(let I=0;I<B.length;I++){const A=B[I];if(A.key==y)return{nodes:B,index:I};if(A.children){const L=g(A.children,y);if(L)return L}}return null}function f(B){const y=d(s.value,B);return y?y.reverse():[]}function h(B){return B}function b(B,y=!0){let I=[];if(Array.isArray(B)){const A=(n==null?void 0:n.treeNodeMapper)??h;I=B.map(A)}return y?[{key:n.rootId,label:r(n.rootName),isLeaf:!Array.isArray(I)||I.length==0,children:I}]:I}function N(){a.get({url:n.loadTreeAction,callback:B=>{if(B){const y=b(B);s.value=y,i.value=y.map(I=>I.key)}}})}function S(B){const y=s.value;if(y){const I=y.map(A=>A.children?T(A.children):[]);i.value=I.flat()}}function P(B){const y=s.value;y&&(i.value=y.map(I=>I.key))}function T(B,y){const I=new Array;for(const A of B)if(A.key&&I.push(A.key),A.children){const L=T(A.children);L.length&&I.push(...L)}return I}function k(B){c.value=B;const y=B.length?B[0]:void 0;o("update:selectedId",y==n.rootId?void 0:y);const I=y?f(y):[];o("update:path",I)}function x(B){return e.h("span",null,B.option.label)}function V(B){return n.iconRender?e.h(u.NIcon,null,{default:()=>{var y;return(y=n.iconRender)==null?void 0:y.call(null,B)}}):B.option.isLeaf?e.h(u.NIcon,null,{default:()=>e.h(cn)}):e.h(u.NIcon,null,{default:()=>e.h(Bt)})}function E(B){!n.moveAction&&!n.sortAction||(B.dropPosition=="before"||B.dropPosition=="after"?B.dragNode.key&&typeof B.node.key&&j(B.dragNode,B.node,B.dropPosition):B.dropPosition=="inside"&&typeof B.dragNode.key=="number"&&typeof B.node.key=="number"&&O(B.dragNode,B.node))}function O(B,y){const I=n.moveAction;if(!I)return;const A=B.key,L=[B.key],z=y.key;!A||!z||B==y||a.post({url:I,data:{menuItemIds:L,targetId:z},successMessage:"Successful operation.",success:()=>{const F=g(s.value,A);F&&(F.nodes.splice(F.index,1),y.children&&y.children.push(B))}})}async function j(B,y,I){const A=n.sortAction;if(!A)return;const L=B.key;let z=y.key;if(!L||!z||L==z)return;const F=g(s.value,L);if(F){if(I=="after"){const Y=F.nodes.indexOf(y);if(Y>-1&&Y<F.nodes.length-1&&(y=F.nodes[Y+1],z=y.key,!z||L==z))return}a.post({url:A,data:{menuId:L,nextSiblingId:z},successMessage:"Successful operation.",success:()=>{F.nodes.splice(F.index,1);const Y=F.nodes.indexOf(y);Y>-1?F.nodes.splice(Y,0,B):F.nodes.push(B)}})}}function D(B){if(B==null&&(B=n.rootId),c.value.includes(B))return;const y=d(s.value,B);y.length&&(i.value=y.map(I=>I.key),c.value=[B])}return e.watch(()=>n.data,B=>{B?s.value=b(B):s.value=[]}),e.watch(()=>n.selectedId,B=>{D(B)}),e.onMounted(()=>{N()}),(B,y)=>(e.openBlock(),e.createElementBlock("div",dc,[e.createVNode(e.unref(u.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInput),{placeholder:e.unref(r)("Search"),clearable:"",onChange:y[0]||(y[0]=I=>m.value=I)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pn))]),_:1})]),_:1},8,["placeholder"]),e.createVNode(e.unref(u.NButton),{ghost:"",onClick:N,title:e.unref(r)("Refresh")},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),_:1},8,["title"]),e.createVNode(e.unref(u.NButton),{ghost:"",onClick:y[1]||(y[1]=()=>S()),title:e.unref(r)("Expand All")},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ai))]),_:1})]),_:1},8,["title"]),e.createVNode(e.unref(u.NButton),{ghost:"",onClick:y[2]||(y[2]=()=>P()),title:e.unref(r)("Collapse All")},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(vs))]),_:1})]),_:1},8,["title"])]),_:1}),e.createVNode(e.unref(u.NTree),{class:"flex-grow-1",style:{height:"10px"},"virtual-scroll":"","show-line":"","block-node":"",draggable:t.sortAction!=null||t.moveAction!=null,data:s.value,pattern:m.value,"render-label":x,"render-prefix":V,onDrop:E,"selected-keys":c.value,"default-expanded-keys":i.value,"onUpdate:selectedKeys":k},null,8,["draggable","data","pattern","selected-keys","default-expanded-keys"])]))}}),fc=["src"],Bn=e.defineComponent({__name:"PhotoBox",props:{src:{},fallbackSrc:{}},setup(t){const l=t,n="/img/no_photo.png";let r=!1;function a(s){if(!r){var c=s.target;c instanceof HTMLImageElement&&(r=!0,c.src=l.fallbackSrc??n)}}return e.watch(()=>l.src,()=>{r=!1}),(s,c)=>(e.openBlock(),e.createElementBlock("img",{src:s.src,style:{"border-radius":"0.8em","object-fit":"cover"},onError:a},null,40,fc))}}),uc={class:"flex-column gap05"},pc={key:0},mc={class:"flex-row gap05",style:{"align-items":"center"}},Vn=e.defineComponent({__name:"PrintModal",props:{show:{type:Boolean},title:{default:"Print"},name:{},action:{},additionParams:{},width:{default:"300px"},disabled:{type:Boolean},beforePrint:{}},emits:["update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=e.ref(!1),c=e.ref(d()),m=e.ref(g()),i=[{label:r("Collated (123-123-123)"),value:"Collated"},{label:r("Uncollated (111-222-333)"),value:"Uncollated"}];function d(){if(o.name){const h=Number(localStorage.getItem(`${o.name}:print-copies`));if(h&&h>0)return h}return 1}function g(){if(o.name){const h=localStorage.getItem(`${o.name}:print-collate`);if(h&&(h=="Collated"||h=="Uncollated"))return h}return"Collated"}function f(){if(o.disabled||s.value)return;const h={action:o.action,collate:m.value,copies:c.value,additionParams:o.additionParams};if(o.beforePrint&&o.beforePrint(h)==!1)return;let b=h.action;b&&(b=v(b,[{collate:h.collate,copies:h.copies},h.additionParams]),o.name&&(localStorage.setItem(`${o.name}:print-collate`,m.value),localStorage.setItem(`${o.name}:print-copies`,c.value.toString())),s.value=!1,a.openFile({url:b,loadingStatus:N=>s.value=N,callback:()=>{s.value=!1,n("update:show",!1)}}))}return(h,b)=>(e.openBlock(),e.createBlock(e.unref(u.NModal),{class:"custom-card",show:h.show,preset:"card",style:e.normalizeStyle({width:h.width}),onClose:b[3]||(b[3]=()=>h.$emit("update:show",!1))},{header:e.withCtx(()=>[e.createElementVNode("div",mc,[e.createVNode(e.unref(u.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(Za))]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(r)(h.title)),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{onClick:f,style:{"min-width":"100px"},type:"primary",loading:s.value,disable:!h.action||h.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Print")),1)]),_:1},8,["loading","disable"]),e.createVNode(e.unref(u.NButton),{onClick:b[2]||(b[2]=()=>h.$emit("update:show",!1)),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",uc,[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Number of print copies"))+":",1),e.createVNode(e.unref(u.NInputNumber),{value:c.value,"onUpdate:value":b[0]||(b[0]=N=>c.value=N),min:"1"},null,8,["value"])]),c.value>1?(e.openBlock(),e.createElementBlock("div",pc,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Copies print order")),1),e.createVNode(e.unref(u.NSelect),{options:i,value:m.value,"onUpdate:value":b[1]||(b[1]=N=>m.value=N)},null,8,["value"])])):e.createCommentVNode("",!0)])]),_:3},8,["show","style"]))}}),hc={key:0,style:{"text-align":"center"}},gc=["src"],yc={key:1,style:{"text-align":"center"}},Mn=e.defineComponent({__name:"QrModal",props:{title:{default:"QR Code"},code:{},show:{type:Boolean}},emits:["update:show"],setup(t,{emit:l}){const o=t,{t:n}=Z(),r=e.computed(()=>`/api/core/QR/Image?code=${encodeURIComponent(o.code||"")}&format=CODE_128&width=200&height=200`);return(a,s)=>{const c=e.resolveComponent("n-text");return e.openBlock(),e.createBlock(e.unref(u.NModal),{show:a.show,"onUpdate:show":s[1]||(s[1]=m=>a.$emit("update:show",m)),preset:"card",title:e.unref(n)(a.title),style:{"max-width":"350px"}},{default:e.withCtx(()=>[a.code?(e.openBlock(),e.createElementBlock("div",hc,[e.createElementVNode("img",{src:r.value},null,8,gc),e.createVNode(e.unref(u.NH3),{style:{margin:"1em"}},{default:e.withCtx(()=>[e.createVNode(c,{class:"text-monospace"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.code),1)]),_:1})]),_:1}),e.createVNode(e.unref(u.NButton),{onClick:s[0]||(s[0]=()=>a.$emit("update:show",!1)),type:"primary",style:{width:"200px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("Close")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",yc,[e.createVNode(e.unref(u.NEmpty))]))]),_:1},8,["show","title"])}}}),wc={class:"flex-row",style:{"align-items":"center"}},Cc={style:{"margin-left":"0.5em"}},Tn=e.defineComponent({__name:"SearchCard",props:{title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean},additionQuery:{}},emits:["searchBack"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref([]),s=(i,d)=>{a.value=d??[]},c=()=>{a&&n("searchBack",a.value,o.config)},m=i=>{i&&i.length&&n("searchBack",i,o.config)};return(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NCard),{class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createElementVNode("div",wc,[e.createVNode(e.unref(u.NIcon),{color:"#3F51B5",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createElementVNode("span",Cc,e.toDisplayString(e.unref(r)(i.title)),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px"},disabled:a.value.length==0,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["disabled"])]),default:e.withCtx(()=>[e.createVNode(Ze,{class:"flex-grow-1",config:i.config,"multi-select":i.multiSelect,"auto-close":i.autoClose,"addition-query":i.additionQuery,onResultSelected:s,onSearchBack:m},null,8,["config","multi-select","auto-close","addition-query"])]),_:1}))}});class bc{constructor(){J(this,"rows",Array());J(this,"totalRecords",null);J(this,"pageIndex",0);J(this,"pageSize",10);J(this,"pageCount",null);J(this,"noTotal",!1);J(this,"message",null);J(this,"summary",null);J(this,"currentPageRecords",0);J(this,"meta")}}const kc={class:"flex-grow-1 flex-column"},Nc={class:"icon-container"},xc=["title"],Qe="browse_icon_directory",An="page_index",En="search_words",_n=32,zt=re(e.defineComponent({__name:"SelectIconBox",emits:["update:selected"],setup(t,{emit:l}){const o=l,{t:n}=Z(),r=ie(),a=e.ref(sessionStorage.getItem(Qe)),s=e.ref(f(void 0)),c=e.ref([]),m=e.ref(1),i=e.ref(0),d=e.ref(!1),g=e.ref(sessionStorage.getItem(En));function f(T){const k=[{name:n("Root"),path:"/"}];if(T){for(;T.startsWith("/")||T.startsWith("\\");)T=T.substring(1);const x=T.split(/[\\/]+/);let V="/";for(const E of x){V+=E;const O={name:E,path:V};k.push(O),V+="/"}}return k}function h(T){T.isDirectory?a.value=T.path:T.path&&o("update:selected",T.path)}function b(){S(0)}function N(T){S(T-1)}function S(T){T=Math.max(0,T);let k=`/api/core/SystemIcons/page?pageSize=${_n}&pageIndex=${T}`;var x=g.value;x&&(k+=`&searchWords=${encodeURIComponent(x)}`);const V=a.value;V&&(k+=`&directory=${encodeURIComponent(V)}`),r.get({url:k,callback:E=>{E&&(c.value=E.rows,i.value=E.totalRecords,m.value=E.pageIndex+1,P(E.pageIndex,V,x))},loadingStatus:E=>d.value=E})}function P(T,k,x){sessionStorage.setItem(An,T.toString()),k?sessionStorage.setItem(Qe,k):sessionStorage.removeItem(Qe),x?sessionStorage.setItem(En,x):sessionStorage.removeItem(Qe)}return e.watch(a,T=>{s.value=f(T),S(0)}),e.onMounted(()=>{s.value=f(a.value);let T=Number(sessionStorage.getItem(An));S(T||0)}),(T,k)=>(e.openBlock(),e.createElementBlock("div",kc,[e.createElementVNode("div",null,[e.createVNode(e.unref(u.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,x=>(e.openBlock(),e.createBlock(e.unref(u.NBreadcrumbItem),{key:x.path},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{text:"",onClick:()=>a.value=x.path,title:x.path},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Po))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.name)+" ",1)]),_:2},1032,["onClick","title"])]),_:2},1024))),128))]),_:1})]),e.createVNode(e.unref(u.NCard),{class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createVNode(e.unref(u.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInput),{style:{width:"250px"},placeholder:e.unref(n)("Quick Search"),clearable:"",onChange:b,value:g.value,"onUpdate:value":k[0]||(k[0]=x=>g.value=x)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["placeholder","value"]),e.createVNode(e.unref(u.NButton),{title:e.unref(n)("Search"),onClick:b,style:{padding:"0 8px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(n)("Search")),1)]),_:1},8,["title"])]),_:1})]),footer:e.withCtx(()=>[e.createVNode(e.unref(u.NPagination),{page:m.value,"onUpdate:page":[k[1]||(k[1]=x=>m.value=x),N],"item-count":i.value??0,"page-size":_n},{suffix:e.withCtx(({startIndex:x,endIndex:V,itemCount:E})=>[E?(e.openBlock(),e.createBlock(e.unref(u.NText),{key:0,italic:"",depth:"3"},{default:e.withCtx(()=>[e.createTextVNode("["+e.toDisplayString(x+1)+"~"+e.toDisplayString(V+1)+"] / "+e.toDisplayString(E),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:1},8,["page","item-count"])]),default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpin),{show:d.value,class:"flex-grow-1 flex-column","content-class":"flex-grow-1 flex-column"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NScrollbar),{"x-scrollable":"",class:"flex-grow-1",style:{"min-height":"100%","min-width":"100%",overflow:"auto",height:"1px",width:"1px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,x=>(e.openBlock(),e.createBlock(e.unref(u.NButton),{quaternary:"",class:"icon-button",onClick:()=>h(x)},{default:e.withCtx(()=>[e.createElementVNode("div",{style:{overflow:"hidden"},title:x.name},[e.createElementVNode("div",null,[x.isDirectory?(e.openBlock(),e.createBlock(e.unref(u.NIcon),{key:0,size:"48",color:"#FFCA28"},{default:e.withCtx(()=>[e.createVNode(e.unref(Po))]),_:1})):(e.openBlock(),e.createBlock(e.unref(u.NImage),{key:1,width:"48",height:"48","preview-disabled":"",src:"/api/core/SystemIcons/Icons?path="+x.path},null,8,["src"]))]),e.createElementVNode("div",null,e.toDisplayString(x.name),1)],8,xc)]),_:2},1032,["onClick"]))),256))])]),_:1})]),_:1},8,["show"])]),_:1})]))}}),[["__scopeId","data-v-ff87aac6"]]),zn=e.defineComponent({__name:"SelectObjectModal",props:{show:{type:Boolean},title:{default:"Select Object"},items:{},getListAction:{},width:{default:300},keyName:{default:"id"},selectedValue:{},message:{},description:{}},emits:["update:show","valueSelected"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=u.useMessage(),s=e.inject("axios"),c=e.ref(d(o.items)),m=e.ref(!1),i=e.ref(o.selectedValue);function d(h){if(h){if(!h.length||typeof h[0]=="object")return h}else return[];const b=[];for(let N of h)typeof N=="string"||typeof N=="number"?b.push({id:N.toString(),code:r(N.toString())}):b.push(N);return b}async function g(){var b;if(m.value)return;const h=o.getListAction;if(!h){c.value=[];return}try{m.value=!0;const N=await s.get(h);N.isSuccess&&N.value!=null?Array.isArray(N.value)?c.value=N.value:Array.isArray((b=N.value)==null?void 0:b.rows)?c.value=N.value.rows:c.value=[]:a.error(r(N.errorMessage||"Error"))}catch(N){console.log(N),a.error((N==null?void 0:N.toString())||r("Error"))}finally{m.value=!1}}function f(){i.value&&n("valueSelected",i.value)}return e.onMounted(()=>{o.getListAction&&g()}),e.watch(()=>o.getListAction,()=>{g()}),(h,b)=>(e.openBlock(),e.createBlock(e.unref(u.NSpin),{show:m.value},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NModal),{show:h.show,style:e.normalizeStyle({width:h.width+"px",minWidth:"100px"}),preset:"card",title:e.unref(r)(h.title),onClose:b[2]||(b[2]=()=>h.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:"",align:"stretch"},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"header"),e.createVNode(e.unref(u.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)),1)]),_:1}),e.createVNode(e.unref(u.NRadioGroup),{value:i.value,"onUpdate:value":b[0]||(b[0]=N=>i.value=N),name:"valueList",style:{display:"block"}},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NSpace),{vertical:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,N=>(e.openBlock(),e.createBlock(e.unref(u.NRadio),{key:N[h.keyName],value:N[h.keyName]},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{data:N},()=>[e.createTextVNode(e.toDisplayString(N.code)+" "+e.toDisplayString(N.name),1)])]),_:2},1032,["value"]))),128))]),_:3})]),_:3},8,["value"]),e.createVNode(e.unref(u.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.description),1)]),_:1}),e.renderSlot(h.$slots,"bottom"),e.createVNode(e.unref(u.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:f},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1}),e.createVNode(e.unref(u.NButton),{style:{"min-width":"100px"},onClick:b[1]||(b[1]=()=>h.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),_:3})]),_:3},8,["show","style","title"])]),_:3},8,["show"]))}});function Ln(t,l){for(let o of t){if(o.guid==l)return o;if(Array.isArray(o.items)){const n=Ln(o.items,l);if(n)return n}}}const Lt=()=>{const t={};function l(n,r,a){return!!(r&&r.includes(a)||n.title&&n.title.includes(a)||n.url&&n.url.includes(a))}function o(n,r,a,s){var m;const c=new Array;if(r){let i=0,d=!1;for(const g of r)if(g.isEnabled!==!1)if(g.isSeparator)d||(c.push({type:"divider",key:`_${a}_${i++}`}),d=!0);else{const f=n(g.title),h={key:g.guid,id:g.guid,label:f,disabled:!g.isEnabled,href:g.url,tabBehavior:g.tabBehavior};if(g.items&&g.items.length)h.children=o(n,g.items,g.guid,s);else if(s&&!l(g,f,s))continue;g.guid&&g.icon&&(t[g.guid]={icon:g.icon,color:g.color}),((m=h.children)!=null&&m.length||h.href)&&c.push(h),d=!1}}return c.every(i=>i.type=="divider")?[]:c}return{menuLooks:t,systemMenuToNaiveMenu:o}},Dn=e.defineComponent({__name:"SideMenu",props:{collapsed:{type:Boolean},currentMenuId:{}},setup(t){const{t:l}=Z(),o=e.inject("axios"),n=Se(),r=/^https?:\/\//i,a=e.ref([]),s=e.ref(void 0),c=Lt(),m=e.computed(()=>c.systemMenuToNaiveMenu(l,n.menus,void 0,s.value)),i=e.computed(()=>n.isLoadingMenu);function d(h){if(typeof h.href=="string"&&h.href&&!h.children){let b=h.href.startsWith("~")?h.href.substring(1):h.href;h.id&&(b=v(b,{_menuid:h.id}));let N;return h.tabBehavior=="NewTab"?N="_blank":h.tabBehavior=="NamedTab"&&(N=h.id),r.test(b)?e.h("a",{href:b,target:"_blank"},{default:()=>h.label}):e.h(ce.RouterLink,{to:b,target:N},{default:()=>h.label})}else return typeof h.label=="string"?h.label:""}function g(h){var b,N,S;if(h.key){const P=(b=c.menuLooks[h.key])==null?void 0:b.icon;if(P)return e.h(xe,{path:P,class:"menu-icon"});if((N=h.children)!=null&&N.length){const T=(S=h.key)==null?void 0:S.toString();return T&&a.value.includes(T)?e.h(u.NIcon,{class:"menu-icon"},{default:()=>e.h(ci)}):e.h(u.NIcon,{class:"menu-icon"},{default:()=>e.h(Bt)})}else return e.h(u.NIcon,{class:"menu-icon"},{default:()=>e.h(cn)})}}function f(h){if(h)try{o.post(`/api/core/UserRecentMenus/add?menuId=${encodeURIComponent(h)}`)}catch(b){console.error(b)}}return e.onMounted(()=>{!n.menus&&!n.isLoadingMenu&&n.sessionToken&&n.loadMenus()}),e.watch(()=>n.sessionToken,()=>n.loadMenus()),(h,b)=>{const N=e.resolveComponent("n-scrollbar"),S=e.resolveComponent("n-input");return e.openBlock(),e.createBlock(e.unref(u.NSpin),{show:i.value,class:"h-100 menu-spin","content-class":"flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NMenu),{collapsed:h.collapsed,"collapsed-width":64,"collapsed-icon-size":22,options:m.value,"root-indent":16,indent:16,"render-label":d,"render-icon":g,value:h.currentMenuId,accordion:!0,"onUpdate:expandedKeys":b[0]||(b[0]=P=>a.value=P),"onUpdate:value":f},null,8,["collapsed","options","value"])]),_:1}),e.withDirectives(e.createVNode(S,{style:{width:"250px"},placeholder:e.unref(l)("Search Menu"),clearable:"",onChange:b[1]||(b[1]=P=>s.value=P)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(u.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pn))]),_:1})]),_:1},8,["placeholder"]),[[e.vShow,!h.collapsed]])]),_:1},8,["show"])}}}),Sc=["src"],$n=e.defineComponent({__name:"SystemIconInput",props:{value:{},label:{},placeholder:{},readonly:{type:Boolean},clearable:{type:Boolean,default:!0}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(!1),s=e.ref(void 0);function c(){a.value=!a.value}function m(i){i!=null&&!o.readonly&&(n("update:value",i),a.value=!1)}return e.watch(()=>o.value,i=>{i?s.value=`/api/core/SystemIcons/Icons?path=${encodeURIComponent(i)}`:s.value=void 0}),(i,d)=>(e.openBlock(),e.createBlock(e.unref(u.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.NInputGroupLabel),{style:{display:"flex","justify-content":"center","align-items":"center",width:"40px"}},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.value,style:{height:"16px",width:"16px","align-self":"center"}},null,8,Sc)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(u.NInput),{readonly:i.readonly,value:i.value,placeholder:i.placeholder,"onUpdate:value":d[0]||(d[0]=g=>i.$emit("update:value",g)),clearable:i.clearable},null,8,["readonly","value","placeholder","clearable"]),e.createVNode(e.unref(u.NButton),{ghost:"",onClick:c,disabled:i.readonly},{default:e.withCtx(()=>d[4]||(d[4]=[e.createTextVNode(" … ",-1)])),_:1,__:[4]},8,["disabled"]),e.createVNode(e.unref(u.NModal),{show:a.value,"onUpdate:show":d[2]||(d[2]=g=>a.value=g),title:e.unref(r)("Select Icon"),onClose:d[3]||(d[3]=()=>a.value=!1),preset:"card",style:{width:"730px",height:"600px"},"content-style":"display: flex; flex-direction: column;"},{default:e.withCtx(()=>[e.createVNode(zt,{"onUpdate:selected":d[1]||(d[1]=g=>m(g))})]),_:1},8,["show","title"])]),_:1}))}}),Ic=e.defineComponent({components:{NButton:u.NButton,NIcon:u.NIcon},props:{title:String,iconColor:String,icon:Object},setup(){const{t}=Z();return{t}}});function Bc(t,l,o,n,r,a){const s=e.resolveComponent("n-icon"),c=e.resolveComponent("n-button");return e.openBlock(),e.createBlock(c,null,e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.title?t.t(t.title):""),1)]),_:2},[t.icon?{name:"icon",fn:e.withCtx(()=>[e.createVNode(s,{color:t.iconColor},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.icon),1)]),_:1},8,["color"])]),key:"0"}:void 0]),1024)}const Rn=re(Ic,[["render",Bc]]),Vc=e.defineComponent({name:"TopMenu",components:{NMenu:u.NMenu,NSpin:u.NSpin},setup(){const{t}=Z(),l=e.inject("axios"),o=Se(),n=/^https?:\/\//i,r=Lt(),a=e.computed(()=>r.systemMenuToNaiveMenu(t,o.menus)),s=e.computed(()=>o.isLoadingMenu);function c(d){if(typeof d.href=="string"&&d.href&&!d.children){let g=d.href.startsWith("~")?d.href.substr(1):d.href;d.id&&(g=v(g,{_menuid:d.id}));let f;return d.tabBehavior=="NewTab"?f="_blank":d.tabBehavior=="NamedTab"&&(f=d.id),n.test(g)?e.h("a",{href:g,target:"_blank"},{default:()=>d.label}):e.h(ce.RouterLink,{to:g,target:f},{default:()=>d.label})}else return d.label}function m(d){var g,f;if(d.key){const h=(g=r.menuLooks[d.key])==null?void 0:g.icon;return h?e.h(xe,{path:h,class:"menu-icon"}):(f=d.children)!=null&&f.length?void 0:e.h("div",{class:"menu-icon-blank"},[])}}function i(d){if(d)try{l.post(`/api/core/UserRecentMenus/add?menuId=${encodeURIComponent(d)}`)}catch(g){console.error(g)}}return e.onMounted(()=>{!o.menus&&!o.isLoadingMenu&&o.sessionToken&&o.loadMenus()}),e.watch(()=>o.sessionToken,()=>o.loadMenus()),{menuOptions:a,isLoadingMenu:s,renderMenuLabel:c,renderMenuIcon:m,onMenuSelected:i}}});function Mc(t,l,o,n,r,a){const s=e.resolveComponent("n-menu"),c=e.resolveComponent("n-spin");return e.openBlock(),e.createBlock(c,{show:t.isLoadingMenu},{default:e.withCtx(()=>[e.createVNode(s,{mode:"horizontal",options:t.menuOptions,"render-label":t.renderMenuLabel,"render-icon":t.renderMenuIcon,"onUpdate:value":t.onMenuSelected},null,8,["options","render-label","render-icon","onUpdate:value"])]),_:1},8,["show"])}const On=re(Vc,[["render",Mc]]),Tc=e.defineComponent({name:"TreeView",emits:["update:selectedId","update:path"],props:{selectedId:[Number,String],path:Array,rootId:{type:[Number,String],default:""},rootName:{type:String,default:"Root"},parentKey:{type:String,default:"parentId"},childrenAction:String,moveAction:String,sortAction:String,treeNodeMapper:Function,labelRender:Function},setup(t,l){const o=u.useMessage(),n=e.inject("axios"),{t:r}=Z(),a=e.ref(new Array),s=e.ref(new Array),c=e.ref(new Array);function m(D,H){for(const B of D){if(B.key==H)return{node:B,path:[B.key]};if(B.key!=null&&B.key!=null&&B.children&&!B.isLeaf){const y=m(B.children,H);if(y)return{node:y,path:[B.key,...y.path]}}}return null}function i(D,H){for(let B=0;B<D.length;B++){const y=D[B];if(y.key==H)return{nodes:D,index:B};if(y.children){const I=i(y.children,H);if(I)return I}}return null}function d(D){const H=m(a.value,D);return H?H.path:[]}function g(D,H){const B=new Array;for(const y of D)if(y.key&&(!H||H(y.key))&&B.push(y.key),y.children){const I=g(y.children,H);I.length&&B.push(...I)}return B}function f(D){s.value=D}function h(D){c.value=D;const H=D.length?D[0]:null;l.emit("update:selectedId",H);const B=H?d(H):[];l.emit("update:path",B)}function b(D){return t.treeNodeMapper?t.treeNodeMapper.call(void 0,D):{key:D.id,label:D.title,isLeaf:!D.hasSubitems}}async function N(D){const H=t.childrenAction,B=t.parentKey;if(!(!H||!B))try{const y=v(H,{parentKey:B,parentId:D}),I=await n.get(y);if(I.isSuccess&&I.value!=null)return I.value.map(b);o.error(r(I.errorMessage||"Error"))}catch(y){console.log(y),o.error((y==null?void 0:y.toString())||r("Error"))}}async function S(){a.value=[{key:t.rootId,label:r(t.rootName||"Root"),isLeaf:!1,children:await N(null)}],t.selectedId==null?c.value=[t.rootId]:t.selectedId?c.value=[t.selectedId]:c.value=[],s.value=[t.rootId]}async function P(D){const H=D.key;if(H!=null){if(D.children){const y=s.value,I=g(D.children,A=>y.includes(A));s.value=s.value.filter(A=>!I.includes(A))}const B=await N(H);B&&(D.isLeaf=!B.length,D.children=B.length?B:void 0)}}function T(D){return e.h("span",null,D.option.label)}function k(D){if(!D.option.isLeaf)return e.h(u.NIcon,null,{default:()=>e.h(Bt)})}function x(D){const H=D.option.key;if(H!=null&&c.value.includes(H))return e.h(u.NButton,{text:!0,onClick:B=>{B.stopPropagation(),P(D.option)}},{default:()=>e.h(u.NIcon,null,{default:()=>e.h(je)})})}function V(D){!t.moveAction&&!t.sortAction||(D.dropPosition=="before"||D.dropPosition=="after"?D.dragNode.key&&typeof D.node.key&&O(D.dragNode,D.node,D.dropPosition):D.dropPosition=="inside"&&typeof D.dragNode.key=="number"&&typeof D.node.key=="number"&&E(D.dragNode,D.node))}async function E(D,H){const B=t.moveAction;if(!B)return;const y=D.key,I=[D.key],A=H.key;if(!(!y||!A||D==H))try{const L=await n.post(B,{menuItemIds:I,targetId:A});if(L.isSuccess){o.success(r("Successful operation."));const z=i(a.value,y);z&&(z.nodes.splice(z.index,1),H.children?H.children.push(D):P(H))}else o.error(r(L.errorMessage||"Error"))}catch(L){console.log(L),o.error((L==null?void 0:L.toString())||"Error")}}async function O(D,H,B){const y=t.sortAction;if(!y)return;console.log(`dragNode: ${D.key} ${D.label}, targetNode: ${H.key} ${H.label}, dropPosition: ${B}`);const I=D.key;let A=H.key;if(!I||!A||I==A)return;const L=i(a.value,I);if(L){if(B=="after"){const z=L.nodes.indexOf(H);if(z>-1&&z<L.nodes.length-1&&(H=L.nodes[z+1],A=H.key,!A||I==A))return}try{const z=await n.post(y,{menuId:I,nextSiblingId:A});if(z.isSuccess){o.success(r("Successful operation.")),L.nodes.splice(L.index,1);const F=L.nodes.indexOf(H);F>-1?L.nodes.splice(F,0,D):L.nodes.push(D)}else o.error(r(z.errorMessage||"Error"))}catch(z){console.log(z),o.error((z==null?void 0:z.toString())||"Error")}}}async function j(D){var H;if(D.length){let B=(H=a.value)==null?void 0:H.find(L=>L.key==D[0]);B==null&&(B={key:D[0],label:r(t.rootName||"Root"),isLeaf:!1},a.value.push(B));let y=D[0],I=B;for(let L=1;L<D.length-1&&I;L++)if(I.children||(I.children=await N(y)),I.children){const z=D[L];I=I.children.find(F=>F.key==z),y=z}const A=s.value;for(let L=0;L<D.length-1;L++)A.includes(D[L])||A.push(D[L]);s.value=A,c.value=[D[D.length-1]]}}return e.onMounted(()=>{S()}),e.watch(()=>t.childrenAction,()=>{S()}),e.watch(()=>t.path,D=>{D&&j(D)}),{data:a,expandedKeys:s,expandedKeysChanged:f,loadChildren:P,dragDrop:V,renderLabel:T,renderPrefix:k,renderSuffix:x,selectedKeys:c,selectedKeysChanged:h}}});function Ac(t,l,o,n,r,a){const s=e.resolveComponent("n-tree");return e.openBlock(),e.createBlock(s,{"block-line":"",remote:t.childrenAction!=null,draggable:t.sortAction!=null||t.moveAction!=null,data:t.data,"render-label":t.renderLabel,"render-prefix":t.renderPrefix,"render-suffix":t.renderSuffix,onLoad:t.loadChildren,onDrop:t.dragDrop,"expanded-keys":t.expandedKeys,"onUpdate:expandedKeys":t.expandedKeysChanged,"selected-keys":t.selectedKeys,"onUpdate:selectedKeys":t.selectedKeysChanged},null,8,["remote","draggable","data","render-label","render-prefix","render-suffix","onLoad","onDrop","expanded-keys","onUpdate:expandedKeys","selected-keys","onUpdate:selectedKeys"])}const jn=re(Tc,[["render",Ac]]),Ec=e.defineComponent({components:{ChangePassword:ft,NotificationIcon:Oa},setup(){var f;const t=ce.useRouter(),{t:l}=Z(),o=u.useDialog(),n=Ne(),r=Se(),a=nt(),s=e.computed(()=>r.userInfo),c=e.ref(!1),m="/img/user_avatar.png";function i(){o.warning({title:l("Logout"),content:l("Are you sure log out?"),positiveText:l("OK"),negativeText:l("Cancel"),onPositiveClick:()=>{r.logout(),a.clearTabs(),t.push({path:"/login"})}})}function d(h){switch(h){case"preferences":t.push({path:"/core/preferences"});break;case"change_password":c.value=!0;break;case"logout":i();break;case"toggle_theme":n.toggleTheme();break}}const g=[{label:(f=s.value)==null?void 0:f.userName,type:"group",key:"user_group",children:[{label:l("Preferences"),key:"preferences",icon(){return e.h(u.NIcon,null,{default:()=>e.h(Ea)})}},{label:l("Change Password"),key:"change_password",icon(){return e.h(u.NIcon,null,{default:()=>e.h(Fa)})}}]},{label:l("Toggle Theme"),key:"toggle_theme",icon(){return e.h(u.NIcon,null,{default:()=>e.h(ha)})}},{type:"divider"},{label:l("Logout"),key:"logout",icon(){return e.h(u.NIcon,null,{default:()=>e.h(Ta)})}}];return{userInfo:s,options:g,onMenuSelected:d,changePwdBoxShow:c,defaultAvatarPath:m}}}),_c={style:{margin:"0 20px 10px 0",cursor:"pointer"}},zc={class:"user-name-box"},Lc={class:"user-name-label"};function Dc(t,l,o,n,r,a){const s=e.resolveComponent("n-avatar"),c=e.resolveComponent("n-dropdown"),m=e.resolveComponent("change-password"),i=e.resolveComponent("n-space");return e.openBlock(),e.createBlock(i,{style:{"align-items":"center"}},{default:e.withCtx(()=>[e.createVNode(c,{trigger:"click",options:t.options,placement:"bottom-end",onSelect:t.onMenuSelected,size:"medium"},{default:e.withCtx(()=>{var d,g,f;return[e.createElementVNode("div",_c,[e.createVNode(s,{round:"",size:"medium",title:(d=t.userInfo)==null?void 0:d.userName,src:`/api/core/avatar?id=${(g=t.userInfo)==null?void 0:g.avatar}`,"fallback-src":t.defaultAvatarPath,bordered:"",style:{position:"absolute","z-index":"10"}},null,8,["title","src","fallback-src"]),e.createElementVNode("div",zc,[e.createElementVNode("div",Lc,e.toDisplayString((f=t.userInfo)==null?void 0:f.name),1)])])]}),_:1},8,["options","onSelect"]),e.createVNode(m,{show:t.changePwdBoxShow,onClose:l[0]||(l[0]=()=>t.changePwdBoxShow=!1)},null,8,["show"])]),_:1})}const Fn=re(Ec,[["render",Dc],["__scopeId","data-v-0d4b7b61"]]),$c={class:"flex-row"},Rc={class:"app-tab-label"},Oc={style:{"margin-left":"4px"}},Pn=e.defineComponent({__name:"TabMenu",props:{type:{default:"card"}},setup(t){const l=ce.useRouter(),o=Se(),n=e.computed(()=>o.menus),r=e.ref(void 0);l.afterEach(c=>{!c.path||c.path=="/"||c.name=="blank"||(r.value=a(c.path))});function a(c){var i;const m=(i=o.menus)==null?void 0:i.find(d=>{var g;return((g=d.url)==null?void 0:g.toLowerCase())==c.toLowerCase()});if(m)return m.guid}function s(c){var m;if(c){const i=(m=o.menus)==null?void 0:m.find(d=>d.guid==c);i&&i.url&&(l.push(i.url),r.value=i.guid)}}return e.watch(()=>o.sessionToken,()=>o.loadMenus()),e.onMounted(()=>{!o.menus&&!o.isLoadingMenu&&o.sessionToken&&o.loadMenus()}),(c,m)=>n.value&&n.value.length?(e.openBlock(),e.createBlock(e.unref(u.NTabs),{key:0,class:"app-tabs",type:c.type,"justify-content":"space-evenly",animated:"","tab-class":"tab-item","tabs-padding":8,value:r.value,"onUpdate:value":s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,i=>(e.openBlock(),e.createBlock(e.unref(u.NTab),{key:i.guid,name:i.guid},{default:e.withCtx(()=>[e.createElementVNode("div",$c,[e.createElementVNode("div",null,[i.icon?(e.openBlock(),e.createBlock(xe,{key:0,path:i.icon},null,8,["path"])):(e.openBlock(),e.createBlock(e.unref(u.NIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(fi))]),_:1}))]),e.createElementVNode("div",Rc,[e.createElementVNode("span",Oc,e.toDisplayString(i.title),1)])])]),_:2},1032,["name"]))),128))]),_:1},8,["type","value"])):e.createCommentVNode("",!0)}});class jc{constructor(){J(this,"token");J(this,"userId");J(this,"startupTime")}}class Fc{constructor(){J(this,"guid","");J(this,"title","");J(this,"icon");J(this,"color");J(this,"url");J(this,"isSeparator",!1);J(this,"isEnabled",!0);J(this,"groupName");J(this,"description");J(this,"items");J(this,"tabBehavior");J(this,"closable")}}const Pc=$e.defineStore("fontSize",()=>{const t={small:"14px",medium:"16px",large:"20px"},l="medium",o=()=>{var s;const a=(s=localStorage.getItem("fontSizeMode"))==null?void 0:s.toString();return a&&t[a]?a:l},n=e.ref(o());return{fontSizeMode:n,fontSizeOptions:t,setFontSize:a=>{t[a]&&(n.value=a,localStorage.setItem("fontSizeMode",a))},getFontSize:()=>t[n.value??l]}}),Hc={AppLogoBox:Jt,AppTabs:Go,AutoScrollView:Ko,BarcodeImage:Zo,ChangePassword:ft,ColorInput:ut,DefaultPropertyForm:kt,DetailPage:rn,ExportModal:Vt,EmptyDetailView:mn,FormInput:Ve,FullscreenSwitch:hn,GridConfigModal:Tt,HaloButtonSelect:yn,HaloDatePicker:Pe,HaloForm:Cn,HaloGrid:We,HaloModal:bn,HaloModalInput:bt,HaloSelect:kn,HaloTagsInput:wt,HaloTimePicker:ht,HaloTransfer:Nn,ImportModal:Ye,InputModal:_t,ListInputModal:Ct,MainDetailPanel:xn,MenuIcon:xe,NullableBooleanInput:gt,NumberInputModal:Sn,ObjectTreeView:In,PhotoBox:Bn,PrintModal:Vn,PropertyGrid:Nt,QrModal:Mn,SearchCard:Tn,SearchForm:Ke,SearchModal:Et,SearchPanel:Ze,SelectIconBox:zt,SelectObjectModal:zn,SideMenu:Dn,SystemIconInput:$n,TagsView:At,ToolButton:Rn,TopMenu:On,TreeView:jn,UserMenu:Fn,TabMenu:Pn},Gc={install(t,l){const o={...Ho,...l};for(const[n,r]of Object.entries(Hc))t.component(n,r);l!=null&&l.langCode&&t.use(Xt,l==null?void 0:l.langCode,!0),t.provide("axios",le),t.provide(ct,o)}};M.axios=le,M.AppLogoBox=Jt,M.AppTabs=Go,M.AutoScrollView=Ko,M.BarcodeImage=Zo,M.ChangePassword=ft,M.ColorInput=ut,M.DataPage=bc,M.DateFormat=ge,M.DateTimeFormat=Ee,M.DefaultPropertyForm=kt,M.DetailPage=rn,M.EmptyDetailView=mn,M.ExportModal=Vt,M.FormInput=Ve,M.FullscreenSwitch=hn,M.GridConfigModal=Tt,M.HaloButtonSelect=yn,M.HaloDatePicker=Pe,M.HaloForm=Cn,M.HaloGrid=We,M.HaloModal=bn,M.HaloModalInput=bt,M.HaloSelect=kn,M.HaloTagsInput=wt,M.HaloTimePicker=ht,M.HaloTransfer=Nn,M.HalovConfigKey=ct,M.I18nPlugin=Xt,M.ImportModal=Ye,M.InputModal=_t,M.ListInputModal=Ct,M.MainDetailPanel=xn,M.MenuIcon=xe,M.NullableBooleanInput=gt,M.NumberInputModal=Sn,M.ObjectTreeView=In,M.PhotoBox=Bn,M.PrintModal=Vn,M.PropertyGrid=Nt,M.QrModal=Mn,M.SearchCard=Tn,M.SearchForm=Ke,M.SearchModal=Et,M.SearchPanel=Ze,M.SelectIconBox=zt,M.SelectObjectModal=zn,M.SessionSummary=jc,M.SideMenu=Dn,M.SystemIconInput=$n,M.SystemMenu=Fc,M.TabMenu=Pn,M.TagsView=At,M.TimeFormat=_e,M.ToolButton=Rn,M.TopMenu=On,M.TreeView=jn,M.UserMenu=Fn,M.addDays=Ur,M.appendParamsToUrl=v,M.arrayGroupBy=hs,M.arrayMove=ln,M.arrayRemoveIf=nn,M.buildBarcodeUrl=Wo,M.buildSearchItems=vo,M.camelToWords=te,M.clearObject=rs,M.convertItems=Uo,M.convertPercentValue=Ro,M.convertTo=Oe,M.copyEntity=qo,M.copyToEntity=Jo,M.createGridColumns=Be,M.createI18n=Qt,M.dateTimeToString=st,M.dateToNumber=Eo,M.dateToString=zo,M.default=Gc,M.defaultHalovOptions=Ho,M.defaultValue=$o,M.downloadFile=me,M.findMenuById=Ln,M.firstDayOfMonth=vr,M.formatTimespan=Lo,M.getColumnWidth=pt,M.getConfig=dt,M.iconRender=mt,M.iconRenderIf=is,M.initEntity=Xo,M.instanceOfColumnValueSource=Qo,M.instanceOfHaloColumn=Ie,M.instanceOfTime=Mo,M.isNullOrWhiteSpace=Oo,M.lastDayOfMonth=ea,M.linesToArray=oa,M.loadItemSources=Fe,M.mergeRoutes=ys,M.msToTime=Qr,M.onNullOrWhiteSpace=la,M.openFile=on,M.renderDifference=ds,M.renderIconButton=cs,M.renderLabel=ss,M.searchField=gs,M.secondsToTime=To,M.splitNumberByCount=ws,M.splitNumberBySize=Cs,M.stringToArray=ta,M.stringToTime=Ao,M.sumNumbers=bs,M.timeToString=_o,M.timestamp=Jr,M.toBool=de,M.toBoolDefault=Re,M.toDate=Vo,M.toViewModel=qr,M.useAccountStore=Se,M.useCommonStore=Ne,M.useFontSizeStore=Pc,M.useHttpTools=ie,M.useI18n=Z,M.useMenus=Lt,M.usePermissions=Mt,M.useTabsStore=nt,M.useUiTools=yt,M.validateEmail=na,Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("img[data-v-f7799232]{display:block;max-width:100%}.app-tab-item[data-v-df170cc3]{border-top-width:2px}[data-v-e7319d81] .n-upload-trigger{display:block}.item-box[data-v-e7319d81]{display:block;flex-grow:1}.form-input[data-v-e7319d81]{display:block}.text-input[data-v-e7319d81]{font-size:small;display:block;text-align:end;padding-right:4px}div[data-v-d6176d3f] div.n-form-item-feedback-wrapper{display:none}div[data-v-d6176d3f] .n-form-item-blank{margin-bottom:4px}.n-form-item.n-form-item--left-labelled.n-form-item--auto-label-width>label{min-width:8em}[data-v-18129d6e] .n-upload-trigger{display:block}.edit-title-btn{visibility:hidden}.grid-config-global-mode .edit-title-btn{visibility:visible}.main-detail-panel[data-v-ca4664e2]{display:flex;width:100%;height:100%;overflow:hidden;--n-resize-trigger-color: rgb(224, 224, 230, .24);--n-resize-trigger-color-hover: #36ad6a}.dark .main-detail-panel[data-v-ca4664e2]{--n-resize-trigger-color: rgba(255, 255, 255, .24);--n-resize-trigger-color-hover: #7fe7c4}.main-detail-panel.horizontal[data-v-ca4664e2]{flex-direction:row}.main-detail-panel.vertical[data-v-ca4664e2]{flex-direction:column}.panel[data-v-ca4664e2]{overflow:auto;display:flex;flex-direction:column}.divider[data-v-ca4664e2]{background-color:var(--n-resize-trigger-color);cursor:col-resize;transition:background .2s}.main-detail-panel.horizontal .divider[data-v-ca4664e2]{width:4px;height:100%}.main-detail-panel.vertical .divider[data-v-ca4664e2]{height:4px;width:100%;cursor:row-resize}.divider.dragging[data-v-ca4664e2],.divider[data-v-ca4664e2]:hover{background-color:var(--n-resize-trigger-color-hover)}.icon-container[data-v-ff87aac6]{display:flex;flex-direction:row;flex-wrap:wrap;padding-right:4px;padding-bottom:4px}.icon-button[data-v-ff87aac6]{max-width:100px;height:90px;width:80px;margin:4px 0 0 4px}.menu-spin>.n-spin-content{height:100%;display:flex;flex-direction:column}.user-name-box[data-v-0d4b7b61]{background:#abf3;position:relative;z-index:1;width:6rem;height:27px;line-height:27px;border-radius:0 27px 27px 0;left:20px;top:6px}.user-name-label[data-v-0d4b7b61]{padding-left:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase;text-align:center}.app-tabs{margin-bottom:0}.app-tabs.n-tabs .n-tabs-nav.n-tabs-nav--card-type{--n-tab-color: #D1D5DB;--n-tab-text-color: #1E1B4B;--n-tab-text-color-active: #1E1B4B;--n-tab-border-color: #A3A3A3}.dark .app-tabs.n-tabs .n-tabs-nav.n-tabs-nav--card-type{--n-tab-color: #27272A;--n-tab-text-color: #71717A;--n-tab-text-color-active: #D4D4D8;--n-tab-border-color: #525252}.app-tabs.n-tabs .n-tabs-nav.n-tabs-nav--card-type .n-tabs-tab.n-tabs-tab--active{background-color:#f4f4f5;border-bottom-color:#f4f4f5;font-weight:bolder;border-top-color:#1e40af}.dark .app-tabs.n-tabs .n-tabs-nav.n-tabs-nav--card-type .n-tabs-tab.n-tabs-tab--active{background-color:#171717;border-bottom-color:#171717;border-top-color:#e2e8f0}.app-tab-label{padding:0 1em}.d-block{display:block}.d-none{display:none}.d-flex{display:flex}.d-inline{display:inline}.d-inline-block{display:inline-block}.n-form .n-form-item .n-form-item-feedback-wrapper:empty{display:none}.n-form .n-form-item{margin-bottom:4px}.n-data-table-td,.n-data-table-th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.n-dropdown-menu.n-dropdown{min-width:150px}.text-monospace,.halo-form-code input,.halo-form-code-u input,.halo-form-code-l input{font-family:Monaco,Consolas,Liberation Mono,SimHei,Courier New,monospace}.halo-form-code-u input,.halo-form-code-u{text-transform:uppercase}.halo-form-code-l input,.halo-form-code-l{text-transform:lowercase}.halo-form-wrap{white-space:wrap;overflow-wrap:break-word;display:inline-block}.h-100{height:100%}.h-50{height:50%}td .halo-form-code,td .halo-form-code-u,td .halo-form-code-l{font-family:Monaco,Consolas,Liberation Mono,SimHei,Courier New,monospace}td.text-num{font-family:Monaco,Consolas,Liberation Mono,SimHei,Courier New,monospace;text-align:right}td.text-date,td.text-time,td.text-datetime{font-family:Monaco,Consolas,Liberation Mono,SimHei,Courier New,monospace}td .percent-mark{margin-left:4px;margin-right:2px}td .percent-mark svg{margin:0 auto;display:block}td .status-tag{border-radius:2px;border-width:0 0 0 4px;border-style:solid;padding:0 4px;font-size:smaller;border-color:#9999}td .status-New,td .status-Created,td .status-Standby{border-color:#8bc34a99}td .status-True,td .status-true,td .status-Success,td .status-Succeeded,td .status-Succeed,td .status-Good,td .status-InStock,td .status-Passed,td .status-Resolved,td .status-Processing,td .status-InProduction,td .status-Allowed,td .status-Qualified,td .status-Loaded{border-color:#18a05899}td .status-False,td .status-false,td .status-NonGood,td .status-Failed,td .status-Rejected,td .status-Abnormal,td .status-Forbidden,td .status-Defective{border-color:#d0305099}td .status-Confirmed,td .status-Dispatched,td .status-Inspected{border-color:#3f51b599}td .status-Consumed,td .status-Finished,td .status-Unloaded{border-color:#607d8b99}td .status-Ignored{border-color:#79554899}td .status-OutStock,td .status-Cancelled{border-color:#9e9e9e99}td .status-InTransit{border-color:#78909c99}td .status-InFactory{border-color:#43a04799}td .status-InGarage{border-color:#673ab799}td .status-Doubt,td .status-Paused{border-color:#ffc10799}td .status-Read{border-color:#ffc107cc}td .status-Write{border-color:#673ab7cc}.n-data-table .n-data-table-th .n-data-table-sorter:not(.n-data-table-sorter--asc):not(.n-data-table-sorter--desc){display:none}.n-data-table .btn-cell-ref .n-button__content{opacity:.2}.n-data-table .btn-cell-ref:hover .n-button__content{opacity:1;color:#673ab7}.n-data-table .btn-cell-qr .n-button__content{opacity:.2}.n-data-table .btn-cell-qr:hover .n-button__content{opacity:1;color:#673ab7}.n-data-table-td:not(.check-mark) .cell-unchecked{display:none}.draging-ghost{opacity:.5;background:#c8ebfb}.drag-sorting-handle{cursor:row-resize}.pg-item{margin:1px;border:1px solid transparent;padding:2px;border-radius:3px}.pg-item:hover{border-color:#eee}.dark .pg-item:hover{border-color:#fff6}.pg-label{padding:0 2px;white-space:nowrap;max-width:50%;text-overflow:clip}.pg-value{padding-left:.5em;padding-right:1em;position:relative}.menu-icon{border-radius:2px}.menu-icon-blank{width:16px;height:16px}.text-positive{color:#00c853}.text-negative,.text-danger{color:#b71c1c}ul,li{list-style:none}html,body,#app,.n-config-provider{height:100%;margin:0;padding:0}.flex-column{display:flex;flex-direction:column}.flex-row{display:flex;flex-direction:row}.flex-1{flex:1 1 0}.flex-grow-1{flex-grow:1}.flex-shrink-1{flex-shrink:1}.flex-wrap{flex-wrap:wrap}.gap1{gap:1em}.gap05{gap:.5em}.gap025{gap:.25em}.gap015{gap:.15em}.gap01{gap:.1em}.gap-x-1{column-gap:1em}.gap-x-05{column-gap:.5em}.gap-x-25{column-gap:.25em}.gap-y-1{row-gap:1em}.gap-y-05{row-gap:.5em}.gap-y-25{row-gap:.25em}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.week-0{background-color:#a5d6a7}input.ime-off,.ime-off input{ime-mode:disabled}.h-scroll{overflow-x:scroll}.v-scroll{overflow-y:scroll}.tabs-card.n-card>.n-card__content{padding:0}.tabs-card.n-card>.n-card__content .n-tab-pane{padding:0}.tabs-card.n-card>.n-card__content .n-tab-pane>.n-card{border-top:0}.info-card{flex-grow:1;margin-top:1em}.info-card>.n-card__content{display:flex;flex-direction:column}.info-card>.n-card__content>.n-tabs{flex-grow:1}.info-card>.n-card__content>.n-tabs>.n-tab-pane{flex-grow:1;display:flex;flex-direction:column}.info-card>.n-card__content>.n-tabs>.n-tab-pane>div{flex-grow:1;display:flex;flex-direction:column}.page-component.n-space>div:first-child{flex-grow:1;display:flex;flex-direction:column}.form-create .n-input--disabled .n-input__input-el,.form-create .n-input--disabled .n-input__placeholder,.form-create .n-input--disabled .n-input__textarea-el,.form-create .n-base-selection--disabled .n-base-selection-overlay__wrapper{color:#000;font-weight:700}.bordered{border:1px solid var(--n-border-color);border-radius:var(--n-border-radius)}.n-dialog__content .line,.n-message__content .line{display:block}.n-tree-node-content__text{white-space:nowrap}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("axios"),require("vue-router"),require("naive-ui"),require("pinia"),require("moment"),require("mustache"),require("vue-draggable-plus")):typeof define=="function"&&define.amd?define(["exports","vue","axios","vue-router","naive-ui","pinia","moment","mustache","vue-draggable-plus"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.halov={},M.Vue,M.axios,M.VueRouter,M.NaiveUI,M.Pinia,M.moment,M.Mustache,M.VueDraggablePlus))})(this,function(M,e,le,ce,f,$e,se,Ce,Wt){"use strict";var Cd=Object.defineProperty;var bd=(M,e,le)=>e in M?Cd(M,e,{enumerable:!0,configurable:!0,writable:!0,value:le}):M[e]=le;var X=(M,e,le)=>bd(M,typeof e!="symbol"?e+"":e,le);var et=typeof document<"u"?document.currentScript:null;const tt=window,Zt="halo-lang";class dl{constructor(l,o=!0){X(this,"langCode","");X(this,"ignoreCase",!1);this.ignoreCase=o,this.swtichLang(l)}loadScript(l){const o=document.createElement("script");return o.src=l,o.id=Zt,document.head.appendChild(o),o}unloadScript(){const l=document.getElementById(Zt);return l&&l.parentNode?(l.parentNode.removeChild(l),!0):!1}swtichLang(l){if(this.langCode!=l){this.langCode=l;const o=`/api/core/Languages/embed.js?code=${encodeURIComponent(l)}&caseType=lowercase`;this.unloadScript(),this.loadScript(o)}}t(l){var n;if(!l)return"";const o=(n=tt.lang)==null?void 0:n.words;return o&&o[this.ignoreCase?l.toLowerCase():l]||l}t2(l,o){var r;if(!l&&!o)return"";const n=(r=tt.lang)==null?void 0:r.words;if(n){if(l){const a=n[this.ignoreCase?l.toLowerCase():l];if(a)return a}if(o){const a=n[this.ignoreCase?o.toLowerCase():o];if(a)return a}}return l||o}info(){const l=tt.lang;if(l)return{code:l.code,name:l.name,displayName:l.displayName,nativeName:l.nativeName,revision:l.revision,rtl:l.rtl}}}const Qt=Symbol("halo-i18n");let ot=null;function Yt(t,l){return ot||(ot=new dl(t,l)),ot}function Jt(t,l,o=!0){const n=Yt(l,o);t.config.globalProperties.$t=r=>n.t(r),t.provide(Qt,n)}function Z(){const t=e.inject(Qt);if(!t)throw new Error("I18n not initialized. Ensure I18nPlugin is installed.");return{i18n:t,t:t.t.bind(t),switchLang:t.swtichLang.bind(t),lang:t.info}}const fl=()=>{let t=localStorage.getItem("Client-Device-Id");return t||(typeof crypto<"u"&&typeof crypto.randomUUID=="function"?t=crypto.randomUUID():t="c-"+Math.random().toString(36).substring(2)+Date.now().toString(36),localStorage.setItem("Client-Device-Id",t)),t};le.defaults.headers["Client-Device-Id"]=fl(),le.defaults.headers["Content-type"]="application/json",le.defaults.timeout=1e3*60,le.interceptors.request.use(t=>{const l=localStorage.getItem("sessionToken");return l&&t.headers&&(t.headers.Authorization=`Bearer ${l}`),t},t=>(console.log(t),Promise.reject(t))),le.interceptors.response.use(t=>t.status==200?t.data:Promise.reject(t.statusText),t=>{if(t&&t.response&&t.response.status){const l=ce.useRouter();switch(t.response.status){case 401:l==null||l.push({name:"Unauthorized"});break}}return Promise.reject(t)});const ul=["src"],pl=e.defineComponent({__name:"AppLogoBox",props:{src:{type:String,required:!0},height:{type:String,default:"40px"},defaultSrc:{type:String,default:new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjEgKGM2OGUyMmMzODcsIDIwMjEtMDUtMjMpIg0KICAgaW5rc2NhcGU6ZXhwb3J0LXlkcGk9IjUuNjExNzEyIg0KICAgaW5rc2NhcGU6ZXhwb3J0LXhkcGk9IjUuNjExNzEyIg0KICAgaW5rc2NhcGU6ZXhwb3J0LWZpbGVuYW1lPSJEOlxDb2Rlc1xKTUNfRnJhbWVfQW5kb25cQXJ0c1xsb2dvXzIwLnBuZyINCiAgIHNvZGlwb2RpOmRvY25hbWU9ImxvZ28uc3ZnIg0KICAgd2lkdGg9IjgwLjY5NzkxNG1tIg0KICAgaGVpZ2h0PSI3Ni45NDYyMTNtbSINCiAgIHZpZXdCb3g9IjAgMCA4MC42OTc5MTQgNzYuOTQ2MjEzIg0KICAgdmVyc2lvbj0iMS4xIg0KICAgaWQ9InN2ZzgiDQogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSINCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCINCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIg0KICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIj4NCiAgPHNvZGlwb2RpOm5hbWVkdmlldw0KICAgICBpbmtzY2FwZTpkb2N1bWVudC1yb3RhdGlvbj0iMCINCiAgICAgaW5rc2NhcGU6Y3VycmVudC1sYXllcj0iZzQ1NDMiDQogICAgIGlua3NjYXBlOndpbmRvdy1tYXhpbWl6ZWQ9IjEiDQogICAgIGlua3NjYXBlOndpbmRvdy15PSItOCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii04Ig0KICAgICBpbmtzY2FwZTpjeT0iMTQ0LjkyODYiDQogICAgIGlua3NjYXBlOmN4PSI2Ny4wODQ4NTMiDQogICAgIGlua3NjYXBlOnpvb209IjAuNzkwMDQ0MjIiDQogICAgIHNob3dncmlkPSJmYWxzZSINCiAgICAgaWQ9Im5hbWVkdmlldzg1MyINCiAgICAgaW5rc2NhcGU6d2luZG93LWhlaWdodD0iMTAxNyINCiAgICAgaW5rc2NhcGU6d2luZG93LXdpZHRoPSIxOTIwIg0KICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIg0KICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCINCiAgICAgZ3VpZGV0b2xlcmFuY2U9IjEwIg0KICAgICBncmlkdG9sZXJhbmNlPSIxMCINCiAgICAgb2JqZWN0dG9sZXJhbmNlPSIxMCINCiAgICAgYm9yZGVyb3BhY2l0eT0iMSINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgaW5rc2NhcGU6cGFnZWNoZWNrZXJib2FyZD0iMCINCiAgICAgaW5rc2NhcGU6ZG9jdW1lbnQtdW5pdHM9Im1tIiAvPg0KICA8ZGVmcw0KICAgICBpZD0iZGVmczIiPg0KICAgIDxjbGlwUGF0aA0KICAgICAgIGNsaXBQYXRoVW5pdHM9InVzZXJTcGFjZU9uVXNlIg0KICAgICAgIGlkPSJjbGlwUGF0aDQ1NjMiPg0KICAgICAgPHJlY3QNCiAgICAgICAgIHN0eWxlPSJvcGFjaXR5OjE7ZmlsbDojZmYyYTJhO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lO3N0cm9rZS13aWR0aDozLjQyNzE2NjQ2O3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiDQogICAgICAgICBpZD0icmVjdDQ1NjUiDQogICAgICAgICB3aWR0aD0iODAuNjk3OTE0Ig0KICAgICAgICAgaGVpZ2h0PSI3Ni45OTM3NTIiDQogICAgICAgICB4PSI4NC43NTgyMTciDQogICAgICAgICB5PSI2NS4xOTY2NDgiDQogICAgICAgICByeD0iMTAiDQogICAgICAgICByeT0iMTAiIC8+DQogICAgPC9jbGlwUGF0aD4NCiAgPC9kZWZzPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhNSI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgIDwvY2M6V29yaz4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlkPSJsYXllcjEiDQogICAgIHRyYW5zZm9ybT0idHJhbnNsYXRlKC04NC43NTgyMTcsLTY1LjI0NDE4MykiPg0KICAgIDxnDQogICAgICAgaWQ9Imc0NTQzIg0KICAgICAgIGNsaXAtcGF0aD0idXJsKCNjbGlwUGF0aDQ1NjMpIj4NCiAgICAgIDxwYXRoDQogICAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIg0KICAgICAgICAgaWQ9InBhdGg0NTMyIg0KICAgICAgICAgZD0ibSAxMjIuNjcxMDEsOTkuMDkwNTY2IDM0LjY3MTkyLC0zMy44NDYzODMgaCAyMy41NjQ0NSBsIC0zOC44NjA2OCwzNS44MTE3NjcgMjMuNDA5NDIsNDEuMTM0NDQgdiAwIEggMTQzLjU5NyBsIC0xNy4zMTE2MSwtMzEuMTYwODkgLTcuNDE0MDgsNi40NTc0MiINCiAgICAgICAgIHN0eWxlPSJmb250LXN0eWxlOml0YWxpYztmb250LXZhcmlhbnQ6bm9ybWFsO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1zdHJldGNoOm5vcm1hbDtmb250LXNpemU6MTA1LjgzM3B4O2xpbmUtaGVpZ2h0OjEuMjU7Zm9udC1mYW1pbHk6c2Fucy1zZXJpZjstaW5rc2NhcGUtZm9udC1zcGVjaWZpY2F0aW9uOidzYW5zLXNlcmlmIEJvbGQgSXRhbGljJztsZXR0ZXItc3BhY2luZzowcHg7d29yZC1zcGFjaW5nOjBweDtmaWxsOiM1ZTM1YjE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjAuMjY0NTgzIiAvPg0KICAgICAgPHBhdGgNCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiDQogICAgICAgICBkPSJtIDExOS45Mjk2NSwxMTYuODE3MjcgYyAtMi4xMDE1MSw5LjAyNjE1IC02LjA0NjEzLDE1LjcwOTYzIC0xMS44MzM5MSwyMC4wNTA0NSAtNS43ODc3Niw0LjM0MDgyIC0xMy43MTE0OCw2LjUxMTIzIC0yMy43NzExNTksNi41MTEyMyAtMy42ODYyNTIsMCAtNy4wMTA3NjksLTAuMTM3OCAtOS45NzM1NTEsLTAuNDEzNDEgLTIuOTYyNzgzLC0wLjI0MTE1IC01LjYxNTUwNiwtMC42MDI4OSAtNy45NTgxNzEsLTEuMDg1MiBsIDMuNjY5MDI3LC0xNS4yODY1MSBjIDQuNTY3NTc2LDAuNjUxMTcgOS4yMTYyNDksMS44ODY4NyAxMy4yODA4NDMsMS45MDIzMSA1LjI3MDk5NiwwIDkuMjE1NjMsLTEuMjU3NDYgMTEuODMzOTA1LC0zLjc3MjM4IDIuNjE4MjcsLTIuNTE0OTIgNC43NTQyMywtNy40MDY5NiA2LjQwNzg3NiwtMTQuNjc2MTEgbCA3LjA3OTY4LC0zMC42NDQxMjQgSCA5MS4wOTQxOTQgTCA5NC4zNDk4MDksNjUuMjQ0MTgzIEggMTMxLjg2NjkgWiINCiAgICAgICAgIHN0eWxlPSJmb250LXN0eWxlOml0YWxpYztmb250LXZhcmlhbnQ6bm9ybWFsO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1zdHJldGNoOm5vcm1hbDtmb250LXNpemU6MTA1LjgzM3B4O2xpbmUtaGVpZ2h0OjEuMjU7Zm9udC1mYW1pbHk6c2Fucy1zZXJpZjstaW5rc2NhcGUtZm9udC1zcGVjaWZpY2F0aW9uOidzYW5zLXNlcmlmIEJvbGQgSXRhbGljJztsZXR0ZXItc3BhY2luZzowcHg7d29yZC1zcGFjaW5nOjBweDtkaXNwbGF5OmlubGluZTtmaWxsOiMzMTFiOTI7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjAuMjY0NTgzIg0KICAgICAgICAgaWQ9InBhdGg0NDg5IiAvPg0KICAgIDwvZz4NCiAgPC9nPg0KPC9zdmc+DQo=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("halov.umd.cjs",document.baseURI).href).href}},setup(t){const l=t,o=e.ref(l.src);e.watch(()=>l.src,r=>{o.value=r});function n(){o.value=l.defaultSrc}return(r,a)=>(e.openBlock(),e.createElementBlock("img",{src:o.value,style:e.normalizeStyle({height:t.height,objectFit:"contain"}),onError:n,alt:"App Logo"},null,44,ul))}}),re=(t,l)=>{const o=t.__vccOpts||t;for(const[n,r]of l)o[n]=r;return o},Xt=re(pl,[["__scopeId","data-v-f7799232"]]);function ml(){try{const t=sessionStorage.getItem("tabs");return t?JSON.parse(t):null}catch{return null}}const nt=$e.defineStore("tabs",{state:()=>({tabs:ml(),selectedTab:sessionStorage.getItem("selectedTab")}),actions:{setTabs(t){this.tabs=t,t?(sessionStorage.setItem("tabs",JSON.stringify(t)),t.length||this.setSelectedTab(null)):(sessionStorage.removeItem("tabs"),this.setSelectedTab(null))},setSelectedTab(t){this.selectedTab=t,t?sessionStorage.setItem("selectedTab",t):sessionStorage.removeItem("selectedTab")},addTab(t){let l=this.tabs;l?l.find(o=>o.id==t.id)||l.push(t):l=[t],this.setTabs(l),this.setSelectedTab(t.id)},selectTab(t){this.setSelectedTab(t)},closeTab(t){const l=this.tabs;if(l){const o=l.findIndex(n=>n.id==t);o>-1&&(l.splice(o,1),this.setTabs(l))}},changeTabId(t,l){const o=this.tabs;if(o){const n=o.find(r=>r.id==t);n&&!o.find(r=>r.id==l)&&(n.id=l,this.setTabs(o))}},clearTabs(){this.setTabs([]),this.setSelectedTab(null)}}});var hl=typeof global=="object"&&global&&global.Object===Object&&global,gl=typeof self=="object"&&self&&self.Object===Object&&self,yl=hl||gl||Function("return this")(),be=yl.Symbol,qt=Object.prototype,wl=qt.hasOwnProperty,Cl=qt.toString,Ae=be?be.toStringTag:void 0;function bl(t){var l=wl.call(t,Ae),o=t[Ae];try{t[Ae]=void 0;var n=!0}catch{}var r=Cl.call(t);return n&&(l?t[Ae]=o:delete t[Ae]),r}var kl=Object.prototype,Nl=kl.toString;function xl(t){return Nl.call(t)}var Il="[object Null]",Sl="[object Undefined]",Ut=be?be.toStringTag:void 0;function Bl(t){return t==null?t===void 0?Sl:Il:Ut&&Ut in Object(t)?bl(t):xl(t)}function Vl(t){return t!=null&&typeof t=="object"}var Ml="[object Symbol]";function Tl(t){return typeof t=="symbol"||Vl(t)&&Bl(t)==Ml}function Al(t,l){for(var o=-1,n=t==null?0:t.length,r=Array(n);++o<n;)r[o]=l(t[o],o,t);return r}var El=Array.isArray,vt=be?be.prototype:void 0,eo=vt?vt.toString:void 0;function to(t){if(typeof t=="string")return t;if(El(t))return Al(t,to)+"";if(Tl(t))return eo?eo.call(t):"";var l=t+"";return l=="0"&&1/t==-1/0?"-0":l}function lt(t){return t==null?"":to(t)}function _l(t,l,o){var n=-1,r=t.length;l<0&&(l=-l>r?0:r+l),o=o>r?r:o,o<0&&(o+=r),r=l>o?0:o-l>>>0,l>>>=0;for(var a=Array(r);++n<r;)a[n]=t[n+l];return a}function zl(t,l,o){var n=t.length;return o=o===void 0?n:o,!l&&o>=n?t:_l(t,l,o)}var Ll="\\ud800-\\udfff",Dl="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",Ol="\\u20d0-\\u20ff",Rl=Dl+$l+Ol,jl="\\ufe0e\\ufe0f",Pl="\\u200d",Fl=RegExp("["+Pl+Ll+Rl+jl+"]");function oo(t){return Fl.test(t)}function Hl(t){return t.split("")}var no="\\ud800-\\udfff",Gl="\\u0300-\\u036f",Kl="\\ufe20-\\ufe2f",Wl="\\u20d0-\\u20ff",Zl=Gl+Kl+Wl,Ql="\\ufe0e\\ufe0f",Yl="["+no+"]",rt="["+Zl+"]",at="\\ud83c[\\udffb-\\udfff]",Jl="(?:"+rt+"|"+at+")",lo="[^"+no+"]",ro="(?:\\ud83c[\\udde6-\\uddff]){2}",ao="[\\ud800-\\udbff][\\udc00-\\udfff]",Xl="\\u200d",so=Jl+"?",io="["+Ql+"]?",ql="(?:"+Xl+"(?:"+[lo,ro,ao].join("|")+")"+io+so+")*",Ul=io+so+ql,vl="(?:"+[lo+rt+"?",rt,ro,ao,Yl].join("|")+")",er=RegExp(at+"(?="+at+")|"+vl+Ul,"g");function tr(t){return t.match(er)||[]}function or(t){return oo(t)?tr(t):Hl(t)}function nr(t){return function(l){l=lt(l);var o=oo(l)?or(l):void 0,n=o?o[0]:l.charAt(0),r=o?zl(o,1).join(""):l.slice(1);return n[t]()+r}}var lr=nr("toUpperCase");function rr(t,l,o,n){for(var r=-1,a=t==null?0:t.length;++r<a;)o=l(o,t[r],r,t);return o}function ar(t){return function(l){return t==null?void 0:t[l]}}var sr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ir=ar(sr),cr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dr="\\u0300-\\u036f",fr="\\ufe20-\\ufe2f",ur="\\u20d0-\\u20ff",pr=dr+fr+ur,mr="["+pr+"]",hr=RegExp(mr,"g");function gr(t){return t=lt(t),t&&t.replace(cr,ir).replace(hr,"")}var yr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wr(t){return t.match(yr)||[]}var Cr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function br(t){return Cr.test(t)}var co="\\ud800-\\udfff",kr="\\u0300-\\u036f",Nr="\\ufe20-\\ufe2f",xr="\\u20d0-\\u20ff",Ir=kr+Nr+xr,fo="\\u2700-\\u27bf",uo="a-z\\xdf-\\xf6\\xf8-\\xff",Sr="\\xac\\xb1\\xd7\\xf7",Br="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Vr="\\u2000-\\u206f",Mr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",po="A-Z\\xc0-\\xd6\\xd8-\\xde",Tr="\\ufe0e\\ufe0f",mo=Sr+Br+Vr+Mr,ho="['’]",go="["+mo+"]",Ar="["+Ir+"]",yo="\\d+",Er="["+fo+"]",wo="["+uo+"]",Co="[^"+co+mo+yo+fo+uo+po+"]",_r="\\ud83c[\\udffb-\\udfff]",zr="(?:"+Ar+"|"+_r+")",Lr="[^"+co+"]",bo="(?:\\ud83c[\\udde6-\\uddff]){2}",ko="[\\ud800-\\udbff][\\udc00-\\udfff]",ke="["+po+"]",Dr="\\u200d",No="(?:"+wo+"|"+Co+")",$r="(?:"+ke+"|"+Co+")",xo="(?:"+ho+"(?:d|ll|m|re|s|t|ve))?",Io="(?:"+ho+"(?:D|LL|M|RE|S|T|VE))?",So=zr+"?",Bo="["+Tr+"]?",Or="(?:"+Dr+"(?:"+[Lr,bo,ko].join("|")+")"+Bo+So+")*",Rr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pr=Bo+So+Or,Fr="(?:"+[Er,bo,ko].join("|")+")"+Pr,Hr=RegExp([ke+"?"+wo+"+"+xo+"(?="+[go,ke,"$"].join("|")+")",$r+"+"+Io+"(?="+[go,ke+No,"$"].join("|")+")",ke+"?"+No+"+"+xo,ke+"+"+Io,jr,Rr,yo,Fr].join("|"),"g");function Gr(t){return t.match(Hr)||[]}function Kr(t,l,o){return t=lt(t),l=l,l===void 0?br(t)?Gr(t):wr(t):t.match(l)||[]}var Wr="['’]",Zr=RegExp(Wr,"g");function Qr(t){return function(l){return rr(Kr(gr(l).replace(Zr,"")),t,"")}}var Yr=Qr(function(t,l,o){return t+(o?" ":"")+lr(l)});const Ee="YYYY/MM/DD HH:mm:ss",ge="YYYY/MM/DD",_e="HH:mm:ss";function te(t){return t.length?Yr(t):t}function de(t){if(t!=null){if(typeof t=="boolean"||t instanceof Boolean)return t;if(typeof t=="number"||typeof t=="bigint")return t>0;if(typeof t=="string"||typeof t=="object")switch(t==null?void 0:t.toString().toLowerCase().trim()){case"true":case"yes":case"1":case"y":return!0;case"false":case"no":case"0":case"n":return!1}else if(typeof t=="function"){const l=t.call(null);if(l)return de(l)}}}function Oe(t,l){const o=de(t);return o===void 0?l||!1:o}function Vo(t,l){if(t!=null){if(t instanceof Date)return t;if(typeof t=="number")return new Date(t);if(typeof t=="string")return se(t,l||Ee).toDate()}}function Mo(t){return typeof t=="object"&&t!==null&&"hour"in t&&"minute"in t}function Jr(t){const l=t%1e3;t/=1e3;const o=t%60;t/=60;const n=t%60;return t/=60,{hour:t%24,minute:n,second:o,millisecond:l}}function To(t){const l=t%60;t/=60;const o=t%60;return t/=60,{hour:t%24,minute:o,second:l,millisecond:0}}function Ao(t,l){const o=se(t,l||_e);if(o)return{hour:o.hour(),minute:o.minute(),second:o.second(),millisecond:o.millisecond()}}function Eo(t,l){var o,n;if(t){if(typeof t=="string")return(n=(o=se(t,l||Ee))==null?void 0:o.toDate())==null?void 0:n.getTime();if(typeof t=="number")return t;if(t instanceof Date)return t.getTime()}}function _o(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||_e);if(t instanceof Date)return se(t).format(l||_e);if(Mo(t))return se(new Date(2e3,1,1,t.hour,t.minute,t.second)).format(l||_e);if(typeof t=="object")return t==null?void 0:t.toString()}}function zo(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||ge);if(t instanceof Date)return se(t).format(l||ge);if(typeof t=="object")return t==null?void 0:t.toString()}}function st(t,l){if(t!=null){if(typeof t=="string")return t;if(typeof t=="number")return se(new Date(t)).format(l||Ee);if(t instanceof Date)return se(t).format(l||Ee);if(typeof t=="object")return t==null?void 0:t.toString()}}function Lo(t){if(t){const l=t.lastIndexOf(":");if(l>-1&&l<t.length-1)return t.substring(0,l+1)+Math.round(Number(t.substring(l+1,t.length)))}return t}function Do(t){const l={},o=t.split("&").map(n=>n.trim()).filter(n=>n);for(const n of o){let r,a;const s=n.indexOf("=");if(s>-1?(r=n.substring(0,s),a=n.substring(s+1)):r=n,r in l){if(a){const c=l[r];Array.isArray(c)?c.push(a):c?l[r]=[c,a]:l[r]=a}}else l[r]=a}return l}function Xr(t,l){let o=t;if(l){const n=[];for(const r in l){const a=l[r];if(Array.isArray(a))for(const s of a)n.push(`${r}=${encodeURIComponent(s)}`);else a?n.push(`${r}=${encodeURIComponent(a)}`):n.push(r)}n.length&&(o+="?"+n.join("&"))}return o}function U(t,l,o=!0){if(!l||Object.keys(l).length==0)return t;let n=t,r={};const a=t.indexOf("?");a>-1&&(n=t.substring(0,a),r=Do(t.substring(a+1)));let s={};const c=Array.isArray(l)?l:[l];for(let m of c)if(m)if(typeof m=="string")s=Do(m);else for(const i in m){const u=m[i];Array.isArray(u)?s[i]=u.map(g=>g==null?void 0:g.toString()):u!=null?s[i]=u.toString():s[i]=void 0}else continue;if(Object.keys(s).length==0)return t;if(r.length)for(const m in s)if(m in r&&!o){const i=r[m],u=s[m];Array.isArray(i)?Array.isArray(u)?i.push(...u):i.push(u):i?Array.isArray(u)?r[m]=[i,...u]:r[m]=[i,u]:r[m]=s[m]}else r[m]=s[m];else for(const m in s)r[m]=s[m];return Xr(n,r)}function Re(t,l,o){if(t==null)return t;switch(l){case"number":return Number(t);case"boolean":case"bool":return de(t);case"date":case"datetime":return st(t);default:return o&&typeof t=="string"&&(o.includes("code-u")?t=t.toUpperCase():o.includes("code-l")&&(t=t.toLowerCase())),t}}function $o(t){switch(t){case"number":return 0;case"boolean":case"bool":return!1;case"date":case"datetime":return new Date}}function qr(){return new Date().getTime().toString()}function Ur(t,l){const o={};if(t)if(l)for(const n of l)typeof n=="string"?o[te(n)]=t[n]:o[te(n.name)]=t[n.name];else for(const n in t)o[te(n)]=t[n];return o}function vr(t,l){return se(t,ge).add(l,"days").format(ge)}function ea(t,l){if(!t||!l){const o=new Date;t||(t=o.getFullYear()),l||(l=o.getMonth())}return new Date(t,l,1)}function ta(t,l){if(!t||!l){const o=new Date;t||(t=o.getFullYear()),l||(l=o.getMonth())}return new Date(t,l+1,0)}function oa(t,l=!0,o=!0){var r,a;let n=(a=(r=t==null?void 0:t.split(/\s*,\s*|\r?\n+/))==null?void 0:r.map(s=>s.trim()))==null?void 0:a.filter(s=>!l||s.length>0);return n&&o&&(n=n.filter((s,c,m)=>s&&m.indexOf(s)==c)),n}function na(t,l=!0,o=!0){var r,a;let n=(a=(r=t==null?void 0:t.split(/\r?\n/))==null?void 0:r.map(s=>s.trim()))==null?void 0:a.filter(s=>!l||s.length>0);return n&&o&&(n=n.filter((s,c,m)=>s&&m.indexOf(s)==c)),n}function la(t){const l=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return!!t.toLowerCase().match(l)}function Oo(t,l=!1){switch(typeof t){case"number":return l?Math.max(0,Math.max(100,t*100)):t*100;case"string":const o=t.indexOf("%");if(o>-1){t=t.substring(0,o-1);const n=Number(t);if(!Number.isNaN(n))return l?Math.max(0,Math.max(100,n)):n}else{const n=Number(t);if(!Number.isNaN(n))return l?Math.max(0,Math.max(100,n*100)):n*100}}}function Ro(t){return t==null?!0:/^\s*$/.test(t)}function ra(t,l){return Ro(t)?l:t}const Ne=$e.defineStore("common",{state:()=>({themeName:localStorage.getItem("theme"),menuCollapsed:Oe(localStorage.getItem("menu-collapsed")),isFullscreen:!1,sharedData:{}}),getters:{isDarkTheme:t=>t.themeName=="darkTheme"},actions:{toggleTheme(){this.themeName=="darkTheme"?this.setThemeName(null):this.setThemeName("darkTheme")},setThemeName(t){this.themeName=t,t?localStorage.setItem("theme",t):localStorage.removeItem("theme")},setMenuCollapsed(t){this.menuCollapsed=t,localStorage.setItem("menu-collapsed",t.toString())},setIsFullscreen(t){this.isFullscreen=t},async fetchSharedData(t,l){let o=this.sharedData[t];if(o||(o={key:t,isLoading:!1,data:void 0,error:void 0,promise:void 0},this.sharedData[t]=o),o.data!==void 0)return o.data;if(o.isLoading&&o.promise)return o.promise;try{o.isLoading=!0,o.promise=l();const n=await o.promise;return o.data=n,o.isLoading=!1,o.promise=void 0,n}catch(n){throw o.isLoading=!1,o.error=n,o.promise=void 0,n}}}}),aa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},sa=e.defineComponent({name:"ArrowDropDownOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",aa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M7 10l5 5l5-5H7z",fill:"currentColor"},null,-1)]))}}),ia={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ca=e.defineComponent({name:"CheckFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ia,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z",fill:"currentColor"},null,-1)]))}}),da={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jo=e.defineComponent({name:"ClearFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",da,o[0]||(o[0]=[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z",fill:"currentColor"},null,-1)]))}}),fa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ua=e.defineComponent({name:"CloseOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",fa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"},null,-1)]))}}),pa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ma=e.defineComponent({name:"ColorizeFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",pa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M20.71 5.63l-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12l-1.93-1.91l-1.41 1.41l1.42 1.42L3 16.25V21h4.75l8.92-8.92l1.42 1.42l1.41-1.41l-1.92-1.92l3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06l1.92 1.92L6.92 19z",fill:"currentColor"},null,-1)]))}}),ha={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ga=e.defineComponent({name:"DarkModeOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ha,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1)]))}}),ya={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Po=e.defineComponent({name:"EditFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ya,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83l3.75 3.75l1.83-1.83z",fill:"currentColor"},null,-1)]))}}),wa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ca=e.defineComponent({name:"ExpandLessFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",wa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12 8l-6 6l1.41 1.41L12 10.83l4.59 4.58L18 14z",fill:"currentColor"},null,-1)]))}}),ba={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ka=e.defineComponent({name:"ExpandMoreFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ba,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10l6 6l6-6z",fill:"currentColor"},null,-1)]))}}),Na={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fo=e.defineComponent({name:"FolderTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Na,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M11.17 8l-.58-.59L9.17 6H4v12h16V8h-8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l1.41 1.41l.59.59H20v10z",fill:"currentColor"},null,-1)]))}}),xa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ia=e.defineComponent({name:"FullscreenExitFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",xa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z",fill:"currentColor"},null,-1)]))}}),Sa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ba=e.defineComponent({name:"FullscreenFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Sa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z",fill:"currentColor"},null,-1)]))}}),Va={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ma=e.defineComponent({name:"ImportExportFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Va,o[0]||(o[0]=[e.createElementVNode("path",{d:"M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z",fill:"currentColor"},null,-1)]))}}),Ta={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Aa=e.defineComponent({name:"LogOutFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ta,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 2h9a2 2 0 0 1 2 2v2h-2V4H6v16h9v-2h2v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16.09 15.59L17.5 17l5-5l-5-5l-1.41 1.41L18.67 11H9v2h9.67z",fill:"currentColor"},null,-1)]))}}),Ea={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_a=e.defineComponent({name:"ManageAccountsOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ea,o[0]||(o[0]=[e.createElementVNode("path",{d:"M4 18v-.65c0-.34.16-.66.41-.81C6.1 15.53 8.03 15 10 15c.03 0 .05 0 .08.01c.1-.7.3-1.37.59-1.98c-.22-.02-.44-.03-.67-.03c-2.42 0-4.68.67-6.61 1.82c-.88.52-1.39 1.5-1.39 2.53V20h9.26c-.42-.6-.75-1.28-.97-2H4zm6-6c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2s-2-.9-2-2s.9-2 2-2zm10.75 10c0-.22-.03-.42-.06-.63l1.14-1.01l-1-1.73l-1.45.49c-.32-.27-.68-.48-1.08-.63L18 11h-2l-.3 1.49c-.4.15-.76.36-1.08.63l-1.45-.49l-1 1.73l1.14 1.01c-.03.21-.06.41-.06.63s.03.42.06.63l-1.14 1.01l1 1.73l1.45-.49c.32.27.68.48 1.08.63L16 21h2l.3-1.49c.4-.15.76-.36 1.08-.63l1.45.49l1-1.73l-1.14-1.01c.03-.21.06-.41.06-.63zM17 18c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"},null,-1)]))}}),za={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},it=e.defineComponent({name:"MenuFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",za,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z",fill:"currentColor"},null,-1)]))}}),La={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Da=e.defineComponent({name:"MenuOpenFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",La,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12L21 8.41L19.59 7l-5 5l5 5L21 15.59z",fill:"currentColor"},null,-1)]))}}),$a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Oa=e.defineComponent({name:"MoreHorizFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",$a,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1)]))}}),Ra={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ja=e.defineComponent({name:"NotificationsNoneTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ra,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M12 6.5c-2.49 0-4 2.02-4 4.5v6h8v-6c0-2.48-1.51-4.5-4-4.5z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 16v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6zm-4 5c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2z",fill:"currentColor"},null,-1)]))}}),Pa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Fa=e.defineComponent({name:"PasswordFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Pa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M2 17h20v2H2v-2zm1.15-4.05L4 11.47l.85 1.48l1.3-.75l-.85-1.48H7v-1.5H5.3l.85-1.47L4.85 7L4 8.47L3.15 7l-1.3.75l.85 1.47H1v1.5h1.7l-.85 1.48l1.3.75zm6.7-.75l1.3.75l.85-1.48l.85 1.48l1.3-.75l-.85-1.48H15v-1.5h-1.7l.85-1.47l-1.3-.75L12 8.47L11.15 7l-1.3.75l.85 1.47H9v1.5h1.7l-.85 1.48zM23 9.22h-1.7l.85-1.47l-1.3-.75L20 8.47L19.15 7l-1.3.75l.85 1.47H17v1.5h1.7l-.85 1.48l1.3.75l.85-1.48l.85 1.48l1.3-.75l-.85-1.48H23v-1.5z",fill:"currentColor"},null,-1)]))}}),Ha={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ga=e.defineComponent({name:"PlaylistAddCheckTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ha,o[0]||(o[0]=[e.createElementVNode("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07l-4.25 4.24l-2.12-2.12l-1.41 1.41L16.34 19L22 13.34z",fill:"currentColor"},null,-1)]))}}),Ka={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Wa=e.defineComponent({name:"PlaylistAddFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ka,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 10H3v2h11v-2zm0-4H3v2h11V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM3 16h7v-2H3v2z",fill:"currentColor"},null,-1)]))}}),Za={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Qa=e.defineComponent({name:"PrintTwotone",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Za,o[0]||(o[0]=[e.createElementVNode("path",{opacity:".3",d:"M8 5h8v3H8z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"18",cy:"11.5",r:"1",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 14H8v-4h8v4zm4-4h-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{opacity:".3",d:"M6 13h12v2h2v-4c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4h2v-2zm12-2.5c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z",fill:"currentColor"},null,-1)]))}}),Ya={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ja=e.defineComponent({name:"ReadMoreFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ya,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 7h9v2h-9zm0 8h9v2h-9zm3-4h6v2h-6zm-3 1L8 7v4H2v2h6v4z",fill:"currentColor"},null,-1)]))}}),Xa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},je=e.defineComponent({name:"RefreshFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Xa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"currentColor"},null,-1)]))}}),qa={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pe=e.defineComponent({name:"SearchFilled",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",qa,o[0]||(o[0]=[e.createElementVNode("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z",fill:"currentColor"},null,-1)]))}}),Ua={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},va=e.defineComponent({name:"UnarchiveOutlined",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ua,o[0]||(o[0]=[e.createElementVNode("path",{d:"M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM6.24 5h11.52l.83 1H5.42l.82-1zM5 19V8h14v11H5zm3-5h2.55v3h2.9v-3H16l-4-4z",fill:"currentColor"},null,-1)]))}}),Ho={rootMenuName:"MainMenu",menuPosition:"side"},ct=Symbol("HalovConfig");function dt(){return e.inject(ct)}const es=["src"],xe=e.defineComponent({__name:"MenuIcon",props:{path:{},size:{default:16}},setup(t){const l=t,o=e.ref(n(l.path));function n(r){if(r)return`/api/core/SystemIcons/Icons?path=${encodeURIComponent(r)}`}return e.watch(()=>l.path,r=>o.value=n(r)),(r,a)=>o.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"menu-icon",src:o.value,style:e.normalizeStyle({width:r.size+"px",height:r.size+"px"})},null,12,es)):e.createCommentVNode("",!0)}}),Go=re(e.defineComponent({__name:"AppTabs",props:{tabs:{default:()=>[]},currentTab:{}},emits:["update:currentTab","closeTab","closeAll","closeOthers"],setup(t,{emit:l}){var x;const o=t,n=l,{t:r}=Z(),a=nt(),s=Ne(),c=e.computed(()=>s.menuCollapsed),m=((x=dt())==null?void 0:x.menuPosition)??"side",i=()=>s.setMenuCollapsed(!s.menuCollapsed),u=e.ref(o.currentTab),g=e.computed(()=>[{label:r("Close"),key:"close-current"},{label:r("Close All"),key:"close-all"},{label:r("Close Others"),key:"close-others"},{type:"divider",key:"------------1"},...o.tabs.map(I=>({label:r(I.title),key:I.id,url:I.url}))]);function d(I){o.tabs.find(T=>T.id==I)&&a.closeTab(I),n("closeTab",I)}function h(I){if(I.key=="close-current"||I.key=="close-all"||I.key=="close-others")return e.h(f.NIcon,null,{default:()=>e.h(ua)});if(I.key&&I.key==u.value)return e.h(f.NIcon,null,{default:()=>e.h(ca)})}function b(I){if(typeof I=="string"&&I)switch(I){case"close-current":n("closeTab",u.value);break;case"close-all":n("closeAll");break;case"close-others":n("closeOthers",u.value);break;default:u.value=I;break}}return e.watch(()=>o.currentTab,I=>{u.value=I}),e.watch(u,I=>{I!=o.currentTab&&n("update:currentTab",I)}),(I,F)=>I.tabs.length?(e.openBlock(),e.createBlock(e.unref(f.NTabs),{key:0,type:"card",closable:"",onClose:d,"tab-style":"min-width: 80px;",value:u.value,"onUpdate:value":F[0]||(F[0]=T=>u.value=T)},{prefix:e.withCtx(()=>[e.renderSlot(I.$slots,"prefix",{},()=>[e.unref(m)=="side"?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,text:"",style:{"margin-left":"8px"},onClick:i,title:c.value?e.unref(r)("Expand Menu"):e.unref(r)("Collapse Menu")},{icon:e.withCtx(()=>[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Da),{key:0})),c.value?(e.openBlock(),e.createBlock(e.unref(it),{key:1})):e.createCommentVNode("",!0)]),_:1},8,["title"])):e.createCommentVNode("",!0)],!0)]),suffix:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{text:"",style:{"font-size":"24px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NDropdown),{trigger:"click",options:g.value,placement:"bottom-end",onSelect:b,"render-icon":h},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(sa))]),_:1})]),_:1},8,["options"])]),_:1})]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.tabs,T=>(e.openBlock(),e.createBlock(e.unref(f.NTab),{key:T.id,name:T.id,title:T.id,closable:T.closable,class:"app-tab-item",style:e.normalizeStyle({"border-top-color":T.color})},{default:e.withCtx(()=>[T.icon?(e.openBlock(),e.createBlock(xe,{key:0,path:T.icon,style:{"margin-right":"4px"}},null,8,["path"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(r)(T.title)),1)]),_:2},1032,["name","title","closable","style"]))),128))]),_:3},8,["value"])):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-df170cc3"]]),ts=e.defineComponent({props:{direction:{type:String,default:"Right"},step:{type:Number,default:1},intervalFrames:{type:Number,default:1}},setup(t){const l=e.ref(void 0);let o=0;function n(){const s=l.value;if(s){const c=t.step||1;switch(t.direction){case"Left":s.scrollWidth>s.clientWidth&&(s.scrollLeft+s.clientWidth>s.scrollWidth-3?s.scrollLeft=0:s.scrollLeft+=c);break;case"Bottom":s.scrollHeight>s.clientHeight&&(s.scrollTop<3?s.scrollTop=s.scrollHeight:s.scrollTop-=c);break;case"Top":s.scrollHeight>s.clientHeight&&(s.scrollTop+s.clientHeight>s.scrollHeight-3?s.scrollTop=0:s.scrollTop+=c);break;case"Right":default:s.scrollWidth>s.clientWidth&&(s.scrollLeft<3?s.scrollLeft=s.scrollWidth:s.scrollLeft-=c);break}}}function r(){o++,o>1e8&&(o=0);let s=t.intervalFrames||1;s<=0&&(s=1),o%s==0&&n(),l.value&&requestAnimationFrame(r)}function a(){const s=l.value;if(s){switch(t.direction){case"Left":s.scrollLeft=0;break;case"Bottom":s.scrollTop=s.scrollHeight;break;case"Top":s.scrollTop=0;break;case"Right":default:s.scrollLeft=s.scrollWidth;break}s.addEventListener("resize",()=>{console.log("resize me.")})}}return e.onMounted(()=>{a(),requestAnimationFrame(r)}),e.watch(()=>t.direction,()=>a()),{areaRef:l}}}),os={ref:"areaRef",style:{overflow:"hidden"}};function ns(t,l,o,n,r,a){return e.openBlock(),e.createElementBlock("div",os,[e.renderSlot(t.$slots,"default")],512)}const Ko=re(ts,[["render",ns]]);function Wo(t,l){let o=`/api/core/Barcode/${l.render=="svg"?"Svg":"Image"}?code=${encodeURIComponent(t)}&format=${l.format||"QR_CODE"}`;return l.width&&(o+=`&width=${l.width}`),l.height&&(o+=`&height=${l.height}`),l.showText&&(o+=`&showText=${l.showText}`),l.base64&&(o+=`&base64=${l.base64}`),l.backColor&&(o+=`&backColor=${encodeURIComponent(l.backColor)}`),l.foreColor&&(o+=`&foreColor=${encodeURIComponent(l.foreColor)}`),l.fontSize&&(o+=`&fontSize=${l.fontSize}`),l.margin&&(o+=`&margin=${encodeURIComponent(l.margin)}`),l.gs1Format&&(o+=`&gs1Format=${l.gs1Format}`),o}const Zo=e.defineComponent({__name:"BarcodeImage",props:{code:{},render:{},format:{},width:{},height:{},showText:{type:Boolean},base64:{type:Boolean},backColor:{},foreColor:{},fontSize:{},margin:{},gs1Format:{type:Boolean}},setup(t){const l=t,o=e.ref(void 0),n=()=>{o.value=Wo(l.code||"",{render:l.render,format:l.format,width:l.width,height:l.height,showText:l.showText,base64:l.base64,backColor:l.backColor,foreColor:l.foreColor,fontSize:l.fontSize,margin:l.margin,gs1Format:l.gs1Format})};return e.watch([l.render,l.code,l.format,l.width,l.height,l.showText,l.base64,l.backColor,l.foreColor,l.fontSize,l.margin,l.gs1Format],()=>n()),e.onMounted(()=>n()),(r,a)=>(e.openBlock(),e.createBlock(e.unref(f.NImage),{src:o.value,width:r.width,height:r.height},null,8,["src","width","height"]))}});function Qo(t){for(const l of t)l.guid&&(l.guid=l.guid.toLowerCase()),l.items&&Qo(l.items)}function ls(){try{const t=localStorage.getItem("userInfo");return t?JSON.parse(t):null}catch{return null}}const Ie=$e.defineStore("account",{state:()=>({userInfo:ls(),lastUserName:localStorage.getItem("lastUserName"),sessionToken:localStorage.getItem("sessionToken"),isLoadingMenu:!1,menus:null,messages:JSON.parse(localStorage.getItem("_msgs")??"[]")}),actions:{setSession(t){this.sessionToken=t,t?localStorage.setItem("sessionToken",t):localStorage.removeItem("sessionToken")},setLastUserName(t){this.lastUserName=t,t?localStorage.setItem("lastUserName",t):localStorage.removeItem("lastUserName")},setUser(t){this.userInfo=t,t?localStorage.setItem("userInfo",JSON.stringify(t)):localStorage.removeItem("userInfo")},setAvatar(t){this.userInfo&&(this.userInfo.avatar=t,localStorage.setItem("userInfo",JSON.stringify(this.userInfo)))},clearUser(){this.userInfo=null,localStorage.removeItem("userInfo"),localStorage.removeItem("_msgs")},setMenus(t){this.menus=t},setIsLoadingMenu(t){this.isLoadingMenu=t},logout(){localStorage.removeItem("userInfo"),localStorage.removeItem("sessionToken"),this.clearUser(),this.setMenus(null),localStorage.removeItem("_msgs")},async loadMenus(t){var l;this.setIsLoadingMenu(!0);try{t||(t=((l=dt())==null?void 0:l.rootMenuName)??"MainMenu");const o=await le.get(`/api/core/account/menus?rootName=${encodeURIComponent(t)}`);if(o.isSuccess){const n=o.value||[];Qo(n),this.setMenus(n)}else console.log(o.errorMessage||"get remote menus error.")}catch(o){console.log(o)}finally{this.setIsLoadingMenu(!1)}},addMessage(t){this.messages.push(t),localStorage.setItem("_msgs",JSON.stringify(this.messages))}}}),rs={key:0,style:{"padding-left":"1rem"}},ft=e.defineComponent({__name:"ChangePassword",props:{show:{type:Boolean}},emits:["close"],setup(t,{emit:l}){const o=l,{t:n}=Z(),r=f.useMessage(),a=e.inject("axios"),s=Ie(),c=e.ref({oldPassword:"",newPassword:"",confirmPassword:""}),m=e.ref(!1),i=e.ref(null),u=e.computed(()=>{var I;return(I=s.userInfo)==null?void 0:I.userName}),g=e.ref([]),d={oldPassword:[{required:!0,message:n("Required here.")}],newPassword:[{required:!0,message:n("Required here.")}],confirmPassword:[{required:!0,message:n("Required here.")}]};function h(){var I;u.value&&!m.value&&i.value&&((I=i.value)==null||I.validate(F=>{if(!F)if(c.value.confirmPassword!=c.value.newPassword){r.error(n("Confirm the password is inconsistent, please check and re-enter."));return}else if(c.value.newPassword==c.value.oldPassword){r.error(n("The new password must not be the same as the old password!"));return}else b(u.value,c.value.oldPassword,c.value.newPassword)}))}async function b(I,F,T){try{const k={userName:I,oldPassword:F,newPassword:T},N=await a.post("/api/core/account/changePassword",k);N.isSuccess?(r.success(n("Password has been successfully modified!")),o("close")):r.error(n(N.errorMessage||"Error"))}catch(k){r.error((k==null?void 0:k.toString())||n("Error"))}}async function x(){try{const I=await a.get("/api/core/system/passwordOptions");I.isSuccess&&I.value!=null?g.value=I.value:r.error(n(I.errorMessage||"Error"))}catch(I){console.error(I),r.error((I==null?void 0:I.toString())||n("Error"))}}return e.onMounted(()=>{x()}),(I,F)=>{const T=e.resolveComponent("n-input"),k=e.resolveComponent("n-form-item"),N=e.resolveComponent("n-spin"),V=e.resolveComponent("n-text"),E=e.resolveComponent("n-button"),R=e.resolveComponent("n-modal");return e.openBlock(),e.createBlock(R,{show:I.show,onClose:F[3]||(F[3]=()=>I.$emit("close")),class:"custom-card",title:e.unref(n)("Change Password"),style:{width:"300px"},preset:"card",size:"medium"},{footer:e.withCtx(()=>[g.value.length?(e.openBlock(),e.createElementBlock("ul",rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,j=>(e.openBlock(),e.createElementBlock("li",{key:j},[e.createVNode(V,{depth:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(j),1)]),_:2},1024)]))),128))])):e.createCommentVNode("",!0)]),action:e.withCtx(()=>[e.createVNode(E,{type:"primary",block:"",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("OK")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NForm),{model:c.value,ref_key:"formRef",ref:i,rules:d},{default:e.withCtx(()=>[e.createVNode(N,{show:m.value},{default:e.withCtx(()=>[e.createVNode(k,{label:e.unref(n)("User Name")},{default:e.withCtx(()=>[e.createVNode(T,{value:u.value,readonly:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"oldPassword",label:e.unref(n)("Old Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.oldPassword,"onUpdate:value":F[0]||(F[0]=j=>c.value.oldPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"newPassword",label:e.unref(n)("New Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.newPassword,"onUpdate:value":F[1]||(F[1]=j=>c.value.newPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"]),e.createVNode(k,{path:"confirmPassword",label:e.unref(n)("Confirm New Password")},{default:e.withCtx(()=>[e.createVNode(T,{value:c.value.confirmPassword,"onUpdate:value":F[2]||(F[2]=j=>c.value.confirmPassword=j),type:"password",placeholder:""},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["show"])]),_:1},8,["model"])]),_:1},8,["show","title"])}}}),ut=e.defineComponent({__name:"ColorInput",props:{value:{},label:{},readonly:{type:Boolean},placeholder:{},clearable:{type:Boolean}},emits:["update:value"],setup(t){return(l,o)=>(e.openBlock(),e.createBlock(e.unref(f.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInput),{readonly:l.readonly,value:l.value,placeholder:l.placeholder,clearable:l.clearable,"onUpdate:value":o[0]||(o[0]=n=>l.$emit("update:value",n))},null,8,["readonly","value","placeholder","clearable"]),e.createVNode(e.unref(f.NColorPicker),{value:l.value,"show-preview":"",modes:["hex"],placeholder:"",disabled:l.readonly,style:{"max-width":"80px"},"onUpdate:value":o[1]||(o[1]=n=>l.$emit("update:value",n))},{label:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ma))]),_:1})]),_:1},8,["value","disabled"])]),_:1}))}});function Yo(t){return typeof t=="object"&&t!==null&&"source"in t}function Se(t){return typeof t=="object"&&t!==null&&"name"in t}function as(t){for(const l in t)delete t[l]}function Jo(t){const l={};for(const o of t){const n=o.name,r=l[n];if(o.nullable==!1)switch(o.dataType){case"number":l[n]=Number(r)||0;break;case"boolean":case"bool":l[n]=de(r)||!1;break;default:const a=$o(o.dataType);a!=null&&(l[n]=a)}}return l}function Xo(t,l,o){for(const n of l){const r=n.name,a=t[r];switch(n.dataType){case"number":n.nullable==!1?o[r]=Number(a)||0:o[r]=Number(a)||null;break;case"boolean":case"bool":n.nullable==!1?o[r]=de(a)||!1:o[r]=de(a)||null;break;default:o[r]=a||null;break}}}function qo(t,l){const o={};return Object.assign(o,t),Xo(t,l,o),o}function ss(t){if(!t)return!0;switch(t){case"number":case"boolean":return!1;default:return!0}}function Uo(t,l){const o=l||(r=>r.toString()),n=[];if(t.length){for(const r of t)if(typeof r=="string"&&r)n.push({name:r,label:o(te(r)),visibility:!0,editor:"text"});else if(Se(r)&&r.editing!="hidden"&&r.name){const a={name:r.name,role:r.role&&!Array.isArray(r.role)?[r.role]:r.role,dataType:r.dataType,minValue:r.minValue,maxValue:r.maxValue,group:r.group,nullable:r.required==null?ss(r.dataType):!r.required,label:r.title?o(r.title):o(te(r.name)),visibility:!0,readonly:r.readonly,sortable:r.sortable,editor:r.editor||r.dataType||"text",editorConfig:r.editorConfig,tagSource:r.tagSource,description:r.description};r.editing=="readonly"?a.readonly=!0:(r.editing=="create"||r.editing=="edit")&&(a.visibility=[r.editing]),r.required!=null&&(a.nullable=!r.required),r.values&&(Array.isArray(r.values)?(a.values=r.values,a.valueSource={type:"static",isLoading:!1,values:r.values.map(s=>{if(typeof s=="string"){let c=s;return c&&(r.prefix&&(c=r.prefix+c),r.suffix&&(c=c+r.suffix)),{value:s,label:o(c)}}else return s})}):typeof r.values=="function"?a.valueSource={type:"function",func:r.values,isLoading:!1}:Array.isArray(r.values.source)?a.valueSource={type:"static",isLoading:!1,values:r.values.source.map(s=>{if(typeof s=="string"){let c=s;return c&&(r.prefix&&(c=r.prefix+c),r.suffix&&(c=c+r.suffix)),{value:s,label:o(c)}}else return s})}:a.valueSource={type:"remote",isLoading:!1,key:r.values.key,label:r.values.label,subLabel:r.values.subLabel,renderLabel:r.values.renderLabel,labelTemplate:r.values.labelTemplate,prefix:r.values.prefix,suffix:r.values.suffix,i18n:r.i18n,filterable:r.values.filterable,sourceUrl:r.values.source,values:[]}),n.push(a)}}return n}function pt(t){if(t){if(typeof t=="number")return t;switch(t){case"x-large":return 480;case"large":return 300;case"medium":return 160;case"small":return 60;case"x-small":return 30;default:return t}}else return t}function Be(t){const l=new Array;for(const o of t)if(typeof o=="string")l.push({name:o,title:te(o),sortIndex:0,visible:!0});else if(Se(o)&&o.grid!="none"){if(o.visible!=null&&(typeof o.visible=="boolean"&&!o.visible||typeof o.visible=="function"&&!o.visible.call(null)))continue;const n={name:o.name,title:o.title,role:o.role&&!Array.isArray(o.role)?[o.role]:o.role,behavior:o.grid,align:o.align,fixed:o.gridFixed,dataType:o.dataType,href:o.href,i18n:o.i18n,template:o.template,prefix:o.prefix,suffix:o.suffix,formatter:o.formatter,display:o.display,values:o.values,width:pt(o.size),minWidth:pt(o.minWidth),textOverflow:o.textOverflow,sortIndex:0,sortable:o.sortable==null?!0:o.sortable,referencePage:o.referencePage,tagSource:o.tagSource,visible:!0,className:o.className,render:o.render,click:o.click};o.children&&o.children.length&&(n.children=Be(o.children)),l.push(n)}return l.sort((o,n)=>(o.sortIndex||0)-(n.sortIndex||0)),l}function is(t,l){return Ce.render(t,l)}function vo(t,l){var r;const o=l||(a=>a.toString()),n=new Array;for(const a of t)if(Se(a)&&a.search){const s={name:a.name,role:a.role&&!Array.isArray(a.role)?[a.role]:a.role,label:a.title?o(a.title):o(te(a.name)),editor:a.editor||a.dataType||"text",dataType:a.dataType,nullable:!0,searchMethod:"normal",template:a.template,prefix:a.prefix,suffix:a.suffix};if(typeof a.search=="boolean")s.searchMethod="normal";else if(typeof a.search=="string")a.search=="range"&&(s.searchMethod=a.search);else{if(a.search.editor&&(s.editor=a.search.editor),a.search.method=="range"?s.searchMethod="range":s.searchMethod="normal",a.search.required&&(s.nullable=!1),a.search.role){const c=Array.isArray(a.search.role)?a.search.role:[a.search.role];if(s.role)for(let m of c)s.role.includes(m)||s.role.push(m);else s.role=c}a.search.field&&(s.searchField=a.search.field),s.defaultValue=a.search.default}if(a.values&&(Array.isArray(a.values)?s.valueSource={type:"static",isLoading:!1,values:a.values.map(c=>{if(typeof c=="string"){let m=c;return a.formatter&&(m=a.formatter.call(null,m,null)??m),m&&(s.prefix&&(m=s.prefix+m),s.suffix&&(m=m+s.suffix)),{value:c,label:o(m)}}else return c})}:typeof a.values=="function"?s.valueSource={type:"function",func:a.values,isLoading:!1}:Array.isArray(a.values.source)?s.valueSource={type:"static",isLoading:!1,values:a.values.source.map(c=>{var m;return typeof c=="string"?{value:c,label:o(((m=a.formatter)==null?void 0:m.call(null,c,null))||c)}:c})}:s.valueSource={type:"remote",isLoading:!1,key:a.values.key,label:a.values.label,subLabel:a.values.subLabel,renderLabel:a.values.renderLabel,labelTemplate:a.values.labelTemplate,prefix:a.values.prefix,suffix:a.values.suffix,filterable:a.values.filterable,i18n:a.values.i18n,sourceUrl:a.values.source,values:[]},s.dataType=="boolean"&&Array.isArray((r=s.valueSource)==null?void 0:r.values))){const c=s.valueSource.values;c.length<=2&&c.splice(0,0,{value:"",label:""})}n.push(s)}return n}async function Pe(t,l,o,n,r){if(l.sourceUrl){l.isLoading=!0,l.values?l.values.length=0:l.values=[];try{let a=l.sourceUrl;o&&(a=U(a,o));const s=await t.get(a);if(s.isSuccess&&s.value!=null){let c=s.value;if(!Array.isArray(c)&&"rows"in c&&Array.isArray(c.rows)&&(c=c.rows),Array.isArray(c)){const m=c.filter(i=>i&&!0).map(i=>{if(typeof i=="string")return{value:i,label:n?n(i):i};{let u;if(l.renderLabel)u=l.renderLabel(i);else if(l.labelTemplate)u=Ce.render(l.labelTemplate,i);else{if(u=i[l.label||"label"],n&&(u=n(u)),l.subLabel){const g=i[l.subLabel];typeof g=="string"&&(u+=" "+(n?n(g):g))}u&&(l.prefix&&(u=l.prefix+u),l.suffix&&(u=u+l.suffix))}return{value:i[l.key||"value"],label:u}}});r&&m.splice(0,0,{value:void 0,label:""}),l.values.length=0,l.values.push(...m)}}}finally{l.isLoading=!1}}}function mt(t,l){return()=>e.h(f.NIcon,l?{color:l}:null,{default:()=>e.h(t)})}function cs(t,l,o){if(t)return e.h(f.NIcon,o?{color:o}:null,{default:()=>e.h(l)})}function ds(t,l,o){return e.h(f.NButton,Object.assign({text:!0,onClick:l},o),{default:()=>e.h(f.NIcon,{size:20},{default:()=>e.h(t)})})}function fs(t,l){const o=t[l];let n="";return typeof o=="number"&&(o>0?n="text-positive":o<0&&(n="text-negative")),e.h("span",{class:n},o==null?void 0:o.toString())}const Fe=e.defineComponent({__name:"HaloDatePicker",props:{value:{},type:{},readonly:{type:Boolean},clearable:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=c=>{const m=Eo(c);return m===void 0?null:m},a=e.ref(r(o.value)),s=c=>{if(c!=null){a.value=c;const m=st(c);n("update:value",m,c)}else n("update:value",null,c)};return e.watch(()=>o.value,c=>a.value=r(c)),(c,m)=>(e.openBlock(),e.createBlock(e.unref(f.NDatePicker),{value:a.value,type:c.type,placeholder:"",disabled:c.readonly,"onUpdate:value":s,clearable:c.clearable},null,8,["value","type","disabled","clearable"]))}}),ht=e.defineComponent({__name:"HaloTimePicker",props:{value:{},type:{},readonly:{type:Boolean},clearable:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=c=>{if(c==null)return null;if(typeof c=="number"){const m=new Date(2e3,1,1);return m.setSeconds(c),m.getTime()}else if(typeof c=="string"){const m=Ao(c);if(!m)return null;const i=new Date(2e3,1,1);return i.setMilliseconds(m.millisecond+m.second*1e3+m.minute*60*1e3+m.hour*60*60*1e3),i.getTime()}else return c instanceof Date?c.getTime():null},a=c=>{if(c!=null){s.value=c;const m=new Date;m.setTime(c);const i=m.getSeconds()+m.getMinutes()*60+m.getHours()*60*60;n("update:value",i)}else n("update:value",null)},s=e.ref(r(o.value));return e.watch(()=>o.value,c=>s.value=r(c)),(c,m)=>(e.openBlock(),e.createBlock(e.unref(f.NTimePicker),{value:s.value,type:c.type,placeholder:"",disabled:c.readonly,"onUpdate:value":a,clearable:c.clearable},null,8,["value","type","disabled","clearable"]))}}),gt=e.defineComponent({__name:"NullableBooleanInput",props:{value:{type:Boolean},readonly:{type:Boolean}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(typeof o.value=="boolean"?o.value.toString():""),s=[{value:null,label:""},{value:"true",label:r("Yes")},{value:"false",label:r("No")}],c=m=>{const i=de(m);i==null?n("update:value",null):n("update:value",i)};return e.watch(()=>o.value,()=>a.value=typeof o.value=="boolean"?o.value.toString():""),(m,i)=>(e.openBlock(),e.createBlock(e.unref(f.NSelect),{value:a.value,options:s,placeholder:"",disabled:m.readonly,clearable:"","onUpdate:value":i[0]||(i[0]=u=>c(u))},null,8,["value","disabled"]))}}),yt=()=>{const{t}=Z(),l=f.useMessage(),o=f.useDialog(),n=f.useModal(),r=b=>b&&t(b),a=b=>e.h("div",{},b.split(`
|
|
3
|
+
`).map(x=>e.h("span",{class:"line"},t(x))));return{t:r,message:(b,x)=>{switch(x){case"create":l.create(()=>a(b));break;case"error":l.error(()=>a(b));break;case"loading":l.loading(t(b));break;case"success":l.success(t(b));break;case"warning":l.warning(t(b));break;default:case"info":l.info(t(b));break}},confirm:(b,x,I)=>{o.warning({title:t(b??"Confirm"),content:()=>a(x),positiveText:t("OK"),negativeText:t("Cancel"),onPositiveClick:()=>I()})},error:b=>l.error(t(b)),success:b=>l.success(t(b)),warning:b=>l.warning(t(b)),info:b=>l.info(t(b)),errorDialog:(b,x,I)=>{o.error({title:t(x??"Error"),content:()=>a(b),positiveText:t("OK"),onPositiveClick:()=>I==null?void 0:I()})},successDialog:(b,x,I)=>{o.success({title:t(x??"Success"),content:()=>a(b),positiveText:t("OK"),onPositiveClick:()=>I==null?void 0:I()})},warningDialog:(b,x,I)=>{o.warning({title:t(x??"Warning"),content:()=>a(b),positiveText:t("OK"),onPositiveClick:()=>I==null?void 0:I()})},infoDialog:(b,x,I)=>{o.info({title:t(x??"Information"),content:()=>a(b),positiveText:t("OK"),onPositiveClick:()=>I==null?void 0:I()})},showSearchModal:b=>{let x=[];const I=n.create({title:t(b.title??"Search"),preset:"card",style:{width:b.width??"800px",height:b.height??"600px"},contentClass:"flex-column",draggable:b.draggable,content:()=>e.h(e.resolveComponent("SearchPanel"),{class:"flex-grow-1",config:b.config,multiSelect:b.multiSelect==!0,onSearchBack:F=>{b.callback.call(null,F)},onResultSelected:(F,T)=>{x=T??[]}}),footer:()=>e.h("div",{class:"flex-row",style:"justify-content:space-between"},[e.h(f.NButton,{type:"primary",style:"min-width: 100px",onClick:()=>{x.length&&(b.callback.call(null,x),I.destroy())}},()=>t("OK")),e.h(f.NButton,{ghost:!0,style:"min-width: 100px",onClick:()=>I.destroy()},()=>t("Close"))])})},showQrModal:(b,x)=>{const I=n.create({title:x,preset:"card",style:{width:"300px"},draggable:!0,content:()=>e.h("div",{class:"flex-column",style:"align-items: center"},[e.h(f.NQrCode,{value:b,size:160}),e.h("div",{class:"text-monospace",style:"font-size: large; margin: 0.25em"},b),e.h(f.NButton,{type:"primary",onClick:()=>I.destroy(),style:"align-self: center; min-width: 100px; margin-top: 1em;"},()=>t("Close"))])})}}};var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ge={exports:{}},us=Ge.exports,en;function ps(){return en||(en=1,function(t,l){(function(o,n){n()})(us,function(){function o(i,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}function n(i,u,g){var d=new XMLHttpRequest;d.open("GET",i),d.responseType="blob",d.onload=function(){m(d.response,u,g)},d.onerror=function(){console.error("could not download file")},d.send()}function r(i){var u=new XMLHttpRequest;u.open("HEAD",i,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(i){try{i.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),i.dispatchEvent(u)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof He=="object"&&He.global===He?He:void 0,c=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),m=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(i,u,g){var d=s.URL||s.webkitURL,h=document.createElement("a");u=u||i.name||"download",h.download=u,h.rel="noopener",typeof i=="string"?(h.href=i,h.origin===location.origin?a(h):r(h.href)?n(i,u,g):a(h,h.target="_blank")):(h.href=d.createObjectURL(i),setTimeout(function(){d.revokeObjectURL(h.href)},4e4),setTimeout(function(){a(h)},0))}:"msSaveOrOpenBlob"in navigator?function(i,u,g){if(u=u||i.name||"download",typeof i!="string")navigator.msSaveOrOpenBlob(o(i,g),u);else if(r(i))n(i,u,g);else{var d=document.createElement("a");d.href=i,d.target="_blank",setTimeout(function(){a(d)})}}:function(i,u,g,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof i=="string")return n(i,u,g);var h=i.type==="application/octet-stream",b=/constructor/i.test(s.HTMLElement)||s.safari,x=/CriOS\/[\d]+/.test(navigator.userAgent);if((x||h&&b||c)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var k=I.result;k=x?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=k:location=k,d=null},I.readAsDataURL(i)}else{var F=s.URL||s.webkitURL,T=F.createObjectURL(i);d?d.location=T:location.href=T,d=null,setTimeout(function(){F.revokeObjectURL(T)},4e4)}});s.saveAs=m.saveAs=m,t.exports=m})}(Ge)),Ge.exports}var ms=ps();function tn(){const t=le.create({headers:{"Content-type":"application/json"},timeout:3e5});return t.interceptors.request.use(l=>{const o=localStorage.getItem("sessionToken");return o&&l.headers&&(l.headers.Authorization=`Bearer ${o}`),l},l=>(console.log(l),Promise.reject(l))),t}function hs(t){if(t){const l=t.match(/filename\*=UTF-8'(?:.*)'(.*)/);if(l&&l.length>1)return decodeURIComponent(l[1]);const o=t.match(/filename=(.*)/);if(o&&o.length>1)return o[1]}}async function me(t,l,o,n){const r=tn();let a;(n==null?void 0:n.toLowerCase())=="post"?a=await r.post(t,{responseType:"blob"}):a=await r.get(t,{responseType:"blob"});const{data:s,headers:c,status:m,statusText:i}=a;if(m==200||s.length){c&&(o||(o=c["content-type"]),l||(l=hs(c["content-disposition"])));const u=new Blob([s],{type:o||"application/octet-stream"});ms.saveAs(u,l)}else throw`[${m}] ${i}`}async function on(t,l,o){const n=tn();let r;(o==null?void 0:o.toLowerCase())=="post"?r=await n.post(t,{responseType:"blob"}):r=await n.get(t,{responseType:"blob"});const{data:a,headers:s,status:c,statusText:m}=r;if(c==200||a.length){s&&(l||(l=s["content-type"]));const i=new Blob([a],{type:l||"application/octet-stream"}),u=URL.createObjectURL(i);window.open(u)}else throw`[${c}] ${m}`}function nn(t,l){let o=t.length,n=0;for(;o--;)l(t[o],o)&&(t.splice(o,1),n++);return n}function gs(t,l){var o={};for(let n of t){const r=l(n);o[r]?o[r].push(n):o[r]=[]}return o}function ln(t,l,o){l<0||l>=t.length||o<0||o>=t.length||l==o||t.splice(o,0,...t.splice(l,1))}function ys(t,l,o,n,r,a){const s={name:t,label:l||te(t),editor:o||"text",dataType:o,nullable:!0,visibility:!0,searchMethod:n||"normal"},c=a??(m=>m);return r&&(typeof r=="string"?s.valueSource={type:"remote",isLoading:!1,key:"key",label:"label",sourceUrl:r}:Array.isArray(r)?s.dataType=="boolean"&&r.length==2&&typeof r[0]=="string"?s.valueSource={type:"static",isLoading:!1,values:[{value:"",label:""},{value:"true",label:c(r[0])},{value:"false",label:c(r[1])}]}:s.valueSource={type:"static",isLoading:!1,values:r.map(m=>typeof m=="string"?{value:m,label:c(m)}:m)}:Yo(r)?Array.isArray(r.source)?s.valueSource={type:"static",isLoading:!1,filterable:r.filterable,values:[{value:"",label:""},...r.source.map(m=>typeof m=="string"?{value:m,label:c(m)}:m)]}:s.valueSource={type:"remote",isLoading:!1,key:r.key,label:r.label,subLabel:r.subLabel,labelTemplate:r.labelTemplate,i18n:r.i18n,sourceUrl:r.source,filterable:r.filterable,values:[]}:s.valueSource={type:"static",isLoading:!1,values:Object.keys(r).map(m=>({value:r[m],label:c(m)}))}),s}function ws(...t){const l=new Map;return t.forEach(o=>{o.forEach(n=>{n.name?l.set(n.name.toString(),n):l.set(n.path,n)})}),Array.from(l.values())}function Cs(t,l,o){if(t<=0||l<=0||o<0||!Number.isInteger(l)||!Number.isInteger(o)){console.error("Invalid arguments.");return}const n=Math.pow(10,o);let r=Math.floor(t*n);const a=[],s=Math.max(1,Math.floor(r/l));let c=r;for(let m=0;m<l;m++){let i;m==l-1?i=Math.max(0,c):(i=Math.min(s,c),c=Math.max(0,c-s)),i=parseFloat((i/n).toFixed(o)),a.push(i)}return a}function bs(t,l,o){if(t<=0||l<=0||o<0||!Number.isInteger(o)){console.error("Invalid arguments.");return}const n=Math.pow(10,o),r=Math.round(t*n),a=Math.round(l*n),s=[];let c=r;for(;c>0;){let m=Math.min(a,c);c-=a,s.push(parseFloat((m/n).toFixed(o)))}return s}function ks(t,l){if(l<0||!Number.isInteger(l)){console.error("Invalid arguments.");return}const o=Math.pow(10,l);let n=0;for(const r of t)n+=Math.round(r*o);return n/o}const ie=()=>{const t=yt(),l=e.inject("axios");async function o(m,i="Error"){if(m)if(m.response){let u=t.t(m.response.statusText);return m.response.data&&(m.response.data instanceof Blob?u+=`
|
|
4
|
+
`+t.t(await m.response.data.text()):u+=`
|
|
5
|
+
`+t.t(m.response.data.toString()),console.log(u)),u}else return m.toString();else return i}function n(m,i,u){t.confirm(m,i,()=>{r(u)})}async function r(m){var i,u,g,d,h,b;try{(i=m.loadingStatus)==null||i.call(null,!0);let x;m.data?x=await l.post(m.url,m.data):x=await l.post(m.url),(u=m.callback)==null||u.call(null,x),x.isSuccess?((g=m.success)==null||g.call(null,x.value),m.successMessage===!0?t.message("Successful operation.","success"):typeof m.successMessage=="string"&&t.message(m.successMessage,"success")):((d=m.fail)==null||d.call(null,x),x.errorMessage&&console.error(x.errorMessage),m.failMessage?t.message(m.failMessage,"error"):t.message(x.errorMessage??((h=x.value)==null?void 0:h.toString())??"Error","error"))}catch(x){t.message(await o(x)??m.failMessage??"Error")}finally{(b=m.loadingStatus)==null||b.call(null,!1)}}async function a(m){var i,u,g,d;try{(i=m.loadingStatus)==null||i.call(null,!0);let h=await l.get(m.url);if(h.isSuccess)return(u=m.callback)==null||u.call(null,h.value),h.value;m.quiet!=!0&&t.message(h.errorMessage??((g=h.value)==null?void 0:g.toString())??"Error","error")}catch(h){t.message(await o(h)??"Error","error")}finally{(d=m.loadingStatus)==null||d.call(null,!1)}}async function s(m){var i,u,g;try{(i=m.loadingStatus)==null||i.call(null,!0),await on(m.url,m.contentType,m.method),(u=m.callback)==null||u.call(null)}catch(d){t.message(await o(d)??"Error","error")}finally{(g=m.loadingStatus)==null||g.call(null,!1)}}async function c(m){var i,u,g;try{(i=m.loadingStatus)==null||i.call(null,!0),await me(m.url,m.filename,m.contentType,m.method),(u=m.callback)==null||u.call(null)}catch(d){t.message(await o(d)??"Error","error")}finally{(g=m.loadingStatus)==null||g.call(null,!1)}}return{post:r,get:a,confirmToPost:n,getHttpErrorMessage:o,openFile:s,downloadFile:c}},wt=e.defineComponent({__name:"HaloTagsInput",props:{value:{},disabled:{type:Boolean,default:!1},tagSource:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=Ne(),a=ie(),s=e.ref(i(o.value)),c=e.ref([]);async function m(){if(o.tagSource){const g=await r.fetchSharedData(`tags:${o.tagSource}`,async()=>await a.get({url:`/api/core/CommonCodeItems/list?commonCode=${o.tagSource}`})??[]);c.value=g.map(d=>({value:d.code,label:`[${d.code}] ${d.name}`}))}else c.value=[]}function i(g){return g?g.split(","):[]}function u(g){o.disabled||(Array.isArray(g)?n("update:value",g.join(",")):n("update:value",g))}return e.watch(()=>o.value,g=>s.value=i(g)),e.watch(()=>o.tagSource,()=>m()),e.onMounted(()=>m()),(g,d)=>g.tagSource?(e.openBlock(),e.createBlock(e.unref(f.NSelect),{key:0,value:s.value,multiple:"",options:c.value,"onUpdate:value":u},null,8,["value","options"])):(e.openBlock(),e.createBlock(e.unref(f.NDynamicTags),{key:1,value:s.value,"onUpdate:value":u},null,8,["value"]))}}),Ct=e.defineComponent({__name:"ListInputModal",props:{title:{},message:{},value:{},placeholder:{default:""},maxLength:{},show:{type:Boolean},readonly:{type:Boolean}},emits:["update:show","update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=()=>{o.readonly||n("update:value",c()),n("update:show",!1)},s=()=>{var i,u,g,d;return o.value?Array.isArray(o.value)?o.value.join(`
|
|
6
|
+
`):((d=(g=(u=(i=o.value)==null?void 0:i.replace(/\n/g,","))==null?void 0:u.split(","))==null?void 0:g.map(b=>b.trim()))==null?void 0:d.filter((b,x,I)=>b&&I.indexOf(b)==x)).join(`
|
|
7
|
+
`):o.value},c=()=>{var u,g,d;return m.value?((d=(g=(u=m.value)==null?void 0:u.split(/\r?\n/))==null?void 0:g.map(h=>h.trim()))==null?void 0:d.filter((h,b,x)=>h&&x.indexOf(h)==b)).join(","):""},m=e.ref(s());return e.watch(()=>o.value,()=>{m.value=s()}),(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{title:i.title,show:i.show,preset:"card",style:{width:"350px"},draggable:"",onClose:u[2]||(u[2]=()=>i.$emit("update:show",!1))},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:a,disabled:i.readonly},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["disabled"]),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:u[1]||(u[1]=()=>i.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.message),1)]),_:1}),e.createVNode(e.unref(f.NInput),{value:m.value,"onUpdate:value":u[0]||(u[0]=g=>m.value=g),placeholder:i.placeholder,maxlength:i.maxLength,type:"textarea",readonly:i.readonly,rows:16,class:"halo-form-code"},null,8,["value","placeholder","maxlength","readonly"])]),_:1})]),_:1},8,["title","show"]))}}),bt=e.defineComponent({__name:"HaloModalInput",props:{value:{},label:{},inputReadOnly:{type:Boolean},placeholder:{},config:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(!1),s=o.config;function c(){a.value=!a.value}function m(i){i!=null&&(n("update:value",i),a.value=!1)}return e.watch(()=>o.value,i=>{console.log(`value changed: [${i}]`)}),e.onMounted(()=>{console.log("Modal-Input onMounted")}),(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInput),{readonly:i.inputReadOnly,value:i.value,placeholder:i.placeholder,"onUpdate:value":u[0]||(u[0]=g=>i.$emit("update:value",g))},null,8,["readonly","value","placeholder"]),e.createVNode(e.unref(f.NButton),{ghost:"",onClick:c},{default:e.withCtx(()=>u[4]||(u[4]=[e.createTextVNode(" … ",-1)])),_:1,__:[4]}),e.createVNode(e.unref(f.NModal),{show:a.value,"onUpdate:show":u[2]||(u[2]=g=>a.value=g),title:e.unref(r)(e.unref(s).title??i.label??""),onClose:u[3]||(u[3]=()=>a.value=!1),preset:"card",style:e.normalizeStyle(e.unref(s).modalStyle),"content-style":"display: flex; flex-direction: column;"},{default:e.withCtx(()=>[e.unref(s).componentType?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s).componentType),{key:0,style:e.normalizeStyle(e.unref(s).style),"onUpdate:selected":u[1]||(u[1]=g=>m(g))},null,40,["style"])):e.createCommentVNode("",!0)]),_:1},8,["show","title","style"])]),_:1}))}}),Ns={key:0,style:{"flex-grow":"1"}},xs={key:0,style:{"text-align":"right"}},Is=["readonly","disabled"],Ss=["readonly","disabled"],Ve=e.defineComponent({__name:"FormInput",props:{value:{},readonly:{type:Boolean},formItem:{},label:{},placeholder:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,r=e.ref(o.value),{t:a}=Z(),s=e.inject("axios"),c=e.ref(void 0),m=e.ref(!1),i=e.ref(!1);function u(d){if(d.target instanceof HTMLInputElement){const h=d.target.files;h!=null&&h.length?r.value=h[0]:r.value=null}}async function g(d){var b,x;const h=(b=o.formItem)==null?void 0:b.valueSource;h&&h.type=="remote"&&h.sourceUrl&&h.filterable&&Pe(s,h,{searchWords:d},I=>h.i18n?a(I):I,((x=o.formItem)==null?void 0:x.nullable)!=!1)}return e.watch(r,d=>{n("update:value",d)}),e.watch(()=>o.value,d=>{r.value=d}),e.onMounted(()=>{var d,h;(h=(d=o.formItem)==null?void 0:d.role)!=null&&h.length&&(m.value=o.formItem.role.includes("list"),c.value=o.formItem.role.map(b=>`halo-form-${b}`).join(" "))}),(d,h)=>{var E,R,j,L,H,S,y,B,A,D,z,P,Q,v,ee,oe,ne,W;const b=e.resolveComponent("n-switch"),x=e.resolveComponent("n-text"),I=e.resolveComponent("n-select"),F=e.resolveComponent("n-input-number"),T=e.resolveComponent("n-checkbox"),k=e.resolveComponent("n-input"),N=e.resolveComponent("n-icon"),V=e.resolveComponent("n-button");return d.formItem?(e.openBlock(),e.createElementBlock("div",Ns,[typeof d.formItem.editor=="function"?(e.openBlock(),e.createBlock(e.KeepAlive,{key:0},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.formItem.editor),{value:r.value,"onUpdate:value":h[0]||(h[0]=K=>r.value=K)},null,40,["value"]))],1024)):((E=d.formItem.editor)==null?void 0:E.startsWith("@"))==!0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.formItem.editor.substring(1)),{key:1,value:r.value,"onUpdate:value":h[1]||(h[1]=K=>r.value=K),config:d.formItem.editorConfig,label:d.formItem.label,readonly:d.readonly,disabled:d.readonly},null,40,["value","config","label","readonly","disabled"])):d.formItem.editor=="modal"?(e.openBlock(),e.createBlock(bt,{key:2,value:r.value,"onUpdate:value":h[2]||(h[2]=K=>r.value=K),config:d.formItem.editorConfig,label:d.formItem.label},null,8,["value","config","label"])):d.formItem.editor=="boolean"&&Array.isArray(d.formItem.values)&&d.formItem.values.length>1?(e.openBlock(),e.createBlock(b,{key:3,value:r.value,"onUpdate:value":h[3]||(h[3]=K=>r.value=K),style:e.normalizeStyle((R=d.formItem.editorConfig)==null?void 0:R.style)},{checked:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.formItem.values[0]),1)]),unchecked:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.formItem.values[1]),1)]),_:1},8,["value","style"])):d.formItem.valueSource?(e.openBlock(),e.createBlock(I,{key:4,value:r.value,"onUpdate:value":h[4]||(h[4]=K=>r.value=K),remote:d.formItem.valueSource.type=="remote",loading:d.formItem.valueSource.isLoading,options:d.formItem.valueSource.values,filterable:d.formItem.valueSource.filterable,multiple:((j=d.formItem.role)==null?void 0:j.includes("list"))==!0,placeholder:"",disabled:d.readonly,clearable:d.formItem.nullable,style:e.normalizeStyle((L=d.formItem.editorConfig)==null?void 0:L.style),onSearch:g},{action:e.withCtx(()=>[d.formItem.valueSource.filterable?(e.openBlock(),e.createElementBlock("div",xs,[e.createVNode(x,{depth:"3",italic:""},{default:e.withCtx(()=>[e.createElementVNode("small",null,e.toDisplayString(e.unref(a)("Enter text to filter the result list.")),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1},8,["value","remote","loading","options","filterable","multiple","disabled","clearable","style"])):d.formItem.editor=="number"?(e.openBlock(),e.createBlock(F,{key:5,value:r.value,"onUpdate:value":h[5]||(h[5]=K=>r.value=K),min:d.formItem.minValue,max:d.formItem.maxValue,clearable:d.formItem.nullable,readonly:d.readonly,placeholder:d.placeholder,style:e.normalizeStyle((H=d.formItem.editorConfig)==null?void 0:H.style)},null,8,["value","min","max","clearable","readonly","placeholder","style"])):d.formItem.editor=="boolean"&&d.formItem.nullable?(e.openBlock(),e.createBlock(gt,{key:6,value:r.value,"onUpdate:value":h[6]||(h[6]=K=>r.value=K),placeholder:"",disabled:d.readonly,style:e.normalizeStyle((S=d.formItem.editorConfig)==null?void 0:S.style)},null,8,["value","disabled","style"])):d.formItem.editor=="boolean"?(e.openBlock(),e.createBlock(T,{key:7,checked:r.value,"onUpdate:checked":h[7]||(h[7]=K=>r.value=K),disabled:d.readonly,style:e.normalizeStyle((y=d.formItem.editorConfig)==null?void 0:y.style)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:1},8,["checked","disabled","style"])):d.formItem.editor=="datetime"?(e.openBlock(),e.createBlock(Fe,{key:8,value:r.value,"onUpdate:value":h[8]||(h[8]=K=>r.value=K),type:"datetime",placeholder:"",disabled:d.readonly,clearable:d.formItem.nullable,style:e.normalizeStyle((B=d.formItem.editorConfig)==null?void 0:B.style)},null,8,["value","disabled","clearable","style"])):d.formItem.editor=="date"?(e.openBlock(),e.createBlock(Fe,{key:9,value:r.value,"onUpdate:value":h[9]||(h[9]=K=>r.value=K),type:"date",placeholder:"",disabled:d.readonly,clearable:d.formItem.nullable,style:e.normalizeStyle((A=d.formItem.editorConfig)==null?void 0:A.style)},null,8,["value","disabled","clearable","style"])):d.formItem.editor=="time"?(e.openBlock(),e.createBlock(ht,{key:10,value:r.value,"onUpdate:value":h[10]||(h[10]=K=>r.value=K),placeholder:"",disabled:d.readonly,clearable:d.formItem.nullable,style:e.normalizeStyle((D=d.formItem.editorConfig)==null?void 0:D.style)},null,8,["value","disabled","clearable","style"])):d.formItem.editor=="color"?(e.openBlock(),e.createBlock(ut,{key:11,value:r.value,"onUpdate:value":h[11]||(h[11]=K=>r.value=K),placeholder:"",disabled:d.readonly,readonly:d.readonly,clearable:d.formItem.nullable,style:e.normalizeStyle((z=d.formItem.editorConfig)==null?void 0:z.style)},null,8,["value","disabled","readonly","clearable","style"])):d.formItem.editor=="tags"?(e.openBlock(),e.createBlock(wt,{key:12,value:r.value,"onUpdate:value":h[12]||(h[12]=K=>r.value=K),tagSource:d.formItem.tagSource,placeholder:"",disabled:d.readonly,style:e.normalizeStyle((P=d.formItem.editorConfig)==null?void 0:P.style)},null,8,["value","tagSource","disabled","style"])):d.formItem.editor=="image"?(e.openBlock(),e.createElementBlock("input",{key:13,type:"file",onChange:u,readonly:d.readonly,disabled:d.readonly,style:e.normalizeStyle((Q=d.formItem.editorConfig)==null?void 0:Q.style)},null,44,Is)):d.formItem.editor=="file"?(e.openBlock(),e.createElementBlock("input",{key:14,type:"file",onChange:u,readonly:d.readonly,disabled:d.readonly,style:e.normalizeStyle((v=d.formItem.editorConfig)==null?void 0:v.style)},null,44,Ss)):d.formItem.editor=="password"?(e.openBlock(),e.createBlock(k,{key:15,value:r.value,"onUpdate:value":h[13]||(h[13]=K=>r.value=K),class:e.normalizeClass(c.value),placeholder:d.placeholder??"",type:"password",readonly:d.readonly,style:e.normalizeStyle((ee=d.formItem.editorConfig)==null?void 0:ee.style)},null,8,["value","class","placeholder","readonly","style"])):d.formItem.editor=="textarea"?(e.openBlock(),e.createBlock(k,{key:16,value:r.value,"onUpdate:value":h[14]||(h[14]=K=>r.value=K),class:e.normalizeClass(c.value),type:"textarea",placeholder:d.placeholder??"",readonly:d.readonly,style:e.normalizeStyle((oe=d.formItem.editorConfig)==null?void 0:oe.style)},null,8,["value","class","placeholder","readonly","style"])):(e.openBlock(),e.createBlock(k,{key:17,value:r.value,"onUpdate:value":h[16]||(h[16]=K=>r.value=K),class:e.normalizeClass(c.value),placeholder:d.placeholder??"",readonly:d.readonly,clearable:d.formItem.nullable,type:d.formItem.editor,style:e.normalizeStyle((ne=d.formItem.editorConfig)==null?void 0:ne.style)},{suffix:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(V,{key:0,text:"",title:e.unref(a)("If there are multiple items, separate them with commas."),onClick:h[15]||(h[15]=()=>i.value=!0)},{default:e.withCtx(()=>[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ga))]),_:1})]),_:1},8,["title"])):e.createCommentVNode("",!0)]),_:1},8,["value","class","placeholder","readonly","clearable","type","style"])),m.value?(e.openBlock(),e.createBlock(Ct,{key:18,show:i.value,"onUpdate:show":h[17]||(h[17]=K=>i.value=K),title:d.formItem.label,readonly:d.readonly,message:e.unref(a)("Please enter a list, separated by lines or commas."),value:r.value,"onUpdate:value":h[18]||(h[18]=K=>r.value=K),style:e.normalizeStyle((W=d.formItem.editorConfig)==null?void 0:W.style)},null,8,["show","title","readonly","message","value","style"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}}),Bs=e.defineComponent({name:"DefaultPropertyForm",components:{FormInput:Ve,NForm:f.NForm,NFormItem:f.NFormItem},props:{readOnly:{type:Boolean,default:!1},method:String,columns:Number,groupLayout:String,formItems:Array,data:Object,original:Object},emits:["itemChange"],setup(t,l){const{t:o}=Z(),n=e.inject("axios"),r=e.ref(null),a=e.ref([]),s=e.ref(t.columns||1),c=e.ref({}),m=e.ref(g(t.formItems)),i=h(t.formItems),u=e.ref(void 0);function g(k){return k?[...new Set(k.map(V=>V.group))].map(V=>({label:V||"General",items:k.filter(E=>E.group==V)})):[]}function d(k){return k.dataType=="boolean"&&!k.nullable?" ":k.label}function h(k){const N={};if(k&&k.length)for(const V of k){const E=[];V.nullable==!1&&V.dataType!="boolean"&&E.push({required:!0,message:o("Must be filled here.")}),E.length&&(N[V.name]=E)}return N}async function b(k,N){var V;if(N.type=="remote"&&N.sourceUrl)Pe(n,N,null,E=>N.i18n?o(E):E,k.nullable);else if(N.type=="function"&&N.func){N.isLoading=!0;try{const E=(V=N.func)==null?void 0:V.call(void 0);E&&(N.values=E)}finally{N.isLoading=!1}}}function x(){var k;(k=t.formItems)==null||k.forEach(N=>{N.valueSource&&(N.valueSource.type=="remote"||N.valueSource.type=="function")&&b(N,N.valueSource)})}function I(k,N){l.emit("itemChange",{item:k,data:t.data,value:N})}function F(k){return!!(k.readonly==!0||t.readOnly==!0||t.method&&Array.isArray(k.readonly)&&k.readonly.includes(t.method))}function T(k){return!!(k.visibility==!0||t.method&&Array.isArray(k.visibility)&&k.visibility.includes(t.method))}return e.onMounted(()=>{x(),t.data&&(c.value=t.data)}),e.watch(()=>t.data,k=>c.value=k||{}),{t:o,formRef:r,formItemsRef:a,getItemLabel:d,originalModel:u,model:c,rules:i,formColumns:s,updateValue:I,formGroups:m,isReadonly:F,isVisible:T}}}),Vs={class:"item-box"},Ms={class:"item-box"},Ts={class:"item-box"};function As(t,l,o,n,r,a){const s=e.resolveComponent("form-input"),c=e.resolveComponent("n-text"),m=e.resolveComponent("n-form-item-grid-item"),i=e.resolveComponent("n-grid"),u=e.resolveComponent("n-tab-pane"),g=e.resolveComponent("n-tabs"),d=e.resolveComponent("n-grid-item"),h=e.resolveComponent("n-form");return e.openBlock(),e.createBlock(h,{ref:"formRef",model:t.model,rules:t.rules,"label-placement":"left","label-width":160},{default:e.withCtx(()=>[t.groupLayout=="tab"?(e.openBlock(),e.createBlock(g,{key:0,type:"line"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formGroups,b=>(e.openBlock(),e.createBlock(u,{key:b,name:b.label,tab:t.t(b.label)},{default:e.withCtx(()=>[e.createVNode(i,{cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.items,x=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:x.name,label:t.getItemLabel(x),path:x.name,feedback:x.errorMessage,"validation-status":x.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[e.createVNode(s,{"form-item":x,value:t.model[x.name],"onUpdate:value":[I=>t.model[x.name]=I,I=>t.updateValue(x,I)],readonly:t.isReadonly(x),label:x.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),x.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(x.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(x)]])),128))]),_:2},1032,["cols"])]),_:2},1032,["name","tab"]))),128)),e.renderSlot(t.$slots,"more-tabs",{},void 0,!0)]),_:3})):t.groupLayout=="column"?(e.openBlock(),e.createBlock(i,{key:1,cols:t.formGroups.length,"x-gap":"8"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formGroups,b=>(e.openBlock(),e.createBlock(d,{key:b},{default:e.withCtx(()=>[e.createVNode(i,{cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.items,x=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:x.name,label:t.getItemLabel(x),path:x.name,feedback:x.errorMessage,"validation-status":x.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[e.createVNode(s,{"form-item":x,value:t.model[x.name],"onUpdate:value":[I=>t.model[x.name]=I,I=>t.updateValue(x,I)],readonly:t.isReadonly(x),label:x.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),x.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(x.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(x)]])),128))]),_:2},1032,["cols"])]),_:2},1024))),128))]),_:1},8,["cols"])):(e.openBlock(),e.createBlock(i,{key:2,cols:t.formColumns,"x-gap":8,class:"flex-grow-1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formItems,b=>e.withDirectives((e.openBlock(),e.createBlock(m,{ref_for:!0,ref:"formItemsRef",key:b.name,label:t.getItemLabel(b),path:b.name,feedback:b.errorMessage,"validation-status":b.validationStatus},{default:e.withCtx(()=>[e.createElementVNode("div",Ts,[e.createVNode(s,{"form-item":b,value:t.model[b.name],"onUpdate:value":[x=>t.model[b.name]=x,x=>t.updateValue(b,x)],readonly:t.isReadonly(b),label:b.label,class:"form-input"},null,8,["form-item","value","onUpdate:value","readonly","label"]),b.description?(e.openBlock(),e.createBlock(c,{key:0,italic:"",depth:"3",class:"text-input"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t(b.description)),1)]),_:2},1024)):e.createCommentVNode("",!0)])]),_:2},1032,["label","path","feedback","validation-status"])),[[e.vShow,t.isVisible(b)]])),128))]),_:1},8,["cols"]))]),_:3},8,["model","rules"])}const kt=re(Bs,[["render",As],["__scopeId","data-v-e7319d81"]]),Es={class:"pg-value flex-grow-1"},Nt=e.defineComponent({__name:"PropertyGrid",props:{columns:{default:1},hideEmpty:{type:Boolean},data:{},names:{},justify:{}},setup(t){const l=t,{t:o}=Z(),n=e.ref(a());function r(){n.value=a()}function a(){var u;const s=new Array,c=l.data,m=l.names,i=l.hideEmpty;if(c)if(m)for(const g of m)if(typeof g=="string")(!i||c[g])&&s.push({label:o(te(g)),value:c[g],span:1});else{const d={label:o(g.label||te(g.name)),value:c[g.name],span:g.span||1,dataType:g.dataType,role:g.role};d.value!=null&&(d.dataType=="boolean"?d.value=de(d.value)?o("Yes"):o("No"):g.i18n&&(d.value=o((u=d.value)==null?void 0:u.toString()))),(!i||d.value)&&s.push(d)}else if(Array.isArray(c))for(const g of c)(!i||g.value)&&s.push({label:o(te(g.label)),value:g.value,span:1});else for(const g in c)(!i||c[g])&&s.push({label:o(te(g)),value:c[g],span:1});return s}return e.watch(()=>l.data,()=>r()),e.watch(()=>l.hideEmpty,()=>r()),(s,c)=>(e.openBlock(),e.createBlock(e.unref(f.NGrid),{cols:s.columns,"item-responsive":""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value.filter(m=>!s.hideEmpty||m.value),m=>(e.openBlock(),e.createBlock(e.unref(f.NGridItem),{class:"pg-item",key:m.label,span:m.span},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{label:m.label,value:m.value},()=>[e.createElementVNode("div",{class:"flex-row justify",style:e.normalizeStyle({"justify-content":s.justify})},[e.createVNode(e.unref(f.NText),{class:"pg-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label)+":",1)]),_:2},1024),e.createElementVNode("div",Es,[m.role=="percent"?(e.openBlock(),e.createBlock(e.unref(f.NProgress),{key:0,type:"line",percentage:Number(m.value),title:m.value+"%",style:{"margin-top":"auto","max-width":"80%"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value)+" % ",1)]),_:2},1032,["percentage","title"])):(e.openBlock(),e.createBlock(e.unref(f.NText),{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value),1)]),_:2},1024))])],4)])]),_:2},1032,["span"]))),128))]),_:3},8,["cols"]))}}),_s={key:0},zs={class:"flex-column gap1 flex-grow-1"},Ls={class:"flex-row",style:{"justify-content":"space-between"}},Ds={class:"text-monospace",style:{"font-size":"24pt"}},$s={key:0},Os=["src"],Rs=["src"],js={style:{"text-align":"right"}},rn=e.defineComponent({__name:"DetailPage",props:{loading:{type:Boolean},title:{},subject:{},data:{},properties:{},showBarcode:{type:Boolean,default:!0},columns:{default:3}},emits:["refresh"],setup(t){const{t:l}=Z(),o=e.ref(!0);return(n,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(f.NSpin),{show:n.loading,style:{"align-self":"center",margin:"1em"},class:"flex-grow-1 flex-column","content-class":"flex-column flex-grow-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NCard),{embedded:"",style:{width:"1080px"},segmented:{content:!0,footer:"soft"},class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createVNode(e.unref(f.NH2),{style:{"margin-bottom":"2px"}},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon"),n.title?(e.openBlock(),e.createElementBlock("span",_s,e.toDisplayString(e.unref(l)(n.title)),1)):e.createCommentVNode("",!0)]),_:3})]),"header-extra":e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{text:"",onClick:r[0]||(r[0]=()=>n.$emit("refresh"))},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(l)("Refresh")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",zs,[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,[e.createElementVNode("div",Ds,e.toDisplayString(n.subject),1),n.showBarcode?(e.openBlock(),e.createElementBlock("div",$s,[e.createElementVNode("img",{src:"/api/core/Barcode/Image?code="+n.subject+"&format=CODE_128&height=30&margin=4,2"},null,8,Os)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[n.showBarcode?(e.openBlock(),e.createElementBlock("img",{key:0,src:"/api/core/QR/Image?code="+n.subject+"&format=CODE_128&width=100&height=100"},null,8,Rs)):e.createCommentVNode("",!0)])]),e.createVNode(e.unref(f.NCollapse),{"display-directive":"show","default-expanded-names":"info"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NCollapseItem),{name:"info",title:e.unref(l)("Property")},{default:e.withCtx(()=>[e.createVNode(Nt,{data:n.data,columns:n.columns,names:n.properties,"hide-empty":o.value},null,8,["data","columns","names","hide-empty"]),e.createElementVNode("div",js,[e.createVNode(e.unref(f.NButton),{text:"",onClick:r[1]||(r[1]=a=>o.value=!o.value),title:e.unref(l)("More")},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Oa))]),_:1})]),_:1},8,["title"])])]),_:1},8,["title"])]),_:1}),e.renderSlot(n.$slots,"default")])]),_:3})]),_:3},8,["show"])]))}}),Ps={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Fs=e.defineComponent({name:"ArrowDown",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ps,o[0]||(o[0]=[e.createElementVNode("path",{d:"M24.59 16.59L17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10l10-10l-1.41-1.41z",fill:"currentColor"},null,-1)]))}}),Hs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Gs=e.defineComponent({name:"ArrowLeft",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Hs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M14 26l1.41-1.41L7.83 17H28v-2H7.83l7.58-7.59L14 6L4 16l10 10z",fill:"currentColor"},null,-1)]))}}),Ks={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ws=e.defineComponent({name:"ArrowRight",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ks,o[0]||(o[0]=[e.createElementVNode("path",{d:"M18 6l-1.43 1.393L24.15 15H4v2h20.15l-7.58 7.573L18 26l10-10L18 6z",fill:"currentColor"},null,-1)]))}}),Zs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Qs=e.defineComponent({name:"ArrowUp",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Zs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16 4L6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14L16 4z",fill:"currentColor"},null,-1)]))}}),Ys={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},an=e.defineComponent({name:"Checkbox",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ys,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM6 26V6h20v20z",fill:"currentColor"},null,-1)]))}}),Js={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},sn=e.defineComponent({name:"CheckboxChecked",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Js,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zM6 26V6h20v20z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M14 21.5l-5-4.96L10.59 15L14 18.35L21.41 11L23 12.58l-9 8.92z",fill:"currentColor"},null,-1)]))}}),Xs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},qs=e.defineComponent({name:"Checkmark",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Xs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9L13 24z",fill:"currentColor"},null,-1)]))}}),Us={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},xt=e.defineComponent({name:"ChevronDown",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Us,o[0]||(o[0]=[e.createElementVNode("path",{d:"M16 22L6 12l1.4-1.4l8.6 8.6l8.6-8.6L26 12z",fill:"currentColor"},null,-1)]))}}),vs={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},ei=e.defineComponent({name:"CollapseAll",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",vs,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 15h-2V7H13V5h15a2.002 2.002 0 0 1 2 2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M25 20h-2v-8H8v-2h15a2.002 2.002 0 0 1 2 2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 27H4a2.002 2.002 0 0 1-2-2v-8a2.002 2.002 0 0 1 2-2h14a2.002 2.002 0 0 1 2 2v8a2.002 2.002 0 0 1-2 2zM4 17v8h14.001L18 17z",fill:"currentColor"},null,-1)]))}}),ti={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},cn=e.defineComponent({name:"Cube",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ti,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28.504 8.136l-12-7a1 1 0 0 0-1.008 0l-12 7A1 1 0 0 0 3 9v14a1 1 0 0 0 .496.864l12 7a1 1 0 0 0 1.008 0l12-7A1 1 0 0 0 29 23V9a1 1 0 0 0-.496-.864zM16 3.158L26.016 9L16 14.842L5.984 9zM5 10.74l10 5.833V28.26L5 22.426zM17 28.26V16.574l10-5.833v11.685z",fill:"currentColor"},null,-1)]))}}),oi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},dn=e.defineComponent({name:"DocumentDownload",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",oi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 25l-1.414-1.414L26 26.172V18h-2v8.172l-2.586-2.586L20 25l5 5l5-5z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 28H8V4h8v6a2.006 2.006 0 0 0 2 2h6v3h2v-5a.91.91 0 0 0-.3-.7l-7-7A.909.909 0 0 0 18 2H8a2.006 2.006 0 0 0-2 2v24a2.006 2.006 0 0 0 2 2h10zm0-23.6l5.6 5.6H18z",fill:"currentColor"},null,-1)]))}}),ni={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},It=e.defineComponent({name:"DocumentExport",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ni,o[0]||(o[0]=[e.createElementVNode("path",{d:"M13 21h13.17l-2.58 2.59L25 25l5-5l-5-5l-1.41 1.41L26.17 19H13v2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M22 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 14 2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H4V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L19.59 10z",fill:"currentColor"},null,-1)]))}}),li={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},St=e.defineComponent({name:"DocumentImport",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",li,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 19H14.83l2.58-2.59L16 15l-5 5l5 5l1.41-1.41L14.83 21H28v-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M24 14v-4a1 1 0 0 0-.29-.71l-7-7A1 1 0 0 0 16 2H6a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2h-2v2H6V4h8v6a2 2 0 0 0 2 2h6v2zm-8-4V4.41L21.59 10z",fill:"currentColor"},null,-1)]))}}),ri={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},fn=e.defineComponent({name:"Draggable",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ri,o[0]||(o[0]=[e.createStaticVNode('<path d="M10 6h4v4h-4z" fill="currentColor"></path><path d="M18 6h4v4h-4z" fill="currentColor"></path><path d="M10 14h4v4h-4z" fill="currentColor"></path><path d="M18 14h4v4h-4z" fill="currentColor"></path><path d="M10 22h4v4h-4z" fill="currentColor"></path><path d="M18 22h4v4h-4z" fill="currentColor"></path>',6)]))}}),ai={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},si=e.defineComponent({name:"ExpandAll",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ai,o[0]||(o[0]=[e.createElementVNode("path",{d:"M12 10h14a2.002 2.002 0 0 0 2-2V4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6V2H4v23a2.002 2.002 0 0 0 2 2h4v1a2.002 2.002 0 0 0 2 2h14a2.002 2.002 0 0 0 2-2v-4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6v-8h4v1a2.002 2.002 0 0 0 2 2h14a2.002 2.002 0 0 0 2-2v-4a2.002 2.002 0 0 0-2-2H12a2.002 2.002 0 0 0-2 2v1H6V7h4v1a2.002 2.002 0 0 0 2 2zm0-6h14l.001 4H12zm0 20h14l.001 4H12zm0-10h14l.001 4H12z",fill:"currentColor"},null,-1)]))}}),ii={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Bt=e.defineComponent({name:"Folder",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ii,o[0]||(o[0]=[e.createElementVNode("path",{d:"M11.17 6l3.42 3.41l.58.59H28v16H4V6h7.17m0-2H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2H16l-3.41-3.41A2 2 0 0 0 11.17 4z",fill:"currentColor"},null,-1)]))}}),ci={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},di=e.defineComponent({name:"FolderOpen",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ci,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 8h-7.172l-3.414-3.414A2 2 0 0 0 16 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2zM8 26V14h8v6.17l-2.59-2.58L12 19l5 5l5-5l-1.41-1.41L18 20.17V14a2.002 2.002 0 0 0-2-2H8a2.002 2.002 0 0 0-2 2v12H4V6h12l4 4h8v2h-6v2h6v12z",fill:"currentColor"},null,-1)]))}}),fi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},ui=e.defineComponent({name:"IbmCloudPakApplications",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",fi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M21 22h-6a2.002 2.002 0 0 1-2-2v-4a2.002 2.002 0 0 1 2-2h6a2.002 2.002 0 0 1 2 2v4a2.002 2.002 0 0 1-2 2zm-6-6v4h6v-4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M11 17H9v-5a2.002 2.002 0 0 1 2-2h6v2h-6z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16 31a.999.999 0 0 1-.504-.136l-12-7A1 1 0 0 1 3 23V9a1 1 0 0 1 .496-.864l12-7a1 1 0 0 1 1.008 0l12 7l-1.008 1.728L16 3.158L5 9.574v12.852l11 6.417l11-6.417V15h2v8a1 1 0 0 1-.496.864l-12 7A.999.999 0 0 1 16 31z",fill:"currentColor"},null,-1)]))}}),pi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},mi=e.defineComponent({name:"NewTab",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",pi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M26 26H6V6h10V4H6a2.002 2.002 0 0 0-2 2v20a2.002 2.002 0 0 0 2 2h20a2.002 2.002 0 0 0 2-2V16h-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M26 26H6V6h10V4H6a2.002 2.002 0 0 0-2 2v20a2.002 2.002 0 0 0 2 2h20a2.002 2.002 0 0 0 2-2V16h-2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M26 6V2h-2v4h-4v2h4v4h2V8h4V6h-4z",fill:"currentColor"},null,-1)]))}}),hi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},gi=e.defineComponent({name:"NotAvailable",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",hi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M4 15h10v2H4z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M18 15h10v2H18z",fill:"currentColor"},null,-1)]))}}),yi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},wi=e.defineComponent({name:"QrCode",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",yi,o[0]||(o[0]=[e.createStaticVNode('<path d="M24 28v-2h2v2z" fill="currentColor"></path><path d="M18 24v-2h2v2z" fill="currentColor"></path><path d="M18 30h4v-2h-2v-2h-2v4z" fill="currentColor"></path><path d="M26 26v-4h2v4z" fill="currentColor"></path><path d="M28 26h2v4h-4v-2h2v-2z" fill="currentColor"></path><path d="M26 20v-2h4v4h-2v-2h-2z" fill="currentColor"></path><path d="M24 20h-2v4h-2v2h4v-6z" fill="currentColor"></path><path d="M18 20v-2h4v2z" fill="currentColor"></path><path d="M6 22h4v4H6z" fill="currentColor"></path><path d="M14 30H2V18h12zM4 28h8v-8H4z" fill="currentColor"></path><path d="M22 6h4v4h-4z" fill="currentColor"></path><path d="M30 14H18V2h12zm-10-2h8V4h-8z" fill="currentColor"></path><path d="M6 6h4v4H6z" fill="currentColor"></path><path d="M14 14H2V2h12zM4 12h8V4H4z" fill="currentColor"></path>',14)]))}}),Ci={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},un=e.defineComponent({name:"Search",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Ci,o[0]||(o[0]=[e.createElementVNode("path",{d:"M29 27.586l-7.552-7.552a11.018 11.018 0 1 0-1.414 1.414L27.586 29zM4 13a9 9 0 1 1 9 9a9.01 9.01 0 0 1-9-9z",fill:"currentColor"},null,-1)]))}}),bi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},pn=e.defineComponent({name:"SearchLocate",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",bi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M30 28.586l-4.689-4.688a8.028 8.028 0 1 0-1.414 1.414L28.586 30zM19 25a6 6 0 1 1 6-6a6.007 6.007 0 0 1-6 6z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 12h8v2H2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 2h16v2H2z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M2 7h16v2H2z",fill:"currentColor"},null,-1)]))}}),ki={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ni=e.defineComponent({name:"SelectWindow",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",ki,o[0]||(o[0]=[e.createStaticVNode('<path d="M8 26H4a2.002 2.002 0 0 1-2-2v-4h2v4h4z" fill="currentColor"></path><path d="M2 12h2v4H2z" fill="currentColor"></path><path d="M26 8h-2V4h-4V2h4a2.002 2.002 0 0 1 2 2z" fill="currentColor"></path><path d="M12 2h4v2h-4z" fill="currentColor"></path><path d="M4 8H2V4a2.002 2.002 0 0 1 2-2h4v2H4z" fill="currentColor"></path><path d="M27 32a.997.997 0 0 1-.707-.293l-6.138-6.138l-3.323 4.986a1 1 0 0 1-1.79-.268l-6-20a1 1 0 0 1 1.245-1.245l20 6a1 1 0 0 1 .268 1.79l-4.986 3.323l6.138 6.138a1 1 0 0 1 0 1.414l-4 4A.997.997 0 0 1 27 32zm0-2.414L29.586 27l-7.155-7.155l5.246-3.498l-16.185-4.855l4.855 16.185l3.498-5.246z" fill="currentColor"></path>',6)]))}}),xi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ii=e.defineComponent({name:"TableBuilt",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",xi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M28 8h-4V4a2.002 2.002 0 0 0-2-2H4a2.002 2.002 0 0 0-2 2v18a2.002 2.002 0 0 0 2 2h4v4a2.002 2.002 0 0 0 2 2h18a2.002 2.002 0 0 0 2-2V10a2.002 2.002 0 0 0-2-2zm-6 14h-8v-5h8zm0-7h-8v-5h8zm-10 0H4v-5h8zM22 4v4H4V4zM4 22v-5h8v5zm24 6H10v-4h12a2.002 2.002 0 0 0 2-2V10h4z",fill:"currentColor"},null,-1)]))}}),Si={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Bi=e.defineComponent({name:"TagEdit",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Si,o[0]||(o[0]=[e.createElementVNode("path",{d:"M29.707 7.293l-3-3a1 1 0 0 0-1.414 0L16 13.586V18h4.414l9.293-9.293a1 1 0 0 0 0-1.414zM19.586 16H18v-1.586l5-5L24.586 11zM26 9.586L24.414 8L26 6.414L27.586 8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M10 14a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4zm0-6a2 2 0 1 0 1.998 2.004A2.002 2.002 0 0 0 10 8z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M27.006 14.235l-1.414 1.414L28 18.058L18.058 28L4 13.941V4h9.942l4.406 4.407l1.415-1.415l-4.407-4.406A2 2 0 0 0 13.94 2H4a2 2 0 0 0-2 2v9.941a2 2 0 0 0 .586 1.414l14.058 14.06a2.001 2.001 0 0 0 2.828 0l9.943-9.943a2.001 2.001 0 0 0 0-2.828z",fill:"currentColor"},null,-1)]))}}),Vi={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Mi=e.defineComponent({name:"Upload",render:function(l,o){return e.openBlock(),e.createElementBlock("svg",Vi,o[0]||(o[0]=[e.createElementVNode("path",{d:"M6 18l1.41 1.41L15 11.83V30h2V11.83l7.59 7.58L26 18L16 8L6 18z",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M6 8V4h20v4h2V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4z",fill:"currentColor"},null,-1)]))}}),Ti={style:{"min-height":"50px"}},Vt=e.defineComponent({__name:"ExportModal",props:{show:{type:Boolean},range:{},supportedFormats:{},supportedRanges:{}},emits:["export","close"],setup(t){const l=t,{t:o}=Z(),n=e.ref(null),r=e.ref(c()),a=e.ref(null),s=e.ref(m());function c(){let i=[{label:o("Excel"),value:"excel"},{label:o("Json"),value:"json"},{label:o("Text"),value:"text"},{label:o("XML"),value:"xml"}];const u=l.supportedFormats;return u&&(i=i.filter(g=>u.includes(g.value))),n.value=i.length?i[0].value:null,i}function m(){const i=l.supportedRanges||["empty","selection","page","all"],u=[{label:o("Selection"),value:"selection"},{label:o("Current Page"),value:"page"},{label:o("Search"),value:"search"},{label:o("All"),value:"all"},{label:o("Empty(Template)"),value:"empty"}].filter(g=>i.includes(g.value));return l.range?a.value=l.range:a.value=u.length?u[0].value:null,u}return e.watch(()=>l.range,i=>{i&&(a.value=i)}),(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{show:i.show,preset:"card",title:e.unref(o)("Export Options"),style:{"max-width":"400px"},draggable:"",onClose:u[4]||(u[4]=()=>i.$emit("close"))},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{onClick:u[2]||(u[2]=()=>i.$emit("export",n.value,a.value)),style:{"min-width":"100px"},type:"primary"},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(dn))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(o)("Export")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:u[3]||(u[3]=()=>i.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Ti,[r.value.length>1?(e.openBlock(),e.createBlock(e.unref(f.NFormItem),{key:0,label:e.unref(o)("File Format")},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSelect),{options:r.value,value:n.value,"onUpdate:value":u[0]||(u[0]=g=>n.value=g)},null,8,["options","value"])]),_:1},8,["label"])):e.createCommentVNode("",!0),s.value.length>1?(e.openBlock(),e.createBlock(e.unref(f.NFormItem),{key:1,label:e.unref(o)("Data Range")},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSelect),{options:s.value,value:a.value,"onUpdate:value":u[1]||(u[1]=g=>a.value=g)},null,8,["options","value"])]),_:1},8,["label"])):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"options")])]),_:3},8,["show","title"]))}}),Ai={class:"flex-column gap1",style:{"justify-content":"center","align-items":"center"}},mn=e.defineComponent({__name:"EmptyDetailView",props:{message:{default:"Please select a object."}},setup(t){const{t:l}=Z();return(o,n)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(e.unref(f.NIcon),{depth:5,size:48},{default:e.withCtx(()=>[e.createVNode(e.unref(Ni))]),_:1}),e.createVNode(e.unref(f.NText),{depth:"3",style:{opacity:"0.6"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)(o.message)),1)]),_:1})]))}}),Ei=e.defineComponent({components:{FullscreenIcon:Ba,ExitFullscreenIcon:Ia},emits:["change"],setup(t,l){const{t:o}=Z(),n=Ne(),r=e.computed(()=>n.isFullscreen);function a(i){i||(i=document.body),i.requestFullscreen&&i.requestFullscreen()}function s(){document.exitFullscreen&&document.exitFullscreen()}function c(i){var u;if(r.value)s();else{const g=(u=i.target)==null?void 0:u.closest(".fullscreen-view");a(g)}}function m(){const i=!!document.fullscreenElement;n.setIsFullscreen(i),l.emit("change",i)}return e.onMounted(()=>{document.addEventListener("fullscreenchange",m),document.addEventListener("mozfullscreenchange",m),document.addEventListener("webkitfullscreenchange",m),document.addEventListener("msfullscreenchange",m)}),{t:o,isFullscreen:r,toggleFullscreen:c}}});function _i(t,l,o,n,r,a){const s=e.resolveComponent("fullscreen-icon"),c=e.resolveComponent("exit-fullscreen-icon"),m=e.resolveComponent("n-icon"),i=e.resolveComponent("n-button");return e.openBlock(),e.createBlock(i,{onClick:t.toggleFullscreen},{icon:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(()=>[t.isFullscreen?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0})),t.isFullscreen?(e.openBlock(),e.createBlock(c,{key:1})):e.createCommentVNode("",!0)]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.t("Toggle Fullscreen")),1)]),_:1},8,["onClick"])}const hn=re(Ei,[["render",_i]]),Mt=t=>{const l=e.inject("axios"),o={},n=[],r=[];t.forEach(g=>{typeof g=="string"?(o[g]=!1,n.push(g)):(o[g.id]=!1,o[g.name]=!1,n.push(g.id),r.push(g))});let a=0;async function s(g){a||await m(g)}function c(){for(let g in o)o[g]=!1}async function m(g){c();const d=n.filter(h=>(h==null?void 0:h.length)==32);if(d.length)try{let h=await l.get(`/api/core/Account/CheckPermissions?permissions=${encodeURIComponent(d.join())}`);h.isSuccess&&h.value!=null?(a++,h.value.forEach(b=>{o[b]=!0;const x=r.find(I=>I.id==b);x&&(o[x.name]=!0)}),g==null||g.call(null,o)):console.error(h.errorMessage)}catch(h){console.error(h)}}function i(){for(let g in o)if(!o[g])return!1;return!0}function u(){for(let g in o)if(o[g])return!0;return!1}return{flags:o,check:m,checkOnce:s,all:i,any:u}},zi={key:0,class:"flex-row",style:{"align-items":"center","justify-content":"space-between",gap:"0.25em","margin-bottom":"1em"}},Li={style:{display:"grid","grid-template-columns":"auto 1fr",gap:"0.5em","margin-top":"1em","align-items":"center"}},gn=200,Tt=e.defineComponent({__name:"GridConfigModal",props:{gridId:{},show:{type:Boolean},pageSize:{},gridColumns:{}},emits:["close","update:pageSize","update:config"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=e.inject("axios"),c=f.useMessage(),m=Mt(["2E2466DDD34847C8B33460E4277A6528"]),i=e.ref(o.pageSize),u=e.ref(!1),g=e.ref(!1),d=N=>N?N.map((V,E)=>({columnId:V.name,title:V.title?r(V.title):r(te(V.name)),visible:!0,sortIndex:E})).sort((V,E)=>V.sortIndex-E.sortIndex):[],h=N=>(V,E)=>{let R=null;if(N=="visible"){const j=Oe(V[N]);R=e.h(f.NIcon,{size:"20"},{default:()=>j?e.h(sn):e.h(an)})}else N=="move_up"?R=e.h(f.NIcon,{size:"20"},{default:()=>e.h(Qs)}):N=="move_down"&&(R=e.h(f.NIcon,{size:"20"},{default:()=>e.h(Fs)}));return e.h(f.NButton,{text:!0,onClick:j=>{b(V,E,N),j.stopPropagation()}},{default:()=>R})};function b(N,V,E){switch(E){case"visible":N.visible=!N.visible;break;case"move_up":if(V>0&&T.value){const R=T.value.splice(V,1);T.value.splice(V-1,0,R[0])}break;case"move_down":if(T.value&&V<T.value.length-1){const R=T.value.splice(V,1);T.value.splice(V+1,0,R[0])}break}}const x=()=>{const N=o.gridId;N&&a.confirmToPost("Reset","Are you sure reset the configuration of this data grid?",{url:`/api/core/UserDataGrids/Reset?dataGridId=${N}`,successMessage:"The configuration has been reset, please refresh the page.",success:()=>{n("update:config",null)}})};async function I(){if(!o.gridId)return;const N={dataGridId:o.gridId,pageSize:i.value,columns:T.value.filter(V=>V.columnId).map((V,E)=>({columnId:V.columnId,visible:V.visible,sortIndex:E}))};N.pageSize&&(N.pageSize=Math.max(1,Math.min(gn,N.pageSize)));try{const V=u.value&&g.value,E=await s.post(`/api/core/UserDataGrids/Save?isDefault=${V}`,N);(E==null?void 0:E.isSuccess)==!0?(c.success(r("The configuration has been saved, please refresh the page.")),n("update:pageSize",i.value),n("update:config",N)):c.error((E==null?void 0:E.errorMessage)||r("Error"))}catch(V){c.error((V==null?void 0:V.toString())||r("Error"))}}async function F(){if(o.gridId&&T.value.length)try{const N=u.value&&g.value,V=await s.get(`/api/core/UserDataGrids/Entity?dataGridId=${encodeURIComponent(o.gridId)}?isDefault=${N}`);if(V!=null&&V.isSuccess)if(V.value){i.value=V.value.pageSize;for(const E of V.value.columns){const R=T.value.find(j=>j.columnId==E.columnId);R&&(R.visible=E.visible,R.sortIndex=E.sortIndex),T.value.sort((j,L)=>j.sortIndex-L.sortIndex)}}else T.value=d(o.gridColumns),i.value=o.pageSize;else console.log(V==null?void 0:V.errorMessage)}catch(N){console.log(N)}}e.watch(()=>o.show,N=>{N&&(m.checkOnce(V=>{g.value=V["2E2466DDD34847C8B33460E4277A6528"]}),F())}),e.watch(()=>o.gridColumns,()=>T.value=d(o.gridColumns)),e.watch(u,()=>F());const T=e.ref(d(o.gridColumns)),k=[{title:r("Name"),key:"title"},{title:r("Visible"),key:"visible",width:80,align:"center",fixed:"right",render:h("visible")},{key:"move_up",width:30,align:"center",fixed:"right",render:h("move_up")},{key:"move_down",width:30,align:"center",fixed:"right",render:h("move_down")},{key:"empty",width:20,fixed:"right"}];return(N,V)=>{const E=e.resolveComponent("n-space");return e.openBlock(),e.createBlock(e.unref(f.NModal),{show:N.show,preset:"card",title:e.unref(r)("Config Data Grid"),style:{"max-width":"500px"},draggable:"",onClose:V[3]||(V[3]=()=>N.$emit("close"))},{action:e.withCtx(()=>[e.createVNode(E,{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{onClick:I,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Save")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:x,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Reset")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:V[2]||(V[2]=()=>N.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[g.value?(e.openBlock(),e.createElementBlock("div",zi,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("System Default")),1),e.createVNode(e.unref(f.NSwitch),{value:u.value,"onUpdate:value":V[0]||(V[0]=R=>u.value=R)},null,8,["value"])])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.NDataTable),{columns:k,data:T.value,"max-height":450,size:"small"},null,8,["data"]),e.createElementVNode("div",Li,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Page Size")),1),e.createVNode(e.unref(f.NInputNumber),{value:i.value,"onUpdate:value":V[1]||(V[1]=R=>i.value=R),max:gn,min:1,style:{"max-width":"200px"}},null,8,["value"])])]),_:1},8,["show","title"])}}}),yn=e.defineComponent({__name:"HaloButtonSelect",props:{value:{},sourceUrl:{},additionalQuery:{},labelFormatter:{type:Function},keyField:{},labelField:{},subLabelField:{},size:{}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.inject("axios"),s=e.ref(!1),c=e.ref([]);async function m(u){let g=o.sourceUrl;if(g){const d=o.labelFormatter,h=o.keyField,b=o.labelField,x=o.subLabelField,I=o.additionalQuery;s.value=!0,c.value=[];try{I&&(g=U(g,I,!0));const F=await a.get(g);if(F.isSuccess&&F.value!=null){let T=F.value;if(!Array.isArray(T)&&"rows"in T&&Array.isArray(T.rows)&&(T=T.rows),Array.isArray(T)){const k=T.filter(N=>N&&!0).map(N=>{if(typeof N=="string")return{value:N,label:d?d(N):r(N)};{let V=N[b||"label"];if(d&&(V=d(V)),x){const E=N[x];typeof E=="string"&&(V+=" "+(d?d(E):E))}return{value:N[h||"value"],label:V}}});c.value=k}}}finally{s.value=!1}}}function i(u,g){n("update:value",u,g)}return e.watch(()=>o.sourceUrl,()=>m()),e.onMounted(()=>{m()}),(u,g)=>{const d=e.resolveComponent("n-radio-button"),h=e.resolveComponent("n-radio-group");return e.openBlock(),e.createBlock(h,{value:u.value,size:u.size,"onUpdate:value":i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,b=>(e.openBlock(),e.createBlock(d,{key:b.value,value:b.value,label:b.label},null,8,["value","label"]))),128))]),_:1},8,["value","size"])}}}),Ke=re(e.defineComponent({__name:"SearchForm",props:{searchItems:{},searchArgs:{},groupOptions:{},groupBy:{}},emits:["update:searchArgs","update:groupBy"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=e.inject("axios"),c=T=>T==null?void 0:T.map(k=>typeof k=="string"?{label:a(k),value:k}:k),m=()=>{const T=new Array;if(n.searchItems)for(const k of n.searchItems)if(typeof k=="string")T.push({name:k,label:te(k),editor:"text",nullable:!0,visibility:!0,searchMethod:"normal"});else{let N=k;k.searchField&&(N=Object.assign({},k),N.name=k.searchField),T.push(N)}return T},i=()=>{const T={};if(x.forEach(k=>{T[k.name]=null,k.searchMethod=="range"&&(T[k.name+"From"]=null,T[k.name+"To"]=null)}),n.searchArgs)for(const k in T)n.searchArgs[k]!=null&&(T[k]=n.searchArgs[k]);return T},u=()=>{for(const T in I)I[T]=null},g=async T=>{var N,V;const k=T.valueSource;if(k){if(k.type=="remote"&&k.sourceUrl)await Pe(s,k,null,E=>k.i18n?a(E):E,!1),T.nullable==!1&&((N=k.values)!=null&&N.length)&&(I[T.name]=k.values[0].value);else if(k.type=="function"&&k.func){k.isLoading=!0;try{const E=(V=k.func)==null?void 0:V.call(void 0);E&&(k.values=E)}finally{k.isLoading=!1}}}},d=()=>{var k;const T={};for(const N of x){const V=N.searchField??N.name;if(N.searchMethod=="range"){const E=h(V+"From",N);E!=null&&(T[V+"From"]=E);let R=h(V+"To",N);R!=null&&(N.editor=="date"&&typeof R=="string"&&(R=se(R,ge).add(1,"days").format(ge)),T[V+"To"]=R)}else{const E=h(V,N);E!=null&&(((k=N.role)==null?void 0:k.includes("list"))==!0&&typeof E=="string"?E.includes(",")?T[V]=E.split(","):T[V]=[E]:T[V]=E)}}return T},h=(T,k)=>{var V,E;let N=I[T];if(!(typeof N=="string"&&(N=N.trim(),N==""&&!k.valueSource))){if(Array.isArray((V=k.valueSource)==null?void 0:V.values)){const R=(E=k.valueSource)==null?void 0:E.values;if(R){if(R.some(j=>j.value==I[T]))N=I[T];else if(N=="")return;if(k.dataType=="boolean"){if(typeof N=="boolean")return N;const j=R.findIndex(L=>L.value==N);return j>-1&&(R.length==2?N=j==0:R.length==3&&j>0&&(N=j==1)),typeof N=="boolean"?N:Re(N,k.dataType,k.role)}}}return Re(N,k.dataType,k.role)}},b=()=>{r("update:searchArgs",d())},x=m(),I=e.reactive(i()),F=e.ref(c(n.groupOptions));return e.watch(()=>n.groupOptions,()=>F.value=c(n.groupOptions)),e.onMounted(()=>{i(),x.forEach(T=>{T.valueSource&&(T.valueSource.type=="remote"||T.valueSource.type=="function"?g(T):T.valueSource.type=="static")})}),l({reset:u,updateValues:b,pickValues:d}),(T,k)=>(e.openBlock(),e.createBlock(e.unref(f.NForm),{model:I,"label-placement":"left","label-width":"auto"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NGrid),{"x-gap":"12",cols:"1 700:2 1200:3"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),N=>(e.openBlock(),e.createBlock(e.unref(f.NGridItem),{key:N.name},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NFormItem),{label:e.unref(a)(N.label==null?N.name:N.label),path:N.name},{default:e.withCtx(()=>[N.searchMethod=="range"?(e.openBlock(),e.createBlock(e.unref(f.NInputGroup),{key:0},{default:e.withCtx(()=>[e.createVNode(Ve,{"form-item":N,value:I[N.name+"From"],"onUpdate:value":V=>I[N.name+"From"]=V,style:{"flex-grow":"1"},onInput:k[0]||(k[0]=()=>b())},null,8,["form-item","value","onUpdate:value"]),e.createVNode(e.unref(f.NInputGroupLabel),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("to")),1)]),_:1}),e.createVNode(Ve,{"form-item":N,value:I[N.name+"To"],"onUpdate:value":V=>I[N.name+"To"]=V,style:{"flex-grow":"1"},onInput:k[1]||(k[1]=()=>b())},null,8,["form-item","value","onUpdate:value"])]),_:2},1024)):(e.openBlock(),e.createBlock(Ve,{key:1,"form-item":N,value:I[N.name],"onUpdate:value":V=>I[N.name]=V,onInput:k[2]||(k[2]=()=>b())},null,8,["form-item","value","onUpdate:value"]))]),_:2},1032,["label","path"])]),_:2},1024))),128))]),_:1}),F.value?(e.openBlock(),e.createBlock(e.unref(f.NGrid),{key:0,"x-gap":"12",cols:"1 700:2 1200:3"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NGridItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NFormItem),{label:e.unref(a)("Group By")},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSelect),{value:T.groupBy,options:F.value,"onUpdate:value":k[3]||(k[3]=N=>T.$emit("update:groupBy",N))},null,8,["value","options"])]),_:1},8,["label"])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["model"]))}}),[["__scopeId","data-v-d6176d3f"]]),Di={class:"flex-row gap05"},At=e.defineComponent({__name:"TagsView",props:{tags:{},tagSource:{},size:{default:"small"}},setup(t){const l=t,o=Ne(),n=ie(),r=e.ref([]);async function a(){var c;const s=((c=l.tags)==null?void 0:c.map(m=>({value:m,text:m})))??[];if(r.value=s,l.tagSource){const m=await o.fetchSharedData(`tags:${l.tagSource}`,async()=>await n.get({url:`/api/core/CommonCodeItems/list?commonCode=${l.tagSource}`})??[]);for(const i of s){const u=m.find(g=>g.code==i.value);u&&(i.desc=u.name,i.color=u.color)}r.value=[...s]}}return e.watch(()=>l.tags,()=>a()),e.onMounted(()=>a()),(s,c)=>(e.openBlock(),e.createElementBlock("div",Di,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,m=>(e.openBlock(),e.createBlock(e.unref(f.NTag),{key:m.value,title:m.desc,color:{borderColor:m.color},size:s.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.text),1)]),_:2},1032,["title","color","size"]))),128))]))}}),We=e.defineComponent({__name:"HaloGrid",props:{keyField:{default:"__key__"},checkable:{type:Boolean,default:!0},dragSorting:{type:Boolean},columns:{},data:{},withEdit:{type:Boolean,default:!1},withDelete:{type:Boolean,default:!1},withDetails:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},maxHeight:{},height:{},selectedId:{},selectedIds:{},flexHeight:{type:Boolean,default:!0}},emits:["editRow","deleteRow","showDetails","columnButtonClick","update:selectedIds","update:selectedId","update:sorter","rowSorting"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=ce.useRouter(),c=yt(),m=e.ref(void 0),i=e.ref(F()),u=e.ref([]),g=e.ref(void 0),d=e.ref(h());function h(){const y={};return typeof n.height=="number"?y.height=`${n.height}px`:typeof n.height=="string"&&(y.height=n.height),y}function b(){var A;const y=u.value,B=(A=n.data)==null?void 0:A.filter(D=>y.includes(D[n.keyField]));r("update:selectedIds",y,B),y.length&&r("update:selectedId",y[0])}function x(y){return y[n.keyField]}function I(y,B){let A=0,D=0;for(const z of B){let P,Q;if(typeof z=="string")P={key:z,title:a(te(z))};else if(!(z.behavior=="none"||z.visible==!1))if(z.behavior=="link"||z.behavior=="router-link")P={key:z.name||`column_${A}`,title:z.title?a(z.title):void 0,align:z.align,fixed:z.fixed||void 0,width:z.width,sorter:z.sortable==!0,render:z.render||T(z)};else if(z.behavior=="button")P={key:z.name||`column_${A}`,title:z.title?a(z.title):void 0,align:z.align||"center",fixed:z.fixed||void 0,width:z.width,sorter:z.sortable==!0,render:z.render||T(z)};else{let v=z.align,ee=[];if(!z.display)switch(z.dataType){case"number":v=v||"right",Q=60,ee.push("text-num");break;case"boolean":v=v||"center",Q=60;break;case"date":Q=100;break;case"datetime":Q=180;break;case"timespan":v=v||"center",Q=80;break;case"time":Q=80,ee.push(`text-${z.dataType}`);break}if(P={key:z.name||`column_${A}`,title:z.title==null?a(te(z.name)):z?a(z.title):void 0,titleAlign:"center",align:v,width:z.width||Q,sorter:z.sortable==!0,minWidth:z.minWidth,resizable:!0,fixed:z.fixed,render:z.render||T(z)},typeof z.className=="string"?ee.push(z.className):Array.isArray(z.className)&&ee.push(...z.className),ee.length&&(P.className=ee.join(" ")),!P.width&&P.minWidth&&(P.width=P.minWidth),z.referencePage&&typeof P.width=="number"&&(P.width+=30),z.role&&z.role.includes("qr")&&typeof P.width=="number"&&(P.width+=30),z.role&&z.role.includes("percent")&&typeof P.width=="number"&&(P.width+=30,P.align||(P.align="right")),(z.textOverflow=="ellipsis"||z.textOverflow=="clip")&&(P.ellipsis={tooltip:!0},P.resizable=!0,Q||(Q=400)),z.children&&z.children.length){const oe=[];I(oe,z.children),P.children=oe,oe.some(ne=>ne.width)&&(P.width=void 0)}}P&&(y.push(P),typeof z=="object"&&typeof z.width=="number"?D+=z.width:D+=Q||150)}return D}function F(){if(n.columns){const y=[];let B=0;return n.checkable&&(y.push({type:"selection",fixed:"left"}),B+=30),B+=I(y,n.columns),n.withEdit&&(y.push({key:"btn-edit",width:30,fixed:"right",render(A,D){return e.h(f.NButton,{text:!0,titie:a("Edit"),onClick:z=>{r("editRow",A,D),z.stopPropagation()}},{default:()=>e.h(f.NIcon,{color:"#5C6BC0",size:"20"},{default:()=>e.h(Po)})})}}),B+=30),n.withDelete&&(y.push({key:"btn-delete",width:30,fixed:"right",render(A,D){return e.h(f.NButton,{text:!0,titie:a("Delete"),onClick:z=>{r("deleteRow",A,D),z.stopPropagation()}},{default:()=>e.h(f.NIcon,{color:"#f44336",size:"20"},{default:()=>e.h(jo)})})}}),B+=30),n.withDetails&&(y.push({key:"btn-details",width:30,fixed:"right",render(A,D){return e.h(f.NButton,{text:!0,titie:a("Details"),onClick:z=>{r("showDetails",A,D),z.stopPropagation()}},{default:()=>e.h(f.NIcon,{color:"#4CAF50",size:"20"},{default:()=>e.h(Ja)})})}}),B+=30),n.dragSorting&&(y.push({key:"drag-sorting-handler",width:30,fixed:"right",render(){return e.h(f.NIcon,{color:"#90A4AE",size:"20",class:"drag-sorting-handle"},{default:()=>e.h(fn)})}}),B+=30),m.value=B,y}else return[]}function T(y){return(B,A)=>{var ee,oe,ne;let D=null;const z=y.display||y.name;if(y.template&&typeof y.template=="function")D=y.template.call(null,B,A);else if(y.dataType=="bool"||y.dataType=="boolean"){const W=Oe(B[z]);if(y.values&&y.values.length>1)return y.i18n?a(W?y.values[0]:y.values[1]):W?y.values[0]:y.values[1];W!=null?D=e.h(f.NIcon,{size:"20",class:W?"cell-checked":"cell-unchecked"},{default:()=>W?e.h(qs):e.h(gi)}):D=e.h("span")}else if(y.dataType=="date")D=zo(Vo(B[z]));else if(y.dataType=="time")D=_o(To(B[z]));else if(y.dataType=="timespan")D=Lo(B[z]);else{let W=B[z];y.formatter?W=y.formatter(W,B):y.template&&(W=Ce.render(y.template,B)),typeof W=="string"&&(y.prefix&&(W=y.prefix+W),y.suffix&&(W=W+y.suffix),y.i18n&&(W=a(W))),D=W}let P=y.role;if(P&&!Array.isArray(P)&&(P=[P]),P!=null&&P.length)if(P.includes("tag")){let W;Array.isArray(B[z])?W=B[z]:W=(ne=(oe=(ee=B[z])==null?void 0:ee.toString())==null?void 0:oe.split(","))==null?void 0:ne.filter(K=>K.length),W&&W.length&&(D=e.h(At,{tags:W,tagSource:y.tagSource},{}))}else D&&(D=e.h("span",{class:P.map(W=>{switch(W){case"status":return`status-tag status-${B[z]}`;default:return`halo-form-${W}`}}).join(" ")},[D]));const Q=typeof y.href=="function"?y.href(B):y.href;if(y.behavior=="link")Q?D=e.h("a",{href:Ce.render(Q,B),target:"_blank"},[D]):D=e.h("a",{href:"#",onClick:W=>{var K;r("columnButtonClick",y.name,B,A),(K=y==null?void 0:y.click)==null||K.call(null,B,A),W.stopPropagation()}},[D]);else if(y.behavior=="router-link"&&Q){const W=D;D=e.h(ce.RouterLink,{to:Ce.render(Q,B)},{default:()=>W})}else if(y.behavior=="button"){const W=D;D=e.h(f.NButton,{size:"tiny",tag:"a",onClick:K=>{var fe;r("columnButtonClick",y.name,B,A),(fe=y==null?void 0:y.click)==null||fe.call(null,B,A),K.stopPropagation()}},{default:()=>W})}const v=[];if(y.role&&(y.role.includes("qr")&&v.push(e.h(f.NButton,{quaternary:!0,size:"tiny",class:"btn-cell-qr",title:a("QR Code"),onClick:()=>N(y,A)},{default:()=>e.h(f.NIcon,{},{default:()=>e.h(wi)})})),y.role.includes("percent"))){const W=Oo(B[z]);v.push(e.h(f.NProgress,{showIndicator:!1,type:"circle",status:W&&W>100?"error":"success",percentage:W||0,class:"percent-mark",style:"width: 1em; margin-bottom: auto; margin-top: auto"}))}return y.referencePage&&v.push(e.h(f.NButton,{quaternary:!0,size:"tiny",class:"btn-cell-ref",title:a("Details"),onClick:()=>k(y,A)},{default:()=>e.h(f.NIcon,{},{default:()=>e.h(un)})})),v.length?e.h("div",{style:"display: flex; justify-content: space-between;"},[e.h("div",{style:"flex-shrink: 1; flex-grow: 1; overflow: hidden;"},[D]),e.h("div",{},...v)]):D}}function k(y,B){if(Array.isArray(n.data)&&B!=null&&B>=0&&B<n.data.length&&y.referencePage){const A=n.data[B],D=Ce.render(y.referencePage,A);D.startsWith("/")&&s.push({path:D})}}function N(y,B){if(Array.isArray(n.data)&&B!=null&&B>=0&&B<n.data.length){const A=n.data[B][y.name];if(typeof A=="string"){const D=a(y.title??te(y.name));c.showQrModal(A,D)}}}function V(y,B){return{onClick:A=>{if(A.target instanceof HTMLElement&&A.target.classList.contains("n-checkbox-box__border")==!1){const D=x(y);D!==void 0&&!u.value.includes(D)&&(u.value=[D],b())}},ondblclick:A=>{A.target instanceof HTMLTableCellElement&&r("editRow",y,B)}}}function E(y,B){B!=!1||!n.multiSelect?(u.value=[y],b()):u.value.includes(y)||(u.value.push(y),b())}function R(y,B){if(B!=!1||!n.multiSelect)u.value=y,b();else{const A=u.value.slice();for(const D of y)A.includes(D)||A.push(D);u.value.length<A.length&&(u.value=A,b())}}function j(y){n.multiSelect?u.value=y:u.value=y.slice(0,1),b()}function L(){return u.value}function H(y,B){Array.isArray(n.data)&&y>-1&&ln(n.data,y,B)}function S(){var A;const y=(A=g.value)==null?void 0:A.$el,B=y==null?void 0:y.querySelector("tbody.n-data-table-tbody");if(B&&Array.isArray(n.data)){const D=e.ref(n.data);Wt.useDraggable(B,D,{animation:150,ghostClass:"draging-ghost",handle:".drag-sorting-handle",onUpdate(z){var v;const P=z.oldIndex,Q=z.newIndex;if(P!=null&&Q!=null&&n.data&&P<((v=n.data)==null?void 0:v.length)){const ee=n.data[P];console.log(P,Q,ee==null?void 0:ee.id),r("rowSorting",{oldIndex:P,newIndex:Q,source:ee,updateGrid:()=>H(P,Q)})}}})}}return e.watch(()=>n.data,y=>{const A=y.map(D=>D[n.keyField]);u.value=u.value.filter(D=>A.includes(D)),b()}),e.watch(()=>n.columns,()=>i.value=F()),e.watch(()=>n.height,()=>d.value=h()),e.onMounted(()=>{n.dragSorting&&setTimeout(()=>{S()},500)}),l({selectRow:E,selectRows:R,getSelectedRowKeys:L}),(y,B)=>(e.openBlock(),e.createBlock(e.unref(f.NDataTable),{ref_key:"nTableRef",ref:g,columns:i.value,data:y.data,size:"small","row-key":x,"row-props":V,loading:y.loading,"single-line":!1,"max-height":y.maxHeight,"scroll-x":m.value,striped:"",remote:"","flex-height":y.flexHeight,style:e.normalizeStyle(d.value),"checked-row-keys":u.value,"onUpdate:checkedRowKeys":[B[0]||(B[0]=A=>u.value=A),j],"scrollbar-props":{trigger:"none"},"onUpdate:sorter":B[1]||(B[1]=A=>y.$emit("update:sorter",A))},null,8,["columns","data","loading","max-height","scroll-x","flex-height","style","checked-row-keys"]))}}),$i={class:"flex-column gap05"},Oi={class:"flex-row gap05",style:{"justify-content":"space-between"}},Ze=e.defineComponent({__name:"SearchPanel",props:{title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean},additionQuery:{}},emits:["searchBack","resultSelected"],setup(t,{expose:l,emit:o}){const n=t,r=o,{t:a}=Z(),s=f.useMessage(),c=e.inject("axios"),m=e.ref(null),i=e.ref(1),u=e.ref(0),g=e.ref(!1),d=e.ref(Array()),h=e.ref(Array());let b=!0;function x(V){if(V){const E=V.rows;E.forEach((R,j)=>{R.__key__=j}),d.value=E,u.value=V.pageCount||1,i.value=V.pageIndex+1}}function I(){d.value=[],u.value=0,i.value=1}function F(V){T(V)}async function T(V){var j,L,H;const E=((j=m.value)==null?void 0:j.pickValues())||{},R=(L=n.config)==null?void 0:L.searchAction;if(E&&R){const S={pageSize:((H=n.config)==null?void 0:H.pageSize)||10,pageIndex:(V||i.value)-1};Object.assign(S,E),n.additionQuery&&(typeof n.additionQuery=="function"?Object.assign(S,n.additionQuery.call(null)):Object.assign(S,n.additionQuery));try{g.value=!0;const y=await c.post(R,S);y.isSuccess&&y.value!=null?(b=!1,x(y.value)):s.error(a(y.errorMessage||"Error"))}catch(y){s.error(y==null?void 0:y.toString())}finally{g.value=!1}}}function k(){const V=h.value;if(V!=null&&V.length){const E=d.value.filter(R=>V.includes(R.__key__));r("searchBack",E,n.config),n.autoClose==!0&&close()}}function N(){n.searchOnMounted&&b&&T(1)}return e.watch(()=>n.config,V=>{V&&(b=!0),I()}),e.onMounted(()=>N()),l({searchPage:T,returnAndClose:k}),(V,E)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createVNode(Ke,{ref_key:"searchFormRef",ref:m,cols:2,"search-items":V.config.searchFields},null,8,["search-items"]),e.createElementVNode("div",Oi,[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:E[0]||(E[0]=()=>T(1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Search")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:E[1]||(E[1]=()=>{var R;return(R=m.value)==null?void 0:R.reset()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Reset")),1)]),_:1})]),e.createVNode(We,{class:"flex-grow-1",style:{height:"200px"},columns:V.config.gridColumns,loading:g.value,data:d.value,multiSelect:V.multiSelect,selectedIds:h.value,"onUpdate:selectedIds":[E[2]||(E[2]=R=>h.value=R),E[3]||(E[3]=(R,j)=>V.$emit("resultSelected",R,j))],onDblclickRow:E[4]||(E[4]=R=>V.$emit("searchBack",[R]))},null,8,["columns","loading","data","multiSelect","selectedIds"]),e.createVNode(e.unref(f.NPagination),{page:i.value,"onUpdate:page":[E[5]||(E[5]=R=>i.value=R),F],"page-count":u.value,"show-quick-jumper":"",style:{"align-self":"self-end"}},null,8,["page","page-count"])]))}}),Ri={key:0,class:"flex-column flex-grow-1"},ji={class:"flex-row",style:{"align-items":"center"}},Pi={style:{"margin-left":"0.5em"}},Fi={class:"flex-row",style:{"justify-content":"space-between"}},Et=e.defineComponent({__name:"SearchModal",props:{show:{type:Boolean},width:{},height:{},title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean,default:!1},additionQuery:{}},emits:["searchBack","update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(void 0);let s=!0;const c=e.ref([]);function m(d,h){c.value=h??[]}function i(d){d&&d.length&&n("searchBack",d,o.config)}function u(){c.value&&c.value.length&&(n("searchBack",c.value,o.config),o.autoClose==!0&&g())}function g(){n("update:show",!1)}return e.watch(()=>o.config,d=>{d&&(s=!0)}),e.watch(a,()=>{var d;o.searchOnMounted&&s&&(s=!1,(d=a.value)==null||d.searchPage(1))}),e.watch(()=>o.show,d=>{var h;d&&o.searchOnMounted&&s&&(s=!1,(h=a.value)==null||h.searchPage(1))}),(d,h)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{show:d.show,style:e.normalizeStyle({width:d.width??"900px",height:d.height??"650px"}),preset:"card","display-directive":"show","content-class":"flex-column",onClose:h[0]||(h[0]=()=>g())},{header:e.withCtx(()=>[e.createElementVNode("div",ji,[e.createVNode(e.unref(f.NIcon),{color:"#3F51B5",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createElementVNode("span",Pi,e.toDisplayString(e.unref(r)(d.title)),1)])]),action:e.withCtx(()=>[e.createElementVNode("div",Fi,[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:u},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})])]),default:e.withCtx(()=>[d.config?(e.openBlock(),e.createElementBlock("div",Ri,[e.createVNode(Ze,{ref_key:"searchPanelRef",ref:a,class:"flex-grow-1",config:d.config,"multi-select":d.multiSelect,"auto-close":d.autoClose,"addition-query":d.additionQuery,onResultSelected:m,onSearchBack:i},null,8,["config","multi-select","auto-close","addition-query"])])):e.createCommentVNode("",!0)]),_:1},8,["show","style"]))}}),Hi={style:{"margin-bottom":"12px","min-height":"100px"}},Qe=re(e.defineComponent({__name:"ImportModal",props:{title:{default:"Import File"},multiple:{type:Boolean},action:{},accept:{},show:{type:Boolean},timeout:{},additionParams:{},templateCode:{},templateUrl:{},beforeUpload:{},disabled:{type:Boolean}},emits:["uploaded","update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=f.useMessage(),s=f.useLoadingBar(),c=e.inject("axios"),m=ie(),i=e.reactive({}),u=e.ref(!1),g=e.ref(new Array),d=e.ref(!1),h=e.ref(void 0),b=e.ref(x());function x(){if(o.templateUrl)return o.templateUrl;if(o.templateCode)return`/api/core/DataExchangeTemplates/ImportTemplate?templateCode=${o.templateCode}`}async function I(){var N;if(d.value)return a.warning("Is uploading..."),!1;let k=typeof o.action=="function"?o.action.call(void 0):o.action;if(k&&o.templateCode&&(k=U(k,{templateCode:o.templateCode})),(N=g.value)!=null&&N.length&&k){if(!o.multiple&&g.value.length>1)return a.error("Only one file can be uploaded."),!1;if(o.beforeUpload&&o.beforeUpload.call(null,{files:g})==!1)return!1;try{d.value=!0;const V=g.value.filter(E=>E.status=="pending"||E.status=="error").map(E=>F(E,k));await Promise.all(V),g.value.every(E=>E.status=="finished")&&(g.value.length=0,a.success(r("Upload Success.")),u.value=!1)}catch(V){h.value=(V==null?void 0:V.toString())||r("Error")}finally{d.value=!1}}}async function F(k,N){const V=new FormData;V.append("file",k.file);const E={timeout:o.timeout||1e3*60*10,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:j=>{k.percentage=Math.round(j.loaded*100/j.total)}};k.percentage=0,k.status="uploading";let R=N;o.additionParams&&(R=U(N,o.additionParams)),i&&(R=U(R,i));try{const j=await c.post(R,V,E);j.isSuccess?(k.status="finished",n("uploaded",j.value),n("update:show",!1)):(k.status="error",k.errorMessage=j.errorMessage,h.value=r(j.errorMessage||"Error"))}catch(j){k.status="error",k.errorMessage=j==null?void 0:j.toString(),h.value=(j==null?void 0:j.toString())||r("Error")}}async function T(){const k=b.value;if(k)try{s.start(),await me(k)}catch(N){a.error(await m.getHttpErrorMessage(N,"Error"))}finally{s.finish()}}return e.watch(()=>o.show,()=>{h.value=void 0,g.value=[]}),(k,N)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{show:k.show,"onUpdate:show":N[3]||(N[3]=V=>k.$emit("update:show",V)),preset:"card",title:e.unref(r)(k.title),style:{"max-width":"600px"},draggable:""},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px"},onClick:I,disabled:k.disabled||!k.action||d.value},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Mi))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Upload")),1)]),_:1},8,["disabled"]),e.createVNode(e.unref(f.NSpace),null,{default:e.withCtx(()=>[b.value?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,style:{"min-width":"100px"},onClick:T},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(dn))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Download Template")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:N[2]||(N[2]=()=>k.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpin),{show:d.value},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NUpload),{multiple:k.multiple,"default-upload":!1,"file-list":g.value,"onUpdate:fileList":N[0]||(N[0]=V=>g.value=V),accept:k.accept,disabled:!k.action,"show-retry-button":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NUploadDragger),null,{default:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(e.unref(f.NIcon),{size:"48",depth:3},{default:e.withCtx(()=>[e.createVNode(e.unref(va))]),_:1})]),e.createVNode(e.unref(f.NText),{style:{"font-size":"16px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Click or drag files to this area to upload.")),1)]),_:1})]),_:1})]),_:1},8,["multiple","file-list","accept","disabled"]),e.renderSlot(k.$slots,"options",{options:i},void 0,!0)]),_:3})]),_:3},8,["show"]),h.value?(e.openBlock(),e.createBlock(e.unref(f.NAlert),{key:0,type:"error",class:"my-1",closable:"",onClose:N[1]||(N[1]=()=>h.value=void 0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):e.createCommentVNode("",!0)]),_:3},8,["show","title"]))}}),[["__scopeId","data-v-18129d6e"]]),_t=e.defineComponent({__name:"InputModal",props:{title:{},message:{},value:{},placeholder:{},maxLength:{},type:{},lines:{},clearable:{type:Boolean},show:{type:Boolean},submitting:{type:Boolean}},emits:["close","commit","update:show","update:value"],setup(t,{emit:l}){var m;const o=t,n=l,{t:r}=Z(),a=e.ref((m=o.value)==null?void 0:m.toString()),s=()=>{n("close"),n("update:show",!1)},c=()=>{n("commit",a.value),n("update:value",a.value)};return e.watch(()=>o.value,i=>a.value=i==null?void 0:i.toString()),(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{title:i.title,show:i.show,preset:"card",style:{width:"400px"},onClose:s},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},loading:i.submitting,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["loading"]),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpin),{show:i.submitting},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:""},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.message),1)]),_:1}),e.createVNode(e.unref(f.NInput),{value:a.value,"onUpdate:value":u[0]||(u[0]=g=>a.value=g),placeholder:i.placeholder,maxlength:i.maxLength,type:i.type,rows:i.lines,clearable:i.clearable},null,8,["value","placeholder","maxlength","type","rows","clearable"])]),_:1})]),_:1},8,["show"])]),_:1},8,["title","show"]))}}),Gi={key:0,class:"flex-row",style:{"align-items":"center","justify-content":"space-between",gap:"0.25em","margin-bottom":"1em"}},Ki={key:1},Wi={class:"flex-row gap05"},Zi={style:{display:"grid","grid-template-columns":"auto 1fr",gap:"0.5em","align-items":"center"}},Qi={class:"flex-row gap05",style:{"justify-content":"space-between"}},wn=200,Yi=e.defineComponent({__name:"GridConfigBox",props:{gridId:{},pageSize:{},gridColumns:{}},emits:["close","reset","update:pageSize","update:config"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=Mt(["2E2466DDD34847C8B33460E4277A6528"]),c=ce.useRouter(),m=e.ref(o.pageSize),i=e.ref(!1),u=e.ref(!1),g=e.ref(void 0),d=e.ref(void 0),h=e.ref(!1),b=e.ref(!1),x=S=>S?S.map((y,B)=>({columnId:y.name,title:y.title?r(y.title):r(te(y.name)),visible:!0,sortIndex:B})).sort((y,B)=>y.sortIndex-B.sortIndex):[],I=e.ref(x(o.gridColumns)),F=()=>{const S=o.gridId;if(!S)return;const B=i.value&&u.value?`/api/core/UserDataGrids/ResetGlobal?dataGridId=${S}`:`/api/core/UserDataGrids/Reset?dataGridId=${S}`;a.confirmToPost("Reset","Are you sure reset the configuration of this data grid?",{url:B,successMessage:"The configuration has been reset, please refresh the page.",success:()=>{n("reset")}})},T=()=>{if(!o.gridId)return;const S={dataGridId:o.gridId,pageSize:m.value,columns:I.value.filter(A=>A.columnId).map(A=>({columnId:A.columnId,visible:A.visible,customTitle:A.customTitle,sortIndex:A.sortIndex}))};S.pageSize&&(S.pageSize=Math.max(1,Math.min(wn,S.pageSize)));const y=i.value&&u.value,B=y?`/api/core/UserDataGrids/SaveGlobal?isDefault=${y}`:`/api/core/UserDataGrids/Save?isDefault=${y}`;a.post({url:B,data:S,successMessage:"The configuration has been saved, please refresh the page.",success:()=>{n("update:pageSize",m.value),n("update:config",S)}})},k=()=>{if(!o.gridId||!I.value.length)return;const S=i.value&&u.value;a.get({url:`/api/core/UserDataGrids/${encodeURIComponent(o.gridId)}?isDefault=${S}`,callback:y=>{if(y){m.value=y.pageSize;for(const B of y.columns){const A=I.value.find(D=>D.columnId==B.columnId);A&&(A.visible=B.visible,A.sortIndex=B.sortIndex,A.customTitle=B.customTitle),I.value.sort((D,z)=>D.sortIndex-z.sortIndex)}}else I.value=x(o.gridColumns),m.value=o.pageSize}})},N=()=>{var B;const S=(B=g.value)==null?void 0:B.$el,y=S==null?void 0:S.querySelector("tbody.n-data-table-tbody");y&&I&&Wt.useDraggable(y,I,{animation:150,ghostClass:"draging-ghost",handle:".drag-sorting-handle",onUpdate:()=>{const A=I.value;for(let D=0;D<A.length;D++)A[D].sortIndex=D;console.log(I.value)}})},V=S=>{var y;h.value=!1,d.value&&(d.value.customTitle=S,i.value&&a.post({url:"/api/core/UserDataGrids/UpdateCustomTitleGlobal",data:{dataGridId:o.gridId,columnId:(y=d.value)==null?void 0:y.columnId,customTitle:S}}))},E=()=>{o.gridId&&a.downloadFile({url:`/api/core/UserDataGrids/export?dataGridId=${encodeURIComponent(o.gridId)}`})},R=S=>e.h("div",{class:"flex-row gap05"},[S.customTitle?e.h("span",null,`${S.customTitle} (${S.title})`):e.h("span",null,`${S.title}`),e.h(f.NButton,{text:!0,title:r("Edit"),class:"edit-title-btn",onClick:()=>{d.value=S,h.value=!0}},{default:()=>e.h(f.NIcon,{size:16},{default:()=>e.h(Bi)})})]),j=S=>e.h(f.NButton,{text:!0,onClick:y=>{S.visible=!S.visible,y.stopPropagation()}},{default:()=>e.h(f.NIcon,{size:20},{default:()=>S.visible?e.h(sn):e.h(an)})}),L=()=>{var y;const S={dataGridId:o.gridId,pageSize:o.pageSize,columns:(y=o.gridColumns)==null?void 0:y.map(B=>({columnId:B.name,sortIndex:B.sortIndex,visible:B.visible,title:B.title}))};S.dataGridId&&a.post({url:"/api/core/DataGrids/getOrCreate",data:S,success:B=>{B&&c.push({name:"DataGrid",params:{id:B}})}})},H=[{title:r("Name"),key:"title",render:R},{title:r("Visible"),key:"visible",width:80,align:"center",fixed:"right",render:j},{width:30,align:"center",fixed:"right",render:()=>e.h(f.NIcon,{color:"#90A4AE",size:"20",class:"drag-sorting-handle"},{default:()=>e.h(fn)})},{key:"empty",width:20,fixed:"right"}];return e.watch(()=>o.gridColumns,()=>I.value=x(o.gridColumns)),e.watch(i,()=>k()),e.watch(I,()=>N()),e.onMounted(()=>{setTimeout(()=>{N()},500),s.checkOnce(S=>{u.value=S["2E2466DDD34847C8B33460E4277A6528"]})}),(S,y)=>{var B;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"grid-config-global-mode":i.value},"flex-column gap05"])},[u.value?(e.openBlock(),e.createElementBlock("div",Gi,[e.createVNode(e.unref(f.NButton),{onClick:L},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("System Default")),1)]),_:1})])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",Ki,[e.createElementVNode("div",Wi,[e.createVNode(e.unref(f.NButton),{onClick:y[0]||(y[0]=()=>b.value=!0)},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(St))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Import")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(It))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("Export")),1)]),_:1})])])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.NDataTable),{ref_key:"nTableRef",ref:g,columns:H,data:I.value,"max-height":"60vh",size:"small"},null,8,["data"]),e.createElementVNode("div",Zi,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Page Size")),1),e.createVNode(e.unref(f.NInputNumber),{value:m.value,"onUpdate:value":y[1]||(y[1]=A=>m.value=A),max:wn,min:1,style:{"max-width":"200px"}},null,8,["value"])]),e.createVNode(_t,{show:h.value,"onUpdate:show":y[2]||(y[2]=A=>h.value=A),value:((B=d.value)==null?void 0:B.customTitle)??"",title:e.unref(r)("Custom Title"),clearable:"","onUpdate:value":V},null,8,["show","value","title"]),e.createVNode(Qe,{show:b.value,"onUpdate:show":y[3]||(y[3]=A=>b.value=A),action:"/api/UserDataGrids/Import",onUploaded:y[4]||(y[4]=()=>k())},null,8,["show"]),e.createElementVNode("div",Qi,[e.createVNode(e.unref(f.NButton),{onClick:T,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Save")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:F,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Reset")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:y[5]||(y[5]=()=>S.$emit("close")),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})])],2)}}}),Ji=t=>{const l=f.useModal(),{t:o}=Z(),n=ie();return{showConfigModal:s=>{const c=t.gridId??s.gridId;if(!c)return;const m=l.create({title:o("Config Data Grid"),preset:"card",contentClass:"flex-column",style:"width: 500px;",draggable:!0,content:()=>e.h(Yi,{gridId:c,pageSize:s.pageSize,gridColumns:s.gridColumns,class:"flex-grow-1",onClose:()=>m.destroy(),onReset:()=>{var i;(i=t.onReset)==null||i.call(null),m.destroy()},"onUpdate:pageSize":i=>{var u;i>0&&((u=t.onPageSizeChanged)==null||u.call(null,i))},"onUpdate:config":i=>{var u;(u=t.onConfigChanged)==null||u.call(null,i),m.destroy()}})})},loadGridConfig:s=>{t.gridId&&n.get({url:`/api/core/UserDataGrids/Entity?dataGridId=${encodeURIComponent(t.gridId)}`,callback:c=>{var m;(m=t.onConfigChanged)==null||m.call(null,c),s==null||s.call(null,c)}})}}},Xi={class:"flex-column flex-grow-1",style:{gap:"0.25em"}},qi={key:0,class:"flex-row",style:{"justify-content":"space-between"}},Ui={style:{"margin-left":"8px"}},vi={style:{display:"flex"}},ec={style:{"flex-grow":"1"}},Cn=e.defineComponent({__name:"HaloForm",props:{name:{},autoLoad:{type:Boolean,default:!0},columns:{},keys:{default:"id"},allowNew:{type:Boolean,default:!0},allowEdit:{type:Boolean,default:!0},searchAction:{},getListAction:{},getEntityAction:{},initEntityAction:{},deleteAction:{},deleteBatchAction:{},deleteMethod:{default:"DELETE"},saveAction:{},exportAction:{},importAction:{},detailsPage:{},detailsPageName:{},detailsKeys:{},dataExchangeCode:{},exportFormats:{},exportRanges:{},exportOptions:{},importOptions:{},importTimeout:{},importTemplateCode:{},gridMaxHeight:{},gridHeight:{},gridCheckable:{type:Boolean,default:!0},gridDragSorting:{type:Boolean},chainCreating:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},pageSize:{default:20},multiSelect:{type:Boolean,default:!0},quickSearch:{type:Boolean,default:!0},gridFlexHeight:{type:Boolean,default:!0},parentKey:{},parentValue:{},verifyParentKey:{type:[Boolean,Function]},selectedId:{},selectedIds:{},modalColumns:{},modalStyle:{},formGroupLayout:{},enctype:{},batchAdds:{},beforeSave:{},defaultSearchArgs:{},extendedMenus:{},additionKeys:{},searchGroupOptions:{},defaultSortBy:{},defaultSortDirection:{},propertyModal:{}},emits:["update:selectedIds","update:selectedId","update:data","columnButtonClick","saved","beforeShow","itemChange","commitEdit","extendedMenuSelect","beforeRenderPage","searchReturn","rowSorting"],setup(t,{expose:l,emit:o}){var cl;const n=t,r=o,{t:a}=Z(),s=e.inject("axios"),c=e.ref(Array()),m=f.useDialog(),i=f.useMessage(),u=f.useLoadingBar(),g=ce.useRouter(),d=e.ref(Uo(n.columns||[],a)),h=e.ref(Be(n.columns||[])),b=e.ref(vo(n.columns||[],a));let x=1;const I=e.ref(1),F=e.ref(0),T=e.ref(0),k=e.ref(n.pageSize),N=e.ref(!0),V=e.ref(!1),E=e.ref(!1),R=e.ref(""),j=e.ref(n.searchAction&&((cl=n.columns)==null?void 0:cl.some(p=>Se(p)&&p.search))),L=e.ref(j.value&&!n.getListAction),H=e.ref(L.value&&!0),S=e.ref(!1),y=e.ref(null),B=e.ref(null),A=e.ref(new Array),D=e.ref(!1),z=e.ref(void 0),P=e.ref(void 0),Q=e.ref(void 0),v=e.ref(!1),ee=e.ref(n.readOnly),oe=e.ref(a("Property")),ne=e.ref(!1),W=e.ref(!1);let K;const fe=e.ref([]),Dt=e.ref(Ot("page")),Hn=e.ref(Zc()),$t=e.ref(void 0),he=e.ref([]),Me=e.ref(void 0),Je=e.ref(!1);let ye;const Gn=e.ref(void 0),we=e.ref(void 0),Te=e.ref(void 0);let ze=[],Le=0;const Wc=e.ref({width:Qc(n.modalColumns)});function Zc(){var w;const p={};if(n.defaultSearchArgs)for(const C in n.defaultSearchArgs)p[C]=n.defaultSearchArgs[C];return(w=b.value)==null||w.forEach(C=>{C.defaultValue!=null&&(C.searchMethod=="range"?Array.isArray(C.defaultValue)&&(C.defaultValue.length>0&&C.defaultValue[0]!=null&&(p[`${C.name}From`]=C.defaultValue[0]),C.defaultValue.length>1&&C.defaultValue[1]!=null&&(p[`${C.name}To`]=C.defaultValue[1])):p[C.name]=C.defaultValue)}),p}function Ot(p){return n.exportRanges&&n.exportRanges.length&&!n.exportRanges.includes(p)?n.exportRanges[0]:p}function Qc(p){return p?p>4?"100%":p>1?450*p+"px":"600px":"600px"}function Xe(p){if(n.keys){if(typeof n.keys=="string")return p[n.keys];if(n.keys.length==1&&typeof n.keys[0]=="string")return p[n.keys[0]];if(n.keys.length>1)return n.keys.map(w=>p[w]).join()}return""}function qe(p){if(p.__key__=Xe(p),n.columns)for(const w of n.columns){let C;if(typeof w=="string")C=w;else if(Se(w))C=w.name;else continue;C&&!(C in p)&&(p[C]=null)}}function Kn(p){if(p){r("beforeRenderPage",{data:p});const C=p.rows;C.forEach(_=>qe(_)),c.value=C,r("update:data",c.value),T.value=p.totalRecords||0,F.value=p.pageCount||1,I.value=p.pageIndex+1,N.value=!0}}function Wn(p){if(p){const w={data:p};r("beforeRenderPage",w),p=w.data,p.forEach(C=>qe(C)),c.value=p,r("update:data",c.value),F.value=1,I.value=1,N.value=!1}}async function ue(p){var w,C;if(!(V.value||n.disabled)&&n.getListAction){const _={pageSize:k.value,pageIndex:p},$=(w=R.value)==null?void 0:w.trim();if(n.quickSearch&&$&&(_.searchWords=$),n.additionKeys&&Object.assign(_,n.additionKeys),n.parentKey&&!ae(_))return;(we.value||n.defaultSortBy)&&(_.sortBy=we.value??n.defaultSortBy,_.sortDirection=Te.value??n.defaultSortDirection);try{V.value=!0;let G=n.getListAction;typeof G=="function"&&(G=G.call(void 0));const J=U(G,_),O=await s.get(J);O!=null&&O.isSuccess&&O.value?(Le++,O.value&&(Array.isArray(O.value)?Wn(O.value):Kn(O.value))):i.error(a((O==null?void 0:O.errorMessage)??((C=O==null?void 0:O.value)==null?void 0:C.toString())??"Error"))}catch(G){i.error((G==null?void 0:G.toString())??a("Error")),console.error(G)}finally{V.value=!1}}}function De(p){if(!n.disabled)if(H.value&&ye){const w=Object.assign({},ye);w.sortBy=we.value,w.sortDirection=Te.value,Pt(w)}else p!=null?ue(p):ue(I.value-1)}function Rt(){ue(0)}function Yc(){R.value="",ue(0)}function Jc(p){if(n.additionKeys)for(const w in n.additionKeys){const C=n.additionKeys[w];C!=null&&(p[w]=C)}}function Zn(){if(!n.parentKey||!n.verifyParentKey)return!0;if(n.verifyParentKey==!0)return!(n.parentValue==null||Array.isArray(n.parentKey)&&Array.isArray(n.parentValue)&&n.parentValue.some(p=>p==null));if(typeof n.verifyParentKey=="function"){const p=n.verifyParentKey({key:n.parentKey,value:n.parentValue});if(typeof p=="boolean")return p}return!0}function ae(p){if(n.verifyParentKey&&Zn()==!1)return!1;if(n.parentKey){const w={};if(Array.isArray(n.parentKey))if(Array.isArray(n.parentValue))for(let C=0;C<n.parentKey.length;C++){const _=n.parentKey[C];(typeof _=="string"||typeof _=="number")&&n.parentValue.length>C&&(w[_]=n.parentValue[C])}else for(let C=0;C<n.parentKey.length;C++){const _=n.parentKey[C];(typeof _=="string"||typeof _=="number")&&(w[_]=n.parentValue)}else n.parentKey&&(w[n.parentKey]=n.parentValue);p&&Object.assign(p,w)}return!0}async function jt(){var w;if(n.disabled)return;const p=(w=y.value)==null?void 0:w.pickValues();if(p&&n.searchAction){const C={};Object.assign(C,p),Jc(C),C.pageSize=k.value,C.pageIndex=0,C.sortBy=we.value??n.defaultSortBy,C.sortDirection=Te.value??n.defaultSortDirection,C.groupBy=$t.value,Pt(C)}}async function Pt(p){if(!V.value)try{V.value=!0;let w=n.searchAction;if(typeof w=="function"&&(w=w.call(void 0,p)),!w)return;const C={};if(!ae(C))return;w=U(w,C);const _=await s.post(w,p);_.isSuccess&&_.value!=null?(Le++,ye=p,r("searchReturn",{data:_.value,query:p,action:w}),Array.isArray(_.value)?Wn(_.value):Kn(_.value)):i.error(a(_.errorMessage||"Error"))}catch(w){i.error(w==null?void 0:w.toString())}finally{V.value=!1}}function Qn(p,w){const C={};if(ae(C)){if(typeof n.keys=="string"?C[n.keys]=p[n.keys]:n.keys.forEach($=>C[$]=p[$]),Array.isArray(n.detailsKeys))n.detailsKeys.map($=>$.toString()).forEach($=>C[$]=p[$]);else if(typeof n.detailsKeys=="object"){const $=n.detailsKeys;for(const G in $){var _=$[G];_&&(C[G]=p[_])}}else typeof n.detailsKeys=="function"?n.detailsKeys.call(null,C):n.detailsKeys&&(C[n.detailsKeys]=p[n.detailsKeys]);if(n.detailsPageName)g.push({name:n.detailsPageName,params:C});else if(n.detailsPage)if(typeof n.detailsPage=="function"){const $=n.detailsPage(p,w);(typeof $=="string"||typeof $=="object")&&g.push($)}else g.push({path:n.detailsPage,query:C})}}async function Ft(p,w){var C;if(!n.disabled)if(n.getEntityAction){const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;typeof n.keys=="string"?_[n.keys]=p[n.keys]:n.keys.forEach($=>_[$]=p[$]);try{let $=n.getEntityAction;typeof $=="function"&&($=$.call(void 0,p,w));const G=U($,_),J=await s.get(G);J.isSuccess&&J.value!=null?Ue(J.value,n.readOnly||!n.saveAction||!n.allowEdit?"view":"edit"):i.error(a((J==null?void 0:J.errorMessage)??((C=J==null?void 0:J.value)==null?void 0:C.toString())??"Error"))}catch($){i.error(($==null?void 0:$.toString())??a("Error")),console.error($)}}else Ue(p,n.readOnly||!n.saveAction||!n.allowEdit?"view":"edit")}function Ht(p,w){n.readOnly||n.disabled||n.deleteAction&&p&&p.__key__&&m.warning({title:a("Delete"),content:a("Are you sure you want to delete this row?"),positiveText:a("Delete"),negativeText:a("Cancel"),onPositiveClick:()=>{Xc(p,w)}})}async function Xc(p,w){var C;if(n.deleteAction&&n.keys.length)try{const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;typeof n.keys=="string"?_[n.keys]=p[n.keys]:n.keys.forEach(q=>_[q]=p[q]);const $=p.__key__;let G=n.deleteAction;typeof G=="function"&&(G=G.call(void 0,p,w));const J=U(G,_);let O;if(n.deleteMethod=="POST"?O=await s.post(J):O=await s.delete(J),O.isSuccess){let q=c.value.indexOf(p);if(q>-1&&(c.value.splice(q,1),i.success(a("The data has been deleted."))),A.value&&(q=A.value.findIndex(Y=>Y==$),q>-1)){A.value.splice(q,1);const Y=(C=c.value)==null?void 0:C.filter(wd=>A.value.includes(wd["__key__]"]));r("update:selectedIds",A.value,Y),A.value.length?r("update:selectedId",A.value[0],Y!=null&&Y.length?Y[0]:void 0):r("update:selectedId",void 0,void 0)}}else i.error(a(O.errorMessage||"Error"))}catch(_){console.error(_),i.error(_==null?void 0:_.toString())}}function qc(p){n.readOnly||n.disabled||n.deleteBatchAction&&p&&p.length&&m.warning({title:a("Delete"),content:a("Are you sure you want to delete selected rows?"),positiveText:a("Delete"),negativeText:a("Cancel"),onPositiveClick:()=>{Uc(p)}})}async function Uc(p){if(n.deleteBatchAction&&p.length)try{const w={ids:p.join()};if(n.additionKeys&&Object.assign(w,n.additionKeys),!ae(w))return;let C=n.deleteBatchAction;typeof C=="function"&&(C=C.call(void 0));const _=U(C,w);let $;if(n.deleteMethod=="POST"?$=await s.post(_):$=await s.delete(_),$.isSuccess){for(const G of p){const J=c.value.findIndex(O=>O.__key__==G);J>-1&&c.value.splice(J,1)}A.value=A.value.filter(G=>!p.includes(G)),i.success(a("The data has been deleted."))}else i.error(a($.errorMessage||"Error"))}catch(w){i.error(w),console.error(w==null?void 0:w.toString())}}function Yn(){if(A.value.length){const p=c.value.find(w=>w.__key__==A.value[0]);p&&Ft(p,c.value.indexOf(p))}}function Jn(){if(A.value.length>1&&n.deleteBatchAction)qc(A.value);else if(A.value.length){const p=c.value.find(w=>w.__key__==A.value[0]);p&&Ht(p,c.value.indexOf(p))}}function Ue(p,w){const C={method:w,original:p,value:qo(p,d.value)};switch(r("beforeShow",C),Q.value=p,z.value=C.value,P.value=w,v.value=!0,ee.value=w!="create"&&w!="edit",w){case"create":oe.value=a("New");break;case"edit":oe.value=a("Edit");break;default:oe.value=a("Property");break}}function Xn(){Q.value=void 0,z.value=void 0,P.value=void 0,v.value=!1,oe.value=a("Property")}async function Gt(){var p;if(!(n.readOnly||n.disabled||!n.saveAction))if(n.initEntityAction){let w=n.initEntityAction;typeof w=="function"&&(w=w.call(void 0));let C=w;const _={};if(n.additionKeys&&Object.assign(_,n.additionKeys),!ae(_))return;C=U(C,_);try{const $=await s.get(C);$!=null&&$.isSuccess&&$.value?Ue($.value||{},"create"):i.error(a(($==null?void 0:$.errorMessage)??((p=$==null?void 0:$.value)==null?void 0:p.toString())??"Error"))}catch($){i.error(a(($==null?void 0:$.toString())??"Error")),console.error($)}}else{const w=Jo(d.value);Ue(w,"create")}}async function vc(p,w){var $;if(n.readOnly||n.disabled)return;const C=Me.value;if(!C||C.searchConfig!=w||!C.actionUrl)return;let _;if(C.dataBuilder)_=C.dataBuilder(p);else{let G;if(C.keyPicker?G=C.keyPicker(p):G=p.map(J=>J.id),!G||!G.length)return;_={},_[C.keyName||"ids"]=G}if(_){let G=C.actionUrl;n.additionKeys&&Object.assign(_,n.additionKeys);const J={};ae(J)&&(G=U(G,J),Object.assign(_,J));try{const O=await s.post(G,_);if(O.isSuccess){if(O.value){for(const Y of O.value)ve(Y);const q=O.value.map(Y=>Xe(Y));($=B.value)==null||$.selectRows(q),Je.value=!1}}else i.error(a(O.errorMessage||"Error"))}catch(O){i.error(a((O==null?void 0:O.toString())||"Error")),console.error(O)}}}function qn(p){Me.value=p,Je.value=!0}function ed(p){const w=d.value;if(!w||!w.length)return!1;w.forEach(C=>{C.validationStatus=void 0,C.errorMessage=void 0});for(const C of w)C.nullable===!1&&!C.readonly&&(p[C.name]==null||p[C.name]===null||!C.dataType&&(p[C.name]==null||p[C.name]==null)?(C.validationStatus="error",C.errorMessage=a("Required here.")):(C.validationStatus="success",C.errorMessage=void 0));return!w.some(C=>C.validationStatus=="error"||C.validationStatus=="warning")}function td(){if(n.readOnly||n.disabled)return;const p=d.value;if(!p||!p.length)return;const w=P.value;if(w!="create"&&w!="edit")return;const C=z.value,_=Q.value;if(C&&_){const $=Object.assign({},_);for(let G of p){if(G.readonly==!0||Array.isArray(G.readonly)&&G.readonly.includes(w))continue;let J=Re(C[G.name],G.dataType,G.role);$[G.name]=J}if(r("commitEdit",{data:$,current:C,original:_,method:w}),n.beforeSave&&n.beforeSave($,w)===!1)return;ed($)?Un({data:$,original:_,method:w}):i.error(a("Form validation failed."))}}async function Un(p){var w;if(!(n.readOnly||n.disabled||!n.saveAction))try{let C;const _={};if(n.additionKeys)for(const q in n.additionKeys)n.additionKeys[q]!=null&&(p.data[q]=n.additionKeys[q]);const $={};if(!ae($))return;if(Object.assign(p.data,$),n.enctype=="multipart/form-data"){C=new FormData;const q=Object.keys(p.data);for(const Y of q)p.data[Y]&&C.set(Y,p.data[Y]);_["Content-Type"]="multipart/form-data"}else C=p.data,_["Content-Type"]="application/json;charset=utf-8";let G=n.saveAction;typeof G=="function"&&(G=G.call(void 0));let J=U(G,$);E.value=!0;const O=await s.post(J,C,{headers:_});if(O.isSuccess){if(i.success(a("The data is saved.")),O.value){p.method=="create"?ve(O.value):p.method=="edit"&&vn(O.value),(w=B.value)==null||w.selectRow(Xe(O.value)),p.method=="create"&&n.chainCreating?Gt():Xn();try{r("saved",{value:O.value,method:p.method})}catch(q){console.error("emit(saved) fail."+(q==null?void 0:q.toString()))}}}else i.error(a(O.errorMessage||"Error")),O.errors&&od(d.value,O.errors)}catch(C){i.error((C==null?void 0:C.toString())||a("Error")),console.error(C)}finally{E.value=!1}}function od(p,w){if(p&&p.length)for(const C of w){const _=p.find($=>$.name.toLowerCase()==C.key.toLowerCase());_&&(_.validationStatus="error",_.errorMessage=C.value)}}function ve(p){qe(p);const w=p.__key__,C=c.value.findIndex(_=>_.__key__==w);C>-1?c.value.splice(C,1,p):c.value.push(p)}function vn(p){qe(p);const w=p.__key__,C=c.value.find(_=>_.__key__==w);if(C)for(const _ in p)C[_]=p[_]}function nd(p){if(H.value&&ye){const w=Object.assign({},ye);w.pageIndex=Math.max(0,p-1),Pt(w)}else p>0?ue(p-1):ue(0)}function ld(p){p&&(k.value=p)}function rd(p,w){A.value=p,r("update:selectedIds",p,w),r("update:selectedId",p.length?p[0]:void 0,w.length?w[0]:void 0)}async function ad(p,w){n.exportAction?await sd(p,w)&&(ne.value=!1):n.dataExchangeCode&&(tl(p,w),ne.value=!1)}function el(p,w,C){const _={outputType:p,dataRange:w,searchArgs:JSON.stringify(ye)};if(n.importTemplateCode&&(_.templateCode=n.importTemplateCode),!ye&&(n.additionKeys||n.parentKey)){const $={pageSize:k.value,pageIndex:I.value,sortBy:we.value,sortDirection:Te.value};n.additionKeys&&Object.assign($,n.additionKeys),ae($),_.searchArgs=JSON.stringify($)}switch(C&&Object.assign(_,C),w){case"selection":if(!A.value||!A.value.length)throw a("Please select the rows to be exported.");_.selectedKeys=A.value;break;case"page":_.pageSize=k.value,_.pageIndex=Math.max(0,I.value-1);break}return _}async function sd(p,w){let C=n.exportAction;if(typeof C=="function"&&(C=C.call(void 0)),C){try{if(!Zn())return console.log("Invalid parent key."),!1;const _=el(p,w,n.exportOptions);ae(_),u.start(),C=U(C,_),await me(C)}catch(_){console.log(_),i.error((_==null?void 0:_.toString())||a("Error"))}finally{u.finish()}return!0}else return!1}function id(){n.importAction&&(D.value=!0)}async function cd(){const p=n.importTemplateCode;if(p){const w=`/api/core/DataExchangeTemplates/ImportTemplate?templateCode=${p}`;try{u.start(),await me(w)}finally{u.finish()}}}async function tl(p,w,C=!1){var q;const _=n.dataExchangeCode;if(!_)return;if(w.toLowerCase()=="empty"){const Y=`/api/core/dataExchange/importTemplate?templateCode=${_}&engineName=${p}`;try{u.start(),await me(Y)}finally{u.finish()}return}const $={name:_,engineName:p,dataRange:w};n.importTemplateCode&&($.templateCode=n.importTemplateCode);const G={pageSize:k.value,pageIndex:I.value-1};switch(w.toLowerCase()){case"empty":G.pageSize=0,G.pageIndex=0;break;case"all":G.pageSize=2e3,G.pageIndex=0;break}if(!ae(G)){console.log("Invalid parent key.");return}let J=n.exportAction||n.getListAction;typeof J=="function"&&(J=J.call(void 0));let O=J;if(C)try{const Y=await s.post("/api/core/tempData/add",{value:JSON.stringify($)});if(Y.isSuccess){if(G.exportOptionId=Y.value,O){O=U(O,G);try{u.start(),await me(O)}finally{u.finish()}}}else i.error((Y==null?void 0:Y.errorMessage)??((q=Y==null?void 0:Y.value)==null?void 0:q.toString())??a("Error"))}catch(Y){i.error((Y==null?void 0:Y.toString())??a("Error")),console.error(Y)}else if(G.exportOption=btoa(JSON.stringify($)),O){O=U(O,G);try{u.start(),await me(O)}finally{u.finish()}}}function ol(p){if(p)switch(p){case"menu_export_action":A.value&&A.value.length?Dt.value=Ot("selection"):Dt.value=Ot("page"),ne.value=!0;break;case"menu_export_template_action":cd();break;case"menu_import_action":id();break;case"menu_export":ne.value=!0;break;case"menu_export_template":tl("Excel","Empty");break;case"menu_import":break;default:{const w=ze.find(C=>C.key==p);w&&nl(w)}break}}function nl(p){var _;const w=A.value,C={selectedId:w!=null&&w.length?w[0]:void 0,selectedIds:w?[...w]:void 0,data:c.value};typeof p!="string"&&((_=p.click)==null||_.call(null,C)),r("extendedMenuSelect",C)}function dd(p){const w=[];n.exportAction&&w.push({label:a("Export")+"…",key:"menu_export_action",icon:()=>e.h(f.NIcon,null,{default:()=>e.h(It)})}),n.importTemplateCode&&w.push({label:a("Download Template")+"…",key:"menu_export_template_action"}),n.importAction&&!n.readOnly&&w.push({label:a("Import"),key:"menu_import_action",icon:()=>e.h(f.NIcon,null,{default:()=>e.h(St)})}),n.dataExchangeCode&&(w.push({label:a("Export")+"…",key:"menu_export",icon:()=>e.h(f.NIcon,null,{default:()=>e.h(It)})}),w.push({label:a("Export Template"),key:"menu_export_template"}),n.readOnly||(w.push({type:"divider",key:"------------1"}),w.push({label:a("Import"),key:"menu_import",icon:()=>e.h(f.NIcon,null,{default:()=>e.h(St)})}))),p&&p.length&&(w.push({type:"divider",key:"----------e--1"}),p.forEach(C=>{const _={label:C.label,key:C.key};C.icon?_.icon=mt(C.icon):C.renderIcon&&(_.icon=C.renderIcon),w.push(_)})),fe.value=w}const ll=Ji({gridId:n.name,onConfigChanged:p=>Kt(p),onPageSizeChanged:p=>k.value=p,onReset:()=>ud});ll.loadGridConfig();const Kt=(p,w)=>{if(p){K=p,k.value=p.pageSize,w||(w=[...h.value]),w.forEach(C=>{C.sortIndex=99999});for(const C of p.columns){const _=w.find($=>$.name==C.columnId);_&&(_.visible=C.visible,_.sortIndex=C.sortIndex,C.title&&(_.title=C.title))}w.sort((C,_)=>(C.sortIndex||0)-(_.sortIndex||0)),h.value=w}};function fd(p){p?Kt(p):(h.value=Be(n.columns||[]),k.value=n.pageSize||20),W.value=!1}const ud=()=>{h.value=Be(n.columns||[]),k.value=n.pageSize||20},pd=()=>{n.name&&ll.showConfigModal({gridId:n.name,gridColumns:h.value,pageSize:k.value})};function md(p,w){var C;for(const _ of p)ve(_);if(w){const _=p.map($=>Xe($));(C=B.value)==null||C.selectRows(_)}}function rl(p){if(!p)return;const w=ze==null?void 0:ze.find(C=>C.key==p);w&&nl(w)}function hd(p){var w,C;Array.isArray(p)?(we.value=(w=p[0].columnKey)==null?void 0:w.toString(),Te.value=p[0].order=="ascend"?"Asc":"Desc"):p&&(we.value=(C=p.columnKey)==null?void 0:C.toString(),Te.value=p.order=="ascend"?"Asc":"Desc"),De()}function al(){const p=new Array;if(n.extendedMenus)for(const C of n.extendedMenus)typeof C=="string"?p.push({label:a(C),key:x++}):(C.key||(C.key=x++),p.push(C));ze=p,gd(p);const w=p.filter(C=>C.group=="import"||C.group=="export");dd(w)}function gd(p){if(p){const w=p.filter(C=>!C.group).map(C=>C.label=="-"?{type:"divider"}:C.icon?{label:C.label,key:C.key,icon:mt(C.icon)}:C.renderIcon?{label:C.label,key:C.key,icon:C.renderIcon()}:{label:C.label,key:C.key});he.value=w}else he.value=[]}function sl(){const p={};return n.parentKey&&ae(p),n.additionKeys&&Object.assign(p,n.additionKeys),p}function il(){const p=Object.assign({},sl(),n.importOptions);Gn.value=Object.keys(p).length?p:void 0}function yd(){L?S.value=!S.value:S.value=!1}return e.onMounted(()=>{il(),n.autoLoad!=!1&&(L.value?n.autoLoad&&jt():ue(0)),al()}),e.watch(e.computed(sl),(p,w)=>{JSON.stringify(p)!=JSON.stringify(w)&&(il(),n.autoLoad!=!1&&Le>0&&De())}),e.watch(()=>n.extendedMenus,()=>al()),e.watch(()=>n.parentValue,()=>{(n.autoLoad!=!1||Le>0)&&ue(0)}),e.watch(()=>n.getListAction,(p,w)=>{w&&(n.autoLoad!=!1||Le>0)&&ue(0)}),e.watch(k,(p,w)=>{if(p&&w){var C=void 0,_=I.value,$=T.value;if(_>0&&$){const G=Math.ceil($/p);G<_&&(C=Math.max(0,G-1))}De(C)}}),e.watch(()=>n.columns,()=>{const p=Be(n.columns||[]);K?Kt(K,p):h.value=p}),l({reloadPage:De,addRow:Gt,addBatch:qn,editSelectedRow:Yn,deleteSelectedRows:Jn,saveData:Un,doQuickSearch:Rt,clearQuickSearch:Yc,advancedSerach:jt,checkedRowKeys:A,editRow:Ft,deleteRow:Ht,showDetails:Qn,insertRow:ve,updateRow:vn,appendRows:md,buildExportArgs:el}),(p,w)=>{var C,_,$,G,J;return e.openBlock(),e.createElementBlock("div",Xi,[e.renderSlot(p.$slots,"header"),L.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qi,[e.createVNode(e.unref(f.NButtonGroup),null,{default:e.withCtx(()=>[e.renderSlot(p.$slots,"prefix-tools"),p.readOnly?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p.batchAdds,O=>(e.openBlock(),e.createBlock(e.unref(f.NButton),{onClick:()=>qn(O),disabled:p.readOnly||p.disabled,key:O.id},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#388e3c"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)(O.label||"Batch Add")),1)]),_:2},1032,["onClick","disabled"]))),128)),p.saveAction&&!p.readOnly&&p.allowNew?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:1,onClick:Gt,disabled:p.readOnly||p.disabled},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#388e3c"},{default:e.withCtx(()=>[e.createVNode(e.unref(mi))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("New")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),p.saveAction&&!p.readOnly&&p.allowEdit?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:2,onClick:Yn,disabled:p.readOnly||p.disabled||!A.value.length},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#5c6bc0"},{default:e.withCtx(()=>[e.createVNode(e.unref(Po))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Edit")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(p.deleteAction||p.deleteBatchAction)&&!p.readOnly?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:3,onClick:Jn,disabled:p.readOnly||p.disabled||!A.value.length},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#f44336"},{default:e.withCtx(()=>[e.createVNode(e.unref(jo))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Delete")),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),e.createVNode(e.unref(f.NButton),{onClick:w[0]||(w[0]=()=>De()),disabled:p.disabled},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#689f38"},{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Refresh")),1)]),_:1},8,["disabled"]),e.renderSlot(p.$slots,"suffix-tools"),fe.value.length?(e.openBlock(),e.createBlock(e.unref(f.NDropdown),{key:4,options:fe.value,disabled:p.disabled,onSelect:ol},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#009688"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ma))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Import/Export"))+" ",1),e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options","disabled"])):e.createCommentVNode("",!0),he.value&&he.value.length?(e.openBlock(),e.createBlock(e.unref(f.NDropdown),{key:5,options:he.value,disabled:p.disabled,onSelect:rl},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#3F51B5"},{default:e.withCtx(()=>[e.createVNode(e.unref(it))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Advanced"))+" ",1),e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options","disabled"])):e.createCommentVNode("",!0)]),_:3}),e.renderSlot(p.$slots,"tools"),p.quickSearch?(e.openBlock(),e.createBlock(e.unref(f.NInputGroup),{key:0,class:"flex-row quick-search-box",style:{width:"inherit"}},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(f.NInput),{class:"flex-grow-1",style:{width:"260px"},value:R.value,"onUpdate:value":w[1]||(w[1]=O=>R.value=O),placeholder:e.unref(a)("Quick Search"),clearable:"",onChange:Rt},{prefix:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["value","placeholder"]),[[e.vShow,!H.value]]),e.withDirectives(e.createVNode(e.unref(f.NButton),{title:e.unref(a)("Search"),onClick:w[2]||(w[2]=()=>Rt()),style:{padding:"0 8px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["title"]),[[e.vShow,!H.value]]),j.value?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,title:e.unref(a)("More"),style:{padding:"0 8px"},onClick:w[3]||(w[3]=()=>H.value=!H.value)},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ka),{key:0})),H.value?(e.openBlock(),e.createBlock(e.unref(Ca),{key:1})):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["title"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0)])),e.renderSlot(p.$slots,"neck"),j.value?e.withDirectives((e.openBlock(),e.createBlock(e.unref(f.NCard),{key:1,size:"small",hoverable:"",closable:!L.value,onClose:w[8]||(w[8]=()=>H.value=!1)},{header:e.withCtx(()=>[e.createElementVNode("div",{class:"flex-row",style:e.normalizeStyle([{"align-items":"center"},{cursor:L.value?"pointer":"unset"}]),onClick:yd},[e.createVNode(e.unref(f.NIcon),{size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Search"))+" ",1),e.withDirectives(e.createElementVNode("span",Ui," … ",512),[[e.vShow,S.value]])],4)]),action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px"},onClick:jt},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Search")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:w[6]||(w[6]=()=>{var O;return(O=y.value)==null?void 0:O.reset()})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Reset")),1)]),_:1}),fe.value.length==1&&L.value?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,style:{"min-width":"100px"},onClick:w[7]||(w[7]=()=>ne.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Export")),1)]),_:1})):e.createCommentVNode("",!0),fe.value.length>1&&L.value?(e.openBlock(),e.createBlock(e.unref(f.NDropdown),{key:1,options:fe.value,onSelect:ol},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Export")),1)]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"search-tools"),L.value&&he.value&&he.value.length?(e.openBlock(),e.createBlock(e.unref(f.NDropdown),{key:2,options:he.value,onSelect:rl},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),null,{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),{color:"#3F51B5"},{default:e.withCtx(()=>[e.createVNode(e.unref(it))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(a)("Advanced"))+" ",1),e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(xt))]),_:1})]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)]),_:3})]),_:3})]),default:e.withCtx(()=>[e.withDirectives(e.createVNode(Ke,{"search-items":b.value,ref_key:"searchFormRef",ref:y,"search-args":Hn.value,"onUpdate:searchArgs":w[4]||(w[4]=O=>Hn.value=O),"group-options":p.searchGroupOptions,"group-by":$t.value,"onUpdate:groupBy":w[5]||(w[5]=O=>$t.value=O)},null,8,["search-items","search-args","group-options","group-by"]),[[e.vShow,!S.value]])]),_:3},8,["closable"])),[[e.vShow,H.value]]):e.createCommentVNode("",!0),e.renderSlot(p.$slots,"grid",{data:c.value,columns:h.value,loading:V.value,style:"background-color: chartreuse;"},()=>[e.createVNode(We,{ref_key:"dataGridRef",ref:B,data:c.value,columns:h.value,loading:V.value,class:"halo-form-grid flex-grow-1",style:{height:"80px","min-height":"80px"},"drag-sorting":p.gridDragSorting,"flex-height":p.gridFlexHeight,"with-edit":!!p.saveAction&&!p.readOnly&&p.allowEdit,"with-delete":(!!p.deleteAction||!!p.deleteBatchAction)&&!p.readOnly,"with-details":!!p.detailsPage||!!p.detailsPageName,"multi-select":p.multiSelect,"max-height":p.gridMaxHeight,height:p.gridHeight,checkable:p.gridCheckable,onEditRow:Ft,onDeleteRow:Ht,onShowDetails:Qn,"onUpdate:selectedIds":rd,onColumnButtonClick:w[9]||(w[9]=(O,q,Y)=>p.$emit("columnButtonClick",O,q,Y)),"onUpdate:sorter":w[10]||(w[10]=O=>hd(O)),onRowSorting:w[11]||(w[11]=O=>p.$emit("rowSorting",O))},null,8,["data","columns","loading","drag-sorting","flex-height","with-edit","with-delete","with-details","multi-select","max-height","height","checkable"])]),e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createBlock(e.unref(f.NPagination),{key:0,page:I.value,"onUpdate:page":[w[12]||(w[12]=O=>I.value=O),nd],"item-count":T.value,"page-size":k.value,"page-sizes":[10,20,30,40,50,100],"show-quick-jumper":"","show-size-picker":"","onUpdate:pageSize":ld},{suffix:e.withCtx(({startIndex:O,endIndex:q,itemCount:Y})=>[Y?(e.openBlock(),e.createBlock(e.unref(f.NText),{key:0,italic:"",depth:"3"},{default:e.withCtx(()=>[e.createTextVNode("["+e.toDisplayString(O+1)+"~"+e.toDisplayString(q+1)+"] / "+e.toDisplayString(Y),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:1},8,["page","item-count","page-size"])):e.createCommentVNode("",!0),p.name?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:1,text:"",onClick:w[13]||(w[13]=()=>pd())},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ii))]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.renderSlot(p.$slots,"default"),e.renderSlot(p.$slots,"bottom",{formItems:d.value,currentData:z.value,list:c.value,selectedKeys:A.value}),e.createVNode(e.unref(f.NModal),{class:"custom-card",show:v.value,"onUpdate:show":w[15]||(w[15]=O=>v.value=O),preset:"card",draggable:"",style:e.normalizeStyle([Wc.value,p.modalStyle]),title:oe.value,"close-on-esc":!1,"mask-closable":!1},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[P.value=="create"||P.value=="edit"?(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,onClick:td,style:{"min-width":"100px"},type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Save")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(f.NButton),{onClick:Xn,style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)("Close")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpin),{show:E.value},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[e.createElementVNode("div",null,[e.renderSlot(p.$slots,"entity-form-left",{data:z.value,original:Q.value,method:P.value})]),e.createElementVNode("div",ec,[e.renderSlot(p.$slots,"entity-form",{formItems:d.value,data:z.value,original:Q.value,method:P.value},()=>[e.createVNode(kt,{"form-items":d.value,columns:p.modalColumns,data:z.value,original:Q.value,method:P.value,"group-layout":p.formGroupLayout,"read-only":ee.value,onItemChange:w[14]||(w[14]=O=>p.$emit("itemChange",O))},null,8,["form-items","columns","data","original","method","group-layout","read-only"])])]),e.createElementVNode("div",null,[e.renderSlot(p.$slots,"entity-form-right",{data:z.value,original:Q.value,method:P.value})])])]),_:3},8,["show"])]),_:3},8,["show","style","title"]),(C=p.batchAdds)!=null&&C.length?(e.openBlock(),e.createBlock(Et,{key:2,show:Je.value,"onUpdate:show":w[16]||(w[16]=O=>Je.value=O),draggable:"",config:(_=Me.value)==null?void 0:_.searchConfig,title:($=Me.value)==null?void 0:$.searchTitle,"multi-select":((G=Me.value)==null?void 0:G.singleOne)!=!0,"addition-query":(J=Me.value)==null?void 0:J.additionQuery,onSearchBack:vc},null,8,["show","config","title","multi-select","addition-query"])):e.createCommentVNode("",!0),p.importAction?(e.openBlock(),e.createBlock(Qe,{key:3,show:D.value,"onUpdate:show":w[17]||(w[17]=O=>D.value=O),draggable:"",action:p.importAction,"addition-params":Gn.value,timeout:p.importTimeout,"template-code":p.importTemplateCode},{options:e.withCtx(({options:O})=>[e.renderSlot(p.$slots,"import-options",{options:O})]),_:3},8,["show","action","addition-params","timeout","template-code"])):e.createCommentVNode("",!0),p.dataExchangeCode||p.exportAction?(e.openBlock(),e.createBlock(Vt,{key:4,show:ne.value,draggable:"","supported-formats":p.exportFormats,"supported-ranges":p.exportRanges,onClose:w[18]||(w[18]=()=>ne.value=!1),onExport:ad,range:Dt.value,"template-code":p.importTemplateCode},{options:e.withCtx(()=>[e.renderSlot(p.$slots,"export-options")]),_:3},8,["show","supported-formats","supported-ranges","range","template-code"])):e.createCommentVNode("",!0),p.name?(e.openBlock(),e.createBlock(Tt,{key:5,"grid-id":p.name,draggable:"","grid-columns":h.value,pageSize:k.value,"onUpdate:pageSize":w[19]||(w[19]=O=>k.value=O),show:W.value,onClose:w[20]||(w[20]=()=>W.value=!1),"onUpdate:config":fd},null,8,["grid-id","grid-columns","pageSize","show"])):e.createCommentVNode("",!0)])}}}),tc={class:"flex-row gap05",style:{"align-items":"center"}},bn=e.defineComponent({__name:"HaloModal",props:{show:{type:Boolean},title:{},submitting:{type:Boolean},hideOkButton:{type:Boolean},width:{default:"600px"}},emits:["submit","update:show"],setup(t){const{t:l}=Z();return(o,n)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{class:"custom-card",show:o.show,preset:"card",style:e.normalizeStyle({width:o.width}),draggable:"",onClose:n[2]||(n[2]=()=>o.$emit("update:show",!1))},{header:e.withCtx(()=>[e.createElementVNode("div",tc,[e.renderSlot(o.$slots,"icon"),e.createElementVNode("div",null,e.toDisplayString(o.title),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[o.hideOkButton?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(f.NButton),{key:0,onClick:n[0]||(n[0]=r=>o.$emit("submit")),style:{"min-width":"100px"},type:"primary",loading:o.submitting},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("OK")),1)]),_:1},8,["loading"])),e.createVNode(e.unref(f.NButton),{onClick:n[1]||(n[1]=()=>o.$emit("update:show",!1)),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["show","style"]))}}),oc={key:0,style:{"text-align":"right"}},kn=e.defineComponent({__name:"HaloSelect",props:{multiple:{type:Boolean},filterable:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},value:{},sourceUrl:{},additionalQuery:{},labelFormatter:{},keyField:{},labelField:{},subLabelField:{},prefix:{},suffix:{},insertBlank:{type:Boolean},autoSelect:{type:Boolean},i18n:{type:Boolean,default:!0}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.inject("axios"),s=e.ref(!1),c=e.ref([]);let m;const i=d=>{(!m||m!=d)&&(m=d,u(d))},u=async d=>{let h=o.sourceUrl;if(h){const b=o.labelFormatter,x=o.keyField,I=o.labelField,F=o.subLabelField,T=o.insertBlank,k=o.additionalQuery;s.value=!0,c.value=[];try{d&&(h=U(h,{searchWords:d})),k&&(h=U(h,k,!0));const N=await a.get(h);if(N.isSuccess&&N.value!=null){let V=N.value;if(!Array.isArray(V)&&"rows"in V&&Array.isArray(V.rows)&&(V=V.rows),Array.isArray(V)){const E=V.filter(R=>R&&!0).map(R=>{if(typeof R=="string")return{value:R,label:b?b(R):r(R)};{let j=R[I||"label"];if(b&&(j=b(j)),o.prefix&&(j=o.prefix+j),o.suffix&&(j=j+o.suffix),o.i18n&&(j=r(j)),F){let L=R[F];typeof L=="string"&&(b&&(L=b(L)),o.i18n&&(L=r(L)),L&&(j+=" "+L))}return{value:R[x||"value"],label:j,data:R}}});T&&E.splice(0,0,{value:"",label:""}),c.value=E,o.autoSelect&&!o.value&&E.length&&n("update:value",E[0].value,E[0],E[0].data)}}}finally{s.value=!1}}},g=(d,h)=>{var x;const b=(x=c.value.find(I=>I.value==d))==null?void 0:x.data;n("update:value",d,h,b)};return e.watch(()=>o.sourceUrl,()=>u()),e.watch(()=>o.additionalQuery,(d,h)=>{JSON.stringify(h)!=JSON.stringify(d)&&u()}),e.onMounted(()=>u()),(d,h)=>(e.openBlock(),e.createBlock(e.unref(f.NSelect),{value:d.value,remote:"",loading:s.value,options:c.value,filterable:d.filterable,multiple:d.multiple,placeholder:"",disabled:d.readonly,clearable:d.clearable,onSearch:i,"onUpdate:value":g},{action:e.withCtx(()=>[d.filterable?(e.openBlock(),e.createElementBlock("div",oc,[e.createVNode(e.unref(f.NText),{depth:"3",italic:""},{default:e.withCtx(()=>[e.createElementVNode("small",null,e.toDisplayString(e.unref(r)("Enter text to filter the result list.")),1)]),_:1})])):e.createCommentVNode("",!0)]),_:1},8,["value","loading","options","filterable","multiple","disabled","clearable"]))}}),nc=e.defineComponent({components:{SearchIcon:un,LeftIcon:Gs,RightIcon:Ws},props:{sourceList:Object,selectedItems:Object,loading:Boolean,placeholder:{type:String,default:"Search"}},emits:["search","update:selectedItems"],setup(t,l){const{t:o}=Z(),n=e.ref(void 0),r=e.ref(s(t.sourceList)),a=e.ref([]);function s(d){return d?d.map(h=>({isSelected:!1,value:h})):[]}function c(){n.value&&l.emit("search",n.value)}function m(){nn(a.value,d=>d.isSelected)>0&&l.emit("update:selectedItems",a.value.map(d=>d.value))}function i(){a.value.forEach(h=>h.isSelected=!1);let d=!1;r.value.forEach(h=>{h.isSelected&&!a.value.some(b=>b.value==h.value)&&(a.value.push({value:h.value,isSelected:!1}),d=!0)}),d&&l.emit("update:selectedItems",a.value.map(h=>h.value))}function u(d){d.forEach(h=>h.isSelected=!0)}function g(d){d.forEach(h=>h.isSelected=!h.isSelected)}return e.watch(()=>t.sourceList,d=>r.value=s(d)),{t:o,searchWords:n,searchMaterials:c,source:r,target:a,moveRight:i,moveLeft:m,selectAll:u,inverseSelect:g}}}),lc={class:"flex-row gap1"},rc={class:"flex-column flex-grow-1 gap25",style:{width:"100px",height:"400px"}},ac={class:"flex-row gap1",style:{"justify-content":"flex-end"}},sc={class:"flex-column gap1",style:{width:"60px","justify-content":"center"}},ic={class:"flex-column flex-grow-1 gap25",style:{width:"100px",height:"400px"}},cc={class:"flex-row gap1",style:{"justify-content":"flex-end"}};function dc(t,l,o,n,r,a){const s=e.resolveComponent("search-icon"),c=e.resolveComponent("n-icon"),m=e.resolveComponent("n-input"),i=e.resolveComponent("n-checkbox"),u=e.resolveComponent("n-scrollbar"),g=e.resolveComponent("n-spin"),d=e.resolveComponent("n-button"),h=e.resolveComponent("right-icon"),b=e.resolveComponent("left-icon");return e.openBlock(),e.createElementBlock("div",lc,[e.createElementVNode("div",rc,[e.createVNode(m,{placeholder:t.placeholder,value:t.searchWords,"onUpdate:value":l[0]||(l[0]=x=>t.searchWords=x),onInput:t.searchMaterials},{suffix:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(s)]),_:1})]),_:1},8,["placeholder","value","onInput"]),e.createVNode(g,{show:t.loading,class:"flex-grow-1 flex-column","content-class":"flex-column flex-grow-1"},{default:e.withCtx(()=>[e.createVNode(u,{class:"flex-grow-1 bordered",style:{height:"50px"},"content-class":"flex-column gap25","content-style":"padding: 4px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.source,x=>(e.openBlock(),e.createBlock(i,{checked:x.isSelected,"onUpdate:checked":I=>x.isSelected=I,style:{"align-items":"center"}},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"source",{item:x.value,isSelected:x.isSelected},()=>[e.createTextVNode(e.toDisplayString(x.value),1)])]),_:2},1032,["checked","onUpdate:checked"]))),256))]),_:3})]),_:3},8,["show"]),e.createElementVNode("div",ac,[e.createVNode(d,{text:"",onClick:l[1]||(l[1]=()=>t.selectAll(t.source))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Select All")),1)]),_:1}),e.createVNode(d,{text:"",onClick:l[2]||(l[2]=()=>t.inverseSelect(t.source))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Inverse Selection")),1)]),_:1})])]),e.createElementVNode("div",sc,[e.createVNode(d,{onClick:t.moveRight},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(h)]),_:1})]),_:1},8,["onClick"]),e.createVNode(d,{onClick:t.moveLeft},{default:e.withCtx(()=>[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(b)]),_:1})]),_:1},8,["onClick"])]),e.createElementVNode("div",ic,[e.createVNode(u,{class:"flex-grow-1 bordered","content-class":"flex-column gap25","content-style":"padding: 4px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.target,x=>(e.openBlock(),e.createBlock(i,{checked:x.isSelected,"onUpdate:checked":I=>x.isSelected=I,style:{"align-items":"center"}},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"target",{item:x.value,isSelected:x.isSelected},()=>[e.createTextVNode(e.toDisplayString(x.value),1)])]),_:2},1032,["checked","onUpdate:checked"]))),256))]),_:3}),e.createElementVNode("div",cc,[e.createVNode(d,{text:"",onClick:l[3]||(l[3]=()=>t.selectAll(t.target))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Select All")),1)]),_:1}),e.createVNode(d,{text:"",onClick:l[4]||(l[4]=()=>t.inverseSelect(t.target))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.t("Inverse Selection")),1)]),_:1})])])])}const Nn=re(nc,[["render",dc]]),xn=re(e.defineComponent({__name:"MainDetailPanel",props:{direction:{default:"vertical"},initialRatio:{default:.618},minSize:{default:100},mainPanelStyle:{},mainPanelClass:{},detailPanelStyle:{},detailPanelClass:{},detailFolded:{type:Boolean,default:!1}},setup(t){const l=t,o=e.ref(l.initialRatio),n=e.ref(!1),r=e.ref(void 0),a=e.computed(()=>l.detailFolded?{[l.direction==="horizontal"?"width":"height"]:"100%",[l.direction==="horizontal"?"height":"width"]:"100%"}:{[l.direction==="horizontal"?"width":"height"]:`${o.value*100}%`,[l.direction==="horizontal"?"height":"width"]:"100%"}),s=e.computed(()=>l.detailFolded?{[l.direction==="horizontal"?"width":"height"]:"100%",[l.direction==="horizontal"?"height":"width"]:"100%"}:{[l.direction==="horizontal"?"width":"height"]:`${(1-o.value)*100}%`,[l.direction==="horizontal"?"height":"width"]:"100%"}),c=u=>{u.preventDefault(),l.detailFolded||(n.value=!0)},m=u=>{if(!n.value||!r.value||l.detailFolded)return;const g=r.value.getBoundingClientRect();let d;l.direction==="horizontal"?d=(u.clientX-g.left)/g.width:d=(u.clientY-g.top)/g.height;const h=l.minSize/(l.direction==="horizontal"?g.width:g.height),b=1-h;o.value=Math.max(h,Math.min(b,d))},i=()=>{n.value=!1};return e.onMounted(()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",i)}),e.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",i)}),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["main-detail-panel",[u.direction]]),ref_key:"container",ref:r},[e.createElementVNode("div",{class:e.normalizeClass(["panel main-panel",u.mainPanelClass]),style:e.normalizeStyle([[u.mainPanelStyle,a.value],{}])},[e.renderSlot(u.$slots,"main",{},void 0,!0)],6),u.detailFolded?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["divider",{dragging:n.value}]),onMousedown:c},null,34)),u.detailFolded?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["panel detail-panel",u.detailPanelClass]),style:e.normalizeStyle([[u.detailPanelStyle,s.value],{}])},[e.renderSlot(u.$slots,"detail",{},void 0,!0)],6))],2))}}),[["__scopeId","data-v-ca4664e2"]]),In=e.defineComponent({__name:"NumberInputModal",props:{title:{},message:{},value:{},show:{type:Boolean}},emits:["update:show","commit"],setup(t,{emit:l}){const o=t,{t:n}=Z(),r=e.ref(o.value);return e.watch(()=>o.value,()=>r.value=o.value),(a,s)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{title:a.title,show:a.show,preset:"card",style:{width:"400px"},draggable:"",onClose:s[3]||(s[3]=()=>a.$emit("update:show",!1))},{action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:s[1]||(s[1]=()=>a.$emit("commit",r.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("OK")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:s[2]||(s[2]=()=>a.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NForm),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NGrid),{cols:24,"x-gap":24},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NFormItemGi),{span:24,label:a.message},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInputNumber),{value:r.value,"onUpdate:value":s[0]||(s[0]=c=>r.value=c)},null,8,["value"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["title","show"]))}}),fc={class:"flex-column"},Sn=e.defineComponent({__name:"ObjectTreeView",props:{selectedId:{},rootId:{default:"0"},rootName:{default:"root"},data:{},loadTreeAction:{},moveAction:{},sortAction:{},treeNodeMapper:{},labelRender:{},searchWords:{},iconRender:{},additionKeys:{}},emits:["update:selectedId","update:path"],setup(t,{emit:l}){var H;const o=t,n=l,{t:r}=Z(),a=ie(),s=e.ref(new Array),c=e.ref(void 0),m=(S,y)=>{for(const B of S){if(B.key==y)return[B];if(B.key!=null&&B.key!=null&&B.children&&!B.isLeaf){const A=m(B.children,y);if(A.length)return A.push(B),A}}return[]},i=(S,y)=>{for(let B=0;B<S.length;B++){const A=S[B];if(A.key==y)return{nodes:S,index:B};if(A.children){const D=i(A.children,y);if(D)return D}}return null},u=S=>{const y=m(j.value,S);return y?y.reverse():[]},g=S=>S,d=(S,y=!0)=>{let B=[];if(Array.isArray(S)){const A=(o==null?void 0:o.treeNodeMapper)??g;B=S.map(A)}return y?[{key:o.rootId,label:r(o.rootName),isLeaf:!Array.isArray(B)||B.length==0,children:B}]:B},h=()=>{let S=o.loadTreeAction;S&&(o.additionKeys&&(S=U(S,o.additionKeys)),a.get({url:S,callback:y=>{if(y){const B=d(y);j.value=B,L.value=B.map(A=>A.key)}}}))},b=S=>{const y=j.value;if(y){const B=y.map(A=>A.children?I(A.children):[]);L.value=B.flat()}},x=S=>{const y=j.value;y&&(L.value=y.map(B=>B.key))},I=(S,y)=>{const B=new Array;for(const A of S)if(A.key&&B.push(A.key),A.children){const D=I(A.children);D.length&&B.push(...D)}return B},F=S=>{s.value=S;const y=S.length?S[0]:void 0;n("update:selectedId",y==o.rootId?void 0:y);const B=y?u(y):[];n("update:path",B)},T=S=>e.h("span",null,S.option.label),k=S=>o.iconRender?e.h(f.NIcon,null,{default:()=>{var y;return(y=o.iconRender)==null?void 0:y.call(null,S)}}):S.option.isLeaf?e.h(f.NIcon,null,{default:()=>e.h(cn)}):e.h(f.NIcon,null,{default:()=>e.h(Bt)}),N=S=>{!o.moveAction&&!o.sortAction||(S.dropPosition=="before"||S.dropPosition=="after"?S.dragNode.key&&typeof S.node.key&&E(S.dragNode,S.node,S.dropPosition):S.dropPosition=="inside"&&typeof S.dragNode.key=="number"&&typeof S.node.key=="number"&&V(S.dragNode,S.node))},V=(S,y)=>{const B=o.moveAction;if(!B)return;const A=S.key,D=[S.key],z=y.key;!A||!z||S==y||a.post({url:B,data:{menuItemIds:D,targetId:z},successMessage:"Successful operation.",success:()=>{const P=i(j.value,A);P&&(P.nodes.splice(P.index,1),y.children&&y.children.push(S))}})};async function E(S,y,B){const A=o.sortAction;if(!A)return;const D=S.key;let z=y.key;if(!D||!z||D==z)return;const P=i(j.value,D);if(P){if(B=="after"){const Q=P.nodes.indexOf(y);if(Q>-1&&Q<P.nodes.length-1&&(y=P.nodes[Q+1],z=y.key,!z||D==z))return}a.post({url:A,data:{menuId:D,nextSiblingId:z},successMessage:"Successful operation.",success:()=>{P.nodes.splice(P.index,1);const Q=P.nodes.indexOf(y);Q>-1?P.nodes.splice(Q,0,S):P.nodes.push(S)}})}}const R=S=>{if(S==null&&(S=o.rootId),s.value.includes(S))return;const y=m(j.value,S);y.length&&(L.value=y.map(B=>B.key),s.value=[S])},j=e.ref(d(o.data??[])),L=e.ref(((H=j.value)==null?void 0:H.map(S=>S.key))??[]);return e.watch(()=>o.additionKeys,()=>h()),e.watch(()=>o.loadTreeAction,()=>h()),e.watch(()=>o.data,S=>{S?j.value=d(S):j.value=[]}),e.watch(()=>o.selectedId,S=>{R(S)}),e.onMounted(()=>{h()}),(S,y)=>(e.openBlock(),e.createElementBlock("div",fc,[e.createVNode(e.unref(f.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInput),{placeholder:e.unref(r)("Search"),clearable:"",onChange:y[0]||(y[0]=B=>c.value=B)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pn))]),_:1})]),_:1},8,["placeholder"]),e.createVNode(e.unref(f.NButton),{ghost:"",onClick:h,title:e.unref(r)("Refresh")},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(je))]),_:1})]),_:1},8,["title"]),e.createVNode(e.unref(f.NButton),{ghost:"",onClick:y[1]||(y[1]=()=>b()),title:e.unref(r)("Expand All")},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(si))]),_:1})]),_:1},8,["title"]),e.createVNode(e.unref(f.NButton),{ghost:"",onClick:y[2]||(y[2]=()=>x()),title:e.unref(r)("Collapse All")},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ei))]),_:1})]),_:1},8,["title"])]),_:1}),e.createVNode(e.unref(f.NTree),{class:"flex-grow-1",style:{height:"10px"},"virtual-scroll":"","show-line":"","block-node":"",draggable:S.sortAction!=null||S.moveAction!=null,data:j.value,pattern:c.value,"render-label":T,"render-prefix":k,onDrop:N,"selected-keys":s.value,"default-expanded-keys":L.value,"onUpdate:selectedKeys":F},null,8,["draggable","data","pattern","selected-keys","default-expanded-keys"])]))}}),uc=["src"],Bn=e.defineComponent({__name:"PhotoBox",props:{src:{},fallbackSrc:{}},setup(t){const l=t,n="/img/no_photo.png";let r=!1;function a(s){if(!r){var c=s.target;c instanceof HTMLImageElement&&(r=!0,c.src=l.fallbackSrc??n)}}return e.watch(()=>l.src,()=>{r=!1}),(s,c)=>(e.openBlock(),e.createElementBlock("img",{src:s.src,style:{"border-radius":"0.8em","object-fit":"cover"},onError:a},null,40,uc))}}),pc={class:"flex-column gap05"},mc={key:0},hc={class:"flex-row gap05",style:{"align-items":"center"}},Vn=e.defineComponent({__name:"PrintModal",props:{show:{type:Boolean},title:{default:"Print"},name:{},action:{},additionParams:{},width:{default:"300px"},disabled:{type:Boolean},beforePrint:{}},emits:["update:show"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=ie(),s=e.ref(!1),c=e.ref(u()),m=e.ref(g()),i=[{label:r("Collated (123-123-123)"),value:"Collated"},{label:r("Uncollated (111-222-333)"),value:"Uncollated"}];function u(){if(o.name){const h=Number(localStorage.getItem(`${o.name}:print-copies`));if(h&&h>0)return h}return 1}function g(){if(o.name){const h=localStorage.getItem(`${o.name}:print-collate`);if(h&&(h=="Collated"||h=="Uncollated"))return h}return"Collated"}function d(){if(o.disabled||s.value)return;const h={action:o.action,collate:m.value,copies:c.value,additionParams:o.additionParams};if(o.beforePrint&&o.beforePrint(h)==!1)return;let b=h.action;b&&(b=U(b,[{collate:h.collate,copies:h.copies},h.additionParams]),o.name&&(localStorage.setItem(`${o.name}:print-collate`,m.value),localStorage.setItem(`${o.name}:print-copies`,c.value.toString())),s.value=!1,a.openFile({url:b,loadingStatus:x=>s.value=x,callback:()=>{s.value=!1,n("update:show",!1)}}))}return(h,b)=>(e.openBlock(),e.createBlock(e.unref(f.NModal),{class:"custom-card",show:h.show,preset:"card",style:e.normalizeStyle({width:h.width}),onClose:b[3]||(b[3]=()=>h.$emit("update:show",!1))},{header:e.withCtx(()=>[e.createElementVNode("div",hc,[e.createVNode(e.unref(f.NIcon),{size:"16"},{default:e.withCtx(()=>[e.createVNode(e.unref(Qa))]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(r)(h.title)),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{onClick:d,style:{"min-width":"100px"},type:"primary",loading:s.value,disable:!h.action||h.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Print")),1)]),_:1},8,["loading","disable"]),e.createVNode(e.unref(f.NButton),{onClick:b[2]||(b[2]=()=>h.$emit("update:show",!1)),style:{"min-width":"100px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",pc,[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Number of print copies"))+":",1),e.createVNode(e.unref(f.NInputNumber),{value:c.value,"onUpdate:value":b[0]||(b[0]=x=>c.value=x),min:"1"},null,8,["value"])]),c.value>1?(e.openBlock(),e.createElementBlock("div",mc,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("Copies print order")),1),e.createVNode(e.unref(f.NSelect),{options:i,value:m.value,"onUpdate:value":b[1]||(b[1]=x=>m.value=x)},null,8,["value"])])):e.createCommentVNode("",!0)])]),_:3},8,["show","style"]))}}),gc={key:0,style:{"text-align":"center"}},yc=["src"],wc={key:1,style:{"text-align":"center"}},Mn=e.defineComponent({__name:"QrModal",props:{title:{default:"QR Code"},code:{},show:{type:Boolean}},emits:["update:show"],setup(t,{emit:l}){const o=t,{t:n}=Z(),r=e.computed(()=>`/api/core/QR/Image?code=${encodeURIComponent(o.code||"")}&format=CODE_128&width=200&height=200`);return(a,s)=>{const c=e.resolveComponent("n-text");return e.openBlock(),e.createBlock(e.unref(f.NModal),{show:a.show,"onUpdate:show":s[1]||(s[1]=m=>a.$emit("update:show",m)),preset:"card",title:e.unref(n)(a.title),style:{"max-width":"350px"}},{default:e.withCtx(()=>[a.code?(e.openBlock(),e.createElementBlock("div",gc,[e.createElementVNode("img",{src:r.value},null,8,yc),e.createVNode(e.unref(f.NH3),{style:{margin:"1em"}},{default:e.withCtx(()=>[e.createVNode(c,{class:"text-monospace"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.code),1)]),_:1})]),_:1}),e.createVNode(e.unref(f.NButton),{onClick:s[0]||(s[0]=()=>a.$emit("update:show",!1)),type:"primary",style:{width:"200px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("Close")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",wc,[e.createVNode(e.unref(f.NEmpty))]))]),_:1},8,["show","title"])}}}),Cc={class:"flex-row",style:{"align-items":"center"}},bc={style:{"margin-left":"0.5em"}},Tn=e.defineComponent({__name:"SearchCard",props:{title:{default:"Search"},config:{},multiSelect:{type:Boolean,default:!0},autoClose:{type:Boolean,default:!0},searchOnMounted:{type:Boolean},additionQuery:{}},emits:["searchBack"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref([]),s=(i,u)=>{a.value=u??[]},c=()=>{a&&n("searchBack",a.value,o.config)},m=i=>{i&&i.length&&n("searchBack",i,o.config)};return(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NCard),{class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createElementVNode("div",Cc,[e.createVNode(e.unref(f.NIcon),{color:"#3F51B5",size:"20"},{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1}),e.createElementVNode("span",bc,e.toDisplayString(e.unref(r)(i.title)),1)])]),action:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px"},disabled:a.value.length==0,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1},8,["disabled"])]),default:e.withCtx(()=>[e.createVNode(Ze,{class:"flex-grow-1",config:i.config,"multi-select":i.multiSelect,"auto-close":i.autoClose,"addition-query":i.additionQuery,onResultSelected:s,onSearchBack:m},null,8,["config","multi-select","auto-close","addition-query"])]),_:1}))}});class kc{constructor(){X(this,"rows",Array());X(this,"totalRecords",null);X(this,"pageIndex",0);X(this,"pageSize",10);X(this,"pageCount",null);X(this,"noTotal",!1);X(this,"message",null);X(this,"summary",null);X(this,"currentPageRecords",0);X(this,"meta")}}const Nc={class:"flex-grow-1 flex-column"},xc={class:"icon-container"},Ic=["title"],Ye="browse_icon_directory",An="page_index",En="search_words",_n=32,zt=re(e.defineComponent({__name:"SelectIconBox",emits:["update:selected"],setup(t,{emit:l}){const o=l,{t:n}=Z(),r=ie(),a=e.ref(sessionStorage.getItem(Ye)),s=e.ref(d(void 0)),c=e.ref([]),m=e.ref(1),i=e.ref(0),u=e.ref(!1),g=e.ref(sessionStorage.getItem(En));function d(T){const k=[{name:n("Root"),path:"/"}];if(T){for(;T.startsWith("/")||T.startsWith("\\");)T=T.substring(1);const N=T.split(/[\\/]+/);let V="/";for(const E of N){V+=E;const R={name:E,path:V};k.push(R),V+="/"}}return k}function h(T){T.isDirectory?a.value=T.path:T.path&&o("update:selected",T.path)}function b(){I(0)}function x(T){I(T-1)}function I(T){T=Math.max(0,T);let k=`/api/core/SystemIcons/page?pageSize=${_n}&pageIndex=${T}`;var N=g.value;N&&(k+=`&searchWords=${encodeURIComponent(N)}`);const V=a.value;V&&(k+=`&directory=${encodeURIComponent(V)}`),r.get({url:k,callback:E=>{E&&(c.value=E.rows,i.value=E.totalRecords,m.value=E.pageIndex+1,F(E.pageIndex,V,N))},loadingStatus:E=>u.value=E})}function F(T,k,N){sessionStorage.setItem(An,T.toString()),k?sessionStorage.setItem(Ye,k):sessionStorage.removeItem(Ye),N?sessionStorage.setItem(En,N):sessionStorage.removeItem(Ye)}return e.watch(a,T=>{s.value=d(T),I(0)}),e.onMounted(()=>{s.value=d(a.value);let T=Number(sessionStorage.getItem(An));I(T||0)}),(T,k)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createElementVNode("div",null,[e.createVNode(e.unref(f.NBreadcrumb),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,N=>(e.openBlock(),e.createBlock(e.unref(f.NBreadcrumbItem),{key:N.path},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{text:"",onClick:()=>a.value=N.path,title:N.path},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Fo))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name)+" ",1)]),_:2},1032,["onClick","title"])]),_:2},1024))),128))]),_:1})]),e.createVNode(e.unref(f.NCard),{class:"flex-grow-1","content-class":"flex-column"},{header:e.withCtx(()=>[e.createVNode(e.unref(f.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInput),{style:{width:"250px"},placeholder:e.unref(n)("Quick Search"),clearable:"",onChange:b,value:g.value,"onUpdate:value":k[0]||(k[0]=N=>g.value=N)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),_:1},8,["placeholder","value"]),e.createVNode(e.unref(f.NButton),{title:e.unref(n)("Search"),onClick:b,style:{padding:"0 8px"}},{icon:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pe))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(n)("Search")),1)]),_:1},8,["title"])]),_:1})]),footer:e.withCtx(()=>[e.createVNode(e.unref(f.NPagination),{page:m.value,"onUpdate:page":[k[1]||(k[1]=N=>m.value=N),x],"item-count":i.value??0,"page-size":_n},{suffix:e.withCtx(({startIndex:N,endIndex:V,itemCount:E})=>[E?(e.openBlock(),e.createBlock(e.unref(f.NText),{key:0,italic:"",depth:"3"},{default:e.withCtx(()=>[e.createTextVNode("["+e.toDisplayString(N+1)+"~"+e.toDisplayString(V+1)+"] / "+e.toDisplayString(E),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:1},8,["page","item-count"])]),default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpin),{show:u.value,class:"flex-grow-1 flex-column","content-class":"flex-grow-1 flex-column"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NScrollbar),{"x-scrollable":"",class:"flex-grow-1",style:{"min-height":"100%","min-width":"100%",overflow:"auto",height:"1px",width:"1px"}},{default:e.withCtx(()=>[e.createElementVNode("div",xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,N=>(e.openBlock(),e.createBlock(e.unref(f.NButton),{quaternary:"",class:"icon-button",onClick:()=>h(N)},{default:e.withCtx(()=>[e.createElementVNode("div",{style:{overflow:"hidden"},title:N.name},[e.createElementVNode("div",null,[N.isDirectory?(e.openBlock(),e.createBlock(e.unref(f.NIcon),{key:0,size:"48",color:"#FFCA28"},{default:e.withCtx(()=>[e.createVNode(e.unref(Fo))]),_:1})):(e.openBlock(),e.createBlock(e.unref(f.NImage),{key:1,width:"48",height:"48","preview-disabled":"",src:"/api/core/SystemIcons/Icons?path="+N.path},null,8,["src"]))]),e.createElementVNode("div",null,e.toDisplayString(N.name),1)],8,Ic)]),_:2},1032,["onClick"]))),256))])]),_:1})]),_:1},8,["show"])]),_:1})]))}}),[["__scopeId","data-v-ff87aac6"]]),zn=e.defineComponent({__name:"SelectObjectModal",props:{show:{type:Boolean},title:{default:"Select Object"},items:{},getListAction:{},width:{default:300},keyName:{default:"id"},selectedValue:{},message:{},description:{}},emits:["update:show","valueSelected"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=f.useMessage(),s=e.inject("axios"),c=e.ref(u(o.items)),m=e.ref(!1),i=e.ref(o.selectedValue);function u(h){if(h){if(!h.length||typeof h[0]=="object")return h}else return[];const b=[];for(let x of h)typeof x=="string"||typeof x=="number"?b.push({id:x.toString(),code:r(x.toString())}):b.push(x);return b}async function g(){var b;if(m.value)return;const h=o.getListAction;if(!h){c.value=[];return}try{m.value=!0;const x=await s.get(h);x.isSuccess&&x.value!=null?Array.isArray(x.value)?c.value=x.value:Array.isArray((b=x.value)==null?void 0:b.rows)?c.value=x.value.rows:c.value=[]:a.error(r(x.errorMessage||"Error"))}catch(x){console.log(x),a.error((x==null?void 0:x.toString())||r("Error"))}finally{m.value=!1}}function d(){i.value&&n("valueSelected",i.value)}return e.onMounted(()=>{o.getListAction&&g()}),e.watch(()=>o.getListAction,()=>{g()}),(h,b)=>(e.openBlock(),e.createBlock(e.unref(f.NSpin),{show:m.value},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NModal),{show:h.show,style:e.normalizeStyle({width:h.width+"px",minWidth:"100px"}),preset:"card",title:e.unref(r)(h.title),onClose:b[2]||(b[2]=()=>h.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:"",align:"stretch"},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"header"),e.createVNode(e.unref(f.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)),1)]),_:1}),e.createVNode(e.unref(f.NRadioGroup),{value:i.value,"onUpdate:value":b[0]||(b[0]=x=>i.value=x),name:"valueList",style:{display:"block"}},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NSpace),{vertical:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,x=>(e.openBlock(),e.createBlock(e.unref(f.NRadio),{key:x[h.keyName],value:x[h.keyName]},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{data:x},()=>[e.createTextVNode(e.toDisplayString(x.code)+" "+e.toDisplayString(x.name),1)])]),_:2},1032,["value"]))),128))]),_:3})]),_:3},8,["value"]),e.createVNode(e.unref(f.NText),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.description),1)]),_:1}),e.renderSlot(h.$slots,"bottom"),e.createVNode(e.unref(f.NSpace),{justify:"space-between"},{default:e.withCtx(()=>[e.createVNode(e.unref(f.NButton),{type:"primary",style:{"min-width":"100px","margin-right":"1rem"},onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("OK")),1)]),_:1}),e.createVNode(e.unref(f.NButton),{style:{"min-width":"100px"},onClick:b[1]||(b[1]=()=>h.$emit("update:show",!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("Cancel")),1)]),_:1})]),_:1})]),_:3})]),_:3},8,["show","style","title"])]),_:3},8,["show"]))}});function Ln(t,l){for(let o of t){if(o.guid==l)return o;if(Array.isArray(o.items)){const n=Ln(o.items,l);if(n)return n}}}const Lt=()=>{const t={};function l(n,r,a){return!!(r&&r.includes(a)||n.title&&n.title.includes(a)||n.url&&n.url.includes(a))}function o(n,r,a,s){var m;const c=new Array;if(r){let i=0,u=!1;for(const g of r)if(g.isEnabled!==!1)if(g.isSeparator)u||(c.push({type:"divider",key:`_${a}_${i++}`}),u=!0);else{const d=n(g.title),h={key:g.guid,id:g.guid,label:d,disabled:!g.isEnabled,href:g.url,tabBehavior:g.tabBehavior};if(g.items&&g.items.length)h.children=o(n,g.items,g.guid,s);else if(s&&!l(g,d,s))continue;g.guid&&g.icon&&(t[g.guid]={icon:g.icon,color:g.color}),((m=h.children)!=null&&m.length||h.href)&&c.push(h),u=!1}}return c.every(i=>i.type=="divider")?[]:c}return{menuLooks:t,systemMenuToNaiveMenu:o}},Dn=e.defineComponent({__name:"SideMenu",props:{collapsed:{type:Boolean},currentMenuId:{}},setup(t){const{t:l}=Z(),o=e.inject("axios"),n=Ie(),r=/^https?:\/\//i,a=e.ref([]),s=e.ref(void 0),c=Lt(),m=e.computed(()=>c.systemMenuToNaiveMenu(l,n.menus,void 0,s.value)),i=e.computed(()=>n.isLoadingMenu);function u(h){if(typeof h.href=="string"&&h.href&&!h.children){let b=h.href.startsWith("~")?h.href.substring(1):h.href;h.id&&(b=U(b,{_menuid:h.id}));let x;return h.tabBehavior=="NewTab"?x="_blank":h.tabBehavior=="NamedTab"&&(x=h.id),r.test(b)?e.h("a",{href:b,target:"_blank"},{default:()=>h.label}):e.h(ce.RouterLink,{to:b,target:x},{default:()=>h.label})}else return typeof h.label=="string"?h.label:""}function g(h){var b,x,I;if(h.key){const F=(b=c.menuLooks[h.key])==null?void 0:b.icon;if(F)return e.h(xe,{path:F,class:"menu-icon"});if((x=h.children)!=null&&x.length){const T=(I=h.key)==null?void 0:I.toString();return T&&a.value.includes(T)?e.h(f.NIcon,{class:"menu-icon"},{default:()=>e.h(di)}):e.h(f.NIcon,{class:"menu-icon"},{default:()=>e.h(Bt)})}else return e.h(f.NIcon,{class:"menu-icon"},{default:()=>e.h(cn)})}}function d(h){if(h)try{o.post(`/api/core/UserRecentMenus/add?menuId=${encodeURIComponent(h)}`)}catch(b){console.error(b)}}return e.onMounted(()=>{!n.menus&&!n.isLoadingMenu&&n.sessionToken&&n.loadMenus()}),e.watch(()=>n.sessionToken,()=>n.loadMenus()),(h,b)=>{const x=e.resolveComponent("n-scrollbar"),I=e.resolveComponent("n-input");return e.openBlock(),e.createBlock(e.unref(f.NSpin),{show:i.value,class:"h-100 menu-spin","content-class":"flex-column h-100"},{default:e.withCtx(()=>[e.createVNode(x,null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NMenu),{collapsed:h.collapsed,"collapsed-width":64,"collapsed-icon-size":22,options:m.value,"root-indent":16,indent:16,"render-label":u,"render-icon":g,value:h.currentMenuId,accordion:!0,"onUpdate:expandedKeys":b[0]||(b[0]=F=>a.value=F),"onUpdate:value":d},null,8,["collapsed","options","value"])]),_:1}),e.withDirectives(e.createVNode(I,{style:{width:"250px"},placeholder:e.unref(l)("Search Menu"),clearable:"",onChange:b[1]||(b[1]=F=>s.value=F)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(f.NIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(pn))]),_:1})]),_:1},8,["placeholder"]),[[e.vShow,!h.collapsed]])]),_:1},8,["show"])}}}),Sc=["src"],$n=e.defineComponent({__name:"SystemIconInput",props:{value:{},label:{},placeholder:{},readonly:{type:Boolean},clearable:{type:Boolean,default:!0}},emits:["update:value"],setup(t,{emit:l}){const o=t,n=l,{t:r}=Z(),a=e.ref(!1),s=e.ref(void 0);function c(){a.value=!a.value}function m(i){i!=null&&!o.readonly&&(n("update:value",i),a.value=!1)}return e.watch(()=>o.value,i=>{i?s.value=`/api/core/SystemIcons/Icons?path=${encodeURIComponent(i)}`:s.value=void 0}),(i,u)=>(e.openBlock(),e.createBlock(e.unref(f.NInputGroup),null,{default:e.withCtx(()=>[e.createVNode(e.unref(f.NInputGroupLabel),{style:{display:"flex","justify-content":"center","align-items":"center",width:"40px"}},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.value,style:{height:"16px",width:"16px","align-self":"center"}},null,8,Sc)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.unref(f.NInput),{readonly:i.readonly,value:i.value,placeholder:i.placeholder,"onUpdate:value":u[0]||(u[0]=g=>i.$emit("update:value",g)),clearable:i.clearable},null,8,["readonly","value","placeholder","clearable"]),e.createVNode(e.unref(f.NButton),{ghost:"",onClick:c,disabled:i.readonly},{default:e.withCtx(()=>u[4]||(u[4]=[e.createTextVNode(" … ",-1)])),_:1,__:[4]},8,["disabled"]),e.createVNode(e.unref(f.NModal),{show:a.value,"onUpdate:show":u[2]||(u[2]=g=>a.value=g),title:e.unref(r)("Select Icon"),onClose:u[3]||(u[3]=()=>a.value=!1),preset:"card",style:{width:"730px",height:"600px"},"content-style":"display: flex; flex-direction: column;"},{default:e.withCtx(()=>[e.createVNode(zt,{"onUpdate:selected":u[1]||(u[1]=g=>m(g))})]),_:1},8,["show","title"])]),_:1}))}}),Bc=e.defineComponent({components:{NButton:f.NButton,NIcon:f.NIcon},props:{title:String,iconColor:String,icon:Object},setup(){const{t}=Z();return{t}}});function Vc(t,l,o,n,r,a){const s=e.resolveComponent("n-icon"),c=e.resolveComponent("n-button");return e.openBlock(),e.createBlock(c,null,e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.title?t.t(t.title):""),1)]),_:2},[t.icon?{name:"icon",fn:e.withCtx(()=>[e.createVNode(s,{color:t.iconColor},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.icon),1)]),_:1},8,["color"])]),key:"0"}:void 0]),1024)}const On=re(Bc,[["render",Vc]]),Mc=e.defineComponent({name:"TopMenu",components:{NMenu:f.NMenu,NSpin:f.NSpin},setup(){const{t}=Z(),l=e.inject("axios"),o=Ie(),n=/^https?:\/\//i,r=Lt(),a=e.computed(()=>r.systemMenuToNaiveMenu(t,o.menus)),s=e.computed(()=>o.isLoadingMenu);function c(u){if(typeof u.href=="string"&&u.href&&!u.children){let g=u.href.startsWith("~")?u.href.substr(1):u.href;u.id&&(g=U(g,{_menuid:u.id}));let d;return u.tabBehavior=="NewTab"?d="_blank":u.tabBehavior=="NamedTab"&&(d=u.id),n.test(g)?e.h("a",{href:g,target:"_blank"},{default:()=>u.label}):e.h(ce.RouterLink,{to:g,target:d},{default:()=>u.label})}else return u.label}function m(u){var g,d;if(u.key){const h=(g=r.menuLooks[u.key])==null?void 0:g.icon;return h?e.h(xe,{path:h,class:"menu-icon"}):(d=u.children)!=null&&d.length?void 0:e.h("div",{class:"menu-icon-blank"},[])}}function i(u){if(u)try{l.post(`/api/core/UserRecentMenus/add?menuId=${encodeURIComponent(u)}`)}catch(g){console.error(g)}}return e.onMounted(()=>{!o.menus&&!o.isLoadingMenu&&o.sessionToken&&o.loadMenus()}),e.watch(()=>o.sessionToken,()=>o.loadMenus()),{menuOptions:a,isLoadingMenu:s,renderMenuLabel:c,renderMenuIcon:m,onMenuSelected:i}}});function Tc(t,l,o,n,r,a){const s=e.resolveComponent("n-menu"),c=e.resolveComponent("n-spin");return e.openBlock(),e.createBlock(c,{show:t.isLoadingMenu},{default:e.withCtx(()=>[e.createVNode(s,{mode:"horizontal",options:t.menuOptions,"render-label":t.renderMenuLabel,"render-icon":t.renderMenuIcon,"onUpdate:value":t.onMenuSelected},null,8,["options","render-label","render-icon","onUpdate:value"])]),_:1},8,["show"])}const Rn=re(Mc,[["render",Tc]]),Ac=e.defineComponent({name:"TreeView",emits:["update:selectedId","update:path"],props:{selectedId:[Number,String],path:Array,rootId:{type:[Number,String],default:""},rootName:{type:String,default:"Root"},parentKey:{type:String,default:"parentId"},childrenAction:String,moveAction:String,sortAction:String,treeNodeMapper:Function,labelRender:Function},setup(t,l){const o=f.useMessage(),n=e.inject("axios"),{t:r}=Z(),a=e.ref(new Array),s=e.ref(new Array),c=e.ref(new Array);function m(L,H){for(const S of L){if(S.key==H)return{node:S,path:[S.key]};if(S.key!=null&&S.key!=null&&S.children&&!S.isLeaf){const y=m(S.children,H);if(y)return{node:y,path:[S.key,...y.path]}}}return null}function i(L,H){for(let S=0;S<L.length;S++){const y=L[S];if(y.key==H)return{nodes:L,index:S};if(y.children){const B=i(y.children,H);if(B)return B}}return null}function u(L){const H=m(a.value,L);return H?H.path:[]}function g(L,H){const S=new Array;for(const y of L)if(y.key&&(!H||H(y.key))&&S.push(y.key),y.children){const B=g(y.children,H);B.length&&S.push(...B)}return S}function d(L){s.value=L}function h(L){c.value=L;const H=L.length?L[0]:null;l.emit("update:selectedId",H);const S=H?u(H):[];l.emit("update:path",S)}function b(L){return t.treeNodeMapper?t.treeNodeMapper.call(void 0,L):{key:L.id,label:L.title,isLeaf:!L.hasSubitems}}async function x(L){const H=t.childrenAction,S=t.parentKey;if(!(!H||!S))try{const y=U(H,{parentKey:S,parentId:L}),B=await n.get(y);if(B.isSuccess&&B.value!=null)return B.value.map(b);o.error(r(B.errorMessage||"Error"))}catch(y){console.log(y),o.error((y==null?void 0:y.toString())||r("Error"))}}async function I(){a.value=[{key:t.rootId,label:r(t.rootName||"Root"),isLeaf:!1,children:await x(null)}],t.selectedId==null?c.value=[t.rootId]:t.selectedId?c.value=[t.selectedId]:c.value=[],s.value=[t.rootId]}async function F(L){const H=L.key;if(H!=null){if(L.children){const y=s.value,B=g(L.children,A=>y.includes(A));s.value=s.value.filter(A=>!B.includes(A))}const S=await x(H);S&&(L.isLeaf=!S.length,L.children=S.length?S:void 0)}}function T(L){return e.h("span",null,L.option.label)}function k(L){if(!L.option.isLeaf)return e.h(f.NIcon,null,{default:()=>e.h(Bt)})}function N(L){const H=L.option.key;if(H!=null&&c.value.includes(H))return e.h(f.NButton,{text:!0,onClick:S=>{S.stopPropagation(),F(L.option)}},{default:()=>e.h(f.NIcon,null,{default:()=>e.h(je)})})}function V(L){!t.moveAction&&!t.sortAction||(L.dropPosition=="before"||L.dropPosition=="after"?L.dragNode.key&&typeof L.node.key&&R(L.dragNode,L.node,L.dropPosition):L.dropPosition=="inside"&&typeof L.dragNode.key=="number"&&typeof L.node.key=="number"&&E(L.dragNode,L.node))}async function E(L,H){const S=t.moveAction;if(!S)return;const y=L.key,B=[L.key],A=H.key;if(!(!y||!A||L==H))try{const D=await n.post(S,{menuItemIds:B,targetId:A});if(D.isSuccess){o.success(r("Successful operation."));const z=i(a.value,y);z&&(z.nodes.splice(z.index,1),H.children?H.children.push(L):F(H))}else o.error(r(D.errorMessage||"Error"))}catch(D){console.log(D),o.error((D==null?void 0:D.toString())||"Error")}}async function R(L,H,S){const y=t.sortAction;if(!y)return;console.log(`dragNode: ${L.key} ${L.label}, targetNode: ${H.key} ${H.label}, dropPosition: ${S}`);const B=L.key;let A=H.key;if(!B||!A||B==A)return;const D=i(a.value,B);if(D){if(S=="after"){const z=D.nodes.indexOf(H);if(z>-1&&z<D.nodes.length-1&&(H=D.nodes[z+1],A=H.key,!A||B==A))return}try{const z=await n.post(y,{menuId:B,nextSiblingId:A});if(z.isSuccess){o.success(r("Successful operation.")),D.nodes.splice(D.index,1);const P=D.nodes.indexOf(H);P>-1?D.nodes.splice(P,0,L):D.nodes.push(L)}else o.error(r(z.errorMessage||"Error"))}catch(z){console.log(z),o.error((z==null?void 0:z.toString())||"Error")}}}async function j(L){var H;if(L.length){let S=(H=a.value)==null?void 0:H.find(D=>D.key==L[0]);S==null&&(S={key:L[0],label:r(t.rootName||"Root"),isLeaf:!1},a.value.push(S));let y=L[0],B=S;for(let D=1;D<L.length-1&&B;D++)if(B.children||(B.children=await x(y)),B.children){const z=L[D];B=B.children.find(P=>P.key==z),y=z}const A=s.value;for(let D=0;D<L.length-1;D++)A.includes(L[D])||A.push(L[D]);s.value=A,c.value=[L[L.length-1]]}}return e.onMounted(()=>{I()}),e.watch(()=>t.childrenAction,()=>{I()}),e.watch(()=>t.path,L=>{L&&j(L)}),{data:a,expandedKeys:s,expandedKeysChanged:d,loadChildren:F,dragDrop:V,renderLabel:T,renderPrefix:k,renderSuffix:N,selectedKeys:c,selectedKeysChanged:h}}});function Ec(t,l,o,n,r,a){const s=e.resolveComponent("n-tree");return e.openBlock(),e.createBlock(s,{"block-line":"",remote:t.childrenAction!=null,draggable:t.sortAction!=null||t.moveAction!=null,data:t.data,"render-label":t.renderLabel,"render-prefix":t.renderPrefix,"render-suffix":t.renderSuffix,onLoad:t.loadChildren,onDrop:t.dragDrop,"expanded-keys":t.expandedKeys,"onUpdate:expandedKeys":t.expandedKeysChanged,"selected-keys":t.selectedKeys,"onUpdate:selectedKeys":t.selectedKeysChanged},null,8,["remote","draggable","data","render-label","render-prefix","render-suffix","onLoad","onDrop","expanded-keys","onUpdate:expandedKeys","selected-keys","onUpdate:selectedKeys"])}const jn=re(Ac,[["render",Ec]]),_c=e.defineComponent({components:{ChangePassword:ft,NotificationIcon:ja},setup(){var d;const t=ce.useRouter(),{t:l}=Z(),o=f.useDialog(),n=Ne(),r=Ie(),a=nt(),s=e.computed(()=>r.userInfo),c=e.ref(!1),m="/img/user_avatar.png";function i(){o.warning({title:l("Logout"),content:l("Are you sure log out?"),positiveText:l("OK"),negativeText:l("Cancel"),onPositiveClick:()=>{r.logout(),a.clearTabs(),t.push({path:"/login"})}})}function u(h){switch(h){case"preferences":t.push({path:"/core/preferences"});break;case"change_password":c.value=!0;break;case"logout":i();break;case"toggle_theme":n.toggleTheme();break}}const g=[{label:(d=s.value)==null?void 0:d.userName,type:"group",key:"user_group",children:[{label:l("Preferences"),key:"preferences",icon(){return e.h(f.NIcon,null,{default:()=>e.h(_a)})}},{label:l("Change Password"),key:"change_password",icon(){return e.h(f.NIcon,null,{default:()=>e.h(Fa)})}}]},{label:l("Toggle Theme"),key:"toggle_theme",icon(){return e.h(f.NIcon,null,{default:()=>e.h(ga)})}},{type:"divider"},{label:l("Logout"),key:"logout",icon(){return e.h(f.NIcon,null,{default:()=>e.h(Aa)})}}];return{userInfo:s,options:g,onMenuSelected:u,changePwdBoxShow:c,defaultAvatarPath:m}}}),zc={style:{margin:"0 20px 10px 0",cursor:"pointer"}},Lc={class:"user-name-box"},Dc={class:"user-name-label"};function $c(t,l,o,n,r,a){const s=e.resolveComponent("n-avatar"),c=e.resolveComponent("n-dropdown"),m=e.resolveComponent("change-password"),i=e.resolveComponent("n-space");return e.openBlock(),e.createBlock(i,{style:{"align-items":"center"}},{default:e.withCtx(()=>[e.createVNode(c,{trigger:"click",options:t.options,placement:"bottom-end",onSelect:t.onMenuSelected,size:"medium"},{default:e.withCtx(()=>{var u,g,d;return[e.createElementVNode("div",zc,[e.createVNode(s,{round:"",size:"medium",title:(u=t.userInfo)==null?void 0:u.userName,src:`/api/core/avatar?id=${(g=t.userInfo)==null?void 0:g.avatar}`,"fallback-src":t.defaultAvatarPath,bordered:"",style:{position:"absolute","z-index":"10"}},null,8,["title","src","fallback-src"]),e.createElementVNode("div",Lc,[e.createElementVNode("div",Dc,e.toDisplayString((d=t.userInfo)==null?void 0:d.name),1)])])]}),_:1},8,["options","onSelect"]),e.createVNode(m,{show:t.changePwdBoxShow,onClose:l[0]||(l[0]=()=>t.changePwdBoxShow=!1)},null,8,["show"])]),_:1})}const Pn=re(_c,[["render",$c],["__scopeId","data-v-0d4b7b61"]]),Oc={class:"flex-row"},Rc={class:"app-tab-label"},jc={style:{"margin-left":"4px"}},Fn=e.defineComponent({__name:"TabMenu",props:{type:{default:"card"}},setup(t){const l=ce.useRouter(),o=Ie(),n=e.computed(()=>o.menus),r=e.ref(void 0);l.afterEach(c=>{!c.path||c.path=="/"||c.name=="blank"||(r.value=a(c.path))});function a(c){var i;const m=(i=o.menus)==null?void 0:i.find(u=>{var g;return((g=u.url)==null?void 0:g.toLowerCase())==c.toLowerCase()});if(m)return m.guid}function s(c){var m;if(c){const i=(m=o.menus)==null?void 0:m.find(u=>u.guid==c);i&&i.url&&(l.push(i.url),r.value=i.guid)}}return e.watch(()=>o.sessionToken,()=>o.loadMenus()),e.onMounted(()=>{!o.menus&&!o.isLoadingMenu&&o.sessionToken&&o.loadMenus()}),(c,m)=>n.value&&n.value.length?(e.openBlock(),e.createBlock(e.unref(f.NTabs),{key:0,class:"app-tabs",type:c.type,"justify-content":"space-evenly",animated:"","tab-class":"tab-item","tabs-padding":8,value:r.value,"onUpdate:value":s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,i=>(e.openBlock(),e.createBlock(e.unref(f.NTab),{key:i.guid,name:i.guid},{default:e.withCtx(()=>[e.createElementVNode("div",Oc,[e.createElementVNode("div",null,[i.icon?(e.openBlock(),e.createBlock(xe,{key:0,path:i.icon},null,8,["path"])):(e.openBlock(),e.createBlock(e.unref(f.NIcon),{key:1},{default:e.withCtx(()=>[e.createVNode(e.unref(ui))]),_:1}))]),e.createElementVNode("div",Rc,[e.createElementVNode("span",jc,e.toDisplayString(i.title),1)])])]),_:2},1032,["name"]))),128))]),_:1},8,["type","value"])):e.createCommentVNode("",!0)}});class Pc{constructor(){X(this,"token");X(this,"userId");X(this,"startupTime")}}class Fc{constructor(){X(this,"guid","");X(this,"title","");X(this,"icon");X(this,"color");X(this,"url");X(this,"isSeparator",!1);X(this,"isEnabled",!0);X(this,"groupName");X(this,"description");X(this,"items");X(this,"tabBehavior");X(this,"closable")}}const Hc=$e.defineStore("fontSize",()=>{const t={small:"14px",medium:"16px",large:"20px"},l="medium",o=()=>{var s;const a=(s=localStorage.getItem("fontSizeMode"))==null?void 0:s.toString();return a&&t[a]?a:l},n=e.ref(o());return{fontSizeMode:n,fontSizeOptions:t,setFontSize:a=>{t[a]&&(n.value=a,localStorage.setItem("fontSizeMode",a))},getFontSize:()=>t[n.value??l]}}),Gc={AppLogoBox:Xt,AppTabs:Go,AutoScrollView:Ko,BarcodeImage:Zo,ChangePassword:ft,ColorInput:ut,DefaultPropertyForm:kt,DetailPage:rn,ExportModal:Vt,EmptyDetailView:mn,FormInput:Ve,FullscreenSwitch:hn,GridConfigModal:Tt,HaloButtonSelect:yn,HaloDatePicker:Fe,HaloForm:Cn,HaloGrid:We,HaloModal:bn,HaloModalInput:bt,HaloSelect:kn,HaloTagsInput:wt,HaloTimePicker:ht,HaloTransfer:Nn,ImportModal:Qe,InputModal:_t,ListInputModal:Ct,MainDetailPanel:xn,MenuIcon:xe,NullableBooleanInput:gt,NumberInputModal:In,ObjectTreeView:Sn,PhotoBox:Bn,PrintModal:Vn,PropertyGrid:Nt,QrModal:Mn,SearchCard:Tn,SearchForm:Ke,SearchModal:Et,SearchPanel:Ze,SelectIconBox:zt,SelectObjectModal:zn,SideMenu:Dn,SystemIconInput:$n,TagsView:At,ToolButton:On,TopMenu:Rn,TreeView:jn,UserMenu:Pn,TabMenu:Fn},Kc={install(t,l){const o={...Ho,...l};for(const[n,r]of Object.entries(Gc))t.component(n,r);l!=null&&l.langCode&&t.use(Jt,l==null?void 0:l.langCode,!0),t.provide("axios",le),t.provide(ct,o)}};M.axios=le,M.AppLogoBox=Xt,M.AppTabs=Go,M.AutoScrollView=Ko,M.BarcodeImage=Zo,M.ChangePassword=ft,M.ColorInput=ut,M.DataPage=kc,M.DateFormat=ge,M.DateTimeFormat=Ee,M.DefaultPropertyForm=kt,M.DetailPage=rn,M.EmptyDetailView=mn,M.ExportModal=Vt,M.FormInput=Ve,M.FullscreenSwitch=hn,M.GridConfigModal=Tt,M.HaloButtonSelect=yn,M.HaloDatePicker=Fe,M.HaloForm=Cn,M.HaloGrid=We,M.HaloModal=bn,M.HaloModalInput=bt,M.HaloSelect=kn,M.HaloTagsInput=wt,M.HaloTimePicker=ht,M.HaloTransfer=Nn,M.HalovConfigKey=ct,M.I18nPlugin=Jt,M.ImportModal=Qe,M.InputModal=_t,M.ListInputModal=Ct,M.MainDetailPanel=xn,M.MenuIcon=xe,M.NullableBooleanInput=gt,M.NumberInputModal=In,M.ObjectTreeView=Sn,M.PhotoBox=Bn,M.PrintModal=Vn,M.PropertyGrid=Nt,M.QrModal=Mn,M.SearchCard=Tn,M.SearchForm=Ke,M.SearchModal=Et,M.SearchPanel=Ze,M.SelectIconBox=zt,M.SelectObjectModal=zn,M.SessionSummary=Pc,M.SideMenu=Dn,M.SystemIconInput=$n,M.SystemMenu=Fc,M.TabMenu=Fn,M.TagsView=At,M.TimeFormat=_e,M.ToolButton=On,M.TopMenu=Rn,M.TreeView=jn,M.UserMenu=Pn,M.addDays=vr,M.appendParamsToUrl=U,M.arrayGroupBy=gs,M.arrayMove=ln,M.arrayRemoveIf=nn,M.buildBarcodeUrl=Wo,M.buildSearchItems=vo,M.camelToWords=te,M.clearObject=as,M.convertItems=Uo,M.convertPercentValue=Oo,M.convertTo=Re,M.copyEntity=qo,M.copyToEntity=Xo,M.createGridColumns=Be,M.createI18n=Yt,M.dateTimeToString=st,M.dateToNumber=Eo,M.dateToString=zo,M.default=Kc,M.defaultHalovOptions=Ho,M.defaultValue=$o,M.downloadFile=me,M.findMenuById=Ln,M.firstDayOfMonth=ea,M.formatTimespan=Lo,M.getColumnWidth=pt,M.getConfig=dt,M.iconRender=mt,M.iconRenderIf=cs,M.initEntity=Jo,M.instanceOfColumnValueSource=Yo,M.instanceOfHaloColumn=Se,M.instanceOfTime=Mo,M.isNullOrWhiteSpace=Ro,M.lastDayOfMonth=ta,M.linesToArray=na,M.loadItemSources=Pe,M.mergeRoutes=ws,M.msToTime=Jr,M.onNullOrWhiteSpace=ra,M.openFile=on,M.renderDifference=fs,M.renderIconButton=ds,M.renderLabel=is,M.searchField=ys,M.secondsToTime=To,M.splitNumberByCount=Cs,M.splitNumberBySize=bs,M.stringToArray=oa,M.stringToTime=Ao,M.sumNumbers=ks,M.timeToString=_o,M.timestamp=qr,M.toBool=de,M.toBoolDefault=Oe,M.toDate=Vo,M.toViewModel=Ur,M.useAccountStore=Ie,M.useCommonStore=Ne,M.useFontSizeStore=Hc,M.useHttpTools=ie,M.useI18n=Z,M.useMenus=Lt,M.usePermissions=Mt,M.useTabsStore=nt,M.useUiTools=yt,M.validateEmail=la,Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|