From c4616cbbee59ed430842b3941ffa98e2b837acac Mon Sep 17 00:00:00 2001 From: chenjw28 <792430652@qq.com> Date: Thu, 11 Jun 2026 15:08:42 +0800 Subject: [PATCH] x --- .../src/modules/inventory/InventoryView.vue | 39 +--------- .../inventory/components/InventorySidebar.vue | 74 ++++++++++++++++--- ...YbStPK.js => DesignSystemView-BgxP6Huu.js} | 2 +- ...eView-Dzg7rZr-.js => HomeView-Bo1rHoZv.js} | 2 +- static/assets/InventoryView-BfMUL2um.css | 1 + static/assets/InventoryView-CtU3XJ5c.js | 1 - static/assets/InventoryView-DCFTumSQ.css | 1 - static/assets/InventoryView-DgARKf1e.js | 1 + ...View-n35SYtjJ.js => LoginView-DDsguTRb.js} | 2 +- ...I-bxvRF.js => MoldInsightView-wJ3ZjPar.js} | 2 +- ...ew-KzbAQOU7.js => ReleaseView-CRm-3ZGb.js} | 2 +- ...iew-BxUb7yw9.js => ResultView-CqY_0nu0.js} | 2 +- ...View-CJ8YSEx_.js => UsersView-DOsOx97D.js} | 2 +- .../{index-DhEa-EvN.js => index-EqJJKSSk.js} | 4 +- static/index.html | 2 +- 15 files changed, 79 insertions(+), 58 deletions(-) rename static/assets/{DesignSystemView-DvYbStPK.js => DesignSystemView-BgxP6Huu.js} (78%) rename static/assets/{HomeView-Dzg7rZr-.js => HomeView-Bo1rHoZv.js} (99%) create mode 100644 static/assets/InventoryView-BfMUL2um.css delete mode 100644 static/assets/InventoryView-CtU3XJ5c.js delete mode 100644 static/assets/InventoryView-DCFTumSQ.css create mode 100644 static/assets/InventoryView-DgARKf1e.js rename static/assets/{LoginView-n35SYtjJ.js => LoginView-DDsguTRb.js} (96%) rename static/assets/{MoldInsightView-BI-bxvRF.js => MoldInsightView-wJ3ZjPar.js} (99%) rename static/assets/{ReleaseView-KzbAQOU7.js => ReleaseView-CRm-3ZGb.js} (78%) rename static/assets/{ResultView-BxUb7yw9.js => ResultView-CqY_0nu0.js} (99%) rename static/assets/{UsersView-CJ8YSEx_.js => UsersView-DOsOx97D.js} (98%) rename static/assets/{index-DhEa-EvN.js => index-EqJJKSSk.js} (99%) diff --git a/frontend/src/modules/inventory/InventoryView.vue b/frontend/src/modules/inventory/InventoryView.vue index 6dc5189..b783ba7 100644 --- a/frontend/src/modules/inventory/InventoryView.vue +++ b/frontend/src/modules/inventory/InventoryView.vue @@ -70,7 +70,7 @@ onUnmounted(() => { { .page-header h1 { font-size: var(--text-2xl); font-weight: var(--font-bold); color: var(--text-primary); margin: 0; } .page-header p { color: var(--text-tertiary); margin: var(--space-1) 0 0; font-size: var(--text-sm); } -.inventory-layout { display: flex; gap: var(--space-6); min-height: calc(100vh - 200px); } -.inventory-sidebar-wrapper { width: 200px; flex-shrink: 0; } +.inventory-layout { display: flex; gap: var(--space-6); align-items: flex-start; } +.inventory-sidebar-wrapper { width: 200px; flex-shrink: 0; position: sticky; top: 80px; } .inventory-content { flex: 1; min-width: 0; } .inventory-content-header { margin-bottom: var(--space-4); } .inventory-breadcrumb { font-size: var(--text-sm); color: var(--text-tertiary); } .inventory-breadcrumb .sep { margin: 0 var(--space-2); } .inventory-breadcrumb .current { color: var(--text-primary); font-weight: var(--font-medium); } - -.inventory-sidebar-wrapper :deep(.t-menu) { - border-right: none; - background: transparent; -} -.inventory-sidebar-wrapper :deep(.sidebar-group-title) { - display: flex; - align-items: center; - justify-content: space-between; - padding: var(--space-3) var(--space-4); - font-size: var(--text-xs); - font-weight: var(--font-semibold); - color: var(--text-tertiary); - text-transform: uppercase; - cursor: pointer; - user-select: none; -} -.inventory-sidebar-wrapper :deep(.t-menu__item) { - height: 36px; - line-height: 36px; - font-size: var(--text-sm); - margin: 2px var(--space-2); - border-radius: var(--radius-md); - padding: 0 var(--space-4); -} -.inventory-sidebar-wrapper :deep(.t-is-active) { - background: var(--primary-50); - color: var(--primary-600); - font-weight: var(--font-medium); -} -.inventory-sidebar-wrapper :deep(.t-menu__item:hover) { - background: var(--bg-tertiary); -} diff --git a/frontend/src/modules/inventory/components/InventorySidebar.vue b/frontend/src/modules/inventory/components/InventorySidebar.vue index b5e9d68..7ba23c5 100644 --- a/frontend/src/modules/inventory/components/InventorySidebar.vue +++ b/frontend/src/modules/inventory/components/InventorySidebar.vue @@ -5,34 +5,88 @@ const { state, menuGroups, openGroups, toggleGroup, handleMenuClick } = useInven diff --git a/static/assets/DesignSystemView-DvYbStPK.js b/static/assets/DesignSystemView-BgxP6Huu.js similarity index 78% rename from static/assets/DesignSystemView-DvYbStPK.js rename to static/assets/DesignSystemView-BgxP6Huu.js index 5c94e29..879ceac 100644 --- a/static/assets/DesignSystemView-DvYbStPK.js +++ b/static/assets/DesignSystemView-BgxP6Huu.js @@ -1 +1 @@ -import{E as e,h as t,n,v as r}from"./index-DhEa-EvN.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`设计体系`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file +import{E as e,h as t,n,v as r}from"./index-EqJJKSSk.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`设计体系`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file diff --git a/static/assets/HomeView-Dzg7rZr-.js b/static/assets/HomeView-Bo1rHoZv.js similarity index 99% rename from static/assets/HomeView-Dzg7rZr-.js rename to static/assets/HomeView-Bo1rHoZv.js index 0cc5813..50e9f0e 100644 --- a/static/assets/HomeView-Dzg7rZr-.js +++ b/static/assets/HomeView-Bo1rHoZv.js @@ -1,3 +1,3 @@ -import{C as e,E as t,I as n,M as r,N as i,P as a,S as o,_ as s,b as c,h as l,j as u,n as d,s as f,u as p,v as m,w as h}from"./index-DhEa-EvN.js";function g(e){return e+.5|0}var _=(e,t,n)=>Math.max(Math.min(e,n),t);function v(e){return _(g(e*2.55),0,255)}function y(e){return _(g(e*255),0,255)}function b(e){return _(g(e/2.55)/100,0,1)}function x(e){return _(g(e*100),0,100)}var S={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},C=[...`0123456789ABCDEF`],w=e=>C[e&15],T=e=>C[(e&240)>>4]+C[e&15],E=e=>(e&240)>>4==(e&15),D=e=>E(e.r)&&E(e.g)&&E(e.b)&&E(e.a);function ee(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&S[e[1]]*17,g:255&S[e[2]]*17,b:255&S[e[3]]*17,a:t===5?S[e[4]]*17:255}:(t===7||t===9)&&(n={r:S[e[1]]<<4|S[e[2]],g:S[e[3]]<<4|S[e[4]],b:S[e[5]]<<4|S[e[6]],a:t===9?S[e[7]]<<4|S[e[8]]:255})),n}var O=(e,t)=>e<255?t(e):``;function te(e){var t=D(e)?w:T;return e?`#`+t(e.r)+t(e.g)+t(e.b)+O(e.a,t):void 0}var ne=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function re(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function ie(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ae(e,t,n){let r=re(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function oe(e,t,n,r,i){return e===i?(t-n)/r+(t.5?l/(2-i-a):l/(i+a),s=oe(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function ce(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(y)}function le(e,t,n){return ce(re,e,t,n)}function ue(e,t,n){return ce(ae,e,t,n)}function de(e,t,n){return ce(ie,e,t,n)}function fe(e){return(e%360+360)%360}function pe(e){let t=ne.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?v(+t[5]):y(+t[5]));let i=fe(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?ue(i,a,o):t[1]===`hsv`?de(i,a,o):le(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function me(e,t){var n=se(e);n[0]=fe(n[0]+t),n=le(n),e.r=n[0],e.g=n[1],e.b=n[2]}function he(e){if(!e)return;let t=se(e),n=t[0],r=x(t[1]),i=x(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${b(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var ge={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},_e={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function ve(){let e={},t=Object.keys(_e),n=Object.keys(ge),r,i,a,o,s;for(r=0;r>16&255,a>>8&255,a&255]}return e}var ye;function be(e){ye||(ye=ve(),ye.transparent=[0,0,0,0]);let t=ye[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var xe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Se(e){let t=xe.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?v(e):_(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?v(r):_(r,0,255)),i=255&(t[4]?v(i):_(i,0,255)),a=255&(t[6]?v(a):_(a,0,255)),{r,g:i,b:a,a:n}}}function Ce(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${b(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var we=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,Te=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Ee(e,t,n){let r=Te(b(e.r)),i=Te(b(e.g)),a=Te(b(e.b));return{r:y(we(r+n*(Te(b(t.r))-r))),g:y(we(i+n*(Te(b(t.g))-i))),b:y(we(a+n*(Te(b(t.b))-a))),a:e.a+n*(t.a-e.a)}}function De(e,t,n){if(e){let r=se(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=le(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Oe(e,t){return e&&Object.assign(t||{},e)}function ke(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=y(e[3]))):(t=Oe(e,{r:0,g:0,b:0,a:1}),t.a=y(t.a)),t}function Ae(e){return e.charAt(0)===`r`?Se(e):pe(e)}var je=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=ke(t):n===`string`&&(r=ee(t)||be(t)||Ae(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Oe(this._rgb);return e&&(e.a=b(e.a)),e}set rgb(e){this._rgb=ke(e)}rgbString(){return this._valid?Ce(this._rgb):void 0}hexString(){return this._valid?te(this._rgb):void 0}hslString(){return this._valid?he(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Ee(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=y(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=g(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return De(this._rgb,2,e),this}darken(e){return De(this._rgb,2,-e),this}saturate(e){return De(this._rgb,1,e),this}desaturate(e){return De(this._rgb,1,-e),this}rotate(e){return me(this._rgb,e),this}};function Me(){}var Ne=(()=>{let e=0;return()=>e++})();function k(e){return e==null}function A(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function j(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function M(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function N(e,t){return M(e)?e:t}function P(e,t){return e===void 0?t:e}var Pe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Fe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function F(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function I(e,t,n,r){let i,a,o;if(A(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function We(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function Ge(e){let t=We(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function Ke(e,t){return(Ue[t]||(Ue[t]=Ge(t)))(e)}function qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Je=e=>e!==void 0,Ye=e=>typeof e==`function`,Xe=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Ze(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var L=Math.PI,R=2*L,Qe=R+L,$e=1/0,et=L/180,z=L/2,tt=L/4,nt=L*2/3,rt=Math.log10,B=Math.sign;function it(e,t,n){return Math.abs(e-t)e-t).pop(),t}function st(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function ct(e){return!st(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function lt(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function ut(e,t,n){let r,i,a;for(r=0,i=e.length;rc&&l=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function vt(e,t,n){n||=(n=>e[n]1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var yt=(e,t,n,r)=>vt(e,n,r?r=>{let i=e[r][t];return ie[r][t]vt(e,n,r=>e[r][t]>=n);function xt(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{let n=`_onData`+qe(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function wt(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(St.forEach(t=>{delete e[t]}),delete e._chartjs)}function Tt(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Et=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Dt(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Et.call(window,()=>{r=!1,e.apply(t,n)}))}}function Ot(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var kt=e=>e===`start`?`left`:e===`end`?`right`:`center`,G=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,At=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function jt(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(yt(c,u,d).lo,n?r:yt(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!k(e[s.axis]));i-=Math.max(0,e)}i=U(i,0,r-1)}if(m){let e=Math.max(yt(c,o.axis,f,!0).hi+1,n?0:yt(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!k(e[s.axis]));e+=Math.max(0,t)}a=U(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Mt(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Nt=e=>e===0||e===1,Pt=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*R/n)),Ft=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*R/n)+1,It={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*z)+1,easeOutSine:e=>Math.sin(e*z),easeInOutSine:e=>-.5*(Math.cos(L*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Nt(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Nt(e)?e:Pt(e,.075,.3),easeOutElastic:e=>Nt(e)?e:Ft(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Nt(e)?e:e<.5?.5*Pt(e*2,t,n):.5+.5*Ft(e*2-1,t,n)},easeInBack(e){return e*e*(2.70158*e-1.70158)},easeOutBack(e){return--e*e*(2.70158*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-It.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?It.easeInBounce(e*2)*.5:It.easeOutBounce(e*2-1)*.5+.5};function Lt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Rt(e){return Lt(e)?e:new je(e)}function zt(e){return Lt(e)?e:new je(e).saturate(.5).darken(.1).hexString()}var Bt=[`x`,`y`,`borderWidth`,`radius`,`tension`],Vt=[`color`,`borderColor`,`backgroundColor`];function Ht(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:Vt},numbers:{type:`number`,properties:Bt}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Ut(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Wt=new Map;function Gt(e,t){t||={};let n=e+JSON.stringify(t),r=Wt.get(n);return r||(r=new Intl.NumberFormat(e,t),Wt.set(n,r)),r}function Kt(e,t,n){return Gt(t,n).format(e)}var qt={values(e){return A(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=Jt(e,n)}let o=rt(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Kt(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(rt(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?qt.numeric.call(this,e,t,n):``}};function Jt(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yt={formatters:qt};function Xt(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var Zt=Object.create(null),Qt=Object.create(null);function $t(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>zt(t.backgroundColor),this.hoverBorderColor=(e,t)=>zt(t.borderColor),this.hoverColor=(e,t)=>zt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return en(this,e,t)}get(e){return $t(this,e)}describe(e,t){return en(Qt,e,t)}override(e,t){return en(Zt,e,t)}route(e,t,n,r){let i=$t(this,e),a=$t(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return j(e)?Object.assign({},t,e):P(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Ht,Ut,Xt]);function tn(e){return!e||k(e.size)||k(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function nn(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function rn(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;cn.length){for(c=0;c0&&e.stroke()}}function ln(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,mn(e,a),c=0;c+e||0;function Cn(e,t){let n={},r=j(t),i=r?Object.keys(t):t,a=j(e)?r?n=>P(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=Sn(a(e));return n}function wn(e){return Cn(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Tn(e){return Cn(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function q(e){let t=wn(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(e,t){e||={},t||=K.font;let n=P(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=P(e.style,t.style);r&&!(``+r).match(bn)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:P(e.family,t.family),lineHeight:xn(P(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:P(e.weight,t.weight),string:``};return i.string=tn(i),i}function En(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;an&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function On(e,t){return Object.assign(Object.create(e),t)}function kn(e,t=[``],n,r,i=()=>e[0]){let a=n||e;return r===void 0&&(r=Gn(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>kn([n,...e],t,a,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return Pn(n,r,()=>Wn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Kn(e).includes(t)},ownKeys(e){return Kn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function An(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:jn(e,r),setContext:t=>An(e,t,n,r),override:i=>An(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return Pn(e,t,()=>Fn(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function jn(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ye(n)?n:()=>n,isIndexable:Ye(r)?r:()=>r}}var Mn=(e,t)=>e?e+qe(t):t,Nn=(e,t)=>j(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pn(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function Fn(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return Ye(s)&&o.isScriptable(t)&&(s=In(t,s,e,n)),A(s)&&s.length&&(s=Ln(t,s,e,o.isIndexable)),Nn(t,s)&&(s=An(s,i,a&&a[t],o)),s}function In(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Nn(e,c)&&(c=Vn(i._scopes,i,e,c)),c}function Ln(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(j(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=Vn(r,i,e,c);t.push(An(n,a,o&&o[e],s))}}return t}function Rn(e,t,n){return Ye(e)?e(t,n):e}var zn=(e,t)=>e===!0?t:typeof e==`string`?Ke(t,e):void 0;function Bn(e,t,n,r,i){for(let a of t){let t=zn(n,a);if(t){e.add(t);let a=Rn(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Vn(e,t,n,r){let i=t._rootScopes,a=Rn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=Hn(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=Hn(s,o,a,c,r),c===null)?!1:kn(Array.from(s),[``],i,a,()=>Un(t,n,r))}function Hn(e,t,n,r,i){for(;n;)n=Bn(e,t,n,r,i);return n}function Un(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return A(i)&&j(n)?n:i||{}}function Wn(e,t,n,r){let i;for(let a of t)if(i=Gn(Mn(a,e),n),i!==void 0)return Nn(e,i)?Vn(n,r,e,i):i}function Gn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Kn(e){let t=e._keys;return t||=e._keys=qn(e._scopes),t}function qn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Jn(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;ste===`x`?`y`:`x`;function Qn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=mt(a,i),c=mt(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function $n(e,t,n){let r=e.length,i,a,o,s,c,l=Xn(e,0);for(let u=0;u!e.skip)),t.cubicInterpolationMode===`monotone`)tr(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);function lr(e,t){return cr(e).getPropertyValue(t)}var ur=[`top`,`right`,`bottom`,`left`];function dr(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=ur[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var fr=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pr(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(fr(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function mr(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=cr(n),a=i.boxSizing===`border-box`,o=dr(i,`padding`),s=dr(i,`border`,`width`),{x:c,y:l,box:u}=pr(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function hr(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&or(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=cr(a),s=dr(o,`border`,`width`),c=dr(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=sr(o.maxWidth,a,`clientWidth`),i=sr(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||$e,maxHeight:i||$e}}var gr=e=>Math.round(e*10)/10;function _r(e,t,n,r){let i=cr(e),a=dr(i,`margin`),o=sr(i.maxWidth,e,`clientWidth`)||$e,s=sr(i.maxHeight,e,`clientHeight`)||$e,c=hr(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=dr(i,`border`,`width`),t=dr(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=gr(Math.min(l,o,c.maxWidth)),u=gr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=gr(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=gr(Math.floor(u*r))),{width:l,height:u}}function vr(e,t,n){let r=t||1,i=gr(e.height*r),a=gr(e.width*r);e.height=gr(e.height),e.width=gr(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var yr=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};ar()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function br(e,t){let n=lr(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Sr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function Cr(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=xr(e,i,n),s=xr(i,a,n),c=xr(a,t,n);return xr(xr(o,s,n),xr(s,c,n),n)}var wr=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},Tr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Er(e,t,n){return e?wr(t,n):Tr()}function Dr(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function Or(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function kr(e){return e===`angle`?{between:gt,compare:ht,normalize:H}:{between:W,compare:(e,t)=>e-t,normalize:e=>e}}function Ar({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function jr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=kr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;fc(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Ar({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Ar({start:g,end:d,loop:f,count:o,style:p})),m}function Nr(e,t){let n=[],r=e.segments;for(let i=0;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Fr(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Ir(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Pr(n,i,a,r);return r===!0?Lr(e,[{start:o,end:s,loop:a}],n,t):Lr(e,Fr(n,o,sr({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Et.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},Gr=`transparent`,Kr={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Rt(e||Gr),i=r.valid&&Rt(t||Gr);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},qr=class{constructor(e,t,n,r){let i=t[n];r=En([e.to,r,i,e.from]);let a=En([e.from,i,r]);this._active=!0,this._fn=e.fn||Kr[e.type||typeof a],this._easing=It[e.easing]||It.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=En([e.to,t,r,e.from]),this._from=En([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e{let i=e[r];if(!j(i))return;let a={};for(let e of t)a[e]=i[e];(A(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=Xr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Yr(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new qr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Wr.add(this._chart,n),!0}};function Yr(e,t){let n=[],r=Object.keys(t);for(let t=0;t0||!n&&t<0)return i.index}return null}function ci(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=ii(a,o,r),d=t.length,f;for(let e=0;en[e].axis===t).shift()}function ui(e,t){return On(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function di(e,t,n){return On(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function fi(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var pi=e=>e===`reset`||e===`none`,mi=(e,t)=>t?e:Object.assign({},e),hi=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ei(n,!0),values:null},gi=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ri(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&fi(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=P(n.xAxisID,li(e,`x`)),a=t.yAxisID=P(n.yAxisID,li(e,`y`)),o=t.rAxisID=P(n.rAxisID,li(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&wt(this._data,this),e._stacked&&fi(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(j(t)){let e=this._cachedMeta;this._data=ni(t,e)}else if(n!==t){if(n){wt(n,this);let e=this._cachedMeta;fi(e),e._parsed=[]}t&&Object.isExtensible(t)&&Ct(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=ri(t.vScale,t),t.stack!==n.stack&&(r=!0,fi(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(ci(this,t._parsed),t._stacked=ri(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=A(r[e])?this.parseArrayData(n,r,e,t):j(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]t||u=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r=0&&ethis.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(mi(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new Jr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||pi(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){pi(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!pi(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;oe-t))}return e._cache.$bar}function vi(e){let t=e.iScale,n=_i(t,e.type),r=t._length,i,a,o,s,c=()=>{o===32767||o===-32768||(Je(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function Si(e,t,n,r){return A(e)?xi(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ci(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l=n?1:-1):B(e)}function Ei(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.basee.controller.options.grouped),i=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),s=o&&o[n.axis],c=e=>{let t=e._parsed.find(e=>e[n.axis]===s),r=t&&t[e.vScale.axis];if(k(r)||isNaN(r))return!0};for(let n of r)if(!(t!==void 0&&c(n))&&((i===!1||a.indexOf(n.stack)===-1||i===void 0&&n.stack===void 0)&&a.push(n.stack),n.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(n=>e[n].axis===t).shift()}_getAxis(){let e={},t=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)e[P(this.chart.options.indexAxis===`x`?n.xAxisID:n.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),c=a._custom;return{label:n[e]||``,value:`(`+o+`, `+s+(c?`, `+c:``)+`)`}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=a.axis,u=o.axis;for(let d=t;dgt(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>gt(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(z,u,f),_=m(L,l,d),v=m(L+z,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Fi=class extends gi{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let c=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:c.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:a&&(o||c.borderRadius),index:s}}):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(j(n[e])){let{key:e=`value`}=this._parsing;i=t=>+Ke(n[t],e)}let a,o;for(a=e,o=e+t;a0&&!isNaN(e)?Math.abs(e)/t*R:0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let n=0;n=_){v.skip=!0;continue}let b=this.getParsed(n),x=k(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Li=class extends gi{static id=`polarArea`;static defaults={dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:`number`,properties:[`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`]}},indexAxis:`r`,startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e].r,n.options.locale);return{label:r[e]||``,value:i}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(rt.max&&(t.max=r))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*L,d=u,f,p=360/this.countVisibleElements();for(f=0;f{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++}),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?V(this.resolveDataElementOptions(e,t).angle||n):0}},Ri=Object.freeze({__proto__:null,BarController:Mi,BubbleController:Ni,DoughnutController:Fi,LineController:Ii,PieController:class extends Fi{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},PolarAreaController:Li,RadarController:class extends gi{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:``+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta,n=t.dataset,r=t.data||[],i=t.iScale.getLabels();if(n.points=r,e!==`resize`){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let a={_loop:!0,_fullLoop:i.length===r.length,options:t};this.updateElement(n,void 0,a,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){let i=this._cachedMeta.rScale,a=r===`reset`;for(let o=t;o0&&this.getParsed(t-1);for(let l=t;l0&&Math.abs(n[f]-v[f])>g,h&&(m.parsed=n,m.raw=c.data[l]),d&&(m.options=u||this.resolveDataElementOptions(l,t.active?`active`:r)),_||this.updateElement(t,l,m,r),v=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}}});function zi(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Bi={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return zi()}parse(){return zi()}format(){return zi()}add(){return zi()}diff(){return zi()}startOf(){return zi()}endOf(){return zi()}}};function Vi(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?bt:yt;if(!r){let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!k(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!k(e[t.axis]));r.hi+=Math.max(0,o)}return r}else if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Hi(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var Yi={evaluateInteractionItems:Hi,modes:{index(e,t,n,r){let i=mr(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=mr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;ee.pos===t)}function Qi(e,t){return e.filter(e=>Xi.indexOf(e.pos)===-1&&e.box.axis===t)}function $i(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ea(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;ne.box.fullSize),!0),r=$i(Zi(t,`left`),!0),i=$i(Zi(t,`right`)),a=$i(Zi(t,`top`),!0),o=$i(Zi(t,`bottom`)),s=Qi(t,`x`),c=Qi(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Zi(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function ia(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function aa(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oa(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!j(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&aa(o,a.getPadding());let s=Math.max(0,t.outerWidth-ia(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-ia(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function sa(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function ca(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function la(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);aa(f,q(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=na(c.concat(l),d);la(s.fullSize,p,d,m),la(c,p,d,m),la(l,p,d,m)&&la(c,p,d,m),sa(p),da(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,da(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},I(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},fa=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},pa=class extends fa{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},ma=`$chartjs`,ha={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},ga=e=>e===null||e===``;function _a(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[ma]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,ga(i)){let t=br(e,`width`);t!==void 0&&(e.width=t)}if(ga(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=br(e,`height`);t!==void 0&&(e.height=t)}return e}var va=yr?{passive:!0}:!1;function ya(e,t,n){e&&e.addEventListener(t,n,va)}function ba(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,va)}function xa(e,t){let n=ha[e.type]||e.type,{x:r,y:i}=mr(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function Sa(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function Ca(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.addedNodes,r),t&&=!Sa(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function wa(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.removedNodes,r),t&&=!Sa(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var Ta=new Map,Ea=0;function Da(){let e=window.devicePixelRatio;e!==Ea&&(Ea=e,Ta.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Oa(e,t){Ta.size||window.addEventListener(`resize`,Da),Ta.set(e,t)}function ka(e){Ta.delete(e),Ta.size||window.removeEventListener(`resize`,Da)}function Aa(e,t,n){let r=e.canvas,i=r&&or(r);if(!i)return;let a=Dt((e,t)=>{let r=i.clientWidth;n(e,t),r{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),Oa(e,a),o}function ja(e,t,n){n&&n.disconnect(),t===`resize`&&ka(e)}function Ma(e,t,n){let r=e.canvas,i=Dt(t=>{e.ctx!==null&&n(xa(t,e))},e);return ya(r,t,i),i}var Na=class extends fa{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(_a(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[ma])return!1;let n=t[ma].initial;[`height`,`width`].forEach(e=>{let r=n[e];k(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[ma],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:Ca,detach:wa,resize:Aa}[t]||Ma)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:ja,detach:ja,resize:ja}[t]||ba)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return _r(e,t,n,r)}isAttached(e){let t=e&&or(e);return!!(t&&t.isConnected)}};function Pa(e){return!ar()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?pa:Na}var Fa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return ct(this.x)&&ct(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Ia(e,t){let n=e.options.ticks,r=La(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?za(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Ba(t,l,a,o/i),l;let u=Ra(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(Va(t,l,u,k(r)?0:s-r,s),e=0,n=o-1;ei)return t}return Math.max(i,1)}function za(e){let t=[],n,r;for(n=0,r=e.length;ne===`left`?`right`:e===`right`?`left`:e,Wa=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Ga=(e,t)=>Math.min(t||e,e);function Ka(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;ao+s)))return c}function Ja(e,t){I(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;in?n:t,n=r&&t>n?t:n,{min:N(t,N(n,t)),max:N(n,N(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dn(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=U(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-Ya(e.grid)-t.padding-Xa(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=dt(Math.min(Math.asin(U((l.highest.height+6)/o,-1,1)),Math.asin(U(s/c,-1,1))-Math.asin(U(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Xa(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=Ya(i)+a):(e.height=this.maxHeight,e.width=Ya(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=V(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return _t(this._alignToPixels?an(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+ +!!s,u=Ya(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return an(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,D;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,D=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,D=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,D=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let ee=P(r.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/ee));for(_=0;_0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:D,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:ee,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-V(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);K.route(a,i,c,s)})}function ao(e){return`id`in e&&`defaults`in e}var X=new class{constructor(){this.controllers=new no(gi,`datasets`,!0),this.elements=new no(Fa,`elements`),this.plugins=new no(Object,`plugins`),this.scales=new no(to,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):I(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=qe(e);F(n[`before`+r],[],n),t[e](n),F(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function so(e){let t={},n=[],r=Object.keys(X.plugins.items);for(let e=0;e1&&ho(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function vo(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function yo(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return vo(e,`x`,n[0])||vo(e,`y`,n[0])}return{}}function bo(e,t){let n=Zt[e.type]||{scales:{}},r=t.scales||{},i=fo(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!j(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=_o(t,o,yo(t,e),K.scales[o.type]),c=mo(s,i),l=n.scales||{};a[t]=Ve(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||fo(i,t),s=(Zt[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=po(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),Ve(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];Ve(t,[K.scales[t.type],K.scale])}),a}function xo(e){let t=e.options||={};t.plugins=P(t.plugins,{}),t.scales=bo(e,t)}function So(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Co(e){return e||={},e.data=So(e.data),xo(e),e}var wo=new Map,To=new Set;function Eo(e,t){let n=wo.get(e);return n||(n=t(),wo.set(e,n),To.add(n)),n}var Do=(e,t,n)=>{let r=Ke(t,n);r!==void 0&&e.add(r)},Oo=class{constructor(e){this._config=Co(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=So(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),xo(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Eo(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return Eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return Eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Eo(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Do(s,e,t))),t.forEach(e=>Do(s,r,e)),t.forEach(e=>Do(s,Zt[i]||{},e)),t.forEach(e=>Do(s,K,e)),t.forEach(e=>Do(s,Qt,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),To.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Zt[t]||{},K.datasets[t]||{},{type:t},K,Qt]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=ko(this._resolverCache,e,r),s=a;if(jo(a,t)){i.$shared=!1,n=Ye(n)?n():n;let t=this.createResolver(e,n,o);s=An(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=ko(this._resolverCache,e,n);return j(t)?An(i,t,void 0,r):i}};function ko(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:kn(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var Ao=e=>j(e)&&Object.getOwnPropertyNames(e).some(t=>Ye(e[t]));function jo(e,t){let{isScriptable:n,isIndexable:r}=jn(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(Ye(o)||Ao(o))||a&&A(o))return!0}return!1}var Mo=`4.5.1`,No=[`top`,`bottom`,`left`,`right`,`chartArea`];function Po(e,t){return e===`top`||e===`bottom`||No.indexOf(e)===-1&&t===`x`}function Fo(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Io(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),F(n&&n.onComplete,[e],t)}function Lo(e){let t=e.chart,n=t.options.animation;F(n&&n.onProgress,[e],t)}function Ro(e){return ar()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var zo={},Bo=e=>{let t=Ro(e);return Object.values(zo).filter(e=>e.canvas===t).pop()};function Vo(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function Ho(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Uo=class{static defaults=K;static instances=zo;static overrides=Zt;static registry=X;static version=Mo;static getChart=Bo;static register(...e){X.add(...e),Wo()}static unregister(...e){X.remove(...e),Wo()}constructor(e,t){let n=this.config=new Oo(t),r=Ro(e),i=Bo(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Pa(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Ne(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ot(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],zo[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}Wr.listen(this,`complete`,Io),Wr.listen(this,`progress`,Lo),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return k(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return X}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():vr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return on(this.canvas,this.ctx),this}stop(){return Wr.stop(this),this}resize(e,t){Wr.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vr(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),F(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){I(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=_o(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),I(i,t=>{let i=t.options,a=i.id,o=_o(a,i),s=P(i.type,t.dtype);(i.position===void 0||Po(i.position,o)!==Po(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(X.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),I(r,(e,t)=>{e||delete n[t]}),I(n,e=>{Y.configure(this,e,e.options),Y.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Fo(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){I(this.scales,e=>{Y.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!Xe(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Vo(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;ee.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;Y.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],I(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Ur(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&un(t,r),e.controller.draw(),r&&dn(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return ln(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=Yi.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=On(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);Je(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Wr.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};I(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){I(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},I(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ie(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=Ze(e),c=Ho(e,this._lastEvent,n,s);n&&(this._lastEvent=null,F(i.onHover,[e,o,this],this),s&&F(i.onClick,[e,o,this],this));let l=!Ie(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Wo(){return I(Uo.instances,e=>e._plugins.invalidate())}function Go(e,t,n){let{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:c}=t,{borderWidth:l,borderJoinStyle:u}=c,d=Math.min(l/o,H(r-n));if(e.beginPath(),e.arc(i,a,o-l/2,r+d/2,n-d/2),s>0){let t=Math.min(l/s,H(r-n));e.arc(i,a,s+l/2,n-t/2,r+t/2,!0)}else{let t=Math.min(l/2,o*H(r-n));if(u===`round`)e.arc(i,a,t,n-L/2,r+L/2,!0);else if(u===`bevel`){let o=2*t*t,s=-o*Math.cos(n+L/2)+i,c=-o*Math.sin(n+L/2)+a,l=o*Math.cos(r+L/2)+i,u=o*Math.sin(r+L/2)+a;e.lineTo(s,c),e.lineTo(l,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function Ko(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+z,r-z),e.closePath(),e.clip()}function qo(e){return Cn(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Jo(e,t,n,r){let i=qo(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return U(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:U(i.innerStart,0,o),innerEnd:U(i.innerEnd,0,o)}}function Yo(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Xo(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/L)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Jo(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,D=f+x,ee=g+b/E,O=_-x/D;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=Yo(C,T,o,s);e.arc(t.x,t.y,y,T,_+z)}let n=Yo(D,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=Yo(D,O,o,s);e.arc(t.x,t.y,x,_+z,O+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=Yo(E,ee,o,s);e.arc(t.x,t.y,b,ee+Math.PI,g-z)}let i=Yo(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=Yo(S,w,o,s);e.arc(t.x,t.y,v,g-z,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Zo(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Xo(e,t,n,r,c,i);for(let t=0;t=L&&p===0&&u!==`miter`&&Go(e,t,h),a||(Xo(e,t,n,r,h,i),e.stroke())}var $o=class extends Fa{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=pt(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=P(l,o-a),f=gt(r,a,o)&&a!==o,p=d>=R||f,m=W(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>R?Math.floor(n/R):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(L,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Zo(e,this,s,i,a),Qo(e,this,s,i,a),e.restore()}};function es(e,t,n=t){e.lineCap=P(n.borderCapStyle,t.borderCapStyle),e.setLineDash(P(n.borderDash,t.borderDash)),e.lineDashOffset=P(n.borderDashOffset,t.borderDashOffset),e.lineJoin=P(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=P(n.borderWidth,t.borderWidth),e.strokeStyle=P(n.borderColor,t.borderColor)}function ts(e,t,n){e.lineTo(n.x,n.y)}function ns(e){return e.stepped?fn:e.tension||e.cubicInterpolationMode===`monotone`?pn:ts}function rs(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=is&&a>s;return{count:r,start:c,loop:t.loop,ilen:l(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(ng&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function os(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?as:is}function ss(e){return e.stepped?Sr:e.tension||e.cubicInterpolationMode===`monotone`?Cr:xr}function cs(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),es(e,t.options),e.stroke(i)}function ls(e,t,n,r){let{segments:i,options:a}=t,o=os(t);for(let s of i)es(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var us=typeof Path2D==`function`;function ds(e,t,n,r){us&&!t.options.segment?cs(e,t,n,r):ls(e,t,n,r)}var fs=class extends Fa{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;ir(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=Ir(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Nr(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=ss(n),c,l;for(c=0,l=a.length;ce.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Ds(e){return Ts[e%Ts.length]}function Os(e){return Es[e%Es.length]}function ks(e,t){return e.borderColor=Ds(t),e.backgroundColor=Os(t),++t}function As(e,t){return e.backgroundColor=e.data.map(()=>Ds(t++)),t}function js(e,t){return e.backgroundColor=e.data.map(()=>Os(t++)),t}function Ms(e){let t=0;return(n,r)=>{let i=e.getDatasetMeta(r).controller;i instanceof Fi?t=As(n,t):i instanceof Li?t=js(n,t):i&&(t=ks(n,t))}}function Ns(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Ps(e){return e&&(e.borderColor||e.backgroundColor)}function Fs(){return K.borderColor!==`rgba(0,0,0,0.1)`||K.backgroundColor!==`rgba(0,0,0,0.1)`}var Is={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=Ns(r)||Ps(i)||a&&Ns(a)||Fs();if(!n.forceOverride&&o)return;let s=Ms(e);r.forEach(s)}};function Ls(e,t,n,r,i){let a=i.samples||r;if(a>=n)return e.slice(t,t+n);let o=[],s=(n-2)/(a-2),c=0,l=t+n-1,u=t,d,f,p,m,h;for(o[c++]=e[u],d=0;dp&&(p=m,f=e[a],h=a);o[c++]=f,u=h}return o[c++]=e[l],o}function Rs(e,t,n,r){let i=0,a=0,o,s,c,l,u,d,f,p,m,h,g=[],_=t+n-1,v=e[t].x,y=e[_].x-v;for(o=t;oh&&(h=l,f=o),i=(a*i+s.x)/++a;else{let n=o-1;if(!k(d)&&!k(f)){let t=Math.min(d,f),r=Math.max(d,f);t!==p&&t!==n&&g.push({...e[t],x:i}),r!==p&&r!==n&&g.push({...e[r],x:i})}o>0&&n!==p&&g.push(e[n]),g.push(s),u=t,a=0,m=h=l,d=f=p=o}}return g}function zs(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Bs(e){e.data.datasets.forEach(e=>{zs(e)})}function Vs(e,t){let n=t.length,r=0,i,{iScale:a}=e,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(r=U(yt(t,a.axis,o).lo,0,n-1)),i=l?U(yt(t,a.axis,s).hi+1,r,n)-r:n-r,{start:r,count:i}}var Hs={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Bs(e);return}let r=e.width;e.data.datasets.forEach((t,i)=>{let{_data:a,indexAxis:o}=t,s=e.getDatasetMeta(i),c=a||t.data;if(En([o,e.options.indexAxis])===`y`||!s.controller.supportsDecimation)return;let l=e.scales[s.xAxisID];if(l.type!==`linear`&&l.type!==`time`||e.options.parsing)return;let{start:u,count:d}=Vs(s,c);if(d<=(n.threshold||4*r)){zs(t);return}k(a)&&(t._data=c,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}}));let f;switch(n.algorithm){case`lttb`:f=Ls(c,u,d,r,n);break;case`min-max`:f=Rs(c,u,d,r);break;default:throw Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=f})},destroy(e){Bs(e)}};function Us(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=Ks(r,s,i);let c=Ws(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Nr(t,c);for(let t of l){let r=Ws(n,a[t.start],a[t.end],t.loop),s=Mr(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:qs(c,r,`start`,Math.max)},end:{[n]:qs(c,r,`end`,Math.min)}})}}return o}function Ws(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=H(i),a=H(a)),{property:e,start:i,end:a}}function Gs(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=Ks(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function Ks(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function qs(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Js(e,t){let n=[],r=!1;return A(e)?(r=!0,n=e):n=Gs(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ys(e){return e&&e.fill!==!1}function Xs(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!M(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function Zs(e,t,n){let r=tc(e);if(j(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return M(i)&&Math.floor(i)===i?Qs(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Qs(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function $s(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ec(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:j(e)?e.value:t.getBaseValue(),r}function tc(e){let t=e.options,n=t.fill,r=P(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function nc(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=rc(t,n);s.push(Js({x:null,y:t.bottom},r));for(let e=0;e=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&fc(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;Ys(n)&&fc(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!Ys(r)||n.drawTime!==`beforeDatasetDraw`||fc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},bc=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},xc=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Sc=class extends Fa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=F(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=J(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=bc(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Cc(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=Er(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=G(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=G(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;un(e,this),this._draw(),dn(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=K.color,s=Er(e.rtl,this.left,this.width),c=J(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=bc(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=P(n.lineWidth,1);if(r.fillStyle=P(n.fillStyle,o),r.lineCap=P(n.lineCap,`butt`),r.lineDashOffset=P(n.lineDashOffset,0),r.lineJoin=P(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=P(n.strokeStyle,o),r.setLineDash(P(n.lineDash,[])),a.usePointStyle)cn(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=Tn(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?vn(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){_n(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:G(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:G(i,this.top+y+l,this.bottom-t[0].height),line:0},Dr(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=G(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=G(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=At(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=Ec(o,e)+l}else f.y+=b}),Or(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=J(t.font),r=q(t.padding);if(!t.display)return;let i=Er(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=G(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+G(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=G(o,u,u+d);a.textAlign=i.textAlign(kt(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,_n(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=J(e.font),n=q(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(W(e,this.left,this.right)&&W(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;ne.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Tc(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Ec(t,n)),r}function Ec(e,t){return t*(e.text?e.text.length:0)}function Dc(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Oc={id:`legend`,_element:Sc,start(e,t,n){let r=e.legend=new Sc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r)},stop(e){Y.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Y.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=q(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},kc=class extends Fa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let r=A(n.text)?n.text.length:1;this._padding=q(n.padding);let i=r*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:t,left:n,bottom:r,right:i,options:a}=this,o=a.align,s=0,c,l,u;return this.isHorizontal()?(l=G(o,n,i),u=t+e,c=i-n):(a.position===`left`?(l=n+e,u=G(o,r,t),s=L*-.5):(l=i-e,u=G(o,t,r),s=L*.5),c=r-t),{titleX:l,titleY:u,maxWidth:c,rotation:s}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=J(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(r);_n(e,t.text,0,0,n,{color:t.color,maxWidth:o,rotation:s,textAlign:kt(t.align),textBaseline:`middle`,translation:[i,a]})}};function Ac(e,t){let n=new kc({ctx:e.ctx,options:t,chart:e});Y.configure(e,n,t),Y.addBox(e,n),e.titleBlock=n}var jc={id:`title`,_element:kc,start(e,t,n){Ac(e,n)},stop(e){let t=e.titleBlock;Y.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`bold`},fullSize:!0,padding:10,position:`top`,text:``,weight:2e3},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Mc=new WeakMap,Nc={id:`subtitle`,start(e,t,n){let r=new kc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r),Mc.set(e,r)},stop(e){Y.removeBox(e,Mc.get(e)),Mc.delete(e)},beforeUpdate(e,t,n){let r=Mc.get(e);Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`normal`},fullSize:!0,padding:0,position:`top`,text:``,weight:1500},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Pc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;aMath.max(Math.min(e,n),t);function v(e){return _(g(e*2.55),0,255)}function y(e){return _(g(e*255),0,255)}function b(e){return _(g(e/2.55)/100,0,1)}function x(e){return _(g(e*100),0,100)}var S={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},C=[...`0123456789ABCDEF`],w=e=>C[e&15],T=e=>C[(e&240)>>4]+C[e&15],E=e=>(e&240)>>4==(e&15),D=e=>E(e.r)&&E(e.g)&&E(e.b)&&E(e.a);function ee(e){var t=e.length,n;return e[0]===`#`&&(t===4||t===5?n={r:255&S[e[1]]*17,g:255&S[e[2]]*17,b:255&S[e[3]]*17,a:t===5?S[e[4]]*17:255}:(t===7||t===9)&&(n={r:S[e[1]]<<4|S[e[2]],g:S[e[3]]<<4|S[e[4]],b:S[e[5]]<<4|S[e[6]],a:t===9?S[e[7]]<<4|S[e[8]]:255})),n}var O=(e,t)=>e<255?t(e):``;function te(e){var t=D(e)?w:T;return e?`#`+t(e.r)+t(e.g)+t(e.b)+O(e.a,t):void 0}var ne=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function re(e,t,n){let r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function ie(e,t,n){let r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ae(e,t,n){let r=re(e,1,.5),i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function oe(e,t,n,r,i){return e===i?(t-n)/r+(t.5?l/(2-i-a):l/(i+a),s=oe(t,n,r,l,i),s=s*60+.5),[s|0,c||0,o]}function ce(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(y)}function le(e,t,n){return ce(re,e,t,n)}function ue(e,t,n){return ce(ae,e,t,n)}function de(e,t,n){return ce(ie,e,t,n)}function fe(e){return(e%360+360)%360}function pe(e){let t=ne.exec(e),n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?v(+t[5]):y(+t[5]));let i=fe(+t[2]),a=t[3]/100,o=t[4]/100;return r=t[1]===`hwb`?ue(i,a,o):t[1]===`hsv`?de(i,a,o):le(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function me(e,t){var n=se(e);n[0]=fe(n[0]+t),n=le(n),e.r=n[0],e.g=n[1],e.b=n[2]}function he(e){if(!e)return;let t=se(e),n=t[0],r=x(t[1]),i=x(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${b(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}var ge={x:`dark`,Z:`light`,Y:`re`,X:`blu`,W:`gr`,V:`medium`,U:`slate`,A:`ee`,T:`ol`,S:`or`,B:`ra`,C:`lateg`,D:`ights`,R:`in`,Q:`turquois`,E:`hi`,P:`ro`,O:`al`,N:`le`,M:`de`,L:`yello`,F:`en`,K:`ch`,G:`arks`,H:`ea`,I:`ightg`,J:`wh`},_e={OiceXe:`f0f8ff`,antiquewEte:`faebd7`,aqua:`ffff`,aquamarRe:`7fffd4`,azuY:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`0`,blanKedOmond:`ffebcd`,Xe:`ff`,XeviTet:`8a2be2`,bPwn:`a52a2a`,burlywood:`deb887`,caMtXe:`5f9ea0`,KartYuse:`7fff00`,KocTate:`d2691e`,cSO:`ff7f50`,cSnflowerXe:`6495ed`,cSnsilk:`fff8dc`,crimson:`dc143c`,cyan:`ffff`,xXe:`8b`,xcyan:`8b8b`,xgTMnPd:`b8860b`,xWay:`a9a9a9`,xgYF:`6400`,xgYy:`a9a9a9`,xkhaki:`bdb76b`,xmagFta:`8b008b`,xTivegYF:`556b2f`,xSange:`ff8c00`,xScEd:`9932cc`,xYd:`8b0000`,xsOmon:`e9967a`,xsHgYF:`8fbc8f`,xUXe:`483d8b`,xUWay:`2f4f4f`,xUgYy:`2f4f4f`,xQe:`ced1`,xviTet:`9400d3`,dAppRk:`ff1493`,dApskyXe:`bfff`,dimWay:`696969`,dimgYy:`696969`,dodgerXe:`1e90ff`,fiYbrick:`b22222`,flSOwEte:`fffaf0`,foYstWAn:`228b22`,fuKsia:`ff00ff`,gaRsbSo:`dcdcdc`,ghostwEte:`f8f8ff`,gTd:`ffd700`,gTMnPd:`daa520`,Way:`808080`,gYF:`8000`,gYFLw:`adff2f`,gYy:`808080`,honeyMw:`f0fff0`,hotpRk:`ff69b4`,RdianYd:`cd5c5c`,Rdigo:`4b0082`,ivSy:`fffff0`,khaki:`f0e68c`,lavFMr:`e6e6fa`,lavFMrXsh:`fff0f5`,lawngYF:`7cfc00`,NmoncEffon:`fffacd`,ZXe:`add8e6`,ZcSO:`f08080`,Zcyan:`e0ffff`,ZgTMnPdLw:`fafad2`,ZWay:`d3d3d3`,ZgYF:`90ee90`,ZgYy:`d3d3d3`,ZpRk:`ffb6c1`,ZsOmon:`ffa07a`,ZsHgYF:`20b2aa`,ZskyXe:`87cefa`,ZUWay:`778899`,ZUgYy:`778899`,ZstAlXe:`b0c4de`,ZLw:`ffffe0`,lime:`ff00`,limegYF:`32cd32`,lRF:`faf0e6`,magFta:`ff00ff`,maPon:`800000`,VaquamarRe:`66cdaa`,VXe:`cd`,VScEd:`ba55d3`,VpurpN:`9370db`,VsHgYF:`3cb371`,VUXe:`7b68ee`,VsprRggYF:`fa9a`,VQe:`48d1cc`,VviTetYd:`c71585`,midnightXe:`191970`,mRtcYam:`f5fffa`,mistyPse:`ffe4e1`,moccasR:`ffe4b5`,navajowEte:`ffdead`,navy:`80`,Tdlace:`fdf5e6`,Tive:`808000`,TivedBb:`6b8e23`,Sange:`ffa500`,SangeYd:`ff4500`,ScEd:`da70d6`,pOegTMnPd:`eee8aa`,pOegYF:`98fb98`,pOeQe:`afeeee`,pOeviTetYd:`db7093`,papayawEp:`ffefd5`,pHKpuff:`ffdab9`,peru:`cd853f`,pRk:`ffc0cb`,plum:`dda0dd`,powMrXe:`b0e0e6`,purpN:`800080`,YbeccapurpN:`663399`,Yd:`ff0000`,Psybrown:`bc8f8f`,PyOXe:`4169e1`,saddNbPwn:`8b4513`,sOmon:`fa8072`,sandybPwn:`f4a460`,sHgYF:`2e8b57`,sHshell:`fff5ee`,siFna:`a0522d`,silver:`c0c0c0`,skyXe:`87ceeb`,UXe:`6a5acd`,UWay:`708090`,UgYy:`708090`,snow:`fffafa`,sprRggYF:`ff7f`,stAlXe:`4682b4`,tan:`d2b48c`,teO:`8080`,tEstN:`d8bfd8`,tomato:`ff6347`,Qe:`40e0d0`,viTet:`ee82ee`,JHt:`f5deb3`,wEte:`ffffff`,wEtesmoke:`f5f5f5`,Lw:`ffff00`,LwgYF:`9acd32`};function ve(){let e={},t=Object.keys(_e),n=Object.keys(ge),r,i,a,o,s;for(r=0;r>16&255,a>>8&255,a&255]}return e}var ye;function be(e){ye||(ye=ve(),ye.transparent=[0,0,0,0]);let t=ye[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var xe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Se(e){let t=xe.exec(e),n=255,r,i,a;if(t){if(t[7]!==r){let e=+t[7];n=t[8]?v(e):_(e*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?v(r):_(r,0,255)),i=255&(t[4]?v(i):_(i,0,255)),a=255&(t[6]?v(a):_(a,0,255)),{r,g:i,b:a,a:n}}}function Ce(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${b(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var we=e=>e<=.0031308?e*12.92:e**(1/2.4)*1.055-.055,Te=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function Ee(e,t,n){let r=Te(b(e.r)),i=Te(b(e.g)),a=Te(b(e.b));return{r:y(we(r+n*(Te(b(t.r))-r))),g:y(we(i+n*(Te(b(t.g))-i))),b:y(we(a+n*(Te(b(t.b))-a))),a:e.a+n*(t.a-e.a)}}function De(e,t,n){if(e){let r=se(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=le(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Oe(e,t){return e&&Object.assign(t||{},e)}function ke(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=y(e[3]))):(t=Oe(e,{r:0,g:0,b:0,a:1}),t.a=y(t.a)),t}function Ae(e){return e.charAt(0)===`r`?Se(e):pe(e)}var je=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,r;n===`object`?r=ke(t):n===`string`&&(r=ee(t)||be(t)||Ae(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Oe(this._rgb);return e&&(e.a=b(e.a)),e}set rgb(e){this._rgb=ke(e)}rgbString(){return this._valid?Ce(this._rgb):void 0}hexString(){return this._valid?te(this._rgb):void 0}hslString(){return this._valid?he(this._rgb):void 0}mix(e,t){if(e){let n=this.rgb,r=e.rgb,i,a=t===i?.5:t,o=2*a-1,s=n.a-r.a,c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;i=1-c,n.r=255&c*n.r+i*r.r+.5,n.g=255&c*n.g+i*r.g+.5,n.b=255&c*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=Ee(this._rgb,e._rgb,t)),this}clone(){return new e(this.rgb)}alpha(e){return this._rgb.a=y(e),this}clearer(e){let t=this._rgb;return t.a*=1-e,this}greyscale(){let e=this._rgb;return e.r=e.g=e.b=g(e.r*.3+e.g*.59+e.b*.11),this}opaquer(e){let t=this._rgb;return t.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return De(this._rgb,2,e),this}darken(e){return De(this._rgb,2,-e),this}saturate(e){return De(this._rgb,1,e),this}desaturate(e){return De(this._rgb,1,-e),this}rotate(e){return me(this._rgb,e),this}};function Me(){}var Ne=(()=>{let e=0;return()=>e++})();function k(e){return e==null}function A(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)===`[object`&&t.slice(-6)===`Array]`}function j(e){return e!==null&&Object.prototype.toString.call(e)===`[object Object]`}function M(e){return(typeof e==`number`||e instanceof Number)&&isFinite(+e)}function N(e,t){return M(e)?e:t}function P(e,t){return e===void 0?t:e}var Pe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100:+e/t,Fe=(e,t)=>typeof e==`string`&&e.endsWith(`%`)?parseFloat(e)/100*t:+e;function F(e,t,n){if(e&&typeof e.call==`function`)return e.apply(n,t)}function I(e,t,n,r){let i,a,o;if(A(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function We(e){let t=e.split(`.`),n=[],r=``;for(let e of t)r+=e,r.endsWith(`\\`)?r=r.slice(0,-1)+`.`:(n.push(r),r=``);return n}function Ge(e){let t=We(e);return e=>{for(let n of t){if(n===``)break;e&&=e[n]}return e}}function Ke(e,t){return(Ue[t]||(Ue[t]=Ge(t)))(e)}function qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Je=e=>e!==void 0,Ye=e=>typeof e==`function`,Xe=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Ze(e){return e.type===`mouseup`||e.type===`click`||e.type===`contextmenu`}var L=Math.PI,R=2*L,Qe=R+L,$e=1/0,et=L/180,z=L/2,tt=L/4,nt=L*2/3,rt=Math.log10,B=Math.sign;function it(e,t,n){return Math.abs(e-t)e-t).pop(),t}function st(e){return typeof e==`symbol`||typeof e==`object`&&!!e&&!(Symbol.toPrimitive in e||`toString`in e||`valueOf`in e)}function ct(e){return!st(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function lt(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function ut(e,t,n){let r,i,a;for(r=0,i=e.length;rc&&l=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function vt(e,t,n){n||=(n=>e[n]1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}var yt=(e,t,n,r)=>vt(e,n,r?r=>{let i=e[r][t];return ie[r][t]vt(e,n,r=>e[r][t]>=n);function xt(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{let n=`_onData`+qe(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...t){let i=r.apply(this,t);return e._chartjs.listeners.forEach(e=>{typeof e[n]==`function`&&e[n](...t)}),i}})})}function wt(e,t){let n=e._chartjs;if(!n)return;let r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(St.forEach(t=>{delete e[t]}),delete e._chartjs)}function Tt(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Et=function(){return typeof window>`u`?function(e){return e()}:window.requestAnimationFrame}();function Dt(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Et.call(window,()=>{r=!1,e.apply(t,n)}))}}function Ot(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}var kt=e=>e===`start`?`left`:e===`end`?`right`:`center`,G=(e,t,n)=>e===`start`?t:e===`end`?n:(t+n)/2,At=(e,t,n,r)=>e===(r?`left`:`right`)?n:e===`center`?(t+n)/2:t;function jt(e,t,n){let r=t.length,i=0,a=r;if(e._sorted){let{iScale:o,vScale:s,_parsed:c}=e,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:d,max:f,minDefined:p,maxDefined:m}=o.getUserBounds();if(p){if(i=Math.min(yt(c,u,d).lo,n?r:yt(t,u,o.getPixelForValue(d)).lo),l){let e=c.slice(0,i+1).reverse().findIndex(e=>!k(e[s.axis]));i-=Math.max(0,e)}i=U(i,0,r-1)}if(m){let e=Math.max(yt(c,o.axis,f,!0).hi+1,n?0:yt(t,u,o.getPixelForValue(f),!0).hi+1);if(l){let t=c.slice(e-1).findIndex(e=>!k(e[s.axis]));e+=Math.max(0,t)}a=U(e,i,r)-i}else a=r-i}return{start:i,count:a}}function Mt(e){let{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;let a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}var Nt=e=>e===0||e===1,Pt=(e,t,n)=>-(2**(10*--e)*Math.sin((e-t)*R/n)),Ft=(e,t,n)=>2**(-10*e)*Math.sin((e-t)*R/n)+1,It={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-(--e*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>--e*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*z)+1,easeOutSine:e=>Math.sin(e*z),easeInOutSine:e=>-.5*(Math.cos(L*e)-1),easeInExpo:e=>e===0?0:2**(10*(e-1)),easeOutExpo:e=>e===1?1:-(2**(-10*e))+1,easeInOutExpo:e=>Nt(e)?e:e<.5?.5*2**(10*(e*2-1)):.5*(-(2**(-10*(e*2-1)))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1- --e*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Nt(e)?e:Pt(e,.075,.3),easeOutElastic:e=>Nt(e)?e:Ft(e,.075,.3),easeInOutElastic(e){let t=.1125,n=.45;return Nt(e)?e:e<.5?.5*Pt(e*2,t,n):.5+.5*Ft(e*2-1,t,n)},easeInBack(e){return e*e*(2.70158*e-1.70158)},easeOutBack(e){return--e*e*(2.70158*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-It.easeOutBounce(1-e),easeOutBounce(e){let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?It.easeInBounce(e*2)*.5:It.easeOutBounce(e*2-1)*.5+.5};function Lt(e){if(e&&typeof e==`object`){let t=e.toString();return t===`[object CanvasPattern]`||t===`[object CanvasGradient]`}return!1}function Rt(e){return Lt(e)?e:new je(e)}function zt(e){return Lt(e)?e:new je(e).saturate(.5).darken(.1).hexString()}var Bt=[`x`,`y`,`borderWidth`,`radius`,`tension`],Vt=[`color`,`borderColor`,`backgroundColor`];function Ht(e){e.set(`animation`,{delay:void 0,duration:1e3,easing:`easeOutQuart`,fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe(`animation`,{_fallback:!1,_indexable:!1,_scriptable:e=>e!==`onProgress`&&e!==`onComplete`&&e!==`fn`}),e.set(`animations`,{colors:{type:`color`,properties:Vt},numbers:{type:`number`,properties:Bt}}),e.describe(`animations`,{_fallback:`animation`}),e.set(`transitions`,{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:`transparent`},visible:{type:`boolean`,duration:0}}},hide:{animations:{colors:{to:`transparent`},visible:{type:`boolean`,easing:`linear`,fn:e=>e|0}}}})}function Ut(e){e.set(`layout`,{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Wt=new Map;function Gt(e,t){t||={};let n=e+JSON.stringify(t),r=Wt.get(n);return r||(r=new Intl.NumberFormat(e,t),Wt.set(n,r)),r}function Kt(e,t,n){return Gt(t,n).format(e)}var qt={values(e){return A(e)?e:``+e},numeric(e,t,n){if(e===0)return`0`;let r=this.chart.options.locale,i,a=e;if(n.length>1){let t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>0x38d7ea4c68000)&&(i=`scientific`),a=Jt(e,n)}let o=rt(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(c,this.options.ticks.format),Kt(e,r,c)},logarithmic(e,t,n){if(e===0)return`0`;let r=n[t].significand||e/10**Math.floor(rt(e));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?qt.numeric.call(this,e,t,n):``}};function Jt(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yt={formatters:qt};function Xt(e){e.set(`scale`,{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:`ticks`,clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:``,padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:``,padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yt.formatters.values,minor:{},major:{},align:`center`,crossAlign:`near`,showLabelBackdrop:!1,backdropColor:`rgba(255, 255, 255, 0.75)`,backdropPadding:2}}),e.route(`scale.ticks`,`color`,``,`color`),e.route(`scale.grid`,`color`,``,`borderColor`),e.route(`scale.border`,`color`,``,`borderColor`),e.route(`scale.title`,`color`,``,`color`),e.describe(`scale`,{_fallback:!1,_scriptable:e=>!e.startsWith(`before`)&&!e.startsWith(`after`)&&e!==`callback`&&e!==`parser`,_indexable:e=>e!==`borderDash`&&e!==`tickBorderDash`&&e!==`dash`}),e.describe(`scales`,{_fallback:`scale`}),e.describe(`scale.ticks`,{_scriptable:e=>e!==`backdropPadding`&&e!==`callback`,_indexable:e=>e!==`backdropPadding`})}var Zt=Object.create(null),Qt=Object.create(null);function $t(e,t){if(!t)return e;let n=t.split(`.`);for(let t=0,r=n.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=[`mousemove`,`mouseout`,`click`,`touchstart`,`touchmove`],this.font={family:`'Helvetica Neue', 'Helvetica', 'Arial', sans-serif`,size:12,style:`normal`,lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>zt(t.backgroundColor),this.hoverBorderColor=(e,t)=>zt(t.borderColor),this.hoverColor=(e,t)=>zt(t.color),this.indexAxis=`x`,this.interaction={mode:`nearest`,intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return en(this,e,t)}get(e){return $t(this,e)}describe(e,t){return en(Qt,e,t)}override(e,t){return en(Zt,e,t)}route(e,t,n,r){let i=$t(this,e),a=$t(this,n),o=`_`+t;Object.defineProperties(i,{[o]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){let e=this[o],t=a[r];return j(e)?Object.assign({},t,e):P(e,t)},set(e){this[o]=e}}})}apply(e){e.forEach(e=>e(this))}}({_scriptable:e=>!e.startsWith(`on`),_indexable:e=>e!==`events`,hover:{_fallback:`interaction`},interaction:{_scriptable:!1,_indexable:!1}},[Ht,Ut,Xt]);function tn(e){return!e||k(e.size)||k(e.family)?null:(e.style?e.style+` `:``)+(e.weight?e.weight+` `:``)+e.size+`px `+e.family}function nn(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function rn(e,t,n,r){r||={};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0,s=n.length,c,l,u,d,f;for(c=0;cn.length){for(c=0;c0&&e.stroke()}}function ln(e,t,n){return n||=.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&a.strokeColor!==``,c,l;for(e.save(),e.font=i.string,mn(e,a),c=0;c+e||0;function Cn(e,t){let n={},r=j(t),i=r?Object.keys(t):t,a=j(e)?r?n=>P(e[n],e[t[n]]):t=>e[t]:()=>e;for(let e of i)n[e]=Sn(a(e));return n}function wn(e){return Cn(e,{top:`y`,right:`x`,bottom:`y`,left:`x`})}function Tn(e){return Cn(e,[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])}function q(e){let t=wn(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function J(e,t){e||={},t||=K.font;let n=P(e.size,t.size);typeof n==`string`&&(n=parseInt(n,10));let r=P(e.style,t.style);r&&!(``+r).match(bn)&&(console.warn(`Invalid font style specified: "`+r+`"`),r=void 0);let i={family:P(e.family,t.family),lineHeight:xn(P(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:P(e.weight,t.weight),string:``};return i.string=tn(i),i}function En(e,t,n,r){let i=!0,a,o,s;for(a=0,o=e.length;an&&e===0?0:e+t;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function On(e,t){return Object.assign(Object.create(e),t)}function kn(e,t=[``],n,r,i=()=>e[0]){let a=n||e;return r===void 0&&(r=Gn(`_fallback`,e)),new Proxy({[Symbol.toStringTag]:`Object`,_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:n=>kn([n,...e],t,a,r)},{deleteProperty(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get(n,r){return Pn(n,r,()=>Wn(r,t,e,n))},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(e,t){return Kn(e).includes(t)},ownKeys(e){return Kn(e)},set(e,t,n){let r=e._storage||=i();return e[t]=r[t]=n,delete e._keys,!0}})}function An(e,t,n,r){let i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:jn(e,r),setContext:t=>An(e,t,n,r),override:i=>An(e.override(i),t,n,r)};return new Proxy(i,{deleteProperty(t,n){return delete t[n],delete e[n],!0},get(e,t,n){return Pn(e,t,()=>Fn(e,t,n))},getOwnPropertyDescriptor(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(t,n){return Reflect.has(e,n)},ownKeys(){return Reflect.ownKeys(e)},set(t,n,r){return e[n]=r,delete t[n],!0}})}function jn(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ye(n)?n:()=>n,isIndexable:Ye(r)?r:()=>r}}var Mn=(e,t)=>e?e+qe(t):t,Nn=(e,t)=>j(t)&&e!==`adapters`&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pn(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t===`constructor`)return e[t];let r=n();return e[t]=r,r}function Fn(e,t,n){let{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e,s=r[t];return Ye(s)&&o.isScriptable(t)&&(s=In(t,s,e,n)),A(s)&&s.length&&(s=Ln(t,s,e,o.isIndexable)),Nn(t,s)&&(s=An(s,i,a&&a[t],o)),s}function In(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_stack:s}=n;if(s.has(e))throw Error(`Recursion detected: `+Array.from(s).join(`->`)+`->`+e);s.add(e);let c=t(a,o||r);return s.delete(e),Nn(e,c)&&(c=Vn(i._scopes,i,e,c)),c}function Ln(e,t,n,r){let{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=n;if(a.index!==void 0&&r(e))return t[a.index%t.length];if(j(t[0])){let n=t,r=i._scopes.filter(e=>e!==n);t=[];for(let c of n){let n=Vn(r,i,e,c);t.push(An(n,a,o&&o[e],s))}}return t}function Rn(e,t,n){return Ye(e)?e(t,n):e}var zn=(e,t)=>e===!0?t:typeof e==`string`?Ke(t,e):void 0;function Bn(e,t,n,r,i){for(let a of t){let t=zn(n,a);if(t){e.add(t);let a=Rn(t._fallback,n,i);if(a!==void 0&&a!==n&&a!==r)return a}else if(t===!1&&r!==void 0&&n!==r)return null}return!1}function Vn(e,t,n,r){let i=t._rootScopes,a=Rn(t._fallback,n,r),o=[...e,...i],s=new Set;s.add(r);let c=Hn(s,o,n,a||n,r);return c===null||a!==void 0&&a!==n&&(c=Hn(s,o,a,c,r),c===null)?!1:kn(Array.from(s),[``],i,a,()=>Un(t,n,r))}function Hn(e,t,n,r,i){for(;n;)n=Bn(e,t,n,r,i);return n}function Un(e,t,n){let r=e._getTarget();t in r||(r[t]={});let i=r[t];return A(i)&&j(n)?n:i||{}}function Wn(e,t,n,r){let i;for(let a of t)if(i=Gn(Mn(a,e),n),i!==void 0)return Nn(e,i)?Vn(n,r,e,i):i}function Gn(e,t){for(let n of t){if(!n)continue;let t=n[e];if(t!==void 0)return t}}function Kn(e){let t=e._keys;return t||=e._keys=qn(e._scopes),t}function qn(e){let t=new Set;for(let n of e)for(let e of Object.keys(n).filter(e=>!e.startsWith(`_`)))t.add(e);return Array.from(t)}function Jn(e,t,n,r){let{iScale:i}=e,{key:a=`r`}=this._parsing,o=Array(r),s,c,l,u;for(s=0,c=r;ste===`x`?`y`:`x`;function Qn(e,t,n,r){let i=e.skip?t:e,a=t,o=n.skip?t:n,s=mt(a,i),c=mt(o,a),l=s/(s+c),u=c/(s+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;let d=r*l,f=r*u;return{previous:{x:a.x-d*(o.x-i.x),y:a.y-d*(o.y-i.y)},next:{x:a.x+f*(o.x-i.x),y:a.y+f*(o.y-i.y)}}}function $n(e,t,n){let r=e.length,i,a,o,s,c,l=Xn(e,0);for(let u=0;u!e.skip)),t.cubicInterpolationMode===`monotone`)tr(e,i);else{let n=r?e[e.length-1]:e[0];for(a=0,o=e.length;ae.ownerDocument.defaultView.getComputedStyle(e,null);function lr(e,t){return cr(e).getPropertyValue(t)}var ur=[`top`,`right`,`bottom`,`left`];function dr(e,t,n){let r={};n=n?`-`+n:``;for(let i=0;i<4;i++){let a=ur[i];r[a]=parseFloat(e[t+`-`+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}var fr=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function pr(e,t){let n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r,o=!1,s,c;if(fr(i,a,e.target))s=i,c=a;else{let e=t.getBoundingClientRect();s=r.clientX-e.left,c=r.clientY-e.top,o=!0}return{x:s,y:c,box:o}}function mr(e,t){if(`native`in e)return e;let{canvas:n,currentDevicePixelRatio:r}=t,i=cr(n),a=i.boxSizing===`border-box`,o=dr(i,`padding`),s=dr(i,`border`,`width`),{x:c,y:l,box:u}=pr(e,n),d=o.left+(u&&s.left),f=o.top+(u&&s.top),{width:p,height:m}=t;return a&&(p-=o.width+s.width,m-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((l-f)/m*n.height/r)}}function hr(e,t,n){let r,i;if(t===void 0||n===void 0){let a=e&&or(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{let e=a.getBoundingClientRect(),o=cr(a),s=dr(o,`border`,`width`),c=dr(o,`padding`);t=e.width-c.width-s.width,n=e.height-c.height-s.height,r=sr(o.maxWidth,a,`clientWidth`),i=sr(o.maxHeight,a,`clientHeight`)}}return{width:t,height:n,maxWidth:r||$e,maxHeight:i||$e}}var gr=e=>Math.round(e*10)/10;function _r(e,t,n,r){let i=cr(e),a=dr(i,`margin`),o=sr(i.maxWidth,e,`clientWidth`)||$e,s=sr(i.maxHeight,e,`clientHeight`)||$e,c=hr(e,t,n),{width:l,height:u}=c;if(i.boxSizing===`content-box`){let e=dr(i,`border`,`width`),t=dr(i,`padding`);l-=t.width+e.width,u-=t.height+e.height}return l=Math.max(0,l-a.width),u=Math.max(0,r?l/r:u-a.height),l=gr(Math.min(l,o,c.maxWidth)),u=gr(Math.min(u,s,c.maxHeight)),l&&!u&&(u=gr(l/2)),(t!==void 0||n!==void 0)&&r&&c.height&&u>c.height&&(u=c.height,l=gr(Math.floor(u*r))),{width:l,height:u}}function vr(e,t,n){let r=t||1,i=gr(e.height*r),a=gr(e.width*r);e.height=gr(e.height),e.width=gr(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}var yr=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};ar()&&(window.addEventListener(`test`,null,t),window.removeEventListener(`test`,null,t))}catch{}return e}();function br(e,t){let n=lr(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function xr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Sr(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r===`middle`?n<.5?e.y:t.y:r===`after`?n<1?e.y:t.y:n>0?t.y:e.y}}function Cr(e,t,n,r){let i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=xr(e,i,n),s=xr(i,a,n),c=xr(a,t,n);return xr(xr(o,s,n),xr(s,c,n),n)}var wr=function(e,t){return{x(n){return e+e+t-n},setWidth(e){t=e},textAlign(e){return e===`center`?e:e===`right`?`left`:`right`},xPlus(e,t){return e-t},leftForLtr(e,t){return e-t}}},Tr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Er(e,t,n){return e?wr(t,n):Tr()}function Dr(e,t){let n,r;(t===`ltr`||t===`rtl`)&&(n=e.canvas.style,r=[n.getPropertyValue(`direction`),n.getPropertyPriority(`direction`)],n.setProperty(`direction`,t,`important`),e.prevTextDirection=r)}function Or(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty(`direction`,t[0],t[1]))}function kr(e){return e===`angle`?{between:gt,compare:ht,normalize:H}:{between:W,compare:(e,t)=>e-t,normalize:e=>e}}function Ar({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function jr(e,t,n){let{property:r,start:i,end:a}=n,{between:o,normalize:s}=kr(r),c=t.length,{start:l,end:u,loop:d}=e,f,p;if(d){for(l+=c,u+=c,f=0,p=c;fc(i,y,_)&&s(i,y)!==0,x=()=>s(a,_)===0||c(a,y,_),S=()=>h||b(),C=()=>!h||x();for(let e=u,n=u;e<=d;++e)v=t[e%o],!v.skip&&(_=l(v[r]),_!==y&&(h=c(_,i,a),g===null&&S()&&(g=s(_,i)===0?e:n),g!==null&&C()&&(m.push(Ar({start:g,end:e,loop:f,count:o,style:p})),g=null),n=e,y=_));return g!==null&&m.push(Ar({start:g,end:d,loop:f,count:o,style:p})),m}function Nr(e,t){let n=[],r=e.segments;for(let i=0;ii&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Fr(e,t,n,r){let i=e.length,a=[],o=t,s=e[t],c;for(c=t+1;c<=n;++c){let n=e[c%i];n.skip||n.stop?s.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=n.stop?c:null):(o=c,s.skip&&(t=c)),s=n}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Ir(e,t){let n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];let a=!!e._loop,{start:o,end:s}=Pr(n,i,a,r);return r===!0?Lr(e,[{start:o,end:s,loop:a}],n,t):Lr(e,Fr(n,o,sr({chart:e,initial:t.initial,numSteps:a,currentStep:Math.min(n-t.start,a)}))}_refresh(){this._request||=(this._running=!0,Et.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let i=n.items,a=i.length-1,o=!1,s;for(;a>=0;--a)s=i[a],s._active?(s._total>n.duration&&(n.duration=s._total),s.tick(e),o=!0):(i[a]=i[i.length-1],i.pop());o&&(r.draw(),this._notify(r,n,e,`progress`)),i.length||(n.running=!1,this._notify(r,n,e,`complete`),n.initial=!1),t+=i.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){let t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}listen(e,t,n){this._getAnims(e).listeners[t].push(n)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){let t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;let t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){let t=this._charts.get(e);if(!t||!t.items.length)return;let n=t.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),`complete`)}remove(e){return this._charts.delete(e)}},Gr=`transparent`,Kr={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let r=Rt(e||Gr),i=r.valid&&Rt(t||Gr);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}},qr=class{constructor(e,t,n,r){let i=t[n];r=En([e.to,r,i,e.from]);let a=En([e.from,i,r]);this._active=!0,this._fn=e.fn||Kr[e.type||typeof a],this._easing=It[e.easing]||It.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=n,this._from=a,this._to=r,this._promises=void 0}active(){return this._active}update(e,t,n){if(this._active){this._notify(!1);let r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=En([e.to,t,r,e.from]),this._from=En([e.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let t=e-this._start,n=this._duration,r=this._prop,i=this._from,a=this._loop,o=this._to,s;if(this._active=i!==o&&(a||t1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[r]=this._fn(i,o,s)}wait(){let e=this._promises||=[];return new Promise((t,n)=>{e.push({res:t,rej:n})})}_notify(e){let t=e?`res`:`rej`,n=this._promises||[];for(let e=0;e{let i=e[r];if(!j(i))return;let a={};for(let e of t)a[e]=i[e];(A(i.properties)&&i.properties||[r]).forEach(e=>{(e===r||!n.has(e))&&n.set(e,a)})})}_animateOptions(e,t){let n=t.options,r=Xr(e,n);if(!r)return[];let i=this._createAnimations(r,n);return n.$shared&&Yr(e.options.$animations,n).then(()=>{e.options=n},()=>{}),i}_createAnimations(e,t){let n=this._properties,r=[],i=e.$animations||={},a=Object.keys(t),o=Date.now(),s;for(s=a.length-1;s>=0;--s){let c=a[s];if(c.charAt(0)===`$`)continue;if(c===`options`){r.push(...this._animateOptions(e,t));continue}let l=t[c],u=i[c],d=n.get(c);if(u)if(d&&u.active()){u.update(d,l,o);continue}else u.cancel();if(!d||!d.duration){e[c]=l;continue}i[c]=u=new qr(d,e,c,l),r.push(u)}return r}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}let n=this._createAnimations(e,t);if(n.length)return Wr.add(this._chart,n),!0}};function Yr(e,t){let n=[],r=Object.keys(t);for(let t=0;t0||!n&&t<0)return i.index}return null}function ci(e,t){let{chart:n,_cachedMeta:r}=e,i=n._stacks||={},{iScale:a,vScale:o,index:s}=r,c=a.axis,l=o.axis,u=ii(a,o,r),d=t.length,f;for(let e=0;en[e].axis===t).shift()}function ui(e,t){return On(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:`default`,type:`dataset`})}function di(e,t,n){return On(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:`default`,type:`data`})}function fi(e,t){let n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t||=e._parsed;for(let e of t){let t=e._stacks;if(!t||t[r]===void 0||t[r][n]===void 0)return;delete t[r][n],t[r]._visualValues!==void 0&&t[r]._visualValues[n]!==void 0&&delete t[r]._visualValues[n]}}}var pi=e=>e===`reset`||e===`none`,mi=(e,t)=>t?e:Object.assign({},e),hi=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ei(n,!0),values:null},gi=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=ri(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled(`filler`)&&console.warn(`Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options`)}updateIndex(e){this.index!==e&&fi(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=(e,t,n,r)=>e===`x`?t:e===`r`?r:n,i=t.xAxisID=P(n.xAxisID,li(e,`x`)),a=t.yAxisID=P(n.yAxisID,li(e,`y`)),o=t.rAxisID=P(n.rAxisID,li(e,`r`)),s=t.indexAxis,c=t.iAxisID=r(s,i,a,o),l=t.vAxisID=r(s,a,i,o);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(a),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update(`reset`)}_destroy(){let e=this._cachedMeta;this._data&&wt(this._data,this),e._stacked&&fi(e)}_dataCheck(){let e=this.getDataset(),t=e.data||=[],n=this._data;if(j(t)){let e=this._cachedMeta;this._data=ni(t,e)}else if(n!==t){if(n){wt(n,this);let e=this._cachedMeta;fi(e),e._parsed=[]}t&&Object.isExtensible(t)&&Ct(t,this),this._syncList=[],this._data=t}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();let i=t._stacked;t._stacked=ri(t.vScale,t),t.stack!==n.stack&&(r=!0,fi(t),t.stack=n.stack),this._resyncElements(e),(r||i!==t._stacked)&&(ci(this,t._parsed),t._stacked=ri(t.vScale,t))}configure(){let e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){let{_cachedMeta:n,_data:r}=this,{iScale:i,_stacked:a}=n,o=i.axis,s=e===0&&t===r.length?!0:n._sorted,c=e>0&&n._parsed[e-1],l,u,d;if(this._parsing===!1)n._parsed=r,n._sorted=!0,d=r;else{d=A(r[e])?this.parseArrayData(n,r,e,t):j(r[e])?this.parseObjectData(n,r,e,t):this.parsePrimitiveData(n,r,e,t);let i=()=>u[o]===null||c&&u[o]t||u=0;--d)if(!p()){this.updateRangeFromParsed(c,e,f,s);break}}return c}getAllParsedValues(e){let t=this._cachedMeta._parsed,n=[],r,i,a;for(r=0,i=t.length;r=0&&ethis.getContext(n,r,t),u);return p.$shared&&(p.$shared=s,i[a]=Object.freeze(mi(p,s))),p}_resolveAnimations(e,t,n){let r=this.chart,i=this._cachedDataOpts,a=`animation-${t}`,o=i[a];if(o)return o;let s;if(r.options.animation!==!1){let r=this.chart.config,i=r.datasetAnimationScopeKeys(this._type,t),a=r.getOptionScopes(this.getDataset(),i);s=r.createResolver(a,this.getContext(e,n,t))}let c=new Jr(r,s&&s.animations);return s&&s._cacheable&&(i[a]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||=Object.assign({},e)}includeOptions(e,t){return!t||pi(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){let n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}updateElement(e,t,n,r){pi(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}updateSharedOptions(e,t,n){e&&!pi(t)&&this._resolveAnimations(void 0,t).update(e,n)}_setStyle(e,t,n,r){e.active=r;let i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}removeHoverStyle(e,t,n){this._setStyle(e,n,`active`,!1)}setHoverStyle(e,t,n){this._setStyle(e,n,`active`,!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,`active`,!0)}_resyncElements(e){let t=this._data,n=this._cachedMeta.data;for(let[e,t,n]of this._syncList)this[e](t,n);this._syncList=[];let r=n.length,i=t.length,a=Math.min(i,r);a&&this.parse(0,a),i>r?this._insertElements(r,i-r,e):i{for(e.length+=t,o=e.length-1;o>=a;o--)e[o]=e[o-t]};for(s(i),o=e;oe-t))}return e._cache.$bar}function vi(e){let t=e.iScale,n=_i(t,e.type),r=t._length,i,a,o,s,c=()=>{o===32767||o===-32768||(Je(s)&&(r=Math.min(r,Math.abs(o-s)||r)),s=o)};for(i=0,a=n.length;i0?i[e-1]:null,s=eMath.abs(s)&&(c=s,l=o),t[n.axis]=l,t._custom={barStart:c,barEnd:l,start:i,end:a,min:o,max:s}}function Si(e,t,n,r){return A(e)?xi(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ci(e,t,n,r){let i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,c=[],l,u,d,f;for(l=n,u=n+r;l=n?1:-1):B(e)}function Ei(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n=`left`,r=`right`):(t=e.basee.controller.options.grouped),i=n.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(t),s=o&&o[n.axis],c=e=>{let t=e._parsed.find(e=>e[n.axis]===s),r=t&&t[e.vScale.axis];if(k(r)||isNaN(r))return!0};for(let n of r)if(!(t!==void 0&&c(n))&&((i===!1||a.indexOf(n.stack)===-1||i===void 0&&n.stack===void 0)&&a.push(n.stack),n.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(n=>e[n].axis===t).shift()}_getAxis(){let e={},t=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)e[P(this.chart.options.indexAxis===`x`?n.xAxisID:n.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,n){let r=this._getStacks(e,n),i=t===void 0?-1:r.indexOf(t);return i===-1?r.length-1:i}_getRuler(){let e=this.options,t=this._cachedMeta,n=t.iScale,r=[],i,a;for(i=0,a=t.data.length;i=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart.data.labels||[],{xScale:r,yScale:i}=t,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),c=a._custom;return{label:n[e]||``,value:`(`+o+`, `+s+(c?`, `+c:``)+`)`}}update(e){let t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,n,r){let i=r===`reset`,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:s,includeOptions:c}=this._getSharedOptions(t,r),l=a.axis,u=o.axis;for(let d=t;dgt(e,s,c,!0)?1:Math.max(t,t*n,r,r*n),m=(e,t,r)=>gt(e,s,c,!0)?-1:Math.min(t,t*n,r,r*n),h=p(0,l,d),g=p(z,u,f),_=m(L,l,d),v=m(L+z,u,f);r=(h-_)/2,i=(g-v)/2,a=-(h+_)/2,o=-(g+v)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}var Fi=class extends gi{static id=`doughnut`;static defaults={datasetElementType:!1,dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:`number`,properties:[`circumference`,`endAngle`,`innerRadius`,`outerRadius`,`startAngle`,`x`,`y`,`offset`,`borderWidth`,`spacing`]}},cutout:`50%`,rotation:0,circumference:360,radius:`100%`,spacing:0,indexAxis:`r`};static descriptors={_scriptable:e=>e!==`spacing`,_indexable:e=>e!==`spacing`&&!e.startsWith(`borderDash`)&&!e.startsWith(`hoverBorderDash`)};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data,{labels:{pointStyle:n,textAlign:r,color:i,useBorderRadius:a,borderRadius:o}}=e.legend.options;return t.labels.length&&t.datasets.length?t.labels.map((t,s)=>{let c=e.getDatasetMeta(0).controller.getStyle(s);return{text:t,fillStyle:c.backgroundColor,fontColor:i,hidden:!e.getDataVisibility(s),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:r,pointStyle:n,borderRadius:a&&(o||c.borderRadius),index:s}}):[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){let n=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=n;else{let i=e=>+n[e];if(j(n[e])){let{key:e=`value`}=this._parsing;i=t=>+Ke(n[t],e)}let a,o;for(a=e,o=e+t;a0&&!isNaN(e)?Math.abs(e)/t*R:0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e],n.options.locale);return{label:r[e]||``,value:i}}getMaxBorderWidth(e){let t=0,n=this.chart,r,i,a,o,s;if(!e){for(r=0,i=n.data.datasets.length;r0&&this.getParsed(t-1);for(let n=0;n=_){v.skip=!0;continue}let b=this.getParsed(n),x=k(b[f]),S=v[d]=a.getPixelForValue(b[d],n),C=v[f]=i||x?o.getBasePixel():o.getPixelForValue(s?this.applyStack(o,b,s):b[f],n);v.skip=isNaN(S)||isNaN(C)||x,v.stop=n>0&&Math.abs(b[d]-y[d])>h,m&&(v.parsed=b,v.raw=c.data[n]),u&&(v.options=l||this.resolveDataElementOptions(n,p.active?`active`:r)),g||this.updateElement(p,n,v,r),y=b}}getMaxOverflow(){let e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;let i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}},Li=class extends gi{static id=`polarArea`;static defaults={dataElementType:`arc`,animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:`number`,properties:[`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`]}},indexAxis:`r`,startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let t=e.data;if(t.labels.length&&t.datasets.length){let{labels:{pointStyle:n,color:r}}=e.legend.options;return t.labels.map((t,i)=>{let a=e.getDatasetMeta(0).controller.getStyle(i);return{text:t,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:r,lineWidth:a.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:`radialLinear`,angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Kt(t._parsed[e].r,n.options.locale);return{label:r[e]||``,value:i}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){let e=this._cachedMeta,t={min:1/0,max:-1/0};return e.data.forEach((e,n)=>{let r=this.getParsed(n).r;!isNaN(r)&&this.chart.getDataVisibility(n)&&(rt.max&&(t.max=r))}),t}_updateRadius(){let e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,t,n,r){let i=r===`reset`,a=this.chart,o=a.options.animation,s=this._cachedMeta.rScale,c=s.xCenter,l=s.yCenter,u=s.getIndexAngle(0)-.5*L,d=u,f,p=360/this.countVisibleElements();for(f=0;f{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&t++}),t}_computeAngle(e,t,n){return this.chart.getDataVisibility(e)?V(this.resolveDataElementOptions(e,t).angle||n):0}},Ri=Object.freeze({__proto__:null,BarController:Mi,BubbleController:Ni,DoughnutController:Fi,LineController:Ii,PieController:class extends Fi{static id=`pie`;static defaults={cutout:0,rotation:0,circumference:360,radius:`100%`}},PolarAreaController:Li,RadarController:class extends gi{static id=`radar`;static defaults={datasetElementType:`line`,dataElementType:`point`,indexAxis:`r`,showLine:!0,elements:{line:{fill:`start`}}};static overrides={aspectRatio:1,scales:{r:{type:`radialLinear`}}};getLabelAndValue(e){let t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:``+t.getLabelForValue(n[t.axis])}}parseObjectData(e,t,n,r){return Jn.bind(this)(e,t,n,r)}update(e){let t=this._cachedMeta,n=t.dataset,r=t.data||[],i=t.iScale.getLabels();if(n.points=r,e!==`resize`){let t=this.resolveDatasetElementOptions(e);this.options.showLine||(t.borderWidth=0);let a={_loop:!0,_fullLoop:i.length===r.length,options:t};this.updateElement(n,void 0,a,e)}this.updateElements(r,0,r.length,e)}updateElements(e,t,n,r){let i=this._cachedMeta.rScale,a=r===`reset`;for(let o=t;o0&&this.getParsed(t-1);for(let l=t;l0&&Math.abs(n[f]-v[f])>g,h&&(m.parsed=n,m.raw=c.data[l]),d&&(m.options=u||this.resolveDataElementOptions(l,t.active?`active`:r)),_||this.updateElement(t,l,m,r),v=n}this.updateSharedOptions(u,r,l)}getMaxOverflow(){let e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}let n=e.dataset,r=n.options&&n.options.borderWidth||0;if(!t.length)return r;let i=t[0].size(this.resolveDataElementOptions(0)),a=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(r,i,a)/2}}});function zi(){throw Error(`This method is not implemented: Check that a complete date adapter is provided.`)}var Bi={_date:class e{static override(t){Object.assign(e.prototype,t)}options;constructor(e){this.options=e||{}}init(){}formats(){return zi()}parse(){return zi()}format(){return zi()}add(){return zi()}diff(){return zi()}startOf(){return zi()}endOf(){return zi()}}};function Vi(e,t,n,r){let{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!==`r`&&o&&a.length){let o=s._reversePixels?bt:yt;if(!r){let r=o(a,t,n);if(c){let{vScale:t}=i._cachedMeta,{_parsed:n}=e,a=n.slice(0,r.lo+1).reverse().findIndex(e=>!k(e[t.axis]));r.lo-=Math.max(0,a);let o=n.slice(r.hi).findIndex(e=>!k(e[t.axis]));r.hi+=Math.max(0,o)}return r}else if(i._sharedOptions){let e=a[0],r=typeof e.getRange==`function`&&e.getRange(t);if(r){let e=o(a,t,n-r),i=o(a,t,n+r);return{lo:e.lo,hi:i.hi}}}}return{lo:0,hi:a.length-1}}function Hi(e,t,n,r,i){let a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let e=0,n=a.length;e{e[o]&&e[o](t[n],i)&&(a.push({element:e,datasetIndex:r,index:c}),s||=e.inRange(t.x,t.y,i))}),r&&!s?[]:a}var Yi={evaluateInteractionItems:Hi,modes:{index(e,t,n,r){let i=mr(t,e),a=n.axis||`x`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o),c=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{let t=s[0].index,n=e.data[t];n&&!n.skip&&c.push({element:n,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,n,r){let i=mr(t,e),a=n.axis||`xy`,o=n.includeInvisible||!1,s=n.intersect?Wi(e,i,a,r,o):qi(e,i,a,!1,r,o);if(s.length>0){let t=s[0].datasetIndex,n=e.getDatasetMeta(t).data;s=[];for(let e=0;ee.pos===t)}function Qi(e,t){return e.filter(e=>Xi.indexOf(e.pos)===-1&&e.box.axis===t)}function $i(e,t){return e.sort((e,n)=>{let r=t?n:e,i=t?e:n;return r.weight===i.weight?r.index-i.index:r.weight-i.weight})}function ea(e){let t=[],n,r,i,a,o,s;for(n=0,r=(e||[]).length;ne.box.fullSize),!0),r=$i(Zi(t,`left`),!0),i=$i(Zi(t,`right`)),a=$i(Zi(t,`top`),!0),o=$i(Zi(t,`bottom`)),s=Qi(t,`x`),c=Qi(t,`y`);return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(s),chartArea:Zi(t,`chartArea`),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(s)}}function ia(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function aa(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function oa(e,t,n,r){let{pos:i,box:a}=n,o=e.maxPadding;if(!j(i)){n.size&&(e[i]-=n.size);let t=r[n.stack]||{size:0,count:1};t.size=Math.max(t.size,n.horizontal?a.height:a.width),n.size=t.size/t.count,e[i]+=n.size}a.getPadding&&aa(o,a.getPadding());let s=Math.max(0,t.outerWidth-ia(o,e,`left`,`right`)),c=Math.max(0,t.outerHeight-ia(o,e,`top`,`bottom`)),l=s!==e.w,u=c!==e.h;return e.w=s,e.h=c,n.horizontal?{same:l,other:u}:{same:u,other:l}}function sa(e){let t=e.maxPadding;function n(n){let r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n(`top`),e.x+=n(`left`),n(`right`),n(`bottom`)}function ca(e,t){let n=t.maxPadding;function r(e){let r={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{r[e]=Math.max(t[e],n[e])}),r}return r(e?[`left`,`right`]:[`top`,`bottom`])}function la(e,t,n,r){let i=[],a,o,s,c,l,u;for(a=0,o=e.length,l=0;a{typeof e.beforeLayout==`function`&&e.beforeLayout()});let u=c.reduce((e,t)=>t.box.options&&t.box.options.display===!1?e:e+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),f=Object.assign({},i);aa(f,q(r));let p=Object.assign({maxPadding:f,w:a,h:o,x:i.left,y:i.top},i),m=na(c.concat(l),d);la(s.fullSize,p,d,m),la(c,p,d,m),la(l,p,d,m)&&la(c,p,d,m),sa(p),da(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,da(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},I(s.chartArea,t=>{let n=t.box;Object.assign(n,e.chartArea),n.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}},fa=class{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,n){}removeEventListener(e,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,n,r){return t=Math.max(0,t||e.width),n||=e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(e){return!0}updateConfig(e){}},pa=class extends fa{acquireContext(e){return e&&e.getContext&&e.getContext(`2d`)||null}updateConfig(e){e.options.animation=!1}},ma=`$chartjs`,ha={touchstart:`mousedown`,touchmove:`mousemove`,touchend:`mouseup`,pointerenter:`mouseenter`,pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointerleave:`mouseout`,pointerout:`mouseout`},ga=e=>e===null||e===``;function _a(e,t){let n=e.style,r=e.getAttribute(`height`),i=e.getAttribute(`width`);if(e[ma]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||`block`,n.boxSizing=n.boxSizing||`border-box`,ga(i)){let t=br(e,`width`);t!==void 0&&(e.width=t)}if(ga(r))if(e.style.height===``)e.height=e.width/(t||2);else{let t=br(e,`height`);t!==void 0&&(e.height=t)}return e}var va=yr?{passive:!0}:!1;function ya(e,t,n){e&&e.addEventListener(t,n,va)}function ba(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,va)}function xa(e,t){let n=ha[e.type]||e.type,{x:r,y:i}=mr(e,t);return{type:n,chart:t,native:e,x:r===void 0?null:r,y:i===void 0?null:i}}function Sa(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function Ca(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.addedNodes,r),t&&=!Sa(n.removedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function wa(e,t,n){let r=e.canvas,i=new MutationObserver(e=>{let t=!1;for(let n of e)t||=Sa(n.removedNodes,r),t&&=!Sa(n.addedNodes,r);t&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}var Ta=new Map,Ea=0;function Da(){let e=window.devicePixelRatio;e!==Ea&&(Ea=e,Ta.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Oa(e,t){Ta.size||window.addEventListener(`resize`,Da),Ta.set(e,t)}function ka(e){Ta.delete(e),Ta.size||window.removeEventListener(`resize`,Da)}function Aa(e,t,n){let r=e.canvas,i=r&&or(r);if(!i)return;let a=Dt((e,t)=>{let r=i.clientWidth;n(e,t),r{let t=e[0],n=t.contentRect.width,r=t.contentRect.height;n===0&&r===0||a(n,r)});return o.observe(i),Oa(e,a),o}function ja(e,t,n){n&&n.disconnect(),t===`resize`&&ka(e)}function Ma(e,t,n){let r=e.canvas,i=Dt(t=>{e.ctx!==null&&n(xa(t,e))},e);return ya(r,t,i),i}var Na=class extends fa{acquireContext(e,t){let n=e&&e.getContext&&e.getContext(`2d`);return n&&n.canvas===e?(_a(e,t),n):null}releaseContext(e){let t=e.canvas;if(!t[ma])return!1;let n=t[ma].initial;[`height`,`width`].forEach(e=>{let r=n[e];k(r)?t.removeAttribute(e):t.setAttribute(e,r)});let r=n.style||{};return Object.keys(r).forEach(e=>{t.style[e]=r[e]}),t.width=t.width,delete t[ma],!0}addEventListener(e,t,n){this.removeEventListener(e,t);let r=e.$proxies||={};r[t]=({attach:Ca,detach:wa,resize:Aa}[t]||Ma)(e,t,n)}removeEventListener(e,t){let n=e.$proxies||={},r=n[t];r&&(({attach:ja,detach:ja,resize:ja}[t]||ba)(e,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,n,r){return _r(e,t,n,r)}isAttached(e){let t=e&&or(e);return!!(t&&t.isConnected)}};function Pa(e){return!ar()||typeof OffscreenCanvas<`u`&&e instanceof OffscreenCanvas?pa:Na}var Fa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){let{x:t,y:n}=this.getProps([`x`,`y`],e);return{x:t,y:n}}hasValue(){return ct(this.x)&&ct(this.y)}getProps(e,t){let n=this.$animations;if(!t||!n)return this;let r={};return e.forEach(e=>{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]}),r}};function Ia(e,t){let n=e.options.ticks,r=La(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?za(t):[],o=a.length,s=a[0],c=a[o-1],l=[];if(o>i)return Ba(t,l,a,o/i),l;let u=Ra(a,t,i);if(o>0){let e,n,r=o>1?Math.round((c-s)/(o-1)):null;for(Va(t,l,u,k(r)?0:s-r,s),e=0,n=o-1;ei)return t}return Math.max(i,1)}function za(e){let t=[],n,r;for(n=0,r=e.length;ne===`left`?`right`:e===`right`?`left`:e,Wa=(e,t,n)=>t===`top`||t===`left`?e[t]+n:e[t]-n,Ga=(e,t)=>Math.min(t||e,e);function Ka(e,t){let n=[],r=e.length/t,i=e.length,a=0;for(;ao+s)))return c}function Ja(e,t){I(e,e=>{let n=e.gc,r=n.length/2,i;if(r>t){for(i=0;in?n:t,n=r&&t>n?t:n,{min:N(t,N(n,t)),max:N(n,N(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||=this._computeLabelItems(e)}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(e,t,n){let{beginAtZero:r,grace:i,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||=(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Dn(this,i,r),!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let s=o=i||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let l=this._getLabelSizes(),u=l.widest.width,d=l.highest.height,f=U(this.chart.width-u,0,this.maxWidth);o=e.offset?this.maxWidth/n:f/(n-1),u+6>o&&(o=f/(n-(e.offset?.5:1)),s=this.maxHeight-Ya(e.grid)-t.padding-Xa(e.title,this.chart.options.font),c=Math.sqrt(u*u+d*d),a=dt(Math.min(Math.asin(U((l.highest.height+6)/o,-1,1)),Math.asin(U(s/c,-1,1))-Math.asin(U(d/c,-1,1)))),a=Math.max(r,Math.min(i,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:i}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){let a=Xa(r,t.options.font);if(o?(e.width=this.maxWidth,e.height=Ya(i)+a):(e.height=this.maxHeight,e.width=Ya(i)+a),n.display&&this.ticks.length){let{first:t,last:r,widest:i,highest:a}=this._getLabelSizes(),s=n.padding*2,c=V(this.labelRotation),l=Math.cos(c),u=Math.sin(c);if(o){let t=n.mirror?0:u*i.width+l*a.height;e.height=Math.min(this.maxHeight,e.height+t+s)}else{let t=n.mirror?0:l*i.width+u*a.height;e.width=Math.min(this.maxWidth,e.width+t+s)}this._calculatePadding(t,r,u,l)}}this._handleMargins(),o?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,n,r){let{ticks:{align:i,padding:a},position:o}=this.options,s=this.labelRotation!==0,c=o!==`top`&&this.axis===`x`;if(this.isHorizontal()){let o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1),u=0,d=0;s?c?(u=r*e.width,d=n*t.height):(u=n*e.height,d=r*t.width):i===`start`?d=t.width:i===`end`?u=e.width:i!==`inner`&&(u=e.width/2,d=t.width/2),this.paddingLeft=Math.max((u-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let n=t.height/2,r=e.height/2;i===`start`?(n=0,r=e.height):i===`end`&&(n=t.height,r=0),this.paddingTop=n+a,this.paddingBottom=r+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:t}=this.options;return t===`top`||t===`bottom`||e===`x`}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,n;for(t=0,n=e.length;t({width:a[e]||0,height:o[e]||0});return{first:C(0),last:C(t-1),widest:C(x),highest:C(S),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){let t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let t=this._startPixel+e*this._length;return _t(this._alignToPixels?an(this.chart,t,0):t)}getDecimalForPixel(e){let t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){let t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0:!!e}_computeGridLineItems(e){let t=this.axis,n=this.chart,r=this.options,{grid:i,position:a,border:o}=r,s=i.offset,c=this.isHorizontal(),l=this.ticks.length+ +!!s,u=Ya(i),d=[],f=o.setContext(this.getContext()),p=f.display?f.width:0,m=p/2,h=function(e){return an(n,e,p)},g,_,v,y,b,x,S,C,w,T,E,D;if(a===`top`)g=h(this.bottom),x=this.bottom-u,C=g-m,T=h(e.top)+m,D=e.bottom;else if(a===`bottom`)g=h(this.top),T=e.top,D=h(e.bottom)-m,x=g+m,C=this.top+u;else if(a===`left`)g=h(this.right),b=this.right-u,S=g-m,w=h(e.left)+m,E=e.right;else if(a===`right`)g=h(this.left),w=e.left,E=h(e.right)-m,b=g+m,S=this.left+u;else if(t===`x`){if(a===`center`)g=h((e.top+e.bottom)/2+.5);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,D=e.bottom,x=g+m,C=x+u}else if(t===`y`){if(a===`center`)g=h((e.left+e.right)/2);else if(j(a)){let e=Object.keys(a)[0],t=a[e];g=h(this.chart.scales[e].getPixelForValue(t))}b=g-m,S=b-u,w=e.left,E=e.right}let ee=P(r.ticks.maxTicksLimit,l),O=Math.max(1,Math.ceil(l/ee));for(_=0;_0&&(a-=r/2);break}f={left:a,top:i,width:r+t.width,height:n+t.height,color:e.backdropColor}}h.push({label:y,font:w,textOffset:D,options:{rotation:m,color:n,strokeColor:s,strokeWidth:l,textAlign:d,textBaseline:ee,translation:[b,x],backdrop:f}})}return h}_getXAxisLabelAlignment(){let{position:e,ticks:t}=this.options;if(-V(this.labelRotation))return e===`top`?`left`:`right`;let n=`center`;return t.align===`start`?n=`left`:t.align===`end`?n=`right`:t.align===`inner`&&(n=`inner`),n}_getYAxisLabelAlignment(e){let{position:t,ticks:{crossAlign:n,mirror:r,padding:i}}=this.options,a=this._getLabelSizes(),o=e+i,s=a.widest.width,c,l;return t===`left`?r?(l=this.right+i,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l+=s)):(l=this.right-o,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l=this.left)):t===`right`?r?(l=this.left+i,n===`near`?c=`right`:n===`center`?(c=`center`,l-=s/2):(c=`left`,l-=s)):(l=this.left+o,n===`near`?c=`left`:n===`center`?(c=`center`,l+=s/2):(c=`right`,l=this.right)):c=`right`,{textAlign:c,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,t=this.options.position;if(t===`left`||t===`right`)return{top:0,left:this.left,bottom:e.height,right:this.right};if(t===`top`||t===`bottom`)return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:t},left:n,top:r,width:i,height:a}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,i,a),e.restore())}getLineWidthForValue(e){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(t=>t.value===e);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){let t=this.options.grid,n=this.ctx,r=this._gridLineItems||=this._computeGridLineItems(e),i,a,o=(e,t,r)=>{!r.width||!r.color||(n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.setLineDash(r.borderDash||[]),n.lineDashOffset=r.borderDashOffset,n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.restore())};if(t.display)for(i=0,a=r.length;i{this.draw(e)}}]:[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:e=>{this.drawLabels(e)}}]}getMatchingVisibleMetas(e){let t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+`AxisID`,r=[],i,a;for(i=0,a=t.length;i{let r=n.split(`.`),i=r.pop(),a=[e].concat(r).join(`.`),o=t[n].split(`.`),s=o.pop(),c=o.join(`.`);K.route(a,i,c,s)})}function ao(e){return`id`in e&&`defaults`in e}var X=new class{constructor(){this.controllers=new no(gi,`datasets`,!0),this.elements=new no(Fa,`elements`),this.plugins=new no(Object,`plugins`),this.scales=new no(to,`scales`),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each(`register`,e)}remove(...e){this._each(`unregister`,e)}addControllers(...e){this._each(`register`,e,this.controllers)}addElements(...e){this._each(`register`,e,this.elements)}addPlugins(...e){this._each(`register`,e,this.plugins)}addScales(...e){this._each(`register`,e,this.scales)}getController(e){return this._get(e,this.controllers,`controller`)}getElement(e){return this._get(e,this.elements,`element`)}getPlugin(e){return this._get(e,this.plugins,`plugin`)}getScale(e){return this._get(e,this.scales,`scale`)}removeControllers(...e){this._each(`unregister`,e,this.controllers)}removeElements(...e){this._each(`unregister`,e,this.elements)}removePlugins(...e){this._each(`unregister`,e,this.plugins)}removeScales(...e){this._each(`unregister`,e,this.scales)}_each(e,t,n){[...t].forEach(t=>{let r=n||this._getRegistryForType(t);n||r.isForType(t)||r===this.plugins&&t.id?this._exec(e,r,t):I(t,t=>{let r=n||this._getRegistryForType(t);this._exec(e,r,t)})})}_exec(e,t,n){let r=qe(e);F(n[`before`+r],[],n),t[e](n),F(n[`after`+r],[],n)}_getRegistryForType(e){for(let t=0;te.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(r(t,n),e,`stop`),this._notify(r(n,t),e,`start`)}};function so(e){let t={},n=[],r=Object.keys(X.plugins.items);for(let e=0;e1&&ho(e[0].toLowerCase());if(t)return t}throw Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function vo(e,t,n){if(n[t+`AxisID`]===e)return{axis:t}}function yo(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(n.length)return vo(e,`x`,n[0])||vo(e,`y`,n[0])}return{}}function bo(e,t){let n=Zt[e.type]||{scales:{}},r=t.scales||{},i=fo(e.type,t),a=Object.create(null);return Object.keys(r).forEach(t=>{let o=r[t];if(!j(o))return console.error(`Invalid scale configuration for scale: ${t}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);let s=_o(t,o,yo(t,e),K.scales[o.type]),c=mo(s,i),l=n.scales||{};a[t]=Ve(Object.create(null),[{axis:s},o,l[s],l[c]])}),e.data.datasets.forEach(n=>{let i=n.type||e.type,o=n.indexAxis||fo(i,t),s=(Zt[i]||{}).scales||{};Object.keys(s).forEach(e=>{let t=po(e,o),i=n[t+`AxisID`]||t;a[i]=a[i]||Object.create(null),Ve(a[i],[{axis:t},r[i],s[e]])})}),Object.keys(a).forEach(e=>{let t=a[e];Ve(t,[K.scales[t.type],K.scale])}),a}function xo(e){let t=e.options||={};t.plugins=P(t.plugins,{}),t.scales=bo(e,t)}function So(e){return e||={},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Co(e){return e||={},e.data=So(e.data),xo(e),e}var wo=new Map,To=new Set;function Eo(e,t){let n=wo.get(e);return n||(n=t(),wo.set(e,n),To.add(n)),n}var Do=(e,t,n)=>{let r=Ke(t,n);r!==void 0&&e.add(r)},Oo=class{constructor(e){this._config=Co(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=So(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){let e=this._config;this.clearCache(),xo(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Eo(e,()=>[[`datasets.${e}`,``]])}datasetAnimationScopeKeys(e,t){return Eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,``]])}datasetElementScopeKeys(e,t){return Eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,``]])}pluginScopeKeys(e){let t=e.id,n=this.type;return Eo(`${n}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){let n=this._scopeCache,r=n.get(e);return(!r||t)&&(r=new Map,n.set(e,r)),r}getOptionScopes(e,t,n){let{options:r,type:i}=this,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;let s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Do(s,e,t))),t.forEach(e=>Do(s,r,e)),t.forEach(e=>Do(s,Zt[i]||{},e)),t.forEach(e=>Do(s,K,e)),t.forEach(e=>Do(s,Qt,e))});let c=Array.from(s);return c.length===0&&c.push(Object.create(null)),To.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:e,type:t}=this;return[e,Zt[t]||{},K.datasets[t]||{},{type:t},K,Qt]}resolveNamedOptions(e,t,n,r=[``]){let i={$shared:!0},{resolver:a,subPrefixes:o}=ko(this._resolverCache,e,r),s=a;if(jo(a,t)){i.$shared=!1,n=Ye(n)?n():n;let t=this.createResolver(e,n,o);s=An(a,n,t)}for(let e of t)i[e]=s[e];return i}createResolver(e,t,n=[``],r){let{resolver:i}=ko(this._resolverCache,e,n);return j(t)?An(i,t,void 0,r):i}};function ko(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));let i=n.join(),a=r.get(i);return a||(a={resolver:kn(t,n),subPrefixes:n.filter(e=>!e.toLowerCase().includes(`hover`))},r.set(i,a)),a}var Ao=e=>j(e)&&Object.getOwnPropertyNames(e).some(t=>Ye(e[t]));function jo(e,t){let{isScriptable:n,isIndexable:r}=jn(e);for(let i of t){let t=n(i),a=r(i),o=(a||t)&&e[i];if(t&&(Ye(o)||Ao(o))||a&&A(o))return!0}return!1}var Mo=`4.5.1`,No=[`top`,`bottom`,`left`,`right`,`chartArea`];function Po(e,t){return e===`top`||e===`bottom`||No.indexOf(e)===-1&&t===`x`}function Fo(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Io(e){let t=e.chart,n=t.options.animation;t.notifyPlugins(`afterRender`),F(n&&n.onComplete,[e],t)}function Lo(e){let t=e.chart,n=t.options.animation;F(n&&n.onProgress,[e],t)}function Ro(e){return ar()&&typeof e==`string`?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var zo={},Bo=e=>{let t=Ro(e);return Object.values(zo).filter(e=>e.canvas===t).pop()};function Vo(e,t,n){let r=Object.keys(e);for(let i of r){let r=+i;if(r>=t){let a=e[i];delete e[i],(n>0||r>t)&&(e[r+n]=a)}}}function Ho(e,t,n,r){return!n||e.type===`mouseout`?null:r?t:e}var Uo=class{static defaults=K;static instances=zo;static overrides=Zt;static registry=X;static version=Mo;static getChart=Bo;static register(...e){X.add(...e),Wo()}static unregister(...e){X.remove(...e),Wo()}constructor(e,t){let n=this.config=new Oo(t),r=Ro(e),i=Bo(r);if(i)throw Error(`Canvas is already in use. Chart with ID '`+i.id+`' must be destroyed before the canvas with ID '`+i.canvas.id+`' can be reused.`);let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||(Pa(r))),this.platform.updateConfig(n);let o=this.platform.acquireContext(r,a.aspectRatio),s=o&&o.canvas,c=s&&s.height,l=s&&s.width;if(this.id=Ne(),this.ctx=o,this.canvas=s,this.width=l,this.height=c,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new oo,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ot(e=>this.update(e),a.resizeDelay||0),this._dataChanges=[],zo[this.id]=this,!o||!s){console.error(`Failed to create chart: can't acquire context from the given item`);return}Wr.listen(this,`complete`,Io),Wr.listen(this,`progress`,Lo),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:t},width:n,height:r,_aspectRatio:i}=this;return k(e)?t&&i?i:r?n/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return X}_initialize(){return this.notifyPlugins(`beforeInit`),this.options.responsive?this.resize():vr(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins(`afterInit`),this}clear(){return on(this.canvas,this.ctx),this}stop(){return Wr.stop(this),this}resize(e,t){Wr.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){let n=this.options,r=this.canvas,i=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,e,t,i),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?`resize`:`attach`;this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,vr(this,o,!0)&&(this.notifyPlugins(`resize`,{size:a}),F(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){I(this.options.scales||{},(e,t)=>{e.id=t})}buildOrUpdateScales(){let e=this.options,t=e.scales,n=this.scales,r=Object.keys(n).reduce((e,t)=>(e[t]=!1,e),{}),i=[];t&&(i=i.concat(Object.keys(t).map(e=>{let n=t[e],r=_o(e,n),i=r===`r`,a=r===`x`;return{options:n,dposition:i?`chartArea`:a?`bottom`:`left`,dtype:i?`radialLinear`:a?`category`:`linear`}}))),I(i,t=>{let i=t.options,a=i.id,o=_o(a,i),s=P(i.type,t.dtype);(i.position===void 0||Po(i.position,o)!==Po(t.dposition))&&(i.position=t.dposition),r[a]=!0;let c=null;a in n&&n[a].type===s?c=n[a]:(c=new(X.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[c.id]=c),c.init(i,e)}),I(r,(e,t)=>{e||delete n[t]}),I(n,e=>{Y.configure(this,e,e.options),Y.addBox(this,e)})}_updateMetasets(){let e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((e,t)=>e.index-t.index),n>t){for(let e=t;et.length&&delete this._stacks,e.forEach((e,n)=>{t.filter(t=>t===e._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){let e=[],t=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=t.length;n{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins(`reset`)}update(e){let t=this.config;t.update();let n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins(`beforeUpdate`,{mode:e,cancelable:!0})===!1)return;let i=this.buildOrUpdateControllers();this.notifyPlugins(`beforeElementsUpdate`);let a=0;for(let e=0,t=this.data.datasets.length;e{e.reset()}),this._updateDatasets(e),this.notifyPlugins(`afterUpdate`,{mode:e}),this._layers.sort(Fo(`z`,`_idx`));let{_active:o,_lastEvent:s}=this;s?this._eventHandler(s,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){I(this.scales,e=>{Y.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options;(!Xe(new Set(Object.keys(this._listeners)),new Set(e.events))||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:i}of t)Vo(e,r,n===`_removeElements`?-i:i)}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let t=this.data.datasets.length,n=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+`,`+e.splice(1).join(`,`))),r=n(0);for(let e=1;ee.split(`,`)).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(this.notifyPlugins(`beforeLayout`,{cancelable:!0})===!1)return;Y.update(this,this.width,this.height,e);let t=this.chartArea,n=t.width<=0||t.height<=0;this._layers=[],I(this.boxes,e=>{n&&e.position===`chartArea`||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins(`afterLayout`)}_updateDatasets(e){if(this.notifyPlugins(`beforeDatasetsUpdate`,{mode:e,cancelable:!0})!==!1){for(let e=0,t=this.data.datasets.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins(`afterDatasetsDraw`)}_drawDataset(e){let t=this.ctx,n={meta:e,index:e.index,cancelable:!0},r=Ur(this,e);this.notifyPlugins(`beforeDatasetDraw`,n)!==!1&&(r&&un(t,r),e.controller.draw(),r&&dn(t),n.cancelable=!1,this.notifyPlugins(`afterDatasetDraw`,n))}isPointInArea(e){return ln(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,n,r){let i=Yi.modes[t];return typeof i==`function`?i(this,e,n,r):[]}getDatasetMeta(e){let t=this.data.datasets[e],n=this._metasets,r=n.filter(e=>e&&e._dataset===t).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||=On(null,{chart:this,type:`chart`})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let t=this.data.datasets[e];if(!t)return!1;let n=this.getDatasetMeta(e);return typeof n.hidden==`boolean`?!n.hidden:!t.hidden}setDatasetVisibility(e,t){let n=this.getDatasetMeta(e);n.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,n){let r=n?`show`:`hide`,i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);Je(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update(t=>t.datasetIndex===e?r:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){let t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),Wr.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,n,r),e[n]=r},r=(e,t,n)=>{e.offsetX=t,e.offsetY=n,this._eventHandler(e)};I(this.options.events,e=>n(e,r))}bindResponsiveEvents(){this._responsiveListeners||={};let e=this._responsiveListeners,t=this.platform,n=(n,r)=>{t.addEventListener(this,n,r),e[n]=r},r=(n,r)=>{e[n]&&(t.removeEventListener(this,n,r),delete e[n])},i=(e,t)=>{this.canvas&&this.resize(e,t)},a,o=()=>{r(`attach`,o),this.attached=!0,this.resize(),n(`resize`,i),n(`detach`,a)};a=()=>{this.attached=!1,r(`resize`,i),this._stop(),this._resize(0,0),n(`attach`,o)},t.isAttached(this.canvas)?o():a()}unbindEvents(){I(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},I(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,n){let r=n?`set`:`remove`,i,a,o,s;for(t===`dataset`&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller[`_`+r+`DatasetHoverStyle`]()),o=0,s=e.length;o{let n=this.getDatasetMeta(e);if(!n)throw Error(`No dataset found at index `+e);return{datasetIndex:e,element:n.data[t],index:t}});Ie(n,t)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,t))}notifyPlugins(e,t,n){return this._plugins.notify(this,e,t,n)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,n){let r=this.options.hover,i=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),a=i(t,e),o=n?e:i(e,t);a.length&&this.updateHoverStyle(a,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(e,t){let n={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},r=t=>(t.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins(`beforeEvent`,n,r)===!1)return;let i=this._handleEvent(e,t,n.inChartArea);return n.cancelable=!1,this.notifyPlugins(`afterEvent`,n,r),(i||n.changed)&&this.render(),this}_handleEvent(e,t,n){let{_active:r=[],options:i}=this,a=t,o=this._getActiveElements(e,r,n,a),s=Ze(e),c=Ho(e,this._lastEvent,n,s);n&&(this._lastEvent=null,F(i.onHover,[e,o,this],this),s&&F(i.onClick,[e,o,this],this));let l=!Ie(o,r);return(l||t)&&(this._active=o,this._updateHoverStyles(o,r,t)),this._lastEvent=c,l}_getActiveElements(e,t,n,r){if(e.type===`mouseout`)return[];if(!n)return t;let i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,r)}};function Wo(){return I(Uo.instances,e=>e._plugins.invalidate())}function Go(e,t,n){let{startAngle:r,x:i,y:a,outerRadius:o,innerRadius:s,options:c}=t,{borderWidth:l,borderJoinStyle:u}=c,d=Math.min(l/o,H(r-n));if(e.beginPath(),e.arc(i,a,o-l/2,r+d/2,n-d/2),s>0){let t=Math.min(l/s,H(r-n));e.arc(i,a,s+l/2,n-t/2,r+t/2,!0)}else{let t=Math.min(l/2,o*H(r-n));if(u===`round`)e.arc(i,a,t,n-L/2,r+L/2,!0);else if(u===`bevel`){let o=2*t*t,s=-o*Math.cos(n+L/2)+i,c=-o*Math.sin(n+L/2)+a,l=o*Math.cos(r+L/2)+i,u=o*Math.sin(r+L/2)+a;e.lineTo(s,c),e.lineTo(l,u)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip(`evenodd`)}function Ko(e,t,n){let{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:c}=t,l=i/s;e.beginPath(),e.arc(a,o,s,r-l,n+l),c>i?(l=i/c,e.arc(a,o,c,n+l,r-l,!0)):e.arc(a,o,i,n+z,r-z),e.closePath(),e.clip()}function qo(e){return Cn(e,[`outerStart`,`outerEnd`,`innerStart`,`innerEnd`])}function Jo(e,t,n,r){let i=qo(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),s=e=>{let t=(n-Math.min(a,e))*r/2;return U(e,0,Math.min(a,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:U(i.innerStart,0,o),innerEnd:U(i.innerEnd,0,o)}}function Yo(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Xo(e,t,n,r,i,a){let{x:o,y:s,startAngle:c,pixelMargin:l,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-l,0),f=u>0?u+r+n+l:0,p=0,m=i-c;if(r){let e=((u>0?u-r:0)+(d>0?d-r:0))/2;p=(m-(e===0?m:m*e/(e+r)))/2}let h=(m-Math.max(.001,m*d-n/L)/d)/2,g=c+h+p,_=i-h-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=Jo(t,f,d,_-g),S=d-v,C=d-y,w=g+v/S,T=_-y/C,E=f+b,D=f+x,ee=g+b/E,O=_-x/D;if(e.beginPath(),a){let t=(w+T)/2;if(e.arc(o,s,d,w,t),e.arc(o,s,d,t,T),y>0){let t=Yo(C,T,o,s);e.arc(t.x,t.y,y,T,_+z)}let n=Yo(D,_,o,s);if(e.lineTo(n.x,n.y),x>0){let t=Yo(D,O,o,s);e.arc(t.x,t.y,x,_+z,O+Math.PI)}let r=(_-x/f+(g+b/f))/2;if(e.arc(o,s,f,_-x/f,r,!0),e.arc(o,s,f,r,g+b/f,!0),b>0){let t=Yo(E,ee,o,s);e.arc(t.x,t.y,b,ee+Math.PI,g-z)}let i=Yo(S,g,o,s);if(e.lineTo(i.x,i.y),v>0){let t=Yo(S,w,o,s);e.arc(t.x,t.y,v,g-z,w)}}else{e.moveTo(o,s);let t=Math.cos(w)*d+o,n=Math.sin(w)*d+s;e.lineTo(t,n);let r=Math.cos(T)*d+o,i=Math.sin(T)*d+s;e.lineTo(r,i)}e.closePath()}function Zo(e,t,n,r,i){let{fullCircles:a,startAngle:o,circumference:s}=t,c=t.endAngle;if(a){Xo(e,t,n,r,c,i);for(let t=0;t=L&&p===0&&u!==`miter`&&Go(e,t,h),a||(Xo(e,t,n,r,h,i),e.stroke())}var $o=class extends Fa{static id=`arc`;static defaults={borderAlign:`center`,borderColor:`#fff`,borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:`backgroundColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){let{angle:r,distance:i}=pt(this.getProps([`x`,`y`],n),{x:e,y:t}),{startAngle:a,endAngle:o,innerRadius:s,outerRadius:c,circumference:l}=this.getProps([`startAngle`,`endAngle`,`innerRadius`,`outerRadius`,`circumference`],n),u=(this.options.spacing+this.options.borderWidth)/2,d=P(l,o-a),f=gt(r,a,o)&&a!==o,p=d>=R||f,m=W(i,s+u,c+u);return p&&m}getCenterPoint(e){let{x:t,y:n,startAngle:r,endAngle:i,innerRadius:a,outerRadius:o}=this.getProps([`x`,`y`,`startAngle`,`endAngle`,`innerRadius`,`outerRadius`],e),{offset:s,spacing:c}=this.options,l=(r+i)/2,u=(a+o+c+s)/2;return{x:t+Math.cos(l)*u,y:n+Math.sin(l)*u}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:t,circumference:n}=this,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign===`inner`?.33:0,this.fullCircles=n>R?Math.floor(n/R):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);let s=r*(1-Math.sin(Math.min(L,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,Zo(e,this,s,i,a),Qo(e,this,s,i,a),e.restore()}};function es(e,t,n=t){e.lineCap=P(n.borderCapStyle,t.borderCapStyle),e.setLineDash(P(n.borderDash,t.borderDash)),e.lineDashOffset=P(n.borderDashOffset,t.borderDashOffset),e.lineJoin=P(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=P(n.borderWidth,t.borderWidth),e.strokeStyle=P(n.borderColor,t.borderColor)}function ts(e,t,n){e.lineTo(n.x,n.y)}function ns(e){return e.stepped?fn:e.tension||e.cubicInterpolationMode===`monotone`?pn:ts}function rs(e,t,n={}){let r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:s}=t,c=Math.max(i,o),l=Math.min(a,s),u=is&&a>s;return{count:r,start:c,loop:t.loop,ilen:l(o+(l?s-e:e))%a,y=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,_))};for(c&&(p=i[v(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[v(f)],p.skip)continue;let t=p.x,n=p.y,r=t|0;r===m?(ng&&(g=n),u=(d*u+t)/++d):(y(),e.lineTo(t,n),m=r,d=0,h=g=n),_=n}y()}function os(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!==`monotone`&&!t.stepped&&!n?as:is}function ss(e){return e.stepped?Sr:e.tension||e.cubicInterpolationMode===`monotone`?Cr:xr}function cs(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),es(e,t.options),e.stroke(i)}function ls(e,t,n,r){let{segments:i,options:a}=t,o=os(t);for(let s of i)es(e,a,s.style),e.beginPath(),o(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}var us=typeof Path2D==`function`;function ds(e,t,n,r){us&&!t.options.segment?cs(e,t,n,r):ls(e,t,n,r)}var fs=class extends Fa{static id=`line`;static defaults={borderCapStyle:`butt`,borderDash:[],borderDashOffset:0,borderJoinStyle:`miter`,borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:`default`,fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:`backgroundColor`,borderColor:`borderColor`};static descriptors={_scriptable:!0,_indexable:e=>e!==`borderDash`&&e!==`fill`};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){let n=this.options;if((n.tension||n.cubicInterpolationMode===`monotone`)&&!n.stepped&&!this._pointsUpdated){let r=n.spanGaps?this._loop:this._fullLoop;ir(this._points,n,e,r,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||=Ir(this,this.options.segment)}first(){let e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){let e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}interpolate(e,t){let n=this.options,r=e[t],i=this.points,a=Nr(this,{property:t,start:r,end:r});if(!a.length)return;let o=[],s=ss(n),c,l;for(c=0,l=a.length;ce.replace(`rgb(`,`rgba(`).replace(`)`,`, 0.5)`));function Ds(e){return Ts[e%Ts.length]}function Os(e){return Es[e%Es.length]}function ks(e,t){return e.borderColor=Ds(t),e.backgroundColor=Os(t),++t}function As(e,t){return e.backgroundColor=e.data.map(()=>Ds(t++)),t}function js(e,t){return e.backgroundColor=e.data.map(()=>Os(t++)),t}function Ms(e){let t=0;return(n,r)=>{let i=e.getDatasetMeta(r).controller;i instanceof Fi?t=As(n,t):i instanceof Li?t=js(n,t):i&&(t=ks(n,t))}}function Ns(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function Ps(e){return e&&(e.borderColor||e.backgroundColor)}function Fs(){return K.borderColor!==`rgba(0,0,0,0.1)`||K.backgroundColor!==`rgba(0,0,0,0.1)`}var Is={id:`colors`,defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:r},options:i}=e.config,{elements:a}=i,o=Ns(r)||Ps(i)||a&&Ns(a)||Fs();if(!n.forceOverride&&o)return;let s=Ms(e);r.forEach(s)}};function Ls(e,t,n,r,i){let a=i.samples||r;if(a>=n)return e.slice(t,t+n);let o=[],s=(n-2)/(a-2),c=0,l=t+n-1,u=t,d,f,p,m,h;for(o[c++]=e[u],d=0;dp&&(p=m,f=e[a],h=a);o[c++]=f,u=h}return o[c++]=e[l],o}function Rs(e,t,n,r){let i=0,a=0,o,s,c,l,u,d,f,p,m,h,g=[],_=t+n-1,v=e[t].x,y=e[_].x-v;for(o=t;oh&&(h=l,f=o),i=(a*i+s.x)/++a;else{let n=o-1;if(!k(d)&&!k(f)){let t=Math.min(d,f),r=Math.max(d,f);t!==p&&t!==n&&g.push({...e[t],x:i}),r!==p&&r!==n&&g.push({...e[r],x:i})}o>0&&n!==p&&g.push(e[n]),g.push(s),u=t,a=0,m=h=l,d=f=p=o}}return g}function zs(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Bs(e){e.data.datasets.forEach(e=>{zs(e)})}function Vs(e,t){let n=t.length,r=0,i,{iScale:a}=e,{min:o,max:s,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(r=U(yt(t,a.axis,o).lo,0,n-1)),i=l?U(yt(t,a.axis,s).hi+1,r,n)-r:n-r,{start:r,count:i}}var Hs={id:`decimation`,defaults:{algorithm:`min-max`,enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Bs(e);return}let r=e.width;e.data.datasets.forEach((t,i)=>{let{_data:a,indexAxis:o}=t,s=e.getDatasetMeta(i),c=a||t.data;if(En([o,e.options.indexAxis])===`y`||!s.controller.supportsDecimation)return;let l=e.scales[s.xAxisID];if(l.type!==`linear`&&l.type!==`time`||e.options.parsing)return;let{start:u,count:d}=Vs(s,c);if(d<=(n.threshold||4*r)){zs(t);return}k(a)&&(t._data=c,delete t.data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(e){this._data=e}}));let f;switch(n.algorithm){case`lttb`:f=Ls(c,u,d,r,n);break;case`min-max`:f=Rs(c,u,d,r);break;default:throw Error(`Unsupported decimation algorithm '${n.algorithm}'`)}t._decimated=f})},destroy(e){Bs(e)}};function Us(e,t,n){let r=e.segments,i=e.points,a=t.points,o=[];for(let e of r){let{start:r,end:s}=e;s=Ks(r,s,i);let c=Ws(n,i[r],i[s],e.loop);if(!t.segments){o.push({source:e,target:c,start:i[r],end:i[s]});continue}let l=Nr(t,c);for(let t of l){let r=Ws(n,a[t.start],a[t.end],t.loop),s=Mr(e,i,r);for(let e of s)o.push({source:e,target:t,start:{[n]:qs(c,r,`start`,Math.max)},end:{[n]:qs(c,r,`end`,Math.min)}})}}return o}function Ws(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e===`angle`&&(i=H(i),a=H(a)),{property:e,start:i,end:a}}function Gs(e,t){let{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:e,end:t})=>{t=Ks(e,t,i);let o=i[e],s=i[t];r===null?n!==null&&(a.push({x:n,y:o.y}),a.push({x:n,y:s.y})):(a.push({x:o.x,y:r}),a.push({x:s.x,y:r}))}),a}function Ks(e,t,n){for(;t>e;t--){let e=n[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function qs(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function Js(e,t){let n=[],r=!1;return A(e)?(r=!0,n=e):n=Gs(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Ys(e){return e&&e.fill!==!1}function Xs(e,t,n){let r=e[t].fill,i=[t],a;if(!n)return r;for(;r!==!1&&i.indexOf(r)===-1;){if(!M(r))return r;if(a=e[r],!a)return!1;if(a.visible)return r;i.push(r),r=a.fill}return!1}function Zs(e,t,n){let r=tc(e);if(j(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return M(i)&&Math.floor(i)===i?Qs(r[0],t,i,n):[`origin`,`start`,`end`,`stack`,`shape`].indexOf(r)>=0&&r}function Qs(e,t,n,r){return(e===`-`||e===`+`)&&(n=t+n),n===t||n<0||n>=r?!1:n}function $s(e,t){let n=null;return e===`start`?n=t.bottom:e===`end`?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ec(e,t,n){let r;return r=e===`start`?n:e===`end`?t.options.reverse?t.min:t.max:j(e)?e.value:t.getBaseValue(),r}function tc(e){let t=e.options,n=t.fill,r=P(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?`origin`:r}function nc(e){let{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,s=rc(t,n);s.push(Js({x:null,y:t.bottom},r));for(let e=0;e=0;--t){let n=i[t].$filler;n&&(n.line.updateControlPoints(a,n.axis),r&&n.fill&&fc(e.ctx,n,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!==`beforeDatasetsDraw`)return;let r=e.getSortedVisibleDatasetMetas();for(let t=r.length-1;t>=0;--t){let n=r[t].$filler;Ys(n)&&fc(e.ctx,n,e.chartArea)}},beforeDatasetDraw(e,t,n){let r=t.meta.$filler;!Ys(r)||n.drawTime!==`beforeDatasetDraw`||fc(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:`beforeDatasetDraw`}},bc=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},xc=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,Sc=class extends Fa{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},t=F(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,n)=>e.sort(t,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}let n=e.labels,r=J(n.font),i=r.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:s}=bc(n,i),c,l;t.font=r.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,i,o,s)+10):(l=this.maxHeight,c=this._fitCols(a,r,o,s)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(l,e.maxHeight||this.maxHeight)}_fitRows(e,t,n,r){let{ctx:i,maxWidth:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.lineWidths=[0],l=r+o,u=e;i.textAlign=`left`,i.textBaseline=`middle`;let d=-1,f=-l;return this.legendItems.forEach((e,p)=>{let m=n+t/2+i.measureText(e.text).width;(p===0||c[c.length-1]+m+2*o>a)&&(u+=l,c[c.length-(p>0?0:1)]=0,f+=l,d++),s[p]={left:0,top:f,row:d,width:m,height:r},c[c.length-1]+=m+o}),u}_fitCols(e,t,n,r){let{ctx:i,maxHeight:a,options:{labels:{padding:o}}}=this,s=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-e,u=o,d=0,f=0,p=0,m=0;return this.legendItems.forEach((e,a)=>{let{itemWidth:h,itemHeight:g}=Cc(n,t,i,e,r);a>0&&f+g+2*o>l&&(u+=d+o,c.push({width:d,height:f}),p+=d+o,m++,d=f=0),s[a]={left:p,top:f,col:m,width:h,height:g},d=Math.max(d,h),f+=g+o}),u+=d,c.push({width:d,height:f}),u}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:i}}=this,a=Er(i,this.left,this.width);if(this.isHorizontal()){let i=0,o=G(n,this.left+r,this.right-this.lineWidths[i]);for(let s of t)i!==s.row&&(i=s.row,o=G(n,this.left+r,this.right-this.lineWidths[i])),s.top+=this.top+e+r,s.left=a.leftForLtr(a.x(o),s.width),o+=s.width+r}else{let i=0,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height);for(let s of t)s.col!==i&&(i=s.col,o=G(n,this.top+e+r,this.bottom-this.columnSizes[i].height)),s.top=o,s.left+=this.left+r,s.left=a.leftForLtr(a.x(s.left),s.width),o+=s.height+r}}isHorizontal(){return this.options.position===`top`||this.options.position===`bottom`}draw(){if(this.options.display){let e=this.ctx;un(e,this),this._draw(),dn(e)}}_draw(){let{options:e,columnSizes:t,lineWidths:n,ctx:r}=this,{align:i,labels:a}=e,o=K.color,s=Er(e.rtl,this.left,this.width),c=J(a.font),{padding:l}=a,u=c.size,d=u/2,f;this.drawTitle(),r.textAlign=s.textAlign(`left`),r.textBaseline=`middle`,r.lineWidth=.5,r.font=c.string;let{boxWidth:p,boxHeight:m,itemHeight:h}=bc(a,u),g=function(e,t,n){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;r.save();let i=P(n.lineWidth,1);if(r.fillStyle=P(n.fillStyle,o),r.lineCap=P(n.lineCap,`butt`),r.lineDashOffset=P(n.lineDashOffset,0),r.lineJoin=P(n.lineJoin,`miter`),r.lineWidth=i,r.strokeStyle=P(n.strokeStyle,o),r.setLineDash(P(n.lineDash,[])),a.usePointStyle)cn(r,{radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:i},s.xPlus(e,p/2),t+d,a.pointStyleWidth&&p);else{let a=t+Math.max((u-m)/2,0),o=s.leftForLtr(e,p),c=Tn(n.borderRadius);r.beginPath(),Object.values(c).some(e=>e!==0)?vn(r,{x:o,y:a,w:p,h:m,radius:c}):r.rect(o,a,p,m),r.fill(),i!==0&&r.stroke()}r.restore()},_=function(e,t,n){_n(r,n.text,e,t+h/2,c,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})},v=this.isHorizontal(),y=this._computeTitleHeight();f=v?{x:G(i,this.left+l,this.right-n[0]),y:this.top+l+y,line:0}:{x:this.left+l,y:G(i,this.top+y+l,this.bottom-t[0].height),line:0},Dr(this.ctx,e.textDirection);let b=h+l;this.legendItems.forEach((o,u)=>{r.strokeStyle=o.fontColor,r.fillStyle=o.fontColor;let m=r.measureText(o.text).width,h=s.textAlign(o.textAlign||=a.textAlign),x=p+d+m,S=f.x,C=f.y;if(s.setWidth(this.width),v?u>0&&S+x+l>this.right&&(C=f.y+=b,f.line++,S=f.x=G(i,this.left+l,this.right-n[f.line])):u>0&&C+b>this.bottom&&(S=f.x=S+t[f.line].width+l,f.line++,C=f.y=G(i,this.top+y+l,this.bottom-t[f.line].height)),g(s.x(S),C,o),S=At(h,S+p+d,v?S+x:this.right,e.rtl),_(s.x(S),C,o),v)f.x+=x+l;else if(typeof o.text!=`string`){let e=c.lineHeight;f.y+=Ec(o,e)+l}else f.y+=b}),Or(this.ctx,e.textDirection)}drawTitle(){let e=this.options,t=e.title,n=J(t.font),r=q(t.padding);if(!t.display)return;let i=Er(e.rtl,this.left,this.width),a=this.ctx,o=t.position,s=n.size/2,c=r.top+s,l,u=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,u=G(e.align,u,this.right-d);else{let t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);l=c+G(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}let f=G(o,u,u+d);a.textAlign=i.textAlign(kt(o)),a.textBaseline=`middle`,a.strokeStyle=t.color,a.fillStyle=t.color,a.font=n.string,_n(a,t.text,f,l,n)}_computeTitleHeight(){let e=this.options.title,t=J(e.font),n=q(e.padding);return e.display?t.lineHeight+n.height:0}_getLegendItemAt(e,t){let n,r,i;if(W(e,this.left,this.right)&&W(t,this.top,this.bottom)){for(i=this.legendHitBoxes,n=0;ne.length>t.length?e:t)),t+n.size/2+r.measureText(i).width}function Tc(e,t,n){let r=e;return typeof t.text!=`string`&&(r=Ec(t,n)),r}function Ec(e,t){return t*(e.text?e.text.length:0)}function Dc(e,t){return!!((e===`mousemove`||e===`mouseout`)&&(t.onHover||t.onLeave)||t.onClick&&(e===`click`||e===`mouseup`))}var Oc={id:`legend`,_element:Sc,start(e,t,n){let r=e.legend=new Sc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r)},stop(e){Y.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let r=e.legend;Y.configure(e,r,n),r.options=n},afterUpdate(e){let t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:`top`,align:`center`,fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){let r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{let c=e.controller.getStyle(n?0:void 0),l=q(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:`center`,text:``}},descriptors:{_scriptable:e=>!e.startsWith(`on`),labels:{_scriptable:e=>![`generateLabels`,`filter`,`sort`].includes(e)}}},kc=class extends Fa{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;let r=A(n.text)?n.text.length:1;this._padding=q(n.padding);let i=r*J(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){let e=this.options.position;return e===`top`||e===`bottom`}_drawArgs(e){let{top:t,left:n,bottom:r,right:i,options:a}=this,o=a.align,s=0,c,l,u;return this.isHorizontal()?(l=G(o,n,i),u=t+e,c=i-n):(a.position===`left`?(l=n+e,u=G(o,r,t),s=L*-.5):(l=i-e,u=G(o,t,r),s=L*.5),c=r-t),{titleX:l,titleY:u,maxWidth:c,rotation:s}}draw(){let e=this.ctx,t=this.options;if(!t.display)return;let n=J(t.font),r=n.lineHeight/2+this._padding.top,{titleX:i,titleY:a,maxWidth:o,rotation:s}=this._drawArgs(r);_n(e,t.text,0,0,n,{color:t.color,maxWidth:o,rotation:s,textAlign:kt(t.align),textBaseline:`middle`,translation:[i,a]})}};function Ac(e,t){let n=new kc({ctx:e.ctx,options:t,chart:e});Y.configure(e,n,t),Y.addBox(e,n),e.titleBlock=n}var jc={id:`title`,_element:kc,start(e,t,n){Ac(e,n)},stop(e){let t=e.titleBlock;Y.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let r=e.titleBlock;Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`bold`},fullSize:!0,padding:10,position:`top`,text:``,weight:2e3},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Mc=new WeakMap,Nc={id:`subtitle`,start(e,t,n){let r=new kc({ctx:e.ctx,options:n,chart:e});Y.configure(e,r,n),Y.addBox(e,r),Mc.set(e,r)},stop(e){Y.removeBox(e,Mc.get(e)),Mc.delete(e)},beforeUpdate(e,t,n){let r=Mc.get(e);Y.configure(e,r,n),r.options=n},defaults:{align:`center`,display:!1,font:{weight:`normal`},fullSize:!0,padding:0,position:`top`,text:``,weight:1500},defaultRoutes:{color:`color`},descriptors:{_scriptable:!0,_indexable:!1}},Pc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;te+t)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=1/0,a,o,s;for(a=0,o=e.length;a-1?e.split(` `):e}function Ic(e,t){let{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Lc(e,t){let n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,c=J(t.bodyFont),l=J(t.titleFont),u=J(t.footerFont),d=a.length,f=i.length,p=r.length,m=q(t.padding),h=m.height,g=0,_=r.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*l.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){let e=t.displayColors?Math.max(s,c.lineHeight):c.lineHeight;h+=p*e+(_-p)*c.lineHeight+(_-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0,y=function(e){g=Math.max(g,n.measureText(e).width+v)};return n.save(),n.font=l.string,I(e.title,y),n.font=c.string,I(e.beforeBody.concat(e.afterBody),y),v=t.displayColors?o+2+t.boxPadding:0,I(r,e=>{I(e.before,y),I(e.lines,y),I(e.after,y)}),v=0,n.font=u.string,I(e.footer,y),n.restore(),g+=m.width,{width:g,height:h}}function Rc(e,t){let{y:n,height:r}=t;return ne.height-r/2?`bottom`:`center`}function zc(e,t,n,r){let{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e===`left`&&i+a+o>t.width||e===`right`&&i-a-o<0)return!0}function Bc(e,t,n,r){let{x:i,width:a}=n,{width:o,chartArea:{left:s,right:c}}=e,l=`center`;return r===`center`?l=i<=(s+c)/2?`left`:`right`:i<=a/2?l=`left`:i>=o-a/2&&(l=`right`),zc(l,e,t,n)&&(l=`center`),l}function Vc(e,t,n){let r=n.yAlign||t.yAlign||Rc(e,n);return{xAlign:n.xAlign||t.xAlign||Bc(e,t,n,r),yAlign:r}}function Hc(e,t){let{x:n,width:r}=e;return t===`right`?n-=r:t===`center`&&(n-=r/2),n}function Uc(e,t,n){let{y:r,height:i}=e;return t===`top`?r+=n:t===`bottom`?r-=i+n:r-=i/2,r}function Wc(e,t,n,r){let{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:c}=n,l=i+a,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Tn(o),m=Hc(t,s),h=Uc(t,c,l);return c===`center`?s===`left`?m+=l:s===`right`&&(m-=l):s===`left`?m-=Math.max(u,f)+i:s===`right`&&(m+=Math.max(d,p)+i),{x:U(m,0,r.width-t.width),y:U(h,0,r.height-t.height)}}function Gc(e,t,n){let r=q(n.padding);return t===`center`?e.x+e.width/2:t===`right`?e.x+e.width-r.right:e.x+r.left}function Kc(e){return Z([],Fc(e))}function qc(e,t,n){return On(e,{tooltip:t,tooltipItems:n,type:`tooltip`})}function Jc(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var Yc={beforeTitle:Me,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode===`dataset`)return t.dataset.label||``;if(t.label)return t.label;if(r>0&&t.dataIndex{let t={before:[],lines:[],after:[]},i=Jc(n,e);Z(t.before,Fc(Q(i,`beforeLabel`,this,e))),Z(t.lines,Q(i,`label`,this,e)),Z(t.after,Fc(Q(i,`afterLabel`,this,e))),r.push(t)}),r}getAfterBody(e,t){return Kc(Q(t.callbacks,`afterBody`,this,e))}getFooter(e,t){let{callbacks:n}=t,r=Q(n,`beforeFooter`,this,e),i=Q(n,`footer`,this,e),a=Q(n,`afterFooter`,this,e),o=[];return o=Z(o,Fc(r)),o=Z(o,Fc(i)),o=Z(o,Fc(a)),o}_createItems(e){let t=this._active,n=this.chart.data,r=[],i=[],a=[],o=[],s,c;for(s=0,c=t.length;se.filter(t,r,i,n))),e.itemSort&&(o=o.sort((t,r)=>e.itemSort(t,r,n))),I(o,t=>{let n=Jc(e.callbacks,t);r.push(Q(n,`labelColor`,this,t)),i.push(Q(n,`labelPointStyle`,this,t)),a.push(Q(n,`labelTextColor`,this,t))}),this.labelColors=r,this.labelPointStyles=i,this.labelTextColors=a,this.dataPoints=o,o}update(e,t){let n=this.options.setContext(this.getContext()),r=this._active,i,a=[];if(!r.length)this.opacity!==0&&(i={opacity:0});else{let e=Pc[n.position].call(this,r,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);let t=this._size=Lc(this,n),o=Object.assign({},e,t),s=Vc(this.chart,n,o),c=Wc(n,o,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,i={opacity:1,x:c.x,y:c.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}this._tooltipItems=a,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,n,r){let i=this.getCaretPosition(e,n,r);t.lineTo(i.x1,i.y1),t.lineTo(i.x2,i.y2),t.lineTo(i.x3,i.y3)}getCaretPosition(e,t,n){let{xAlign:r,yAlign:i}=this,{caretSize:a,cornerRadius:o}=n,{topLeft:s,topRight:c,bottomLeft:l,bottomRight:u}=Tn(o),{x:d,y:f}=e,{width:p,height:m}=t,h,g,_,v,y,b;return i===`center`?(y=f+m/2,r===`left`?(h=d,g=h-a,v=y+a,b=y-a):(h=d+p,g=h+a,v=y-a,b=y+a),_=h):(g=r===`left`?d+Math.max(s,l)+a:r===`right`?d+p-Math.max(c,u)-a:this.caretX,i===`top`?(v=f,y=v-a,h=g-a,_=g+a):(v=f+m,y=v+a,h=g+a,_=g-a),b=v),{x1:h,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(e,t,n){let r=this.title,i=r.length,a,o,s;if(i){let c=Er(n.rtl,this.x,this.width);for(e.x=Gc(this,n.titleAlign,n),t.textAlign=c.textAlign(n.titleAlign),t.textBaseline=`middle`,a=J(n.titleFont),o=n.titleSpacing,t.fillStyle=n.titleColor,t.font=a.string,s=0;se!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,vn(e,{x:t,y:p,w:c,h:s,radius:o}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),vn(e,{x:n,y:p+1,w:c-2,h:s-2,radius:o}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,p,c,s),e.strokeRect(t,p,c,s),e.fillStyle=a.backgroundColor,e.fillRect(n,p+1,c-2,s-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,t,n){let{body:r}=this,{bodySpacing:i,bodyAlign:a,displayColors:o,boxHeight:s,boxWidth:c,boxPadding:l}=n,u=J(n.bodyFont),d=u.lineHeight,f=0,p=Er(n.rtl,this.x,this.width),m=function(n){t.fillText(n,p.x(e.x+f),e.y+d/2),e.y+=d+i},h=p.textAlign(a),g,_,v,y,b,x,S;for(t.textAlign=a,t.textBaseline=`middle`,t.font=u.string,e.x=Gc(this,h,n),t.fillStyle=n.bodyColor,I(this.beforeBody,m),f=o&&h!==`right`?a===`center`?c/2+l:c+2+l:0,y=0,x=r.length;y0&&t.stroke()}_updateAnimationTarget(e){let t=this.chart,n=this.$animations,r=n&&n.x,i=n&&n.y;if(r||i){let n=Pc[e.position].call(this,this._active,this._eventPosition);if(!n)return;let a=this._size=Lc(this,e),o=Object.assign({},n,this._size),s=Vc(t,e,o),c=Wc(e,o,s,t);(r._to!==c.x||i._to!==c.y)&&(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){let t=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(t);let r={width:this.width,height:this.height},i={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let a=q(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(i,e,r,t),Dr(e,t.textDirection),i.y+=a.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),Or(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){let n=this._active,r=e.map(({datasetIndex:e,index:t})=>{let n=this.chart.getDatasetMeta(e);if(!n)throw Error(`Cannot find a dataset at index `+e);return{datasetIndex:e,element:n.data[t],index:t}}),i=!Ie(n,r),a=this._positionChanged(r,t);(i||a)&&(this._active=r,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,n=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let r=this.options,i=this._active||[],a=this._getActiveElements(e,i,t,n),o=this._positionChanged(a,e),s=t||!Ie(a,i)||o;return s&&(this._active=a,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}_getActiveElements(e,t,n,r){let i=this.options;if(e.type===`mouseout`)return[];if(!r)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,i.mode,i,n);return i.reverse&&a.reverse(),a}_positionChanged(e,t){let{caretX:n,caretY:r,options:i}=this,a=Pc[i.position].call(this,e,t);return a!==!1&&(n!==a.x||r!==a.y)}},Zc=Object.freeze({__proto__:null,Colors:Is,Decimation:Hs,Filler:yc,Legend:Oc,SubTitle:Nc,Title:jc,Tooltip:{id:`tooltip`,_element:Xc,positioners:Pc,afterInit(e,t,n){n&&(e.tooltip=new Xc({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){let t=e.tooltip;if(t&&t._willRender()){let n={tooltip:t};if(e.notifyPlugins(`beforeTooltipDraw`,{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins(`afterTooltipDraw`,n)}},afterEvent(e,t){if(e.tooltip){let n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:`average`,backgroundColor:`rgba(0,0,0,0.8)`,titleColor:`#fff`,titleFont:{weight:`bold`},titleSpacing:2,titleMarginBottom:6,titleAlign:`left`,bodyColor:`#fff`,bodySpacing:2,bodyFont:{},bodyAlign:`left`,footerColor:`#fff`,footerSpacing:2,footerMarginTop:6,footerFont:{weight:`bold`},footerAlign:`left`,padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:`#fff`,displayColors:!0,boxPadding:0,borderColor:`rgba(0,0,0,0)`,borderWidth:0,animation:{duration:400,easing:`easeOutQuart`},animations:{numbers:{type:`number`,properties:[`x`,`y`,`width`,`height`,`caretX`,`caretY`]},opacity:{easing:`linear`,duration:200}},callbacks:Yc},defaultRoutes:{bodyFont:`font`,footerFont:`font`,titleFont:`font`},descriptors:{_scriptable:e=>e!==`filter`&&e!==`itemSort`&&e!==`external`,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:`animation`}},additionalOptionScopes:[`interaction`]}}),Qc=(e,t,n,r)=>(typeof t==`string`?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function $c(e,t,n,r){let i=e.indexOf(t);return i===-1?Qc(e,t,n,r):i===e.lastIndexOf(t)?i:n}var el=(e,t)=>e===null?null:U(Math.round(e),0,t);function tl(e){let t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};function rl(e,t){let n=[],{bounds:r,step:i,min:a,max:o,precision:s,count:c,maxTicks:l,maxDigits:u,includeBounds:d}=e,f=i||1,p=l-1,{min:m,max:h}=t,g=!k(a),_=!k(o),v=!k(c),y=(h-m)/(u+1),b=at((h-m)/p/f)*f,x,S,C,w;if(b<1e-14&&!g&&!_)return[{value:m},{value:h}];w=Math.ceil(h/b)-Math.floor(m/b),w>p&&(b=at(w*b/p/f)*f),k(s)||(x=10**s,b=Math.ceil(b*x)/x),r===`ticks`?(S=Math.floor(m/b)*b,C=Math.ceil(h/b)*b):(S=m,C=h),g&&_&&i&<((o-a)/i,b/1e3)?(w=Math.round(Math.min((o-a)/b,l)),b=(o-a)/w,S=a,C=o):v?(S=g?a:S,C=_?o:C,w=c-1,b=(C-S)/w):(w=(C-S)/b,w=it(w,Math.round(w),b/1e3)?Math.round(w):Math.ceil(w));let T=Math.max(ft(b),ft(S));x=10**(k(s)?T:s),S=Math.round(S*x)/x,C=Math.round(C*x)/x;let E=0;for(g&&(d&&S!==a?(n.push({value:a}),So)break;n.push({value:e})}return _&&d&&C!==o?n.length&&it(n[n.length-1].value,o,il(o,y,e))?n[n.length-1].value=o:n.push({value:o}):(!_||C===o)&&n.push({value:C}),n}function il(e,t,{horizontal:n,minRotation:r}){let i=V(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(``+e).length;return Math.min(t/a,o)}var al=class extends to{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return k(e)||(typeof e==`number`||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds(),{min:r,max:i}=this,a=e=>r=t?r:e,o=e=>i=n?i:e;if(e){let e=B(r),t=B(i);e<0&&t<0?o(0):e>0&&t>0&&a(0)}if(r===i){let t=i===0?1:Math.abs(i*.05);o(i+t),e||a(r-t)}this.min=r,this.max=i}getTickLimit(){let{maxTicksLimit:e,stepSize:t}=this.options.ticks,n;return t?(n=Math.ceil(this.max/t)-Math.floor(this.min/t)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${t} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e||=11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return 1/0}buildTicks(){let e=this.options,t=e.ticks,n=this.getTickLimit();n=Math.max(2,n);let r=rl({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},this._range||this);return e.bounds===`ticks`&&ut(r,this,`value`),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){let e=this.ticks,t=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){let r=(n-t)/Math.max(e.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(e){return Kt(e,this.chart.options.locale,this.options.ticks.format)}},ol=class extends al{static id=`linear`;static defaults={ticks:{callback:Yt.formatters.numeric}};determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=M(e)?e:0,this.max=M(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),t=e?this.width:this.height,n=V(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},sl=e=>Math.floor(rt(e)),cl=(e,t)=>10**(sl(e)+t);function ll(e){return e/10**sl(e)==1}function ul(e,t,n){let r=10**n,i=Math.floor(e/r);return Math.ceil(t/r)-i}function dl(e,t){let n=sl(t-e);for(;ul(e,t,n)>10;)n++;for(;ul(e,t,n)<10;)n--;return Math.min(n,sl(e))}function fl(e,{min:t,max:n}){t=N(e.min,t);let r=[],i=sl(t),a=dl(t,n),o=a<0?10**Math.abs(a):1,s=10**a,c=i>a?10**i:0,l=Math.round((t-c)*o)/o,u=Math.floor((t-c)/s/10)*s*10,d=Math.floor((l-u)/10**a),f=N(e.min,Math.round((c+u+d*10**a)*o)/o);for(;f=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,o=a>=0?1:o),f=Math.round((c+u+d*10**a)*o)/o;let p=N(e.max,f);return r.push({value:p,major:ll(p),significand:d}),r}var pl=class extends to{static id=`logarithmic`;static defaults={ticks:{callback:Yt.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){let n=al.prototype.parse.apply(this,[e,t]);if(n===0){this._zero=!0;return}return M(n)&&n>0?n:null}determineDataLimits(){let{min:e,max:t}=this.getMinMax(!0);this.min=M(e)?Math.max(0,e):null,this.max=M(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!M(this._userMin)&&(this.min=e===cl(this.min,0)?cl(this.min,-1):cl(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:e,maxDefined:t}=this.getUserBounds(),n=this.min,r=this.max,i=t=>n=e?n:t,a=e=>r=t?r:e;n===r&&(n<=0?(i(1),a(10)):(i(cl(n,-1)),a(cl(r,1)))),n<=0&&i(cl(r,-1)),r<=0&&a(cl(n,1)),this.min=n,this.max=r}buildTicks(){let e=this.options,t=fl({min:this._userMin,max:this._userMax},this);return e.bounds===`ticks`&&ut(t,this,`value`),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}getLabelForValue(e){return e===void 0?`0`:Kt(e,this.chart.options.locale,this.options.ticks.format)}configure(){let e=this.min;super.configure(),this._startValue=rt(e),this._valueRange=rt(this.max)-rt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(rt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){let t=this.getDecimalForPixel(e);return 10**(this._startValue+t*this._valueRange)}};function ml(e){let t=e.ticks;if(t.display&&e.display){let e=q(t.backdropPadding);return P(t.font&&t.font.size,K.font.size)+e.height}return 0}function hl(e,t,n){return n=A(n)?n:[n],{w:rn(e,t.string,n),h:n.length*t.lineHeight}}function gl(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function _l(e){let t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,o=e.options.pointLabels,s=o.centerPointLabels?L/a:0;for(let c=0;ct.r&&(s=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+s)),i.startt.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function yl(e,t,n){let r=e.drawingArea,{extra:i,additionalAngle:a,padding:o,size:s}=n,c=e.getPointPosition(t,r+i+o,a),l=Math.round(dt(H(c.angle+z))),u=wl(c.y,s.h,l),d=Sl(l),f=Cl(c.x,s.w,d);return{visible:!0,x:c.x,y:u,textAlign:d,left:f,top:u,right:f+s.w,bottom:u+s.h}}function bl(e,t){if(!t)return!0;let{left:n,top:r,right:i,bottom:a}=e;return!(ln({x:n,y:r},t)||ln({x:n,y:a},t)||ln({x:i,y:r},t)||ln({x:i,y:a},t))}function xl(e,t,n){let r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:o,display:s}=a.pointLabels,c={extra:ml(a)/2,additionalAngle:o?L/i:0},l;for(let a=0;a270||n<90)&&(e-=t),e}function Tl(e,t,n){let{left:r,top:i,right:a,bottom:o}=n,{backdropColor:s}=t;if(!k(s)){let n=Tn(t.borderRadius),c=q(t.backdropPadding);e.fillStyle=s;let l=r-c.left,u=i-c.top,d=a-r+c.width,f=o-i+c.height;Object.values(n).some(e=>e!==0)?(e.beginPath(),vn(e,{x:l,y:u,w:d,h:f,radius:n}),e.fill()):e.fillRect(l,u,d,f)}}function El(e,t){let{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){let t=e._pointLabelItems[i];if(!t.visible)continue;let a=r.setContext(e.getPointLabelContext(i));Tl(n,a,t);let o=J(a.font),{x:s,y:c,textAlign:l}=t;_n(n,e._pointLabels[i],s,c+o.lineHeight/2,o,{color:a.color,textAlign:l,textBaseline:`middle`})}}function Dl(e,t,n,r){let{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,R);else{let n=e.getPointPosition(0,t);i.moveTo(n.x,n.y);for(let a=1;a{let n=F(this.options.pointLabels.callback,[e,t],this);return n||n===0?n:``}).filter((e,t)=>this.chart.getDataVisibility(t))}fit(){let e=this.options;e.display&&e.pointLabels.display?_l(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}getIndexAngle(e){let t=R/(this._pointLabels.length||1),n=this.options.startAngle||0;return H(e*t+V(n))}getDistanceFromCenterForValue(e){if(k(e))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(k(e))return NaN;let t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){let t=this._pointLabels||[];if(e>=0&&e{if(t!==0||t===0&&this.min<0){s=this.getDistanceFromCenterForValue(e.value);let n=this.getContext(t),o=r.setContext(n),c=i.setContext(n);Ol(this,o,s,a,c)}}),n.display){for(e.save(),o=a-1;o>=0;o--){let r=n.setContext(this.getPointLabelContext(o)),{color:i,lineWidth:a}=r;!a||!i||(e.lineWidth=a,e.strokeStyle=i,e.setLineDash(r.borderDash),e.lineDashOffset=r.borderDashOffset,s=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(o,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){let e=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;let r=this.getIndexAngle(0),i,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign=`center`,e.textBaseline=`middle`,this.ticks.forEach((r,o)=>{if(o===0&&this.min>=0&&!t.reverse)return;let s=n.setContext(this.getContext(o)),c=J(s.font);if(i=this.getDistanceFromCenterForValue(this.ticks[o].value),s.showLabelBackdrop){e.font=c.string,a=e.measureText(r.label).width,e.fillStyle=s.backdropColor;let t=q(s.backdropPadding);e.fillRect(-a/2-t.left,-i-c.size/2-t.top,a+t.width,c.size+t.height)}_n(e,r.label,0,-i,c,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})}),e.restore()}drawTitle(){}},jl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$=Object.keys(jl);function Ml(e,t){return e-t}function Nl(e,t){if(k(t))return null;let n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts,o=t;return typeof r==`function`&&(o=r(o)),M(o)||(o=typeof r==`string`?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i===`week`&&(ct(a)||a===!0)?n.startOf(o,`isoWeek`,a):n.startOf(o,i)),+o)}function Pl(e,t,n,r){let i=$.length;for(let a=$.indexOf(e);a=$.indexOf(n);a--){let n=$[a];if(jl[n].common&&e._adapter.diff(i,r,n)>=t-1)return n}return $[n?$.indexOf(n):0]}function Il(e){for(let t=$.indexOf(e)+1,n=$.length;t=t?n[r]:n[i];e[a]=!0}}function Rl(e,t,n,r){let i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value,s,c;for(s=a;s<=o;s=+i.add(s,1,r))c=n[s],c>=0&&(t[c].major=!0);return t}function zl(e,t,n){let r=[],i={},a=t.length,o,s;for(o=0;o+e.value))}initOffsets(e=[]){let t=0,n=0,r,i;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),t=e.length===1?1-r:(this.getDecimalForValue(e[1])-r)/2,i=this.getDecimalForValue(e[e.length-1]),n=e.length===1?i:(i-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;t=U(t,0,a),n=U(n,0,a),this._offsets={start:t,end:n,factor:1/(t+1+n)}}_generate(){let e=this._adapter,t=this.min,n=this.max,r=this.options,i=r.time,a=i.unit||Pl(i.minUnit,t,n,this._getLabelCapacity(t)),o=P(r.ticks.stepSize,1),s=a===`week`?i.isoWeekday:!1,c=ct(s)||s===!0,l={},u=t,d,f;if(c&&(u=+e.startOf(u,`isoWeek`,s)),u=+e.startOf(u,c?`day`:a),e.diff(n,t,a)>1e5*o)throw Error(t+` and `+n+` are too far apart with stepSize of `+o+` `+a);let p=r.ticks.source===`data`&&this.getDataTimestamps();for(d=u,f=0;d+e)}getLabelForValue(e){let t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}format(e,t){let n=this.options.time.displayFormats,r=this._unit,i=t||n[r];return this._adapter.format(e,i)}_tickFormatFunction(e,t,n,r){let i=this.options,a=i.ticks.callback;if(a)return F(a,[e,t,n],this);let o=i.time.displayFormats,s=this._unit,c=this._majorUnit,l=s&&o[s],u=c&&o[c],d=n[t],f=c&&u&&d&&d.major;return this._adapter.format(e,r||(f?u:l))}generateTickLabels(e){let t,n,r;for(t=0,n=e.length;t0?o:1}getDataTimestamps(){let e=this._cache.data||[],t,n;if(e.length)return e;let r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(t=0,n=r.length;t=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=yt(e,`pos`,t)),{pos:a,time:s}=e[r],{pos:o,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=yt(e,`time`,t)),{time:a,pos:s}=e[r],{time:o,pos:c}=e[i]);let l=o-a;return l?s+(c-s)*(t-a)/l:s}var Hl=class extends Bl{static id=`timeseries`;static defaults=Bl.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Vl(t,this.min),this._tableRange=Vl(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:t,max:n}=this,r=[],i=[],a,o,s,c,l;for(a=0,o=e.length;a=t&&c<=n&&r.push(c);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(a=0,o=r.length;ae-t)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,e=this._cache.all=e,e}getDecimalForValue(e){return(Vl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return Vl(this._table,n*this._tableRange+this._minPos,!0)}},Ul=[Ri,ws,Zc,Object.freeze({__proto__:null,CategoryScale:nl,LinearScale:ol,LogarithmicScale:pl,RadialLinearScale:Al,TimeScale:Bl,TimeSeriesScale:Hl})],Wl={key:0,class:`aluminum-section`},Gl={class:`card aluminum-price-card`},Kl={class:`card-header`},ql={class:`aluminum-source`},Jl={class:`aluminum-content`},Yl={class:`aluminum-price-row`},Xl={class:`aluminum-current`},Zl={class:`aluminum-price-value`},Ql={class:`change-arrow`},$l={class:`aluminum-detail-row`},eu={class:`aluminum-detail-item`},tu={class:`detail-value`},nu={class:`aluminum-detail-item`},ru={class:`detail-value`},iu={class:`aluminum-detail-item`},au={class:`detail-value`},ou={class:`aluminum-detail-item`},su={class:`detail-value`},cu={class:`aluminum-detail-item`},lu={class:`detail-value`},uu={key:0,class:`aluminum-chart-wrapper`},du={class:`aluminum-chart-container`},fu={class:`features-grid`},pu=d(o({__name:`HomeView`,setup(o){let d=p(),g=r(null),_=null,v=u({price:null,unit:``,date:``,change:0,change_percent:0,open:0,high:0,low:0,prev_close:0,week_ago_price:0,history:[]}),y=e=>e==null?`--`:Math.round(e).toLocaleString(`zh-CN`),b=async()=>{try{let e=await f(`/api/aluminum-price/current`);v.price=e.price,v.unit=e.unit,v.date=e.date,v.change=e.change,v.change_percent=e.change_percent,v.open=e.open,v.high=e.high,v.low=e.low,v.prev_close=e.prev_close,v.week_ago_price=e.week_ago_price}catch(e){console.error(`加载铝价失败:`,e)}try{v.history=await f(`/api/aluminum-price/history?days=30`),await e(),x()}catch(e){console.error(`加载铝价历史失败:`,e)}},x=()=>{if(!g.value||v.history.length===0)return;_&&_.destroy();let e=v.change>=0,t=e?`#dc2626`:`#16a34a`,n=e?`rgba(220, 38, 38, 0.08)`:`rgba(22, 163, 74, 0.08)`;_=new Uo(g.value,{type:`line`,data:{labels:v.history.map(e=>e.date.slice(5)),datasets:[{label:`收盘价 (元/吨)`,data:v.history.map(e=>e.close),borderColor:t,backgroundColor:n,fill:!0,tension:.3,pointRadius:0,borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:e=>`${Math.round(e.parsed.y??0).toLocaleString(`zh-CN`)} 元/吨`}}},scales:{x:{grid:{display:!1},ticks:{maxTicksLimit:10,font:{size:10},color:`var(--text-tertiary)`}},y:{grid:{color:`var(--border-light)`},ticks:{font:{size:10},color:`var(--text-tertiary)`,callback:e=>e.toLocaleString(`zh-CN`)}}}}})};return h(()=>{Uo.register(...Ul),b()}),(e,r)=>(t(),m(`div`,null,[r[13]||=l(`div`,{class:`hero-section`},[l(`h1`,{class:`hero-title`},`Gemold 模具制造管理系统`),l(`p`,{class:`hero-subtitle`},`智能模具设计与制造一体化平台,从零件分析到模具生成,全流程数字化解决方案`)],-1),v.price?(t(),m(`div`,Wl,[l(`div`,Gl,[l(`div`,Kl,[r[2]||=l(`div`,{class:`card-title`},[l(`span`,{class:`aluminum-icon`},`🪙`),c(` 铝金属价格 (SHFE) `)],-1),l(`span`,ql,`数据来源: 上海期货交易所 | 更新于 `+n(v.date),1)]),l(`div`,Jl,[l(`div`,Yl,[l(`div`,Xl,[l(`span`,Zl,n(y(v.price)),1),r[3]||=l(`span`,{class:`aluminum-price-unit`},`元/吨`,-1)]),l(`div`,{class:a([`aluminum-change`,v.change>=0?`price-up`:`price-down`])},[l(`span`,Ql,n(v.change>=0?`▲`:`▼`),1),l(`span`,null,n(y(Math.abs(v.change))),1),l(`span`,null,`(`+n(v.change_percent>=0?`+`:``)+n(v.change_percent)+`%)`,1)],2)]),l(`div`,$l,[l(`div`,eu,[r[4]||=l(`span`,{class:`detail-label`},`开盘价`,-1),l(`span`,tu,n(y(v.open)),1)]),l(`div`,nu,[r[5]||=l(`span`,{class:`detail-label`},`最高价`,-1),l(`span`,ru,n(y(v.high)),1)]),l(`div`,iu,[r[6]||=l(`span`,{class:`detail-label`},`最低价`,-1),l(`span`,au,n(y(v.low)),1)]),l(`div`,ou,[r[7]||=l(`span`,{class:`detail-label`},`昨收价`,-1),l(`span`,su,n(y(v.prev_close)),1)]),l(`div`,cu,[r[8]||=l(`span`,{class:`detail-label`},`7日前`,-1),l(`span`,lu,n(y(v.week_ago_price)),1)])]),v.history.length>0?(t(),m(`div`,uu,[r[9]||=l(`div`,{class:`aluminum-chart-title`},`近30日价格走势`,-1),l(`div`,du,[l(`canvas`,{ref_key:`chartCanvas`,ref:g},null,512)])])):s(``,!0)])])])):s(``,!0),l(`div`,fu,[l(`div`,{class:`feature-card`,onClick:r[0]||=e=>i(d).push(`/moldinsight`),style:{cursor:`pointer`}},[...r[10]||=[l(`div`,{class:`feature-icon`},`◈`,-1),l(`h3`,{class:`feature-title`},`MoldInsight`,-1),l(`p`,{class:`feature-desc`},`智能模具分析引擎,支持 STP/STEP 文件解析、分模设计、CAM 刀路规划`,-1)]]),l(`div`,{class:`feature-card`,onClick:r[1]||=e=>i(d).push(`/inventory`),style:{cursor:`pointer`}},[...r[11]||=[l(`div`,{class:`feature-icon`},`⊞`,-1),l(`h3`,{class:`feature-title`},`进销存管理`,-1),l(`p`,{class:`feature-desc`},`产品管理、采购销售、库存管理、财务管理,一站式 ERP 解决方案`,-1)]]),r[12]||=l(`div`,{class:`feature-card`},[l(`div`,{class:`feature-icon`},`⚙`),l(`h3`,{class:`feature-title`},`AI 驱动`),l(`p`,{class:`feature-desc`},`AI 分型面检测、模具方案评分、智能设计建议,提升设计效率`)],-1)])]))}}),[[`__scopeId`,`data-v-dc82ceb2`]]);export{pu as default}; \ No newline at end of file diff --git a/static/assets/InventoryView-BfMUL2um.css b/static/assets/InventoryView-BfMUL2um.css new file mode 100644 index 0000000..f4b77c9 --- /dev/null +++ b/static/assets/InventoryView-BfMUL2um.css @@ -0,0 +1 @@ +.sidebar-nav[data-v-8d87a791]{background:var(--bg-primary);border:1px solid var(--border-light);border-radius:var(--radius-lg);padding:var(--space-2)}.sidebar-group[data-v-8d87a791]{margin-bottom:var(--space-2)}.sidebar-group[data-v-8d87a791]:last-child{margin-bottom:0}.sidebar-group-title[data-v-8d87a791]{padding:var(--space-2) var(--space-3);font-size:var(--text-xs);font-weight:var(--font-semibold);color:var(--text-tertiary);text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:var(--radius-sm);justify-content:space-between;align-items:center;transition:background .15s;display:flex}.sidebar-group-title[data-v-8d87a791]:hover{background:var(--bg-tertiary)}.group-arrow[data-v-8d87a791]{font-size:10px;transition:transform .2s}.sidebar-item[data-v-8d87a791]{height:36px;padding:0 var(--space-3) 0 var(--space-6);margin:1px var(--space-1);font-size:var(--text-sm);color:var(--text-secondary);border-radius:var(--radius-md);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;transition:all .15s;display:flex}.sidebar-item[data-v-8d87a791]:hover{background:var(--bg-tertiary);color:var(--text-primary)}.sidebar-item.active[data-v-8d87a791]{background:var(--primary-50);color:var(--primary-600);font-weight:var(--font-medium)}.inventory-tab[data-v-b02ca093]{padding:0}.table-header[data-v-b02ca093]{margin-bottom:16px}.suppliers-tab[data-v-46312435]{padding:0}.table-header[data-v-46312435]{margin-bottom:16px}.customers-tab[data-v-910d60b4]{padding:0}.table-header[data-v-910d60b4]{margin-bottom:16px}.movements-tab[data-v-79f8d5e3],.page-container[data-v-75abaab9]{padding:0}.page-header[data-v-75abaab9]{margin-bottom:var(--space-6)}.page-header h1[data-v-75abaab9]{font-size:var(--text-2xl);font-weight:var(--font-bold);color:var(--text-primary);margin:0}.page-header p[data-v-75abaab9]{color:var(--text-tertiary);margin:var(--space-1) 0 0;font-size:var(--text-sm)}.inventory-layout[data-v-75abaab9]{gap:var(--space-6);align-items:flex-start;display:flex}.inventory-sidebar-wrapper[data-v-75abaab9]{flex-shrink:0;width:200px;position:sticky;top:80px}.inventory-content[data-v-75abaab9]{flex:1;min-width:0}.inventory-content-header[data-v-75abaab9]{margin-bottom:var(--space-4)}.inventory-breadcrumb[data-v-75abaab9]{font-size:var(--text-sm);color:var(--text-tertiary)}.inventory-breadcrumb .sep[data-v-75abaab9]{margin:0 var(--space-2)}.inventory-breadcrumb .current[data-v-75abaab9]{color:var(--text-primary);font-weight:var(--font-medium)} diff --git a/static/assets/InventoryView-CtU3XJ5c.js b/static/assets/InventoryView-CtU3XJ5c.js deleted file mode 100644 index 62bfd86..0000000 --- a/static/assets/InventoryView-CtU3XJ5c.js +++ /dev/null @@ -1 +0,0 @@ -import{D as e,E as t,I as n,M as r,N as i,O as a,S as o,T as s,_ as c,b as l,c as u,g as d,h as f,i as p,j as m,k as h,m as g,n as _,p as v,r as y,s as b,t as x,u as S,v as C,w,x as T}from"./index-DhEa-EvN.js";import{a as E,n as D,r as O,t as k}from"./utils-COFIQvWo.js";var A=m({activeTab:`dashboard`,backendDbReady:!0,backendDbMessage:``,productCategory:`finished`,dashboard:null,financeSummary:null,financePeriod:{year:new Date().getFullYear(),quarter:``},financeTransactions:[],receivables:[],payables:[],customerFinanceStatement:[],supplierFinanceStatement:[],customerProductStatement:[],supplierProductStatement:[],products:[],materials:[],finishedProducts:[],purchaseOrders:[],purchaseWarehouseId:null,purchaseReceiveItems:[],productionOrders:[],productionPlan:null,productionWarehouseId:null,suppliers:[],customers:[],warehouses:[],inventory:[],movements:[],loading:!1,showModal:!1,modalType:``,editingItem:null,productBomItems:[],materialConsumptionItems:[],showMaterialConsumptionModal:!1,consumedMaterials:[],restockItems:[],showRestockModal:!1,form:{}}),j=null,M=null,N=r(null),P=r(null),F=r(null),I=r(null);function L(){let e=e=>{if(!e)return null;let t=String(e).trim().replace(`T`,` `).slice(0,16).match(/^(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=Number(t[4]),o=Number(t[5]);return Number.isFinite(n+r+i+a+o)?new Date(n,r-1,i,a,o,0):null},t=e=>{if(!e)return``;let t=String(e).trim();if(/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}/.test(t))return t.slice(0,16);if(t.includes(`T`))return t.replace(`T`,` `).slice(0,16);let n=new Date(t);if(!Number.isFinite(n.getTime()))return``;let r=e=>String(e).padStart(2,`0`);return`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}`},n=e=>{if(!e)return null;let t=String(e).trim();return t.includes(`T`)?t.split(`T`)[0]:t.includes(` `)?t.split(` `)[0]:t.length===10?t:e instanceof Date?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:t},r=e=>{if(!e)return``;let t=String(e).trim();if(t.length===10&&!t.includes(`T`)&&!t.includes(` `))return t;let n=t.replace(` `,`T`);return n.length>=16?n.slice(0,16):n},i=e=>{if(!e)return``;let t=String(e).trim();return t.length===10&&!t.includes(`T`)&&!t.includes(` `)?t:t.replace(`T`,` `).slice(0,16)},a=()=>{j&&=(j.destroy(),null),M&&=(M.destroy(),null)},o=()=>{if(a(),typeof AirDatepicker==`function`){if(A.modalType===`salesOrder`&&N.value){j=new AirDatepicker(N.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{A.form.delivery_date=e||``,A.form.delivery_date_native=r(e||``)}});let t=e(A.form.delivery_date);t&&j.selectDate(t,{silent:!0})}if(A.modalType===`purchaseOrder`&&P.value){M=new AirDatepicker(P.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{A.form.expected_date=e||``,A.form.expected_date_native=r(e||``)}});let t=e(A.form.expected_date);t&&M.selectDate(t,{silent:!0})}}},s=e=>{if(e===`delivery`&&j){j.show();return}if(e===`expected`&&M){M.show();return}let t=e===`delivery`?F.value:I.value;if(t){if(typeof t.showPicker==`function`){t.showPicker();return}t.focus(),t.click()}},c=e=>({in:`其他入库`,out:`其他出库`,adjust:`库存调整`,purchase_in:`采购入库`,return_from_production:`生产退料入库`,outsource_return:`外协回库`,finish_in:`完工入库`,issue_to_production:`生产领料出库`,outsource_send:`外协发料出库`,shipment_out:`销售出库`,scrap_out:`报废出库`})[e]||e,l=e=>[`purchase_in`,`return_from_production`,`outsource_return`,`finish_in`,`in`].includes(e)?`badge-success`:[`issue_to_production`,`outsource_send`,`shipment_out`,`scrap_out`,`out`].includes(e)?`badge-error`:`badge-warning`,u=e=>({draft:`已下单`,pending:`已下单`,partial_received:`部分收货`,received:`已收货`,paid:`已付款`,cancelled:`已作废`})[e]||e,d=e=>[`received`,`paid`,`cancelled`].includes(e),f=e=>({manufacturing:`制造中`,delivered:`已交付`,paid:`已收款`,cancelled:`已作废`})[e]||e,h=e=>({manufacturing:`制造中`,delivered:`已交付`,cancelled:`已作废`})[e]||e,_=e=>({unpaid:`未收款`,paid:`已收款`})[e]||e,v=e=>({pending:`已下单`,partial_received:`部分收货`,received:`已收货`,cancelled:`已作废`})[e]||e,x=async()=>{try{let e=await fetch(`/health`,{method:`GET`});if(!e.ok){A.backendDbReady=!1,A.backendDbMessage=`后端服务异常,暂无法加载业务数据`;return}let t=await e.json().catch(()=>null);if(t&&t.database_connected===!1){A.backendDbReady=!1,A.backendDbMessage=`数据库未连接,当前仅可浏览界面,业务数据暂不可用`;return}A.backendDbReady=!0,A.backendDbMessage=``}catch{A.backendDbReady=!1,A.backendDbMessage=`无法连接后端服务`}},S=async()=>{A.loading=!0;try{A.dashboard=await b(`/api/dashboard`)}catch(e){p(e,`加载仪表盘`)}finally{A.loading=!1}},C=async()=>{A.loading=!0;try{A.finishedProducts=await b(`/api/products?item_type=finished&limit=100`)}catch(e){p(e,`加载成品`)}finally{A.loading=!1}},w=async()=>{await C()},T=async()=>{A.loading=!0;try{A.materials=await b(`/api/products?item_type=material&limit=100`)}catch(e){p(e,`加载物料`)}finally{A.loading=!1}},L=async()=>{A.loading=!0;try{A.warehouses=await b(`/api/warehouses`)}catch(e){p(e,`加载仓库`)}finally{A.loading=!1}},R=async()=>{if(A.materials.length||await T(),A.warehouses.length||await L(),!A.warehouses.length)try{await b(`/api/warehouses`,{method:`POST`,body:JSON.stringify({name:`默认仓库`})}),await L(),y(`已自动创建默认仓库`,`success`)}catch(e){p(e,`自动创建默认仓库`)}},z=async()=>{A.loading=!0;try{A.suppliers=await b(`/api/suppliers`)}catch(e){p(e,`加载供应商`)}finally{A.loading=!1}},B=async()=>{A.loading=!0;try{let[e,t]=await Promise.all([b(`/api/sales-orders?limit=100`),b(`/api/warehouses`)]);A.productionOrders=e?.items||[],A.warehouses=t||[],A.productionWarehouseId||=A.warehouses.find(e=>e.is_default)?.id||A.warehouses[0]?.id||null}catch(e){p(e,`加载按单生产数据`)}finally{A.loading=!1}},V=async()=>{A.loading=!0;try{let[e,t]=await Promise.all([b(`/api/purchase-orders?limit=100`),b(`/api/warehouses`)]);A.purchaseOrders=e?.items||[],A.warehouses=t||[],A.purchaseWarehouseId||=A.warehouses.find(e=>e.is_default)?.id||A.warehouses[0]?.id||null}catch(e){p(e,`加载采购订单`)}finally{A.loading=!1}},H=async()=>{A.loading=!0;try{A.customers=await b(`/api/customers`)}catch(e){p(e,`加载客户`)}finally{A.loading=!1}},U=async()=>{A.loading=!0;try{A.inventory=(await b(`/api/inventory`))?.items||[]}catch(e){p(e,`加载库存`)}finally{A.loading=!1}},W=async()=>{A.loading=!0;try{A.movements=(await b(`/api/stock-movements`))?.items||[]}catch(e){p(e,`加载变动记录`)}finally{A.loading=!1}},G=async()=>{A.loading=!0;try{let e=Number(A.financePeriod.year)||new Date().getFullYear(),t=A.financePeriod.quarter?Number(A.financePeriod.quarter):null,n=t?`year=${e}&quarter=${t}`:`year=${e}`,[r,i,a,o,s,c,l,u]=await Promise.all([b(`/api/finance/summary?${n}`),b(`/api/finance/transactions?status=confirmed&limit=20&${n}`),b(`/api/finance/receivables?limit=20&${n}`),b(`/api/finance/payables?limit=20&${n}`),b(`/api/finance/partner-statement/customer?${n}`),b(`/api/finance/partner-statement/supplier?${n}`),b(`/api/finance/partner-product-statement/customer?${n}`),b(`/api/finance/partner-product-statement/supplier?${n}`)]);A.financeSummary=r,A.financeTransactions=i,A.receivables=a,A.payables=o,A.customerFinanceStatement=s.items||[],A.supplierFinanceStatement=c.items||[],A.customerProductStatement=l.items||[],A.supplierProductStatement=u.items||[]}catch(e){p(e,`加载财务数据`)}finally{A.loading=!1}},K=()=>{A.activeTab===`finance`&&G()},q=e=>{A.activeTab=e},J=()=>{A.showModal=!1,A.modalType=``,A.editingItem=null,A.productBomItems=[],A.purchaseReceiveItems=[],A.form={},a()},Y=g(()=>(A.editingItem?`编辑`:`新增`)+({product:A.form.item_type===`finished`?`成品`:`物料`,inventoryItem:`物料库存`,salesOrder:`销售订单`,purchaseOrder:`采购订单`,purchaseReceive:`采购到货入库`,supplier:`供应商`,customer:`客户`}[A.modalType]||``)),X=[{key:`overview`,title:`概览`,items:[{key:`dashboard`,label:`仪表盘`}]},{key:`sales`,title:`销售`,items:[{key:`sales_orders`,label:`销售订单管理`}]},{key:`purchase`,title:`采购`,items:[{key:`purchases`,label:`采购订单管理`}]},{key:`product`,title:`产品`,items:[{key:`products`,label:`成品管理`},{key:`materials`,label:`物料管理`}]},{key:`partner`,title:`往来单位`,items:[{key:`customers`,label:`客户管理`},{key:`suppliers`,label:`供应商管理`}]},{key:`warehouse`,title:`仓库`,items:[{key:`inventory`,label:`库存管理`},{key:`movements`,label:`库存变动记录`}]},{key:`finance`,title:`财务`,items:[{key:`finance`,label:`财务概览`}]}],Z=m(Object.fromEntries(X.map(e=>[e.key,!0])));return{state:A,deliveryDateInput:N,expectedDateInput:P,deliveryDateNativeInput:F,expectedDateNativeInput:I,menuGroups:X,openGroups:Z,activeMenu:g(()=>{for(let e of X){let t=e.items.find(e=>e.key===A.activeTab);if(t)return{group:e,item:t}}return null}),modalTitle:Y,parseDateTimeLocal:e,toPickerValue:t,toApiDateTime:n,toNativeValue:r,fromNativeValue:i,destroyPickers:a,initPickers:o,openDateTimePicker:s,getMovementTypeLabel:c,getMovementBadgeClass:l,getPurchaseOrderStatusLabel:u,isPurchaseOrderLocked:d,getSalesOrderStatusLabel:f,getDeliveryStatusLabel:h,getPaymentStatusLabel:_,getReceiptStatusLabel:v,checkBackendHealth:x,loadDashboard:S,loadFinishedProducts:C,loadProducts:w,loadMaterials:T,loadWarehouses:L,ensureStockBaseData:R,loadSuppliers:z,loadProductionOrders:B,loadPurchaseOrders:V,loadCustomers:H,loadInventory:U,loadMovements:W,loadFinance:G,refreshFinanceByPeriod:K,switchTab:q,closeModal:J,toggleGroup:e=>{Z[e]=!Z[e]},handleMenuClick:e=>{q(e)},switchProductCategory:e=>{A.productCategory=e},formatCurrency:k,formatNumber:E,formatDateTime:O,formatDate:D}}var R=[`onClick`],z={class:`group-arrow`},B=_(o({__name:`InventorySidebar`,setup(r){let{state:o,menuGroups:s,openGroups:u,toggleGroup:p,handleMenuClick:m}=L();return(r,o)=>{let g=a(`t-menu-item`),_=a(`t-menu`);return t(),d(_,{"default-expanded":Object.keys(i(u)),"model-value":``,class:`inventory-sidebar`},{default:h(()=>[(t(!0),C(v,null,e(i(s),r=>(t(),C(`div`,{key:r.key,class:`sidebar-group`},[f(`div`,{class:`sidebar-group-title`,onClick:e=>i(p)(r.key)},[f(`span`,null,n(r.title),1),f(`span`,z,n(i(u)[r.key]?`▾`:`▸`),1)],8,R),i(u)[r.key]?(t(!0),C(v,{key:0},e(r.items,e=>(t(),d(g,{key:e.key,value:e.key,onClick:t=>i(m)(e.key)},{default:h(()=>[l(n(e.label),1)]),_:2},1032,[`value`,`onClick`]))),128)):c(``,!0)]))),128))]),_:1},8,[`default-expanded`])}}}),[[`__scopeId`,`data-v-b5fce634`]]),V={style:{display:`flex`,"align-items":`center`,gap:`12px`}},H={style:{"font-size":`32px`}},U={style:{"font-size":`24px`,"font-weight":`700`}},W={style:{color:`var(--text-tertiary)`,"font-size":`13px`}},G=o({__name:`DashboardTab`,setup(r){let{state:o,formatCurrency:s}=L();return(r,c)=>{let l=a(`t-card`),u=a(`t-col`),p=a(`t-row`);return t(),d(p,{gutter:16},{default:h(()=>[(t(!0),C(v,null,e([{icon:`📦`,value:i(o).dashboard?.product_count||0,label:`成品数量`},{icon:`📊`,value:i(o).dashboard?.total_stock||0,label:`物料库存总量`},{icon:`💰`,value:i(s)(i(o).dashboard?.total_value||0),label:`库存价值`},{icon:`🏭`,value:i(o).dashboard?.supplier_count||0,label:`供应商`},{icon:`👥`,value:i(o).dashboard?.customer_count||0,label:`客户`},{icon:`🏪`,value:i(o).dashboard?.warehouse_count||0,label:`仓库`}],e=>(t(),d(u,{span:8,key:e.label,style:{"margin-bottom":`16px`}},{default:h(()=>[T(l,{shadow:`hover`},{default:h(()=>[f(`div`,V,[f(`span`,H,n(e.icon),1),f(`div`,null,[f(`div`,U,n(e.value),1),f(`div`,W,n(e.label),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})}}}),K={style:{"margin-bottom":`12px`}},q={style:{padding:`0 12px 12px 12px`}},J=o({__name:`ProductsTab`,setup(o){let{state:s,formatCurrency:u,loadFinishedProducts:m,loadMaterials:g}=L(),_=r(!1),x=r(null),S=r({}),E=r([]);function D(){x.value=null,S.value={item_type:`finished`,unit:`件`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},E.value=[],_.value=!0}async function O(e){x.value=e,S.value={...e},await g();try{E.value=((await b(`/api/products/${e.id}/materials`)).items||[]).map(e=>({material_id:e.material_id,quantity:e.quantity}))}catch(e){p(e,`加载BOM`)}_.value=!0}function k(){E.value.push({material_id:s.materials[0]?.id||null,quantity:1})}function A(e){E.value.splice(e,1)}async function j(){if(!S.value.sku){y(`请输入SKU`,`warning`);return}if(!S.value.name){y(`请输入名称`,`warning`);return}try{x.value?(await b(`/api/products/${x.value.id}`,{method:`PUT`,body:JSON.stringify(S.value)}),S.value.item_type===`finished`&&E.value.length>0&&await b(`/api/products/${x.value.id}/materials`,{method:`PUT`,body:JSON.stringify({items:E.value})}),y(`成品更新成功`,`success`)):(await b(`/api/products`,{method:`POST`,body:JSON.stringify(S.value)}),y(`成品创建成功`,`success`)),_.value=!1,x.value=null,S.value={},E.value=[],m(),g()}catch(e){p(e,`保存成品`)}}async function M(e){if(confirm(`确定要删除这个成品吗?`))try{await b(`/api/products/${e}`,{method:`DELETE`}),y(`成品已删除`,`success`),m(),g()}catch(e){p(e,`删除成品`)}}function N(){_.value=!1,x.value=null,S.value={},E.value=[]}return w(()=>{m()}),(r,o)=>{let p=a(`t-button`),m=a(`t-table-column`),g=a(`t-table`),y=a(`t-empty`),b=a(`t-input`),w=a(`t-form-item`),P=a(`t-input-number`),F=a(`t-divider`),I=a(`t-option`),L=a(`t-select`),R=a(`t-form`),z=a(`t-dialog`);return t(),C(`div`,null,[f(`div`,K,[T(p,{type:`primary`,onClick:D},{default:h(()=>[...o[8]||=[l(`新增成品`,-1)]]),_:1})]),T(g,{data:i(s).finishedProducts,loading:i(s).loading,stripe:``},{default:h(()=>[T(m,{prop:`sku`,label:`SKU`}),T(m,{prop:`name`,label:`名称`}),T(m,{prop:`category`,label:`分类`},{default:h(({row:e})=>[l(n(e.category||`-`),1)]),_:1}),T(m,{prop:`unit`,label:`单位`}),T(m,{label:`成本价`},{default:h(({row:e})=>[l(n(i(u)(e.cost_price)),1)]),_:1}),T(m,{label:`销售价`},{default:h(({row:e})=>[l(n(i(u)(e.sale_price)),1)]),_:1}),T(m,{label:`基础物料成本`},{default:h(({row:e})=>[l(n(i(u)(e.material_cost||0)),1)]),_:1}),T(m,{label:`操作`,width:`180`},{default:h(({row:e})=>[T(p,{type:`primary`,size:`small`,onClick:t=>O(e)},{default:h(()=>[...o[9]||=[l(`编辑`,-1)]]),_:1},8,[`onClick`]),T(p,{type:`danger`,size:`small`,onClick:t=>M(e.id)},{default:h(()=>[...o[10]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).finishedProducts.length===0?(t(),d(y,{key:0,description:`暂无成品数据`})):c(``,!0),T(z,{visible:_.value,"onUpdate:visible":o[7]||=e=>_.value=e,title:(x.value?`编辑`:`新增`)+`成品`,width:`560px`,onClosed:N},{footer:h(()=>[T(p,{onClick:o[6]||=e=>_.value=!1},{default:h(()=>[...o[14]||=[l(`取消`,-1)]]),_:1}),T(p,{type:`primary`,onClick:j},{default:h(()=>[...o[15]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(R,{"label-width":`100px`},{default:h(()=>[T(w,{label:`类型`},{default:h(()=>[T(b,{"model-value":`成品(按单生产,不做库存)`,disabled:``})]),_:1}),T(w,{label:`SKU`,required:``},{default:h(()=>[T(b,{modelValue:S.value.sku,"onUpdate:modelValue":o[0]||=e=>S.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),T(w,{label:`名称`,required:``},{default:h(()=>[T(b,{modelValue:S.value.name,"onUpdate:modelValue":o[1]||=e=>S.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),T(w,{label:`分类`},{default:h(()=>[T(b,{modelValue:S.value.category,"onUpdate:modelValue":o[2]||=e=>S.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),T(w,{label:`单位`},{default:h(()=>[T(b,{modelValue:S.value.unit,"onUpdate:modelValue":o[3]||=e=>S.value.unit=e,placeholder:`件`},null,8,[`modelValue`])]),_:1}),T(w,{label:`成本价`},{default:h(()=>[T(P,{modelValue:S.value.cost_price,"onUpdate:modelValue":o[4]||=e=>S.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(w,{label:`销售价`},{default:h(()=>[T(P,{modelValue:S.value.sale_price,"onUpdate:modelValue":o[5]||=e=>S.value.sale_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(w,{label:`说明`},{default:h(()=>[T(b,{"model-value":`成品不做库存,成本由下方BOM定义物料构成后自动计算`,disabled:``})]),_:1}),x.value?(t(),C(v,{key:0},[T(F,{"content-position":`left`},{default:h(()=>[...o[11]||=[l(`BOM物料配置`,-1)]]),_:1}),f(`div`,q,[T(p,{type:`primary`,size:`small`,onClick:k,style:{"margin-bottom":`8px`}},{default:h(()=>[...o[12]||=[l(`+ 添加物料`,-1)]]),_:1}),T(g,{data:E.value,size:`small`,border:``},{default:h(()=>[T(m,{label:`物料`},{default:h(({row:n})=>[T(L,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`选择物料`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(s).materials,e=>(t(),d(I,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`数量`,width:`120`},{default:h(({row:e})=>[T(P,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`操作`,width:`80`},{default:h(({$index:e})=>[T(p,{type:`danger`,size:`small`,onClick:t=>A(e)},{default:h(()=>[...o[13]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`])])],64)):c(``,!0)]),_:1})]),_:1},8,[`visible`,`title`])])}}}),Y={style:{"margin-bottom":`12px`,display:`flex`,gap:`8px`}},X={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},Z={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ee=o({__name:`MaterialsTab`,setup(o){let{state:s,formatCurrency:u,loadMaterials:m,loadSuppliers:_,loadPurchaseOrders:x}=L(),S=r(!1),E=r(null),D=r({}),O=r(!1),k=r([]),A=r(null);function j(){E.value=null,D.value={item_type:`material`,unit:`kg`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},S.value=!0}async function M(e){E.value=e,D.value={...e},S.value=!0}async function N(){if(!D.value.sku){y(`请输入SKU`,`warning`);return}if(!D.value.name){y(`请输入名称`,`warning`);return}try{E.value?(await b(`/api/products/${E.value.id}`,{method:`PUT`,body:JSON.stringify(D.value)}),y(`物料更新成功`,`success`)):(await b(`/api/products`,{method:`POST`,body:JSON.stringify(D.value)}),y(`物料创建成功`,`success`)),S.value=!1,E.value=null,D.value={},m()}catch(e){p(e,`保存物料`)}}async function P(e){if(confirm(`确定要删除这个物料吗?`))try{await b(`/api/products/${e}`,{method:`DELETE`}),y(`物料已删除`,`success`),m()}catch(e){p(e,`删除物料`)}}async function F(){await m(),await _(),k.value=[],O.value=!0}function I(){k.value.push({material_id:s.materials[0]?.id||null,quantity:1,unit_price:0,remark:``})}function R(e){k.value.splice(e,1)}let z=g(()=>k.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function B(){if(!k.value||k.value.length===0){y(`请至少添加一个补货物料`,`warning`);return}for(let[e,t]of k.value.entries()){let n=e+1;if(!t.material_id){y(`第 ${n} 行:请选择物料`,`warning`);return}if(!Number.isFinite(t.quantity)||t.quantity<=0){y(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!Number.isFinite(t.unit_price)||t.unit_price<0){y(`第 ${n} 行:单价必须大于等于 0`,`warning`);return}}try{let e={supplier_id:A.value||s.suppliers[0]?.id||null,expected_date:new Date().toISOString().split(`T`)[0],remark:`物料补货`,items:k.value.map(e=>({product_id:e.material_id,quantity:e.quantity,unit_price:e.unit_price,remark:e.remark}))};if(!e.supplier_id){y(`请先添加供应商`,`warning`);return}await b(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),y(`采购订单创建成功`,`success`),O.value=!1,k.value=[],x()}catch(e){p(e,`保存补货订单`)}}function V(){S.value=!1,E.value=null,D.value={}}function H(){O.value=!1,k.value=[]}return w(()=>{m()}),(r,o)=>{let p=a(`t-button`),m=a(`t-table-column`),g=a(`t-table`),_=a(`t-empty`),y=a(`t-input`),b=a(`t-form-item`),x=a(`t-input-number`),w=a(`t-form`),L=a(`t-dialog`),U=a(`t-option`),W=a(`t-select`);return t(),C(`div`,null,[f(`div`,Y,[T(p,{type:`primary`,onClick:j},{default:h(()=>[...o[12]||=[l(`新增物料`,-1)]]),_:1}),T(p,{type:`success`,onClick:F},{default:h(()=>[...o[13]||=[l(`物料补货`,-1)]]),_:1})]),T(g,{data:i(s).materials,loading:i(s).loading,stripe:``},{default:h(()=>[T(m,{prop:`sku`,label:`SKU`}),T(m,{prop:`name`,label:`名称`}),T(m,{prop:`category`,label:`分类`},{default:h(({row:e})=>[l(n(e.category||`-`),1)]),_:1}),T(m,{prop:`unit`,label:`单位`}),T(m,{label:`成本价`},{default:h(({row:e})=>[l(n(i(u)(e.cost_price)),1)]),_:1}),T(m,{prop:`min_stock`,label:`最低库存`},{default:h(({row:e})=>[l(n(e.min_stock??`-`),1)]),_:1}),T(m,{label:`操作`,width:`180`},{default:h(({row:e})=>[T(p,{type:`primary`,size:`small`,onClick:t=>M(e)},{default:h(()=>[...o[14]||=[l(`编辑`,-1)]]),_:1},8,[`onClick`]),T(p,{type:`danger`,size:`small`,onClick:t=>P(e.id)},{default:h(()=>[...o[15]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).materials.length===0?(t(),d(_,{key:0,description:`暂无物料数据`})):c(``,!0),T(L,{visible:S.value,"onUpdate:visible":o[8]||=e=>S.value=e,title:(E.value?`编辑`:`新增`)+`物料`,width:`560px`,onClosed:V},{footer:h(()=>[T(p,{onClick:o[7]||=e=>S.value=!1},{default:h(()=>[...o[16]||=[l(`取消`,-1)]]),_:1}),T(p,{type:`primary`,onClick:N},{default:h(()=>[...o[17]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(w,{"label-width":`100px`},{default:h(()=>[T(b,{label:`类型`},{default:h(()=>[T(y,{"model-value":`物料(纳入库存)`,disabled:``})]),_:1}),T(b,{label:`SKU`,required:``},{default:h(()=>[T(y,{modelValue:D.value.sku,"onUpdate:modelValue":o[0]||=e=>D.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),T(b,{label:`名称`,required:``},{default:h(()=>[T(y,{modelValue:D.value.name,"onUpdate:modelValue":o[1]||=e=>D.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),T(b,{label:`分类`},{default:h(()=>[T(y,{modelValue:D.value.category,"onUpdate:modelValue":o[2]||=e=>D.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),T(b,{label:`单位`},{default:h(()=>[T(y,{modelValue:D.value.unit,"onUpdate:modelValue":o[3]||=e=>D.value.unit=e,placeholder:`kg`},null,8,[`modelValue`])]),_:1}),T(b,{label:`成本价`},{default:h(()=>[T(x,{modelValue:D.value.cost_price,"onUpdate:modelValue":o[4]||=e=>D.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(b,{label:`最低库存`},{default:h(()=>[T(x,{modelValue:D.value.min_stock,"onUpdate:modelValue":o[5]||=e=>D.value.min_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(b,{label:`最高库存`},{default:h(()=>[T(x,{modelValue:D.value.max_stock,"onUpdate:modelValue":o[6]||=e=>D.value.max_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`visible`,`title`]),T(L,{visible:O.value,"onUpdate:visible":o[11]||=e=>O.value=e,title:`物料补货`,width:`900px`,onClosed:H},{footer:h(()=>[T(p,{onClick:o[10]||=e=>O.value=!1},{default:h(()=>[...o[21]||=[l(`取消`,-1)]]),_:1}),T(p,{type:`primary`,onClick:B},{default:h(()=>[...o[22]||=[l(`创建采购订单`,-1)]]),_:1})]),default:h(()=>[T(w,{"label-width":`100px`,style:{"margin-bottom":`16px`}},{default:h(()=>[T(b,{label:`供应商`},{default:h(()=>[T(W,{modelValue:A.value,"onUpdate:modelValue":o[9]||=e=>A.value=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(s).suppliers,e=>(t(),d(U,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1}),f(`div`,X,[o[19]||=f(`span`,{style:{"font-weight":`600`}},`补货物料明细`,-1),T(p,{type:`primary`,size:`small`,onClick:I},{default:h(()=>[...o[18]||=[l(`+ 添加物料`,-1)]]),_:1})]),T(g,{data:k.value,border:``,size:`small`},{default:h(()=>[T(m,{label:`物料`,"min-width":`200`},{default:h(({row:n})=>[T(W,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(s).materials,e=>(t(),d(U,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`数量`,width:`120`},{default:h(({row:e})=>[T(x,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`单价`,width:`120`},{default:h(({row:e})=>[T(x,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`总价`,width:`120`},{default:h(({row:e})=>[l(n(i(u)((e.unit_price||0)*(e.quantity||0))),1)]),_:1}),T(m,{label:`备注`,width:`150`},{default:h(({row:e})=>[T(y,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(m,{label:`操作`,width:`80`},{default:h(({$index:e})=>[T(p,{type:`danger`,size:`small`,onClick:t=>R(e)},{default:h(()=>[...o[20]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),f(`div`,Z,` 补货总金额:`+n(i(u)(z.value)),1)]),_:1},8,[`visible`])])}}}),te={class:`inventory-tab`},Q={class:`table-header`},$=_(o({__name:`InventoryTab`,setup(n){let{state:o,loadInventory:s,ensureStockBaseData:c}=L(),u=r(!1),g=r(null),_=m({product_id:null,warehouse_id:null,quantity:0,locked_quantity:0,batch_no:``,location:``});function x(){c(),g.value=null,_.product_id=null,_.warehouse_id=null,_.quantity=0,_.locked_quantity=0,_.batch_no=``,_.location=``,u.value=!0}function S(e){c(),g.value=e,_.product_id=e.product_id??null,_.warehouse_id=e.warehouse_id??null,_.quantity=e.quantity??0,_.locked_quantity=e.locked_quantity??0,_.batch_no=e.batch_no??``,_.location=e.location??``,u.value=!0}async function E(){try{let e={product_id:_.product_id,warehouse_id:_.warehouse_id,quantity:_.quantity,locked_quantity:_.locked_quantity,batch_no:_.batch_no||null,location:_.location||null};g.value?(await b(`/api/inventory/${g.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),y(`物料库存更新成功`,`success`)):(await b(`/api/inventory`,{method:`POST`,body:JSON.stringify(e)}),y(`物料库存已创建`,`success`)),u.value=!1,s()}catch(e){p(e,`保存物料库存`)}}async function D(e){if(confirm(`确定要删除这个物料库存记录吗?`))try{await b(`/api/inventory/${e}`,{method:`DELETE`}),y(`物料库存已删除`,`success`),s()}catch(e){p(e,`删除物料库存`)}}return w(()=>{s()}),(n,r)=>{let s=a(`t-button`),c=a(`t-table-column`),p=a(`t-table`),m=a(`t-option`),y=a(`t-select`),b=a(`t-form-item`),w=a(`t-input-number`),O=a(`t-input`),k=a(`t-form`),A=a(`t-dialog`);return t(),C(`div`,te,[f(`div`,Q,[T(s,{type:`primary`,onClick:x},{default:h(()=>[...r[8]||=[l(`+ 新增物料库存`,-1)]]),_:1})]),T(p,{data:i(o).inventory,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无库存数据`},{default:h(()=>[T(c,{prop:`product_sku`,label:`SKU`}),T(c,{prop:`product_name`,label:`物料`}),T(c,{prop:`warehouse_name`,label:`仓库`}),T(c,{prop:`quantity`,label:`数量`}),T(c,{prop:`available_quantity`,label:`可用`}),T(c,{label:`操作`,width:`180`},{default:h(({row:e})=>[T(s,{size:`small`,onClick:t=>S(e)},{default:h(()=>[...r[9]||=[l(`编辑`,-1)]]),_:1},8,[`onClick`]),T(s,{size:`small`,type:`danger`,onClick:t=>D(e.id)},{default:h(()=>[...r[10]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),T(A,{modelValue:u.value,"onUpdate:modelValue":r[7]||=e=>u.value=e,title:g.value?`编辑物料库存`:`新增物料库存`,width:`520px`,"close-on-click-modal":!1},{footer:h(()=>[T(s,{onClick:r[6]||=e=>u.value=!1},{default:h(()=>[...r[11]||=[l(`取消`,-1)]]),_:1}),T(s,{type:`primary`,onClick:E},{default:h(()=>[...r[12]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(k,{model:_,"label-width":`80px`},{default:h(()=>[T(b,{label:`物料`,required:``},{default:h(()=>[T(y,{modelValue:_.product_id,"onUpdate:modelValue":r[0]||=e=>_.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(o).materials,e=>(t(),d(m,{key:e.id,label:e.name+(e.sku?` (`+e.sku+`)`:``),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),T(b,{label:`仓库`,required:``},{default:h(()=>[T(y,{modelValue:_.warehouse_id,"onUpdate:modelValue":r[1]||=e=>_.warehouse_id=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(o).warehouses,e=>(t(),d(m,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),T(b,{label:`数量`,required:``},{default:h(()=>[T(w,{modelValue:_.quantity,"onUpdate:modelValue":r[2]||=e=>_.quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(b,{label:`锁定数量`},{default:h(()=>[T(w,{modelValue:_.locked_quantity,"onUpdate:modelValue":r[3]||=e=>_.locked_quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),T(b,{label:`批次号`},{default:h(()=>[T(O,{modelValue:_.batch_no,"onUpdate:modelValue":r[4]||=e=>_.batch_no=e,placeholder:`请输入批次号`},null,8,[`modelValue`])]),_:1}),T(b,{label:`库位`},{default:h(()=>[T(O,{modelValue:_.location,"onUpdate:modelValue":r[5]||=e=>_.location=e,placeholder:`请输入库位`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-b02ca093`]]),ne={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},re={style:{display:`flex`,gap:`4px`}},ie={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},ae={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},oe=o({__name:`PurchaseOrdersTab`,setup(o){function s(e,t,n,r,i){return new Promise(a=>{let o=x.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:u,formatCurrency:m,formatDateTime:_,formatDate:S,getPurchaseOrderStatusLabel:E,getReceiptStatusLabel:D,getPaymentStatusLabel:O,isPurchaseOrderLocked:k,loadPurchaseOrders:A,loadSuppliers:j,loadMaterials:M,loadInventory:N,loadMovements:P}=L(),F=r(!1),I=r(null),R=r({}),z=r([]),B=r(null),V=r(!1),H=r(null),U=r([]),W=r(null),G=r(``);function K(){I.value=null,R.value={supplier_id:null,expected_date:``,remark:``},z.value=[],F.value=!0}function q(){z.value.push({product_id:u.materials[0]?.id||null,quantity:1,remark:``})}function J(e){z.value.splice(e,1)}let Y=g(()=>z.value.reduce((e,t)=>e+(u.materials.find(e=>e.id===t.product_id)?.cost_price||0)*(t.quantity||0),0));async function X(e){await M(),await j(),I.value=e,R.value={supplier_id:e.supplier_id||null,expected_date:e.expected_date||``,remark:e.remark||``};try{z.value=((await b(`/api/purchase-orders/${e.id}`)).items||[]).map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark||``}))}catch(e){p(e,`加载采购订单详情`)}F.value=!0}async function Z(){if(!R.value.supplier_id){y(`请选择供应商`,`warning`);return}if(!z.value||z.value.length===0){y(`请至少添加一个物料`,`warning`);return}for(let[e,t]of z.value.entries()){if(!t.product_id){y(`第 ${e+1} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){y(`第 ${e+1} 行:数量必须大于 0`,`warning`);return}}try{let e={supplier_id:R.value.supplier_id,expected_date:R.value.expected_date||null,remark:R.value.remark||``,items:z.value.map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark}))};I.value?(await b(`/api/purchase-orders/${I.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),y(`采购订单更新成功`,`success`)):(await b(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),y(`采购订单创建成功`,`success`)),F.value=!1,I.value=null,R.value={},z.value=[],A()}catch(e){p(e,`保存采购订单`)}}async function ee(e){if(await s(`删除确认`,`确定要删除这个采购订单吗?`,`warning`,`删除`,`取消`))try{await b(`/api/purchase-orders/${e}`,{method:`DELETE`}),y(`采购订单已删除`,`success`),A()}catch(e){p(e,`删除采购订单`)}}async function te(e){try{let t=await b(`/api/purchase-orders/${e.id}`);H.value=e,U.value=(t.items||[]).map(e=>({id:e.id,material_label:e.product_name||e.product_sku||``,quantity:e.quantity||0,received_quantity:e.received_quantity||0,remaining:(e.quantity||0)-(e.received_quantity||0),receive_quantity:0})),W.value=B.value||u.warehouses[0]?.id||null,G.value=``,V.value=!0}catch(e){p(e,`加载采购订单详情`)}}async function Q(){if(!W.value){y(`请选择入库仓库`,`warning`);return}let e=U.value.filter(e=>e.receive_quantity>0).map(e=>({item_id:e.id,receive_quantity:e.receive_quantity}));if(e.length===0){y(`请输入本次入库数量`,`warning`);return}try{await b(`/api/purchase-orders/${H.value.id}/receive`,{method:`POST`,body:JSON.stringify({warehouse_id:W.value,remark:G.value,items:e})}),y(`入库完成`,`success`),V.value=!1,H.value=null,U.value=[],A(),N(),P()}catch(e){p(e,`采购入库`)}}async function $(e,t){if(t!==`received`){if(!await s(`非标准流程提醒`,`该订单尚未全部收货,确定要提前付款吗?建议先完成收货后再付款。`,`warning`,`仍要付款`,`取消`))return}else if(!await s(`付款确认`,`确认已向供应商支付该订单款项?`,`success`,`确认付款`,`取消`))return;await se(e,`paid`,`已付款`)}async function oe(e){await s(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await se(e,`cancelled`,`已作废`)}async function se(e,t,n){try{await b(`/api/purchase-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),y(`订单已${n}`,`success`),A(),P(),N()}catch(e){p(e,`更新状态`)}}function ce(){F.value=!1,I.value=null,R.value={},z.value=[]}function le(){V.value=!1,H.value=null,U.value=[]}async function ue(){await M(),await j(),await A()}return w(()=>{ue()}),(r,o)=>{let s=a(`t-option`),p=a(`t-select`),g=a(`t-button`),y=a(`t-table-column`),b=a(`t-tag`),x=a(`t-table`),w=a(`t-empty`),E=a(`t-form-item`),j=a(`t-date-picker`),M=a(`t-input`),N=a(`t-form`),P=a(`t-input-number`),L=a(`t-dialog`);return t(),C(`div`,null,[f(`div`,ne,[T(p,{modelValue:B.value,"onUpdate:modelValue":o[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:h(()=>[(t(!0),C(v,null,e(i(u).warehouses,e=>(t(),d(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),T(g,{onClick:i(A)},{default:h(()=>[...o[10]||=[l(`刷新`,-1)]]),_:1},8,[`onClick`]),T(g,{type:`primary`,onClick:K},{default:h(()=>[...o[11]||=[l(`新增采购订单`,-1)]]),_:1})]),T(x,{data:i(u).purchaseOrders,loading:i(u).loading,stripe:``},{default:h(()=>[T(y,{prop:`order_no`,label:`采购单`}),T(y,{prop:`supplier_name`,label:`供应商`}),T(y,{label:`状态`},{default:h(({row:e})=>[f(`div`,re,[T(b,{type:e.receipt_status===`received`?`success`:e.receipt_status===`partial_received`?`warning`:e.receipt_status===`cancelled`?`danger`:`info`,size:`small`},{default:h(()=>[l(n(i(D)(e.receipt_status)),1)]),_:2},1032,[`type`]),T(b,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:h(()=>[l(n(i(O)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),T(y,{label:`订单创建`},{default:h(({row:e})=>[l(n(i(_)(e.created_at)),1)]),_:1}),T(y,{label:`预计到货`},{default:h(({row:e})=>[l(n(i(S)(e.expected_date)),1)]),_:1}),T(y,{label:`实际到货`},{default:h(({row:e})=>[l(n(e.received_at?i(_)(e.received_at):`-`),1)]),_:1}),T(y,{label:`实际付款`},{default:h(({row:e})=>[l(n(e.paid_at?i(_)(e.paid_at):`-`),1)]),_:1}),T(y,{label:`总金额`},{default:h(({row:e})=>[l(n(i(m)(e.total_amount)),1)]),_:1}),T(y,{label:`已付款`},{default:h(({row:e})=>[l(n(i(m)(e.paid_amount||0)),1)]),_:1}),T(y,{label:`操作`,width:`280`},{default:h(({row:e})=>[T(g,{type:`primary`,size:`small`,disabled:i(k)(e.status),onClick:t=>X(e)},{default:h(()=>[...o[12]||=[l(` 编辑 `,-1)]]),_:1},8,[`disabled`,`onClick`]),T(g,{type:`danger`,size:`small`,disabled:i(k)(e.status),onClick:t=>ee(e.id)},{default:h(()=>[...o[13]||=[l(` 删除 `,-1)]]),_:1},8,[`disabled`,`onClick`]),e.receipt_status===`pending`||e.receipt_status===`partial_received`?(t(),d(g,{key:0,type:`success`,size:`small`,onClick:t=>te(e)},{default:h(()=>[...o[14]||=[l(` 到货入库 `,-1)]]),_:1},8,[`onClick`])):c(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),d(g,{key:1,type:`warning`,size:`small`,onClick:t=>$(e.id,e.receipt_status)},{default:h(()=>[...o[15]||=[l(` 标记已付款 `,-1)]]),_:1},8,[`onClick`])):c(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),d(g,{key:2,type:`info`,size:`small`,onClick:t=>oe(e.id)},{default:h(()=>[...o[16]||=[l(` 作废 `,-1)]]),_:1},8,[`onClick`])):c(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!i(u).loading&&i(u).purchaseOrders.length===0?(t(),d(w,{key:0,description:`暂无采购订单`})):c(``,!0),T(L,{visible:F.value,"onUpdate:visible":o[5]||=e=>F.value=e,title:(I.value?`编辑`:`新增`)+`采购订单`,width:`800px`,onClosed:ce},{footer:h(()=>[T(g,{onClick:o[4]||=e=>F.value=!1},{default:h(()=>[...o[20]||=[l(`取消`,-1)]]),_:1}),T(g,{type:`primary`,onClick:Z},{default:h(()=>[...o[21]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(N,{"label-width":`100px`},{default:h(()=>[T(E,{label:`供应商`,required:``},{default:h(()=>[T(p,{modelValue:R.value.supplier_id,"onUpdate:modelValue":o[1]||=e=>R.value.supplier_id=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).suppliers,e=>(t(),d(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),T(E,{label:`预计到货`},{default:h(()=>[T(j,{modelValue:R.value.expected_date,"onUpdate:modelValue":o[2]||=e=>R.value.expected_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),T(E,{label:`备注`},{default:h(()=>[T(M,{modelValue:R.value.remark,"onUpdate:modelValue":o[3]||=e=>R.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),f(`div`,ie,[o[18]||=f(`span`,{style:{"font-weight":`600`}},`物料明细`,-1),T(g,{type:`primary`,size:`small`,onClick:q},{default:h(()=>[...o[17]||=[l(`+ 添加物料`,-1)]]),_:1})]),T(x,{data:z.value,border:``,size:`small`},{default:h(()=>[T(y,{label:`物料`,"min-width":`200`},{default:h(({row:n})=>[T(p,{modelValue:n.product_id,"onUpdate:modelValue":e=>n.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).materials,e=>(t(),d(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`数量`,width:`120`},{default:h(({row:e})=>[T(P,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`单价`,width:`120`},{default:h(({row:e})=>[T(P,{"model-value":i(u).materials.find(t=>t.id===e.product_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),T(y,{label:`总价`,width:`120`},{default:h(({row:e})=>[l(n(i(m)((i(u).materials.find(t=>t.id===e.product_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),T(y,{label:`备注`,width:`150`},{default:h(({row:e})=>[T(M,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`操作`,width:`80`},{default:h(({$index:e})=>[T(g,{type:`danger`,size:`small`,onClick:t=>J(e)},{default:h(()=>[...o[19]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),f(`div`,ae,` 订单总金额:`+n(i(m)(Y.value)),1)]),_:1},8,[`visible`,`title`]),T(L,{visible:V.value,"onUpdate:visible":o[9]||=e=>V.value=e,title:`采购到货入库`,width:`700px`,onClosed:le},{footer:h(()=>[T(g,{onClick:o[8]||=e=>V.value=!1},{default:h(()=>[...o[22]||=[l(`取消`,-1)]]),_:1}),T(g,{type:`primary`,onClick:Q},{default:h(()=>[...o[23]||=[l(`确认入库`,-1)]]),_:1})]),default:h(()=>[T(N,{"label-width":`100px`},{default:h(()=>[T(E,{label:`入库仓库`,required:``},{default:h(()=>[T(p,{modelValue:W.value,"onUpdate:modelValue":o[6]||=e=>W.value=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).warehouses,e=>(t(),d(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),T(E,{label:`备注`},{default:h(()=>[T(M,{modelValue:G.value,"onUpdate:modelValue":o[7]||=e=>G.value=e,placeholder:`入库备注`},null,8,[`modelValue`])]),_:1})]),_:1}),T(x,{data:U.value,border:``,size:`small`},{default:h(()=>[T(y,{prop:`material_label`,label:`物料`}),T(y,{prop:`id`,label:`明细ID`,width:`80`}),T(y,{label:`剩余待入库`,width:`100`},{default:h(({row:e})=>[l(n(e.remaining),1)]),_:1}),T(y,{label:`本次入库`,width:`140`},{default:h(({row:e})=>[T(P,{modelValue:e.receive_quantity,"onUpdate:modelValue":t=>e.receive_quantity=t,min:0,max:e.remaining,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`,`max`])]),_:1})]),_:1},8,[`data`])]),_:1},8,[`visible`])])}}}),se={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},ce={style:{display:`flex`,gap:`4px`}},le={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},ue={style:{display:`flex`,gap:`8px`}},de={key:1,style:{"padding-left":`8px`}},fe={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},pe={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},me={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},he=o({__name:`SalesOrdersTab`,setup(o){function s(e,t,n,r,i){return new Promise(a=>{let o=x.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:u,formatCurrency:m,formatDateTime:_,formatDate:S,getSalesOrderStatusLabel:E,getDeliveryStatusLabel:D,getPaymentStatusLabel:O,loadProductionOrders:k,loadFinishedProducts:A,loadCustomers:j,loadMaterials:M,loadInventory:N,loadMovements:P}=L(),F=r(!1),I=r(null),R=r({}),z=r([]),B=r(null),V=r(!1),H=r([]),U=r([]);function W(){I.value=null,R.value={customer_id:null,delivery_date:``,remark:``},z.value=[],U.value=[],F.value=!0}function G(){z.value.push({mold_mode:`new`,mold_sku:``,mold_name:``,mold_id:null,quantity:1,unit_price:0,remark:``})}function K(e){z.value.splice(e,1)}let q=g(()=>z.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function J(e){await j(),await A(),await M();try{let t=await b(`/api/sales-orders/${e.id}`);I.value=e,R.value={customer_id:t.customer_id||e.customer_id||null,delivery_date:t.delivery_date||e.delivery_date||``,remark:t.remark||e.remark||``},z.value=(t.items||[]).map(e=>({mold_mode:e.mold_id?`existing`:`new`,mold_sku:e.sku||``,mold_name:e.name||``,mold_id:e.mold_id||null,quantity:e.quantity||1,unit_price:e.unit_price||0,remark:e.remark||``}));try{U.value=((await b(`/api/sales-orders/${e.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{U.value=[]}}catch(e){p(e,`加载销售订单详情`)}F.value=!0}async function Y(){if(!R.value.customer_id){y(`请选择客户`,`warning`);return}if(!z.value||z.value.length===0){y(`请至少添加一个模具`,`warning`);return}try{let e={customer_id:R.value.customer_id,delivery_date:R.value.delivery_date||null,remark:R.value.remark||``,items:z.value.map(e=>({mold_mode:e.mold_mode,mold_sku:e.mold_sku||``,mold_name:e.mold_name||``,mold_id:e.mold_id||null,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))};I.value?(await b(`/api/sales-orders/${I.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),y(`销售订单更新成功`,`success`)):(await b(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)}),y(`销售订单创建成功`,`success`)),F.value=!1,I.value=null,R.value={},z.value=[],U.value=[],k(),A(),N(),P()}catch(e){p(e,`保存销售订单`)}}async function X(e){if(await s(`删除确认`,`确定要删除这个销售订单吗?`,`warning`,`删除`,`取消`))try{await b(`/api/sales-orders/${e}`,{method:`DELETE`}),y(`销售订单已删除`,`success`),k(),N(),P()}catch(e){p(e,`删除销售订单`)}}async function Z(e){await s(`交付确认`,`确认该订单已交付?`,`success`,`确认交付`,`取消`)&&await Q(e,`delivered`,`已交付`)}async function ee(e,t){if(t!==`delivered`){if(!await s(`非标准流程提醒`,`当前订单尚未交付,确定要提前收款吗?建议先确认交付后再收款。`,`warning`,`仍要收款`,`取消`))return}else if(!await s(`收款确认`,`确认已收到该订单款项?`,`success`,`确认收款`,`取消`))return;await Q(e,`paid`,`已收款`)}async function te(e){await s(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await Q(e,`cancelled`,`已作废`)}async function Q(e,t,n){try{await b(`/api/sales-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),y(`订单已${n}`,`success`),k(),P()}catch(e){p(e,`更新状态`)}}function $(){H.value=[],V.value=!0}function ne(){H.value.push({material_id:u.materials[0]?.id||null,quantity:1,remark:``})}function re(e){H.value.splice(e,1)}let ie=g(()=>H.value.reduce((e,t)=>e+(u.materials.find(e=>e.id===t.material_id)?.cost_price||0)*(t.quantity||0),0));async function ae(){if(I.value){if(!H.value||H.value.length===0){y(`请至少添加一个消耗物料`,`warning`);return}try{let e={items:H.value.map(e=>({material_id:e.material_id,quantity:e.quantity,unit_price:u.materials.find(t=>t.id===e.material_id)?.cost_price||0,remark:e.remark||``}))};await b(`/api/sales-orders/${I.value.id}/consume-materials`,{method:`POST`,body:JSON.stringify(e)}),y(`物料消耗记录保存成功`,`success`),V.value=!1;try{U.value=((await b(`/api/sales-orders/${I.value.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{U.value=[]}N(),P()}catch(e){p(e,`保存物料消耗`)}}}function oe(){F.value=!1,I.value=null,R.value={},z.value=[],U.value=[]}function he(){V.value=!1,H.value=[]}async function ge(){await j(),await M(),await A(),await k()}return w(()=>{ge()}),(r,o)=>{let s=a(`t-option`),p=a(`t-select`),g=a(`t-button`),y=a(`t-table-column`),b=a(`t-tag`),x=a(`t-table`),w=a(`t-empty`),E=a(`t-form-item`),A=a(`t-date-picker`),j=a(`t-input`),M=a(`t-form`),N=a(`t-input-number`),P=a(`t-divider`),L=a(`t-dialog`);return t(),C(`div`,null,[f(`div`,se,[T(p,{modelValue:B.value,"onUpdate:modelValue":o[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:h(()=>[(t(!0),C(v,null,e(i(u).warehouses,e=>(t(),d(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),T(g,{onClick:i(k)},{default:h(()=>[...o[8]||=[l(`刷新`,-1)]]),_:1},8,[`onClick`]),T(g,{type:`primary`,onClick:W},{default:h(()=>[...o[9]||=[l(`新增销售订单`,-1)]]),_:1})]),T(x,{data:i(u).productionOrders,loading:i(u).loading,stripe:``},{default:h(()=>[T(y,{prop:`order_no`,label:`销售单`}),T(y,{prop:`customer_name`,label:`客户`}),T(y,{label:`订单金额`},{default:h(({row:e})=>[l(n(i(m)(e.total_amount)),1)]),_:1}),T(y,{label:`交付日期`},{default:h(({row:e})=>[l(n(i(S)(e.delivery_date)),1)]),_:1}),T(y,{label:`订单创建`},{default:h(({row:e})=>[l(n(i(_)(e.created_at)),1)]),_:1}),T(y,{label:`实际交付`},{default:h(({row:e})=>[l(n(e.delivered_at?i(_)(e.delivered_at):`-`),1)]),_:1}),T(y,{label:`实际收款`},{default:h(({row:e})=>[l(n(e.paid_at?i(_)(e.paid_at):`-`),1)]),_:1}),T(y,{label:`订单状态`,width:`160`},{default:h(({row:e})=>[f(`div`,ce,[T(b,{type:e.delivery_status===`delivered`?`warning`:e.delivery_status===`cancelled`?`danger`:`info`,size:`small`},{default:h(()=>[l(n(i(D)(e.delivery_status)),1)]),_:2},1032,[`type`]),T(b,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:h(()=>[l(n(i(O)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),T(y,{label:`操作`,width:`280`},{default:h(({row:e})=>[e.delivery_status===`manufacturing`?(t(),d(g,{key:0,type:`success`,size:`small`,onClick:t=>Z(e.id)},{default:h(()=>[...o[10]||=[l(`已交付`,-1)]]),_:1},8,[`onClick`])):c(``,!0),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),d(g,{key:1,type:`warning`,size:`small`,onClick:t=>ee(e.id,e.delivery_status)},{default:h(()=>[...o[11]||=[l(`已收款`,-1)]]),_:1},8,[`onClick`])):c(``,!0),T(g,{type:`primary`,size:`small`,disabled:e.payment_status===`paid`||e.delivery_status===`cancelled`,onClick:t=>J(e)},{default:h(()=>[...o[12]||=[l(`编辑`,-1)]]),_:1},8,[`disabled`,`onClick`]),T(g,{type:`danger`,size:`small`,onClick:t=>X(e.id)},{default:h(()=>[...o[13]||=[l(`删除`,-1)]]),_:1},8,[`onClick`]),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),d(g,{key:2,type:`info`,size:`small`,onClick:t=>te(e.id)},{default:h(()=>[...o[14]||=[l(`作废`,-1)]]),_:1},8,[`onClick`])):c(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!i(u).loading&&i(u).productionOrders.length===0?(t(),d(w,{key:0,description:`暂无销售订单`})):c(``,!0),T(L,{visible:F.value,"onUpdate:visible":o[5]||=e=>F.value=e,title:(I.value?`编辑`:`新增`)+`销售订单`,width:`900px`,onClosed:oe},{footer:h(()=>[T(g,{onClick:o[4]||=e=>F.value=!1},{default:h(()=>[...o[20]||=[l(`取消`,-1)]]),_:1}),T(g,{type:`primary`,onClick:Y},{default:h(()=>[...o[21]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(M,{"label-width":`100px`},{default:h(()=>[T(E,{label:`客户`,required:``},{default:h(()=>[T(p,{modelValue:R.value.customer_id,"onUpdate:modelValue":o[1]||=e=>R.value.customer_id=e,placeholder:`请选择客户`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).customers,e=>(t(),d(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),T(E,{label:`交付日期`},{default:h(()=>[T(A,{modelValue:R.value.delivery_date,"onUpdate:modelValue":o[2]||=e=>R.value.delivery_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),T(E,{label:`备注`},{default:h(()=>[T(j,{modelValue:R.value.remark,"onUpdate:modelValue":o[3]||=e=>R.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),f(`div`,le,[o[17]||=f(`span`,{style:{"font-weight":`600`}},`模具明细`,-1),f(`div`,ue,[I.value?(t(),d(g,{key:0,type:`warning`,size:`small`,onClick:$},{default:h(()=>[...o[15]||=[l(`+ 消耗物料`,-1)]]),_:1})):c(``,!0),T(g,{type:`primary`,size:`small`,onClick:G},{default:h(()=>[...o[16]||=[l(`+ 添加模具`,-1)]]),_:1})])]),T(x,{data:z.value,border:``,size:`small`},{default:h(()=>[T(y,{label:`模式`,width:`80`},{default:h(({row:e})=>[T(p,{modelValue:e.mold_mode,"onUpdate:modelValue":t=>e.mold_mode=t,size:`small`,style:{width:`100%`}},{default:h(()=>[T(s,{label:`新模`,value:`new`}),T(s,{label:`改模`,value:`existing`})]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`模具SKU`,"min-width":`120`},{default:h(({row:n})=>[n.mold_mode===`new`?(t(),d(j,{key:0,modelValue:n.mold_sku,"onUpdate:modelValue":e=>n.mold_sku=e,size:`small`,placeholder:`模具SKU`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),d(p,{key:1,modelValue:n.mold_id,"onUpdate:modelValue":e=>n.mold_id=e,placeholder:`选择模具`,size:`small`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).finishedProducts,e=>(t(),d(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`]))]),_:1}),T(y,{label:`模具名称`,"min-width":`120`},{default:h(({row:e})=>[e.mold_mode===`new`?(t(),d(j,{key:0,modelValue:e.mold_name,"onUpdate:modelValue":t=>e.mold_name=t,size:`small`,placeholder:`模具名称`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),C(`span`,de,n(i(u).finishedProducts.find(t=>t.id===e.mold_id)?.name||`-`),1))]),_:1}),T(y,{label:`数量`,width:`100`},{default:h(({row:e})=>[T(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`单价`,width:`120`},{default:h(({row:e})=>[T(N,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`备注`,width:`120`},{default:h(({row:e})=>[T(j,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`操作`,width:`80`},{default:h(({$index:e})=>[T(g,{type:`danger`,size:`small`,onClick:t=>K(e)},{default:h(()=>[...o[18]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),f(`div`,fe,` 订单总金额:`+n(i(m)(q.value)),1),I.value&&U.value.length>0?(t(),C(v,{key:0},[T(P,{"content-position":`left`},{default:h(()=>[...o[19]||=[l(`已消耗物料`,-1)]]),_:1}),T(x,{data:U.value,border:``,size:`small`},{default:h(()=>[T(y,{label:`物料`},{default:h(({row:e})=>[l(n(e.material_name),1)]),_:1}),T(y,{label:`数量`},{default:h(({row:e})=>[l(n(e.quantity),1)]),_:1}),T(y,{label:`单价`},{default:h(({row:e})=>[l(n(i(m)(e.unit_price)),1)]),_:1}),T(y,{label:`备注`},{default:h(({row:e})=>[l(n(e.remark||`-`),1)]),_:1})]),_:1},8,[`data`])],64)):c(``,!0)]),_:1},8,[`visible`,`title`]),T(L,{visible:V.value,"onUpdate:visible":o[7]||=e=>V.value=e,title:`物料消耗`,width:`800px`,onClosed:he},{footer:h(()=>[T(g,{onClick:o[6]||=e=>V.value=!1},{default:h(()=>[...o[25]||=[l(`取消`,-1)]]),_:1}),T(g,{type:`primary`,onClick:ae},{default:h(()=>[...o[26]||=[l(`保存消耗`,-1)]]),_:1})]),default:h(()=>[f(`div`,pe,[o[23]||=f(`span`,{style:{"font-weight":`600`}},`消耗物料明细`,-1),T(g,{type:`primary`,size:`small`,onClick:ne},{default:h(()=>[...o[22]||=[l(`+ 添加物料`,-1)]]),_:1})]),T(x,{data:H.value,border:``,size:`small`},{default:h(()=>[T(y,{label:`物料`,"min-width":`200`},{default:h(({row:n})=>[T(p,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:h(()=>[(t(!0),C(v,null,e(i(u).materials,e=>(t(),d(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`数量`,width:`120`},{default:h(({row:e})=>[T(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`单价`,width:`120`},{default:h(({row:e})=>[T(N,{"model-value":i(u).materials.find(t=>t.id===e.material_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),T(y,{label:`总价`,width:`120`},{default:h(({row:e})=>[l(n(i(m)((i(u).materials.find(t=>t.id===e.material_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),T(y,{label:`备注`,width:`150`},{default:h(({row:e})=>[T(j,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),T(y,{label:`操作`,width:`80`},{default:h(({$index:e})=>[T(g,{type:`danger`,size:`small`,onClick:t=>re(e)},{default:h(()=>[...o[24]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),f(`div`,me,` 消耗总金额:`+n(i(m)(ie.value)),1)]),_:1},8,[`visible`])])}}}),ge={class:`suppliers-tab`},_e={class:`table-header`},ve=_(o({__name:`SuppliersTab`,setup(e){let{state:o,loadSuppliers:s}=L(),c=r(!1),u=r(null),d=m({name:``,contact_person:``,phone:``,email:``,address:``});function g(){u.value=null,d.name=``,d.contact_person=``,d.phone=``,d.email=``,d.address=``,c.value=!0}function _(e){u.value=e,d.name=e.name??``,d.contact_person=e.contact_person??``,d.phone=e.phone??``,d.email=e.email??``,d.address=e.address??``,c.value=!0}async function v(){try{let e={name:d.name,contact_person:d.contact_person||null,phone:d.phone||null,email:d.email||null,address:d.address||null};u.value?(await b(`/api/suppliers/${u.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),y(`供应商更新成功`,`success`)):(await b(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)}),y(`供应商已创建`,`success`)),c.value=!1,s()}catch(e){p(e,`保存供应商`)}}async function x(e){if(confirm(`确定要删除这个供应商吗?`))try{await b(`/api/suppliers/${e}`,{method:`DELETE`}),y(`供应商已删除`,`success`),s()}catch(e){p(e,`删除供应商`)}}return w(()=>{s()}),(e,r)=>{let s=a(`t-button`),p=a(`t-table-column`),m=a(`t-table`),y=a(`t-input`),b=a(`t-form-item`),S=a(`t-form`),w=a(`t-dialog`);return t(),C(`div`,ge,[f(`div`,_e,[T(s,{type:`primary`,onClick:g},{default:h(()=>[...r[7]||=[l(`+ 新增供应商`,-1)]]),_:1})]),T(m,{data:i(o).suppliers,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无供应商数据`},{default:h(()=>[T(p,{prop:`code`,label:`编码`}),T(p,{prop:`name`,label:`名称`}),T(p,{prop:`contact_person`,label:`联系人`},{default:h(({row:e})=>[l(n(e.contact_person||`-`),1)]),_:1}),T(p,{prop:`phone`,label:`电话`},{default:h(({row:e})=>[l(n(e.phone||`-`),1)]),_:1}),T(p,{prop:`email`,label:`邮箱`},{default:h(({row:e})=>[l(n(e.email||`-`),1)]),_:1}),T(p,{label:`操作`,width:`180`},{default:h(({row:e})=>[T(s,{size:`small`,onClick:t=>_(e)},{default:h(()=>[...r[8]||=[l(`编辑`,-1)]]),_:1},8,[`onClick`]),T(s,{size:`small`,type:`danger`,onClick:t=>x(e.id)},{default:h(()=>[...r[9]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),T(w,{modelValue:c.value,"onUpdate:modelValue":r[6]||=e=>c.value=e,title:u.value?`编辑供应商`:`新增供应商`,width:`520px`,"close-on-click-modal":!1},{footer:h(()=>[T(s,{onClick:r[5]||=e=>c.value=!1},{default:h(()=>[...r[10]||=[l(`取消`,-1)]]),_:1}),T(s,{type:`primary`,onClick:v},{default:h(()=>[...r[11]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(S,{model:d,"label-width":`80px`},{default:h(()=>[T(b,{label:`名称`,required:``},{default:h(()=>[T(y,{modelValue:d.name,"onUpdate:modelValue":r[0]||=e=>d.name=e,placeholder:`请输入供应商名称`},null,8,[`modelValue`])]),_:1}),T(b,{label:`联系人`},{default:h(()=>[T(y,{modelValue:d.contact_person,"onUpdate:modelValue":r[1]||=e=>d.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),T(b,{label:`电话`},{default:h(()=>[T(y,{modelValue:d.phone,"onUpdate:modelValue":r[2]||=e=>d.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),T(b,{label:`邮箱`},{default:h(()=>[T(y,{modelValue:d.email,"onUpdate:modelValue":r[3]||=e=>d.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),T(b,{label:`地址`},{default:h(()=>[T(y,{modelValue:d.address,"onUpdate:modelValue":r[4]||=e=>d.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-46312435`]]),ye={class:`customers-tab`},be={class:`table-header`},xe=_(o({__name:`CustomersTab`,setup(e){let{state:o,loadCustomers:s}=L(),c=r(!1),u=r(null),d=m({name:``,contact_person:``,phone:``,email:``,address:``});function g(){u.value=null,d.name=``,d.contact_person=``,d.phone=``,d.email=``,d.address=``,c.value=!0}function _(e){u.value=e,d.name=e.name??``,d.contact_person=e.contact_person??``,d.phone=e.phone??``,d.email=e.email??``,d.address=e.address??``,c.value=!0}async function v(){try{let e={name:d.name,contact_person:d.contact_person||null,phone:d.phone||null,email:d.email||null,address:d.address||null};u.value?(await b(`/api/customers/${u.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),y(`客户更新成功`,`success`)):(await b(`/api/customers`,{method:`POST`,body:JSON.stringify(e)}),y(`客户已创建`,`success`)),c.value=!1,s()}catch(e){p(e,`保存客户`)}}async function x(e){if(confirm(`确定要删除这个客户吗?`))try{await b(`/api/customers/${e}`,{method:`DELETE`}),y(`客户已删除`,`success`),s()}catch(e){p(e,`删除客户`)}}return w(()=>{s()}),(e,r)=>{let s=a(`t-button`),p=a(`t-table-column`),m=a(`t-table`),y=a(`t-input`),b=a(`t-form-item`),S=a(`t-form`),w=a(`t-dialog`);return t(),C(`div`,ye,[f(`div`,be,[T(s,{type:`primary`,onClick:g},{default:h(()=>[...r[7]||=[l(`+ 新增客户`,-1)]]),_:1})]),T(m,{data:i(o).customers,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无客户数据`},{default:h(()=>[T(p,{prop:`code`,label:`编码`}),T(p,{prop:`name`,label:`名称`}),T(p,{prop:`contact_person`,label:`联系人`},{default:h(({row:e})=>[l(n(e.contact_person||`-`),1)]),_:1}),T(p,{prop:`phone`,label:`电话`},{default:h(({row:e})=>[l(n(e.phone||`-`),1)]),_:1}),T(p,{prop:`email`,label:`邮箱`},{default:h(({row:e})=>[l(n(e.email||`-`),1)]),_:1}),T(p,{label:`操作`,width:`180`},{default:h(({row:e})=>[T(s,{size:`small`,onClick:t=>_(e)},{default:h(()=>[...r[8]||=[l(`编辑`,-1)]]),_:1},8,[`onClick`]),T(s,{size:`small`,type:`danger`,onClick:t=>x(e.id)},{default:h(()=>[...r[9]||=[l(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),T(w,{modelValue:c.value,"onUpdate:modelValue":r[6]||=e=>c.value=e,title:u.value?`编辑客户`:`新增客户`,width:`520px`,"close-on-click-modal":!1},{footer:h(()=>[T(s,{onClick:r[5]||=e=>c.value=!1},{default:h(()=>[...r[10]||=[l(`取消`,-1)]]),_:1}),T(s,{type:`primary`,onClick:v},{default:h(()=>[...r[11]||=[l(`保存`,-1)]]),_:1})]),default:h(()=>[T(S,{model:d,"label-width":`80px`},{default:h(()=>[T(b,{label:`名称`,required:``},{default:h(()=>[T(y,{modelValue:d.name,"onUpdate:modelValue":r[0]||=e=>d.name=e,placeholder:`请输入客户名称`},null,8,[`modelValue`])]),_:1}),T(b,{label:`联系人`},{default:h(()=>[T(y,{modelValue:d.contact_person,"onUpdate:modelValue":r[1]||=e=>d.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),T(b,{label:`电话`},{default:h(()=>[T(y,{modelValue:d.phone,"onUpdate:modelValue":r[2]||=e=>d.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),T(b,{label:`邮箱`},{default:h(()=>[T(y,{modelValue:d.email,"onUpdate:modelValue":r[3]||=e=>d.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),T(b,{label:`地址`},{default:h(()=>[T(y,{modelValue:d.address,"onUpdate:modelValue":r[4]||=e=>d.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-910d60b4`]]),Se={style:{"margin-bottom":`16px`,display:`flex`,gap:`12px`,"align-items":`center`,"flex-wrap":`wrap`}},Ce={style:{"text-align":`center`}},we={style:{"font-size":`24px`,"font-weight":`700`,color:`#409eff`}},Te={style:{"text-align":`center`}},Ee={style:{"font-size":`24px`,"font-weight":`700`,color:`#e6a23c`}},De={style:{"text-align":`center`}},Oe={style:{"font-size":`24px`,"font-weight":`700`,color:`#67c23a`}},ke={style:{"text-align":`center`}},Ae={style:{"font-size":`24px`,"font-weight":`700`,color:`#f56c6c`}},je=o({__name:`FinanceTab`,setup(o){let{state:s,formatCurrency:u,formatDateTime:p,formatDate:m,loadFinance:_,refreshFinanceByPeriod:y}=L(),b=r(s.financePeriod.year),x=r(s.financePeriod.quarter),S=[{label:`全年`,value:``},{label:`Q1`,value:`1`},{label:`Q2`,value:`2`},{label:`Q3`,value:`3`},{label:`Q4`,value:`4`}],E=g(()=>x.value?`${b.value}年 Q${x.value}`:`${b.value}年 全年`);function D(){s.financePeriod.year=b.value,s.financePeriod.quarter=x.value,_()}w(()=>{D()});let O=g(()=>s.financeSummary?.total_receivable??0),k=g(()=>s.financeSummary?.total_payable??0),A=g(()=>s.financeSummary?.period_received??0),j=g(()=>s.financeSummary?.period_paid??0);function M(e){return e===`receipt`?`收款`:`付款`}function N(e){return e===`receipt`?`success`:`warning`}function P(e){return{confirmed:`已确认`,pending:`待确认`}[e]||e}return(r,o)=>{let p=a(`t-input-number`),g=a(`t-option`),_=a(`t-select`),y=a(`t-button`),w=a(`t-tag`),F=a(`t-card`),I=a(`t-col`),L=a(`t-row`),R=a(`t-table-column`),z=a(`t-table`),B=a(`t-empty`);return t(),C(`div`,null,[f(`div`,Se,[o[3]||=f(`span`,{style:{"font-weight":`600`}},`统计周期:`,-1),T(p,{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,min:2020,max:2099,style:{width:`120px`}},null,8,[`modelValue`]),o[4]||=f(`span`,null,`年`,-1),T(_,{modelValue:x.value,"onUpdate:modelValue":o[1]||=e=>x.value=e,placeholder:`选择季度`,style:{width:`120px`}},{default:h(()=>[(t(),C(v,null,e(S,e=>T(g,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`]),T(y,{type:`primary`,onClick:D},{default:h(()=>[...o[2]||=[l(`刷新统计`,-1)]]),_:1}),T(w,{type:`info`,size:`large`},{default:h(()=>[l(n(E.value),1)]),_:1})]),T(L,{gutter:16,style:{"margin-bottom":`16px`}},{default:h(()=>[T(I,{span:6},{default:h(()=>[T(F,{shadow:`hover`},{default:h(()=>[f(`div`,Ce,[o[5]||=f(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应收总额`,-1),f(`div`,we,n(i(u)(O.value)),1)])]),_:1})]),_:1}),T(I,{span:6},{default:h(()=>[T(F,{shadow:`hover`},{default:h(()=>[f(`div`,Te,[o[6]||=f(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应付总额`,-1),f(`div`,Ee,n(i(u)(k.value)),1)])]),_:1})]),_:1}),T(I,{span:6},{default:h(()=>[T(F,{shadow:`hover`},{default:h(()=>[f(`div`,De,[o[7]||=f(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期收款`,-1),f(`div`,Oe,n(i(u)(A.value)),1)])]),_:1})]),_:1}),T(I,{span:6},{default:h(()=>[T(F,{shadow:`hover`},{default:h(()=>[f(`div`,ke,[o[8]||=f(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期付款`,-1),f(`div`,Ae,n(i(u)(j.value)),1)])]),_:1})]),_:1})]),_:1}),T(F,{style:{"margin-bottom":`16px`}},{header:h(()=>[...o[9]||=[f(`span`,{style:{"font-weight":`600`}},`客户账款(周期)`,-1)]]),default:h(()=>[T(z,{data:i(s).customerFinanceStatement,loading:i(s).loading,stripe:``,size:`small`},{default:h(()=>[T(R,{prop:`partner_name`,label:`客户`}),T(R,{prop:`order_count`,label:`订单数`}),T(R,{prop:`transaction_count`,label:`流水数`}),T(R,{label:`订单金额`},{default:h(({row:e})=>[l(n(i(u)(e.order_amount)),1)]),_:1}),T(R,{label:`订单已收`},{default:h(({row:e})=>[l(n(i(u)(e.order_received)),1)]),_:1}),T(R,{label:`实收流水`},{default:h(({row:e})=>[l(n(i(u)(e.transaction_received)),1)]),_:1}),T(R,{label:`应收余额`},{default:h(({row:e})=>[l(n(i(u)(e.receivable_balance)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).customerFinanceStatement.length===0?(t(),d(B,{key:0,description:`暂无数据`})):c(``,!0)]),_:1}),T(F,{style:{"margin-bottom":`16px`}},{header:h(()=>[...o[10]||=[f(`span`,{style:{"font-weight":`600`}},`供应商账款(周期)`,-1)]]),default:h(()=>[T(z,{data:i(s).supplierFinanceStatement,loading:i(s).loading,stripe:``,size:`small`},{default:h(()=>[T(R,{prop:`partner_name`,label:`供应商`}),T(R,{prop:`order_count`,label:`订单数`}),T(R,{prop:`transaction_count`,label:`流水数`}),T(R,{label:`订单金额`},{default:h(({row:e})=>[l(n(i(u)(e.order_amount)),1)]),_:1}),T(R,{label:`订单已付`},{default:h(({row:e})=>[l(n(i(u)(e.order_paid)),1)]),_:1}),T(R,{label:`实付流水`},{default:h(({row:e})=>[l(n(i(u)(e.transaction_paid)),1)]),_:1}),T(R,{label:`应付余额`},{default:h(({row:e})=>[l(n(i(u)(e.payable_balance)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).supplierFinanceStatement.length===0?(t(),d(B,{key:0,description:`暂无数据`})):c(``,!0)]),_:1}),T(F,{style:{"margin-bottom":`16px`}},{header:h(()=>[...o[11]||=[f(`span`,{style:{"font-weight":`600`}},`客户-商品追溯(周期)`,-1)]]),default:h(()=>[T(z,{data:i(s).customerProductStatement,loading:i(s).loading,stripe:``,size:`small`},{default:h(()=>[T(R,{prop:`partner_name`,label:`客户`}),T(R,{prop:`product_sku`,label:`SKU`}),T(R,{prop:`product_name`,label:`商品`}),T(R,{prop:`order_count`,label:`订单数`}),T(R,{prop:`quantity`,label:`数量`}),T(R,{label:`订单金额`},{default:h(({row:e})=>[l(n(i(u)(e.order_amount)),1)]),_:1}),T(R,{label:`已结款`},{default:h(({row:e})=>[l(n(i(u)(e.settled_amount)),1)]),_:1}),T(R,{label:`未结款`},{default:h(({row:e})=>[l(n(i(u)(e.unsettled_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).customerProductStatement.length===0?(t(),d(B,{key:0,description:`暂无数据`})):c(``,!0)]),_:1}),T(F,{style:{"margin-bottom":`16px`}},{header:h(()=>[...o[12]||=[f(`span`,{style:{"font-weight":`600`}},`供应商-商品追溯(周期)`,-1)]]),default:h(()=>[T(z,{data:i(s).supplierProductStatement,loading:i(s).loading,stripe:``,size:`small`},{default:h(()=>[T(R,{prop:`partner_name`,label:`供应商`}),T(R,{prop:`product_sku`,label:`SKU`}),T(R,{prop:`product_name`,label:`商品`}),T(R,{prop:`order_count`,label:`订单数`}),T(R,{prop:`quantity`,label:`数量`}),T(R,{label:`订单金额`},{default:h(({row:e})=>[l(n(i(u)(e.order_amount)),1)]),_:1}),T(R,{label:`已结款`},{default:h(({row:e})=>[l(n(i(u)(e.settled_amount)),1)]),_:1}),T(R,{label:`未结款`},{default:h(({row:e})=>[l(n(i(u)(e.unsettled_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).supplierProductStatement.length===0?(t(),d(B,{key:0,description:`暂无数据`})):c(``,!0)]),_:1}),T(F,null,{header:h(()=>[...o[13]||=[f(`span`,{style:{"font-weight":`600`}},`最近财务流水`,-1)]]),default:h(()=>[T(z,{data:i(s).financeTransactions,loading:i(s).loading,stripe:``,size:`small`},{default:h(()=>[T(R,{prop:`order_no`,label:`单号`}),T(R,{label:`类型`},{default:h(({row:e})=>[T(w,{type:N(e.type),size:`small`},{default:h(()=>[l(n(M(e.type)),1)]),_:2},1032,[`type`])]),_:1}),T(R,{prop:`partner_name`,label:`往来方`}),T(R,{label:`金额`},{default:h(({row:e})=>[l(n(i(u)(e.amount)),1)]),_:1}),T(R,{label:`状态`},{default:h(({row:e})=>[T(w,{type:e.status===`confirmed`?`success`:`warning`,size:`small`},{default:h(()=>[l(n(P(e.status)),1)]),_:2},1032,[`type`])]),_:1}),T(R,{label:`日期`},{default:h(({row:e})=>[l(n(i(m)(e.transaction_date)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).financeTransactions.length===0?(t(),d(B,{key:0,description:`暂无数据`})):c(``,!0)]),_:1})])}}}),Me={class:`movements-tab`},Ne=_(o({__name:`MovementsTab`,setup(e){let{state:r,loadMovements:o,getMovementTypeLabel:s,getMovementBadgeClass:c,formatDateTime:u}=L(),d=e=>{let t=c(e);return t===`badge-success`?`success`:t===`badge-error`?`danger`:t===`badge-warning`?`warning`:`info`};return w(()=>{o()}),(e,o)=>{let c=a(`t-table-column`),f=a(`t-tag`),p=a(`t-table`);return t(),C(`div`,Me,[T(p,{data:i(r).movements,style:{width:`100%`},loading:i(r).loading,"empty-text":`暂无库存变动记录`},{default:h(()=>[T(c,{label:`物料`},{default:h(({row:e})=>[l(n(e.product_name)+n(e.product_sku?` (`+e.product_sku+`)`:``),1)]),_:1}),T(c,{label:`类型`,width:`140`},{default:h(({row:e})=>[T(f,{type:d(e.movement_type),size:`small`},{default:h(()=>[l(n(i(s)(e.movement_type)),1)]),_:2},1032,[`type`])]),_:1}),T(c,{prop:`quantity`,label:`数量`,width:`80`}),T(c,{prop:`before_quantity`,label:`变动前`,width:`80`}),T(c,{prop:`after_quantity`,label:`变动后`,width:`80`}),T(c,{label:`时间`,width:`180`},{default:h(({row:e})=>[l(n(i(u)(e.created_at)),1)]),_:1})]),_:1},8,[`data`,`loading`])])}}}),[[`__scopeId`,`data-v-79f8d5e3`]]),Pe={class:`page-container`},Fe={class:`inventory-layout`},Ie={class:`inventory-sidebar-wrapper`},Le={class:`inventory-content`},Re={class:`inventory-content-header`},ze={class:`inventory-breadcrumb`},Be={class:`current`},Ve=_(o({__name:`InventoryView`,setup(e){let r=u(),o=S(),{state:l,activeMenu:p,checkBackendHealth:m,loadDashboard:g,destroyPickers:_}=L();return w(()=>{if(!r.user){o.push(`/login`);return}m().then(()=>{if(!l.backendDbReady){y(l.backendDbMessage||`业务服务不可用`,`warning`);return}g()})}),s(()=>{_()}),(e,r)=>{let o=a(`t-alert`),s=a(`t-loading`);return t(),C(`div`,Pe,[r[1]||=f(`div`,{class:`page-header`},[f(`h1`,null,`进销存管理`),f(`p`,null,`库存、采购、销售管理`)],-1),f(`div`,Fe,[f(`aside`,Ie,[T(B)]),f(`section`,Le,[f(`div`,Re,[f(`div`,ze,[f(`span`,null,n(i(p)?.group?.title||`进销存`),1),r[0]||=f(`span`,{class:`sep`},`/`,-1),f(`span`,Be,n(i(p)?.item?.label||``),1)])]),i(l).backendDbReady?c(``,!0):(t(),d(o,{key:0,title:i(l).backendDbMessage,type:`warning`,"show-icon":``,closable:!1,style:{"margin-bottom":`16px`}},null,8,[`title`])),T(s,{loading:i(l).loading},{default:h(()=>[i(l).activeTab===`dashboard`?(t(),d(G,{key:0})):i(l).activeTab===`products`?(t(),d(J,{key:1})):i(l).activeTab===`materials`?(t(),d(ee,{key:2})):i(l).activeTab===`inventory`?(t(),d($,{key:3})):i(l).activeTab===`purchases`?(t(),d(oe,{key:4})):i(l).activeTab===`sales_orders`?(t(),d(he,{key:5})):i(l).activeTab===`suppliers`?(t(),d(ve,{key:6})):i(l).activeTab===`customers`?(t(),d(xe,{key:7})):i(l).activeTab===`finance`?(t(),d(je,{key:8})):i(l).activeTab===`movements`?(t(),d(Ne,{key:9})):c(``,!0)]),_:1},8,[`loading`])])])])}}}),[[`__scopeId`,`data-v-de14c186`]]);export{Ve as default}; \ No newline at end of file diff --git a/static/assets/InventoryView-DCFTumSQ.css b/static/assets/InventoryView-DCFTumSQ.css deleted file mode 100644 index 250c42b..0000000 --- a/static/assets/InventoryView-DCFTumSQ.css +++ /dev/null @@ -1 +0,0 @@ -.group-arrow[data-v-b5fce634]{color:var(--text-tertiary);font-size:10px;transition:transform .2s}.inventory-tab[data-v-b02ca093]{padding:0}.table-header[data-v-b02ca093]{margin-bottom:16px}.suppliers-tab[data-v-46312435]{padding:0}.table-header[data-v-46312435]{margin-bottom:16px}.customers-tab[data-v-910d60b4]{padding:0}.table-header[data-v-910d60b4]{margin-bottom:16px}.movements-tab[data-v-79f8d5e3],.page-container[data-v-de14c186]{padding:0}.page-header[data-v-de14c186]{margin-bottom:var(--space-6)}.page-header h1[data-v-de14c186]{font-size:var(--text-2xl);font-weight:var(--font-bold);color:var(--text-primary);margin:0}.page-header p[data-v-de14c186]{color:var(--text-tertiary);margin:var(--space-1) 0 0;font-size:var(--text-sm)}.inventory-layout[data-v-de14c186]{gap:var(--space-6);min-height:calc(100vh - 200px);display:flex}.inventory-sidebar-wrapper[data-v-de14c186]{flex-shrink:0;width:200px}.inventory-content[data-v-de14c186]{flex:1;min-width:0}.inventory-content-header[data-v-de14c186]{margin-bottom:var(--space-4)}.inventory-breadcrumb[data-v-de14c186]{font-size:var(--text-sm);color:var(--text-tertiary)}.inventory-breadcrumb .sep[data-v-de14c186]{margin:0 var(--space-2)}.inventory-breadcrumb .current[data-v-de14c186]{color:var(--text-primary);font-weight:var(--font-medium)}.inventory-sidebar-wrapper[data-v-de14c186] .t-menu{background:0 0;border-right:none}.inventory-sidebar-wrapper[data-v-de14c186] .sidebar-group-title{padding:var(--space-3) var(--space-4);font-size:var(--text-xs);font-weight:var(--font-semibold);color:var(--text-tertiary);text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;display:flex}.inventory-sidebar-wrapper[data-v-de14c186] .t-menu__item{height:36px;line-height:36px;font-size:var(--text-sm);margin:2px var(--space-2);border-radius:var(--radius-md);padding:0 var(--space-4)}.inventory-sidebar-wrapper[data-v-de14c186] .t-is-active{background:var(--primary-50);color:var(--primary-600);font-weight:var(--font-medium)}.inventory-sidebar-wrapper[data-v-de14c186] .t-menu__item:hover{background:var(--bg-tertiary)} diff --git a/static/assets/InventoryView-DgARKf1e.js b/static/assets/InventoryView-DgARKf1e.js new file mode 100644 index 0000000..6b0365b --- /dev/null +++ b/static/assets/InventoryView-DgARKf1e.js @@ -0,0 +1 @@ +import{D as e,E as t,I as n,M as r,N as i,O as a,P as o,S as s,T as c,_ as l,b as u,c as d,g as f,h as p,i as m,j as h,k as g,m as _,n as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E}from"./index-EqJJKSSk.js";import{a as D,n as O,r as k,t as A}from"./utils-COFIQvWo.js";var j=h({activeTab:`dashboard`,backendDbReady:!0,backendDbMessage:``,productCategory:`finished`,dashboard:null,financeSummary:null,financePeriod:{year:new Date().getFullYear(),quarter:``},financeTransactions:[],receivables:[],payables:[],customerFinanceStatement:[],supplierFinanceStatement:[],customerProductStatement:[],supplierProductStatement:[],products:[],materials:[],finishedProducts:[],purchaseOrders:[],purchaseWarehouseId:null,purchaseReceiveItems:[],productionOrders:[],productionPlan:null,productionWarehouseId:null,suppliers:[],customers:[],warehouses:[],inventory:[],movements:[],loading:!1,showModal:!1,modalType:``,editingItem:null,productBomItems:[],materialConsumptionItems:[],showMaterialConsumptionModal:!1,consumedMaterials:[],restockItems:[],showRestockModal:!1,form:{}}),M=null,N=null,P=r(null),F=r(null),I=r(null),L=r(null);function R(){let e=e=>{if(!e)return null;let t=String(e).trim().replace(`T`,` `).slice(0,16).match(/^(\d{4})-(\d{2})-(\d{2})\s(\d{2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=Number(t[4]),o=Number(t[5]);return Number.isFinite(n+r+i+a+o)?new Date(n,r-1,i,a,o,0):null},t=e=>{if(!e)return``;let t=String(e).trim();if(/^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}/.test(t))return t.slice(0,16);if(t.includes(`T`))return t.replace(`T`,` `).slice(0,16);let n=new Date(t);if(!Number.isFinite(n.getTime()))return``;let r=e=>String(e).padStart(2,`0`);return`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}`},n=e=>{if(!e)return null;let t=String(e).trim();return t.includes(`T`)?t.split(`T`)[0]:t.includes(` `)?t.split(` `)[0]:t.length===10?t:e instanceof Date?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:t},r=e=>{if(!e)return``;let t=String(e).trim();if(t.length===10&&!t.includes(`T`)&&!t.includes(` `))return t;let n=t.replace(` `,`T`);return n.length>=16?n.slice(0,16):n},i=e=>{if(!e)return``;let t=String(e).trim();return t.length===10&&!t.includes(`T`)&&!t.includes(` `)?t:t.replace(`T`,` `).slice(0,16)},a=()=>{M&&=(M.destroy(),null),N&&=(N.destroy(),null)},o=()=>{if(a(),typeof AirDatepicker==`function`){if(j.modalType===`salesOrder`&&P.value){M=new AirDatepicker(P.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{j.form.delivery_date=e||``,j.form.delivery_date_native=r(e||``)}});let t=e(j.form.delivery_date);t&&M.selectDate(t,{silent:!0})}if(j.modalType===`purchaseOrder`&&F.value){N=new AirDatepicker(F.value,{timepicker:!1,autoClose:!0,zIndex:2005,dateFormat:`yyyy-MM-dd`,onSelect:({formattedDate:e})=>{j.form.expected_date=e||``,j.form.expected_date_native=r(e||``)}});let t=e(j.form.expected_date);t&&N.selectDate(t,{silent:!0})}}},s=e=>{if(e===`delivery`&&M){M.show();return}if(e===`expected`&&N){N.show();return}let t=e===`delivery`?I.value:L.value;if(t){if(typeof t.showPicker==`function`){t.showPicker();return}t.focus(),t.click()}},c=e=>({in:`其他入库`,out:`其他出库`,adjust:`库存调整`,purchase_in:`采购入库`,return_from_production:`生产退料入库`,outsource_return:`外协回库`,finish_in:`完工入库`,issue_to_production:`生产领料出库`,outsource_send:`外协发料出库`,shipment_out:`销售出库`,scrap_out:`报废出库`})[e]||e,l=e=>[`purchase_in`,`return_from_production`,`outsource_return`,`finish_in`,`in`].includes(e)?`badge-success`:[`issue_to_production`,`outsource_send`,`shipment_out`,`scrap_out`,`out`].includes(e)?`badge-error`:`badge-warning`,u=e=>({draft:`已下单`,pending:`已下单`,partial_received:`部分收货`,received:`已收货`,paid:`已付款`,cancelled:`已作废`})[e]||e,d=e=>[`received`,`paid`,`cancelled`].includes(e),f=e=>({manufacturing:`制造中`,delivered:`已交付`,paid:`已收款`,cancelled:`已作废`})[e]||e,p=e=>({manufacturing:`制造中`,delivered:`已交付`,cancelled:`已作废`})[e]||e,g=e=>({unpaid:`未收款`,paid:`已收款`})[e]||e,v=e=>({pending:`已下单`,partial_received:`部分收货`,received:`已收货`,cancelled:`已作废`})[e]||e,y=async()=>{try{let e=await fetch(`/health`,{method:`GET`});if(!e.ok){j.backendDbReady=!1,j.backendDbMessage=`后端服务异常,暂无法加载业务数据`;return}let t=await e.json().catch(()=>null);if(t&&t.database_connected===!1){j.backendDbReady=!1,j.backendDbMessage=`数据库未连接,当前仅可浏览界面,业务数据暂不可用`;return}j.backendDbReady=!0,j.backendDbMessage=``}catch{j.backendDbReady=!1,j.backendDbMessage=`无法连接后端服务`}},S=async()=>{j.loading=!0;try{j.dashboard=await x(`/api/dashboard`)}catch(e){m(e,`加载仪表盘`)}finally{j.loading=!1}},C=async()=>{j.loading=!0;try{j.finishedProducts=await x(`/api/products?item_type=finished&limit=100`)}catch(e){m(e,`加载成品`)}finally{j.loading=!1}},w=async()=>{await C()},T=async()=>{j.loading=!0;try{j.materials=await x(`/api/products?item_type=material&limit=100`)}catch(e){m(e,`加载物料`)}finally{j.loading=!1}},E=async()=>{j.loading=!0;try{j.warehouses=await x(`/api/warehouses`)}catch(e){m(e,`加载仓库`)}finally{j.loading=!1}},R=async()=>{if(j.materials.length||await T(),j.warehouses.length||await E(),!j.warehouses.length)try{await x(`/api/warehouses`,{method:`POST`,body:JSON.stringify({name:`默认仓库`})}),await E(),b(`已自动创建默认仓库`,`success`)}catch(e){m(e,`自动创建默认仓库`)}},z=async()=>{j.loading=!0;try{j.suppliers=await x(`/api/suppliers`)}catch(e){m(e,`加载供应商`)}finally{j.loading=!1}},B=async()=>{j.loading=!0;try{let[e,t]=await Promise.all([x(`/api/sales-orders?limit=100`),x(`/api/warehouses`)]);j.productionOrders=e?.items||[],j.warehouses=t||[],j.productionWarehouseId||=j.warehouses.find(e=>e.is_default)?.id||j.warehouses[0]?.id||null}catch(e){m(e,`加载按单生产数据`)}finally{j.loading=!1}},V=async()=>{j.loading=!0;try{let[e,t]=await Promise.all([x(`/api/purchase-orders?limit=100`),x(`/api/warehouses`)]);j.purchaseOrders=e?.items||[],j.warehouses=t||[],j.purchaseWarehouseId||=j.warehouses.find(e=>e.is_default)?.id||j.warehouses[0]?.id||null}catch(e){m(e,`加载采购订单`)}finally{j.loading=!1}},H=async()=>{j.loading=!0;try{j.customers=await x(`/api/customers`)}catch(e){m(e,`加载客户`)}finally{j.loading=!1}},U=async()=>{j.loading=!0;try{j.inventory=(await x(`/api/inventory`))?.items||[]}catch(e){m(e,`加载库存`)}finally{j.loading=!1}},W=async()=>{j.loading=!0;try{j.movements=(await x(`/api/stock-movements`))?.items||[]}catch(e){m(e,`加载变动记录`)}finally{j.loading=!1}},G=async()=>{j.loading=!0;try{let e=Number(j.financePeriod.year)||new Date().getFullYear(),t=j.financePeriod.quarter?Number(j.financePeriod.quarter):null,n=t?`year=${e}&quarter=${t}`:`year=${e}`,[r,i,a,o,s,c,l,u]=await Promise.all([x(`/api/finance/summary?${n}`),x(`/api/finance/transactions?status=confirmed&limit=20&${n}`),x(`/api/finance/receivables?limit=20&${n}`),x(`/api/finance/payables?limit=20&${n}`),x(`/api/finance/partner-statement/customer?${n}`),x(`/api/finance/partner-statement/supplier?${n}`),x(`/api/finance/partner-product-statement/customer?${n}`),x(`/api/finance/partner-product-statement/supplier?${n}`)]);j.financeSummary=r,j.financeTransactions=i,j.receivables=a,j.payables=o,j.customerFinanceStatement=s.items||[],j.supplierFinanceStatement=c.items||[],j.customerProductStatement=l.items||[],j.supplierProductStatement=u.items||[]}catch(e){m(e,`加载财务数据`)}finally{j.loading=!1}},K=()=>{j.activeTab===`finance`&&G()},q=e=>{j.activeTab=e},J=()=>{j.showModal=!1,j.modalType=``,j.editingItem=null,j.productBomItems=[],j.purchaseReceiveItems=[],j.form={},a()},Y=_(()=>(j.editingItem?`编辑`:`新增`)+({product:j.form.item_type===`finished`?`成品`:`物料`,inventoryItem:`物料库存`,salesOrder:`销售订单`,purchaseOrder:`采购订单`,purchaseReceive:`采购到货入库`,supplier:`供应商`,customer:`客户`}[j.modalType]||``)),X=[{key:`overview`,title:`概览`,items:[{key:`dashboard`,label:`仪表盘`}]},{key:`sales`,title:`销售`,items:[{key:`sales_orders`,label:`销售订单管理`}]},{key:`purchase`,title:`采购`,items:[{key:`purchases`,label:`采购订单管理`}]},{key:`product`,title:`产品`,items:[{key:`products`,label:`成品管理`},{key:`materials`,label:`物料管理`}]},{key:`partner`,title:`往来单位`,items:[{key:`customers`,label:`客户管理`},{key:`suppliers`,label:`供应商管理`}]},{key:`warehouse`,title:`仓库`,items:[{key:`inventory`,label:`库存管理`},{key:`movements`,label:`库存变动记录`}]},{key:`finance`,title:`财务`,items:[{key:`finance`,label:`财务概览`}]}],Z=h(Object.fromEntries(X.map(e=>[e.key,!0])));return{state:j,deliveryDateInput:P,expectedDateInput:F,deliveryDateNativeInput:I,expectedDateNativeInput:L,menuGroups:X,openGroups:Z,activeMenu:_(()=>{for(let e of X){let t=e.items.find(e=>e.key===j.activeTab);if(t)return{group:e,item:t}}return null}),modalTitle:Y,parseDateTimeLocal:e,toPickerValue:t,toApiDateTime:n,toNativeValue:r,fromNativeValue:i,destroyPickers:a,initPickers:o,openDateTimePicker:s,getMovementTypeLabel:c,getMovementBadgeClass:l,getPurchaseOrderStatusLabel:u,isPurchaseOrderLocked:d,getSalesOrderStatusLabel:f,getDeliveryStatusLabel:p,getPaymentStatusLabel:g,getReceiptStatusLabel:v,checkBackendHealth:y,loadDashboard:S,loadFinishedProducts:C,loadProducts:w,loadMaterials:T,loadWarehouses:E,ensureStockBaseData:R,loadSuppliers:z,loadProductionOrders:B,loadPurchaseOrders:V,loadCustomers:H,loadInventory:U,loadMovements:W,loadFinance:G,refreshFinanceByPeriod:K,switchTab:q,closeModal:J,toggleGroup:e=>{Z[e]=!Z[e]},handleMenuClick:e=>{q(e)},switchProductCategory:e=>{j.productCategory=e},formatCurrency:A,formatNumber:D,formatDateTime:k,formatDate:O}}var z={class:`sidebar-nav`},B=[`onClick`],V={class:`group-arrow`},H=[`onClick`],U=v(s({__name:`InventorySidebar`,setup(r){let{state:a,menuGroups:s,openGroups:c,toggleGroup:u,handleMenuClick:d}=R();return(r,f)=>(t(),w(`nav`,z,[(t(!0),w(y,null,e(i(s),r=>(t(),w(`div`,{key:r.key,class:`sidebar-group`},[p(`div`,{class:`sidebar-group-title`,onClick:e=>i(u)(r.key)},[p(`span`,null,n(r.title),1),p(`span`,V,n(i(c)[r.key]?`▾`:`▸`),1)],8,B),i(c)[r.key]?(t(!0),w(y,{key:0},e(r.items,e=>(t(),w(`div`,{key:e.key,class:o([`sidebar-item`,{active:i(a).activeTab===e.key}]),onClick:t=>i(d)(e.key)},n(e.label),11,H))),128)):l(``,!0)]))),128))]))}}),[[`__scopeId`,`data-v-8d87a791`]]),W={style:{display:`flex`,"align-items":`center`,gap:`12px`}},G={style:{"font-size":`32px`}},K={style:{"font-size":`24px`,"font-weight":`700`}},q={style:{color:`var(--text-tertiary)`,"font-size":`13px`}},J=s({__name:`DashboardTab`,setup(r){let{state:o,formatCurrency:s}=R();return(r,c)=>{let l=a(`t-card`),u=a(`t-col`),d=a(`t-row`);return t(),f(d,{gutter:16},{default:g(()=>[(t(!0),w(y,null,e([{icon:`📦`,value:i(o).dashboard?.product_count||0,label:`成品数量`},{icon:`📊`,value:i(o).dashboard?.total_stock||0,label:`物料库存总量`},{icon:`💰`,value:i(s)(i(o).dashboard?.total_value||0),label:`库存价值`},{icon:`🏭`,value:i(o).dashboard?.supplier_count||0,label:`供应商`},{icon:`👥`,value:i(o).dashboard?.customer_count||0,label:`客户`},{icon:`🏪`,value:i(o).dashboard?.warehouse_count||0,label:`仓库`}],e=>(t(),f(u,{span:8,key:e.label,style:{"margin-bottom":`16px`}},{default:g(()=>[E(l,{shadow:`hover`},{default:g(()=>[p(`div`,W,[p(`span`,G,n(e.icon),1),p(`div`,null,[p(`div`,K,n(e.value),1),p(`div`,q,n(e.label),1)])])]),_:2},1024)]),_:2},1024))),128))]),_:1})}}}),Y={style:{"margin-bottom":`12px`}},X={style:{padding:`0 12px 12px 12px`}},Z=s({__name:`ProductsTab`,setup(o){let{state:s,formatCurrency:c,loadFinishedProducts:d,loadMaterials:h}=R(),_=r(!1),v=r(null),S=r({}),C=r([]);function D(){v.value=null,S.value={item_type:`finished`,unit:`件`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},C.value=[],_.value=!0}async function O(e){v.value=e,S.value={...e},await h();try{C.value=((await x(`/api/products/${e.id}/materials`)).items||[]).map(e=>({material_id:e.material_id,quantity:e.quantity}))}catch(e){m(e,`加载BOM`)}_.value=!0}function k(){C.value.push({material_id:s.materials[0]?.id||null,quantity:1})}function A(e){C.value.splice(e,1)}async function j(){if(!S.value.sku){b(`请输入SKU`,`warning`);return}if(!S.value.name){b(`请输入名称`,`warning`);return}try{v.value?(await x(`/api/products/${v.value.id}`,{method:`PUT`,body:JSON.stringify(S.value)}),S.value.item_type===`finished`&&C.value.length>0&&await x(`/api/products/${v.value.id}/materials`,{method:`PUT`,body:JSON.stringify({items:C.value})}),b(`成品更新成功`,`success`)):(await x(`/api/products`,{method:`POST`,body:JSON.stringify(S.value)}),b(`成品创建成功`,`success`)),_.value=!1,v.value=null,S.value={},C.value=[],d(),h()}catch(e){m(e,`保存成品`)}}async function M(e){if(confirm(`确定要删除这个成品吗?`))try{await x(`/api/products/${e}`,{method:`DELETE`}),b(`成品已删除`,`success`),d(),h()}catch(e){m(e,`删除成品`)}}function N(){_.value=!1,v.value=null,S.value={},C.value=[]}return T(()=>{d()}),(r,o)=>{let d=a(`t-button`),m=a(`t-table-column`),h=a(`t-table`),b=a(`t-empty`),x=a(`t-input`),T=a(`t-form-item`),P=a(`t-input-number`),F=a(`t-divider`),I=a(`t-option`),L=a(`t-select`),R=a(`t-form`),z=a(`t-dialog`);return t(),w(`div`,null,[p(`div`,Y,[E(d,{type:`primary`,onClick:D},{default:g(()=>[...o[8]||=[u(`新增成品`,-1)]]),_:1})]),E(h,{data:i(s).finishedProducts,loading:i(s).loading,stripe:``},{default:g(()=>[E(m,{prop:`sku`,label:`SKU`}),E(m,{prop:`name`,label:`名称`}),E(m,{prop:`category`,label:`分类`},{default:g(({row:e})=>[u(n(e.category||`-`),1)]),_:1}),E(m,{prop:`unit`,label:`单位`}),E(m,{label:`成本价`},{default:g(({row:e})=>[u(n(i(c)(e.cost_price)),1)]),_:1}),E(m,{label:`销售价`},{default:g(({row:e})=>[u(n(i(c)(e.sale_price)),1)]),_:1}),E(m,{label:`基础物料成本`},{default:g(({row:e})=>[u(n(i(c)(e.material_cost||0)),1)]),_:1}),E(m,{label:`操作`,width:`180`},{default:g(({row:e})=>[E(d,{type:`primary`,size:`small`,onClick:t=>O(e)},{default:g(()=>[...o[9]||=[u(`编辑`,-1)]]),_:1},8,[`onClick`]),E(d,{type:`danger`,size:`small`,onClick:t=>M(e.id)},{default:g(()=>[...o[10]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).finishedProducts.length===0?(t(),f(b,{key:0,description:`暂无成品数据`})):l(``,!0),E(z,{visible:_.value,"onUpdate:visible":o[7]||=e=>_.value=e,title:(v.value?`编辑`:`新增`)+`成品`,width:`560px`,onClosed:N},{footer:g(()=>[E(d,{onClick:o[6]||=e=>_.value=!1},{default:g(()=>[...o[14]||=[u(`取消`,-1)]]),_:1}),E(d,{type:`primary`,onClick:j},{default:g(()=>[...o[15]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(R,{"label-width":`100px`},{default:g(()=>[E(T,{label:`类型`},{default:g(()=>[E(x,{"model-value":`成品(按单生产,不做库存)`,disabled:``})]),_:1}),E(T,{label:`SKU`,required:``},{default:g(()=>[E(x,{modelValue:S.value.sku,"onUpdate:modelValue":o[0]||=e=>S.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),E(T,{label:`名称`,required:``},{default:g(()=>[E(x,{modelValue:S.value.name,"onUpdate:modelValue":o[1]||=e=>S.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),E(T,{label:`分类`},{default:g(()=>[E(x,{modelValue:S.value.category,"onUpdate:modelValue":o[2]||=e=>S.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),E(T,{label:`单位`},{default:g(()=>[E(x,{modelValue:S.value.unit,"onUpdate:modelValue":o[3]||=e=>S.value.unit=e,placeholder:`件`},null,8,[`modelValue`])]),_:1}),E(T,{label:`成本价`},{default:g(()=>[E(P,{modelValue:S.value.cost_price,"onUpdate:modelValue":o[4]||=e=>S.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(T,{label:`销售价`},{default:g(()=>[E(P,{modelValue:S.value.sale_price,"onUpdate:modelValue":o[5]||=e=>S.value.sale_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(T,{label:`说明`},{default:g(()=>[E(x,{"model-value":`成品不做库存,成本由下方BOM定义物料构成后自动计算`,disabled:``})]),_:1}),v.value?(t(),w(y,{key:0},[E(F,{"content-position":`left`},{default:g(()=>[...o[11]||=[u(`BOM物料配置`,-1)]]),_:1}),p(`div`,X,[E(d,{type:`primary`,size:`small`,onClick:k,style:{"margin-bottom":`8px`}},{default:g(()=>[...o[12]||=[u(`+ 添加物料`,-1)]]),_:1}),E(h,{data:C.value,size:`small`,border:``},{default:g(()=>[E(m,{label:`物料`},{default:g(({row:n})=>[E(L,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`选择物料`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(s).materials,e=>(t(),f(I,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`数量`,width:`120`},{default:g(({row:e})=>[E(P,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`操作`,width:`80`},{default:g(({$index:e})=>[E(d,{type:`danger`,size:`small`,onClick:t=>A(e)},{default:g(()=>[...o[13]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`])])],64)):l(``,!0)]),_:1})]),_:1},8,[`visible`,`title`])])}}}),ee={style:{"margin-bottom":`12px`,display:`flex`,gap:`8px`}},te={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},Q={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ne=s({__name:`MaterialsTab`,setup(o){let{state:s,formatCurrency:c,loadMaterials:d,loadSuppliers:h,loadPurchaseOrders:v}=R(),S=r(!1),C=r(null),D=r({}),O=r(!1),k=r([]),A=r(null);function j(){C.value=null,D.value={item_type:`material`,unit:`kg`,min_stock:0,max_stock:1e3,cost_price:0,sale_price:0,sku:``,name:``,category:``},S.value=!0}async function M(e){C.value=e,D.value={...e},S.value=!0}async function N(){if(!D.value.sku){b(`请输入SKU`,`warning`);return}if(!D.value.name){b(`请输入名称`,`warning`);return}try{C.value?(await x(`/api/products/${C.value.id}`,{method:`PUT`,body:JSON.stringify(D.value)}),b(`物料更新成功`,`success`)):(await x(`/api/products`,{method:`POST`,body:JSON.stringify(D.value)}),b(`物料创建成功`,`success`)),S.value=!1,C.value=null,D.value={},d()}catch(e){m(e,`保存物料`)}}async function P(e){if(confirm(`确定要删除这个物料吗?`))try{await x(`/api/products/${e}`,{method:`DELETE`}),b(`物料已删除`,`success`),d()}catch(e){m(e,`删除物料`)}}async function F(){await d(),await h(),k.value=[],O.value=!0}function I(){k.value.push({material_id:s.materials[0]?.id||null,quantity:1,unit_price:0,remark:``})}function L(e){k.value.splice(e,1)}let z=_(()=>k.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function B(){if(!k.value||k.value.length===0){b(`请至少添加一个补货物料`,`warning`);return}for(let[e,t]of k.value.entries()){let n=e+1;if(!t.material_id){b(`第 ${n} 行:请选择物料`,`warning`);return}if(!Number.isFinite(t.quantity)||t.quantity<=0){b(`第 ${n} 行:数量必须大于 0`,`warning`);return}if(!Number.isFinite(t.unit_price)||t.unit_price<0){b(`第 ${n} 行:单价必须大于等于 0`,`warning`);return}}try{let e={supplier_id:A.value||s.suppliers[0]?.id||null,expected_date:new Date().toISOString().split(`T`)[0],remark:`物料补货`,items:k.value.map(e=>({product_id:e.material_id,quantity:e.quantity,unit_price:e.unit_price,remark:e.remark}))};if(!e.supplier_id){b(`请先添加供应商`,`warning`);return}await x(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),b(`采购订单创建成功`,`success`),O.value=!1,k.value=[],v()}catch(e){m(e,`保存补货订单`)}}function V(){S.value=!1,C.value=null,D.value={}}function H(){O.value=!1,k.value=[]}return T(()=>{d()}),(r,o)=>{let d=a(`t-button`),m=a(`t-table-column`),h=a(`t-table`),_=a(`t-empty`),v=a(`t-input`),b=a(`t-form-item`),x=a(`t-input-number`),T=a(`t-form`),R=a(`t-dialog`),U=a(`t-option`),W=a(`t-select`);return t(),w(`div`,null,[p(`div`,ee,[E(d,{type:`primary`,onClick:j},{default:g(()=>[...o[12]||=[u(`新增物料`,-1)]]),_:1}),E(d,{type:`success`,onClick:F},{default:g(()=>[...o[13]||=[u(`物料补货`,-1)]]),_:1})]),E(h,{data:i(s).materials,loading:i(s).loading,stripe:``},{default:g(()=>[E(m,{prop:`sku`,label:`SKU`}),E(m,{prop:`name`,label:`名称`}),E(m,{prop:`category`,label:`分类`},{default:g(({row:e})=>[u(n(e.category||`-`),1)]),_:1}),E(m,{prop:`unit`,label:`单位`}),E(m,{label:`成本价`},{default:g(({row:e})=>[u(n(i(c)(e.cost_price)),1)]),_:1}),E(m,{prop:`min_stock`,label:`最低库存`},{default:g(({row:e})=>[u(n(e.min_stock??`-`),1)]),_:1}),E(m,{label:`操作`,width:`180`},{default:g(({row:e})=>[E(d,{type:`primary`,size:`small`,onClick:t=>M(e)},{default:g(()=>[...o[14]||=[u(`编辑`,-1)]]),_:1},8,[`onClick`]),E(d,{type:`danger`,size:`small`,onClick:t=>P(e.id)},{default:g(()=>[...o[15]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).materials.length===0?(t(),f(_,{key:0,description:`暂无物料数据`})):l(``,!0),E(R,{visible:S.value,"onUpdate:visible":o[8]||=e=>S.value=e,title:(C.value?`编辑`:`新增`)+`物料`,width:`560px`,onClosed:V},{footer:g(()=>[E(d,{onClick:o[7]||=e=>S.value=!1},{default:g(()=>[...o[16]||=[u(`取消`,-1)]]),_:1}),E(d,{type:`primary`,onClick:N},{default:g(()=>[...o[17]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(T,{"label-width":`100px`},{default:g(()=>[E(b,{label:`类型`},{default:g(()=>[E(v,{"model-value":`物料(纳入库存)`,disabled:``})]),_:1}),E(b,{label:`SKU`,required:``},{default:g(()=>[E(v,{modelValue:D.value.sku,"onUpdate:modelValue":o[0]||=e=>D.value.sku=e,placeholder:`产品编码`},null,8,[`modelValue`])]),_:1}),E(b,{label:`名称`,required:``},{default:g(()=>[E(v,{modelValue:D.value.name,"onUpdate:modelValue":o[1]||=e=>D.value.name=e,placeholder:`产品名称`},null,8,[`modelValue`])]),_:1}),E(b,{label:`分类`},{default:g(()=>[E(v,{modelValue:D.value.category,"onUpdate:modelValue":o[2]||=e=>D.value.category=e,placeholder:`产品分类`},null,8,[`modelValue`])]),_:1}),E(b,{label:`单位`},{default:g(()=>[E(v,{modelValue:D.value.unit,"onUpdate:modelValue":o[3]||=e=>D.value.unit=e,placeholder:`kg`},null,8,[`modelValue`])]),_:1}),E(b,{label:`成本价`},{default:g(()=>[E(x,{modelValue:D.value.cost_price,"onUpdate:modelValue":o[4]||=e=>D.value.cost_price=e,precision:2,min:0,step:.01,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(b,{label:`最低库存`},{default:g(()=>[E(x,{modelValue:D.value.min_stock,"onUpdate:modelValue":o[5]||=e=>D.value.min_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(b,{label:`最高库存`},{default:g(()=>[E(x,{modelValue:D.value.max_stock,"onUpdate:modelValue":o[6]||=e=>D.value.max_stock=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1})]),_:1})]),_:1},8,[`visible`,`title`]),E(R,{visible:O.value,"onUpdate:visible":o[11]||=e=>O.value=e,title:`物料补货`,width:`900px`,onClosed:H},{footer:g(()=>[E(d,{onClick:o[10]||=e=>O.value=!1},{default:g(()=>[...o[21]||=[u(`取消`,-1)]]),_:1}),E(d,{type:`primary`,onClick:B},{default:g(()=>[...o[22]||=[u(`创建采购订单`,-1)]]),_:1})]),default:g(()=>[E(T,{"label-width":`100px`,style:{"margin-bottom":`16px`}},{default:g(()=>[E(b,{label:`供应商`},{default:g(()=>[E(W,{modelValue:A.value,"onUpdate:modelValue":o[9]||=e=>A.value=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(s).suppliers,e=>(t(),f(U,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1})]),_:1}),p(`div`,te,[o[19]||=p(`span`,{style:{"font-weight":`600`}},`补货物料明细`,-1),E(d,{type:`primary`,size:`small`,onClick:I},{default:g(()=>[...o[18]||=[u(`+ 添加物料`,-1)]]),_:1})]),E(h,{data:k.value,border:``,size:`small`},{default:g(()=>[E(m,{label:`物料`,"min-width":`200`},{default:g(({row:n})=>[E(W,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(s).materials,e=>(t(),f(U,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`数量`,width:`120`},{default:g(({row:e})=>[E(x,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`单价`,width:`120`},{default:g(({row:e})=>[E(x,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`总价`,width:`120`},{default:g(({row:e})=>[u(n(i(c)((e.unit_price||0)*(e.quantity||0))),1)]),_:1}),E(m,{label:`备注`,width:`150`},{default:g(({row:e})=>[E(v,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(m,{label:`操作`,width:`80`},{default:g(({$index:e})=>[E(d,{type:`danger`,size:`small`,onClick:t=>L(e)},{default:g(()=>[...o[20]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),p(`div`,Q,` 补货总金额:`+n(i(c)(z.value)),1)]),_:1},8,[`visible`])])}}}),re={class:`inventory-tab`},$={class:`table-header`},ie=v(s({__name:`InventoryTab`,setup(n){let{state:o,loadInventory:s,ensureStockBaseData:c}=R(),l=r(!1),d=r(null),_=h({product_id:null,warehouse_id:null,quantity:0,locked_quantity:0,batch_no:``,location:``});function v(){c(),d.value=null,_.product_id=null,_.warehouse_id=null,_.quantity=0,_.locked_quantity=0,_.batch_no=``,_.location=``,l.value=!0}function S(e){c(),d.value=e,_.product_id=e.product_id??null,_.warehouse_id=e.warehouse_id??null,_.quantity=e.quantity??0,_.locked_quantity=e.locked_quantity??0,_.batch_no=e.batch_no??``,_.location=e.location??``,l.value=!0}async function C(){try{let e={product_id:_.product_id,warehouse_id:_.warehouse_id,quantity:_.quantity,locked_quantity:_.locked_quantity,batch_no:_.batch_no||null,location:_.location||null};d.value?(await x(`/api/inventory/${d.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),b(`物料库存更新成功`,`success`)):(await x(`/api/inventory`,{method:`POST`,body:JSON.stringify(e)}),b(`物料库存已创建`,`success`)),l.value=!1,s()}catch(e){m(e,`保存物料库存`)}}async function D(e){if(confirm(`确定要删除这个物料库存记录吗?`))try{await x(`/api/inventory/${e}`,{method:`DELETE`}),b(`物料库存已删除`,`success`),s()}catch(e){m(e,`删除物料库存`)}}return T(()=>{s()}),(n,r)=>{let s=a(`t-button`),c=a(`t-table-column`),m=a(`t-table`),h=a(`t-option`),b=a(`t-select`),x=a(`t-form-item`),T=a(`t-input-number`),O=a(`t-input`),k=a(`t-form`),A=a(`t-dialog`);return t(),w(`div`,re,[p(`div`,$,[E(s,{type:`primary`,onClick:v},{default:g(()=>[...r[8]||=[u(`+ 新增物料库存`,-1)]]),_:1})]),E(m,{data:i(o).inventory,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无库存数据`},{default:g(()=>[E(c,{prop:`product_sku`,label:`SKU`}),E(c,{prop:`product_name`,label:`物料`}),E(c,{prop:`warehouse_name`,label:`仓库`}),E(c,{prop:`quantity`,label:`数量`}),E(c,{prop:`available_quantity`,label:`可用`}),E(c,{label:`操作`,width:`180`},{default:g(({row:e})=>[E(s,{size:`small`,onClick:t=>S(e)},{default:g(()=>[...r[9]||=[u(`编辑`,-1)]]),_:1},8,[`onClick`]),E(s,{size:`small`,type:`danger`,onClick:t=>D(e.id)},{default:g(()=>[...r[10]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),E(A,{modelValue:l.value,"onUpdate:modelValue":r[7]||=e=>l.value=e,title:d.value?`编辑物料库存`:`新增物料库存`,width:`520px`,"close-on-click-modal":!1},{footer:g(()=>[E(s,{onClick:r[6]||=e=>l.value=!1},{default:g(()=>[...r[11]||=[u(`取消`,-1)]]),_:1}),E(s,{type:`primary`,onClick:C},{default:g(()=>[...r[12]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(k,{model:_,"label-width":`80px`},{default:g(()=>[E(x,{label:`物料`,required:``},{default:g(()=>[E(b,{modelValue:_.product_id,"onUpdate:modelValue":r[0]||=e=>_.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(o).materials,e=>(t(),f(h,{key:e.id,label:e.name+(e.sku?` (`+e.sku+`)`:``),value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),E(x,{label:`仓库`,required:``},{default:g(()=>[E(b,{modelValue:_.warehouse_id,"onUpdate:modelValue":r[1]||=e=>_.warehouse_id=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(o).warehouses,e=>(t(),f(h,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),E(x,{label:`数量`,required:``},{default:g(()=>[E(T,{modelValue:_.quantity,"onUpdate:modelValue":r[2]||=e=>_.quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(x,{label:`锁定数量`},{default:g(()=>[E(T,{modelValue:_.locked_quantity,"onUpdate:modelValue":r[3]||=e=>_.locked_quantity=e,min:0,style:{width:`100%`}},null,8,[`modelValue`])]),_:1}),E(x,{label:`批次号`},{default:g(()=>[E(O,{modelValue:_.batch_no,"onUpdate:modelValue":r[4]||=e=>_.batch_no=e,placeholder:`请输入批次号`},null,8,[`modelValue`])]),_:1}),E(x,{label:`库位`},{default:g(()=>[E(O,{modelValue:_.location,"onUpdate:modelValue":r[5]||=e=>_.location=e,placeholder:`请输入库位`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-b02ca093`]]),ae={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},oe={style:{display:`flex`,gap:`4px`}},se={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},ce={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},le=s({__name:`PurchaseOrdersTab`,setup(o){function s(e,t,n,r,i){return new Promise(a=>{let o=S.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:c,formatCurrency:d,formatDateTime:h,formatDate:v,getPurchaseOrderStatusLabel:C,getReceiptStatusLabel:D,getPaymentStatusLabel:O,isPurchaseOrderLocked:k,loadPurchaseOrders:A,loadSuppliers:j,loadMaterials:M,loadInventory:N,loadMovements:P}=R(),F=r(!1),I=r(null),L=r({}),z=r([]),B=r(null),V=r(!1),H=r(null),U=r([]),W=r(null),G=r(``);function K(){I.value=null,L.value={supplier_id:null,expected_date:``,remark:``},z.value=[],F.value=!0}function q(){z.value.push({product_id:c.materials[0]?.id||null,quantity:1,remark:``})}function J(e){z.value.splice(e,1)}let Y=_(()=>z.value.reduce((e,t)=>e+(c.materials.find(e=>e.id===t.product_id)?.cost_price||0)*(t.quantity||0),0));async function X(e){await M(),await j(),I.value=e,L.value={supplier_id:e.supplier_id||null,expected_date:e.expected_date||``,remark:e.remark||``};try{z.value=((await x(`/api/purchase-orders/${e.id}`)).items||[]).map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark||``}))}catch(e){m(e,`加载采购订单详情`)}F.value=!0}async function Z(){if(!L.value.supplier_id){b(`请选择供应商`,`warning`);return}if(!z.value||z.value.length===0){b(`请至少添加一个物料`,`warning`);return}for(let[e,t]of z.value.entries()){if(!t.product_id){b(`第 ${e+1} 行:请选择物料`,`warning`);return}if(!t.quantity||t.quantity<=0){b(`第 ${e+1} 行:数量必须大于 0`,`warning`);return}}try{let e={supplier_id:L.value.supplier_id,expected_date:L.value.expected_date||null,remark:L.value.remark||``,items:z.value.map(e=>({product_id:e.product_id,quantity:e.quantity,remark:e.remark}))};I.value?(await x(`/api/purchase-orders/${I.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),b(`采购订单更新成功`,`success`)):(await x(`/api/purchase-orders`,{method:`POST`,body:JSON.stringify(e)}),b(`采购订单创建成功`,`success`)),F.value=!1,I.value=null,L.value={},z.value=[],A()}catch(e){m(e,`保存采购订单`)}}async function ee(e){if(await s(`删除确认`,`确定要删除这个采购订单吗?`,`warning`,`删除`,`取消`))try{await x(`/api/purchase-orders/${e}`,{method:`DELETE`}),b(`采购订单已删除`,`success`),A()}catch(e){m(e,`删除采购订单`)}}async function te(e){try{let t=await x(`/api/purchase-orders/${e.id}`);H.value=e,U.value=(t.items||[]).map(e=>({id:e.id,material_label:e.product_name||e.product_sku||``,quantity:e.quantity||0,received_quantity:e.received_quantity||0,remaining:(e.quantity||0)-(e.received_quantity||0),receive_quantity:0})),W.value=B.value||c.warehouses[0]?.id||null,G.value=``,V.value=!0}catch(e){m(e,`加载采购订单详情`)}}async function Q(){if(!W.value){b(`请选择入库仓库`,`warning`);return}let e=U.value.filter(e=>e.receive_quantity>0).map(e=>({item_id:e.id,receive_quantity:e.receive_quantity}));if(e.length===0){b(`请输入本次入库数量`,`warning`);return}try{await x(`/api/purchase-orders/${H.value.id}/receive`,{method:`POST`,body:JSON.stringify({warehouse_id:W.value,remark:G.value,items:e})}),b(`入库完成`,`success`),V.value=!1,H.value=null,U.value=[],A(),N(),P()}catch(e){m(e,`采购入库`)}}async function ne(e,t){if(t!==`received`){if(!await s(`非标准流程提醒`,`该订单尚未全部收货,确定要提前付款吗?建议先完成收货后再付款。`,`warning`,`仍要付款`,`取消`))return}else if(!await s(`付款确认`,`确认已向供应商支付该订单款项?`,`success`,`确认付款`,`取消`))return;await $(e,`paid`,`已付款`)}async function re(e){await s(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await $(e,`cancelled`,`已作废`)}async function $(e,t,n){try{await x(`/api/purchase-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),b(`订单已${n}`,`success`),A(),P(),N()}catch(e){m(e,`更新状态`)}}function ie(){F.value=!1,I.value=null,L.value={},z.value=[]}function le(){V.value=!1,H.value=null,U.value=[]}async function ue(){await M(),await j(),await A()}return T(()=>{ue()}),(r,o)=>{let s=a(`t-option`),m=a(`t-select`),_=a(`t-button`),b=a(`t-table-column`),x=a(`t-tag`),S=a(`t-table`),C=a(`t-empty`),T=a(`t-form-item`),j=a(`t-date-picker`),M=a(`t-input`),N=a(`t-form`),P=a(`t-input-number`),R=a(`t-dialog`);return t(),w(`div`,null,[p(`div`,ae,[E(m,{modelValue:B.value,"onUpdate:modelValue":o[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:g(()=>[(t(!0),w(y,null,e(i(c).warehouses,e=>(t(),f(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),E(_,{onClick:i(A)},{default:g(()=>[...o[10]||=[u(`刷新`,-1)]]),_:1},8,[`onClick`]),E(_,{type:`primary`,onClick:K},{default:g(()=>[...o[11]||=[u(`新增采购订单`,-1)]]),_:1})]),E(S,{data:i(c).purchaseOrders,loading:i(c).loading,stripe:``},{default:g(()=>[E(b,{prop:`order_no`,label:`采购单`}),E(b,{prop:`supplier_name`,label:`供应商`}),E(b,{label:`状态`},{default:g(({row:e})=>[p(`div`,oe,[E(x,{type:e.receipt_status===`received`?`success`:e.receipt_status===`partial_received`?`warning`:e.receipt_status===`cancelled`?`danger`:`info`,size:`small`},{default:g(()=>[u(n(i(D)(e.receipt_status)),1)]),_:2},1032,[`type`]),E(x,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:g(()=>[u(n(i(O)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),E(b,{label:`订单创建`},{default:g(({row:e})=>[u(n(i(h)(e.created_at)),1)]),_:1}),E(b,{label:`预计到货`},{default:g(({row:e})=>[u(n(i(v)(e.expected_date)),1)]),_:1}),E(b,{label:`实际到货`},{default:g(({row:e})=>[u(n(e.received_at?i(h)(e.received_at):`-`),1)]),_:1}),E(b,{label:`实际付款`},{default:g(({row:e})=>[u(n(e.paid_at?i(h)(e.paid_at):`-`),1)]),_:1}),E(b,{label:`总金额`},{default:g(({row:e})=>[u(n(i(d)(e.total_amount)),1)]),_:1}),E(b,{label:`已付款`},{default:g(({row:e})=>[u(n(i(d)(e.paid_amount||0)),1)]),_:1}),E(b,{label:`操作`,width:`280`},{default:g(({row:e})=>[E(_,{type:`primary`,size:`small`,disabled:i(k)(e.status),onClick:t=>X(e)},{default:g(()=>[...o[12]||=[u(` 编辑 `,-1)]]),_:1},8,[`disabled`,`onClick`]),E(_,{type:`danger`,size:`small`,disabled:i(k)(e.status),onClick:t=>ee(e.id)},{default:g(()=>[...o[13]||=[u(` 删除 `,-1)]]),_:1},8,[`disabled`,`onClick`]),e.receipt_status===`pending`||e.receipt_status===`partial_received`?(t(),f(_,{key:0,type:`success`,size:`small`,onClick:t=>te(e)},{default:g(()=>[...o[14]||=[u(` 到货入库 `,-1)]]),_:1},8,[`onClick`])):l(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),f(_,{key:1,type:`warning`,size:`small`,onClick:t=>ne(e.id,e.receipt_status)},{default:g(()=>[...o[15]||=[u(` 标记已付款 `,-1)]]),_:1},8,[`onClick`])):l(``,!0),e.payment_status!==`paid`&&e.receipt_status!==`cancelled`?(t(),f(_,{key:2,type:`info`,size:`small`,onClick:t=>re(e.id)},{default:g(()=>[...o[16]||=[u(` 作废 `,-1)]]),_:1},8,[`onClick`])):l(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!i(c).loading&&i(c).purchaseOrders.length===0?(t(),f(C,{key:0,description:`暂无采购订单`})):l(``,!0),E(R,{visible:F.value,"onUpdate:visible":o[5]||=e=>F.value=e,title:(I.value?`编辑`:`新增`)+`采购订单`,width:`800px`,onClosed:ie},{footer:g(()=>[E(_,{onClick:o[4]||=e=>F.value=!1},{default:g(()=>[...o[20]||=[u(`取消`,-1)]]),_:1}),E(_,{type:`primary`,onClick:Z},{default:g(()=>[...o[21]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(N,{"label-width":`100px`},{default:g(()=>[E(T,{label:`供应商`,required:``},{default:g(()=>[E(m,{modelValue:L.value.supplier_id,"onUpdate:modelValue":o[1]||=e=>L.value.supplier_id=e,placeholder:`请选择供应商`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).suppliers,e=>(t(),f(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),E(T,{label:`预计到货`},{default:g(()=>[E(j,{modelValue:L.value.expected_date,"onUpdate:modelValue":o[2]||=e=>L.value.expected_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),E(T,{label:`备注`},{default:g(()=>[E(M,{modelValue:L.value.remark,"onUpdate:modelValue":o[3]||=e=>L.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),p(`div`,se,[o[18]||=p(`span`,{style:{"font-weight":`600`}},`物料明细`,-1),E(_,{type:`primary`,size:`small`,onClick:q},{default:g(()=>[...o[17]||=[u(`+ 添加物料`,-1)]]),_:1})]),E(S,{data:z.value,border:``,size:`small`},{default:g(()=>[E(b,{label:`物料`,"min-width":`200`},{default:g(({row:n})=>[E(m,{modelValue:n.product_id,"onUpdate:modelValue":e=>n.product_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).materials,e=>(t(),f(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`数量`,width:`120`},{default:g(({row:e})=>[E(P,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`单价`,width:`120`},{default:g(({row:e})=>[E(P,{"model-value":i(c).materials.find(t=>t.id===e.product_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),E(b,{label:`总价`,width:`120`},{default:g(({row:e})=>[u(n(i(d)((i(c).materials.find(t=>t.id===e.product_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),E(b,{label:`备注`,width:`150`},{default:g(({row:e})=>[E(M,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`操作`,width:`80`},{default:g(({$index:e})=>[E(_,{type:`danger`,size:`small`,onClick:t=>J(e)},{default:g(()=>[...o[19]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),p(`div`,ce,` 订单总金额:`+n(i(d)(Y.value)),1)]),_:1},8,[`visible`,`title`]),E(R,{visible:V.value,"onUpdate:visible":o[9]||=e=>V.value=e,title:`采购到货入库`,width:`700px`,onClosed:le},{footer:g(()=>[E(_,{onClick:o[8]||=e=>V.value=!1},{default:g(()=>[...o[22]||=[u(`取消`,-1)]]),_:1}),E(_,{type:`primary`,onClick:Q},{default:g(()=>[...o[23]||=[u(`确认入库`,-1)]]),_:1})]),default:g(()=>[E(N,{"label-width":`100px`},{default:g(()=>[E(T,{label:`入库仓库`,required:``},{default:g(()=>[E(m,{modelValue:W.value,"onUpdate:modelValue":o[6]||=e=>W.value=e,placeholder:`请选择仓库`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).warehouses,e=>(t(),f(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),E(T,{label:`备注`},{default:g(()=>[E(M,{modelValue:G.value,"onUpdate:modelValue":o[7]||=e=>G.value=e,placeholder:`入库备注`},null,8,[`modelValue`])]),_:1})]),_:1}),E(S,{data:U.value,border:``,size:`small`},{default:g(()=>[E(b,{prop:`material_label`,label:`物料`}),E(b,{prop:`id`,label:`明细ID`,width:`80`}),E(b,{label:`剩余待入库`,width:`100`},{default:g(({row:e})=>[u(n(e.remaining),1)]),_:1}),E(b,{label:`本次入库`,width:`140`},{default:g(({row:e})=>[E(P,{modelValue:e.receive_quantity,"onUpdate:modelValue":t=>e.receive_quantity=t,min:0,max:e.remaining,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`,`max`])]),_:1})]),_:1},8,[`data`])]),_:1},8,[`visible`])])}}}),ue={style:{"margin-bottom":`12px`,display:`flex`,gap:`12px`,"align-items":`center`}},de={style:{display:`flex`,gap:`4px`}},fe={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},pe={style:{display:`flex`,gap:`8px`}},me={key:1,style:{"padding-left":`8px`}},he={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ge={style:{display:`flex`,"justify-content":`space-between`,"align-items":`center`,"margin-bottom":`12px`}},_e={style:{"text-align":`right`,"margin-top":`8px`,"font-weight":`600`}},ve=s({__name:`SalesOrdersTab`,setup(o){function s(e,t,n,r,i){return new Promise(a=>{let o=S.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let{state:c,formatCurrency:d,formatDateTime:h,formatDate:v,getSalesOrderStatusLabel:C,getDeliveryStatusLabel:D,getPaymentStatusLabel:O,loadProductionOrders:k,loadFinishedProducts:A,loadCustomers:j,loadMaterials:M,loadInventory:N,loadMovements:P}=R(),F=r(!1),I=r(null),L=r({}),z=r([]),B=r(null),V=r(!1),H=r([]),U=r([]);function W(){I.value=null,L.value={customer_id:null,delivery_date:``,remark:``},z.value=[],U.value=[],F.value=!0}function G(){z.value.push({mold_mode:`new`,mold_sku:``,mold_name:``,mold_id:null,quantity:1,unit_price:0,remark:``})}function K(e){z.value.splice(e,1)}let q=_(()=>z.value.reduce((e,t)=>e+(t.unit_price||0)*(t.quantity||0),0));async function J(e){await j(),await A(),await M();try{let t=await x(`/api/sales-orders/${e.id}`);I.value=e,L.value={customer_id:t.customer_id||e.customer_id||null,delivery_date:t.delivery_date||e.delivery_date||``,remark:t.remark||e.remark||``},z.value=(t.items||[]).map(e=>({mold_mode:e.mold_id?`existing`:`new`,mold_sku:e.sku||``,mold_name:e.name||``,mold_id:e.mold_id||null,quantity:e.quantity||1,unit_price:e.unit_price||0,remark:e.remark||``}));try{U.value=((await x(`/api/sales-orders/${e.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{U.value=[]}}catch(e){m(e,`加载销售订单详情`)}F.value=!0}async function Y(){if(!L.value.customer_id){b(`请选择客户`,`warning`);return}if(!z.value||z.value.length===0){b(`请至少添加一个模具`,`warning`);return}try{let e={customer_id:L.value.customer_id,delivery_date:L.value.delivery_date||null,remark:L.value.remark||``,items:z.value.map(e=>({mold_mode:e.mold_mode,mold_sku:e.mold_sku||``,mold_name:e.mold_name||``,mold_id:e.mold_id||null,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))};I.value?(await x(`/api/sales-orders/${I.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),b(`销售订单更新成功`,`success`)):(await x(`/api/sales-orders`,{method:`POST`,body:JSON.stringify(e)}),b(`销售订单创建成功`,`success`)),F.value=!1,I.value=null,L.value={},z.value=[],U.value=[],k(),A(),N(),P()}catch(e){m(e,`保存销售订单`)}}async function X(e){if(await s(`删除确认`,`确定要删除这个销售订单吗?`,`warning`,`删除`,`取消`))try{await x(`/api/sales-orders/${e}`,{method:`DELETE`}),b(`销售订单已删除`,`success`),k(),N(),P()}catch(e){m(e,`删除销售订单`)}}async function Z(e){await s(`交付确认`,`确认该订单已交付?`,`success`,`确认交付`,`取消`)&&await Q(e,`delivered`,`已交付`)}async function ee(e,t){if(t!==`delivered`){if(!await s(`非标准流程提醒`,`当前订单尚未交付,确定要提前收款吗?建议先确认交付后再收款。`,`warning`,`仍要收款`,`取消`))return}else if(!await s(`收款确认`,`确认已收到该订单款项?`,`success`,`确认收款`,`取消`))return;await Q(e,`paid`,`已收款`)}async function te(e){await s(`作废确认`,`确定要作废该订单吗?此操作不可撤销。`,`error`,`确认作废`,`取消`)&&await Q(e,`cancelled`,`已作废`)}async function Q(e,t,n){try{await x(`/api/sales-orders/${e}/status`,{method:`PATCH`,body:JSON.stringify({status:t})}),b(`订单已${n}`,`success`),k(),P()}catch(e){m(e,`更新状态`)}}function ne(){H.value=[],V.value=!0}function re(){H.value.push({material_id:c.materials[0]?.id||null,quantity:1,remark:``})}function $(e){H.value.splice(e,1)}let ie=_(()=>H.value.reduce((e,t)=>e+(c.materials.find(e=>e.id===t.material_id)?.cost_price||0)*(t.quantity||0),0));async function ae(){if(I.value){if(!H.value||H.value.length===0){b(`请至少添加一个消耗物料`,`warning`);return}try{let e={items:H.value.map(e=>({material_id:e.material_id,quantity:e.quantity,unit_price:c.materials.find(t=>t.id===e.material_id)?.cost_price||0,remark:e.remark||``}))};await x(`/api/sales-orders/${I.value.id}/consume-materials`,{method:`POST`,body:JSON.stringify(e)}),b(`物料消耗记录保存成功`,`success`),V.value=!1;try{U.value=((await x(`/api/sales-orders/${I.value.id}/consume-materials`)).items||[]).map(e=>({material_id:e.material_id,material_name:e.material_name||e.material_sku||``,quantity:e.quantity,unit_price:e.unit_price||0,remark:e.remark||``}))}catch{U.value=[]}N(),P()}catch(e){m(e,`保存物料消耗`)}}}function oe(){F.value=!1,I.value=null,L.value={},z.value=[],U.value=[]}function se(){V.value=!1,H.value=[]}async function ce(){await j(),await M(),await A(),await k()}return T(()=>{ce()}),(r,o)=>{let s=a(`t-option`),m=a(`t-select`),_=a(`t-button`),b=a(`t-table-column`),x=a(`t-tag`),S=a(`t-table`),C=a(`t-empty`),T=a(`t-form-item`),A=a(`t-date-picker`),j=a(`t-input`),M=a(`t-form`),N=a(`t-input-number`),P=a(`t-divider`),R=a(`t-dialog`);return t(),w(`div`,null,[p(`div`,ue,[E(m,{modelValue:B.value,"onUpdate:modelValue":o[0]||=e=>B.value=e,placeholder:`选择仓库`,style:{width:`200px`},clearable:``},{default:g(()=>[(t(!0),w(y,null,e(i(c).warehouses,e=>(t(),f(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`]),E(_,{onClick:i(k)},{default:g(()=>[...o[8]||=[u(`刷新`,-1)]]),_:1},8,[`onClick`]),E(_,{type:`primary`,onClick:W},{default:g(()=>[...o[9]||=[u(`新增销售订单`,-1)]]),_:1})]),E(S,{data:i(c).productionOrders,loading:i(c).loading,stripe:``},{default:g(()=>[E(b,{prop:`order_no`,label:`销售单`}),E(b,{prop:`customer_name`,label:`客户`}),E(b,{label:`订单金额`},{default:g(({row:e})=>[u(n(i(d)(e.total_amount)),1)]),_:1}),E(b,{label:`交付日期`},{default:g(({row:e})=>[u(n(i(v)(e.delivery_date)),1)]),_:1}),E(b,{label:`订单创建`},{default:g(({row:e})=>[u(n(i(h)(e.created_at)),1)]),_:1}),E(b,{label:`实际交付`},{default:g(({row:e})=>[u(n(e.delivered_at?i(h)(e.delivered_at):`-`),1)]),_:1}),E(b,{label:`实际收款`},{default:g(({row:e})=>[u(n(e.paid_at?i(h)(e.paid_at):`-`),1)]),_:1}),E(b,{label:`订单状态`,width:`160`},{default:g(({row:e})=>[p(`div`,de,[E(x,{type:e.delivery_status===`delivered`?`warning`:e.delivery_status===`cancelled`?`danger`:`info`,size:`small`},{default:g(()=>[u(n(i(D)(e.delivery_status)),1)]),_:2},1032,[`type`]),E(x,{type:e.payment_status===`paid`?`success`:`info`,size:`small`},{default:g(()=>[u(n(i(O)(e.payment_status)),1)]),_:2},1032,[`type`])])]),_:1}),E(b,{label:`操作`,width:`280`},{default:g(({row:e})=>[e.delivery_status===`manufacturing`?(t(),f(_,{key:0,type:`success`,size:`small`,onClick:t=>Z(e.id)},{default:g(()=>[...o[10]||=[u(`已交付`,-1)]]),_:1},8,[`onClick`])):l(``,!0),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),f(_,{key:1,type:`warning`,size:`small`,onClick:t=>ee(e.id,e.delivery_status)},{default:g(()=>[...o[11]||=[u(`已收款`,-1)]]),_:1},8,[`onClick`])):l(``,!0),E(_,{type:`primary`,size:`small`,disabled:e.payment_status===`paid`||e.delivery_status===`cancelled`,onClick:t=>J(e)},{default:g(()=>[...o[12]||=[u(`编辑`,-1)]]),_:1},8,[`disabled`,`onClick`]),E(_,{type:`danger`,size:`small`,onClick:t=>X(e.id)},{default:g(()=>[...o[13]||=[u(`删除`,-1)]]),_:1},8,[`onClick`]),e.payment_status!==`paid`&&e.delivery_status!==`cancelled`?(t(),f(_,{key:2,type:`info`,size:`small`,onClick:t=>te(e.id)},{default:g(()=>[...o[14]||=[u(`作废`,-1)]]),_:1},8,[`onClick`])):l(``,!0)]),_:1})]),_:1},8,[`data`,`loading`]),!i(c).loading&&i(c).productionOrders.length===0?(t(),f(C,{key:0,description:`暂无销售订单`})):l(``,!0),E(R,{visible:F.value,"onUpdate:visible":o[5]||=e=>F.value=e,title:(I.value?`编辑`:`新增`)+`销售订单`,width:`900px`,onClosed:oe},{footer:g(()=>[E(_,{onClick:o[4]||=e=>F.value=!1},{default:g(()=>[...o[20]||=[u(`取消`,-1)]]),_:1}),E(_,{type:`primary`,onClick:Y},{default:g(()=>[...o[21]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(M,{"label-width":`100px`},{default:g(()=>[E(T,{label:`客户`,required:``},{default:g(()=>[E(m,{modelValue:L.value.customer_id,"onUpdate:modelValue":o[1]||=e=>L.value.customer_id=e,placeholder:`请选择客户`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).customers,e=>(t(),f(s,{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1}),E(T,{label:`交付日期`},{default:g(()=>[E(A,{modelValue:L.value.delivery_date,"onUpdate:modelValue":o[2]||=e=>L.value.delivery_date=e,type:`date`,placeholder:`选择日期`,style:{width:`100%`},"value-format":`YYYY-MM-DD`},null,8,[`modelValue`])]),_:1}),E(T,{label:`备注`},{default:g(()=>[E(j,{modelValue:L.value.remark,"onUpdate:modelValue":o[3]||=e=>L.value.remark=e,placeholder:`备注信息`},null,8,[`modelValue`])]),_:1})]),_:1}),p(`div`,fe,[o[17]||=p(`span`,{style:{"font-weight":`600`}},`模具明细`,-1),p(`div`,pe,[I.value?(t(),f(_,{key:0,type:`warning`,size:`small`,onClick:ne},{default:g(()=>[...o[15]||=[u(`+ 消耗物料`,-1)]]),_:1})):l(``,!0),E(_,{type:`primary`,size:`small`,onClick:G},{default:g(()=>[...o[16]||=[u(`+ 添加模具`,-1)]]),_:1})])]),E(S,{data:z.value,border:``,size:`small`},{default:g(()=>[E(b,{label:`模式`,width:`80`},{default:g(({row:e})=>[E(m,{modelValue:e.mold_mode,"onUpdate:modelValue":t=>e.mold_mode=t,size:`small`,style:{width:`100%`}},{default:g(()=>[E(s,{label:`新模`,value:`new`}),E(s,{label:`改模`,value:`existing`})]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`模具SKU`,"min-width":`120`},{default:g(({row:n})=>[n.mold_mode===`new`?(t(),f(j,{key:0,modelValue:n.mold_sku,"onUpdate:modelValue":e=>n.mold_sku=e,size:`small`,placeholder:`模具SKU`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),f(m,{key:1,modelValue:n.mold_id,"onUpdate:modelValue":e=>n.mold_id=e,placeholder:`选择模具`,size:`small`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).finishedProducts,e=>(t(),f(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`]))]),_:1}),E(b,{label:`模具名称`,"min-width":`120`},{default:g(({row:e})=>[e.mold_mode===`new`?(t(),f(j,{key:0,modelValue:e.mold_name,"onUpdate:modelValue":t=>e.mold_name=t,size:`small`,placeholder:`模具名称`},null,8,[`modelValue`,`onUpdate:modelValue`])):(t(),w(`span`,me,n(i(c).finishedProducts.find(t=>t.id===e.mold_id)?.name||`-`),1))]),_:1}),E(b,{label:`数量`,width:`100`},{default:g(({row:e})=>[E(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`单价`,width:`120`},{default:g(({row:e})=>[E(N,{modelValue:e.unit_price,"onUpdate:modelValue":t=>e.unit_price=t,min:0,precision:2,step:.01,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`备注`,width:`120`},{default:g(({row:e})=>[E(j,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`操作`,width:`80`},{default:g(({$index:e})=>[E(_,{type:`danger`,size:`small`,onClick:t=>K(e)},{default:g(()=>[...o[18]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),p(`div`,he,` 订单总金额:`+n(i(d)(q.value)),1),I.value&&U.value.length>0?(t(),w(y,{key:0},[E(P,{"content-position":`left`},{default:g(()=>[...o[19]||=[u(`已消耗物料`,-1)]]),_:1}),E(S,{data:U.value,border:``,size:`small`},{default:g(()=>[E(b,{label:`物料`},{default:g(({row:e})=>[u(n(e.material_name),1)]),_:1}),E(b,{label:`数量`},{default:g(({row:e})=>[u(n(e.quantity),1)]),_:1}),E(b,{label:`单价`},{default:g(({row:e})=>[u(n(i(d)(e.unit_price)),1)]),_:1}),E(b,{label:`备注`},{default:g(({row:e})=>[u(n(e.remark||`-`),1)]),_:1})]),_:1},8,[`data`])],64)):l(``,!0)]),_:1},8,[`visible`,`title`]),E(R,{visible:V.value,"onUpdate:visible":o[7]||=e=>V.value=e,title:`物料消耗`,width:`800px`,onClosed:se},{footer:g(()=>[E(_,{onClick:o[6]||=e=>V.value=!1},{default:g(()=>[...o[25]||=[u(`取消`,-1)]]),_:1}),E(_,{type:`primary`,onClick:ae},{default:g(()=>[...o[26]||=[u(`保存消耗`,-1)]]),_:1})]),default:g(()=>[p(`div`,ge,[o[23]||=p(`span`,{style:{"font-weight":`600`}},`消耗物料明细`,-1),E(_,{type:`primary`,size:`small`,onClick:re},{default:g(()=>[...o[22]||=[u(`+ 添加物料`,-1)]]),_:1})]),E(S,{data:H.value,border:``,size:`small`},{default:g(()=>[E(b,{label:`物料`,"min-width":`200`},{default:g(({row:n})=>[E(m,{modelValue:n.material_id,"onUpdate:modelValue":e=>n.material_id=e,placeholder:`请选择物料`,style:{width:`100%`}},{default:g(()=>[(t(!0),w(y,null,e(i(c).materials,e=>(t(),f(s,{key:e.id,label:`${e.sku} - ${e.name}`,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`数量`,width:`120`},{default:g(({row:e})=>[E(N,{modelValue:e.quantity,"onUpdate:modelValue":t=>e.quantity=t,min:1e-4,step:1e-4,size:`small`,style:{width:`100%`}},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`单价`,width:`120`},{default:g(({row:e})=>[E(N,{"model-value":i(c).materials.find(t=>t.id===e.material_id)?.cost_price||0,disabled:``,size:`small`,style:{width:`100%`}},null,8,[`model-value`])]),_:1}),E(b,{label:`总价`,width:`120`},{default:g(({row:e})=>[u(n(i(d)((i(c).materials.find(t=>t.id===e.material_id)?.cost_price||0)*(e.quantity||0))),1)]),_:1}),E(b,{label:`备注`,width:`150`},{default:g(({row:e})=>[E(j,{modelValue:e.remark,"onUpdate:modelValue":t=>e.remark=t,size:`small`,placeholder:`备注`},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:1}),E(b,{label:`操作`,width:`80`},{default:g(({$index:e})=>[E(_,{type:`danger`,size:`small`,onClick:t=>$(e)},{default:g(()=>[...o[24]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`]),p(`div`,_e,` 消耗总金额:`+n(i(d)(ie.value)),1)]),_:1},8,[`visible`])])}}}),ye={class:`suppliers-tab`},be={class:`table-header`},xe=v(s({__name:`SuppliersTab`,setup(e){let{state:o,loadSuppliers:s}=R(),c=r(!1),l=r(null),d=h({name:``,contact_person:``,phone:``,email:``,address:``});function f(){l.value=null,d.name=``,d.contact_person=``,d.phone=``,d.email=``,d.address=``,c.value=!0}function _(e){l.value=e,d.name=e.name??``,d.contact_person=e.contact_person??``,d.phone=e.phone??``,d.email=e.email??``,d.address=e.address??``,c.value=!0}async function v(){try{let e={name:d.name,contact_person:d.contact_person||null,phone:d.phone||null,email:d.email||null,address:d.address||null};l.value?(await x(`/api/suppliers/${l.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),b(`供应商更新成功`,`success`)):(await x(`/api/suppliers`,{method:`POST`,body:JSON.stringify(e)}),b(`供应商已创建`,`success`)),c.value=!1,s()}catch(e){m(e,`保存供应商`)}}async function y(e){if(confirm(`确定要删除这个供应商吗?`))try{await x(`/api/suppliers/${e}`,{method:`DELETE`}),b(`供应商已删除`,`success`),s()}catch(e){m(e,`删除供应商`)}}return T(()=>{s()}),(e,r)=>{let s=a(`t-button`),m=a(`t-table-column`),h=a(`t-table`),b=a(`t-input`),x=a(`t-form-item`),S=a(`t-form`),C=a(`t-dialog`);return t(),w(`div`,ye,[p(`div`,be,[E(s,{type:`primary`,onClick:f},{default:g(()=>[...r[7]||=[u(`+ 新增供应商`,-1)]]),_:1})]),E(h,{data:i(o).suppliers,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无供应商数据`},{default:g(()=>[E(m,{prop:`code`,label:`编码`}),E(m,{prop:`name`,label:`名称`}),E(m,{prop:`contact_person`,label:`联系人`},{default:g(({row:e})=>[u(n(e.contact_person||`-`),1)]),_:1}),E(m,{prop:`phone`,label:`电话`},{default:g(({row:e})=>[u(n(e.phone||`-`),1)]),_:1}),E(m,{prop:`email`,label:`邮箱`},{default:g(({row:e})=>[u(n(e.email||`-`),1)]),_:1}),E(m,{label:`操作`,width:`180`},{default:g(({row:e})=>[E(s,{size:`small`,onClick:t=>_(e)},{default:g(()=>[...r[8]||=[u(`编辑`,-1)]]),_:1},8,[`onClick`]),E(s,{size:`small`,type:`danger`,onClick:t=>y(e.id)},{default:g(()=>[...r[9]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),E(C,{modelValue:c.value,"onUpdate:modelValue":r[6]||=e=>c.value=e,title:l.value?`编辑供应商`:`新增供应商`,width:`520px`,"close-on-click-modal":!1},{footer:g(()=>[E(s,{onClick:r[5]||=e=>c.value=!1},{default:g(()=>[...r[10]||=[u(`取消`,-1)]]),_:1}),E(s,{type:`primary`,onClick:v},{default:g(()=>[...r[11]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(S,{model:d,"label-width":`80px`},{default:g(()=>[E(x,{label:`名称`,required:``},{default:g(()=>[E(b,{modelValue:d.name,"onUpdate:modelValue":r[0]||=e=>d.name=e,placeholder:`请输入供应商名称`},null,8,[`modelValue`])]),_:1}),E(x,{label:`联系人`},{default:g(()=>[E(b,{modelValue:d.contact_person,"onUpdate:modelValue":r[1]||=e=>d.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),E(x,{label:`电话`},{default:g(()=>[E(b,{modelValue:d.phone,"onUpdate:modelValue":r[2]||=e=>d.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),E(x,{label:`邮箱`},{default:g(()=>[E(b,{modelValue:d.email,"onUpdate:modelValue":r[3]||=e=>d.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),E(x,{label:`地址`},{default:g(()=>[E(b,{modelValue:d.address,"onUpdate:modelValue":r[4]||=e=>d.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-46312435`]]),Se={class:`customers-tab`},Ce={class:`table-header`},we=v(s({__name:`CustomersTab`,setup(e){let{state:o,loadCustomers:s}=R(),c=r(!1),l=r(null),d=h({name:``,contact_person:``,phone:``,email:``,address:``});function f(){l.value=null,d.name=``,d.contact_person=``,d.phone=``,d.email=``,d.address=``,c.value=!0}function _(e){l.value=e,d.name=e.name??``,d.contact_person=e.contact_person??``,d.phone=e.phone??``,d.email=e.email??``,d.address=e.address??``,c.value=!0}async function v(){try{let e={name:d.name,contact_person:d.contact_person||null,phone:d.phone||null,email:d.email||null,address:d.address||null};l.value?(await x(`/api/customers/${l.value.id}`,{method:`PUT`,body:JSON.stringify(e)}),b(`客户更新成功`,`success`)):(await x(`/api/customers`,{method:`POST`,body:JSON.stringify(e)}),b(`客户已创建`,`success`)),c.value=!1,s()}catch(e){m(e,`保存客户`)}}async function y(e){if(confirm(`确定要删除这个客户吗?`))try{await x(`/api/customers/${e}`,{method:`DELETE`}),b(`客户已删除`,`success`),s()}catch(e){m(e,`删除客户`)}}return T(()=>{s()}),(e,r)=>{let s=a(`t-button`),m=a(`t-table-column`),h=a(`t-table`),b=a(`t-input`),x=a(`t-form-item`),S=a(`t-form`),C=a(`t-dialog`);return t(),w(`div`,Se,[p(`div`,Ce,[E(s,{type:`primary`,onClick:f},{default:g(()=>[...r[7]||=[u(`+ 新增客户`,-1)]]),_:1})]),E(h,{data:i(o).customers,style:{width:`100%`},loading:i(o).loading,"empty-text":`暂无客户数据`},{default:g(()=>[E(m,{prop:`code`,label:`编码`}),E(m,{prop:`name`,label:`名称`}),E(m,{prop:`contact_person`,label:`联系人`},{default:g(({row:e})=>[u(n(e.contact_person||`-`),1)]),_:1}),E(m,{prop:`phone`,label:`电话`},{default:g(({row:e})=>[u(n(e.phone||`-`),1)]),_:1}),E(m,{prop:`email`,label:`邮箱`},{default:g(({row:e})=>[u(n(e.email||`-`),1)]),_:1}),E(m,{label:`操作`,width:`180`},{default:g(({row:e})=>[E(s,{size:`small`,onClick:t=>_(e)},{default:g(()=>[...r[8]||=[u(`编辑`,-1)]]),_:1},8,[`onClick`]),E(s,{size:`small`,type:`danger`,onClick:t=>y(e.id)},{default:g(()=>[...r[9]||=[u(`删除`,-1)]]),_:1},8,[`onClick`])]),_:1})]),_:1},8,[`data`,`loading`]),E(C,{modelValue:c.value,"onUpdate:modelValue":r[6]||=e=>c.value=e,title:l.value?`编辑客户`:`新增客户`,width:`520px`,"close-on-click-modal":!1},{footer:g(()=>[E(s,{onClick:r[5]||=e=>c.value=!1},{default:g(()=>[...r[10]||=[u(`取消`,-1)]]),_:1}),E(s,{type:`primary`,onClick:v},{default:g(()=>[...r[11]||=[u(`保存`,-1)]]),_:1})]),default:g(()=>[E(S,{model:d,"label-width":`80px`},{default:g(()=>[E(x,{label:`名称`,required:``},{default:g(()=>[E(b,{modelValue:d.name,"onUpdate:modelValue":r[0]||=e=>d.name=e,placeholder:`请输入客户名称`},null,8,[`modelValue`])]),_:1}),E(x,{label:`联系人`},{default:g(()=>[E(b,{modelValue:d.contact_person,"onUpdate:modelValue":r[1]||=e=>d.contact_person=e,placeholder:`请输入联系人`},null,8,[`modelValue`])]),_:1}),E(x,{label:`电话`},{default:g(()=>[E(b,{modelValue:d.phone,"onUpdate:modelValue":r[2]||=e=>d.phone=e,placeholder:`请输入电话`},null,8,[`modelValue`])]),_:1}),E(x,{label:`邮箱`},{default:g(()=>[E(b,{modelValue:d.email,"onUpdate:modelValue":r[3]||=e=>d.email=e,type:`email`,placeholder:`请输入邮箱`},null,8,[`modelValue`])]),_:1}),E(x,{label:`地址`},{default:g(()=>[E(b,{modelValue:d.address,"onUpdate:modelValue":r[4]||=e=>d.address=e,placeholder:`请输入地址`},null,8,[`modelValue`])]),_:1})]),_:1},8,[`model`])]),_:1},8,[`modelValue`,`title`])])}}}),[[`__scopeId`,`data-v-910d60b4`]]),Te={style:{"margin-bottom":`16px`,display:`flex`,gap:`12px`,"align-items":`center`,"flex-wrap":`wrap`}},Ee={style:{"text-align":`center`}},De={style:{"font-size":`24px`,"font-weight":`700`,color:`#409eff`}},Oe={style:{"text-align":`center`}},ke={style:{"font-size":`24px`,"font-weight":`700`,color:`#e6a23c`}},Ae={style:{"text-align":`center`}},je={style:{"font-size":`24px`,"font-weight":`700`,color:`#67c23a`}},Me={style:{"text-align":`center`}},Ne={style:{"font-size":`24px`,"font-weight":`700`,color:`#f56c6c`}},Pe=s({__name:`FinanceTab`,setup(o){let{state:s,formatCurrency:c,formatDateTime:d,formatDate:m,loadFinance:h,refreshFinanceByPeriod:v}=R(),b=r(s.financePeriod.year),x=r(s.financePeriod.quarter),S=[{label:`全年`,value:``},{label:`Q1`,value:`1`},{label:`Q2`,value:`2`},{label:`Q3`,value:`3`},{label:`Q4`,value:`4`}],C=_(()=>x.value?`${b.value}年 Q${x.value}`:`${b.value}年 全年`);function D(){s.financePeriod.year=b.value,s.financePeriod.quarter=x.value,h()}T(()=>{D()});let O=_(()=>s.financeSummary?.total_receivable??0),k=_(()=>s.financeSummary?.total_payable??0),A=_(()=>s.financeSummary?.period_received??0),j=_(()=>s.financeSummary?.period_paid??0);function M(e){return e===`receipt`?`收款`:`付款`}function N(e){return e===`receipt`?`success`:`warning`}function P(e){return{confirmed:`已确认`,pending:`待确认`}[e]||e}return(r,o)=>{let d=a(`t-input-number`),h=a(`t-option`),_=a(`t-select`),v=a(`t-button`),T=a(`t-tag`),F=a(`t-card`),I=a(`t-col`),L=a(`t-row`),R=a(`t-table-column`),z=a(`t-table`),B=a(`t-empty`);return t(),w(`div`,null,[p(`div`,Te,[o[3]||=p(`span`,{style:{"font-weight":`600`}},`统计周期:`,-1),E(d,{modelValue:b.value,"onUpdate:modelValue":o[0]||=e=>b.value=e,min:2020,max:2099,style:{width:`120px`}},null,8,[`modelValue`]),o[4]||=p(`span`,null,`年`,-1),E(_,{modelValue:x.value,"onUpdate:modelValue":o[1]||=e=>x.value=e,placeholder:`选择季度`,style:{width:`120px`}},{default:g(()=>[(t(),w(y,null,e(S,e=>E(h,{key:e.value,label:e.label,value:e.value},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`]),E(v,{type:`primary`,onClick:D},{default:g(()=>[...o[2]||=[u(`刷新统计`,-1)]]),_:1}),E(T,{type:`info`,size:`large`},{default:g(()=>[u(n(C.value),1)]),_:1})]),E(L,{gutter:16,style:{"margin-bottom":`16px`}},{default:g(()=>[E(I,{span:6},{default:g(()=>[E(F,{shadow:`hover`},{default:g(()=>[p(`div`,Ee,[o[5]||=p(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应收总额`,-1),p(`div`,De,n(i(c)(O.value)),1)])]),_:1})]),_:1}),E(I,{span:6},{default:g(()=>[E(F,{shadow:`hover`},{default:g(()=>[p(`div`,Oe,[o[6]||=p(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`应付总额`,-1),p(`div`,ke,n(i(c)(k.value)),1)])]),_:1})]),_:1}),E(I,{span:6},{default:g(()=>[E(F,{shadow:`hover`},{default:g(()=>[p(`div`,Ae,[o[7]||=p(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期收款`,-1),p(`div`,je,n(i(c)(A.value)),1)])]),_:1})]),_:1}),E(I,{span:6},{default:g(()=>[E(F,{shadow:`hover`},{default:g(()=>[p(`div`,Me,[o[8]||=p(`div`,{style:{color:`#909399`,"font-size":`14px`,"margin-bottom":`8px`}},`周期付款`,-1),p(`div`,Ne,n(i(c)(j.value)),1)])]),_:1})]),_:1})]),_:1}),E(F,{style:{"margin-bottom":`16px`}},{header:g(()=>[...o[9]||=[p(`span`,{style:{"font-weight":`600`}},`客户账款(周期)`,-1)]]),default:g(()=>[E(z,{data:i(s).customerFinanceStatement,loading:i(s).loading,stripe:``,size:`small`},{default:g(()=>[E(R,{prop:`partner_name`,label:`客户`}),E(R,{prop:`order_count`,label:`订单数`}),E(R,{prop:`transaction_count`,label:`流水数`}),E(R,{label:`订单金额`},{default:g(({row:e})=>[u(n(i(c)(e.order_amount)),1)]),_:1}),E(R,{label:`订单已收`},{default:g(({row:e})=>[u(n(i(c)(e.order_received)),1)]),_:1}),E(R,{label:`实收流水`},{default:g(({row:e})=>[u(n(i(c)(e.transaction_received)),1)]),_:1}),E(R,{label:`应收余额`},{default:g(({row:e})=>[u(n(i(c)(e.receivable_balance)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).customerFinanceStatement.length===0?(t(),f(B,{key:0,description:`暂无数据`})):l(``,!0)]),_:1}),E(F,{style:{"margin-bottom":`16px`}},{header:g(()=>[...o[10]||=[p(`span`,{style:{"font-weight":`600`}},`供应商账款(周期)`,-1)]]),default:g(()=>[E(z,{data:i(s).supplierFinanceStatement,loading:i(s).loading,stripe:``,size:`small`},{default:g(()=>[E(R,{prop:`partner_name`,label:`供应商`}),E(R,{prop:`order_count`,label:`订单数`}),E(R,{prop:`transaction_count`,label:`流水数`}),E(R,{label:`订单金额`},{default:g(({row:e})=>[u(n(i(c)(e.order_amount)),1)]),_:1}),E(R,{label:`订单已付`},{default:g(({row:e})=>[u(n(i(c)(e.order_paid)),1)]),_:1}),E(R,{label:`实付流水`},{default:g(({row:e})=>[u(n(i(c)(e.transaction_paid)),1)]),_:1}),E(R,{label:`应付余额`},{default:g(({row:e})=>[u(n(i(c)(e.payable_balance)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).supplierFinanceStatement.length===0?(t(),f(B,{key:0,description:`暂无数据`})):l(``,!0)]),_:1}),E(F,{style:{"margin-bottom":`16px`}},{header:g(()=>[...o[11]||=[p(`span`,{style:{"font-weight":`600`}},`客户-商品追溯(周期)`,-1)]]),default:g(()=>[E(z,{data:i(s).customerProductStatement,loading:i(s).loading,stripe:``,size:`small`},{default:g(()=>[E(R,{prop:`partner_name`,label:`客户`}),E(R,{prop:`product_sku`,label:`SKU`}),E(R,{prop:`product_name`,label:`商品`}),E(R,{prop:`order_count`,label:`订单数`}),E(R,{prop:`quantity`,label:`数量`}),E(R,{label:`订单金额`},{default:g(({row:e})=>[u(n(i(c)(e.order_amount)),1)]),_:1}),E(R,{label:`已结款`},{default:g(({row:e})=>[u(n(i(c)(e.settled_amount)),1)]),_:1}),E(R,{label:`未结款`},{default:g(({row:e})=>[u(n(i(c)(e.unsettled_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).customerProductStatement.length===0?(t(),f(B,{key:0,description:`暂无数据`})):l(``,!0)]),_:1}),E(F,{style:{"margin-bottom":`16px`}},{header:g(()=>[...o[12]||=[p(`span`,{style:{"font-weight":`600`}},`供应商-商品追溯(周期)`,-1)]]),default:g(()=>[E(z,{data:i(s).supplierProductStatement,loading:i(s).loading,stripe:``,size:`small`},{default:g(()=>[E(R,{prop:`partner_name`,label:`供应商`}),E(R,{prop:`product_sku`,label:`SKU`}),E(R,{prop:`product_name`,label:`商品`}),E(R,{prop:`order_count`,label:`订单数`}),E(R,{prop:`quantity`,label:`数量`}),E(R,{label:`订单金额`},{default:g(({row:e})=>[u(n(i(c)(e.order_amount)),1)]),_:1}),E(R,{label:`已结款`},{default:g(({row:e})=>[u(n(i(c)(e.settled_amount)),1)]),_:1}),E(R,{label:`未结款`},{default:g(({row:e})=>[u(n(i(c)(e.unsettled_amount)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).supplierProductStatement.length===0?(t(),f(B,{key:0,description:`暂无数据`})):l(``,!0)]),_:1}),E(F,null,{header:g(()=>[...o[13]||=[p(`span`,{style:{"font-weight":`600`}},`最近财务流水`,-1)]]),default:g(()=>[E(z,{data:i(s).financeTransactions,loading:i(s).loading,stripe:``,size:`small`},{default:g(()=>[E(R,{prop:`order_no`,label:`单号`}),E(R,{label:`类型`},{default:g(({row:e})=>[E(T,{type:N(e.type),size:`small`},{default:g(()=>[u(n(M(e.type)),1)]),_:2},1032,[`type`])]),_:1}),E(R,{prop:`partner_name`,label:`往来方`}),E(R,{label:`金额`},{default:g(({row:e})=>[u(n(i(c)(e.amount)),1)]),_:1}),E(R,{label:`状态`},{default:g(({row:e})=>[E(T,{type:e.status===`confirmed`?`success`:`warning`,size:`small`},{default:g(()=>[u(n(P(e.status)),1)]),_:2},1032,[`type`])]),_:1}),E(R,{label:`日期`},{default:g(({row:e})=>[u(n(i(m)(e.transaction_date)),1)]),_:1})]),_:1},8,[`data`,`loading`]),!i(s).loading&&i(s).financeTransactions.length===0?(t(),f(B,{key:0,description:`暂无数据`})):l(``,!0)]),_:1})])}}}),Fe={class:`movements-tab`},Ie=v(s({__name:`MovementsTab`,setup(e){let{state:r,loadMovements:o,getMovementTypeLabel:s,getMovementBadgeClass:c,formatDateTime:l}=R(),d=e=>{let t=c(e);return t===`badge-success`?`success`:t===`badge-error`?`danger`:t===`badge-warning`?`warning`:`info`};return T(()=>{o()}),(e,o)=>{let c=a(`t-table-column`),f=a(`t-tag`),p=a(`t-table`);return t(),w(`div`,Fe,[E(p,{data:i(r).movements,style:{width:`100%`},loading:i(r).loading,"empty-text":`暂无库存变动记录`},{default:g(()=>[E(c,{label:`物料`},{default:g(({row:e})=>[u(n(e.product_name)+n(e.product_sku?` (`+e.product_sku+`)`:``),1)]),_:1}),E(c,{label:`类型`,width:`140`},{default:g(({row:e})=>[E(f,{type:d(e.movement_type),size:`small`},{default:g(()=>[u(n(i(s)(e.movement_type)),1)]),_:2},1032,[`type`])]),_:1}),E(c,{prop:`quantity`,label:`数量`,width:`80`}),E(c,{prop:`before_quantity`,label:`变动前`,width:`80`}),E(c,{prop:`after_quantity`,label:`变动后`,width:`80`}),E(c,{label:`时间`,width:`180`},{default:g(({row:e})=>[u(n(i(l)(e.created_at)),1)]),_:1})]),_:1},8,[`data`,`loading`])])}}}),[[`__scopeId`,`data-v-79f8d5e3`]]),Le={class:`page-container`},Re={class:`inventory-layout`},ze={class:`inventory-sidebar-wrapper`},Be={class:`inventory-content`},Ve={class:`inventory-content-header`},He={class:`inventory-breadcrumb`},Ue={class:`current`},We=v(s({__name:`InventoryView`,setup(e){let r=d(),o=C(),{state:s,activeMenu:u,checkBackendHealth:m,loadDashboard:h,destroyPickers:_}=R();return T(()=>{if(!r.user){o.push(`/login`);return}m().then(()=>{if(!s.backendDbReady){b(s.backendDbMessage||`业务服务不可用`,`warning`);return}h()})}),c(()=>{_()}),(e,r)=>{let o=a(`t-alert`),c=a(`t-loading`);return t(),w(`div`,Le,[r[1]||=p(`div`,{class:`page-header`},[p(`h1`,null,`进销存管理`),p(`p`,null,`库存、采购、销售管理`)],-1),p(`div`,Re,[p(`aside`,ze,[E(U)]),p(`section`,Be,[p(`div`,Ve,[p(`div`,He,[p(`span`,null,n(i(u)?.group?.title||`进销存`),1),r[0]||=p(`span`,{class:`sep`},`/`,-1),p(`span`,Ue,n(i(u)?.item?.label||``),1)])]),i(s).backendDbReady?l(``,!0):(t(),f(o,{key:0,title:i(s).backendDbMessage,theme:`warning`,"show-icon":``,closable:!1,style:{"margin-bottom":`16px`}},null,8,[`title`])),E(c,{loading:i(s).loading},{default:g(()=>[i(s).activeTab===`dashboard`?(t(),f(J,{key:0})):i(s).activeTab===`products`?(t(),f(Z,{key:1})):i(s).activeTab===`materials`?(t(),f(ne,{key:2})):i(s).activeTab===`inventory`?(t(),f(ie,{key:3})):i(s).activeTab===`purchases`?(t(),f(le,{key:4})):i(s).activeTab===`sales_orders`?(t(),f(ve,{key:5})):i(s).activeTab===`suppliers`?(t(),f(xe,{key:6})):i(s).activeTab===`customers`?(t(),f(we,{key:7})):i(s).activeTab===`finance`?(t(),f(Pe,{key:8})):i(s).activeTab===`movements`?(t(),f(Ie,{key:9})):l(``,!0)]),_:1},8,[`loading`])])])])}}}),[[`__scopeId`,`data-v-75abaab9`]]);export{We as default}; \ No newline at end of file diff --git a/static/assets/LoginView-n35SYtjJ.js b/static/assets/LoginView-DDsguTRb.js similarity index 96% rename from static/assets/LoginView-n35SYtjJ.js rename to static/assets/LoginView-DDsguTRb.js index eff9f93..9a4b0de 100644 --- a/static/assets/LoginView-n35SYtjJ.js +++ b/static/assets/LoginView-DDsguTRb.js @@ -1 +1 @@ -import{E as e,I as t,O as n,S as r,_ as i,b as a,g as o,h as s,j as c,k as l,n as u,o as d,r as f,s as p,u as m,v as h,x as g}from"./index-DhEa-EvN.js";var _={class:`login-container`},v={class:`login-card`},y=u(r({__name:`LoginView`,setup(r){let u=m(),y=c({username:``,password:``,error:``,loading:!1}),b=async()=>{y.error=``,y.loading=!0;try{let e=await p(`/api/auth/login/json`,{method:`POST`,body:JSON.stringify({username:y.username,password:y.password})});d(e.access_token,e.user),f(`登录成功`,`success`),u.push(`/`)}catch(e){y.error=e.message||`登录失败`}finally{y.loading=!1}};return(r,c)=>{let u=n(`t-input`),d=n(`t-form-item`),f=n(`t-alert`),p=n(`t-button`),m=n(`t-form`);return e(),h(`div`,_,[s(`div`,v,[c[2]||=s(`div`,{class:`login-header`},[s(`div`,{class:`login-logo`},`G`),s(`h1`,{class:`login-title`},`Gemold`),s(`p`,{class:`login-subtitle`},`模具制造管理系统`)],-1),g(m,{onSubmit:b},{default:l(()=>[g(d,{label:`用户名`},{default:l(()=>[g(u,{modelValue:y.username,"onUpdate:modelValue":c[0]||=e=>y.username=e,placeholder:`请输入用户名`,clearable:``},null,8,[`modelValue`])]),_:1}),g(d,{label:`密码`},{default:l(()=>[g(u,{modelValue:y.password,"onUpdate:modelValue":c[1]||=e=>y.password=e,type:`password`,placeholder:`请输入密码`,clearable:``},null,8,[`modelValue`])]),_:1}),y.error?(e(),o(f,{key:0,theme:`error`,message:y.error,style:{"margin-bottom":`16px`}},null,8,[`message`])):i(``,!0),g(p,{theme:`primary`,block:``,type:`submit`,loading:y.loading},{default:l(()=>[a(t(y.loading?`登录中...`:`登录`),1)]),_:1},8,[`loading`])]),_:1})])])}}}),[[`__scopeId`,`data-v-c91bfbf2`]]);export{y as default}; \ No newline at end of file +import{E as e,I as t,O as n,S as r,_ as i,b as a,g as o,h as s,j as c,k as l,n as u,o as d,r as f,s as p,u as m,v as h,x as g}from"./index-EqJJKSSk.js";var _={class:`login-container`},v={class:`login-card`},y=u(r({__name:`LoginView`,setup(r){let u=m(),y=c({username:``,password:``,error:``,loading:!1}),b=async()=>{y.error=``,y.loading=!0;try{let e=await p(`/api/auth/login/json`,{method:`POST`,body:JSON.stringify({username:y.username,password:y.password})});d(e.access_token,e.user),f(`登录成功`,`success`),u.push(`/`)}catch(e){y.error=e.message||`登录失败`}finally{y.loading=!1}};return(r,c)=>{let u=n(`t-input`),d=n(`t-form-item`),f=n(`t-alert`),p=n(`t-button`),m=n(`t-form`);return e(),h(`div`,_,[s(`div`,v,[c[2]||=s(`div`,{class:`login-header`},[s(`div`,{class:`login-logo`},`G`),s(`h1`,{class:`login-title`},`Gemold`),s(`p`,{class:`login-subtitle`},`模具制造管理系统`)],-1),g(m,{onSubmit:b},{default:l(()=>[g(d,{label:`用户名`},{default:l(()=>[g(u,{modelValue:y.username,"onUpdate:modelValue":c[0]||=e=>y.username=e,placeholder:`请输入用户名`,clearable:``},null,8,[`modelValue`])]),_:1}),g(d,{label:`密码`},{default:l(()=>[g(u,{modelValue:y.password,"onUpdate:modelValue":c[1]||=e=>y.password=e,type:`password`,placeholder:`请输入密码`,clearable:``},null,8,[`modelValue`])]),_:1}),y.error?(e(),o(f,{key:0,theme:`error`,message:y.error,style:{"margin-bottom":`16px`}},null,8,[`message`])):i(``,!0),g(p,{theme:`primary`,block:``,type:`submit`,loading:y.loading},{default:l(()=>[a(t(y.loading?`登录中...`:`登录`),1)]),_:1},8,[`loading`])]),_:1})])])}}}),[[`__scopeId`,`data-v-c91bfbf2`]]);export{y as default}; \ No newline at end of file diff --git a/static/assets/MoldInsightView-BI-bxvRF.js b/static/assets/MoldInsightView-wJ3ZjPar.js similarity index 99% rename from static/assets/MoldInsightView-BI-bxvRF.js rename to static/assets/MoldInsightView-wJ3ZjPar.js index 270dada..b8e79d4 100644 --- a/static/assets/MoldInsightView-BI-bxvRF.js +++ b/static/assets/MoldInsightView-wJ3ZjPar.js @@ -1 +1 @@ -import{D as e,E as t,F as n,I as r,M as ee,N as i,O as a,P as o,S as s,_ as c,a as l,b as u,c as d,f,g as p,h as m,i as h,j as g,k as _,m as v,p as y,r as b,s as x,u as S,v as C,w,x as T,y as te}from"./index-DhEa-EvN.js";import{a as E,i as D,r as O}from"./utils-COFIQvWo.js";var ne={class:`page-container`},re={class:`upload-layout`},ie={class:`upload-main-card`},ae={key:0,class:`file-info`},oe={class:`file-name`},se={class:`file-size`},k={key:1,class:`error-message`},A={key:2,class:`progress-bar`},j={class:`upload-side-card`},M={class:`material-panel compact-panel`},N={class:`advanced-params`},P={class:`advanced-params-body`},F={class:`advanced-param-grid`},I={class:`param-meta-row`},L={class:`range-value`},R={class:`range-value`},z={class:`param-hint`},B={key:1,class:`inline-note`},V={key:0,class:`history-collapsible section`},H={class:`history-summary`},U={class:`table-container`},ce={class:`action-buttons`},W={class:`history-dropdown`},G={key:1,class:`inline-note`},K=s({__name:`MoldInsightView`,setup(s){let K=S(),q=d(),J=ee(null),Y=g({selectedFile:null,selectedMaterial:`ABS`,moldParams:{draftAngle:2,shrinkageRate:.5,partingPrecision:.1,cavityMatch:95},uploading:!1,error:``,currentTask:null,task:null,polling:!1,dragOver:!1,progress:0,history:null,expandedFiles:{}}),le=v(()=>Object.keys(Y.expandedFiles).filter(e=>Y.expandedFiles[e]!==null)),X=e=>e===`completed`?`success`:e===`failed`?`danger`:`warning`,ue=async e=>{},Z=async()=>{try{Y.history=await x(`/api/history`)}catch(e){console.error(`加载历史记录失败:`,e)}},de=async e=>{if(Y.expandedFiles[e])Y.expandedFiles[e]=null;else try{let t=await x(`/api/history/${encodeURIComponent(e)}`);Y.expandedFiles[e]=t}catch(e){h(e,`加载文件历史`)}},Q=e=>{K.push(`/moldinsight/result/${e.task_id}`)},fe=e=>{let t=e.target.files?.[0];t&&$(t)},$=e=>{let t=e.name.toLowerCase();if(!t.endsWith(`.stp`)&&!t.endsWith(`.step`)){Y.error=`请选择 STP 或 STEP 格式文件`,Y.selectedFile=null;return}if(e.size>100*1024*1024){Y.error=`文件大小不能超过 100MB`,Y.selectedFile=null;return}Y.error=``,Y.selectedFile=e,b(`已选择文件: ${e.name}`,`success`)},pe=e=>{e.preventDefault(),Y.dragOver=!1;let t=e.dataTransfer?.files;t&&t.length>0&&$(t[0])},me=async()=>{if(!Y.selectedFile)return;if(!q.token){Y.error=`请先登录后再上传文件`,b(`请先登录`,`warning`),K.push(`/login`);return}if(q.token===`demo`){Y.error=`演示模式不支持文件上传,请使用完整账户登录`,b(`演示模式不支持上传`,`warning`);return}Y.uploading=!0,Y.error=``,Y.progress=0;let e=new FormData;e.append(`file`,Y.selectedFile),e.append(`material`,Y.selectedMaterial),e.append(`draft_angle`,String(Y.moldParams.draftAngle)),e.append(`shrinkage_rate`,String(Y.moldParams.shrinkageRate)),e.append(`parting_precision`,String(Y.moldParams.partingPrecision)),e.append(`cavity_match`,String(Y.moldParams.cavityMatch));try{let t=await fetch(`/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${q.token}`},body:e});if(t.status===401){l(),Y.error=`登录已过期,请重新登录`,b(`登录已过期,请重新登录`,`warning`),K.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();Y.currentTask={task_id:n.task_id,status:`processing`,filename:n.file_info?.filename},b(`文件上传成功,开始分析...`,`success`),he(n.task_id)}catch(e){Y.error=h(e,`文件上传`)}finally{Y.uploading=!1}},he=async e=>{Y.polling=!0,Y.progress=10;let t=0,n=async()=>{try{t++,Y.progress=Math.min(90,10+t*.5);let r=await x(`/api/status/${e}`,{method:`POST`});if(Y.currentTask=r,Y.task=r,r.status===`completed`){Y.polling=!1,Y.progress=100,b(`分析完成`,`success`),Z(),K.push(`/moldinsight/result/${e}`);return}if(r.status===`failed`){Y.polling=!1,Y.error=r.error||`分析失败`,b(`分析失败`,`error`);return}t<300&&setTimeout(n,2e3)}catch(e){Y.polling=!1,Y.error=h(e,`轮询状态`)}};n()},ge=[{key:`draftAngle`,label:`拔模角`,unit:`°`,min:1,max:10,step:.5,defaultValue:2,hint:`常规注塑件建议从 1.5° 到 3° 起步`},{key:`shrinkageRate`,label:`收缩率`,unit:`%`,min:.5,max:3,step:.1,defaultValue:.5,hint:`按材料牌号校核,默认值用于首轮方案评估`},{key:`partingPrecision`,label:`分型精度`,unit:`mm`,min:.01,max:1,step:.01,defaultValue:.1,hint:`用于控制分型面拟合与边界容差`},{key:`cavityMatch`,label:`型腔匹配度`,unit:`%`,min:80,max:100,step:1,defaultValue:95,hint:`数值越高越偏向紧配合与严格封合`}];return w(()=>{if(!q.user){K.push(`/login`);return}Z()}),(ee,s)=>{let l=a(`t-option`),d=a(`t-select`),h=a(`t-form-item`),g=a(`t-input-number`),v=a(`t-button`),b=a(`t-table-column`),x=a(`t-tag`),S=a(`t-table`);return t(),C(`div`,ne,[s[13]||=te(`
输入
STEP/STP 产品件,面向注塑模主流程
输出
分模方案、DFM 风险、注塑模系统摘要与 CAD 导出
目标
先确认推荐方案,再进入导出与 CAM 准备
`,2),m(`div`,re,[m(`div`,ie,[s[7]||=m(`h2`,{class:`section-title`},`1. 上传产品件`,-1),m(`div`,{class:o([`upload-zone`,{"drag-over":Y.dragOver}]),onDragover:s[0]||=f(e=>Y.dragOver=!0,[`prevent`]),onDragleave:s[1]||=f(e=>Y.dragOver=!1,[`prevent`]),onDrop:pe,onClick:s[2]||=e=>J.value?.click()},[m(`input`,{ref_key:`fileInput`,ref:J,type:`file`,accept:`.stp,.step`,onChange:fe,hidden:``},null,544),s[5]||=m(`div`,{class:`upload-icon`},`📁`,-1),s[6]||=m(`div`,{class:`upload-text`},[m(`span`,{class:`upload-title`},`点击选择或拖拽 STP/STEP 文件`),m(`span`,{class:`upload-hint`},`支持注塑模产品件分析,最大 100MB`)],-1)],34),Y.selectedFile?(t(),C(`div`,ae,[m(`span`,oe,r(Y.selectedFile.name),1),m(`span`,se,r(i(D)(Y.selectedFile.size)),1),m(`button`,{class:`btn-clear`,onClick:s[3]||=e=>Y.selectedFile=null,title:`清除文件`},`×`)])):c(``,!0),Y.error?(t(),C(`div`,k,r(Y.error),1)):c(``,!0),Y.polling?(t(),C(`div`,A,[m(`div`,{class:`progress-fill`,style:n({width:Y.progress+`%`})},null,4)])):c(``,!0)]),m(`div`,j,[s[10]||=m(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),m(`div`,M,[T(h,{label:`产品材料`},{default:_(()=>[T(d,{modelValue:Y.selectedMaterial,"onUpdate:modelValue":s[4]||=e=>Y.selectedMaterial=e},{default:_(()=>[T(l,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),T(l,{value:`PP`,label:`PP (0.90 g/cm³)`}),T(l,{value:`PE`,label:`PE (0.95 g/cm³)`}),T(l,{value:`PC`,label:`PC (1.20 g/cm³)`}),T(l,{value:`PA`,label:`PA (1.14 g/cm³)`}),T(l,{value:`POM`,label:`POM (1.41 g/cm³)`}),T(l,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),T(l,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1}),m(`details`,N,[s[9]||=m(`summary`,null,`高级工艺参数`,-1),m(`div`,P,[s[8]||=m(`div`,{class:`inline-note`},`默认值适用于多数注塑件;仅在已知工艺约束时再调整。`,-1),m(`div`,F,[(t(),C(y,null,e(ge,e=>m(`div`,{class:`param-input-card`,key:e.key},[T(h,{label:e.label},{default:_(()=>[T(g,{modelValue:Y.moldParams[e.key],"onUpdate:modelValue":t=>Y.moldParams[e.key]=t,modelModifiers:{number:!0},min:e.min,max:e.max,step:e.step,suffix:e.unit},null,8,[`modelValue`,`onUpdate:modelValue`,`min`,`max`,`step`,`suffix`]),m(`div`,I,[m(`span`,L,`默认 `+r(e.defaultValue)+r(e.unit),1),m(`span`,R,`范围 `+r(e.min)+` - `+r(e.max)+r(e.unit),1)]),m(`div`,z,r(e.hint),1)]),_:2},1032,[`label`])])),64))])])])]),Y.selectedFile?(t(),p(v,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:me,disabled:Y.uploading||Y.polling},{default:_(()=>[u(r(Y.uploading?`上传中...`:Y.polling?`分析中...`:`3. 开始注塑模分析`),1)]),_:1},8,[`disabled`])):(t(),C(`div`,B,`先选择 STP 文件,再填写材料并开始分析。`))])]),Y.history?.files?.length?(t(),C(`details`,V,[m(`summary`,H,`分析历史(`+r(Y.history.files.length)+` 个文件)`,1),m(`div`,U,[T(S,{"row-key":`filename`,data:Y.history.files,"expanded-row-keys":le.value,onExpandChange:ue},{expandedRow:_(({row:e})=>[m(`div`,W,[Y.expandedFiles[e.filename]?(t(),p(S,{key:0,"row-key":`id`,data:Y.expandedFiles[e.filename]},{default:_(()=>[T(b,{key:`upload_time`,title:`上传时间`},{cell:_(({row:e})=>[u(r(i(O)(e.upload_time)),1)]),_:1}),T(b,{key:`file_size`,title:`文件大小`},{cell:_(({row:e})=>[u(r(i(D)(e.file_size)),1)]),_:1}),T(b,{key:`status`,title:`状态`},{cell:_(({row:e})=>[T(x,{theme:X(e.status),variant:`light`},{default:_(()=>[u(r(e.status),1)]),_:2},1032,[`theme`])]),_:1}),T(b,{key:`volume`,title:`体积 (mm³)`},{cell:_(({row:e})=>[u(r(e.volume?i(E)(e.volume):`-`),1)]),_:1}),T(b,{key:`surface_area`,title:`表面积 (mm²)`},{cell:_(({row:e})=>[u(r(e.surface_area?i(E)(e.surface_area):`-`),1)]),_:1}),T(b,{key:`product_weight`,title:`重量 (g)`},{cell:_(({row:e})=>[u(r(e.product_weight?e.product_weight.toFixed(2):`-`),1)]),_:1}),T(b,{key:`detail_actions`,title:`操作`},{cell:_(({row:e})=>[e.has_analysis?(t(),p(v,{key:0,theme:`primary`,size:`small`,onClick:t=>Q(e)},{default:_(()=>[...s[12]||=[u(` 查看详情 `,-1)]]),_:1},8,[`onClick`])):c(``,!0)]),_:1})]),_:1},8,[`data`])):(t(),C(`div`,G,`加载中...`))])]),default:_(()=>[T(b,{key:`filename`,title:`文件名`},{cell:_(({row:e})=>[u(r(e.filename),1)]),_:1}),T(b,{key:`upload_count`,title:`上传次数`},{cell:_(({row:e})=>[T(x,{theme:`primary`,variant:`light`},{default:_(()=>[u(r(e.upload_count)+` 次`,1)]),_:2},1024)]),_:1}),T(b,{key:`file_size`,title:`文件大小`},{cell:_(({row:e})=>[u(r(i(D)(e.file_size)),1)]),_:1}),T(b,{key:`latest_status`,title:`最新状态`},{cell:_(({row:e})=>[T(x,{theme:X(e.latest_status),variant:`light`},{default:_(()=>[u(r(e.latest_status),1)]),_:2},1032,[`theme`])]),_:1}),T(b,{key:`latest_upload_time`,title:`最新分析时间`},{cell:_(({row:e})=>[u(r(i(O)(e.latest_upload_time)),1)]),_:1}),T(b,{key:`actions`,title:`操作`},{cell:_(({row:e})=>[m(`div`,ce,[e.latest_status===`completed`?(t(),p(v,{key:0,theme:`primary`,size:`small`,onClick:t=>Q({task_id:e.latest_task_id})},{default:_(()=>[...s[11]||=[u(` 查看最新 `,-1)]]),_:1},8,[`onClick`])):c(``,!0),T(v,{variant:`text`,size:`small`,onClick:t=>de(e.filename),title:Y.expandedFiles[e.filename]?`收起`:`展开历史记录`},{icon:_(()=>[m(`span`,{class:o([`dropdown-icon`,{expanded:Y.expandedFiles[e.filename]}])},`▼`,2)]),_:2},1032,[`onClick`,`title`])])]),_:1})]),_:1},8,[`data`,`expanded-row-keys`])])])):c(``,!0)])}}});export{K as default}; \ No newline at end of file +import{D as e,E as t,F as n,I as r,M as ee,N as i,O as a,P as o,S as s,_ as c,a as l,b as u,c as d,f,g as p,h as m,i as h,j as g,k as _,m as v,p as y,r as b,s as x,u as S,v as C,w,x as T,y as te}from"./index-EqJJKSSk.js";import{a as E,i as D,r as O}from"./utils-COFIQvWo.js";var ne={class:`page-container`},re={class:`upload-layout`},ie={class:`upload-main-card`},ae={key:0,class:`file-info`},oe={class:`file-name`},se={class:`file-size`},k={key:1,class:`error-message`},A={key:2,class:`progress-bar`},j={class:`upload-side-card`},M={class:`material-panel compact-panel`},N={class:`advanced-params`},P={class:`advanced-params-body`},F={class:`advanced-param-grid`},I={class:`param-meta-row`},L={class:`range-value`},R={class:`range-value`},z={class:`param-hint`},B={key:1,class:`inline-note`},V={key:0,class:`history-collapsible section`},H={class:`history-summary`},U={class:`table-container`},ce={class:`action-buttons`},W={class:`history-dropdown`},G={key:1,class:`inline-note`},K=s({__name:`MoldInsightView`,setup(s){let K=S(),q=d(),J=ee(null),Y=g({selectedFile:null,selectedMaterial:`ABS`,moldParams:{draftAngle:2,shrinkageRate:.5,partingPrecision:.1,cavityMatch:95},uploading:!1,error:``,currentTask:null,task:null,polling:!1,dragOver:!1,progress:0,history:null,expandedFiles:{}}),le=v(()=>Object.keys(Y.expandedFiles).filter(e=>Y.expandedFiles[e]!==null)),X=e=>e===`completed`?`success`:e===`failed`?`danger`:`warning`,ue=async e=>{},Z=async()=>{try{Y.history=await x(`/api/history`)}catch(e){console.error(`加载历史记录失败:`,e)}},de=async e=>{if(Y.expandedFiles[e])Y.expandedFiles[e]=null;else try{let t=await x(`/api/history/${encodeURIComponent(e)}`);Y.expandedFiles[e]=t}catch(e){h(e,`加载文件历史`)}},Q=e=>{K.push(`/moldinsight/result/${e.task_id}`)},fe=e=>{let t=e.target.files?.[0];t&&$(t)},$=e=>{let t=e.name.toLowerCase();if(!t.endsWith(`.stp`)&&!t.endsWith(`.step`)){Y.error=`请选择 STP 或 STEP 格式文件`,Y.selectedFile=null;return}if(e.size>100*1024*1024){Y.error=`文件大小不能超过 100MB`,Y.selectedFile=null;return}Y.error=``,Y.selectedFile=e,b(`已选择文件: ${e.name}`,`success`)},pe=e=>{e.preventDefault(),Y.dragOver=!1;let t=e.dataTransfer?.files;t&&t.length>0&&$(t[0])},me=async()=>{if(!Y.selectedFile)return;if(!q.token){Y.error=`请先登录后再上传文件`,b(`请先登录`,`warning`),K.push(`/login`);return}if(q.token===`demo`){Y.error=`演示模式不支持文件上传,请使用完整账户登录`,b(`演示模式不支持上传`,`warning`);return}Y.uploading=!0,Y.error=``,Y.progress=0;let e=new FormData;e.append(`file`,Y.selectedFile),e.append(`material`,Y.selectedMaterial),e.append(`draft_angle`,String(Y.moldParams.draftAngle)),e.append(`shrinkage_rate`,String(Y.moldParams.shrinkageRate)),e.append(`parting_precision`,String(Y.moldParams.partingPrecision)),e.append(`cavity_match`,String(Y.moldParams.cavityMatch));try{let t=await fetch(`/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${q.token}`},body:e});if(t.status===401){l(),Y.error=`登录已过期,请重新登录`,b(`登录已过期,请重新登录`,`warning`),K.push(`/login`);return}if(!t.ok)throw Error(`上传失败: ${t.status}`);let n=await t.json();Y.currentTask={task_id:n.task_id,status:`processing`,filename:n.file_info?.filename},b(`文件上传成功,开始分析...`,`success`),he(n.task_id)}catch(e){Y.error=h(e,`文件上传`)}finally{Y.uploading=!1}},he=async e=>{Y.polling=!0,Y.progress=10;let t=0,n=async()=>{try{t++,Y.progress=Math.min(90,10+t*.5);let r=await x(`/api/status/${e}`,{method:`POST`});if(Y.currentTask=r,Y.task=r,r.status===`completed`){Y.polling=!1,Y.progress=100,b(`分析完成`,`success`),Z(),K.push(`/moldinsight/result/${e}`);return}if(r.status===`failed`){Y.polling=!1,Y.error=r.error||`分析失败`,b(`分析失败`,`error`);return}t<300&&setTimeout(n,2e3)}catch(e){Y.polling=!1,Y.error=h(e,`轮询状态`)}};n()},ge=[{key:`draftAngle`,label:`拔模角`,unit:`°`,min:1,max:10,step:.5,defaultValue:2,hint:`常规注塑件建议从 1.5° 到 3° 起步`},{key:`shrinkageRate`,label:`收缩率`,unit:`%`,min:.5,max:3,step:.1,defaultValue:.5,hint:`按材料牌号校核,默认值用于首轮方案评估`},{key:`partingPrecision`,label:`分型精度`,unit:`mm`,min:.01,max:1,step:.01,defaultValue:.1,hint:`用于控制分型面拟合与边界容差`},{key:`cavityMatch`,label:`型腔匹配度`,unit:`%`,min:80,max:100,step:1,defaultValue:95,hint:`数值越高越偏向紧配合与严格封合`}];return w(()=>{if(!q.user){K.push(`/login`);return}Z()}),(ee,s)=>{let l=a(`t-option`),d=a(`t-select`),h=a(`t-form-item`),g=a(`t-input-number`),v=a(`t-button`),b=a(`t-table-column`),x=a(`t-tag`),S=a(`t-table`);return t(),C(`div`,ne,[s[13]||=te(`
输入
STEP/STP 产品件,面向注塑模主流程
输出
分模方案、DFM 风险、注塑模系统摘要与 CAD 导出
目标
先确认推荐方案,再进入导出与 CAM 准备
`,2),m(`div`,re,[m(`div`,ie,[s[7]||=m(`h2`,{class:`section-title`},`1. 上传产品件`,-1),m(`div`,{class:o([`upload-zone`,{"drag-over":Y.dragOver}]),onDragover:s[0]||=f(e=>Y.dragOver=!0,[`prevent`]),onDragleave:s[1]||=f(e=>Y.dragOver=!1,[`prevent`]),onDrop:pe,onClick:s[2]||=e=>J.value?.click()},[m(`input`,{ref_key:`fileInput`,ref:J,type:`file`,accept:`.stp,.step`,onChange:fe,hidden:``},null,544),s[5]||=m(`div`,{class:`upload-icon`},`📁`,-1),s[6]||=m(`div`,{class:`upload-text`},[m(`span`,{class:`upload-title`},`点击选择或拖拽 STP/STEP 文件`),m(`span`,{class:`upload-hint`},`支持注塑模产品件分析,最大 100MB`)],-1)],34),Y.selectedFile?(t(),C(`div`,ae,[m(`span`,oe,r(Y.selectedFile.name),1),m(`span`,se,r(i(D)(Y.selectedFile.size)),1),m(`button`,{class:`btn-clear`,onClick:s[3]||=e=>Y.selectedFile=null,title:`清除文件`},`×`)])):c(``,!0),Y.error?(t(),C(`div`,k,r(Y.error),1)):c(``,!0),Y.polling?(t(),C(`div`,A,[m(`div`,{class:`progress-fill`,style:n({width:Y.progress+`%`})},null,4)])):c(``,!0)]),m(`div`,j,[s[10]||=m(`h2`,{class:`section-title`},`2. 注塑模参数`,-1),m(`div`,M,[T(h,{label:`产品材料`},{default:_(()=>[T(d,{modelValue:Y.selectedMaterial,"onUpdate:modelValue":s[4]||=e=>Y.selectedMaterial=e},{default:_(()=>[T(l,{value:`ABS`,label:`ABS (1.05 g/cm³)`}),T(l,{value:`PP`,label:`PP (0.90 g/cm³)`}),T(l,{value:`PE`,label:`PE (0.95 g/cm³)`}),T(l,{value:`PC`,label:`PC (1.20 g/cm³)`}),T(l,{value:`PA`,label:`PA (1.14 g/cm³)`}),T(l,{value:`POM`,label:`POM (1.41 g/cm³)`}),T(l,{value:`PMMA`,label:`PMMA (1.18 g/cm³)`}),T(l,{value:`PBT`,label:`PBT (1.31 g/cm³)`})]),_:1},8,[`modelValue`])]),_:1}),m(`details`,N,[s[9]||=m(`summary`,null,`高级工艺参数`,-1),m(`div`,P,[s[8]||=m(`div`,{class:`inline-note`},`默认值适用于多数注塑件;仅在已知工艺约束时再调整。`,-1),m(`div`,F,[(t(),C(y,null,e(ge,e=>m(`div`,{class:`param-input-card`,key:e.key},[T(h,{label:e.label},{default:_(()=>[T(g,{modelValue:Y.moldParams[e.key],"onUpdate:modelValue":t=>Y.moldParams[e.key]=t,modelModifiers:{number:!0},min:e.min,max:e.max,step:e.step,suffix:e.unit},null,8,[`modelValue`,`onUpdate:modelValue`,`min`,`max`,`step`,`suffix`]),m(`div`,I,[m(`span`,L,`默认 `+r(e.defaultValue)+r(e.unit),1),m(`span`,R,`范围 `+r(e.min)+` - `+r(e.max)+r(e.unit),1)]),m(`div`,z,r(e.hint),1)]),_:2},1032,[`label`])])),64))])])])]),Y.selectedFile?(t(),p(v,{key:0,theme:`primary`,class:`upload-submit-btn`,onClick:me,disabled:Y.uploading||Y.polling},{default:_(()=>[u(r(Y.uploading?`上传中...`:Y.polling?`分析中...`:`3. 开始注塑模分析`),1)]),_:1},8,[`disabled`])):(t(),C(`div`,B,`先选择 STP 文件,再填写材料并开始分析。`))])]),Y.history?.files?.length?(t(),C(`details`,V,[m(`summary`,H,`分析历史(`+r(Y.history.files.length)+` 个文件)`,1),m(`div`,U,[T(S,{"row-key":`filename`,data:Y.history.files,"expanded-row-keys":le.value,onExpandChange:ue},{expandedRow:_(({row:e})=>[m(`div`,W,[Y.expandedFiles[e.filename]?(t(),p(S,{key:0,"row-key":`id`,data:Y.expandedFiles[e.filename]},{default:_(()=>[T(b,{key:`upload_time`,title:`上传时间`},{cell:_(({row:e})=>[u(r(i(O)(e.upload_time)),1)]),_:1}),T(b,{key:`file_size`,title:`文件大小`},{cell:_(({row:e})=>[u(r(i(D)(e.file_size)),1)]),_:1}),T(b,{key:`status`,title:`状态`},{cell:_(({row:e})=>[T(x,{theme:X(e.status),variant:`light`},{default:_(()=>[u(r(e.status),1)]),_:2},1032,[`theme`])]),_:1}),T(b,{key:`volume`,title:`体积 (mm³)`},{cell:_(({row:e})=>[u(r(e.volume?i(E)(e.volume):`-`),1)]),_:1}),T(b,{key:`surface_area`,title:`表面积 (mm²)`},{cell:_(({row:e})=>[u(r(e.surface_area?i(E)(e.surface_area):`-`),1)]),_:1}),T(b,{key:`product_weight`,title:`重量 (g)`},{cell:_(({row:e})=>[u(r(e.product_weight?e.product_weight.toFixed(2):`-`),1)]),_:1}),T(b,{key:`detail_actions`,title:`操作`},{cell:_(({row:e})=>[e.has_analysis?(t(),p(v,{key:0,theme:`primary`,size:`small`,onClick:t=>Q(e)},{default:_(()=>[...s[12]||=[u(` 查看详情 `,-1)]]),_:1},8,[`onClick`])):c(``,!0)]),_:1})]),_:1},8,[`data`])):(t(),C(`div`,G,`加载中...`))])]),default:_(()=>[T(b,{key:`filename`,title:`文件名`},{cell:_(({row:e})=>[u(r(e.filename),1)]),_:1}),T(b,{key:`upload_count`,title:`上传次数`},{cell:_(({row:e})=>[T(x,{theme:`primary`,variant:`light`},{default:_(()=>[u(r(e.upload_count)+` 次`,1)]),_:2},1024)]),_:1}),T(b,{key:`file_size`,title:`文件大小`},{cell:_(({row:e})=>[u(r(i(D)(e.file_size)),1)]),_:1}),T(b,{key:`latest_status`,title:`最新状态`},{cell:_(({row:e})=>[T(x,{theme:X(e.latest_status),variant:`light`},{default:_(()=>[u(r(e.latest_status),1)]),_:2},1032,[`theme`])]),_:1}),T(b,{key:`latest_upload_time`,title:`最新分析时间`},{cell:_(({row:e})=>[u(r(i(O)(e.latest_upload_time)),1)]),_:1}),T(b,{key:`actions`,title:`操作`},{cell:_(({row:e})=>[m(`div`,ce,[e.latest_status===`completed`?(t(),p(v,{key:0,theme:`primary`,size:`small`,onClick:t=>Q({task_id:e.latest_task_id})},{default:_(()=>[...s[11]||=[u(` 查看最新 `,-1)]]),_:1},8,[`onClick`])):c(``,!0),T(v,{variant:`text`,size:`small`,onClick:t=>de(e.filename),title:Y.expandedFiles[e.filename]?`收起`:`展开历史记录`},{icon:_(()=>[m(`span`,{class:o([`dropdown-icon`,{expanded:Y.expandedFiles[e.filename]}])},`▼`,2)]),_:2},1032,[`onClick`,`title`])])]),_:1})]),_:1},8,[`data`,`expanded-row-keys`])])])):c(``,!0)])}}});export{K as default}; \ No newline at end of file diff --git a/static/assets/ReleaseView-KzbAQOU7.js b/static/assets/ReleaseView-CRm-3ZGb.js similarity index 78% rename from static/assets/ReleaseView-KzbAQOU7.js rename to static/assets/ReleaseView-CRm-3ZGb.js index 96d9763..5c8a050 100644 --- a/static/assets/ReleaseView-KzbAQOU7.js +++ b/static/assets/ReleaseView-CRm-3ZGb.js @@ -1 +1 @@ -import{E as e,h as t,n,v as r}from"./index-DhEa-EvN.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`灰度发布与回滚`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file +import{E as e,h as t,n,v as r}from"./index-EqJJKSSk.js";var i={};function a(n,i){return e(),r(`div`,null,[...i[0]||=[t(`div`,{class:`page-header`},[t(`h1`,{class:`page-title`},`灰度发布与回滚`),t(`p`,{class:`page-subtitle`},`迁移中...`)],-1)]])}var o=n(i,[[`render`,a]]);export{o as default}; \ No newline at end of file diff --git a/static/assets/ResultView-BxUb7yw9.js b/static/assets/ResultView-CqY_0nu0.js similarity index 99% rename from static/assets/ResultView-BxUb7yw9.js rename to static/assets/ResultView-CqY_0nu0.js index 4854087..8be4f6c 100644 --- a/static/assets/ResultView-BxUb7yw9.js +++ b/static/assets/ResultView-CqY_0nu0.js @@ -1 +1 @@ -import{A as e,D as t,E as n,F as r,I as i,N as a,O as o,P as s,S as ee,_ as c,b as l,c as u,d as te,g as d,h as f,i as p,j as m,k as h,l as g,m as _,p as v,r as y,s as b,u as x,v as S,w as C,x as w}from"./index-DhEa-EvN.js";import{a as T}from"./utils-COFIQvWo.js";var ne={class:`page-container`},re={class:`page-header`},ie={key:1,class:`result-container`},ae={class:`result-header`},oe={class:`result-anchor-nav`},se=[`href`],ce={class:`result-grid result-priority-grid`},le={class:`summary-header`},ue={class:`info-list`},de={class:`info-item`},fe={class:`info-value`,style:{"font-weight":`600`,"font-size":`1.05rem`,color:`var(--text-primary)`}},pe={class:`info-item`},me={class:`info-value`},he={class:`info-item`},ge={class:`info-value`},_e={class:`info-item`},ve={class:`info-value`},E={class:`info-item`},D={class:`info-value`},O={class:`info-item`},k={class:`info-value`},A={class:`summary-header`},j={class:`info-list`},M={class:`info-item`},N={class:`info-value`},P={class:`info-item`},F={class:`info-value`},ye={class:`info-item`},be={class:`info-value`},xe={class:`info-item`},Se={class:`info-value`},Ce={class:`info-item`},we={class:`info-value`},Te={key:1,class:`result-card result-card-highlight`},Ee={class:`summary-header`},De={class:`info-list`},Oe={class:`info-item`},ke={class:`info-value`,style:{"font-weight":`500`}},Ae={key:0,class:`export-buttons-bar`,style:{display:`flex`,gap:`var(--space-2)`,"flex-wrap":`wrap`,"justify-content":`center`,padding:`var(--space-3) 0`}},je={key:1,id:`preview-3d`,class:`viewer-section viewer-section-hero`},Me={class:`summary-header`},Ne=[`src`],Pe={key:2,id:`preview-3d-placeholder`,class:`viewer-section viewer-section-hero`},Fe={class:`summary-header`},Ie={key:3,id:`candidate-schemes`,class:`viewer-section diagnostic-panel`,style:{"margin-top":`var(--space-3)`}},Le={class:`result-card full-width diagnostic-panel-body`},Re={key:0,style:{color:`var(--primary-color)`,"font-weight":`600`}},ze={key:1,style:{color:`var(--warning-color)`,"font-weight":`600`}},Be={id:`ai-side-action`,class:`viewer-section`},Ve={class:`summary-header`},He={key:0,class:`result-grid`},Ue={class:`result-card`},We={class:`info-list`},Ge={class:`info-item`},Ke={class:`info-value`},qe={class:`info-item`},Je={class:`info-value`},Ye={class:`info-item`},Xe={class:`info-value`},Ze={class:`info-item`},Qe={class:`info-value`},$e={class:`result-card result-card-highlight`},et={class:`info-list`},tt={class:`info-item`},nt={class:`info-value`},rt={class:`info-item`},it={class:`info-value`},at={key:0,class:`info-item`},ot={class:`info-value`},st={class:`info-item`},ct={class:`info-value`},lt={class:`inline-note`,style:{"margin-top":`var(--space-2)`,"font-weight":`600`,"font-size":`1rem`,color:`var(--text-primary)`}},ut={class:`result-card`},dt={key:0},ft={class:`recommendations-list`},pt={class:`recommendation-text`},mt={key:1,style:{"margin-top":`var(--space-3)`}},ht={class:`recommendations-list`},gt={class:`recommendation-text`},_t={key:2,style:{"margin-top":`var(--space-3)`}},vt={class:`recommendations-list`},yt={class:`recommendation-text`},bt={id:`export-cam`,class:`viewer-section`},xt={class:`summary-header`},St={class:`result-card`,style:{"margin-bottom":`var(--space-4)`}},I={class:`info-list`},Ct={class:`info-item`},wt={class:`info-item`},Tt={class:`info-item`},Et={class:`info-item`},Dt={class:`checkbox-group`},Ot={class:`result-grid`},kt={class:`result-card`},At={class:`info-list`},jt={class:`info-item`},Mt={class:`info-value`},Nt={class:`info-item`},Pt={class:`info-value`},Ft={class:`info-item`},It={class:`info-value`},Lt={class:`info-item`},Rt={class:`info-value`},zt={class:`result-card`},Bt={class:`info-list`},Vt={class:`info-item`},Ht={class:`info-value`},Ut={class:`info-item`},Wt={class:`info-value`},Gt={class:`result-card full-width`},Kt={class:`result-card full-width`},qt={class:`recommendations-list`},Jt={class:`recommendation-text`},Yt={key:4,id:`llm-report`,class:`viewer-section`},Xt={class:`summary-header`},Zt={key:0,class:`inline-note`,style:{"margin-bottom":`var(--space-4)`,"font-size":`0.95rem`,color:`var(--text-primary)`}},Qt={class:`result-grid`},$t={key:0,class:`recommendations-list`},en={class:`recommendation-text`},tn={key:2,class:`recommendations-list`},nn={class:`recommendation-text`},rn={key:3,class:`inline-note`},L=ee({__name:`ResultView`,setup(ee){let L=g(),R=x(),z=u(),B=m({task:null,loading:!0,error:``,selectedSchemeId:null,previewStatus:`idle`,camLoading:!1,camError:``,camPlan:null,camForm:{mold_steel:`P20`,surface_quality:`standard`,controller:`fanuc`,include_gcode:!1}}),an=[{value:`P20`,label:`P20`},{value:`718H`,label:`718H`},{value:`NAK80`,label:`NAK80`},{value:`S136`,label:`S136`},{value:`H13`,label:`H13`}],on=[{value:`standard`,label:`标准`},{value:`fine`,label:`精细`},{value:`mirror`,label:`镜面`}],sn=[{value:`fanuc`,label:`Fanuc`},{value:`siemens`,label:`Siemens`}],cn=async()=>{try{B.task=await b(`/api/status/${L.params.taskId}`,{method:`POST`}),B.task?.best_scheme_id?B.selectedSchemeId=B.task.best_scheme_id:B.task?.candidate_schemes?.length&&(B.selectedSchemeId=B.task.candidate_schemes[0].scheme_id);let e=B.task?.cam_preferences||{};B.camForm.mold_steel=e.mold_steel||`P20`,B.camForm.surface_quality=e.surface_quality||`standard`,B.camForm.controller=e.controller||`fanuc`,B.camForm.include_gcode=!!e.include_gcode,B.previewStatus=`loading`}catch(e){B.error=p(e,`加载任务详情`)}finally{B.loading=!1}};C(()=>{if(!z.user){R.push(`/login`);return}cn()});let V=_(()=>B.task?.candidate_schemes||[]);_(()=>V.value.length===1);let H=_(()=>V.value.length?V.value.find(e=>e.scheme_id===B.selectedSchemeId)||V.value[0]:null),U=_(()=>H.value?.cavity_data||B.task?.cavity_data||null),ln=_(()=>H.value?.key_info||B.task?.key_info||null),W=_(()=>H.value?.html_file||B.task?.html_file||``),G=_(()=>H.value?.dfm_violations||[]),un=_(()=>U.value?.injection_system||B.task?.plan_result?.injection_system||null),dn=_(()=>H.value?.side_actions||U.value?.side_actions||B.task?.side_actions||null),fn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`AI 倒扣分析解析失败:`,e),null}},pn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`LLM 设计报告解析失败:`,e),null}},K=(e,t=`ai`)=>{if(!e||typeof e!=`object`)return null;let n=[`required`,`not_required`,`manual_review`].includes(e.status)?e.status:`manual_review`,r=[`slider`,`lifter`,`mixed`,`none`,`manual_review`].includes(e.mechanism_recommendation)?e.mechanism_recommendation:`manual_review`,i=Number(e.confidence),a={required:`需要倒扣/抽芯`,not_required:`无需倒扣/抽芯`,manual_review:`需人工确认`};return{source:t,status:n,statusLabel:a[n],mechanismRecommendation:r,mechanismLabel:{slider:`优先滑块`,lifter:`优先斜顶`,mixed:`滑块 + 斜顶`,none:`无需侧向机构`,manual_review:`人工评审`}[r],confidence:Number.isFinite(i)?Math.max(0,Math.min(i,1)):null,conclusion:e.conclusion||a[n],summary:e.summary||``,reasons:Array.isArray(e.reasons)?e.reasons.filter(Boolean).slice(0,5):[],standardAdvice:Array.isArray(e.standard_advice)?e.standard_advice.filter(Boolean).slice(0,5):[],manualReviewItems:Array.isArray(e.manual_review_items)?e.manual_review_items.filter(Boolean).slice(0,4):[]}},mn=_(()=>{let e=dn.value;if(!e||typeof e!=`object`)return null;let t=e.summary||{},n=(e.slider_mechanisms||[]).length,r=(e.lifter_mechanisms||[]).length,i=n+r,a=n&&r?`mixed`:n?`slider`:r?`lifter`:`none`,o=i>0?`required`:t.total_undercut_faces===0?`not_required`:`manual_review`;return K({status:o,confidence:.55,conclusion:o===`required`?`规则分析判断当前产品需要倒扣/抽芯机构`:o===`not_required`?`规则分析未发现必须采用倒扣/抽芯机构的特征`:`当前规则结果不足以完成稳定判断,建议人工复核`,mechanism_recommendation:a===`none`?`none`:a,summary:o===`required`?`检测到 ${n} 个滑块需求、${r} 个斜顶需求,建议先按标准机构路线做结构评审。`:o===`not_required`?`当前方案未发现明显倒扣特征,可优先按常规模具结构推进。`:`现有数据可用于初筛,但不足以替代工程师对复杂倒扣的最终确认。`,reasons:[i>0?`规则分析识别出 ${i} 处侧向机构需求`:`规则分析未识别出明确侧向机构需求`,t.complexity?`当前复杂度判定为 ${t.complexity}`:`当前复杂度信息不足`,`当前倒扣方案若存在大行程滑块,优先按气动抽芯条件评估`].filter(Boolean),standard_advice:(e.recommendations||[]).slice(0,4),manual_review_items:[`结合 3D 预览复核倒扣是否可通过改产品取消`,`确认侧向机构与顶出、冷却、分型面是否存在干涉`]},`rules`)});_(()=>{let e={critical:0,high:0,medium:0,low:0};return(G.value||[]).forEach(t=>{let n=String(t.level||`medium`).toLowerCase();e[n]===void 0?e.medium+=1:e[n]+=1}),e});let q=_(()=>K(fn(B.task?.llm_report||``),`ai`)||mn.value),J=_(()=>{let e=H.value?.side_actions?.summary||{};return{total_slider_count:e.total_slider_count??0,total_lifter_count:e.total_lifter_count??0,total_mechanism_count:e.total_mechanism_count??0,complexity:e.complexity||`未知`}}),Y=_(()=>pn(B.task?.llm_report||``)),hn=_(()=>Y.value&&(Y.value.sections&&Y.value.sections.length>0||!!Y.value.overview)),gn=_(()=>(Y.value?.sections||[]).filter(e=>e.type===`issues`?e.items?.length>0:e.type===`params_table`?e.rows?.length>0:e.type===`recommendations`?e.items?.length>0:!0));_(()=>{let e=B.task?.stage_timings||{};return Object.entries(e).filter(([,e])=>typeof e==`number`).sort((e,t)=>t[1]-e[1])});let _n=_(()=>{let e={critical:0,high:1,medium:2,low:3};return[...B.task?.analysis_result?.design_recommendations||[]].sort((t,n)=>(e[t.priority]??99)-(e[n.priority]??99))});_(()=>_n.value[0]||null);let X=_(()=>G.value?.length||0),vn=_(()=>{let e=U.value?.mold_cavities?.cavity_count;if(typeof e==`number`)return e;let t=U.value?.mold_cavities||ln.value?.mold_cavities||{};return t.cavity_count||Object.keys(t).filter(e=>e.startsWith(`cavity_`)).length||1});_(()=>X.value?X.value>=4?`高风险`:X.value>=2?`中风险`:`低风险`:`低风险`);let yn=[{id:`candidate-schemes`,label:`方案`},{id:`preview-3d`,label:`预览`},{id:`ai-side-action`,label:`AI倒扣分析`},{id:`export-cam`,label:`CAM/CNC`},{id:`llm-report`,label:`设计报告`}],bn=e=>e.map((e,t)=>{let n={_rowId:t};return e.forEach((e,t)=>{n[`col_`+t]=e}),n}),Z=e=>{e&&(B.selectedSchemeId=e),B.previewStatus=`loading`,B.camPlan=null,B.camError=``},xn=()=>{B.previewStatus=`loaded`},Sn=()=>{B.previewStatus=`error`},Q=e=>{if(!e)return`N/A`;if(e.parting?.axis)return`${e.parting.axis} 轴`;let t=e.parting?.direction;return Array.isArray(t)?`[${t.map(e=>Number(e).toFixed(2)).join(`, `)}]`:`N/A`};_(()=>B.task?.analysis_result?.detected_features||[]);let Cn=async(e,t)=>{let n={};z.token&&(n.Authorization=`Bearer ${z.token}`);let r=await fetch(e,{headers:n});if(!r.ok)throw Error(`下载失败 (${r.status}): 无法下载,需要授权`);let i=await r.blob(),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},$=async e=>{try{let t=L.params.taskId,n=await b(`/api/export-mold`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:t,scheme_id:H.value?.scheme_id||B.selectedSchemeId,formats:[e],components:[`cavity`,`core`,`parting_surface`]})});if(n.status===`success`&&n.data.files){for(let e of n.data.files){let n=e.relative_path||(e.filepath?e.filepath.replace(/\\/g,`/`).split(`/`).slice(-2).join(`/`):``);await Cn(e.download_path||`/api/export-download/${encodeURI(n)}?task_id=${encodeURIComponent(t)}`,e.filename)}y(`已导出 ${n.data.files.length} 个 ${e.toUpperCase()} 文件`,`success`)}else n.data.errors&&n.data.errors.length>0&&y(`导出失败: ${n.data.errors[0]}`,`error`)}catch(e){y(`导出失败: ${e.message}`,`error`)}},wn=async()=>{try{B.camLoading=!0,B.camError=``;let e={task_id:L.params.taskId,scheme_id:H.value?.scheme_id,mold_steel:B.camForm.mold_steel,surface_quality:B.camForm.surface_quality,controller:B.camForm.controller,include_gcode:B.camForm.include_gcode},t=await b(`/api/cam/plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});B.camPlan=t?.data||null,t?.cam_preferences&&(B.camForm.mold_steel=t.cam_preferences.mold_steel||B.camForm.mold_steel,B.camForm.surface_quality=t.cam_preferences.surface_quality||B.camForm.surface_quality,B.camForm.controller=t.cam_preferences.controller||B.camForm.controller,B.camForm.include_gcode=!!t.cam_preferences.include_gcode),y(`CAM 计划生成完成`,`success`)}catch(e){B.camPlan=null,B.camError=e.message||`CAM 计划生成失败`,y(`CAM 计划生成失败: ${B.camError}`,`error`)}finally{B.camLoading=!1}};return(ee,u)=>{let p=o(`t-button`),m=o(`t-alert`),g=o(`t-tag`),_=o(`t-table-column`),y=o(`t-table`),b=o(`t-option`),x=o(`t-select`),C=o(`t-loading`);return n(),S(`div`,ne,[f(`div`,re,[w(p,{variant:`text`,onClick:u[0]||=e=>a(R).back()},{default:h(()=>[...u[13]||=[f(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[f(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),l(` 返回 `,-1)]]),_:1}),u[14]||=f(`h1`,null,`分析结果`,-1)]),w(C,{loading:B.loading,text:`加载中...`},{default:h(()=>[B.error?(n(),d(m,{key:0,theme:`error`,message:B.error},null,8,[`message`])):B.task?(n(),S(`div`,ie,[f(`div`,ae,[f(`h2`,null,i(B.task.filename),1),w(g,{type:B.task.status===`completed`?`success`:`danger`},{default:h(()=>[l(i(B.task.status),1)]),_:1},8,[`type`])]),f(`div`,oe,[(n(),S(v,null,t(yn,e=>f(`a`,{key:e.id,class:`anchor-pill`,href:`#`+e.id},i(e.label),9,se)),64))]),f(`div`,ce,[f(`div`,{class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:u[1]||=e=>Z(H.value?.scheme_id)},[f(`div`,le,[u[15]||=f(`h3`,null,`推荐方案`,-1),w(g,{theme:`primary`},{default:h(()=>[l(i(H.value?.title||H.value?.scheme_id||`方案待定`),1)]),_:1})]),f(`div`,ue,[f(`div`,de,[u[16]||=f(`span`,{class:`info-label`},`方案说明`,-1),f(`span`,fe,i(H.value?.summary||H.value?.reason||`基于当前几何与制造约束自动推荐`),1)]),f(`div`,pe,[u[17]||=f(`span`,{class:`info-label`},`分型方向`,-1),f(`span`,me,i(Q(H.value)),1)]),f(`div`,he,[u[18]||=f(`span`,{class:`info-label`},`模具结构`,-1),f(`span`,ge,i(H.value?.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),f(`div`,_e,[u[19]||=f(`span`,{class:`info-label`},`分型面位置`,-1),f(`span`,ve,i(H.value?.offset_label||`中面`),1)]),f(`div`,E,[u[20]||=f(`span`,{class:`info-label`},`型腔数`,-1),f(`span`,D,i(vn.value)+` 腔`,1)]),f(`div`,O,[u[21]||=f(`span`,{class:`info-label`},`预计成型周期`,-1),f(`span`,k,i(un.value?.overall_assessment?.estimated_cycle_time||`N/A`)+` s`,1)])])]),V.value.length>1?(n(),S(`div`,{key:0,class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:u[2]||=e=>Z(V.value[1]?.scheme_id)},[f(`div`,A,[u[23]||=f(`h3`,null,`备选方案`,-1),w(g,{theme:`warning`},{default:h(()=>[...u[22]||=[l(`1 个备选`,-1)]]),_:1})]),f(`div`,j,[(n(!0),S(v,null,t(V.value.slice(1,2),e=>(n(),S(v,{key:`alt-`+e.scheme_id},[f(`div`,M,[u[24]||=f(`span`,{class:`info-label`},`方案说明`,-1),f(`span`,N,i(e.summary||e.reason||`暂无说明`),1)]),f(`div`,P,[u[25]||=f(`span`,{class:`info-label`},`分型方向`,-1),f(`span`,F,i(Q(e)),1)]),f(`div`,ye,[u[26]||=f(`span`,{class:`info-label`},`模具结构`,-1),f(`span`,be,i(e.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),f(`div`,xe,[u[27]||=f(`span`,{class:`info-label`},`分型面位置`,-1),f(`span`,Se,i(e.offset_label||`中面`),1)]),f(`div`,Ce,[u[28]||=f(`span`,{class:`info-label`},`方案总分`,-1),f(`span`,we,i(a(T)(e.score)),1)])],64))),128))])])):(n(),S(`div`,Te,[f(`div`,Ee,[u[30]||=f(`h3`,null,`方案概览`,-1),w(g,{theme:`success`},{default:h(()=>[...u[29]||=[l(`单一方案`,-1)]]),_:1})]),f(`div`,De,[f(`div`,Oe,[u[31]||=f(`span`,{class:`info-label`},`详细方案说明`,-1),f(`span`,ke,i(H.value?.summary||H.value?.reason||`当前仅生成 1 套可用分模方案,已在推荐方案区域展示核心参数。`),1)])])]))]),B.task.status===`completed`?(n(),S(`div`,Ae,[w(p,{type:`primary`,size:`small`,onClick:u[3]||=e=>$(`step`),title:`导出装配体STEP格式(UG/FreeCAD/SolidWorks通用)`},{default:h(()=>[...u[32]||=[l(` 📦 导出 STEP `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[4]||=e=>$(`iges`),title:`导出IGES格式(兼容旧系统)`},{default:h(()=>[...u[33]||=[l(` 导出 IGES `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[5]||=e=>$(`stl`),title:`导出STL网格格式(3D打印预览)`},{default:h(()=>[...u[34]||=[l(` 导出 STL `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[6]||=e=>$(`brep`),title:`导出BRep格式(FreeCAD原生)`},{default:h(()=>[...u[35]||=[l(` 导出 BRep `,-1)]]),_:1})])):c(``,!0),W.value?(n(),S(`div`,je,[f(`div`,Me,[u[37]||=f(`h3`,null,`3D 预览`,-1),w(g,{theme:`primary`},{default:h(()=>[...u[36]||=[l(`重点区域`,-1)]]),_:1})]),B.previewStatus===`error`?(n(),d(m,{key:0,theme:`warning`,title:`预览加载失败`,message:`HTML 已生成但加载异常,请检查该链接是否可访问:`+W.value,style:{"margin-bottom":`var(--space-3)`}},null,8,[`message`])):c(``,!0),(n(),S(`iframe`,{key:W.value,src:W.value,class:`viewer-frame viewer-frame-hero`,onLoad:xn,onError:Sn},null,40,Ne))])):(n(),S(`div`,Pe,[f(`div`,Fe,[u[39]||=f(`h3`,null,`3D 预览`,-1),w(g,{theme:`warning`},{default:h(()=>[...u[38]||=[l(`未生成`,-1)]]),_:1})]),w(m,{theme:`warning`,title:`预览未生成`,message:`当前任务没有返回 HTML 预览链接,属于未生成状态。`})])),V.value.length>1?(n(),S(`div`,Ie,[u[40]||=f(`summary`,null,`📊 方案对比`,-1),f(`div`,Le,[w(y,{data:V.value.slice(0,2),"row-key":`scheme_id`,stripe:``,hover:``,onRowClick:u[7]||=e=>Z(e.row.scheme_id)},{default:h(()=>[w(_,{title:`方案`},{default:h(({rowIndex:e})=>[e===0?(n(),S(`span`,Re,`★ 推荐方案`)):(n(),S(`span`,ze,`备选方案`))]),_:1}),w(_,{title:`方向`},{default:h(({row:e})=>[l(i(Q(e)),1)]),_:1}),w(_,{title:`位置`},{default:h(({row:e})=>[l(i(e.offset_label||`中面`),1)]),_:1}),w(_,{title:`总分`},{default:h(({row:e})=>[l(i(a(T)(e.score)),1)]),_:1}),w(_,{title:`可制造性`},{default:h(({row:e})=>[l(i(a(T)(e.score_breakdown?.manufacturability||0)),1)]),_:1}),w(_,{title:`分型质量`},{default:h(({row:e})=>[l(i(a(T)(e.score_breakdown?.parting_quality||0)),1)]),_:1}),w(_,{title:`倒扣数`},{default:h(({row:e})=>[l(i(e.key_info?.quality_considerations?.undercut_count||0),1)]),_:1}),w(_,{title:`锁模力`},{default:h(({row:e})=>[l(i(e.cavity_data?.manufacturing_info?.estimated_clamping_force||`N/A`),1)]),_:1})]),_:1},8,[`data`])])])):c(``,!0),f(`div`,Be,[f(`div`,Ve,[u[42]||=f(`h3`,null,`AI 倒扣与抽芯分析`,-1),q.value?(n(),d(g,{key:0,type:q.value.status===`required`?`danger`:q.value.status===`not_required`?`success`:`warning`},{default:h(()=>[l(i(q.value.statusLabel),1)]),_:1},8,[`type`])):(n(),d(g,{key:1,theme:`warning`},{default:h(()=>[...u[41]||=[l(`未生成`,-1)]]),_:1}))]),q.value?(n(),S(`div`,He,[f(`div`,Ue,[u[47]||=f(`h4`,null,`规则检测摘要`,-1),f(`div`,We,[f(`div`,Ge,[u[43]||=f(`span`,{class:`info-label`},`检测状态`,-1),f(`span`,Ke,i(J.value.total_mechanism_count>0?`检测到倒扣`:`未检测到倒扣`),1)]),f(`div`,qe,[u[44]||=f(`span`,{class:`info-label`},`滑块数量`,-1),f(`span`,Je,i(J.value.total_slider_count||0),1)]),f(`div`,Ye,[u[45]||=f(`span`,{class:`info-label`},`斜顶数量`,-1),f(`span`,Xe,i(J.value.total_lifter_count||0),1)]),f(`div`,Ze,[u[46]||=f(`span`,{class:`info-label`},`复杂度`,-1),f(`span`,Qe,i(J.value.complexity||`未知`),1)])])]),f(`div`,$e,[u[52]||=f(`h4`,null,`AI 结论`,-1),f(`div`,et,[f(`div`,tt,[u[48]||=f(`span`,{class:`info-label`},`判断结果`,-1),f(`span`,nt,i(q.value.conclusion),1)]),f(`div`,rt,[u[49]||=f(`span`,{class:`info-label`},`推荐方案`,-1),f(`span`,it,i(q.value.mechanismLabel),1)]),q.value.confidence==null?c(``,!0):(n(),S(`div`,at,[u[50]||=f(`span`,{class:`info-label`},`置信度`,-1),f(`span`,ot,i(Math.round(q.value.confidence*100))+`%`,1)])),f(`div`,st,[u[51]||=f(`span`,{class:`info-label`},`分析来源`,-1),f(`span`,ct,i(q.value.source===`ai`?`AI 模型`:`规则回退`),1)])]),f(`div`,lt,i(q.value.summary||`当前任务未返回更多摘要。`),1)]),f(`div`,ut,[q.value.reasons.length?(n(),S(`div`,dt,[u[53]||=f(`h4`,null,`判断依据`,-1),f(`div`,ft,[(n(!0),S(v,null,t(q.value.reasons,(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`ai-reason-`+t},[f(`div`,pt,i(e),1)]))),128))])])):c(``,!0),q.value.standardAdvice.length?(n(),S(`div`,mt,[u[54]||=f(`h4`,null,`标准化建议`,-1),f(`div`,ht,[(n(!0),S(v,null,t(q.value.standardAdvice,(e,t)=>(n(),S(`div`,{class:`recommendation-item low`,key:`ai-advice-`+t},[f(`div`,gt,i(e),1)]))),128))])])):c(``,!0),q.value.manualReviewItems.length?(n(),S(`div`,_t,[u[55]||=f(`h4`,null,`人工复核项`,-1),f(`div`,vt,[(n(!0),S(v,null,t(q.value.manualReviewItems,(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`ai-review-`+t},[f(`div`,yt,i(e),1)]))),128))])])):c(``,!0)])])):(n(),d(m,{key:1,theme:`warning`,title:`AI 结论未生成`,message:`当前任务未生成倒扣与抽芯 AI 分析,请检查模型配置或重新运行分析。`}))]),f(`div`,bt,[f(`div`,xt,[u[57]||=f(`h3`,null,`CAM 与 CNC 加工`,-1),w(g,{theme:`primary`},{default:h(()=>[...u[56]||=[l(`工艺规划`,-1)]]),_:1})]),f(`div`,St,[u[63]||=f(`h4`,null,`CAM 参数`,-1),f(`div`,I,[f(`div`,Ct,[u[58]||=f(`span`,{class:`info-label`},`模具钢`,-1),w(x,{modelValue:B.camForm.mold_steel,"onUpdate:modelValue":u[8]||=e=>B.camForm.mold_steel=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(an,e=>w(b,{key:`steel-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,wt,[u[59]||=f(`span`,{class:`info-label`},`表面质量`,-1),w(x,{modelValue:B.camForm.surface_quality,"onUpdate:modelValue":u[9]||=e=>B.camForm.surface_quality=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(on,e=>w(b,{key:`surf-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,Tt,[u[60]||=f(`span`,{class:`info-label`},`控制器`,-1),w(x,{modelValue:B.camForm.controller,"onUpdate:modelValue":u[10]||=e=>B.camForm.controller=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(sn,e=>w(b,{key:`ctrl-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,Et,[u[62]||=f(`span`,{class:`info-label`},`包含G代码`,-1),f(`label`,Dt,[e(f(`input`,{type:`checkbox`,class:`checkbox-input`,"onUpdate:modelValue":u[11]||=e=>B.camForm.include_gcode=e},null,512),[[te,B.camForm.include_gcode]]),u[61]||=f(`span`,{class:`checkbox-label`},`返回G代码文本`,-1)])])]),w(p,{type:`primary`,size:`small`,disabled:B.camLoading,onClick:u[12]||=e=>wn(),style:{"margin-top":`var(--space-2)`},title:`基于当前选中方案生成CAM工艺计划`},{default:h(()=>[l(i(B.camLoading?`⏳ 生成中...`:`🔧 生成 CAM 计划`),1)]),_:1},8,[`disabled`])]),B.camError?(n(),d(m,{key:0,theme:`warning`,title:`CAM 计划生成失败`,message:B.camError},null,8,[`message`])):B.camPlan?(n(),S(v,{key:2},[f(`div`,Ot,[f(`div`,kt,[u[68]||=f(`h4`,null,`计划摘要`,-1),f(`div`,At,[f(`div`,jt,[u[64]||=f(`span`,{class:`info-label`},`方案ID`,-1),f(`span`,Mt,i(B.camPlan.scheme_id||`N/A`),1)]),f(`div`,Nt,[u[65]||=f(`span`,{class:`info-label`},`总工序数`,-1),f(`span`,Pt,i(B.camPlan.summary?.total_operations||0),1)]),f(`div`,Ft,[u[66]||=f(`span`,{class:`info-label`},`预计总时长`,-1),f(`span`,It,i(a(T)(B.camPlan.summary?.total_estimated_time_min||0))+` min`,1)]),f(`div`,Lt,[u[67]||=f(`span`,{class:`info-label`},`方案可信度`,-1),f(`span`,Rt,i(a(T)(B.camPlan.confidence?.score||0)),1)])])]),f(`div`,zt,[u[71]||=f(`h4`,null,`刀具建议`,-1),f(`div`,Bt,[f(`div`,Vt,[u[69]||=f(`span`,{class:`info-label`},`粗加工刀具`,-1),f(`span`,Ht,i(B.camPlan.tooling_suggestion?.roughing_tool?.tool_id||`N/A`),1)]),f(`div`,Ut,[u[70]||=f(`span`,{class:`info-label`},`精加工刀具`,-1),f(`span`,Wt,i(B.camPlan.tooling_suggestion?.finishing_tool?.tool_id||`N/A`),1)])])])]),f(`div`,Gt,[u[72]||=f(`h4`,null,`工序计划`,-1),w(y,{data:B.camPlan.process_plan||[],"row-key":`seq`,stripe:``},{default:h(()=>[w(_,{colKey:`seq`,title:`序号`}),w(_,{colKey:`operation`,title:`工序`}),w(_,{title:`刀具`},{default:h(({row:e})=>[l(i(e.tool_id||`N/A`),1)]),_:1}),w(_,{title:`主轴转速`},{default:h(({row:e})=>[l(i(a(T)(e.spindle_speed_rpm||0)),1)]),_:1}),w(_,{title:`进给率`},{default:h(({row:e})=>[l(i(a(T)(e.feed_rate_mm_min||0)),1)]),_:1}),w(_,{title:`预计时长(min)`},{default:h(({row:e})=>[l(i(a(T)(e.estimated_time_min||0)),1)]),_:1})]),_:1},8,[`data`])]),f(`div`,Kt,[u[73]||=f(`h4`,null,`制造风险提示`,-1),f(`div`,qt,[(n(!0),S(v,null,t(B.camPlan.manufacturing_warnings||[],(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`cam-warn-`+t},[f(`div`,Jt,i(e),1)]))),128))])])],64)):(n(),d(m,{key:1,theme:`warning`,title:`尚未生成 CAM 计划`,message:`点击上方"生成 CAM 计划"后,将返回工序计划、刀具建议与制造风险提示。`}))]),hn.value?(n(),S(`div`,Yt,[f(`div`,Xt,[u[74]||=f(`h3`,null,`LLM 设计报告`,-1),w(g,{type:(Y.value?.overall_score||0)>=7?`success`:(Y.value?.overall_score||0)>=5?`warning`:`danger`},{default:h(()=>[l(` 评分 `+i(Y.value?.overall_score||`N/A`)+` / 10 `,1)]),_:1},8,[`type`])]),Y.value?.overview?(n(),S(`div`,Zt,i(Y.value?.overview),1)):c(``,!0),f(`div`,Qt,[(n(!0),S(v,null,t(gn.value,(e,a)=>(n(),S(`div`,{key:`dr-sec-`+a,class:s([`result-card`,e.type===`issues`?`result-card-highlight`:``])},[f(`h4`,{style:r(e.type===`issues`?`color: var(--danger-color);`:``)},i(e.heading),5),e.type===`issues`?(n(),S(`div`,$t,[(n(!0),S(v,null,t(e.items,(e,t)=>(n(),S(`div`,{key:`dr-issue-`+t,class:s([`recommendation-item`,e.level===`high`?`high`:e.level===`medium`?`medium`:`low`])},[f(`span`,{class:s([`priority-badge`,e.level||`medium`]),style:{"margin-right":`var(--space-1)`}},i(e.level===`high`?`🔴`:e.level===`medium`?`🟡`:`🟢`),3),f(`div`,en,i(e.content),1)],2))),128))])):e.type===`params_table`?(n(),d(y,{key:1,columns:e.headers.map((e,t)=>({colKey:`col_`+t,title:e})),data:bn(e.rows),"row-key":`_rowId`,stripe:``,bordered:``},null,8,[`columns`,`data`])):e.type===`recommendations`?(n(),S(`div`,tn,[(n(!0),S(v,null,t(e.items,(e,t)=>(n(),S(`div`,{class:`recommendation-item low`,key:`dr-rec-`+t},[f(`div`,nn,`💡 `+i(e),1)]))),128))])):(n(),S(`div`,rn,i(JSON.stringify(e)),1))],2))),128))])])):c(``,!0)])):c(``,!0)]),_:1},8,[`loading`])])}}});export{L as default}; \ No newline at end of file +import{A as e,D as t,E as n,F as r,I as i,N as a,O as o,P as s,S as ee,_ as c,b as l,c as u,d as te,g as d,h as f,i as p,j as m,k as h,l as g,m as _,p as v,r as y,s as b,u as x,v as S,w as C,x as w}from"./index-EqJJKSSk.js";import{a as T}from"./utils-COFIQvWo.js";var ne={class:`page-container`},re={class:`page-header`},ie={key:1,class:`result-container`},ae={class:`result-header`},oe={class:`result-anchor-nav`},se=[`href`],ce={class:`result-grid result-priority-grid`},le={class:`summary-header`},ue={class:`info-list`},de={class:`info-item`},fe={class:`info-value`,style:{"font-weight":`600`,"font-size":`1.05rem`,color:`var(--text-primary)`}},pe={class:`info-item`},me={class:`info-value`},he={class:`info-item`},ge={class:`info-value`},_e={class:`info-item`},ve={class:`info-value`},E={class:`info-item`},D={class:`info-value`},O={class:`info-item`},k={class:`info-value`},A={class:`summary-header`},j={class:`info-list`},M={class:`info-item`},N={class:`info-value`},P={class:`info-item`},F={class:`info-value`},ye={class:`info-item`},be={class:`info-value`},xe={class:`info-item`},Se={class:`info-value`},Ce={class:`info-item`},we={class:`info-value`},Te={key:1,class:`result-card result-card-highlight`},Ee={class:`summary-header`},De={class:`info-list`},Oe={class:`info-item`},ke={class:`info-value`,style:{"font-weight":`500`}},Ae={key:0,class:`export-buttons-bar`,style:{display:`flex`,gap:`var(--space-2)`,"flex-wrap":`wrap`,"justify-content":`center`,padding:`var(--space-3) 0`}},je={key:1,id:`preview-3d`,class:`viewer-section viewer-section-hero`},Me={class:`summary-header`},Ne=[`src`],Pe={key:2,id:`preview-3d-placeholder`,class:`viewer-section viewer-section-hero`},Fe={class:`summary-header`},Ie={key:3,id:`candidate-schemes`,class:`viewer-section diagnostic-panel`,style:{"margin-top":`var(--space-3)`}},Le={class:`result-card full-width diagnostic-panel-body`},Re={key:0,style:{color:`var(--primary-color)`,"font-weight":`600`}},ze={key:1,style:{color:`var(--warning-color)`,"font-weight":`600`}},Be={id:`ai-side-action`,class:`viewer-section`},Ve={class:`summary-header`},He={key:0,class:`result-grid`},Ue={class:`result-card`},We={class:`info-list`},Ge={class:`info-item`},Ke={class:`info-value`},qe={class:`info-item`},Je={class:`info-value`},Ye={class:`info-item`},Xe={class:`info-value`},Ze={class:`info-item`},Qe={class:`info-value`},$e={class:`result-card result-card-highlight`},et={class:`info-list`},tt={class:`info-item`},nt={class:`info-value`},rt={class:`info-item`},it={class:`info-value`},at={key:0,class:`info-item`},ot={class:`info-value`},st={class:`info-item`},ct={class:`info-value`},lt={class:`inline-note`,style:{"margin-top":`var(--space-2)`,"font-weight":`600`,"font-size":`1rem`,color:`var(--text-primary)`}},ut={class:`result-card`},dt={key:0},ft={class:`recommendations-list`},pt={class:`recommendation-text`},mt={key:1,style:{"margin-top":`var(--space-3)`}},ht={class:`recommendations-list`},gt={class:`recommendation-text`},_t={key:2,style:{"margin-top":`var(--space-3)`}},vt={class:`recommendations-list`},yt={class:`recommendation-text`},bt={id:`export-cam`,class:`viewer-section`},xt={class:`summary-header`},St={class:`result-card`,style:{"margin-bottom":`var(--space-4)`}},I={class:`info-list`},Ct={class:`info-item`},wt={class:`info-item`},Tt={class:`info-item`},Et={class:`info-item`},Dt={class:`checkbox-group`},Ot={class:`result-grid`},kt={class:`result-card`},At={class:`info-list`},jt={class:`info-item`},Mt={class:`info-value`},Nt={class:`info-item`},Pt={class:`info-value`},Ft={class:`info-item`},It={class:`info-value`},Lt={class:`info-item`},Rt={class:`info-value`},zt={class:`result-card`},Bt={class:`info-list`},Vt={class:`info-item`},Ht={class:`info-value`},Ut={class:`info-item`},Wt={class:`info-value`},Gt={class:`result-card full-width`},Kt={class:`result-card full-width`},qt={class:`recommendations-list`},Jt={class:`recommendation-text`},Yt={key:4,id:`llm-report`,class:`viewer-section`},Xt={class:`summary-header`},Zt={key:0,class:`inline-note`,style:{"margin-bottom":`var(--space-4)`,"font-size":`0.95rem`,color:`var(--text-primary)`}},Qt={class:`result-grid`},$t={key:0,class:`recommendations-list`},en={class:`recommendation-text`},tn={key:2,class:`recommendations-list`},nn={class:`recommendation-text`},rn={key:3,class:`inline-note`},L=ee({__name:`ResultView`,setup(ee){let L=g(),R=x(),z=u(),B=m({task:null,loading:!0,error:``,selectedSchemeId:null,previewStatus:`idle`,camLoading:!1,camError:``,camPlan:null,camForm:{mold_steel:`P20`,surface_quality:`standard`,controller:`fanuc`,include_gcode:!1}}),an=[{value:`P20`,label:`P20`},{value:`718H`,label:`718H`},{value:`NAK80`,label:`NAK80`},{value:`S136`,label:`S136`},{value:`H13`,label:`H13`}],on=[{value:`standard`,label:`标准`},{value:`fine`,label:`精细`},{value:`mirror`,label:`镜面`}],sn=[{value:`fanuc`,label:`Fanuc`},{value:`siemens`,label:`Siemens`}],cn=async()=>{try{B.task=await b(`/api/status/${L.params.taskId}`,{method:`POST`}),B.task?.best_scheme_id?B.selectedSchemeId=B.task.best_scheme_id:B.task?.candidate_schemes?.length&&(B.selectedSchemeId=B.task.candidate_schemes[0].scheme_id);let e=B.task?.cam_preferences||{};B.camForm.mold_steel=e.mold_steel||`P20`,B.camForm.surface_quality=e.surface_quality||`standard`,B.camForm.controller=e.controller||`fanuc`,B.camForm.include_gcode=!!e.include_gcode,B.previewStatus=`loading`}catch(e){B.error=p(e,`加载任务详情`)}finally{B.loading=!1}};C(()=>{if(!z.user){R.push(`/login`);return}cn()});let V=_(()=>B.task?.candidate_schemes||[]);_(()=>V.value.length===1);let H=_(()=>V.value.length?V.value.find(e=>e.scheme_id===B.selectedSchemeId)||V.value[0]:null),U=_(()=>H.value?.cavity_data||B.task?.cavity_data||null),ln=_(()=>H.value?.key_info||B.task?.key_info||null),W=_(()=>H.value?.html_file||B.task?.html_file||``),G=_(()=>H.value?.dfm_violations||[]),un=_(()=>U.value?.injection_system||B.task?.plan_result?.injection_system||null),dn=_(()=>H.value?.side_actions||U.value?.side_actions||B.task?.side_actions||null),fn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`AI 倒扣分析解析失败:`,e),null}},pn=e=>{let t=String(e||``).match(/\s*([\s\S]*?)\s*/);if(!t)return null;try{return JSON.parse(t[1])}catch(e){return console.warn(`LLM 设计报告解析失败:`,e),null}},K=(e,t=`ai`)=>{if(!e||typeof e!=`object`)return null;let n=[`required`,`not_required`,`manual_review`].includes(e.status)?e.status:`manual_review`,r=[`slider`,`lifter`,`mixed`,`none`,`manual_review`].includes(e.mechanism_recommendation)?e.mechanism_recommendation:`manual_review`,i=Number(e.confidence),a={required:`需要倒扣/抽芯`,not_required:`无需倒扣/抽芯`,manual_review:`需人工确认`};return{source:t,status:n,statusLabel:a[n],mechanismRecommendation:r,mechanismLabel:{slider:`优先滑块`,lifter:`优先斜顶`,mixed:`滑块 + 斜顶`,none:`无需侧向机构`,manual_review:`人工评审`}[r],confidence:Number.isFinite(i)?Math.max(0,Math.min(i,1)):null,conclusion:e.conclusion||a[n],summary:e.summary||``,reasons:Array.isArray(e.reasons)?e.reasons.filter(Boolean).slice(0,5):[],standardAdvice:Array.isArray(e.standard_advice)?e.standard_advice.filter(Boolean).slice(0,5):[],manualReviewItems:Array.isArray(e.manual_review_items)?e.manual_review_items.filter(Boolean).slice(0,4):[]}},mn=_(()=>{let e=dn.value;if(!e||typeof e!=`object`)return null;let t=e.summary||{},n=(e.slider_mechanisms||[]).length,r=(e.lifter_mechanisms||[]).length,i=n+r,a=n&&r?`mixed`:n?`slider`:r?`lifter`:`none`,o=i>0?`required`:t.total_undercut_faces===0?`not_required`:`manual_review`;return K({status:o,confidence:.55,conclusion:o===`required`?`规则分析判断当前产品需要倒扣/抽芯机构`:o===`not_required`?`规则分析未发现必须采用倒扣/抽芯机构的特征`:`当前规则结果不足以完成稳定判断,建议人工复核`,mechanism_recommendation:a===`none`?`none`:a,summary:o===`required`?`检测到 ${n} 个滑块需求、${r} 个斜顶需求,建议先按标准机构路线做结构评审。`:o===`not_required`?`当前方案未发现明显倒扣特征,可优先按常规模具结构推进。`:`现有数据可用于初筛,但不足以替代工程师对复杂倒扣的最终确认。`,reasons:[i>0?`规则分析识别出 ${i} 处侧向机构需求`:`规则分析未识别出明确侧向机构需求`,t.complexity?`当前复杂度判定为 ${t.complexity}`:`当前复杂度信息不足`,`当前倒扣方案若存在大行程滑块,优先按气动抽芯条件评估`].filter(Boolean),standard_advice:(e.recommendations||[]).slice(0,4),manual_review_items:[`结合 3D 预览复核倒扣是否可通过改产品取消`,`确认侧向机构与顶出、冷却、分型面是否存在干涉`]},`rules`)});_(()=>{let e={critical:0,high:0,medium:0,low:0};return(G.value||[]).forEach(t=>{let n=String(t.level||`medium`).toLowerCase();e[n]===void 0?e.medium+=1:e[n]+=1}),e});let q=_(()=>K(fn(B.task?.llm_report||``),`ai`)||mn.value),J=_(()=>{let e=H.value?.side_actions?.summary||{};return{total_slider_count:e.total_slider_count??0,total_lifter_count:e.total_lifter_count??0,total_mechanism_count:e.total_mechanism_count??0,complexity:e.complexity||`未知`}}),Y=_(()=>pn(B.task?.llm_report||``)),hn=_(()=>Y.value&&(Y.value.sections&&Y.value.sections.length>0||!!Y.value.overview)),gn=_(()=>(Y.value?.sections||[]).filter(e=>e.type===`issues`?e.items?.length>0:e.type===`params_table`?e.rows?.length>0:e.type===`recommendations`?e.items?.length>0:!0));_(()=>{let e=B.task?.stage_timings||{};return Object.entries(e).filter(([,e])=>typeof e==`number`).sort((e,t)=>t[1]-e[1])});let _n=_(()=>{let e={critical:0,high:1,medium:2,low:3};return[...B.task?.analysis_result?.design_recommendations||[]].sort((t,n)=>(e[t.priority]??99)-(e[n.priority]??99))});_(()=>_n.value[0]||null);let X=_(()=>G.value?.length||0),vn=_(()=>{let e=U.value?.mold_cavities?.cavity_count;if(typeof e==`number`)return e;let t=U.value?.mold_cavities||ln.value?.mold_cavities||{};return t.cavity_count||Object.keys(t).filter(e=>e.startsWith(`cavity_`)).length||1});_(()=>X.value?X.value>=4?`高风险`:X.value>=2?`中风险`:`低风险`:`低风险`);let yn=[{id:`candidate-schemes`,label:`方案`},{id:`preview-3d`,label:`预览`},{id:`ai-side-action`,label:`AI倒扣分析`},{id:`export-cam`,label:`CAM/CNC`},{id:`llm-report`,label:`设计报告`}],bn=e=>e.map((e,t)=>{let n={_rowId:t};return e.forEach((e,t)=>{n[`col_`+t]=e}),n}),Z=e=>{e&&(B.selectedSchemeId=e),B.previewStatus=`loading`,B.camPlan=null,B.camError=``},xn=()=>{B.previewStatus=`loaded`},Sn=()=>{B.previewStatus=`error`},Q=e=>{if(!e)return`N/A`;if(e.parting?.axis)return`${e.parting.axis} 轴`;let t=e.parting?.direction;return Array.isArray(t)?`[${t.map(e=>Number(e).toFixed(2)).join(`, `)}]`:`N/A`};_(()=>B.task?.analysis_result?.detected_features||[]);let Cn=async(e,t)=>{let n={};z.token&&(n.Authorization=`Bearer ${z.token}`);let r=await fetch(e,{headers:n});if(!r.ok)throw Error(`下载失败 (${r.status}): 无法下载,需要授权`);let i=await r.blob(),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},$=async e=>{try{let t=L.params.taskId,n=await b(`/api/export-mold`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({task_id:t,scheme_id:H.value?.scheme_id||B.selectedSchemeId,formats:[e],components:[`cavity`,`core`,`parting_surface`]})});if(n.status===`success`&&n.data.files){for(let e of n.data.files){let n=e.relative_path||(e.filepath?e.filepath.replace(/\\/g,`/`).split(`/`).slice(-2).join(`/`):``);await Cn(e.download_path||`/api/export-download/${encodeURI(n)}?task_id=${encodeURIComponent(t)}`,e.filename)}y(`已导出 ${n.data.files.length} 个 ${e.toUpperCase()} 文件`,`success`)}else n.data.errors&&n.data.errors.length>0&&y(`导出失败: ${n.data.errors[0]}`,`error`)}catch(e){y(`导出失败: ${e.message}`,`error`)}},wn=async()=>{try{B.camLoading=!0,B.camError=``;let e={task_id:L.params.taskId,scheme_id:H.value?.scheme_id,mold_steel:B.camForm.mold_steel,surface_quality:B.camForm.surface_quality,controller:B.camForm.controller,include_gcode:B.camForm.include_gcode},t=await b(`/api/cam/plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});B.camPlan=t?.data||null,t?.cam_preferences&&(B.camForm.mold_steel=t.cam_preferences.mold_steel||B.camForm.mold_steel,B.camForm.surface_quality=t.cam_preferences.surface_quality||B.camForm.surface_quality,B.camForm.controller=t.cam_preferences.controller||B.camForm.controller,B.camForm.include_gcode=!!t.cam_preferences.include_gcode),y(`CAM 计划生成完成`,`success`)}catch(e){B.camPlan=null,B.camError=e.message||`CAM 计划生成失败`,y(`CAM 计划生成失败: ${B.camError}`,`error`)}finally{B.camLoading=!1}};return(ee,u)=>{let p=o(`t-button`),m=o(`t-alert`),g=o(`t-tag`),_=o(`t-table-column`),y=o(`t-table`),b=o(`t-option`),x=o(`t-select`),C=o(`t-loading`);return n(),S(`div`,ne,[f(`div`,re,[w(p,{variant:`text`,onClick:u[0]||=e=>a(R).back()},{default:h(()=>[...u[13]||=[f(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[f(`path`,{d:`M19 12H5M12 19l-7-7 7-7`})],-1),l(` 返回 `,-1)]]),_:1}),u[14]||=f(`h1`,null,`分析结果`,-1)]),w(C,{loading:B.loading,text:`加载中...`},{default:h(()=>[B.error?(n(),d(m,{key:0,theme:`error`,message:B.error},null,8,[`message`])):B.task?(n(),S(`div`,ie,[f(`div`,ae,[f(`h2`,null,i(B.task.filename),1),w(g,{type:B.task.status===`completed`?`success`:`danger`},{default:h(()=>[l(i(B.task.status),1)]),_:1},8,[`type`])]),f(`div`,oe,[(n(),S(v,null,t(yn,e=>f(`a`,{key:e.id,class:`anchor-pill`,href:`#`+e.id},i(e.label),9,se)),64))]),f(`div`,ce,[f(`div`,{class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:u[1]||=e=>Z(H.value?.scheme_id)},[f(`div`,le,[u[15]||=f(`h3`,null,`推荐方案`,-1),w(g,{theme:`primary`},{default:h(()=>[l(i(H.value?.title||H.value?.scheme_id||`方案待定`),1)]),_:1})]),f(`div`,ue,[f(`div`,de,[u[16]||=f(`span`,{class:`info-label`},`方案说明`,-1),f(`span`,fe,i(H.value?.summary||H.value?.reason||`基于当前几何与制造约束自动推荐`),1)]),f(`div`,pe,[u[17]||=f(`span`,{class:`info-label`},`分型方向`,-1),f(`span`,me,i(Q(H.value)),1)]),f(`div`,he,[u[18]||=f(`span`,{class:`info-label`},`模具结构`,-1),f(`span`,ge,i(H.value?.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),f(`div`,_e,[u[19]||=f(`span`,{class:`info-label`},`分型面位置`,-1),f(`span`,ve,i(H.value?.offset_label||`中面`),1)]),f(`div`,E,[u[20]||=f(`span`,{class:`info-label`},`型腔数`,-1),f(`span`,D,i(vn.value)+` 腔`,1)]),f(`div`,O,[u[21]||=f(`span`,{class:`info-label`},`预计成型周期`,-1),f(`span`,k,i(un.value?.overall_assessment?.estimated_cycle_time||`N/A`)+` s`,1)])])]),V.value.length>1?(n(),S(`div`,{key:0,class:`result-card result-card-highlight`,style:{cursor:`pointer`},onClick:u[2]||=e=>Z(V.value[1]?.scheme_id)},[f(`div`,A,[u[23]||=f(`h3`,null,`备选方案`,-1),w(g,{theme:`warning`},{default:h(()=>[...u[22]||=[l(`1 个备选`,-1)]]),_:1})]),f(`div`,j,[(n(!0),S(v,null,t(V.value.slice(1,2),e=>(n(),S(v,{key:`alt-`+e.scheme_id},[f(`div`,M,[u[24]||=f(`span`,{class:`info-label`},`方案说明`,-1),f(`span`,N,i(e.summary||e.reason||`暂无说明`),1)]),f(`div`,P,[u[25]||=f(`span`,{class:`info-label`},`分型方向`,-1),f(`span`,F,i(Q(e)),1)]),f(`div`,ye,[u[26]||=f(`span`,{class:`info-label`},`模具结构`,-1),f(`span`,be,i(e.mold_structure_type===`two_half_cavity`?`两板半腔(无独立模芯)`:`型腔 + 模芯`),1)]),f(`div`,xe,[u[27]||=f(`span`,{class:`info-label`},`分型面位置`,-1),f(`span`,Se,i(e.offset_label||`中面`),1)]),f(`div`,Ce,[u[28]||=f(`span`,{class:`info-label`},`方案总分`,-1),f(`span`,we,i(a(T)(e.score)),1)])],64))),128))])])):(n(),S(`div`,Te,[f(`div`,Ee,[u[30]||=f(`h3`,null,`方案概览`,-1),w(g,{theme:`success`},{default:h(()=>[...u[29]||=[l(`单一方案`,-1)]]),_:1})]),f(`div`,De,[f(`div`,Oe,[u[31]||=f(`span`,{class:`info-label`},`详细方案说明`,-1),f(`span`,ke,i(H.value?.summary||H.value?.reason||`当前仅生成 1 套可用分模方案,已在推荐方案区域展示核心参数。`),1)])])]))]),B.task.status===`completed`?(n(),S(`div`,Ae,[w(p,{type:`primary`,size:`small`,onClick:u[3]||=e=>$(`step`),title:`导出装配体STEP格式(UG/FreeCAD/SolidWorks通用)`},{default:h(()=>[...u[32]||=[l(` 📦 导出 STEP `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[4]||=e=>$(`iges`),title:`导出IGES格式(兼容旧系统)`},{default:h(()=>[...u[33]||=[l(` 导出 IGES `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[5]||=e=>$(`stl`),title:`导出STL网格格式(3D打印预览)`},{default:h(()=>[...u[34]||=[l(` 导出 STL `,-1)]]),_:1}),w(p,{type:`default`,size:`small`,onClick:u[6]||=e=>$(`brep`),title:`导出BRep格式(FreeCAD原生)`},{default:h(()=>[...u[35]||=[l(` 导出 BRep `,-1)]]),_:1})])):c(``,!0),W.value?(n(),S(`div`,je,[f(`div`,Me,[u[37]||=f(`h3`,null,`3D 预览`,-1),w(g,{theme:`primary`},{default:h(()=>[...u[36]||=[l(`重点区域`,-1)]]),_:1})]),B.previewStatus===`error`?(n(),d(m,{key:0,theme:`warning`,title:`预览加载失败`,message:`HTML 已生成但加载异常,请检查该链接是否可访问:`+W.value,style:{"margin-bottom":`var(--space-3)`}},null,8,[`message`])):c(``,!0),(n(),S(`iframe`,{key:W.value,src:W.value,class:`viewer-frame viewer-frame-hero`,onLoad:xn,onError:Sn},null,40,Ne))])):(n(),S(`div`,Pe,[f(`div`,Fe,[u[39]||=f(`h3`,null,`3D 预览`,-1),w(g,{theme:`warning`},{default:h(()=>[...u[38]||=[l(`未生成`,-1)]]),_:1})]),w(m,{theme:`warning`,title:`预览未生成`,message:`当前任务没有返回 HTML 预览链接,属于未生成状态。`})])),V.value.length>1?(n(),S(`div`,Ie,[u[40]||=f(`summary`,null,`📊 方案对比`,-1),f(`div`,Le,[w(y,{data:V.value.slice(0,2),"row-key":`scheme_id`,stripe:``,hover:``,onRowClick:u[7]||=e=>Z(e.row.scheme_id)},{default:h(()=>[w(_,{title:`方案`},{default:h(({rowIndex:e})=>[e===0?(n(),S(`span`,Re,`★ 推荐方案`)):(n(),S(`span`,ze,`备选方案`))]),_:1}),w(_,{title:`方向`},{default:h(({row:e})=>[l(i(Q(e)),1)]),_:1}),w(_,{title:`位置`},{default:h(({row:e})=>[l(i(e.offset_label||`中面`),1)]),_:1}),w(_,{title:`总分`},{default:h(({row:e})=>[l(i(a(T)(e.score)),1)]),_:1}),w(_,{title:`可制造性`},{default:h(({row:e})=>[l(i(a(T)(e.score_breakdown?.manufacturability||0)),1)]),_:1}),w(_,{title:`分型质量`},{default:h(({row:e})=>[l(i(a(T)(e.score_breakdown?.parting_quality||0)),1)]),_:1}),w(_,{title:`倒扣数`},{default:h(({row:e})=>[l(i(e.key_info?.quality_considerations?.undercut_count||0),1)]),_:1}),w(_,{title:`锁模力`},{default:h(({row:e})=>[l(i(e.cavity_data?.manufacturing_info?.estimated_clamping_force||`N/A`),1)]),_:1})]),_:1},8,[`data`])])])):c(``,!0),f(`div`,Be,[f(`div`,Ve,[u[42]||=f(`h3`,null,`AI 倒扣与抽芯分析`,-1),q.value?(n(),d(g,{key:0,type:q.value.status===`required`?`danger`:q.value.status===`not_required`?`success`:`warning`},{default:h(()=>[l(i(q.value.statusLabel),1)]),_:1},8,[`type`])):(n(),d(g,{key:1,theme:`warning`},{default:h(()=>[...u[41]||=[l(`未生成`,-1)]]),_:1}))]),q.value?(n(),S(`div`,He,[f(`div`,Ue,[u[47]||=f(`h4`,null,`规则检测摘要`,-1),f(`div`,We,[f(`div`,Ge,[u[43]||=f(`span`,{class:`info-label`},`检测状态`,-1),f(`span`,Ke,i(J.value.total_mechanism_count>0?`检测到倒扣`:`未检测到倒扣`),1)]),f(`div`,qe,[u[44]||=f(`span`,{class:`info-label`},`滑块数量`,-1),f(`span`,Je,i(J.value.total_slider_count||0),1)]),f(`div`,Ye,[u[45]||=f(`span`,{class:`info-label`},`斜顶数量`,-1),f(`span`,Xe,i(J.value.total_lifter_count||0),1)]),f(`div`,Ze,[u[46]||=f(`span`,{class:`info-label`},`复杂度`,-1),f(`span`,Qe,i(J.value.complexity||`未知`),1)])])]),f(`div`,$e,[u[52]||=f(`h4`,null,`AI 结论`,-1),f(`div`,et,[f(`div`,tt,[u[48]||=f(`span`,{class:`info-label`},`判断结果`,-1),f(`span`,nt,i(q.value.conclusion),1)]),f(`div`,rt,[u[49]||=f(`span`,{class:`info-label`},`推荐方案`,-1),f(`span`,it,i(q.value.mechanismLabel),1)]),q.value.confidence==null?c(``,!0):(n(),S(`div`,at,[u[50]||=f(`span`,{class:`info-label`},`置信度`,-1),f(`span`,ot,i(Math.round(q.value.confidence*100))+`%`,1)])),f(`div`,st,[u[51]||=f(`span`,{class:`info-label`},`分析来源`,-1),f(`span`,ct,i(q.value.source===`ai`?`AI 模型`:`规则回退`),1)])]),f(`div`,lt,i(q.value.summary||`当前任务未返回更多摘要。`),1)]),f(`div`,ut,[q.value.reasons.length?(n(),S(`div`,dt,[u[53]||=f(`h4`,null,`判断依据`,-1),f(`div`,ft,[(n(!0),S(v,null,t(q.value.reasons,(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`ai-reason-`+t},[f(`div`,pt,i(e),1)]))),128))])])):c(``,!0),q.value.standardAdvice.length?(n(),S(`div`,mt,[u[54]||=f(`h4`,null,`标准化建议`,-1),f(`div`,ht,[(n(!0),S(v,null,t(q.value.standardAdvice,(e,t)=>(n(),S(`div`,{class:`recommendation-item low`,key:`ai-advice-`+t},[f(`div`,gt,i(e),1)]))),128))])])):c(``,!0),q.value.manualReviewItems.length?(n(),S(`div`,_t,[u[55]||=f(`h4`,null,`人工复核项`,-1),f(`div`,vt,[(n(!0),S(v,null,t(q.value.manualReviewItems,(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`ai-review-`+t},[f(`div`,yt,i(e),1)]))),128))])])):c(``,!0)])])):(n(),d(m,{key:1,theme:`warning`,title:`AI 结论未生成`,message:`当前任务未生成倒扣与抽芯 AI 分析,请检查模型配置或重新运行分析。`}))]),f(`div`,bt,[f(`div`,xt,[u[57]||=f(`h3`,null,`CAM 与 CNC 加工`,-1),w(g,{theme:`primary`},{default:h(()=>[...u[56]||=[l(`工艺规划`,-1)]]),_:1})]),f(`div`,St,[u[63]||=f(`h4`,null,`CAM 参数`,-1),f(`div`,I,[f(`div`,Ct,[u[58]||=f(`span`,{class:`info-label`},`模具钢`,-1),w(x,{modelValue:B.camForm.mold_steel,"onUpdate:modelValue":u[8]||=e=>B.camForm.mold_steel=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(an,e=>w(b,{key:`steel-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,wt,[u[59]||=f(`span`,{class:`info-label`},`表面质量`,-1),w(x,{modelValue:B.camForm.surface_quality,"onUpdate:modelValue":u[9]||=e=>B.camForm.surface_quality=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(on,e=>w(b,{key:`surf-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,Tt,[u[60]||=f(`span`,{class:`info-label`},`控制器`,-1),w(x,{modelValue:B.camForm.controller,"onUpdate:modelValue":u[10]||=e=>B.camForm.controller=e,style:{width:`200px`}},{default:h(()=>[(n(),S(v,null,t(sn,e=>w(b,{key:`ctrl-`+e.value,value:e.value,label:e.label},null,8,[`value`,`label`])),64))]),_:1},8,[`modelValue`])]),f(`div`,Et,[u[62]||=f(`span`,{class:`info-label`},`包含G代码`,-1),f(`label`,Dt,[e(f(`input`,{type:`checkbox`,class:`checkbox-input`,"onUpdate:modelValue":u[11]||=e=>B.camForm.include_gcode=e},null,512),[[te,B.camForm.include_gcode]]),u[61]||=f(`span`,{class:`checkbox-label`},`返回G代码文本`,-1)])])]),w(p,{type:`primary`,size:`small`,disabled:B.camLoading,onClick:u[12]||=e=>wn(),style:{"margin-top":`var(--space-2)`},title:`基于当前选中方案生成CAM工艺计划`},{default:h(()=>[l(i(B.camLoading?`⏳ 生成中...`:`🔧 生成 CAM 计划`),1)]),_:1},8,[`disabled`])]),B.camError?(n(),d(m,{key:0,theme:`warning`,title:`CAM 计划生成失败`,message:B.camError},null,8,[`message`])):B.camPlan?(n(),S(v,{key:2},[f(`div`,Ot,[f(`div`,kt,[u[68]||=f(`h4`,null,`计划摘要`,-1),f(`div`,At,[f(`div`,jt,[u[64]||=f(`span`,{class:`info-label`},`方案ID`,-1),f(`span`,Mt,i(B.camPlan.scheme_id||`N/A`),1)]),f(`div`,Nt,[u[65]||=f(`span`,{class:`info-label`},`总工序数`,-1),f(`span`,Pt,i(B.camPlan.summary?.total_operations||0),1)]),f(`div`,Ft,[u[66]||=f(`span`,{class:`info-label`},`预计总时长`,-1),f(`span`,It,i(a(T)(B.camPlan.summary?.total_estimated_time_min||0))+` min`,1)]),f(`div`,Lt,[u[67]||=f(`span`,{class:`info-label`},`方案可信度`,-1),f(`span`,Rt,i(a(T)(B.camPlan.confidence?.score||0)),1)])])]),f(`div`,zt,[u[71]||=f(`h4`,null,`刀具建议`,-1),f(`div`,Bt,[f(`div`,Vt,[u[69]||=f(`span`,{class:`info-label`},`粗加工刀具`,-1),f(`span`,Ht,i(B.camPlan.tooling_suggestion?.roughing_tool?.tool_id||`N/A`),1)]),f(`div`,Ut,[u[70]||=f(`span`,{class:`info-label`},`精加工刀具`,-1),f(`span`,Wt,i(B.camPlan.tooling_suggestion?.finishing_tool?.tool_id||`N/A`),1)])])])]),f(`div`,Gt,[u[72]||=f(`h4`,null,`工序计划`,-1),w(y,{data:B.camPlan.process_plan||[],"row-key":`seq`,stripe:``},{default:h(()=>[w(_,{colKey:`seq`,title:`序号`}),w(_,{colKey:`operation`,title:`工序`}),w(_,{title:`刀具`},{default:h(({row:e})=>[l(i(e.tool_id||`N/A`),1)]),_:1}),w(_,{title:`主轴转速`},{default:h(({row:e})=>[l(i(a(T)(e.spindle_speed_rpm||0)),1)]),_:1}),w(_,{title:`进给率`},{default:h(({row:e})=>[l(i(a(T)(e.feed_rate_mm_min||0)),1)]),_:1}),w(_,{title:`预计时长(min)`},{default:h(({row:e})=>[l(i(a(T)(e.estimated_time_min||0)),1)]),_:1})]),_:1},8,[`data`])]),f(`div`,Kt,[u[73]||=f(`h4`,null,`制造风险提示`,-1),f(`div`,qt,[(n(!0),S(v,null,t(B.camPlan.manufacturing_warnings||[],(e,t)=>(n(),S(`div`,{class:`recommendation-item medium`,key:`cam-warn-`+t},[f(`div`,Jt,i(e),1)]))),128))])])],64)):(n(),d(m,{key:1,theme:`warning`,title:`尚未生成 CAM 计划`,message:`点击上方"生成 CAM 计划"后,将返回工序计划、刀具建议与制造风险提示。`}))]),hn.value?(n(),S(`div`,Yt,[f(`div`,Xt,[u[74]||=f(`h3`,null,`LLM 设计报告`,-1),w(g,{type:(Y.value?.overall_score||0)>=7?`success`:(Y.value?.overall_score||0)>=5?`warning`:`danger`},{default:h(()=>[l(` 评分 `+i(Y.value?.overall_score||`N/A`)+` / 10 `,1)]),_:1},8,[`type`])]),Y.value?.overview?(n(),S(`div`,Zt,i(Y.value?.overview),1)):c(``,!0),f(`div`,Qt,[(n(!0),S(v,null,t(gn.value,(e,a)=>(n(),S(`div`,{key:`dr-sec-`+a,class:s([`result-card`,e.type===`issues`?`result-card-highlight`:``])},[f(`h4`,{style:r(e.type===`issues`?`color: var(--danger-color);`:``)},i(e.heading),5),e.type===`issues`?(n(),S(`div`,$t,[(n(!0),S(v,null,t(e.items,(e,t)=>(n(),S(`div`,{key:`dr-issue-`+t,class:s([`recommendation-item`,e.level===`high`?`high`:e.level===`medium`?`medium`:`low`])},[f(`span`,{class:s([`priority-badge`,e.level||`medium`]),style:{"margin-right":`var(--space-1)`}},i(e.level===`high`?`🔴`:e.level===`medium`?`🟡`:`🟢`),3),f(`div`,en,i(e.content),1)],2))),128))])):e.type===`params_table`?(n(),d(y,{key:1,columns:e.headers.map((e,t)=>({colKey:`col_`+t,title:e})),data:bn(e.rows),"row-key":`_rowId`,stripe:``,bordered:``},null,8,[`columns`,`data`])):e.type===`recommendations`?(n(),S(`div`,tn,[(n(!0),S(v,null,t(e.items,(e,t)=>(n(),S(`div`,{class:`recommendation-item low`,key:`dr-rec-`+t},[f(`div`,nn,`💡 `+i(e),1)]))),128))])):(n(),S(`div`,rn,i(JSON.stringify(e)),1))],2))),128))])])):c(``,!0)])):c(``,!0)]),_:1},8,[`loading`])])}}});export{L as default}; \ No newline at end of file diff --git a/static/assets/UsersView-CJ8YSEx_.js b/static/assets/UsersView-DOsOx97D.js similarity index 98% rename from static/assets/UsersView-CJ8YSEx_.js rename to static/assets/UsersView-DOsOx97D.js index 15f7f1a..94b7049 100644 --- a/static/assets/UsersView-CJ8YSEx_.js +++ b/static/assets/UsersView-DOsOx97D.js @@ -1 +1 @@ -import{A as e,D as t,E as n,I as r,N as i,O as a,S as o,_ as s,b as c,c as l,d as u,g as d,h as f,j as p,k as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S}from"./index-DhEa-EvN.js";import{r as C}from"./utils-COFIQvWo.js";var w={class:`page-container`},T={class:`page-header`},E={style:{display:`flex`,"flex-direction":`column`,gap:`8px`}},D=[`value`],O=o({__name:`UsersView`,setup(o){let O=y(),k=l(),A=k.user,j=p({users:[],roles:[],loading:!0,showUserModal:!1,editingUser:null,userForm:{username:``,email:``,password:``,full_name:``,role_ids:[]}});function M(e,t,n,r,i){return new Promise(a=>{let o=v.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let N=async()=>{try{j.users=await _(`/api/auth/users`)}catch(e){g(e.message||`加载用户列表失败`,`error`)}finally{j.loading=!1}},P=async()=>{try{j.roles=await _(`/api/auth/roles`)}catch(e){g(e.message||`加载角色列表失败`,`error`)}},F=(e=null)=>{j.editingUser=e,e?j.userForm={username:e.username,email:e.email,password:``,full_name:e.full_name||``,role_ids:e.roles.map(e=>{let t=j.roles.find(t=>t.code===e);return t?t.id:null}).filter(e=>e!==null)}:j.userForm={username:``,email:``,password:``,full_name:``,role_ids:[]},j.showUserModal=!0},I=async()=>{if(!j.userForm.username||!j.userForm.email){g(`请填写用户名和邮箱`,`error`);return}if(!j.editingUser&&!j.userForm.password){g(`请填写密码`,`error`);return}try{j.editingUser?(await _(`/api/auth/users/${j.editingUser.id}`,{method:`PUT`,body:JSON.stringify({email:j.userForm.email,full_name:j.userForm.full_name||null,role_ids:j.userForm.role_ids})}),g(`用户更新成功`,`success`)):(await _(`/api/auth/users`,{method:`POST`,body:JSON.stringify(j.userForm)}),g(`用户创建成功`,`success`)),j.showUserModal=!1,N()}catch(e){g(e.message||`保存用户失败`,`error`)}},L=async e=>{if(await M(`删除确认`,`确定要删除用户 ${e.username} 吗?`,`warning`,`删除`,`取消`))try{await _(`/api/auth/users/${e.id}`,{method:`DELETE`}),g(`用户已删除`,`success`),N()}catch(e){g(e.message||`删除用户失败`,`error`)}},R=async e=>{let t=prompt(`请输入 ${e.username} 的新密码:`);if(!t||t.length<6){g(`密码长度至少6位`,`error`);return}try{await _(`/api/auth/users/${e.id}/reset-password`,{method:`PUT`,body:JSON.stringify(t)}),g(`密码已重置`,`success`)}catch(e){g(e.message||`重置密码失败`,`error`)}};return x(async()=>{if(!k.user?.is_superuser){O.push(`/`);return}await P(),N()}),(o,l)=>{let p=a(`t-button`),g=a(`t-table-column`),_=a(`t-tag`),v=a(`t-space`),y=a(`t-table`),x=a(`t-empty`),O=a(`t-loading`),k=a(`t-input`),M=a(`t-form-item`),N=a(`t-form`),P=a(`t-dialog`);return n(),b(`div`,w,[f(`div`,T,[l[9]||=f(`div`,null,[f(`h1`,null,`用户管理`),f(`p`,null,`管理系统用户和权限`)],-1),S(p,{theme:`primary`,onClick:l[0]||=e=>F()},{default:m(()=>[...l[8]||=[c(`+ 添加用户`,-1)]]),_:1})]),S(O,{loading:j.loading,size:`large`},{default:m(()=>[S(y,{data:j.users,"row-key":`id`,stripe:``},{default:m(()=>[S(g,{colKey:`username`,title:`用户名`}),S(g,{colKey:`email`,title:`邮箱`}),S(g,{colKey:`full_name`,title:`姓名`},{cell:m(({row:e})=>[c(r(e.full_name||`-`),1)]),_:1}),S(g,{colKey:`is_active`,title:`状态`},{cell:m(({row:e})=>[S(_,{theme:e.is_active?`success`:`danger`},{default:m(()=>[c(r(e.is_active?`正常`:`禁用`),1)]),_:2},1032,[`theme`])]),_:1}),S(g,{colKey:`roles`,title:`角色`},{cell:m(({row:e})=>[(n(!0),b(h,null,t(e.roles,e=>(n(),d(_,{key:e,theme:`primary`,variant:`light`,style:{"margin-right":`4px`}},{default:m(()=>[c(r(e),1)]),_:2},1024))),128))]),_:1}),S(g,{colKey:`created_at`,title:`注册时间`},{cell:m(({row:e})=>[c(r(i(C)(e.created_at)),1)]),_:1}),S(g,{colKey:`actions`,title:`操作`},{cell:m(({row:e})=>[S(v,{size:4},{default:m(()=>[S(p,{theme:`primary`,size:`small`,onClick:t=>F(e)},{default:m(()=>[...l[10]||=[c(`编辑`,-1)]]),_:1},8,[`onClick`]),S(p,{theme:`warning`,size:`small`,onClick:t=>R(e)},{default:m(()=>[...l[11]||=[c(`重置密码`,-1)]]),_:1},8,[`onClick`]),e.id===i(A)?.id?s(``,!0):(n(),d(p,{key:0,theme:`danger`,size:`small`,onClick:t=>L(e)},{default:m(()=>[...l[12]||=[c(`删除`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]),_:1})]),_:1},8,[`data`]),!j.loading&&j.users.length===0?(n(),d(x,{key:0,description:`暂无用户数据`})):s(``,!0)]),_:1},8,[`loading`]),S(P,{visible:j.showUserModal,"onUpdate:visible":l[7]||=e=>j.showUserModal=e,header:j.editingUser?`编辑用户`:`添加用户`,"close-on-overlay-click":!0,width:`520px`},{footer:m(()=>[S(p,{theme:`default`,onClick:l[6]||=e=>j.showUserModal=!1},{default:m(()=>[...l[13]||=[c(`取消`,-1)]]),_:1}),S(p,{theme:`primary`,onClick:I},{default:m(()=>[...l[14]||=[c(`保存`,-1)]]),_:1})]),default:m(()=>[S(N,{"label-width":`80px`},{default:m(()=>[S(M,{label:`用户名`},{default:m(()=>[S(k,{modelValue:j.userForm.username,"onUpdate:modelValue":l[1]||=e=>j.userForm.username=e,disabled:!!j.editingUser},null,8,[`modelValue`,`disabled`])]),_:1}),S(M,{label:`邮箱`},{default:m(()=>[S(k,{modelValue:j.userForm.email,"onUpdate:modelValue":l[2]||=e=>j.userForm.email=e,type:`email`},null,8,[`modelValue`])]),_:1}),j.editingUser?s(``,!0):(n(),d(M,{key:0,label:`密码`},{default:m(()=>[S(k,{modelValue:j.userForm.password,"onUpdate:modelValue":l[3]||=e=>j.userForm.password=e,type:`password`},null,8,[`modelValue`])]),_:1})),S(M,{label:`姓名`},{default:m(()=>[S(k,{modelValue:j.userForm.full_name,"onUpdate:modelValue":l[4]||=e=>j.userForm.full_name=e},null,8,[`modelValue`])]),_:1}),S(M,{label:`角色`},{default:m(()=>[f(`div`,E,[(n(!0),b(h,null,t(j.roles,t=>(n(),b(`label`,{key:t.id,style:{display:`flex`,"align-items":`center`,gap:`6px`,cursor:`pointer`}},[e(f(`input`,{type:`checkbox`,value:t.id,"onUpdate:modelValue":l[5]||=e=>j.userForm.role_ids=e},null,8,D),[[u,j.userForm.role_ids]]),c(` `+r(t.name),1)]))),128))])]),_:1})]),_:1})]),_:1},8,[`visible`,`header`])])}}});export{O as default}; \ No newline at end of file +import{A as e,D as t,E as n,I as r,N as i,O as a,S as o,_ as s,b as c,c as l,d as u,g as d,h as f,j as p,k as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,x as S}from"./index-EqJJKSSk.js";import{r as C}from"./utils-COFIQvWo.js";var w={class:`page-container`},T={class:`page-header`},E={style:{display:`flex`,"flex-direction":`column`,gap:`8px`}},D=[`value`],O=o({__name:`UsersView`,setup(o){let O=y(),k=l(),A=k.user,j=p({users:[],roles:[],loading:!0,showUserModal:!1,editingUser:null,userForm:{username:``,email:``,password:``,full_name:``,role_ids:[]}});function M(e,t,n,r,i){return new Promise(a=>{let o=v.confirm({header:e,body:t,theme:n,confirmBtn:r,cancelBtn:i,onConfirm:()=>{o.hide(),a(!0)},onCancel:()=>{o.hide(),a(!1)},onClose:()=>{a(!1)}})})}let N=async()=>{try{j.users=await _(`/api/auth/users`)}catch(e){g(e.message||`加载用户列表失败`,`error`)}finally{j.loading=!1}},P=async()=>{try{j.roles=await _(`/api/auth/roles`)}catch(e){g(e.message||`加载角色列表失败`,`error`)}},F=(e=null)=>{j.editingUser=e,e?j.userForm={username:e.username,email:e.email,password:``,full_name:e.full_name||``,role_ids:e.roles.map(e=>{let t=j.roles.find(t=>t.code===e);return t?t.id:null}).filter(e=>e!==null)}:j.userForm={username:``,email:``,password:``,full_name:``,role_ids:[]},j.showUserModal=!0},I=async()=>{if(!j.userForm.username||!j.userForm.email){g(`请填写用户名和邮箱`,`error`);return}if(!j.editingUser&&!j.userForm.password){g(`请填写密码`,`error`);return}try{j.editingUser?(await _(`/api/auth/users/${j.editingUser.id}`,{method:`PUT`,body:JSON.stringify({email:j.userForm.email,full_name:j.userForm.full_name||null,role_ids:j.userForm.role_ids})}),g(`用户更新成功`,`success`)):(await _(`/api/auth/users`,{method:`POST`,body:JSON.stringify(j.userForm)}),g(`用户创建成功`,`success`)),j.showUserModal=!1,N()}catch(e){g(e.message||`保存用户失败`,`error`)}},L=async e=>{if(await M(`删除确认`,`确定要删除用户 ${e.username} 吗?`,`warning`,`删除`,`取消`))try{await _(`/api/auth/users/${e.id}`,{method:`DELETE`}),g(`用户已删除`,`success`),N()}catch(e){g(e.message||`删除用户失败`,`error`)}},R=async e=>{let t=prompt(`请输入 ${e.username} 的新密码:`);if(!t||t.length<6){g(`密码长度至少6位`,`error`);return}try{await _(`/api/auth/users/${e.id}/reset-password`,{method:`PUT`,body:JSON.stringify(t)}),g(`密码已重置`,`success`)}catch(e){g(e.message||`重置密码失败`,`error`)}};return x(async()=>{if(!k.user?.is_superuser){O.push(`/`);return}await P(),N()}),(o,l)=>{let p=a(`t-button`),g=a(`t-table-column`),_=a(`t-tag`),v=a(`t-space`),y=a(`t-table`),x=a(`t-empty`),O=a(`t-loading`),k=a(`t-input`),M=a(`t-form-item`),N=a(`t-form`),P=a(`t-dialog`);return n(),b(`div`,w,[f(`div`,T,[l[9]||=f(`div`,null,[f(`h1`,null,`用户管理`),f(`p`,null,`管理系统用户和权限`)],-1),S(p,{theme:`primary`,onClick:l[0]||=e=>F()},{default:m(()=>[...l[8]||=[c(`+ 添加用户`,-1)]]),_:1})]),S(O,{loading:j.loading,size:`large`},{default:m(()=>[S(y,{data:j.users,"row-key":`id`,stripe:``},{default:m(()=>[S(g,{colKey:`username`,title:`用户名`}),S(g,{colKey:`email`,title:`邮箱`}),S(g,{colKey:`full_name`,title:`姓名`},{cell:m(({row:e})=>[c(r(e.full_name||`-`),1)]),_:1}),S(g,{colKey:`is_active`,title:`状态`},{cell:m(({row:e})=>[S(_,{theme:e.is_active?`success`:`danger`},{default:m(()=>[c(r(e.is_active?`正常`:`禁用`),1)]),_:2},1032,[`theme`])]),_:1}),S(g,{colKey:`roles`,title:`角色`},{cell:m(({row:e})=>[(n(!0),b(h,null,t(e.roles,e=>(n(),d(_,{key:e,theme:`primary`,variant:`light`,style:{"margin-right":`4px`}},{default:m(()=>[c(r(e),1)]),_:2},1024))),128))]),_:1}),S(g,{colKey:`created_at`,title:`注册时间`},{cell:m(({row:e})=>[c(r(i(C)(e.created_at)),1)]),_:1}),S(g,{colKey:`actions`,title:`操作`},{cell:m(({row:e})=>[S(v,{size:4},{default:m(()=>[S(p,{theme:`primary`,size:`small`,onClick:t=>F(e)},{default:m(()=>[...l[10]||=[c(`编辑`,-1)]]),_:1},8,[`onClick`]),S(p,{theme:`warning`,size:`small`,onClick:t=>R(e)},{default:m(()=>[...l[11]||=[c(`重置密码`,-1)]]),_:1},8,[`onClick`]),e.id===i(A)?.id?s(``,!0):(n(),d(p,{key:0,theme:`danger`,size:`small`,onClick:t=>L(e)},{default:m(()=>[...l[12]||=[c(`删除`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]),_:1})]),_:1},8,[`data`]),!j.loading&&j.users.length===0?(n(),d(x,{key:0,description:`暂无用户数据`})):s(``,!0)]),_:1},8,[`loading`]),S(P,{visible:j.showUserModal,"onUpdate:visible":l[7]||=e=>j.showUserModal=e,header:j.editingUser?`编辑用户`:`添加用户`,"close-on-overlay-click":!0,width:`520px`},{footer:m(()=>[S(p,{theme:`default`,onClick:l[6]||=e=>j.showUserModal=!1},{default:m(()=>[...l[13]||=[c(`取消`,-1)]]),_:1}),S(p,{theme:`primary`,onClick:I},{default:m(()=>[...l[14]||=[c(`保存`,-1)]]),_:1})]),default:m(()=>[S(N,{"label-width":`80px`},{default:m(()=>[S(M,{label:`用户名`},{default:m(()=>[S(k,{modelValue:j.userForm.username,"onUpdate:modelValue":l[1]||=e=>j.userForm.username=e,disabled:!!j.editingUser},null,8,[`modelValue`,`disabled`])]),_:1}),S(M,{label:`邮箱`},{default:m(()=>[S(k,{modelValue:j.userForm.email,"onUpdate:modelValue":l[2]||=e=>j.userForm.email=e,type:`email`},null,8,[`modelValue`])]),_:1}),j.editingUser?s(``,!0):(n(),d(M,{key:0,label:`密码`},{default:m(()=>[S(k,{modelValue:j.userForm.password,"onUpdate:modelValue":l[3]||=e=>j.userForm.password=e,type:`password`},null,8,[`modelValue`])]),_:1})),S(M,{label:`姓名`},{default:m(()=>[S(k,{modelValue:j.userForm.full_name,"onUpdate:modelValue":l[4]||=e=>j.userForm.full_name=e},null,8,[`modelValue`])]),_:1}),S(M,{label:`角色`},{default:m(()=>[f(`div`,E,[(n(!0),b(h,null,t(j.roles,t=>(n(),b(`label`,{key:t.id,style:{display:`flex`,"align-items":`center`,gap:`6px`,cursor:`pointer`}},[e(f(`input`,{type:`checkbox`,value:t.id,"onUpdate:modelValue":l[5]||=e=>j.userForm.role_ids=e},null,8,D),[[u,j.userForm.role_ids]]),c(` `+r(t.name),1)]))),128))])]),_:1})]),_:1})]),_:1},8,[`visible`,`header`])])}}});export{O as default}; \ No newline at end of file diff --git a/static/assets/index-DhEa-EvN.js b/static/assets/index-EqJJKSSk.js similarity index 99% rename from static/assets/index-DhEa-EvN.js rename to static/assets/index-EqJJKSSk.js index 45149b9..5edfa89 100644 --- a/static/assets/index-DhEa-EvN.js +++ b/static/assets/index-EqJJKSSk.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-Dzg7rZr-.js","assets/HomeView-wPEC1q8T.css","assets/LoginView-n35SYtjJ.js","assets/LoginView-BRS9TQuR.css","assets/UsersView-CJ8YSEx_.js","assets/utils-COFIQvWo.js","assets/MoldInsightView-BI-bxvRF.js","assets/ResultView-BxUb7yw9.js","assets/InventoryView-CtU3XJ5c.js","assets/InventoryView-DCFTumSQ.css"])))=>i.map(i=>d[i]); -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D=/-\w/g,O=E(e=>e.replace(D,e=>e.slice(1).toUpperCase())),k=/\B([A-Z])/g,A=E(e=>e.replace(k,`-$1`).toLowerCase()),j=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),M=E(e=>e?`on${j(e)}`:``),N=(e,t)=>!Object.is(e,t),P=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ee=e=>{let t=parseFloat(e);return isNaN(t)?e:t},te=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},ne,re=()=>ne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ie(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(oe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function le(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nme(e,t))}var ge=e=>!!(e&&e.__v_isRef===!0),_e=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?_e(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>ge(t)?ve(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:_(t)?ye(t):v(t)&&!d(t)&&!C(t)?String(t):t,ye=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,be,xe=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&be&&(be.active?(this.parent=be,this.index=(be.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(be===this)be=this.prevScope;else{let e=be;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=Te,r=Be;Te=e,Be=!0;try{Pe(e);let n=e.fn(e._value);(t.version===0||N(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Te=n,Be=r,Fe(e),e.flags&=-3}}function Re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0?!0:e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Te;Te=void 0;try{t()}finally{Te=e}}}var Ge=0,Ke=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Te||!Be||Te===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Te)t=this.activeLink=new Ke(Te,this),Te.deps?(t.prevDep=Te.depsTail,Te.depsTail.nextDep=t,Te.depsTail=t):Te.deps=Te.depsTail=t,Je(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Te.depsTail,t.nextDep=void 0,Te.depsTail.nextDep=t,Te.depsTail=t,Te.deps===t&&(Te.deps=e)}return t}trigger(e){this.version++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function $e(e,t,n){if(Be&&Te){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe));break}}Ne()}function tt(e,t){let n=Ye.get(e);return n&&n.get(t)}function nt(e){let t=Ut(e);return t===e?t:($e(t,`iterate`,Qe),Vt(e)?t:t.map(Gt))}function rt(e){return $e(e=Ut(e),`iterate`,Qe),e}function it(e,t){return Bt(e)?Kt(zt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t]();return r!==e&&!Vt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=rt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function ut(e,t,n){let r=Ut(e);$e(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=Ut(n[0]),r[t](...n)):i}function dt(e,t,n=[]){He(),Me();let r=Ut(e)[t].apply(e,n);return Ne(),Ue(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=Ut(this);return $e(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,qt(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||$e(e,`get`,t),i))return o;if(qt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=Ut(i),n=Ut(n)),!a&&qt(i)&&!qt(n))return e||(i.value=n),!0}let o=a?Number(t)e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=Ut(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Kt:Gt;return!t&&$e(a,`iterate`,l?Ze:Xe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=Ut(r),a=Ut(n);e||(N(n,a)&&$e(i,`get`,n),$e(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&$e(Ut(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=Ut(n),i=Ut(t);return e||(N(t,i)&&$e(r,`has`,t),$e(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=Ut(a),s=t?xt:e?Kt:Gt;return!e&&$e(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=Ut(this),r=St(n),i=Ut(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||N(e,a)&&r.has.call(n,e)||N(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){!t&&!Vt(n)&&!Bt(n)&&(n=Ut(n));let r=Ut(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=Ut(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?N(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=Ut(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=Ut(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=Ut(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function Ut(e){let t=e&&e.__v_raw;return t?Ut(t):e}function Wt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&F(e,`__v_skip`,!0),e}var Gt=e=>v(e)?Ft(e):e,Kt=e=>v(e)?Lt(e):e;function qt(e){return e?e.__v_isRef===!0:!1}function I(e){return Yt(e,!1)}function Jt(e){return Yt(e,!0)}function Yt(e,t){return qt(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ut(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:Ut(e),N(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function Zt(e){return qt(e)?e.value:e}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Zt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return qt(i)&&!qt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return zt(e)?e:new Proxy(e,Qt)}function L(e){let t=d(e)?Array(e.length):{};for(let n in e)t[n]=tn(e,n);return t}var en=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=_(t)?t:String(t),this._raw=Ut(e);let r=!0,i=e;if(!d(e)||_(this._key)||!w(this._key))do r=!Ht(i)||Vt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Zt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&qt(this._raw[this._key])){let t=this._object[this._key];if(qt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tt(this._raw,this._key)}};function tn(e,t,n){return new en(e,t,n)}var nn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Te!==this)return je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function rn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new nn(r,i,n)}var an={},on=new WeakMap,sn=void 0;function cn(e,t=!1,n=sn){if(n){let t=on.get(n);t||on.set(n,t=[]),t.push(e)}}function ln(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?un(e,1):un(e),m,g,_,v,y=!1,b=!1;if(qt(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(qt(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=sn;sn=m;try{return f?f(e,3,[v]):e(v)}finally{sn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>un(e(),t)}let x=Ce(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(an):an,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>N(e,C[t])):N(e,C))){_&&_();let t=sn;sn=m;try{let t=[e,C===an?void 0:b&&C[0]===an?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{sn=t}}}else m.run()};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>cn(e,!1,m),_=m.onStop=()=>{let e=on.get(m);if(e){if(f)f(e,4);else for(let t of e)t();on.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function un(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qt(e))un(e.value,t,n);else if(d(e))for(let r=0;r{un(e,t,n)});else if(C(e)){for(let r in e)un(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&un(e[r],t,n)}return e}function dn(e,t,n,r){try{return r?e(...r):e()}catch(e){pn(e,t,n)}}function fn(e,t,n,r){if(h(e)){let i=dn(e,t,n,r);return i&&y(i)&&i.catch(e=>{pn(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=hn[r],a=kn(i);a=kn(n)?hn.push(e):hn.splice(Cn(t),0,e),e.flags|=1,Tn()}}function Tn(){xn||=bn.then(An)}function En(e){d(e)?_n.push(...e):vn&&e.id===-1?vn.splice(yn+1,0,e):e.flags&1||(_n.push(e),e.flags|=1),Tn()}function Dn(e,t,n=gn+1){for(;nkn(e)-kn(t));if(_n.length=0,vn){vn.push(...e);return}for(vn=e,yn=0;yne.id==null?e.flags&2?-1:1/0:e.id;function An(e){try{for(gn=0;gn{r._d&&xa(-1);let i=Nn(t),a;try{a=e(...n)}finally{Nn(i),r._d&&xa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e,n){if(jn===null)return e;let r=ao(jn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}function zn(){return!!(Wa()||Si)}var Bn=Symbol.for(`v-scx`),Vn=()=>Rn(Bn);function Hn(e,t){return Un(e,null,t)}function R(e,t,n){return Un(e,t,n)}function Un(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Xa){if(c===`sync`){let e=Vn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Ua;u.call=(e,t,n)=>fn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{$i(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():wn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=ln(e,n,u);return Xa&&(f?f.push(h):d&&h()),h}function Wn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Gn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=qa(this),s=Un(i,a.bind(r),n);return o(),s}function Gn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Yn=e=>e&&(e.disabled||e.disabled===``),Xn=e=>e&&(e.defer||e.defer===``),Zn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Qn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,$n=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},er={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Yn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Yn(e.props),r=e.target=$n(e.props,m),a=ar(r,e,h,p);r&&(o!==`svg`&&Zn(r)?o=`svg`:o!==`mathml`&&Qn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ir(e,!1)))},S=e=>{let t=()=>{Kn.get(e)===t&&(Kn.delete(e),Yn(e.props)&&(b(e,_(e.el)||n,e.anchor),ir(e,!0)),x(e))};Kn.set(e,t),$i(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Xn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ir(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Kn.get(e);if(u){u.flags|=8,Kn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Yn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Zn(p)?o=`svg`:(o===`mathml`||Qn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),aa(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=$n(t.props,m);e&&tr(t,e,null,l,0)}else g&&tr(t,p,h,l,1);ir(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Yn(f),m=Kn.get(e);if(m&&(m.flags|=8,Kn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],ur={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},dr=e=>{let t=e.subTree;return t.component?dr(t.component):t},fr={name:`BaseTransition`,props:ur,setup(e,{slots:t}){let n=Wa(),r=cr();return()=>{let i=t.default&&br(t.default(),!0),a=i&&i.length?pr(i):n.subTree?Fa():void 0;if(!a)return;let o=Ut(e),{mode:s}=o;if(r.isLeaving)return _r(a);let c=vr(a);if(!c)return _r(a);let l=gr(c,o,r,n,e=>l=e);c.type!==ma&&yr(c,l);let u=n.subTree&&vr(n.subTree);if(u&&u.type!==ma&&!Ea(u,c)&&dr(n).type!==ma){let e=gr(u,o,r,n);if(yr(u,e),s===`out-in`&&c.type!==ma)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},_r(a);s===`in-out`&&c.type!==ma?e.delayLeave=(e,t,n)=>{let i=hr(r,u);i[String(u.key)]=u,e[or]=()=>{t(),e[or]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function pr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ma){t=n;break}}return t}var mr=fr;function hr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=hr(n,e),C=(e,t)=>{e&&fn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[or]&&t[or](!0);let i=S[x];i&&Ea(e,i)&&i.el[or]&&i.el[or](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||f;else return;let s=!1;t[sr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[sr]=void 0)};let c=t[sr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[sr]&&t[sr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[or]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[or]=void 0,S[i]===e&&delete S[i])};let o=t[or].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=gr(e,t,n,r,i);return i&&i(a),a}};return T}function _r(e){if(Dr(e))return e=Ma(e),e.children=null,e}function vr(e){if(!Dr(e))return Jn(e.type)&&e.children?pr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function yr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function br(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;ewr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Er(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&wr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ao(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=Ut(v),b=v===t?i:e=>Sr(_,e)?!1:u(y,e),x=(e,t)=>!(t&&Sr(_,t));if(m!=null&&m!==p){if(Tr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(qt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))dn(p,f,12,[l,_]);else{let t=g(p),n=qt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Cr.delete(e)};t.id=-1,Cr.set(e,t),$i(t,r)}else Tr(e),i()}}}function Tr(e){let t=Cr.get(e);t&&(t.flags|=8,Cr.delete(e))}re().requestIdleCallback,re().cancelIdleCallback;var Er=e=>!!e.type.__asyncLoader,Dr=e=>e.type.__isKeepAlive;function Or(e,t){Ar(e,`a`,t)}function kr(e,t){Ar(e,`da`,t)}function Ar(e,t,n=Ua){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Mr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Dr(e.parent.vnode)&&jr(r,t,n,e),e=e.parent}}function jr(e,t,n,r){let i=Mr(t,e,r,!0);zr(()=>{c(r[t],i)},n)}function Mr(e,t,n=Ua,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=qa(n),a=fn(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var Nr=e=>(t,n=Ua)=>{(!Xa||e===`sp`)&&Mr(e,(...e)=>t(...e),n)},Pr=Nr(`bm`),Fr=Nr(`m`),Ir=Nr(`bu`),Lr=Nr(`u`),Rr=Nr(`bum`),zr=Nr(`um`),Br=Nr(`sp`),Vr=Nr(`rtg`),Hr=Nr(`rtc`);function Ur(e,t=Ua){Mr(`ec`,e,t)}var Wr=`components`,Gr=`directives`;function Kr(e,t){return Xr(Wr,e,!0,t)||e}var qr=Symbol.for(`v-ndc`);function Jr(e){return g(e)?Xr(Wr,e,!1)||e:e||qr}function Yr(e){return Xr(Gr,e)}function Xr(e,t,n=!0,r=!1){let i=jn||Ua;if(i){let n=i.type;if(e===Wr){let e=oo(n,!1);if(e&&(e===t||e===O(t)||e===j(O(t))))return n}let a=Zr(i[e]||n[e],t)||Zr(i.appContext[e],t);return!a&&r?n:a}}function Zr(e,t){return e&&(e[t]||e[O(t)]||e[j(O(t))])}function Qr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?Ya(e)?ao(e):$r(e.parent):null,ei=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$r(e.parent),$root:e=>$r(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||=()=>{wn(e.update)},$nextTick:e=>e.n||=Sn.bind(e.proxy),$watch:e=>Wn.bind(e)}),ti=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),ni={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(ti(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else ii&&(s[n]=0)}let d=ei[n],f,p;if(d)return n===`$attrs`&&$e(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return ti(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||ti(n,c)||u(o,c)||u(i,c)||u(ei,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ri(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ii=!0;function ai(e){let t=li(e),n=e.proxy,i=e.ctx;ii=!1,t.beforeCreate&&si(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:M,directives:N,filters:P}=t;if(u&&oi(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(ii=!0,o)for(let e in o){let t=o[e],a=H({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)ci(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Ln(t,e[t])})}f&&si(f,e,`c`);function F(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(F(Pr,p),F(Fr,m),F(Ir,g),F(Lr,_),F(Or,y),F(kr,b),F(Ur,O),F(Hr,E),F(Vr,D),F(Rr,S),F(zr,w),F(Br,k),d(A))if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===r&&(e.render=T),j!=null&&(e.inheritAttrs=j),M&&(e.components=M),N&&(e.directives=N),k&&xr(e)}function oi(e,t,n=r){d(e)&&(e=mi(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Rn(r.from||n,r.default,!0):Rn(r.from||n):Rn(r),qt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function si(e,t,n){fn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ci(e,t,n,r){let i=r.includes(`.`)?Gn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&R(i,n)}else if(h(e))R(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>ci(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&R(i,r,e)}}function li(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ui(c,e,o,!0)),ui(c,t,o)),v(t)&&a.set(t,c),c}function ui(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ui(e,a,n,!0),i&&i.forEach(t=>ui(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=di[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var di={data:fi,props:_i,emits:_i,methods:gi,computed:gi,beforeCreate:hi,created:hi,beforeMount:hi,mounted:hi,beforeUpdate:hi,updated:hi,beforeDestroy:hi,beforeUnmount:hi,destroyed:hi,unmounted:hi,activated:hi,deactivated:hi,errorCaptured:hi,serverPrefetch:hi,components:gi,directives:gi,watch:vi,provide:fi,inject:pi};function fi(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function pi(e,t){return gi(mi(e),mi(t))}function mi(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${A(t)}Modifiers`];function wi(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ci(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(ee)));let c,l=i[c=M(n)]||i[c=M(O(n))];!l&&o&&(l=i[c=M(A(n))]),l&&fn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,fn(u,e,6,a)}}var Ti=new WeakMap;function Ei(e,t,n=!1){let r=n?Ti:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Ei(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Di(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function Oi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Nn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ia(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ia(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ki(c)}}catch(t){ga.length=0,pn(t,e,1),v=B(ma)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Ai(y,a)),b=Ma(b,y,!1,!0))}return n.dirs&&(b=Ma(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&yr(b,n.transition),v=b,Nn(_),v}var ki=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Ai=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ji(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Fi),Li=e=>Object.getPrototypeOf(e)===Fi;function Ri(e,t,n,r=!1){let i={},a=Ii();e.propsDefaults=Object.create(null),Bi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:It(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function zi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Ut(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Ui(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ki=e=>d(e)?e.map(Ia):[Ia(e)],qi=(e,t,n)=>{if(t._n)return t;let r=Pn((...e)=>Ki(t(...e)),n);return r._c=!1,r},Ji=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Gi(n))continue;let i=e[n];if(h(i))t[n]=qi(n,i,r);else if(i!=null){let e=Ki(i);t[n]=()=>e}}},Yi=(e,t)=>{let n=Ki(t);e.slots.default=()=>n},Xi=(e,t,n)=>{for(let r in t)(n||!Gi(r))&&(e[r]=t[r])},Zi=(e,t,n)=>{let r=e.slots=Ii();if(e.vnode.shapeFlag&32){let e=t._;e?(Xi(r,t,n),n&&F(r,`_`,e,!0)):Ji(t,r)}else t&&Yi(e,t)},Qi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Xi(a,n,r):(o=!n.$stable,Ji(n,a)),s=n}else n&&(Yi(e,n),s={default:1});if(o)for(let e in a)!Gi(e)&&s[e]==null&&delete a[e]},$i=da;function ea(e){return ta(e)}function ta(e,i){let a=re();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ea(e,t)&&(r=pe(e),ce(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case pa:y(e,t,n,r);break;case ma:b(e,t,n,r);break;case ha:e??x(t,n,r,o);break;case fa:M(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?N(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ge)}u!=null&&i?wr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&wr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)E(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},E=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,na(e,a),s,u),_&&In(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&za(f,r,e)}_&&In(e,null,r,`beforeMount`);let v=ia(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&$i(()=>{try{f&&za(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&ra(r,!1),(g=h.onVnodeBeforeUpdate)&&za(g,r,n,e),f&&In(n,e,r,`beforeUpdate`),r&&ra(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,na(n,a),o):s||ie(e,n,l,null,r,i,na(n,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&za(g,r,n,e),f&&In(n,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},M=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&aa(e,t,!0)):ie(e,t,n,f,i,a,s,c,l)},N=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):F(t,n,r,i,a,o,c):ee(e,t,c)},F=(e,t,n,r,i,a,o)=>{let s=e.component=Ha(e,r,i);if(Dr(e)&&(s.ctx.renderer=ge),Za(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,te,o),!e.el){let r=s.subTree=B(ma);b(null,r,t,n),e.placeholder=r.el}}else te(s,e,t,n,i,a,o)},ee=(e,t,n)=>{let r=t.component=e.component;if(ji(e,t,n))if(r.asyncDep&&!r.asyncResolved){ne(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},te=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=sa(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{$i(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ra(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&P(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&za(d,s,t,c),ra(e,!0);let f=Oi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),pe(p),e,i,a),t.el=f.el,u===null&&Pi(e,f.el),r&&$i(r,i),(d=t.props&&t.props.onVnodeUpdated)&&$i(()=>za(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Er(t);if(ra(e,!1),l&&P(l),!m&&(o=c&&c.onVnodeBeforeMount)&&za(o,d,t),ra(e,!0),s&&ve){let t=()=>{e.subTree=Oi(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Oi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&$i(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;$i(()=>za(o,d,e),i)}(t.shapeFlag&256||d&&Er(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&$i(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new De(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>wn(u),ra(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,zi(e,t.props,r,n),Qi(e,t.children,n),He(),Dn(e),Ue()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){oe(l,d,n,r,i,a,o,s,c);return}else if(f&256){ae(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&fe(l,i,a),d!==l&&p(n,d)):u&16?m&16?oe(l,d,n,r,i,a,o,s,c):fe(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},ae=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?fe(e,a,o,!0,!1,f):O(t,r,i,a,o,s,c,l,f)},oe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?La(t[u]):Ia(t[u]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?La(t[p]):Ia(t[p]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)ce(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?La(t[u]):Ia(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ce(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ea(n,t[_])){i=_;break}i===void 0?ce(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?oa(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){se(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ge);return}if(c===fa){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[or];a._isLeaving&&a[or](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ce=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(He(),wr(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Er(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&za(_,t,e),u&6)de(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&In(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ge,r):l&&!l.hasOnce&&(a!==fa||d>0&&d&64)?fe(l,t,n,!1,!0):(a===fa&&d&384||!i&&u&16)&&fe(c,t,n),r&&le(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&$i(()=>{_&&za(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},le=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===fa){ue(n,r);return}if(t===ha){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ue=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},de=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ca(c),ca(l),r&&P(r),i.stop(),a&&(a.flags|=8,ce(o,e,t,n)),s&&$i(s,t),$i(()=>{e.isUnmounted=!0},t)},fe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return pe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[qn];return n?h(n):t},me=!1,he=(e,t,n)=>{let r;e==null?t._vnode&&(ce(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,me||=(me=!0,Dn(r),On(),!1)},ge={p:v,um:ce,m:se,r:le,mt:F,mc:O,pc:ie,pbc:A,n:pe,o:e},_e,ve;return i&&([_e,ve]=i(ge)),{render:he,hydrate:_e,createApp:xi(he,_e)}}function na({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ra({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ia(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function aa(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function sa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:sa(t)}function ca(e){if(e)for(let t=0;te.__isSuspense;function da(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):En(e)}var fa=Symbol.for(`v-fgt`),pa=Symbol.for(`v-txt`),ma=Symbol.for(`v-cmt`),ha=Symbol.for(`v-stc`),ga=[],_a=null;function va(e=!1){ga.push(_a=e?null:[])}function ya(){ga.pop(),_a=ga[ga.length-1]||null}var ba=1;function xa(e,t=!1){ba+=e,e<0&&_a&&t&&(_a.hasOnce=!0)}function Sa(e){return e.dynamicChildren=ba>0?_a||n:null,ya(),ba>0&&_a&&_a.push(e),e}function Ca(e,t,n,r,i,a){return Sa(ka(e,t,n,r,i,a,!0))}function wa(e,t,n,r,i){return Sa(B(e,t,n,r,i,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function Ea(e,t){return e.type===t.type&&e.key===t.key}var Da=({key:e})=>e??null,Oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||qt(e)||h(e)?{i:jn,r:e,k:t,f:!!n}:e);function ka(e,t=null,n=null,r=0,i=null,a=e===fa?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Da(t),ref:t&&Oa(t),scopeId:Mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:jn};return s?(Ra(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ba>0&&!o&&_a&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_a.push(c),c}var B=Aa;function Aa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===qr)&&(e=ma),Ta(e)){let r=Ma(e,t,!0);return n&&Ra(r,n),ba>0&&!a&&_a&&(r.shapeFlag&6?_a[_a.indexOf(e)]=r:_a.push(r)),r.patchFlag=-2,r}if(so(e)&&(e=e.__vccOpts),t){t=ja(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=le(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=ie(n))}let o=g(e)?1:ua(e)?128:Jn(e)?64:v(e)?4:h(e)?2:0;return ka(e,t,n,r,i,o,a,!0)}function ja(e){return e?Ht(e)||Li(e)?s({},e):e:null}function Ma(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?V(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Da(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Oa(t)):[a,Oa(t)]:Oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==fa?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ma(e.ssContent),ssFallback:e.ssFallback&&Ma(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&yr(u,c.clone(u)),u}function Na(e=` `,t=0){return B(pa,null,e,t)}function Pa(e,t){let n=B(ha,null,e);return n.staticCount=t,n}function Fa(e=``,t=!1){return t?(va(),wa(ma,null,e)):B(ma,null,e)}function Ia(e){return e==null||typeof e==`boolean`?B(ma):d(e)?B(fa,null,e.slice()):Ta(e)?La(e):B(pa,null,String(e))}function La(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ma(e)}function Ra(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ra(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Li(t)?t._ctx=jn:r===3&&jn&&(jn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:jn},n=32):(t=String(t),r&64?(n=16,t=[Na(t)]):n=8);e.children=t,e.shapeFlag|=n}function V(...e){let t={};for(let n=0;nUa||jn,Ga,Ka;{let e=re(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ga=t(`__VUE_INSTANCE_SETTERS__`,e=>Ua=e),Ka=t(`__VUE_SSR_SETTERS__`,e=>Xa=e)}var qa=e=>{let t=Ua;return Ga(e),e.scope.on(),()=>{e.scope.off(),Ga(t)}},Ja=()=>{Ua&&Ua.scope.off(),Ga(null)};function Ya(e){return e.vnode.shapeFlag&4}var Xa=!1;function Za(e,t=!1,n=!1){t&&Ka(t);let{props:r,children:i}=e.vnode,a=Ya(e);Ri(e,r,a,t),Zi(e,i,n||t);let o=a?Qa(e,t):void 0;return t&&Ka(!1),o}function Qa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ni);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?io(e):null,i=qa(e),a=dn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Er(e)&&xr(e),o){if(a.then(Ja,Ja),t)return a.then(n=>{$a(e,n,t)}).catch(t=>{pn(t,e,0)});e.asyncDep=a}else $a(e,a,t)}else no(e,t)}function $a(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=$t(t)),no(e,n)}var eo,to;function no(e,t,n){let i=e.type;if(!e.render){if(!t&&eo&&!i.render){let t=i.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=eo(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,to&&to(e)}{let t=qa(e);He();try{ai(e)}finally{Ue(),t()}}}var ro={get(e,t){return $e(e,`get`,``),e[t]}};function io(e){return{attrs:new Proxy(e.attrs,ro),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ao(e){return e.exposed?e.exposeProxy||=new Proxy($t(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ei)return ei[n](e)},has(e,t){return t in e||t in ei}}):e.proxy}function oo(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function so(e){return h(e)&&`__vccOpts`in e}var H=(e,t)=>rn(e,t,Xa);function co(e,t,n){try{xa(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Ta(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ta(n)&&(n=[n]),B(e,t,n))}finally{xa(1)}}var lo=`3.5.35`,uo=void 0,fo=typeof window<`u`&&window.trustedTypes;if(fo)try{uo=fo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var po=uo?e=>uo.createHTML(e):e=>e,mo=`http://www.w3.org/2000/svg`,ho=`http://www.w3.org/1998/Math/MathML`,go=typeof document<`u`?document:null,_o=go&&go.createElement(`template`),vo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?go.createElementNS(mo,e):t===`mathml`?go.createElementNS(ho,e):n?go.createElement(e,{is:n}):go.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>go.createTextNode(e),createComment:e=>go.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>go.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{_o.innerHTML=po(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=_o.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yo=`transition`,bo=`animation`,xo=Symbol(`_vtc`),So={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Co=s({},ur,So),wo=(e=>(e.displayName=`Transition`,e.props=Co,e))((e,{slots:t})=>co(mr,Do(e),t)),To=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},Eo=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function Do(e){let t={};for(let n in e)n in So||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Oo(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,jo(e,t?d:c),jo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,jo(e,f),jo(e,m),jo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);To(i,[t,o]),Mo(()=>{jo(t,e?l:a),Ao(t,e?d:c),Eo(i)||Po(t,r,g,o)})};return s(t,{onBeforeEnter(e){To(v,[e]),Ao(e,a),Ao(e,o)},onBeforeAppear(e){To(C,[e]),Ao(e,l),Ao(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Ao(e,f),e._enterCancelled?(Ao(e,p),Ro(e)):(Ro(e),Ao(e,p)),Mo(()=>{e._isLeaving&&(jo(e,f),Ao(e,m),Eo(x)||Po(e,r,_,n))}),To(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),To(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),To(T,[e])},onLeaveCancelled(e){D(e),To(S,[e])}})}function Oo(e){if(e==null)return null;if(v(e))return[ko(e.enter),ko(e.leave)];{let t=ko(e);return[t,t]}}function ko(e){return te(e)}function Ao(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[xo]||(e[xo]=new Set)).add(t)}function jo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[xo];n&&(n.delete(t),n.size||(e[xo]=void 0))}function Mo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var No=0;function Po(e,t,n,r){let i=e._endId=++No,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Fo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${yo}Delay`),a=r(`${yo}Duration`),o=Io(i,a),s=r(`${bo}Delay`),c=r(`${bo}Duration`),l=Io(s,c),u=null,d=0,f=0;t===yo?o>0&&(u=yo,d=o,f=a.length):t===bo?l>0&&(u=bo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?yo:bo:null,f=u?u===yo?a.length:c.length:0);let p=u===yo&&/\b(?:transform|all)(?:,|$)/.test(r(`${yo}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Io(e,t){for(;e.lengthLo(t)+Lo(e[n])))}function Lo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ro(e){return(e?e.ownerDocument:document).body.offsetHeight}function zo(e,t,n){let r=e[xo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Bo=Symbol(`_vod`),Vo=Symbol(`_vsh`),Ho={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Bo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Uo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Uo(e,!0),r.enter(e)):r.leave(e,()=>{Uo(e,!1)}):Uo(e,t))},beforeUnmount(e,{value:t}){Uo(e,t)}};function Uo(e,t){e.style.display=t?e[Bo]:`none`,e[Vo]=!t}var Wo=Symbol(``),Go=/(?:^|;)\s*display\s*:/;function Ko(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Jo(r,t,``)}else for(let e in t)n[e]??Jo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Jo(r,i,``):Qo(e,i,!g(t)&&t?t[i]:void 0,o)||Jo(r,i,o)}}else if(i){if(t!==n){let e=r[Wo];e&&(n+=`;`+e),r.cssText=n,a=Go.test(n)}}else t&&e.removeAttribute(`style`);Bo in e&&(e[Bo]=a?r.display:``,e[Vo]&&(r.display=`none`))}var qo=/\s*!important$/;function Jo(e,t,n){if(d(n))n.forEach(n=>Jo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Zo(e,t);qo.test(n)?e.setProperty(A(r),n.replace(qo,``),`important`):e[r]=n}}var Yo=[`Webkit`,`Moz`,`ms`],Xo={};function Zo(e,t){let n=Xo[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Xo[t]=r;r=j(r);for(let n=0;ncs||=(ls.then(()=>cs=0),Date.now());function ds(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ps=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?zo(e,r,c):t===`style`?Ko(e,n,r):a(t)?o(t)||as(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ms(e,t,r,c))?(ts(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&es(e,t,r,c,s,t!==`value`)):e._isVueCE&&(hs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?ts(e,O(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),es(e,t,r,c))};function ms(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&fs(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return fs(t)&&g(n)?!1:t in e}function hs(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var gs=new WeakMap,_s=new WeakMap,vs=Symbol(`_moveCb`),ys=Symbol(`_enterCb`),bs=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:s({},Co,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Wa(),r=cr(),i,a;return Lr(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ts(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(xs),i.forEach(Ss);let r=i.filter(Cs);Ro(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Ao(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[vs]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[vs]=null,jo(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=Ut(e),s=Do(o),c=o.tag||fa;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Fo(r);return a.removeChild(r),o}var Es=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>P(t,e):t},Ds=Symbol(`_assign`),Os={deep:!0,created(e,t,n){e[Ds]=Es(n),ns(e,`change`,()=>{let t=e._modelValue,n=As(e),r=e.checked,i=e[Ds];if(d(t)){let e=he(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(js(e,r))})},mounted:ks,beforeUpdate(e,t,n){e[Ds]=Es(n),ks(e,t,n)}};function ks(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=he(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=me(t,js(e,!0))}e.checked!==i&&(e.checked=i)}function As(e){return`_value`in e?e._value:e.value}function js(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ms=[`ctrl`,`shift`,`alt`,`meta`],Ns={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Ms.some(n=>e[`${n}Key`]&&!t.includes(n))},Ps=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{Ls().render(...e)}),zs=((...e)=>{let t=Ls().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Vs(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Bs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Bs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Vs(e){return g(e)?document.querySelector(e):e}var Hs=typeof window<`u`,Us,Ws=e=>Us=e,Gs=Symbol();function Ks(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var qs;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(qs||={});var Js=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Ys(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Xs(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){tc(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Zs(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Qs(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var $s=typeof navigator==`object`?navigator:{userAgent:``},ec=/Macintosh/.test($s.userAgent)&&/AppleWebKit/.test($s.userAgent)&&!/Safari/.test($s.userAgent),tc=Hs?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ec?nc:`msSaveOrOpenBlob`in $s?rc:ic:()=>{};function nc(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?Qs(r):Zs(r.href)?Xs(e,t,n):(r.target=`_blank`,Qs(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Qs(r)},0))}function rc(e,t=`download`,n){if(typeof e==`string`)if(Zs(e))Xs(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){Qs(t)})}else navigator.msSaveOrOpenBlob(Ys(e,n),t)}function ic(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Xs(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Js.HTMLElement))||`safari`in Js,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ec)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ac}=Object;function oc(){let e=Se(!0),t=e.run(()=>I({})),n=[],r=[],i=Wt({install(e){Ws(i),i._a=e,e.provide(Gs,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var sc=()=>{};function cc(e,t,n,r=sc){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Ce()&&we(i),i}function lc(e,...t){e.forEach(e=>{e(...t)})}var uc=e=>e(),dc=Symbol(),fc=Symbol();function pc(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Ks(i)&&Ks(r)&&e.hasOwnProperty(n)&&!qt(r)&&!zt(r)?e[n]=pc(i,r):e[n]=r}return e}var mc=Symbol();function hc(e){return!Ks(e)||!Object.prototype.hasOwnProperty.call(e,mc)}var{assign:gc}=Object;function _c(e){return!!(qt(e)&&e.effect)}function vc(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),gc(L(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Wt(H(()=>{Ws(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=yc(e,l,t,n,r,!0),c}function yc(e,t,n={},r,i,a){let o,s=gc({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:qs.patchFunction,storeId:e,events:void 0}):(pc(r.state.value[e],t),n={type:qs.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();Sn().then(()=>{m===i&&(l=!0)}),u=!0,lc(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{gc(e,t)})}:sc;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(dc in t)return t[fc]=n,t;let i=function(){Ws(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}lc(f,{args:n,name:i[fc],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw lc(o,e),e}return l instanceof Promise?l.then(e=>(lc(a,e),e)).catch(e=>(lc(o,e),Promise.reject(e))):(lc(a,l),l)};return i[dc]=!0,i[fc]=n,i},y=Ft({_p:r,$id:e,$onAction:cc.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=cc(d,t,n.detached,()=>a()),a=o.run(()=>R(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:qs.direct,events:void 0},r)},gc({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||uc)(()=>r._e.run(()=>(o=Se()).run(()=>t({action:v}))));for(let t in b){let n=b[t];qt(n)&&!_c(n)||zt(n)?a||(p&&hc(n)&&(qt(n)?n.value=p[t]:pc(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return gc(y,b),gc(Ut(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{gc(t,e)})}}),r._p.forEach(e=>{gc(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function bc(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=zn();return n||=o?Rn(Gs,null):null,n&&Ws(n),n=Us,n._s.has(e)||(i?yc(e,t,r,n):vc(e,r,n)),n._s.get(e)}return a.$id=e,a}var xc=typeof document<`u`;function Sc(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Cc(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Sc(e.default)}var wc=Object.assign;function Tc(e,t){let n={};for(let r in t){let i=t[r];n[r]=Dc(i)?i.map(e):e(i)}return n}var Ec=()=>{},Dc=Array.isArray;function Oc(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var kc=/#/g,Ac=/&/g,jc=/\//g,Mc=/=/g,Nc=/\?/g,Pc=/\+/g,Fc=/%5B/g,Ic=/%5D/g,Lc=/%5E/g,Rc=/%60/g,zc=/%7B/g,Bc=/%7C/g,Vc=/%7D/g,Hc=/%20/g;function Uc(e){return e==null?``:encodeURI(``+e).replace(Bc,`|`).replace(Fc,`[`).replace(Ic,`]`)}function Wc(e){return Uc(e).replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Gc(e){return Uc(e).replace(Pc,`%2B`).replace(Hc,`+`).replace(kc,`%23`).replace(Ac,`%26`).replace(Rc,"`").replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Kc(e){return Gc(e).replace(Mc,`%3D`)}function qc(e){return Uc(e).replace(kc,`%23`).replace(Nc,`%3F`)}function Jc(e){return qc(e).replace(jc,`%2F`)}function Yc(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Xc=/\/$/,Zc=e=>e.replace(Xc,``);function Qc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=ol(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Yc(o)}}function $c(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function el(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function tl(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&nl(t.matched[r],n.matched[i])&&rl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function nl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!il(e[n],t[n]))return!1;return!0}function il(e,t){return Dc(e)?al(e,t):Dc(t)?al(t,e):e?.valueOf()===t?.valueOf()}function al(e,t){return Dc(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function ol(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var sl={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},cl=function(e){return e.pop=`pop`,e.push=`push`,e}({}),ll=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function ul(e){if(!e)if(xc){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Zc(e)}var dl=/^[^#]+#/;function fl(e,t){return e.replace(dl,`#`)+t}function pl(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ml=()=>({left:window.scrollX,top:window.scrollY});function hl(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pl(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gl(e,t){return(history.state?history.state.position-t:-1)+e}var _l=new Map;function vl(e,t){_l.set(e,t)}function yl(e){let t=_l.get(e);return _l.delete(e),t}function bl(e){return typeof e==`string`||e&&typeof e==`object`}function xl(e){return typeof e==`string`||typeof e==`symbol`}var Sl=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Cl=Symbol(``);Sl.MATCHER_NOT_FOUND,Sl.NAVIGATION_GUARD_REDIRECT,Sl.NAVIGATION_ABORTED,Sl.NAVIGATION_CANCELLED,Sl.NAVIGATION_DUPLICATED;function wl(e,t){return wc(Error(),{type:e,[Cl]:!0},t)}function Tl(e,t){return e instanceof Error&&Cl in e&&(t==null||!!(e.type&t))}function El(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Gc(e)):[r&&Gc(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Ol(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Dc(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var kl=Symbol(``),Al=Symbol(``),jl=Symbol(``),Ml=Symbol(``),Nl=Symbol(``);function Pl(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Fl(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(wl(Sl.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):bl(e)?c(wl(Sl.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Il(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Sc(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Fl(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Cc(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Fl(c,n,r,o,e,i)()}))}}return a}function Ll(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;onl(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>nl(e,s))||i.push(s))}return[n,r,i]}var Rl=()=>location.protocol+`//`+location.host;function zl(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),el(n,``)}return el(n,e)+r+i}function Bl(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=zl(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:cl.pop,direction:u?u>0?ll.forward:ll.back:ll.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(wc({},e.state,{scroll:ml()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Vl(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ml():null}}function Hl(e){let{history:t,location:n}=window,r={value:zl(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Rl()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,wc({},t.state,Vl(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=wc({},i.value,t.state,{forward:e,scroll:ml()});a(o.current,o,!0),a(e,wc({},Vl(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Ul(e){e=ul(e);let t=Hl(e),n=Bl(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=wc({location:``,base:e,go:r,createHref:fl.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Wl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Gl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Gl||{}),Kl={type:Wl.Static,value:``},ql=/[a-zA-Z0-9_]/;function Jl(e){if(!e)return[[]];if(e===`/`)return[[Kl]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Gl.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Gl.Static?a.push({type:Wl.Static,value:l}):n===Gl.Param||n===Gl.ParamRegExp||n===Gl.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Wl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===Zl.Static+Zl.Segment?1:-1:0}function tu(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var ru={strict:!1,end:!0,sensitive:!1};function iu(e,t,n){let r=wc($l(Jl(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function au(e,t){let n=[],r=new Map;t=Oc(ru,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=su(e);s.aliasOf=r&&r.record;let l=Oc(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(su(wc({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=iu(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!lu(d)&&o(e.name)),pu(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Ec}function o(e){if(xl(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=du(e,n);n.splice(t,0,e),e.record.name&&!lu(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=wc(ou(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&ou(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=wc({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:uu(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function ou(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function su(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:cu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function cu(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function lu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uu(e){return e.reduce((e,t)=>wc(e,t.meta),{})}function du(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;tu(e,t[i])<0?r=i:n=i+1}let i=fu(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function fu(e){let t=e;for(;t=t.parent;)if(pu(t)&&tu(e,t)===0)return t}function pu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mu(e){let t=Rn(jl),n=Rn(Ml),r=H(()=>{let n=Zt(e.to);return t.resolve(n)}),i=H(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(nl.bind(null,i));if(o>-1)return o;let s=yu(e[t-2]);return t>1&&yu(i)===s&&a[a.length-1].path!==s?a.findIndex(nl.bind(null,e[t-2])):o}),a=H(()=>i.value>-1&&vu(n.params,r.value.params)),o=H(()=>i.value>-1&&i.value===n.matched.length-1&&rl(n.params,r.value.params));function s(n={}){if(_u(n)){let n=t[Zt(e.replace)?`replace`:`push`](Zt(e.to)).catch(Ec);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:H(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function hu(e){return e.length===1?e[0]:e}var gu=z({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:mu,setup(e,{slots:t}){let n=Ft(mu(e)),{options:r}=Rn(jl),i=H(()=>({[bu(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[bu(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&hu(t.default(n));return e.custom?r:co(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function _u(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vu(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Dc(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function yu(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var bu=(e,t,n)=>e??t??n,xu=z({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Rn(Nl),i=H(()=>e.route||r.value),a=Rn(Al,0),o=H(()=>{let e=Zt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Ln(Al,H(()=>o.value+1)),Ln(kl,s),Ln(Nl,i);let c=I();return R(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!nl(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Su(n.default,{Component:l,route:r});let u=o.props[a],d=co(l,wc({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Su(n.default,{Component:d,route:r})||d}}});function Su(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Cu=xu;function wu(e){let t=au(e.routes,e),n=e.parseQuery||El,r=e.stringifyQuery||Dl,i=e.history,a=Pl(),o=Pl(),s=Pl(),c=Jt(sl),l=sl;xc&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Tc.bind(null,e=>``+e),d=Tc.bind(null,Jc),f=Tc.bind(null,Yc);function p(e,n){let r,i;return xl(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=wc({},a||c.value),typeof e==`string`){let r=Qc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return wc(r,o,{params:f(o.params),hash:Yc(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=wc({},e,{path:Qc(n,e.path,a.path).path});else{let t=wc({},e.params);for(let e in t)t[e]??delete t[e];o=wc({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=$c(r,wc({},e,{hash:Wc(l),path:s.path})),m=i.createHref(p);return wc({fullPath:p,hash:l,query:r===Dl?Ol(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?Qc(n,e,c.value.path):wc({},e)}function y(e,t){if(l!==e)return wl(Sl.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(wc(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),wc({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(wc(v(u),{state:typeof u==`object`?wc({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&tl(r,i,n)&&(f=wl(Sl.NAVIGATION_DUPLICATED,{to:d,from:i}),te(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>Tl(e)?Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?e:ee(e):P(e,d,i)).then(e=>{if(e){if(Tl(e,Sl.NAVIGATION_GUARD_REDIRECT))return C(wc({replace:s},v(e.to),{state:typeof e.to==`object`?wc({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ie.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=Ll(e,t);n=Il(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Fl(r,e,t))});let c=w.bind(null,e,t);return n.push(c),oe(n).then(()=>{n=[];for(let r of a.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).then(()=>{n=Il(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Fl(r,e,t))});return n.push(c),oe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Dc(r.beforeEnter))for(let i of r.beforeEnter)n.push(Fl(i,e,t));else n.push(Fl(r.beforeEnter,e,t));return n.push(c),oe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Il(s,`beforeRouteEnter`,e,t,T),n.push(c),oe(n))).then(()=>{n=[];for(let r of o.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).catch(e=>Tl(e,Sl.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===sl,l=xc?history.state:{};n&&(r||s?i.replace(e.fullPath,wc({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,te(e,t,n,s),ee()}let k;function A(){k||=i.listen((e,t,n)=>{if(!ae.listening)return;let r=_(e),a=S(r,ae.currentRoute.value);if(a){C(wc(a,{replace:!0,force:!0}),r).catch(Ec);return}l=r;let o=c.value;xc&&vl(gl(o.fullPath,n.delta),ml()),E(r,o).catch(e=>Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_CANCELLED)?e:Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?(C(wc(v(e.to),{force:!0}),r).then(e=>{Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===cl.pop&&i.go(-1,!1)}).catch(Ec),Promise.reject()):(n.delta&&i.go(-n.delta,!1),P(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!Tl(e,Sl.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===cl.pop&&Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),D(r,o,e)}).catch(Ec)})}let j=Pl(),M=Pl(),N;function P(e,t,n){ee(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function F(){return N&&c.value!==sl?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function ee(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function te(t,n,r,i){let{scrollBehavior:a}=e;if(!xc||!a)return Promise.resolve();let o=!r&&yl(gl(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Sn().then(()=>a(t,n,o)).then(e=>e&&hl(e)).catch(e=>P(e,t,n))}let ne=e=>i.go(e),re,ie=new Set,ae={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:F,install(e){e.component(`RouterLink`,gu),e.component(`RouterView`,Cu),e.config.globalProperties.$router=ae,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Zt(c)}),xc&&!re&&c.value===sl&&(re=!0,b(i.location).catch(e=>{}));let t={};for(let e in sl)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(jl,ae),e.provide(Ml,It(t)),e.provide(Nl,c);let n=e.unmount;ie.add(e),e.unmount=function(){ie.delete(e),ie.size<1&&(l=sl,k&&k(),k=null,c.value=sl,re=!1,N=!1),n()}}};function oe(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return ae}function Tu(){return Rn(jl)}function Eu(e){return Rn(Ml)}var Du=bc(`app`,()=>{let e=I(null),t=I(null),n=I(!1),r=I([]),i=I(!1);function a(e){let t=r.value.findIndex(t=>t.id===e);t>-1&&r.value.splice(t,1)}return{user:e,token:t,loading:n,notifications:r,initialized:i,dismissNotification:a}}),Ou=`modulepreload`,ku=function(e){return`/static/`+e},Au={},ju=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ku(t,n),t in Au)return;Au[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ou,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Mu=wu({history:Ul(),routes:[{path:`/`,component:()=>ju(()=>import(`./HomeView-Dzg7rZr-.js`),__vite__mapDeps([0,1]))},{path:`/login`,component:()=>ju(()=>import(`./LoginView-n35SYtjJ.js`),__vite__mapDeps([2,3]))},{path:`/users`,component:()=>ju(()=>import(`./UsersView-CJ8YSEx_.js`),__vite__mapDeps([4,5]))},{path:`/moldinsight`,component:()=>ju(()=>import(`./MoldInsightView-BI-bxvRF.js`),__vite__mapDeps([6,5]))},{path:`/moldinsight/result/:taskId`,component:()=>ju(()=>import(`./ResultView-BxUb7yw9.js`),__vite__mapDeps([7,5]))},{path:`/inventory`,component:()=>ju(()=>import(`./InventoryView-CtU3XJ5c.js`),__vite__mapDeps([8,5,9]))},{path:`/_design-system`,component:()=>ju(()=>import(`./DesignSystemView-DvYbStPK.js`),[])},{path:`/_release`,component:()=>ju(()=>import(`./ReleaseView-KzbAQOU7.js`),[])}]});Mu.beforeEach((e,t,n)=>{let r=![`/login`,`/_design-system`,`/_release`].includes(e.path),i=Du();if(r&&!i.user)return n(`/login`);if(e.path===`/login`&&i.user)return n(`/`);n()});async function Nu(e){try{if((e.headers.get(`content-type`)||``).includes(`application/json`)){let t=await e.json().catch(()=>null);if(t?.detail){if(Array.isArray(t.detail)){let e=t.detail.map(e=>{let t=Array.isArray(e?.loc)?e.loc.join(`.`):``,n=e?.msg?String(e.msg):`校验失败`;return t?`${t}: ${n}`:n}).filter(Boolean);return e.length?e.join(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-Bo1rHoZv.js","assets/HomeView-wPEC1q8T.css","assets/LoginView-DDsguTRb.js","assets/LoginView-BRS9TQuR.css","assets/UsersView-DOsOx97D.js","assets/utils-COFIQvWo.js","assets/MoldInsightView-wJ3ZjPar.js","assets/ResultView-CqY_0nu0.js","assets/InventoryView-DgARKf1e.js","assets/InventoryView-BfMUL2um.css"])))=>i.map(i=>d[i]); +(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D=/-\w/g,O=E(e=>e.replace(D,e=>e.slice(1).toUpperCase())),k=/\B([A-Z])/g,A=E(e=>e.replace(k,`-$1`).toLowerCase()),j=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),M=E(e=>e?`on${j(e)}`:``),N=(e,t)=>!Object.is(e,t),P=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ee=e=>{let t=parseFloat(e);return isNaN(t)?e:t},te=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},ne,re=()=>ne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ie(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(oe);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function le(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nme(e,t))}var ge=e=>!!(e&&e.__v_isRef===!0),_e=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?_e(e.value):JSON.stringify(e,ve,2):String(e),ve=(e,t)=>ge(t)?ve(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ye(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ye(e))}:_(t)?ye(t):v(t)&&!d(t)&&!C(t)?String(t):t,ye=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,be,xe=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&be&&(be.active?(this.parent=be,this.index=(be.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0){if(be===this)be=this.prevScope;else{let e=be;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ge)||(e.globalVersion=Ge,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=Te,r=Be;Te=e,Be=!0;try{Pe(e);let n=e.fn(e._value);(t.version===0||N(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Te=n,Be=r,Fe(e),e.flags&=-3}}function Re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Be=!0,Ve=[];function He(){Ve.push(Be),Be=!1}function Ue(){let e=Ve.pop();Be=e===void 0?!0:e}function We(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Te;Te=void 0;try{t()}finally{Te=e}}}var Ge=0,Ke=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},qe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Te||!Be||Te===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Te)t=this.activeLink=new Ke(Te,this),Te.deps?(t.prevDep=Te.depsTail,Te.depsTail.nextDep=t,Te.depsTail=t):Te.deps=Te.depsTail=t,Je(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Te.depsTail,t.nextDep=void 0,Te.depsTail.nextDep=t,Te.depsTail=t,Te.deps===t&&(Te.deps=e)}return t}trigger(e){this.version++,Ge++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function Je(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Je(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ye=new WeakMap,Xe=Symbol(``),Ze=Symbol(``),Qe=Symbol(``);function $e(e,t,n){if(Be&&Te){let t=Ye.get(e);t||Ye.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new qe),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Ye.get(e);if(!o){Ge++;return}let s=e=>{e&&e.trigger()};if(Me(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Qe||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Qe)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`delete`:i||(s(o.get(Xe)),f(e)&&s(o.get(Ze)));break;case`set`:f(e)&&s(o.get(Xe));break}}Ne()}function tt(e,t){let n=Ye.get(e);return n&&n.get(t)}function nt(e){let t=Ut(e);return t===e?t:($e(t,`iterate`,Qe),Vt(e)?t:t.map(Gt))}function rt(e){return $e(e=Ut(e),`iterate`,Qe),e}function it(e,t){return Bt(e)?Kt(zt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>d(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return ct(this,`every`,e,t,void 0,arguments)},filter(e,t){return ct(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return ct(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return ct(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ct(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return ct(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ct(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ut(this,`includes`,e)},indexOf(...e){return ut(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return ut(this,`lastIndexOf`,e)},map(e,t){return ct(this,`map`,e,t,void 0,arguments)},pop(){return dt(this,`pop`)},push(...e){return dt(this,`push`,e)},reduce(e,...t){return lt(this,`reduce`,e,t)},reduceRight(e,...t){return lt(this,`reduceRight`,e,t)},shift(){return dt(this,`shift`)},some(e,t){return ct(this,`some`,e,t,void 0,arguments)},splice(...e){return dt(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return dt(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t]();return r!==e&&!Vt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var st=Array.prototype;function ct(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Vt(e),c=o[t];if(c!==st[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function lt(e,t,n,r){let i=rt(e),a=i!==e&&!Vt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function ut(e,t,n){let r=Ut(e);$e(r,`iterate`,Qe);let i=r[t](...n);return(i===-1||i===!1)&&Ht(n[0])?(n[0]=Ut(n[0]),r[t](...n)):i}function dt(e,t,n=[]){He(),Me();let r=Ut(e)[t].apply(e,n);return Ne(),Ue(),r}var ft=e(`__proto__,__v_isRef,__isVue`),pt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function mt(e){_(e)||(e=String(e));let t=Ut(this);return $e(t,`has`,e),t.hasOwnProperty(e)}var ht=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Nt:Mt:i?jt:At).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return mt}let o=Reflect.get(e,t,qt(e)?e:n);if((_(t)?pt.has(t):ft(t))||(r||$e(e,`get`,t),i))return o;if(qt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Lt(e):e}return v(o)?r?Lt(o):Ft(o):o}},gt=class extends ht{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Bt(i);if(!Vt(n)&&!Bt(n)&&(i=Ut(i),n=Ut(n)),!a&&qt(i)&&!qt(n))return e||(i.value=n),!0}let o=a?Number(t)e,St=e=>Reflect.getPrototypeOf(e);function Ct(e,t,n){return function(...r){let i=this.__v_raw,a=Ut(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?xt:t?Kt:Gt;return!t&&$e(a,`iterate`,l?Ze:Xe),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function wt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Tt(e,t){let n={get(n){let r=this.__v_raw,i=Ut(r),a=Ut(n);e||(N(n,a)&&$e(i,`get`,n),$e(i,`get`,a));let{has:o}=St(i),s=t?xt:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&$e(Ut(t),`iterate`,Xe),t.size},has(t){let n=this.__v_raw,r=Ut(n),i=Ut(t);return e||(N(t,i)&&$e(r,`has`,t),$e(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=Ut(a),s=t?xt:e?Kt:Gt;return!e&&$e(o,`iterate`,Xe),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:wt(`add`),set:wt(`set`),delete:wt(`delete`),clear:wt(`clear`)}:{add(e){let n=Ut(this),r=St(n),i=Ut(e),a=!t&&!Vt(e)&&!Bt(e)?i:e;return r.has.call(n,a)||N(e,a)&&r.has.call(n,e)||N(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){!t&&!Vt(n)&&!Bt(n)&&(n=Ut(n));let r=Ut(this),{has:i,get:a}=St(r),o=i.call(r,e);o||=(e=Ut(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?N(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=Ut(this),{has:n,get:r}=St(t),i=n.call(t,e);i||=(e=Ut(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=Ut(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ct(r,e,t)}),n}function Et(e,t){let n=Tt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var Dt={get:Et(!1,!1)},Ot={get:Et(!1,!0)},kt={get:Et(!0,!1)},At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap;function Pt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ft(e){return Bt(e)?e:Rt(e,!1,vt,Dt,At)}function It(e){return Rt(e,!1,bt,Ot,jt)}function Lt(e){return Rt(e,!0,yt,kt,Mt)}function Rt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Pt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function zt(e){return Bt(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function Vt(e){return!!(e&&e.__v_isShallow)}function Ht(e){return e?!!e.__v_raw:!1}function Ut(e){let t=e&&e.__v_raw;return t?Ut(t):e}function Wt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&F(e,`__v_skip`,!0),e}var Gt=e=>v(e)?Ft(e):e,Kt=e=>v(e)?Lt(e):e;function qt(e){return e?e.__v_isRef===!0:!1}function I(e){return Yt(e,!1)}function Jt(e){return Yt(e,!0)}function Yt(e,t){return qt(e)?e:new Xt(e,t)}var Xt=class{constructor(e,t){this.dep=new qe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ut(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Vt(e)||Bt(e);e=n?e:Ut(e),N(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function Zt(e){return qt(e)?e.value:e}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Zt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return qt(i)&&!qt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return zt(e)?e:new Proxy(e,Qt)}function L(e){let t=d(e)?Array(e.length):{};for(let n in e)t[n]=tn(e,n);return t}var en=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=_(t)?t:String(t),this._raw=Ut(e);let r=!0,i=e;if(!d(e)||_(this._key)||!w(this._key))do r=!Ht(i)||Vt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Zt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&qt(this._raw[this._key])){let t=this._object[this._key];if(qt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tt(this._raw,this._key)}};function tn(e,t,n){return new en(e,t,n)}var nn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new qe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ge-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Te!==this)return je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function rn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new nn(r,i,n)}var an={},on=new WeakMap,sn=void 0;function cn(e,t=!1,n=sn){if(n){let t=on.get(n);t||on.set(n,t=[]),t.push(e)}}function ln(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Vt(e)||o===!1||o===0?un(e,1):un(e),m,g,_,v,y=!1,b=!1;if(qt(e)?(g=()=>e.value,y=Vt(e)):zt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>zt(e)||Vt(e)),g=()=>e.map(e=>{if(qt(e))return e.value;if(zt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){He();try{_()}finally{Ue()}}let t=sn;sn=m;try{return f?f(e,3,[v]):e(v)}finally{sn=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>un(e(),t)}let x=Ce(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(an):an,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>N(e,C[t])):N(e,C))){_&&_();let t=sn;sn=m;try{let t=[e,C===an?void 0:b&&C[0]===an?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{sn=t}}}else m.run()};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>cn(e,!1,m),_=m.onStop=()=>{let e=on.get(m);if(e){if(f)f(e,4);else for(let t of e)t();on.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function un(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qt(e))un(e.value,t,n);else if(d(e))for(let r=0;r{un(e,t,n)});else if(C(e)){for(let r in e)un(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&un(e[r],t,n)}return e}function dn(e,t,n,r){try{return r?e(...r):e()}catch(e){pn(e,t,n)}}function fn(e,t,n,r){if(h(e)){let i=dn(e,t,n,r);return i&&y(i)&&i.catch(e=>{pn(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=hn[r],a=kn(i);a=kn(n)?hn.push(e):hn.splice(Cn(t),0,e),e.flags|=1,Tn()}}function Tn(){xn||=bn.then(An)}function En(e){d(e)?_n.push(...e):vn&&e.id===-1?vn.splice(yn+1,0,e):e.flags&1||(_n.push(e),e.flags|=1),Tn()}function Dn(e,t,n=gn+1){for(;nkn(e)-kn(t));if(_n.length=0,vn){vn.push(...e);return}for(vn=e,yn=0;yne.id==null?e.flags&2?-1:1/0:e.id;function An(e){try{for(gn=0;gn{r._d&&xa(-1);let i=Nn(t),a;try{a=e(...n)}finally{Nn(i),r._d&&xa(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Fn(e,n){if(jn===null)return e;let r=ao(jn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}function zn(){return!!(Wa()||Si)}var Bn=Symbol.for(`v-scx`),Vn=()=>Rn(Bn);function Hn(e,t){return Un(e,null,t)}function R(e,t,n){return Un(e,t,n)}function Un(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(Xa){if(c===`sync`){let e=Vn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Ua;u.call=(e,t,n)=>fn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{$i(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():wn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=ln(e,n,u);return Xa&&(f?f.push(h):d&&h()),h}function Wn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Gn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=qa(this),s=Un(i,a.bind(r),n);return o(),s}function Gn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Yn=e=>e&&(e.disabled||e.disabled===``),Xn=e=>e&&(e.defer||e.defer===``),Zn=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Qn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,$n=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},er={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Yn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Yn(e.props),r=e.target=$n(e.props,m),a=ar(r,e,h,p);r&&(o!==`svg`&&Zn(r)?o=`svg`:o!==`mathml`&&Qn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),ir(e,!1)))},S=e=>{let t=()=>{Kn.get(e)===t&&(Kn.delete(e),Yn(e.props)&&(b(e,_(e.el)||n,e.anchor),ir(e,!0)),x(e))};Kn.set(e,t),$i(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Xn(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),ir(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Kn.get(e);if(u){u.flags|=8,Kn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Yn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Zn(p)?o=`svg`:(o===`mathml`||Qn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),aa(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=$n(t.props,m);e&&tr(t,e,null,l,0)}else g&&tr(t,p,h,l,1);ir(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Yn(f),m=Kn.get(e);if(m&&(m.flags|=8,Kn.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],ur={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},dr=e=>{let t=e.subTree;return t.component?dr(t.component):t},fr={name:`BaseTransition`,props:ur,setup(e,{slots:t}){let n=Wa(),r=cr();return()=>{let i=t.default&&br(t.default(),!0),a=i&&i.length?pr(i):n.subTree?Fa():void 0;if(!a)return;let o=Ut(e),{mode:s}=o;if(r.isLeaving)return _r(a);let c=vr(a);if(!c)return _r(a);let l=gr(c,o,r,n,e=>l=e);c.type!==ma&&yr(c,l);let u=n.subTree&&vr(n.subTree);if(u&&u.type!==ma&&!Ea(u,c)&&dr(n).type!==ma){let e=gr(u,o,r,n);if(yr(u,e),s===`out-in`&&c.type!==ma)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},_r(a);s===`in-out`&&c.type!==ma?e.delayLeave=(e,t,n)=>{let i=hr(r,u);i[String(u.key)]=u,e[or]=()=>{t(),e[or]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function pr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ma){t=n;break}}return t}var mr=fr;function hr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=hr(n,e),C=(e,t)=>{e&&fn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[or]&&t[or](!0);let i=S[x];i&&Ea(e,i)&&i.el[or]&&i.el[or](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||f;else return;let s=!1;t[sr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[sr]=void 0)};let c=t[sr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[sr]&&t[sr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[or]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[or]=void 0,S[i]===e&&delete S[i])};let o=t[or].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=gr(e,t,n,r,i);return i&&i(a),a}};return T}function _r(e){if(Dr(e))return e=Ma(e),e.children=null,e}function vr(e){if(!Dr(e))return Jn(e.type)&&e.children?pr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function yr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,yr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function br(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;ewr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Er(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&wr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ao(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=Ut(v),b=v===t?i:e=>Sr(_,e)?!1:u(y,e),x=(e,t)=>!(t&&Sr(_,t));if(m!=null&&m!==p){if(Tr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(qt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))dn(p,f,12,[l,_]);else{let t=g(p),n=qt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Cr.delete(e)};t.id=-1,Cr.set(e,t),$i(t,r)}else Tr(e),i()}}}function Tr(e){let t=Cr.get(e);t&&(t.flags|=8,Cr.delete(e))}re().requestIdleCallback,re().cancelIdleCallback;var Er=e=>!!e.type.__asyncLoader,Dr=e=>e.type.__isKeepAlive;function Or(e,t){Ar(e,`a`,t)}function kr(e,t){Ar(e,`da`,t)}function Ar(e,t,n=Ua){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Mr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Dr(e.parent.vnode)&&jr(r,t,n,e),e=e.parent}}function jr(e,t,n,r){let i=Mr(t,e,r,!0);zr(()=>{c(r[t],i)},n)}function Mr(e,t,n=Ua,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{He();let i=qa(n),a=fn(t,n,e,r);return i(),Ue(),a};return r?i.unshift(a):i.push(a),a}}var Nr=e=>(t,n=Ua)=>{(!Xa||e===`sp`)&&Mr(e,(...e)=>t(...e),n)},Pr=Nr(`bm`),Fr=Nr(`m`),Ir=Nr(`bu`),Lr=Nr(`u`),Rr=Nr(`bum`),zr=Nr(`um`),Br=Nr(`sp`),Vr=Nr(`rtg`),Hr=Nr(`rtc`);function Ur(e,t=Ua){Mr(`ec`,e,t)}var Wr=`components`,Gr=`directives`;function Kr(e,t){return Xr(Wr,e,!0,t)||e}var qr=Symbol.for(`v-ndc`);function Jr(e){return g(e)?Xr(Wr,e,!1)||e:e||qr}function Yr(e){return Xr(Gr,e)}function Xr(e,t,n=!0,r=!1){let i=jn||Ua;if(i){let n=i.type;if(e===Wr){let e=oo(n,!1);if(e&&(e===t||e===O(t)||e===j(O(t))))return n}let a=Zr(i[e]||n[e],t)||Zr(i.appContext[e],t);return!a&&r?n:a}}function Zr(e,t){return e&&(e[t]||e[O(t)]||e[j(O(t))])}function Qr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&zt(e),r=!1,s=!1;n&&(r=!Vt(e),s=Bt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?Ya(e)?ao(e):$r(e.parent):null,ei=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>$r(e.parent),$root:e=>$r(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>li(e),$forceUpdate:e=>e.f||=()=>{wn(e.update)},$nextTick:e=>e.n||=Sn.bind(e.proxy),$watch:e=>Wn.bind(e)}),ti=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),ni={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(ti(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else ii&&(s[n]=0)}let d=ei[n],f,p;if(d)return n===`$attrs`&&$e(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return ti(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||ti(n,c)||u(o,c)||u(i,c)||u(ei,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function ri(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var ii=!0;function ai(e){let t=li(e),n=e.proxy,i=e.ctx;ii=!1,t.beforeCreate&&si(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:M,directives:N,filters:P}=t;if(u&&oi(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ft(t))}if(ii=!0,o)for(let e in o){let t=o[e],a=H({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)ci(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Ln(t,e[t])})}f&&si(f,e,`c`);function F(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(F(Pr,p),F(Fr,m),F(Ir,g),F(Lr,_),F(Or,y),F(kr,b),F(Ur,O),F(Hr,E),F(Vr,D),F(Rr,S),F(zr,w),F(Br,k),d(A))if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===r&&(e.render=T),j!=null&&(e.inheritAttrs=j),M&&(e.components=M),N&&(e.directives=N),k&&xr(e)}function oi(e,t,n=r){d(e)&&(e=mi(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Rn(r.from||n,r.default,!0):Rn(r.from||n):Rn(r),qt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function si(e,t,n){fn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ci(e,t,n,r){let i=r.includes(`.`)?Gn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&R(i,n)}else if(h(e))R(i,e.bind(n));else if(v(e))if(d(e))e.forEach(e=>ci(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&R(i,r,e)}}function li(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>ui(c,e,o,!0)),ui(c,t,o)),v(t)&&a.set(t,c),c}function ui(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ui(e,a,n,!0),i&&i.forEach(t=>ui(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=di[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var di={data:fi,props:_i,emits:_i,methods:gi,computed:gi,beforeCreate:hi,created:hi,beforeMount:hi,mounted:hi,beforeUpdate:hi,updated:hi,beforeDestroy:hi,beforeUnmount:hi,destroyed:hi,unmounted:hi,activated:hi,deactivated:hi,errorCaptured:hi,serverPrefetch:hi,components:gi,directives:gi,watch:vi,provide:fi,inject:pi};function fi(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function pi(e,t){return gi(mi(e),mi(t))}function mi(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${A(t)}Modifiers`];function wi(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Ci(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(ee)));let c,l=i[c=M(n)]||i[c=M(O(n))];!l&&o&&(l=i[c=M(A(n))]),l&&fn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,fn(u,e,6,a)}}var Ti=new WeakMap;function Ei(e,t,n=!1){let r=n?Ti:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Ei(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Di(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function Oi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Nn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ia(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ia(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ki(c)}}catch(t){ga.length=0,pn(t,e,1),v=B(ma)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Ai(y,a)),b=Ma(b,y,!1,!0))}return n.dirs&&(b=Ma(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&yr(b,n.transition),v=b,Nn(_),v}var ki=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Ai=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ji(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Mi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Fi),Li=e=>Object.getPrototypeOf(e)===Fi;function Ri(e,t,n,r=!1){let i={},a=Ii();e.propsDefaults=Object.create(null),Bi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:It(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function zi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=Ut(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Ui(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ki=e=>d(e)?e.map(Ia):[Ia(e)],qi=(e,t,n)=>{if(t._n)return t;let r=Pn((...e)=>Ki(t(...e)),n);return r._c=!1,r},Ji=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Gi(n))continue;let i=e[n];if(h(i))t[n]=qi(n,i,r);else if(i!=null){let e=Ki(i);t[n]=()=>e}}},Yi=(e,t)=>{let n=Ki(t);e.slots.default=()=>n},Xi=(e,t,n)=>{for(let r in t)(n||!Gi(r))&&(e[r]=t[r])},Zi=(e,t,n)=>{let r=e.slots=Ii();if(e.vnode.shapeFlag&32){let e=t._;e?(Xi(r,t,n),n&&F(r,`_`,e,!0)):Ji(t,r)}else t&&Yi(e,t)},Qi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Xi(a,n,r):(o=!n.$stable,Ji(n,a)),s=n}else n&&(Yi(e,n),s={default:1});if(o)for(let e in a)!Gi(e)&&s[e]==null&&delete a[e]},$i=da;function ea(e){return ta(e)}function ta(e,i){let a=re();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ea(e,t)&&(r=pe(e),ce(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case pa:y(e,t,n,r);break;case ma:b(e,t,n,r);break;case ha:e??x(t,n,r,o);break;case fa:M(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?N(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ge)}u!=null&&i?wr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&wr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)E(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},E=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,na(e,a),s,u),_&&In(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&za(f,r,e)}_&&In(e,null,r,`beforeMount`);let v=ia(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&$i(()=>{try{f&&za(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&ra(r,!1),(g=h.onVnodeBeforeUpdate)&&za(g,r,n,e),f&&In(n,e,r,`beforeUpdate`),r&&ra(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,na(n,a),o):s||ie(e,n,l,null,r,i,na(n,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&za(g,r,n,e),f&&In(n,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},M=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&aa(e,t,!0)):ie(e,t,n,f,i,a,s,c,l)},N=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):F(t,n,r,i,a,o,c):ee(e,t,c)},F=(e,t,n,r,i,a,o)=>{let s=e.component=Ha(e,r,i);if(Dr(e)&&(s.ctx.renderer=ge),Za(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,te,o),!e.el){let r=s.subTree=B(ma);b(null,r,t,n),e.placeholder=r.el}}else te(s,e,t,n,i,a,o)},ee=(e,t,n)=>{let r=t.component=e.component;if(ji(e,t,n))if(r.asyncDep&&!r.asyncResolved){ne(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},te=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=sa(e);if(n){t&&(t.el=c.el,ne(e,t,o)),n.asyncDep.then(()=>{$i(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ra(e,!1),t?(t.el=c.el,ne(e,t,o)):t=c,n&&P(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&za(d,s,t,c),ra(e,!0);let f=Oi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),pe(p),e,i,a),t.el=f.el,u===null&&Pi(e,f.el),r&&$i(r,i),(d=t.props&&t.props.onVnodeUpdated)&&$i(()=>za(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Er(t);if(ra(e,!1),l&&P(l),!m&&(o=c&&c.onVnodeBeforeMount)&&za(o,d,t),ra(e,!0),s&&ve){let t=()=>{e.subTree=Oi(e),ve(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Oi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&$i(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;$i(()=>za(o,d,e),i)}(t.shapeFlag&256||d&&Er(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&$i(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new De(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>wn(u),ra(e,!0),l()},ne=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,zi(e,t.props,r,n),Qi(e,t.children,n),He(),Dn(e),Ue()},ie=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){oe(l,d,n,r,i,a,o,s,c);return}else if(f&256){ae(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&fe(l,i,a),d!==l&&p(n,d)):u&16?m&16?oe(l,d,n,r,i,a,o,s,c):fe(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},ae=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?fe(e,a,o,!0,!1,f):O(t,r,i,a,o,s,c,l,f)},oe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?La(t[u]):Ia(t[u]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?La(t[p]):Ia(t[p]);if(Ea(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)ce(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?La(t[u]):Ia(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){ce(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ea(n,t[_])){i=_;break}i===void 0?ce(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?oa(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){se(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ge);return}if(c===fa){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[or];a._isLeaving&&a[or](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},ce=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(He(),wr(s,null,n,e,!0),Ue()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Er(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&za(_,t,e),u&6)de(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&In(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ge,r):l&&!l.hasOnce&&(a!==fa||d>0&&d&64)?fe(l,t,n,!1,!0):(a===fa&&d&384||!i&&u&16)&&fe(c,t,n),r&&le(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&$i(()=>{_&&za(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},le=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===fa){ue(n,r);return}if(t===ha){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ue=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},de=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ca(c),ca(l),r&&P(r),i.stop(),a&&(a.flags|=8,ce(o,e,t,n)),s&&$i(s,t),$i(()=>{e.isUnmounted=!0},t)},fe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return pe(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[qn];return n?h(n):t},me=!1,he=(e,t,n)=>{let r;e==null?t._vnode&&(ce(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,me||=(me=!0,Dn(r),On(),!1)},ge={p:v,um:ce,m:se,r:le,mt:F,mc:O,pc:ie,pbc:A,n:pe,o:e},_e,ve;return i&&([_e,ve]=i(ge)),{render:he,hydrate:_e,createApp:xi(he,_e)}}function na({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ra({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ia(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function aa(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function sa(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:sa(t)}function ca(e){if(e)for(let t=0;te.__isSuspense;function da(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):En(e)}var fa=Symbol.for(`v-fgt`),pa=Symbol.for(`v-txt`),ma=Symbol.for(`v-cmt`),ha=Symbol.for(`v-stc`),ga=[],_a=null;function va(e=!1){ga.push(_a=e?null:[])}function ya(){ga.pop(),_a=ga[ga.length-1]||null}var ba=1;function xa(e,t=!1){ba+=e,e<0&&_a&&t&&(_a.hasOnce=!0)}function Sa(e){return e.dynamicChildren=ba>0?_a||n:null,ya(),ba>0&&_a&&_a.push(e),e}function Ca(e,t,n,r,i,a){return Sa(ka(e,t,n,r,i,a,!0))}function wa(e,t,n,r,i){return Sa(B(e,t,n,r,i,!0))}function Ta(e){return e?e.__v_isVNode===!0:!1}function Ea(e,t){return e.type===t.type&&e.key===t.key}var Da=({key:e})=>e??null,Oa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||qt(e)||h(e)?{i:jn,r:e,k:t,f:!!n}:e);function ka(e,t=null,n=null,r=0,i=null,a=e===fa?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Da(t),ref:t&&Oa(t),scopeId:Mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:jn};return s?(Ra(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ba>0&&!o&&_a&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_a.push(c),c}var B=Aa;function Aa(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===qr)&&(e=ma),Ta(e)){let r=Ma(e,t,!0);return n&&Ra(r,n),ba>0&&!a&&_a&&(r.shapeFlag&6?_a[_a.indexOf(e)]=r:_a.push(r)),r.patchFlag=-2,r}if(so(e)&&(e=e.__vccOpts),t){t=ja(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=le(e)),v(n)&&(Ht(n)&&!d(n)&&(n=s({},n)),t.style=ie(n))}let o=g(e)?1:ua(e)?128:Jn(e)?64:v(e)?4:h(e)?2:0;return ka(e,t,n,r,i,o,a,!0)}function ja(e){return e?Ht(e)||Li(e)?s({},e):e:null}function Ma(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?V(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Da(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Oa(t)):[a,Oa(t)]:Oa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==fa?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ma(e.ssContent),ssFallback:e.ssFallback&&Ma(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&yr(u,c.clone(u)),u}function Na(e=` `,t=0){return B(pa,null,e,t)}function Pa(e,t){let n=B(ha,null,e);return n.staticCount=t,n}function Fa(e=``,t=!1){return t?(va(),wa(ma,null,e)):B(ma,null,e)}function Ia(e){return e==null||typeof e==`boolean`?B(ma):d(e)?B(fa,null,e.slice()):Ta(e)?La(e):B(pa,null,String(e))}function La(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ma(e)}function Ra(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Ra(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!Li(t)?t._ctx=jn:r===3&&jn&&(jn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else h(t)?(t={default:t,_ctx:jn},n=32):(t=String(t),r&64?(n=16,t=[Na(t)]):n=8);e.children=t,e.shapeFlag|=n}function V(...e){let t={};for(let n=0;nUa||jn,Ga,Ka;{let e=re(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ga=t(`__VUE_INSTANCE_SETTERS__`,e=>Ua=e),Ka=t(`__VUE_SSR_SETTERS__`,e=>Xa=e)}var qa=e=>{let t=Ua;return Ga(e),e.scope.on(),()=>{e.scope.off(),Ga(t)}},Ja=()=>{Ua&&Ua.scope.off(),Ga(null)};function Ya(e){return e.vnode.shapeFlag&4}var Xa=!1;function Za(e,t=!1,n=!1){t&&Ka(t);let{props:r,children:i}=e.vnode,a=Ya(e);Ri(e,r,a,t),Zi(e,i,n||t);let o=a?Qa(e,t):void 0;return t&&Ka(!1),o}function Qa(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ni);let{setup:r}=n;if(r){He();let n=e.setupContext=r.length>1?io(e):null,i=qa(e),a=dn(r,e,0,[e.props,n]),o=y(a);if(Ue(),i(),(o||e.sp)&&!Er(e)&&xr(e),o){if(a.then(Ja,Ja),t)return a.then(n=>{$a(e,n,t)}).catch(t=>{pn(t,e,0)});e.asyncDep=a}else $a(e,a,t)}else no(e,t)}function $a(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=$t(t)),no(e,n)}var eo,to;function no(e,t,n){let i=e.type;if(!e.render){if(!t&&eo&&!i.render){let t=i.template||li(e).template;if(t){let{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:o}=i;i.render=eo(t,s(s({isCustomElement:n,delimiters:a},r),o))}}e.render=i.render||r,to&&to(e)}{let t=qa(e);He();try{ai(e)}finally{Ue(),t()}}}var ro={get(e,t){return $e(e,`get`,``),e[t]}};function io(e){return{attrs:new Proxy(e.attrs,ro),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ao(e){return e.exposed?e.exposeProxy||=new Proxy($t(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ei)return ei[n](e)},has(e,t){return t in e||t in ei}}):e.proxy}function oo(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function so(e){return h(e)&&`__vccOpts`in e}var H=(e,t)=>rn(e,t,Xa);function co(e,t,n){try{xa(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Ta(t)?B(e,null,[t]):B(e,t):B(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ta(n)&&(n=[n]),B(e,t,n))}finally{xa(1)}}var lo=`3.5.35`,uo=void 0,fo=typeof window<`u`&&window.trustedTypes;if(fo)try{uo=fo.createPolicy(`vue`,{createHTML:e=>e})}catch{}var po=uo?e=>uo.createHTML(e):e=>e,mo=`http://www.w3.org/2000/svg`,ho=`http://www.w3.org/1998/Math/MathML`,go=typeof document<`u`?document:null,_o=go&&go.createElement(`template`),vo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?go.createElementNS(mo,e):t===`mathml`?go.createElementNS(ho,e):n?go.createElement(e,{is:n}):go.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>go.createTextNode(e),createComment:e=>go.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>go.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{_o.innerHTML=po(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=_o.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yo=`transition`,bo=`animation`,xo=Symbol(`_vtc`),So={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Co=s({},ur,So),wo=(e=>(e.displayName=`Transition`,e.props=Co,e))((e,{slots:t})=>co(mr,Do(e),t)),To=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},Eo=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function Do(e){let t={};for(let n in e)n in So||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Oo(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,jo(e,t?d:c),jo(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,jo(e,f),jo(e,m),jo(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);To(i,[t,o]),Mo(()=>{jo(t,e?l:a),Ao(t,e?d:c),Eo(i)||Po(t,r,g,o)})};return s(t,{onBeforeEnter(e){To(v,[e]),Ao(e,a),Ao(e,o)},onBeforeAppear(e){To(C,[e]),Ao(e,l),Ao(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Ao(e,f),e._enterCancelled?(Ao(e,p),Ro(e)):(Ro(e),Ao(e,p)),Mo(()=>{e._isLeaving&&(jo(e,f),Ao(e,m),Eo(x)||Po(e,r,_,n))}),To(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),To(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),To(T,[e])},onLeaveCancelled(e){D(e),To(S,[e])}})}function Oo(e){if(e==null)return null;if(v(e))return[ko(e.enter),ko(e.leave)];{let t=ko(e);return[t,t]}}function ko(e){return te(e)}function Ao(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[xo]||(e[xo]=new Set)).add(t)}function jo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[xo];n&&(n.delete(t),n.size||(e[xo]=void 0))}function Mo(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var No=0;function Po(e,t,n,r){let i=e._endId=++No,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Fo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${yo}Delay`),a=r(`${yo}Duration`),o=Io(i,a),s=r(`${bo}Delay`),c=r(`${bo}Duration`),l=Io(s,c),u=null,d=0,f=0;t===yo?o>0&&(u=yo,d=o,f=a.length):t===bo?l>0&&(u=bo,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?yo:bo:null,f=u?u===yo?a.length:c.length:0);let p=u===yo&&/\b(?:transform|all)(?:,|$)/.test(r(`${yo}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Io(e,t){for(;e.lengthLo(t)+Lo(e[n])))}function Lo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ro(e){return(e?e.ownerDocument:document).body.offsetHeight}function zo(e,t,n){let r=e[xo];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Bo=Symbol(`_vod`),Vo=Symbol(`_vsh`),Ho={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Bo]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Uo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Uo(e,!0),r.enter(e)):r.leave(e,()=>{Uo(e,!1)}):Uo(e,t))},beforeUnmount(e,{value:t}){Uo(e,t)}};function Uo(e,t){e.style.display=t?e[Bo]:`none`,e[Vo]=!t}var Wo=Symbol(``),Go=/(?:^|;)\s*display\s*:/;function Ko(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t)if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Jo(r,t,``)}else for(let e in t)n[e]??Jo(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Jo(r,i,``):Qo(e,i,!g(t)&&t?t[i]:void 0,o)||Jo(r,i,o)}}else if(i){if(t!==n){let e=r[Wo];e&&(n+=`;`+e),r.cssText=n,a=Go.test(n)}}else t&&e.removeAttribute(`style`);Bo in e&&(e[Bo]=a?r.display:``,e[Vo]&&(r.display=`none`))}var qo=/\s*!important$/;function Jo(e,t,n){if(d(n))n.forEach(n=>Jo(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Zo(e,t);qo.test(n)?e.setProperty(A(r),n.replace(qo,``),`important`):e[r]=n}}var Yo=[`Webkit`,`Moz`,`ms`],Xo={};function Zo(e,t){let n=Xo[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Xo[t]=r;r=j(r);for(let n=0;ncs||=(ls.then(()=>cs=0),Date.now());function ds(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ps=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?zo(e,r,c):t===`style`?Ko(e,n,r):a(t)?o(t)||as(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ms(e,t,r,c))?(ts(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&es(e,t,r,c,s,t!==`value`)):e._isVueCE&&(hs(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?ts(e,O(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),es(e,t,r,c))};function ms(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&fs(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return fs(t)&&g(n)?!1:t in e}function hs(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var gs=new WeakMap,_s=new WeakMap,vs=Symbol(`_moveCb`),ys=Symbol(`_enterCb`),bs=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:s({},Co,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Wa(),r=cr(),i,a;return Lr(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Ts(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(xs),i.forEach(Ss);let r=i.filter(Cs);Ro(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Ao(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[vs]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[vs]=null,jo(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=Ut(e),s=Do(o),c=o.tag||fa;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Fo(r);return a.removeChild(r),o}var Es=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>P(t,e):t},Ds=Symbol(`_assign`),Os={deep:!0,created(e,t,n){e[Ds]=Es(n),ns(e,`change`,()=>{let t=e._modelValue,n=As(e),r=e.checked,i=e[Ds];if(d(t)){let e=he(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(js(e,r))})},mounted:ks,beforeUpdate(e,t,n){e[Ds]=Es(n),ks(e,t,n)}};function ks(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=he(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=me(t,js(e,!0))}e.checked!==i&&(e.checked=i)}function As(e){return`_value`in e?e._value:e.value}function js(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ms=[`ctrl`,`shift`,`alt`,`meta`],Ns={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Ms.some(n=>e[`${n}Key`]&&!t.includes(n))},Ps=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{Ls().render(...e)}),zs=((...e)=>{let t=Ls().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Vs(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Bs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Bs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Vs(e){return g(e)?document.querySelector(e):e}var Hs=typeof window<`u`,Us,Ws=e=>Us=e,Gs=Symbol();function Ks(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var qs;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(qs||={});var Js=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Ys(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Xs(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){tc(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Zs(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Qs(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var $s=typeof navigator==`object`?navigator:{userAgent:``},ec=/Macintosh/.test($s.userAgent)&&/AppleWebKit/.test($s.userAgent)&&!/Safari/.test($s.userAgent),tc=Hs?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ec?nc:`msSaveOrOpenBlob`in $s?rc:ic:()=>{};function nc(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?Qs(r):Zs(r.href)?Xs(e,t,n):(r.target=`_blank`,Qs(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Qs(r)},0))}function rc(e,t=`download`,n){if(typeof e==`string`)if(Zs(e))Xs(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){Qs(t)})}else navigator.msSaveOrOpenBlob(Ys(e,n),t)}function ic(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Xs(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Js.HTMLElement))||`safari`in Js,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ec)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ac}=Object;function oc(){let e=Se(!0),t=e.run(()=>I({})),n=[],r=[],i=Wt({install(e){Ws(i),i._a=e,e.provide(Gs,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var sc=()=>{};function cc(e,t,n,r=sc){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&Ce()&&we(i),i}function lc(e,...t){e.forEach(e=>{e(...t)})}var uc=e=>e(),dc=Symbol(),fc=Symbol();function pc(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Ks(i)&&Ks(r)&&e.hasOwnProperty(n)&&!qt(r)&&!zt(r)?e[n]=pc(i,r):e[n]=r}return e}var mc=Symbol();function hc(e){return!Ks(e)||!Object.prototype.hasOwnProperty.call(e,mc)}var{assign:gc}=Object;function _c(e){return!!(qt(e)&&e.effect)}function vc(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),gc(L(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Wt(H(()=>{Ws(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=yc(e,l,t,n,r,!0),c}function yc(e,t,n={},r,i,a){let o,s=gc({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:qs.patchFunction,storeId:e,events:void 0}):(pc(r.state.value[e],t),n={type:qs.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();Sn().then(()=>{m===i&&(l=!0)}),u=!0,lc(d,n,r.state.value[e])}let g=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{gc(e,t)})}:sc;function _(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let v=(t,n=``)=>{if(dc in t)return t[fc]=n,t;let i=function(){Ws(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}lc(f,{args:n,name:i[fc],store:y,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:y,n)}catch(e){throw lc(o,e),e}return l instanceof Promise?l.then(e=>(lc(a,e),e)).catch(e=>(lc(o,e),Promise.reject(e))):(lc(a,l),l)};return i[dc]=!0,i[fc]=n,i},y=Ft({_p:r,$id:e,$onAction:cc.bind(null,f),$patch:h,$reset:g,$subscribe(t,n={}){let i=cc(d,t,n.detached,()=>a()),a=o.run(()=>R(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:qs.direct,events:void 0},r)},gc({},c,n)));return i},$dispose:_});r._s.set(e,y);let b=(r._a&&r._a.runWithContext||uc)(()=>r._e.run(()=>(o=Se()).run(()=>t({action:v}))));for(let t in b){let n=b[t];qt(n)&&!_c(n)||zt(n)?a||(p&&hc(n)&&(qt(n)?n.value=p[t]:pc(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(b[t]=v(n,t),s.actions[t]=n)}return gc(y,b),gc(Ut(y),b),Object.defineProperty(y,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{gc(t,e)})}}),r._p.forEach(e=>{gc(y,o.run(()=>e({store:y,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(y.$state,p),l=!0,u=!0,y}function bc(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=zn();return n||=o?Rn(Gs,null):null,n&&Ws(n),n=Us,n._s.has(e)||(i?yc(e,t,r,n):vc(e,r,n)),n._s.get(e)}return a.$id=e,a}var xc=typeof document<`u`;function Sc(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Cc(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Sc(e.default)}var wc=Object.assign;function Tc(e,t){let n={};for(let r in t){let i=t[r];n[r]=Dc(i)?i.map(e):e(i)}return n}var Ec=()=>{},Dc=Array.isArray;function Oc(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var kc=/#/g,Ac=/&/g,jc=/\//g,Mc=/=/g,Nc=/\?/g,Pc=/\+/g,Fc=/%5B/g,Ic=/%5D/g,Lc=/%5E/g,Rc=/%60/g,zc=/%7B/g,Bc=/%7C/g,Vc=/%7D/g,Hc=/%20/g;function Uc(e){return e==null?``:encodeURI(``+e).replace(Bc,`|`).replace(Fc,`[`).replace(Ic,`]`)}function Wc(e){return Uc(e).replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Gc(e){return Uc(e).replace(Pc,`%2B`).replace(Hc,`+`).replace(kc,`%23`).replace(Ac,`%26`).replace(Rc,"`").replace(zc,`{`).replace(Vc,`}`).replace(Lc,`^`)}function Kc(e){return Gc(e).replace(Mc,`%3D`)}function qc(e){return Uc(e).replace(kc,`%23`).replace(Nc,`%3F`)}function Jc(e){return qc(e).replace(jc,`%2F`)}function Yc(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Xc=/\/$/,Zc=e=>e.replace(Xc,``);function Qc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=ol(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Yc(o)}}function $c(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function el(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function tl(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&nl(t.matched[r],n.matched[i])&&rl(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function nl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function rl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!il(e[n],t[n]))return!1;return!0}function il(e,t){return Dc(e)?al(e,t):Dc(t)?al(t,e):e?.valueOf()===t?.valueOf()}function al(e,t){return Dc(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function ol(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var sl={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},cl=function(e){return e.pop=`pop`,e.push=`push`,e}({}),ll=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function ul(e){if(!e)if(xc){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Zc(e)}var dl=/^[^#]+#/;function fl(e,t){return e.replace(dl,`#`)+t}function pl(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var ml=()=>({left:window.scrollX,top:window.scrollY});function hl(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=pl(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function gl(e,t){return(history.state?history.state.position-t:-1)+e}var _l=new Map;function vl(e,t){_l.set(e,t)}function yl(e){let t=_l.get(e);return _l.delete(e),t}function bl(e){return typeof e==`string`||e&&typeof e==`object`}function xl(e){return typeof e==`string`||typeof e==`symbol`}var Sl=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Cl=Symbol(``);Sl.MATCHER_NOT_FOUND,Sl.NAVIGATION_GUARD_REDIRECT,Sl.NAVIGATION_ABORTED,Sl.NAVIGATION_CANCELLED,Sl.NAVIGATION_DUPLICATED;function wl(e,t){return wc(Error(),{type:e,[Cl]:!0},t)}function Tl(e,t){return e instanceof Error&&Cl in e&&(t==null||!!(e.type&t))}function El(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Gc(e)):[r&&Gc(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Ol(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=Dc(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var kl=Symbol(``),Al=Symbol(``),jl=Symbol(``),Ml=Symbol(``),Nl=Symbol(``);function Pl(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Fl(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(wl(Sl.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):bl(e)?c(wl(Sl.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Il(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(Sc(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Fl(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Cc(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Fl(c,n,r,o,e,i)()}))}}return a}function Ll(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;onl(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>nl(e,s))||i.push(s))}return[n,r,i]}var Rl=()=>location.protocol+`//`+location.host;function zl(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),el(n,``)}return el(n,e)+r+i}function Bl(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=zl(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:cl.pop,direction:u?u>0?ll.forward:ll.back:ll.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(wc({},e.state,{scroll:ml()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Vl(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?ml():null}}function Hl(e){let{history:t,location:n}=window,r={value:zl(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Rl()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,wc({},t.state,Vl(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=wc({},i.value,t.state,{forward:e,scroll:ml()});a(o.current,o,!0),a(e,wc({},Vl(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Ul(e){e=ul(e);let t=Hl(e),n=Bl(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=wc({location:``,base:e,go:r,createHref:fl.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var Wl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Gl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Gl||{}),Kl={type:Wl.Static,value:``},ql=/[a-zA-Z0-9_]/;function Jl(e){if(!e)return[[]];if(e===`/`)return[[Kl]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Gl.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Gl.Static?a.push({type:Wl.Static,value:l}):n===Gl.Param||n===Gl.ParamRegExp||n===Gl.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Wl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===Zl.Static+Zl.Segment?1:-1:0}function tu(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var ru={strict:!1,end:!0,sensitive:!1};function iu(e,t,n){let r=wc($l(Jl(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function au(e,t){let n=[],r=new Map;t=Oc(ru,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=su(e);s.aliasOf=r&&r.record;let l=Oc(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(su(wc({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=iu(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!lu(d)&&o(e.name)),pu(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Ec}function o(e){if(xl(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=du(e,n);n.splice(t,0,e),e.record.name&&!lu(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=wc(ou(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&ou(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw wl(Sl.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=wc({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:uu(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function ou(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function su(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:cu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function cu(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function lu(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uu(e){return e.reduce((e,t)=>wc(e,t.meta),{})}function du(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;tu(e,t[i])<0?r=i:n=i+1}let i=fu(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function fu(e){let t=e;for(;t=t.parent;)if(pu(t)&&tu(e,t)===0)return t}function pu({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function mu(e){let t=Rn(jl),n=Rn(Ml),r=H(()=>{let n=Zt(e.to);return t.resolve(n)}),i=H(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(nl.bind(null,i));if(o>-1)return o;let s=yu(e[t-2]);return t>1&&yu(i)===s&&a[a.length-1].path!==s?a.findIndex(nl.bind(null,e[t-2])):o}),a=H(()=>i.value>-1&&vu(n.params,r.value.params)),o=H(()=>i.value>-1&&i.value===n.matched.length-1&&rl(n.params,r.value.params));function s(n={}){if(_u(n)){let n=t[Zt(e.replace)?`replace`:`push`](Zt(e.to)).catch(Ec);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:H(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function hu(e){return e.length===1?e[0]:e}var gu=z({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:mu,setup(e,{slots:t}){let n=Ft(mu(e)),{options:r}=Rn(jl),i=H(()=>({[bu(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[bu(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&hu(t.default(n));return e.custom?r:co(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function _u(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function vu(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!Dc(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function yu(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var bu=(e,t,n)=>e??t??n,xu=z({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Rn(Nl),i=H(()=>e.route||r.value),a=Rn(Al,0),o=H(()=>{let e=Zt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=H(()=>i.value.matched[o.value]);Ln(Al,H(()=>o.value+1)),Ln(kl,s),Ln(Nl,i);let c=I();return R(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!nl(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Su(n.default,{Component:l,route:r});let u=o.props[a],d=co(l,wc({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Su(n.default,{Component:d,route:r})||d}}});function Su(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Cu=xu;function wu(e){let t=au(e.routes,e),n=e.parseQuery||El,r=e.stringifyQuery||Dl,i=e.history,a=Pl(),o=Pl(),s=Pl(),c=Jt(sl),l=sl;xc&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Tc.bind(null,e=>``+e),d=Tc.bind(null,Jc),f=Tc.bind(null,Yc);function p(e,n){let r,i;return xl(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=wc({},a||c.value),typeof e==`string`){let r=Qc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return wc(r,o,{params:f(o.params),hash:Yc(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=wc({},e,{path:Qc(n,e.path,a.path).path});else{let t=wc({},e.params);for(let e in t)t[e]??delete t[e];o=wc({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=$c(r,wc({},e,{hash:Wc(l),path:s.path})),m=i.createHref(p);return wc({fullPath:p,hash:l,query:r===Dl?Ol(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?Qc(n,e,c.value.path):wc({},e)}function y(e,t){if(l!==e)return wl(Sl.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(wc(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),wc({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(wc(v(u),{state:typeof u==`object`?wc({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&tl(r,i,n)&&(f=wl(Sl.NAVIGATION_DUPLICATED,{to:d,from:i}),te(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>Tl(e)?Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?e:ee(e):P(e,d,i)).then(e=>{if(e){if(Tl(e,Sl.NAVIGATION_GUARD_REDIRECT))return C(wc({replace:s},v(e.to),{state:typeof e.to==`object`?wc({},a,e.to.state):a,force:o}),t||d)}else e=O(d,i,!0,s,a);return D(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function T(e){let t=ie.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=Ll(e,t);n=Il(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Fl(r,e,t))});let c=w.bind(null,e,t);return n.push(c),oe(n).then(()=>{n=[];for(let r of a.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).then(()=>{n=Il(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Fl(r,e,t))});return n.push(c),oe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(Dc(r.beforeEnter))for(let i of r.beforeEnter)n.push(Fl(i,e,t));else n.push(Fl(r.beforeEnter,e,t));return n.push(c),oe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Il(s,`beforeRouteEnter`,e,t,T),n.push(c),oe(n))).then(()=>{n=[];for(let r of o.list())n.push(Fl(r,e,t));return n.push(c),oe(n)}).catch(e=>Tl(e,Sl.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>T(()=>r(e,t,n)))}function O(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===sl,l=xc?history.state:{};n&&(r||s?i.replace(e.fullPath,wc({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,te(e,t,n,s),ee()}let k;function A(){k||=i.listen((e,t,n)=>{if(!ae.listening)return;let r=_(e),a=S(r,ae.currentRoute.value);if(a){C(wc(a,{replace:!0,force:!0}),r).catch(Ec);return}l=r;let o=c.value;xc&&vl(gl(o.fullPath,n.delta),ml()),E(r,o).catch(e=>Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_CANCELLED)?e:Tl(e,Sl.NAVIGATION_GUARD_REDIRECT)?(C(wc(v(e.to),{force:!0}),r).then(e=>{Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===cl.pop&&i.go(-1,!1)}).catch(Ec),Promise.reject()):(n.delta&&i.go(-n.delta,!1),P(e,r,o))).then(e=>{e||=O(r,o,!1),e&&(n.delta&&!Tl(e,Sl.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===cl.pop&&Tl(e,Sl.NAVIGATION_ABORTED|Sl.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),D(r,o,e)}).catch(Ec)})}let j=Pl(),M=Pl(),N;function P(e,t,n){ee(e);let r=M.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function F(){return N&&c.value!==sl?Promise.resolve():new Promise((e,t)=>{j.add([e,t])})}function ee(e){return N||(N=!e,A(),j.list().forEach(([t,n])=>e?n(e):t()),j.reset()),e}function te(t,n,r,i){let{scrollBehavior:a}=e;if(!xc||!a)return Promise.resolve();let o=!r&&yl(gl(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return Sn().then(()=>a(t,n,o)).then(e=>e&&hl(e)).catch(e=>P(e,t,n))}let ne=e=>i.go(e),re,ie=new Set,ae={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:M.add,isReady:F,install(e){e.component(`RouterLink`,gu),e.component(`RouterView`,Cu),e.config.globalProperties.$router=ae,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Zt(c)}),xc&&!re&&c.value===sl&&(re=!0,b(i.location).catch(e=>{}));let t={};for(let e in sl)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(jl,ae),e.provide(Ml,It(t)),e.provide(Nl,c);let n=e.unmount;ie.add(e),e.unmount=function(){ie.delete(e),ie.size<1&&(l=sl,k&&k(),k=null,c.value=sl,re=!1,N=!1),n()}}};function oe(e){return e.reduce((e,t)=>e.then(()=>T(t)),Promise.resolve())}return ae}function Tu(){return Rn(jl)}function Eu(e){return Rn(Ml)}var Du=bc(`app`,()=>{let e=I(null),t=I(null),n=I(!1),r=I([]),i=I(!1);function a(e){let t=r.value.findIndex(t=>t.id===e);t>-1&&r.value.splice(t,1)}return{user:e,token:t,loading:n,notifications:r,initialized:i,dismissNotification:a}}),Ou=`modulepreload`,ku=function(e){return`/static/`+e},Au={},ju=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ku(t,n),t in Au)return;Au[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Ou,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Mu=wu({history:Ul(),routes:[{path:`/`,component:()=>ju(()=>import(`./HomeView-Bo1rHoZv.js`),__vite__mapDeps([0,1]))},{path:`/login`,component:()=>ju(()=>import(`./LoginView-DDsguTRb.js`),__vite__mapDeps([2,3]))},{path:`/users`,component:()=>ju(()=>import(`./UsersView-DOsOx97D.js`),__vite__mapDeps([4,5]))},{path:`/moldinsight`,component:()=>ju(()=>import(`./MoldInsightView-wJ3ZjPar.js`),__vite__mapDeps([6,5]))},{path:`/moldinsight/result/:taskId`,component:()=>ju(()=>import(`./ResultView-CqY_0nu0.js`),__vite__mapDeps([7,5]))},{path:`/inventory`,component:()=>ju(()=>import(`./InventoryView-DgARKf1e.js`),__vite__mapDeps([8,5,9]))},{path:`/_design-system`,component:()=>ju(()=>import(`./DesignSystemView-BgxP6Huu.js`),[])},{path:`/_release`,component:()=>ju(()=>import(`./ReleaseView-CRm-3ZGb.js`),[])}]});Mu.beforeEach((e,t,n)=>{let r=![`/login`,`/_design-system`,`/_release`].includes(e.path),i=Du();if(r&&!i.user)return n(`/login`);if(e.path===`/login`&&i.user)return n(`/`);n()});async function Nu(e){try{if((e.headers.get(`content-type`)||``).includes(`application/json`)){let t=await e.json().catch(()=>null);if(t?.detail){if(Array.isArray(t.detail)){let e=t.detail.map(e=>{let t=Array.isArray(e?.loc)?e.loc.join(`.`):``,n=e?.msg?String(e.msg):`校验失败`;return t?`${t}: ${n}`:n}).filter(Boolean);return e.length?e.join(` `):`请求校验失败`}return typeof t.detail==`object`?JSON.stringify(t.detail):String(t.detail)}return t?.message?String(t.message):`请求失败`}let t=(await e.text().catch(()=>``)||``).trim();return t?t.length>200?t.slice(0,200)+`...`:t:`请求失败`}catch{return`请求失败`}}async function Pu(e,t={}){let n=Du(),r={"Content-Type":`application/json`,...t.headers||{}};n.token&&(r.Authorization=`Bearer ${n.token}`);let i=await fetch(e,{...t,headers:r});if(i.status===401){let t=e.includes(`/api/auth/login`);t||(n.user=null,n.token=null,localStorage.removeItem(`token`),localStorage.removeItem(`user`));let r=await Nu(i);throw Error(t?r:`登录已过期,请重新登录`)}if(!i.ok){let e=await Nu(i);throw Error(e)}return i.json()}function Fu(e,t){let n=Du();n.token=e,n.user=t,localStorage.setItem(`token`,e),localStorage.setItem(`user`,JSON.stringify(t))}function Iu(){let e=Du();e.token=null,e.user=null,localStorage.removeItem(`token`),localStorage.removeItem(`user`)}function Lu(){let e=Du(),t=localStorage.getItem(`token`),n=localStorage.getItem(`user`);if(t&&n)try{e.token=t,e.user=JSON.parse(n)}catch{Iu()}e.initialized=!0}var Ru=0,zu=new Map;function Bu(e,t=`info`){let n=`${t}:${e}`,r=Date.now();if(r-(zu.get(n)||0)<2500)return;zu.set(n,r);let i=Du(),a=++Ru,o={id:a,message:e,type:t,timestamp:new Date,visible:!0};i.notifications.push(o),setTimeout(()=>{let e=i.notifications.find(e=>e.id===a);e&&(e.visible=!1,setTimeout(()=>{i.dismissNotification(a)},300))},5e3)}function Vu(e,t=``){console.error(`API错误 [${t}]:`,e);let n=e instanceof Error?e.message:`请求失败,请稍后重试`;return Bu(n,`error`),n}var Hu={class:`app-container`},Uu={key:0,class:`notification-container`},Wu={class:`notification-icon`},Gu={class:`notification-content`},Ku={class:`notification-message`},qu=[`onClick`],Ju={class:`app-header`},Yu={class:`header-content`},Xu={key:0,class:`nav-menu`},Zu={class:`user-section`},Qu={class:`user-info`},$u={class:`user-avatar`},ed={class:`user-name`},td={class:`main-content`},nd=z({__name:`App`,setup(e){let t=Eu(),n=Tu(),r=Du(),i=H(()=>{let e=[{path:`/`,label:`首页`,icon:`⌂`},{path:`/inventory`,label:`进销存`,icon:`⊞`},{path:`/moldinsight`,label:`MoldInsight`,icon:`◈`}];return r.user?.is_superuser&&e.push({path:`/users`,label:`用户管理`,icon:`👤`}),e}),a=e=>e===`/`?t.path===`/`:t.path.startsWith(e),o=async()=>{try{await Pu(`/api/auth/logout`,{method:`POST`})}catch{}Iu(),Bu(`已退出登录`,`success`),n.push(`/login`)},s=e=>{let t=r.notifications.find(t=>t.id===e);t&&(t.visible=!1,setTimeout(()=>{r.dismissNotification(e)},300))};return Fr(()=>{Lu()}),(e,t)=>{let c=Kr(`router-link`),l=Kr(`t-button`),u=Kr(`router-view`);return va(),Ca(`div`,Hu,[Zt(r).notifications.length>0?(va(),Ca(`div`,Uu,[B(bs,{name:`notification`},{default:Pn(()=>[(va(!0),Ca(fa,null,Qr(Zt(r).notifications,e=>(va(),Ca(`div`,{key:e.id,class:le([`notification`,`notification-`+e.type])},[ka(`div`,Wu,_e(e.type===`success`?`✓`:e.type===`error`?`✕`:e.type===`warning`?`!`:`i`),1),ka(`div`,Gu,[ka(`div`,Ku,_e(e.message),1)]),ka(`button`,{class:`notification-close`,onClick:t=>s(e.id)},`×`,8,qu)],2))),128))]),_:1})])):Fa(``,!0),ka(`header`,Ju,[ka(`div`,Yu,[ka(`div`,{class:`logo`,onClick:t[0]||=e=>Zt(n).push(`/`)},[...t[1]||=[ka(`div`,{class:`logo-icon`},`G`,-1),ka(`div`,null,[ka(`div`,{class:`logo-text`},`Gemold`),ka(`div`,{class:`logo-subtitle`},`模具制造管理系统`)],-1)]]),Zt(r).user?(va(),Ca(`nav`,Xu,[(va(!0),Ca(fa,null,Qr(i.value,e=>(va(),wa(c,{key:e.path,to:e.path,class:le([`nav-item`,{active:a(e.path)}])},{default:Pn(()=>[Na(_e(e.label),1)]),_:2},1032,[`to`,`class`]))),128))])):Fa(``,!0),ka(`div`,Zu,[Zt(r).user?(va(),Ca(fa,{key:0},[ka(`div`,Qu,[ka(`div`,$u,_e((Zt(r).user.full_name||Zt(r).user.username).charAt(0).toUpperCase()),1),ka(`span`,ed,_e(Zt(r).user.full_name||Zt(r).user.username),1)]),B(l,{theme:`default`,variant:`outline`,size:`small`,onClick:o},{default:Pn(()=>[...t[2]||=[Na(`退出`,-1)]]),_:1})],64)):(va(),wa(c,{key:1,to:`/login`,class:`btn btn-primary`},{default:Pn(()=>[...t[3]||=[Na(`登录`,-1)]]),_:1}))])])]),ka(`main`,td,[B(u,null,{default:Pn(({Component:e})=>[B(wo,{name:`fade`,mode:`out-in`},{default:Pn(()=>[(va(),wa(Jr(e)))]),_:2},1024)]),_:1})]),t[4]||=ka(`footer`,{class:`app-footer`},[ka(`div`,{class:`footer-content`},[ka(`a`,{href:`https://beian.miit.gov.cn/`,target:`_blank`,class:`beian-link`},`粤ICP备2025386132号-1`)])],-1)])}}}),rd=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},id=rd(nd,[[`__scopeId`,`data-v-42becfab`]]);function ad(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0){if(++t>=wf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Of(e){return function(){return e}}var kf=function(){try{var e=_f(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Af=Df(kf?function(e,t){return kf(e,`toString`,{configurable:!0,enumerable:!1,value:Of(t),writable:!0})}:Zd);function jf(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Lf=9007199254740991,Rf=/^(?:0|[1-9]\d*)$/;function zf(e,t){var n=typeof e;return t??=Lf,!!t&&(n==`number`||n!=`symbol`&&Rf.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Jf}function Xf(e){return e!=null&&Yf(e.length)&&!K(e)}function Zf(e,t,n){if(!Bd(n))return!1;var r=typeof t;return(r==`number`?Xf(n)&&zf(t,n.length):r==`string`&&t in n)?Vf(n[t],e):!1}function Qf(e){return qf(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Zf(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}function Cm(e,t){var n=this.__data__,r=vm(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function wm(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Ym(s,t-1,n,r,i):Km(i,s):r||(i[i.length]=s)}return i}function Xm(e){return e!=null&&e.length?Ym(e,1):[]}function Zm(e){return Af(Kf(e,void 0,Xm),e+``)}var Qm=Jp(Object.getPrototypeOf,Object),$m=`[object Object]`,eh=Function.prototype,th=Object.prototype,nh=eh.toString,rh=th.hasOwnProperty,ih=nh.call(Object);function ah(e){if(!Od(e)||Dd(e)!=$m)return!1;var t=Qm(e);if(t===null)return!0;var n=rh.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&nh.call(n)==ih}function oh(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:oh(e,t,n)}var ch=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function lh(e){return ch.test(e)}function uh(e){return e.split(``)}var dh=`\\ud800-\\udfff`,fh=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,ph=`\\ufe0e\\ufe0f`,mh=`[`+dh+`]`,hh=`[`+fh+`]`,gh=`\\ud83c[\\udffb-\\udfff]`,_h=`(?:`+hh+`|`+gh+`)`,vh=`[^`+dh+`]`,yh=`(?:\\ud83c[\\udde6-\\uddff]){2}`,bh=`[\\ud800-\\udbff][\\udc00-\\udfff]`,xh=`\\u200d`,Sh=_h+`?`,Ch=`[`+ph+`]?`,wh=`(?:`+xh+`(?:`+[vh,yh,bh].join(`|`)+`)`+Ch+Sh+`)*`,Th=Ch+Sh+wh,Eh=`(?:`+[vh+hh+`?`,hh,yh,bh,mh].join(`|`)+`)`,Dh=RegExp(gh+`(?=`+gh+`)|`+Eh+Th,`g`);function Oh(e){return e.match(Dh)||[]}function kh(e){return lh(e)?Oh(e):uh(e)}function Ah(e){return function(t){t=Vm(t);var n=lh(t)?kh(t):void 0,r=n?n[0]:t.charAt(0),i=n?sh(n,1).join(``):t.slice(1);return r[e]()+i}}var jh=Ah(`toUpperCase`);function Mh(e){return jh(Vm(e).toLowerCase())}function Nh(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++is))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&qv?new Uv:void 0;for(a.set(e,t),a.set(t,e);++d=t||n<0||d&&r>=a}function _(){var e=Gy();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Gy())}function x(){var e=Gy(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}function Xy(e,t,n){(n!==void 0&&!Vf(e[t],n)||n===void 0&&!(t in e))&&Bf(e,t,n)}function Zy(e){return Od(e)&&Xf(e)}function Qy(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function $y(e){return Wf(e,nm(e))}function eb(e,t,n,r,i,a,o){var s=Qy(e,n),c=Qy(t,n),l=o.get(c);if(l){Xy(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=G(c),p=!f&&fp(c),m=!f&&!p&&Gp(c);u=c,f||p||m?G(s)?u=s:Zy(s)?u=Cf(s):p?(d=!1,u=Kg(c,!0)):m?(d=!1,u=A_(c,!0)):u=[]:ah(c)||sp(c)?(u=s,sp(s)?u=$y(s):(!Bd(s)||K(s))&&(u=Z_(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Xy(e,n,u)}function tb(e,t,n,r,i){e!==t&&Vy(t,function(a,o){if(i||=new zg,Bd(a))eb(e,t,o,n,tb,r,i);else{var s=r?r(Qy(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),Xy(e,o,s)}},nm)}var nb=Qf(function(e,t,n,r){tb(e,t,n,r)});function rb(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=ib&&(a=Gv,o=!1,t=new Uv(t));outer:for(;++it}var mb=Math.max,hb=Math.min;function gb(e,t,n){return e>=hb(t,n)&&e=120&&u.length>=120)?new Uv(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d1,t}),Wf(e,r_(e),n),r&&(n=Iv(n,$b|ex|tx,Qb));for(var i=t.length;i--;)Zb(n,t[i]);return n});function rx(e,t,n,r){if(!Bd(e))return e;t=Hm(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++iox)return n;do t%2&&(n+=e),t=sx(t/2),t&&(e+=e);while(t);return n}var lx=Iy(`length`),ux=`\\ud800-\\udfff`,dx=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,fx=`\\ufe0e\\ufe0f`,px=`[`+ux+`]`,mx=`[`+dx+`]`,hx=`\\ud83c[\\udffb-\\udfff]`,gx=`(?:`+mx+`|`+hx+`)`,_x=`[^`+ux+`]`,vx=`(?:\\ud83c[\\udde6-\\uddff]){2}`,yx=`[\\ud800-\\udbff][\\udc00-\\udfff]`,bx=`\\u200d`,xx=gx+`?`,Sx=`[`+fx+`]?`,Cx=`(?:`+bx+`(?:`+[_x,vx,yx].join(`|`)+`)`+Sx+xx+`)*`,wx=Sx+xx+Cx,Tx=`(?:`+[_x+mx+`?`,mx,vx,yx,px].join(`|`)+`)`,Ex=RegExp(hx+`(?=`+hx+`)|`+Tx+wx,`g`);function Dx(e){for(var t=Ex.lastIndex=0;Ex.test(e);)++t;return t}function Ox(e){return lh(e)?Dx(e):lx(e)}var kx=Math.ceil;function Ax(e,t){t=t===void 0?` `:Fd(t);var n=t.length;if(n<2)return n?cx(t,e):t;var r=cx(t,kx(e/Ox(t)));return lh(t)?sh(kh(r),0,e).join(``):r.slice(0,e)}function jx(e,t,n){e=Vm(e),t=Xd(t);var r=t?Ox(e):0;return t&&r=qx){var l=t?null:Kx(e);if(l)return Xv(l);o=!1,i=Gv,c=new Uv}else c=t?[]:s;outer:for(;++r`u`?rS:window,uS=[`moz`,`webkit`],dS=`AnimationFrame`,fS=lS[`request`+dS],pS=lS[`cancel`+dS]||lS[`cancelRequest`+dS],mS=0;!fS&&mS`u`,CS=function(e){return(e||``).replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,``)},wS=function(){return!SS&&document.addEventListener?function(e,t,n,r){e&&t&&n&&e.addEventListener(t,n,r)}:function(e,t,n){e&&t&&n&&e.attachEvent(`on${t}`,n)}}(),TS=function(){return!SS&&document.removeEventListener?function(e,t,n,r){e&&t&&e.removeEventListener(t,n,r)}:function(e,t,n){e&&t&&e.detachEvent(`on${t}`,n)}}();function ES(e,t,n,r){var i=K(n)?n:n.handleEvent,a=function(n){i(n),TS(e,t,a,r)};wS(e,t,a,r)}function DS(e,t){if(!e||!t)return!1;if(t.indexOf(` `)!==-1)throw Error(`className should not contain space.`);return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function OS(e,t){if(e){for(var n=e.className,r=(t||``).split(` `),i=0,a=r.length;i0&&arguments[0]!==void 0?arguments[0]:`body`;return yb(e)?document.querySelector(e):K(e)?e():e};function MS(e){return e&&e===e.window}function NS(e,t){if(SS||!e)return 0;var n=t?`scrollLeft`:`scrollTop`,r=0;return MS(e)?r=e[t?`pageXOffset`:`pageYOffset`]:e instanceof Document?r=e.documentElement[n]:e&&(r=e[n]),r}function PS(e,t){var n=t.container,r=n===void 0?window:n,i=t.duration,a=i===void 0?450:i,o=t.easing,s=o===void 0?xS:o,c=NS(r),l=Date.now();return new Promise(function(t){var n=function(){var i=Date.now()-l,o=s(Math.min(i,a),c,e,a);MS(r)?r.scrollTo(window.pageXOffset,o):r instanceof Document||r.constructor.name===`HTMLDocument`?r.documentElement.scrollTop=o:r.scrollTop=o,bS(in},IS=function(e){if(!(e instanceof HTMLFormElement))throw Error(`target must be HTMLFormElement`);var t=document.createElement(`input`);t.type=`submit`,t.hidden=!0,e.appendChild(t),t.click(),e.removeChild(t)};function LS(e,t){var n=e.getBoundingClientRect();if(t){var r=t.getBoundingClientRect();return n.top>=r.top&&n.left>=r.left&&n.bottom<=r.bottom&&n.right<=r.right}return n.top>=0&&n.left>=0&&n.bottom+80<=window.innerHeight&&n.right<=window.innerWidth}function RS(e,t){var n=``;return document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function zS(e){var t=e.parentNode;return!t||t.nodeName===`HTML`?!1:RS(e,`position`)===`fixed`?!0:zS(t)}function BS(){var e=document.body,t=document.documentElement;return{scrollTop:window.pageYOffset||t.scrollTop||e.scrollTop,scrollLeft:window.pageXOffset||t.scrollLeft||e.scrollLeft}}function VS(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}var HS=function(e){return Ta(e)&&e.type===ma};function Y(e,t,n){var r=e;return r.install=function(i,a){i.component(t||a||r.name,e),n&&i.directive(n.name,n.comp)},r}function US(e){var t;return Bd(e)&&`defaultNode`in e?t=e.defaultNode:(Ta(e)||yb(e))&&(t=e),t}function WS(e){var t=[],n=function(e){if(G(e))return e.forEach(function(e){if(e.children&&G(e.children)){if(e.type!==fa)return;n(e.children)}else t.push(e)}),t};return n(e)}function GS(e){return Bd(e)&&`params`in e?e.params:{}}function KS(e){return Bd(e)&&`slotFirst`in e?e.slotFirst:!1}function qS(e){var t=Wa(),n=t.vnode,r=t.slots,i=n.props||{};return!!(Object.prototype.hasOwnProperty.call(i,e)||r&&Object.prototype.hasOwnProperty.call(r,e))}var JS=`Copy to clipboard: #{key}, Enter`,YS=function(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)},XS=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r`u`||typeof XMLSerializer>`u`)return``;var t;try{t=new DOMParser().parseFromString(e,`image/svg+xml`)}catch{return``}if(t.querySelector(`parsererror`))return``;var n=t.documentElement;if(!n||n.localName?.toLowerCase()!==`svg`)return``;oC(n),sC(n);try{return new XMLSerializer().serializeToString(n)}catch{return``}},lC={exports:{}};lC.exports,(function(e,t){(function(t,n){e.exports=n()})(rS,function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=ud(t)==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)0){var a=i[0],o=i[1];typeof a==`number`?(n=a,o&&ud(o)===`object`?r=o:r.count=n):ud(a)===`object`&&a!==null&&(r=a)}if(t.includes(`|`)){var s=t.split(`|`).map(function(e){return e.trim()});if(typeof n==`number`){var c=vC(n);t=c0&&(t=t.replace(/\{\s*([\w-]+)\s*\}/g,function(e,t){return Object.prototype.hasOwnProperty.call(r,t)?String(r[t]):e})),t}return``}var bC=I();function xC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1?arguments[1]:void 0,n=null;Wa()?(n=Rn(gC,null),n||=bC):n=bC;var r=H(function(){return n?.value||hC}),i=H(function(){return Object.assign({},r.value[e],t)});return{t:function(e){var t=[...arguments].slice(1);return K(e)?t.length?e.apply(void 0,t):e(co):yC.apply(void 0,[e].concat(t))},global:i,globalConfig:i,classPrefix:H(function(){return r.value.classPrefix})}}var SC=function(e){var t=zv(hC),n=H(function(){return Object.assign({},_C(t,e.globalConfig))});return Ln(gC,n),bC.value||=n.value,n};function CC(e,t,n,r){if(typeof window>`u`)return null;if(!window||!window.IntersectionObserver)return n(),null;var i=null;try{i=new window.IntersectionObserver(function(t){t[0].isIntersecting&&(n(),i.unobserve(e))},{rootMargin:`0px 0px ${r}px 0px`,root:t}),i.observe(e)}catch(e){console.error(e),n()}return i}var wC=new Set,TC={warn:function(e,t){console.warn(`TDesign ${e} Warn: ${t}`)},warnOnce:function(e,t){var n=`TDesign ${e} Warn: ${t}`;wC.has(n)||(wC.add(n),console.warn(n))},error:function(e,t){console.error(`TDesign ${e} Error: ${t}`)},errorOnce:function(e,t){var n=`TDesign ${e} Error: ${t}`;wC.has(n)||(wC.add(n),console.error(n))},info:function(e,t){console.info(`TDesign ${e} Info: ${t}`)}},EC=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.heic|.heif|.svg|.gif|.bmp)/i,DC=/(.png|.jpg|.jpeg|.jpe|.webp|.avif|.heic|.heif|.svg|.gif|.bmp|.dwg|.dxf|.svf|.tif|.tiff|.arw)/i,OC=/(.pdf)/i,kC=/(.xlsx|.xls|.csv|.xlc|.xlm|.xlt|.xlw)/i,AC=/(.dox|docx|.document|.wps|.wdb|.msword)/i,jC=/(.ppt|.pptx|.key)/i,MC=/(.avi|.mp4|.wmv|.mpg|.mpeg|.mov|.rm|.ram|.swf|.flv|.rmvb|.flash|.mid|.3gp)/i,NC={"audio/*":/(.mp2|.mp3|.mp4|.ogg|.3gpp|.ac3|.au)/i,"video/*":MC,"image/*":DC,".jpg":/image\/jpeg|\.jpg$/i,".heic":/image\/heic|image\/heic-sequence|\.heic$/i,".heif":/image\/heif|image\/heif-sequence|\.heif$/i,".ico":/image\/vnd.microsoft.icon/i,".doc":/application\/msword/i,".docx":/application\/vnd.openxmlformats-officedocument.wordprocessingml.document/i,".xls":/application\/vnd.ms-excel/i,".xlsx":/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/i,".ppt":/application\/vnd.ms-powerpoint/i,".pptx":/application\/vnd.openxmlformats-officedocument.presentationml.presentation/i,".vsd":/application\/vnd.visio/i,".txt":/text\/plain/i,".abw":/application\/x-abiword/i,".avi":/video\/x-msvideo/i,".azw":/application\/vnd.amazon.ebook/i,".bin":/application\/octet-stream/i,".cda":/application\/x-cdf/i,".mpkg":/application\/vnd.apple.installer+xml/i,".odp":/application\/vnd.oasis.opendocument.presentation/i,".ods":/application\/vnd.oasis.opendocument.spreadsheet/i,".odt":/application\/vnd.oasis.opendocument.text/i,".oga":/audio\/ogg/i,".ogv":/video\/ogg/i,".ogx":/application\/ogg/i,".ai":/application\/postscript/i,".eps":/application\/postscript/i,".ps":/application\/postscript/i},PC={B:1,KB:1024,MB:1048576,GB:1073741824};function FC(e){return e=PC.KB&&e=PC.MB&&e=PC.GB?`${(e/PC.GB).toFixed(1)} GB`:``}function IC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=new Date,n=t.getMonth()+1;n=n<10?`0${n}`:n;var r=`${t.getFullYear()}-${n}-${t.getDate()}`,i=`${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}`;return e?[r,i].join(` `):r}function LC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,r=e,i=0,a=0;if(!r)return``;for(var o=0;oo-n&&a=1024&&e<1048576?`${(e/1024).toFixed(1)} KB`:e>=1048576?`${(e/1048576).toFixed(1)} MB`:``}function zC(e,t,n){var r=[`B`,`KB`,`MB`,`GB`],i=1,a=r.indexOf(n);return a===-1&&(TC.warn(`Upload`,`\`sizeLimit.unit\` can only be one of ${r.join()}`),a=i),e>t*PC[n]}function BC(e){return new Promise(function(t){if(!e){t(``);return}var n=new FileReader;n.readAsDataURL(e),n.onload=function(e){t(e.target?.result)}})}function VC(e,t,n){var r=t||n;if(!e)return!0;if(!r)return!1;for(var i=e.split(`,`).map(function(e){return e.trim()}),a=0,o=i.length;a1&&arguments[1]!==void 0?arguments[1]:``,n=[],r=0;r1&&c.includes(Boolean)&&c.includes(Function)&&s===``&&!o?i:s===!1||s===null?void 0:s===!0?uw(e,t,r)||i:K(s)?s(co,r):[void 0,``].includes(s)&&o?uw(e,t,r):s}if(o)return uw(e,t,r);var l=e.props[kg(t)]||e.props[Hb(t)];return l===!1||l===null?void 0:l===!0?i:K(l)?l(co,r):l}},pw=function(){var e=Z();return function(t,n){var r=US(n);return e(t,n)||r}},mw=function(){var e=Z();return function(t,n,r){var i=GS(r),a=US(r),o=i?{params:i}:void 0,s=e(t,o),c=e(n,o),l=dw(s)?c:s;return dw(l)?a:l}},hw=function(e){return e.filter(function(e){return!HS(e)})};function gw(e){return e?yb(e)?e:Array.isArray(e)?hw(e).map(function(e){return gw(e)}).filter(Boolean).join(` `):HS(e)?``:yb(e.children)?e.children:Array.isArray(e.children)?hw(e.children).map(function(e){return gw(e)}).filter(Boolean).join(` `):e.children&&Bd(e.children)?Object.values(e.children).map(function(e){return!e||K(e)?``:gw(e)}).filter(Boolean).join(` `):``:``}function _w(){return{beforeEnter:function(e){e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.style.height=`0`,e.style.paddingTop=`0`,e.style.paddingBottom=`0`},enter:function(e){e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom,e.style.overflow=`hidden`},afterEnter:function(e){e.style.height=``,e.style.overflow=e.dataset.oldOverflow},beforeLeave:function(e){e.dataset.oldPaddingTop=e.style.paddingTop,e.dataset.oldPaddingBottom=e.style.paddingBottom,e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.overflow=`hidden`},leave:function(e){e.scrollHeight!==0&&(e.style.height=`0`,e.style.paddingTop=`0`,e.style.paddingBottom=`0`)},afterLeave:function(e){e.style.height=``,e.style.overflow=e.dataset.oldOverflow,e.style.paddingTop=e.dataset.oldPaddingTop,e.style.paddingBottom=e.dataset.oldPaddingBottom}}}function Q(e){var t=xC(`classPrefix`).classPrefix;return H(function(){return e?`${t.value}-${e}`:t.value})}function vw(){var e=xC(`classPrefix`).classPrefix;return{classPrefix:e,SIZE:H(function(){return{small:`${e.value}-size-s`,medium:`${e.value}-size-m`,large:`${e.value}-size-l`,default:``,xs:`${e.value}-size-xs`,xl:`${e.value}-size-xl`,block:`${e.value}-size-full-width`}}),STATUS:H(function(){return{loading:`${e.value}-is-loading`,loadMore:`${e.value}-is-load-more`,disabled:`${e.value}-is-disabled`,focused:`${e.value}-is-focused`,success:`${e.value}-is-success`,error:`${e.value}-is-error`,warning:`${e.value}-is-warning`,selected:`${e.value}-is-selected`,active:`${e.value}-is-active`,checked:`${e.value}-is-checked`,current:`${e.value}-is-current`,hidden:`${e.value}-is-hidden`,visible:`${e.value}-is-visible`,expanded:`${e.value}-is-expanded`,indeterminate:`${e.value}-is-indeterminate`}})}}function yw(e,t,n,r){var i=Wa(),a=i.emit,o=i.vnode,s=I(),c=o.props||{};return Object.prototype.hasOwnProperty.call(c,r)||Object.prototype.hasOwnProperty.call(c,Hb(r))?[e,function(e){a(`update:${r}`,e);var t=[...arguments].slice(1);n?.apply(void 0,[e].concat(t))}]:(s.value=t,[s,function(e){s.value=e;var t=[...arguments].slice(1);n?.apply(void 0,[e].concat(t))}])}var bw=`t-display-none-element-refresh`;function xw(){var e=I(0);Ln(bw,e),Lr(function(){e.value+=1})}function Sw(e){var t=Wa(),n=H(function(){return t.props.disabled}),r=Rn(`formDisabled`,Object.create(null));return H(function(){var t,i;return G(n.value)&&n.value.length===2?n.value:Eb(e==null||(t=e.beforeDisabled)==null?void 0:t.value)?e.beforeDisabled.value:Eb(n.value)?n.value:Eb(e==null||(i=e.afterDisabled)==null?void 0:i.value)?e.afterDisabled.value:Eb(r.disabled?.value)?r.disabled.value:!1})}var Cw=function(e,t){Array.from(e).filter(function(e){return e instanceof HTMLDivElement&&!!e.getAttribute(`draggable`)}).forEach(t)},ww=function(e,t){var n;return Cw(t,function(t){e instanceof Node&&t.contains(e)&&(n=t)}),n};function Tw(e){var t=null,n,r=[],i=function(e){var t=e.target;n=t,t.style.opacity=`0.5`;var r=e.dataTransfer;if(r){r.effectAllowed=`copy`;try{r.setData(`text/plain`,``)}catch{}}},a=function(e){e.target.style.opacity=``},o=function(e){if(t){var n=ww(e.target,t.children),r=e.dataTransfer;r&&(r.dropEffect=n!=null&&n.draggable?`copy`:`none`),n!=null&&n.draggable&&e.preventDefault()}},s=function(e){var i=ww(e.target,t.children);if(i&&i!==n&&i.draggable){var a=i.firstChild;a instanceof HTMLElement&&Object.assign(a.style,{outline:`1px dashed #0052d9`}),r.includes(i)||r.push(i)}},c=function(e){for(var t=e.target,n=0,i=r;no&&(i=t.children[s+1]);var c=e.theme===`card`?o:o-1,l=e.theme===`card`?s:s-1;(a=e.onDragSort)==null||a.call(e,{currentIndex:c,current:e.panels[c].value,targetIndex:l,target:e.panels[l].value})}};function u(e){t=e,t.addEventListener(`dragstart`,i,!1),t.addEventListener(`dragend`,a,!1),t.addEventListener(`dragover`,o,!1),t.addEventListener(`dragenter`,s,!1),document.addEventListener(`dragleave`,c,!1),document.addEventListener(`mousemove`,c,!1),t.addEventListener(`drop`,l,!1)}return zr(function(){t&&(t.removeEventListener(`dragstart`,i),t.removeEventListener(`dragend`,a),t.removeEventListener(`dragover`,o),t.removeEventListener(`dragenter`,s),document.removeEventListener(`dragleave`,c),document.removeEventListener(`mousemove`,c),t.removeEventListener(`drop`,l))}),{setNavsWrap:u}}function Ew(e,t){var n=I(),r=I(!0),i=function(){!t.value||!e.value||n.value||(r.value=!1,n.value=CC(e.value,null,function(){r.value=!0},10))};return Fr(i),t.value&&R([t,e],i),Rr(function(){var r,i;t.value&&((r=n.value)==null||(i=r.unobserve)==null||i.call(r,e.value))}),{showElement:r}}function Dw(e){var t=xC(`icon`).globalConfig,n={};return Object.keys(e).forEach(function(r){n[r]=t.value?.[r]||e[r]}),n}function Ow(e){var t=I(``);return R([e],function(e,n){var r=J(e,1)[0];if(J(n,1)[0]!==r){if(typeof r==`string`){t.value=r;return}BC(r).then(function(e){t.value=e})}},{immediate:!0}),{previewUrl:t}}var kw=mC.expand,Aw=mC.ripple,jw=mC.fade;function Mw(){var e=xC(`animation`).globalConfig,t=function(t){var n,r=e.value;return r&&!((n=r.exclude)!=null&&n.includes(t))&&r.include?.includes(t)};return{keepExpand:t(kw),keepRipple:t(Aw),keepFade:t(jw)}}function Nw(e,t,n){var r=H(function(){return Math.max(n.rowHeight||48,48)}),i=I(!1),a=H(function(){return n?.type===`lazy`&&!i.value}),o=!SS&&window.requestAnimationFrame||function(e){return setTimeout(e,16.6)},s=function(){i.value||o(function(){i.value=!0})};return Fr(function(){n?.type===`lazy`&&Sn(function(){var i=Math.max(10,n.bufferSize||10),a=r.value*i;CC(t.value,e.value,s,a)})}),{hasLazyLoadHolder:a,tRowHeight:r}}function Pw(e,t){Fr(function(){window.addEventListener(e,t)}),Rr(function(){window.removeEventListener(e,t)})}function Fw(e,t){Pw(`resize`,e);var n=null;Fr(function(){!window.ResizeObserver||!t||(n=new window.ResizeObserver(e),n.observe(t))}),Rr(function(){var e;(e=n)==null||e.disconnect()})}var Iw=[`dialog`,`drawer`],Lw=1e3,Rw=5e3,zw=1,Bw=new(WC(function e(){var t=this;GC(this,e),W(this,`popupStack`,{popup:new Set,dialog:new Set,message:new Set,drawer:new Set}),W(this,`zIndexStack`,[]),W(this,`getNextZIndex`,function(e){return(e===`message`?Array.from(t.popupStack.message).pop()||Rw:Array.from(t.popupStack.popup).pop()||Lw)+zw}),W(this,`add`,function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),Iw.includes(e)&&t.popupStack.popup.add(n),t.zIndexStack.push(n),n}),W(this,`delete`,function(e,n){t.popupStack[n].delete(e),Iw.includes(n)&&t.popupStack.popup.delete(e);var r=t.zIndexStack.indexOf(e);r!==-1&&t.zIndexStack.splice(r,1)}),W(this,`isTopInteractivePopup`,function(e,n){return Iw.includes(e)?n===t.zIndexStack[t.zIndexStack.length-1]:t.popupStack[e]?.size>1?n===Array.from(t.popupStack[e]).pop():!0}),W(this,`getLastZIndex`,function(){return t.zIndexStack[t.zIndexStack.length-1]})}));function Vw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.visible,r=t.runOnMounted,i=I(0),a=function(){i.value=Bw.add(e)},o=function(){Bw.delete(i.value,e)};return R(function(){return n?.value},function(e){e?a():o()},{immediate:!0}),r&&(Fr(function(){a()}),Rr(function(){o()})),{zIndex:Lt(i),open:a,close:o,isTopInteractivePopup:function(){return Iw.includes(e)?Bw.isTopInteractivePopup(e,i.value):!1}}}function Hw(e){var t=Wa(),n=H(function(){return t.props.readonly}),r=Rn(`formReadonly`,Object.create(null));return H(function(){var t,i;return Eb(e==null||(t=e.beforeReadonly)==null?void 0:t.value)?e.beforeReadonly.value:Eb(n?.value)?n.value:Eb(e==null||(i=e.afterReadonly)==null?void 0:i.value)?e.afterReadonly.value:Eb(r.readonly?.value)?r.readonly.value:!1})}function Uw(e,t){if(!(typeof window>`u`)&&window&&window.ResizeObserver){var n=null,r=function(){!n||!e.value||(n.unobserve(e.value),n.disconnect(),n=null)},i=function(e){n=new ResizeObserver(t),n.observe(e)};e&&R(e,function(e){r(),e&&i(e)},{immediate:!0,flush:`post`}),Rr(function(){r()})}}function Ww(e,t){e&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}var Gw=200,Kw=`rgba(0, 0, 0, 0)`,qw=`rgba(0, 0, 0, 0.35)`,Jw=function(e,t){var n;if(t)return t;if(e!=null&&(n=e.dataset)!=null&&n.ripple)return e.dataset.ripple;if(e instanceof Element){var r=getComputedStyle(e).getPropertyValue(`--ripple-color`);if(r)return r}return qw};function Yw(e,t){var n=I(null),r=Q(),i=Mw().keepRipple,a=function(a){var o=e.value;if(!(!o||!(o instanceof Element))){var s=Jw(o,t?.value);if(!(a.button!==0||!e||!i)&&!(o.classList.contains(`${r.value}-is-active`)||o.classList.contains(`${r.value}-is-disabled`)||o.classList.contains(`${r.value}-is-checked`)||o.classList.contains(`${r.value}-is-loading`))&&o instanceof Element){var c=getComputedStyle(o),l=parseInt(c.borderWidth,10),u=l>0?l:0,d=o.offsetWidth,f=o.offsetHeight;n.value.parentNode===null&&(Ww(n.value,{position:`absolute`,left:`${0-u}px`,top:`${0-u}px`,width:`${d}px`,height:`${f}px`,borderRadius:c.borderRadius,pointerEvents:`none`,overflow:`hidden`}),o.appendChild(n.value));var p=document.createElement(`div`);Ww(p,{marginTop:`0`,marginLeft:`0`,right:`${d}px`,width:`${d+20}px`,height:`100%`,transition:`transform ${Gw}ms cubic-bezier(.38, 0, .24, 1), background ${Gw*2}ms linear`,transform:`skewX(-8deg)`,pointerEvents:`none`,position:`absolute`,zIndex:0,backgroundColor:s,opacity:`0.9`});for(var m=new WeakMap,h=o.children.length,g=0;g4&&arguments[4]!==void 0?arguments[4]:`value`,a=Wa(),o=a.emit,s=a.vnode,c=I(),l=s.props||{},u=Object.prototype.hasOwnProperty.call(l,`modelValue`)||Object.prototype.hasOwnProperty.call(l,`model-value`),d=Object.prototype.hasOwnProperty.call(l,i)||Object.prototype.hasOwnProperty.call(l,Hb(i));return u?[t,function(e){o(`update:modelValue`,e);var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}]:d?[e,function(e){o(`update:${i}`,e);var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}]:(c.value=n,[c,function(e){c.value=e;var t=[...arguments].slice(1);r?.apply(void 0,[e].concat(t))}])}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $w(e){for(var t=1;tu}),p=I(0),m=new Map,h=0,g=0,_=0,v=0,y=0,b=0,x=function(){t.value.forEach(function(e,t){e.$index=t,i&&(d.cachedScrollY[t]=t*o)}),i||(d.cachedScrollY[t.value.length-1]=void 0)};x();var S=H(function(){var e=d.cachedHeight;if(e.length){var n=e.reduce(function(e,t){return e+t||o},0);if(e.length===t.value.length)return n;var r=n/e.length;return n+(t.value.length-e.length)*r}return f.value?t.value.length*o:0}),C=H(function(){var e=d.visibleData,t=e[0];return t?e.length===1?0:d.cachedScrollY[t.$index]:0}),w=function(){b=Math.min(y+h+c*2,t.value.length),d.visibleData=t.value.slice(y,b)},T=function(){var e,r=m.get(_);if(r){var i=r==null||(e=r.getBoundingClientRect())==null?void 0:e.height;d.cachedScrollY[_]=n.value.scrollTop-v,d.cachedHeight[_]=i;for(var a=_+1;a<=(o=d.visibleData[d.visibleData.length-1])?.$index;a++){var o,s=(m.get(a)?.getBoundingClientRect()||{}).height;d.cachedHeight[a]=s;var c=d.cachedScrollY[a-1]+d.cachedHeight[a-1];d.cachedScrollY.splice(a,1,c)}for(var l=_-1;l>=(u=d.visibleData[0])?.$index;l--){var u,f=(m.get(l)?.getBoundingClientRect()||{}).height;d.cachedHeight[l]=f;var p=d.cachedScrollY[l+1]-d.cachedHeight[l];d.cachedScrollY.splice(l,1,p)}if(d.cachedScrollY[0]>0){for(var h=d.cachedScrollY[0],x=Math.min(b,t.value.length),S=0;S=y;i--)i===b-1?d.cachedScrollY.splice(i,1,r.value-d.cachedHeight[i]):d.cachedScrollY.splice(i,1,d.cachedScrollY[i+1]-d.cachedHeight[i])})}},E=function(){if(f.value){var e=n.value.scrollTop,r=e-g;g=e,r+=v;var i=_;if(r){if(r>=0){for(;i(d.cachedHeight[i]||o);)d.cachedHeight[i]||(d.cachedHeight[i]=o),r-=d.cachedHeight[i],i++;i>=t.value.length?(_=t.value.length-1,v=0):(_=i,v=r);var a=n.value,s=a.clientHeight,l=a.scrollHeight;e+s===l&&(_=t.value.length-h+1),y<=_-c&&(y=Math.min(t.value.length-h,_-c),y<0&&(y=0))}else{for(;r<0;)i--,d.cachedHeight[i]||(d.cachedHeight[i]=o),r+=d.cachedHeight[i];i<0?(_=0,v=0):(_=i,v=r),T(),y>_-c&&(y=Math.max(0,_-c))}w()}}};!i&&R(p,T,{flush:`post`});var D=function(){f.value&&p.value++};R(t,function(){x(),d.visibleData=[],d.cachedScrollY=[],d.cachedHeight=[],g=0,_=0,v=0,y=0,m.clear(),t.value.length<=u?d.visibleData=t.value:w(),n.value&&(n.value.scrollTop=0)});var O=!1,k=function(){O&&(h=Math.ceil(n.value.offsetHeight/o),w())};return Fr(function(){if(!(!window||!window.IntersectionObserver)){var e=new window.IntersectionObserver(function(t){var r=t[0];(r.isIntersecting||r.intersectionRatio)&&(O=!0,f.value&&k(),e.unobserve(n.value))});n.value&&e.observe(n.value)}}),$w($w({trs:m,scrollHeight:S},L(d)),{},{translateY:C,handleScroll:E,handleRowMounted:D,refreshContainer:k,fixedHeight:i,calculateScrollY:T})}function tT(e,t){var n=I([]),r=I((t.value.data?.length||0)*(t.value.scroll?.rowHeight||50)),i=I(0),a=[],o=I(0),s=I(0),c=I([0,15]),l=H(function(){var e=t.value.scroll;return e?{bufferSize:e.bufferSize||10,isFixedRowHeight:e.isFixedRowHeight??!1,rowHeight:e.rowHeight||47,threshold:e.threshold||100,type:e.type,fixedRows:e.fixedRows??[0,0]}:{}}),u=H(function(){var e=t.value.data;return l.value.type===`virtual`&&l.value.thresholdn&&c===-1&&(c=f,c-l.value.bufferSize>0&&(s=d-m-Ux(i))),c===-1&&(i.push(m),i.length>l.value.bufferSize&&i.shift()),u===-1&&(d>o.value+n||f===t.value.data.length-1)&&(u=f),c!==-1&&u!==-1)break}var h=Kb([c-l.value.bufferSize,0]),g=Yb([u+l.value.bufferSize,t.value.data.length]),_=Ux(a.slice(0,Math.min(h,r)));return{startIndex:h,endIndex:g,translateY:s-_}}var f=Gx(function(){var e=d(),i=e.startIndex,a=e.endIndex,o=e.translateY,s=l.value.fixedRows,u=J(s,2),f=u[0],p=u[1],m=f?t.value.data.slice(0,f):[];f&&i0&&(h=h.slice(g)),c.value.join()!==[i,a].join()&&i>=0&&(r.value=o,n.value=m.concat(t.value.data.slice(i,a),h),c.value=[i,a])},100),p=function(t){if(!(!u.value||!t||l.value.isFixedRowHeight||!e.value)){var n=t.ref.value?.getBoundingClientRect().height||l.value.rowHeight,r=t.data.VIRTUAL_SCROLL_INDEX;if(a[r]!==n){var o=n-a[r];a[r]=n,i.value+=o}}},m=function(){u.value&&f()},h=function(n){var i=J(n,1)[0].contentRect;t.value.preventResizeRefresh||(Math.abs(i.width-s.value)>16&&e.value&&(e.value.scrollTop=0,r.value=0),s.value=i.width,o.value=i.height)},g=function(e){e.forEach(function(e,t){e.VIRTUAL_SCROLL_INDEX=t})},_=function(t){var n=t.index,r=t.top,i=r===void 0?0:r,o=t.behavior,s=Ux(a.slice(0,n+1))-i;e.value.scrollTo({top:s,behavior:o||`auto`})};return Uw(H(function(){return u.value?e.value:void 0}),h),R(function(){return[U(t.value.data),l.value,u.value,e.value]},function(){if(!(!u.value||!e.value)){var n=t.value.data;if(g(n),o.value=e.value.getBoundingClientRect().height,a.length!==t.value.data.length){var r=Array.from(a);r.length=t.value.data.length,r.fill(l.value.rowHeight||47),a=r}i.value=Ux(a),c.value=[0,0],f()}},{immediate:!0}),R(function(){return o.value},function(){f()}),{visibleData:n,translateY:r,scrollHeight:i,isVirtualScroll:u,handleScroll:m,handleRowMounted:p,scrollToElement:function(e){if(_(e),!l.value.isFixedRowHeight)var t,n=e.time??60,r=setTimeout(function(){_(e),clearTimeout(r)},n)}}}function nT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rT(e){for(var t=1;t2&&arguments[2]!==void 0?arguments[2]:iT,r=I(rT(rT({},iT),n)),i=null,a=function(){var n;if(e){var a=r.value,o=a.debounceTime,s=o===void 0?0:o,c=a.config,l=c===void 0?iT.config:c,u=function(){var e=[...arguments];t?.apply(void 0,e)};(n=i)==null||n.disconnect(),i=new MutationObserver(s>0?Yy(u,s):u),i.observe(e,l)}};R(function(){return n},function(e){Fb(e,r.value)||(r.value=rT(rT({},iT),e),a())},{deep:!0}),Fr(a),Rr(function(){return i?.disconnect()})}var oT=function(e){if(typeof window>`u`)return``;var t=document?.documentElement;return getComputedStyle(t).getPropertyValue(e).trim()??``};function sT(e){var t={};return Object.entries(e).forEach(function(e){var n=J(e,1)[0];t[n]=I(``)}),Sn(function(){Object.entries(e).forEach(function(e){var n=J(e,2),r=n[0],i=n[1];t[r].value=oT(i)})}),aT(document?.documentElement,function(n){n.some(function(n){return n.type===`attributes`&&n.attributeName===`theme-mode`?(Object.entries(e).forEach(function(e){var n=J(e,2),r=n[0],i=n[1];t[r].value=oT(i)}),!0):!1})}),t}function cT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t`u`||!navigator)return 2**53-1;var e=navigator.userAgent,t=e.indexOf(`compatible`)>-1&&e.indexOf(`MSIE`)>-1,n=e.indexOf(`Trident`)>-1&&e.indexOf(`rv:11.0`)>-1;if(t){var r=e.match(/MSIE (\d+\.\d+);/);if(!r)return-1;var i=parseFloat(r[1]);return i<7?6:i}return n?11:2**53-1}function _T(){var e,t,n;if(typeof navigator>`u`||!navigator)return!1;var r=navigator.userAgent,i=r.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(i==null||(e=i[1])==null?void 0:e.split(`.`)[0])<100)return!0;var a=r.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(a==null||(t=a[1])==null?void 0:t.split(`.`)[0])<12||gT()<=11)return!0;var o=r.match(/Firefox\/(.+)/i);return Number(o==null||(n=o[1])==null?void 0:n.split(`.`)[0])<100}function vT(e,t){var n=Lb(t);if(!e||e.length===0)return n?{length:0,characters:e}:0;for(var r=0,i=0;i127?2:1,n&&r+a>t)return{length:r,characters:e.slice(0,i)};r+=a}return n?{length:r,characters:e}:r}function yT(e){return U(e??``).length}function bT(e,t,n){return U(n??``).slice().length===t?n||``:U(e??``).slice(0,t).join(``)}function xT(e){return Lb(e)?`${e}px`:e}var ST=[`padding-top`,`padding-bottom`,`padding-left`,`padding-right`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`border-width`,`box-sizing`,`line-height`,`letter-spacing`];function CT(e){if(typeof window>`u`)return{paddingSize:0,borderSize:0,boxSizing:0,sizingStyle:``};var t=window.getComputedStyle(e),n=t.getPropertyValue(`box-sizing`)||t.getPropertyValue(`-moz-box-sizing`)||t.getPropertyValue(`-webkit-box-sizing`);return{paddingSize:parseFloat(t.getPropertyValue(`padding-bottom`))+parseFloat(t.getPropertyValue(`padding-top`)),borderSize:parseFloat(t.getPropertyValue(`border-bottom-width`))+parseFloat(t.getPropertyValue(`border-top-width`)),boxSizing:n,sizingStyle:ST.map(function(e){return`${e}:${t.getPropertyValue(e)}`}).join(`;`)}}function wT(){var e;if(typeof window>`u`)return!1;var t=(e=window)==null||(e=e.navigator)==null?void 0:e.userAgent;return/Safari/.test(t)&&!/Chrome/.test(t)}function TT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ET(e){for(var t=1;t`u`)){var i=(t=window).getComputedStyle?.call(t,e),a=i?.color||``,o=i?.fontSize||`12px`,s=(n=window)==null||(n=n.navigator)==null?void 0:n.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),l=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPad)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||l||u)&&(r={transformOrigin:`0px 0px`,transform:`scale(${parseInt(o,10)/12})`}),a&&gT()>11){var d=a.match(/[\d.]+/g),f=d?`rgba(${d[0]}, ${d[1]}, ${d[2]}, 0)`:``;Ww(e,ET(ET({},r),{},{background:`conic-gradient(from 90deg at 50% 50%,${f} 0deg, ${a} 360deg)`}))}else Ww(e,ET(ET({},r),{},{background:``}))}}var OT=z({name:`TLoadingGradient`,setup:function(){var e=Q(),t=I();return Fr(function(){Sn(function(){DT(t.value)})}),function(){var n=`${e.value}-loading__gradient`;return B(`svg`,{class:[n,`${e.value}-icon-loading`],viewBox:`0 0 12 12`,version:`1.1`,width:`1em`,height:`1em`,xmlns:`http://www.w3.org/2000/svg`},[B(`foreignObject`,{x:`0`,y:`0`,width:`12`,height:`12`},[B(`div`,{class:`${n}-conic`,ref:t},null)])])}}}),kT={attach:{type:[String,Function],default:``},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:`medium`},text:{type:[String,Function]},zIndex:{type:Number}},AT=function(){return{name:Q(`loading`),centerClass:Q(`loading--center`),fullscreenClass:Q(`loading__fullscreen`),lockClass:Q(`loading--lock`),overlayClass:Q(`loading__overlay`),relativeClass:Q(`loading__parent`),fullClass:Q(`loading--full`),inheritColorClass:Q(`loading--inherit-color`)}},jT=z({name:`TLoading`,inheritAttrs:!1,props:kT,setup:function(e,t){var n=t.slots,r=t.attrs,i=I(!1),a=AT(),o=a.name,s=a.centerClass,c=a.fullscreenClass,l=a.lockClass,u=a.overlayClass,d=a.relativeClass,f=a.fullClass,p=a.inheritColorClass,m=Q(),h=Z(),g=mw(),_=vw().SIZE,v=function(){i.value=!1;var t=setTimeout(function(){i.value=!0,clearTimeout(t)},e.delay)},y=Xw(function(){return e.attach}),b=H(function(){return!!(!e.delay||e.delay&&i.value)}),x=H(function(){var t={};return e.zIndex!==void 0&&(t.zIndex=e.zIndex),[`small`,`medium`,`large`].includes(e.size)||(t[`font-size`]=e.size),t}),S=H(function(){return!!(e.default||n.default||e.content||n.content)}),C=H(function(){return e.preventScrollThrough&&e.fullscreen}),w=H(function(){return!!(e.text||n.text)}),T=H(function(){return S.value&&e.loading&&b.value}),E=H(function(){return e.fullscreen&&e.loading&&b.value}),D=H(function(){return e.attach&&e.loading&&b.value}),O=H(function(){var t=[s.value,lw(_.value,e.size),W({},p.value,e.inheritColor)],n=[o.value,c.value,s.value,u.value];return{baseClasses:t,attachClasses:t.concat([o.value,f.value,W({},u.value,e.showOverlay)]),withContentClasses:t.concat([o.value,f.value,W({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([o.value])}}),k=L(e).loading;return R([k],function(e){J(e,1)[0]?(v(),C.value&&OS(document.body,l.value)):C.value&&kS(document.body,l.value)}),Fr(function(){e.delay&&v()}),function(){var t=O.value,n=t.fullScreenClasses,i=t.baseClasses,a=t.withContentClasses,o=t.attachClasses,s=t.normalClasses,c=B(OT,null,null),l=k.value&&h(`indicator`,c),u=w.value&&B(`div`,{class:`${m.value}-loading__text`},[h(`text`)]);return e.fullscreen?!E.value||!e.loading?null:B(rr,{disabled:!e.attach||!y.value,to:y.value},{default:function(){return[B(`div`,V({class:n,style:x.value},r),[B(`div`,{class:i},[l,u])])]}}):S.value?B(`div`,V({class:d.value},r),[g(`default`,`content`),T.value&&B(`div`,{class:a,style:x.value},[l,u])]):e.attach?!D.value||!k.value?null:B(rr,{disabled:!e.attach||!y.value,to:y.value},{default:function(){return[B(`div`,V({class:o,style:x.value},r),[l,u])]}}):k.value?B(`div`,V({class:s,style:x.value},r),[l,u]):null}}}),MT=null;function NT(e){return Jb({fullscreen:!1,attach:`body`,loading:!0,preventScrollThrough:!0},e)}function PT(e,t){var n=NT(e);if(n.fullscreen&&MT)return MT;var r=I(``),i=I(``),a=z({setup:function(){var e=Ft(n);return r.value=Q(`loading__parent--relative`).value,i.value=Q(`loading--lock`).value,function(){return co(jT,e)}}}),o=AS(n.fullscreen?`body`:n.attach),s=B(a);(t??IT._context)&&(s.appContext=t??IT._context);var c=document.createElement(`div`);return Rs(s,c),n.preventScrollThrough&&n.fullscreen&&OS(document.body,i.value),o?OS(o,r.value):console.error(`attach is not exist`),{hide:function(){kS(o,r.value),kS(document.body,i.value),Rs(null,c),c.remove()}}}function FT(e,t){if(e===!0)return MT=PT({fullscreen:!0,loading:!0,attach:`body`,preventScrollThrough:!0},t),MT;if(e===!1){var n;(n=MT)==null||n.hide(),MT=null;return}return PT(e)}var IT=FT;IT.install=function(e){e.config.globalProperties.$loading=FT,IT._context=e._context};var LT=Symbol(`TdLoading`),RT=function(e,t){var n=t.modifiers,r=n.fullscreen,i=n.inheritColor,a={attach:function(){return e},fullscreen:r??!1,inheritColor:i??!1,loading:t.value};Bd(t.value)&&Wb(t.value,function(e,t){a[t]=e}),e[LT]={options:a,instance:IT(a)}},zT={mounted:function(e,t){t.value&&RT(e,t)},updated:function(e,t){var n=e[LT],r=t.value,i=t.oldValue;Fb(r,i)||(r?.loading??r?RT(e,t):n?.instance.hide())},unmounted:function(e){var t;(t=e[LT])==null||t.instance.hide()}},BT=Y(jT,jT.name,{name:`loading`,comp:zT}),VT={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},form:{type:String,default:void 0},ghost:Boolean,href:{type:String,default:``},icon:{type:Function},loading:Boolean,loadingProps:{type:Object},shape:{type:String,default:`rectangle`,validator:function(e){return e?[`rectangle`,`square`,`round`,`circle`].includes(e):!0}},size:{type:String,default:`medium`,validator:function(e){return e?[`extra-small`,`small`,`medium`,`large`].includes(e):!0}},suffix:{type:Function},tag:{type:String,validator:function(e){return e?[`button`,`a`,`div`].includes(e):!0}},theme:{type:String,validator:function(e){return e?[`default`,`primary`,`danger`,`warning`,`success`].includes(e):!0}},type:{type:String,default:`button`,validator:function(e){return e?[`submit`,`reset`,`button`].includes(e):!0}},variant:{type:String,default:`base`,validator:function(e){return e?[`base`,`outline`,`dashed`,`text`].includes(e):!0}},onClick:Function};function HT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UT(e){for(var t=1;t[`strokeLinecap`,`fillRule`,`clipRule`,`strokeWidth`].includes(e)?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,`$1-$2`).toLowerCase():e,ZT=(e,t)=>{var n={};if(e.attrs)for(var[r,i]of Object.entries(e.attrs))if(typeof i==`string`&&i.startsWith(`props.`)){var a=i.split(`.`)[1];n[XT(r)]=t[a]}else n[XT(r)]=i;e.tag===`svg`&&(n.class=t.class,n.style=t.style,n.onClick=t.onClick);var o=e.children?e.children.map(e=>ZT(e,t)):[];return co(e.tag,n,o)},QT={classPrefix:`t`,locale:`zh-CN`};function $T(){var{classPrefix:e}=QT;return{SIZE:{default:``,xs:`${e}-size-xs`,small:`${e}-size-s`,medium:`${e}-size-m`,large:`${e}-size-l`,xl:`${e}-size-xl`,block:`${e}-size-full-width`},STATUS:{loading:`${e}-is-loading`,disabled:`${e}-is-disabled`,focused:`${e}-is-focused`,success:`${e}-is-success`,error:`${e}-is-error`,warning:`${e}-is-warning`,selected:`${e}-is-selected`,active:`${e}-is-active`,checked:`${e}-is-checked`,current:`${e}-is-current`,hidden:`${e}-is-hidden`,visible:`${e}-is-visible`,expanded:`${e}-is-expanded`,indeterminate:`${e}-is-indeterminate`}}}function eE(e){var t=$T().SIZE,n=H(()=>e.value in t?t[e.value]:``);return{style:H(()=>e.value===void 0||e.value in t?{}:{fontSize:e.value}),className:n}}function tE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-add-rectangle`,l.value]),f=H(()=>nE(nE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rE,p.value)}});function aE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-add`,l.value]),f=H(()=>oE(oE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(sE,p.value)}});function lE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-arrow-triangle-down-filled`,l.value]),f=H(()=>uE(uE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(dE,p.value)}});function pE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-arrow-triangle-up-filled`,l.value]),f=H(()=>mE(mE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(hE,p.value)}});function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-backtop`,l.value]),f=H(()=>vE(vE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(yE,p.value)}});function xE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-browse-off`,l.value]),f=H(()=>SE(SE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(CE,p.value)}});function TE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-browse`,l.value]),f=H(()=>EE(EE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(DE,p.value)}});function kE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-calendar`,l.value]),f=H(()=>AE(AE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(jE,p.value)}});function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-caret-right-small`,l.value]),f=H(()=>PE(PE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(FE,p.value)}});function LE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-check-circle-filled`,l.value]),f=H(()=>RE(RE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(zE,p.value)}});function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-check`,l.value]),f=H(()=>HE(HE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(UE,p.value)}});function GE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-down`,l.value]),f=H(()=>KE(KE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(qE,p.value)}});function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XE(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-left-double`,l.value]),f=H(()=>XE(XE({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ZE,p.value)}});function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-left`,l.value]),f=H(()=>eD(eD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(tD,p.value)}});function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right-circle`,l.value]),f=H(()=>iD(iD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(aD,p.value)}});function sD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right-double`,l.value]),f=H(()=>cD(cD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(lD,p.value)}});function dD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-right`,l.value]),f=H(()=>fD(fD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(pD,p.value)}});function hD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-chevron-up`,l.value]),f=H(()=>gD(gD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(_D,p.value)}});function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-close-circle-filled`,l.value]),f=H(()=>bD(bD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(xD,p.value)}});function CD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-close`,l.value]),f=H(()=>wD(wD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(TD,p.value)}});function DD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-copy`,l.value]),f=H(()=>OD(OD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(kD,p.value)}});function jD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-delete`,l.value]),f=H(()=>MD(MD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ND,p.value)}});function FD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ID(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-download`,l.value]),f=H(()=>ID(ID({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(LD,p.value)}});function zD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-edit-1`,l.value]),f=H(()=>BD(BD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(VD,p.value)}});function UD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-ellipsis`,l.value]),f=H(()=>WD(WD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(GD,p.value)}});function qD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-error-circle-filled`,l.value]),f=H(()=>JD(JD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(YD,p.value)}});function ZD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function QD(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-error`,l.value]),f=H(()=>QD(QD({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT($D,p.value)}});function tO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-copy`,l.value]),f=H(()=>nO(nO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rO,p.value)}});function aO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-excel`,l.value]),f=H(()=>oO(oO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(sO,p.value)}});function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-pdf`,l.value]),f=H(()=>uO(uO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(dO,p.value)}});function pO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-powerpoint`,l.value]),f=H(()=>mO(mO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(hO,p.value)}});function _O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file-word`,l.value]),f=H(()=>vO(vO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(yO,p.value)}});function xO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-file`,l.value]),f=H(()=>SO(SO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(CO,p.value)}});function TO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-filter`,l.value]),f=H(()=>EO(EO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(DO,p.value)}});function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-help-circle-filled`,l.value]),f=H(()=>AO(AO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(jO,p.value)}});function NO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-image-error`,l.value]),f=H(()=>PO(PO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(FO,p.value)}});function LO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-image`,l.value]),f=H(()=>RO(RO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(zO,p.value)}});function VO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-info-circle-filled`,l.value]),f=H(()=>HO(HO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(UO,p.value)}});function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-minus-rectangle`,l.value]),f=H(()=>KO(KO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(qO,p.value)}});function YO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XO(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-mirror`,l.value]),f=H(()=>XO(XO({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ZO,p.value)}});function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-page-first`,l.value]),f=H(()=>ek(ek({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(tk,p.value)}});function rk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ik(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-page-last`,l.value]),f=H(()=>ik(ik({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(ak,p.value)}});function sk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ck(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-refresh`,l.value]),f=H(()=>ck(ck({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(lk,p.value)}});function dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-remove`,l.value]),f=H(()=>fk(fk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(pk,p.value)}});function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-rotation`,l.value]),f=H(()=>gk(gk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(_k,p.value)}});function yk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-round`,l.value]),f=H(()=>bk(bk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(xk,p.value)}});function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-search`,l.value]),f=H(()=>wk(wk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Tk,p.value)}});function Dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ok(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-setting`,l.value]),f=H(()=>Ok(Ok({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(kk,p.value)}});function jk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-star-filled`,l.value]),f=H(()=>Mk(Mk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Nk,p.value)}});function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ik(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-time-filled`,l.value]),f=H(()=>Ik(Ik({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Lk,p.value)}});function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-time`,l.value]),f=H(()=>Bk(Bk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Vk,p.value)}});function Uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-upload`,l.value]),f=H(()=>Wk(Wk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Gk,p.value)}});function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-video`,l.value]),f=H(()=>Jk(Jk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(Yk,p.value)}});function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qk(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-zoom-in`,l.value]),f=H(()=>Qk(Qk({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT($k,p.value)}});function tA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nA(e){for(var t=1;te.size),i=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor:`currentColor`),a=H(()=>e.strokeColor?Array.isArray(e.strokeColor)?e.strokeColor[1]??e.strokeColor[0]:e.strokeColor:`currentColor`),o=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`transparent`),s=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[1]??e.fillColor[0]:e.fillColor:`transparent`),c=H(()=>e.fillColor?Array.isArray(e.fillColor)?e.fillColor[0]:e.fillColor:`currentColor`),{className:l,style:u}=eE(r),d=H(()=>[`t-icon`,`t-icon-zoom-out`,l.value]),f=H(()=>nA(nA({fill:`none`},u.value),n.style)),p=H(()=>({class:d.value,style:f.value,onClick:t=>e.onClick?.call(e,{e:t}),strokeColor1:i.value,strokeColor2:a.value,fillColor1:o.value,fillColor2:s.value,strokeWidth:e.strokeWidth||2,filledColor:c.value}));return()=>ZT(rA,p.value)}}),aA=typeof window>`u`;function oA(e,t){if(!aA&&!(!document||!e||typeof e!=`string`)&&!(document.querySelectorAll(`.${t}[src="${e}"]`).length>0)){var n=document.createElement(`script`);n.setAttribute(`class`,t),n.setAttribute(`src`,e),document.body.appendChild(n)}}var sA={name:{type:String,default:``},size:{type:String,default:void 0},url:{type:[String,Array],default:void 0},loadDefaultIcons:{type:Boolean,default:!0},onClick:Function};function cA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lA(e){for(var t=1;te.size),i=H(()=>e.name||``),{className:a,style:o}=eE(r),s=H(()=>{var t=[];return t=e.url instanceof Array?e.url.concat():[e.url],e.loadDefaultIcons&&t.push(dA),t}),c=H(()=>[`${uA}-icon`,`${uA}-icon-${i.value}`,a.value]),l=H(()=>lA(lA({},o.value),n.style));Fr(()=>{Array.from(new Set(s.value)).forEach(e=>{oA(e,`${uA}-svg-js-stylesheet--unique-class`)})});var u=H(()=>({class:c.value,style:l.value,onClick:t=>e.onClick?.call(e,{e:t})}));return()=>co(`svg`,u.value,co(`use`,{href:e.url?`#${i.value}`:`#t-icon-${i.value}`}))}}),`TIcon`),pA=Y(z({name:`TLink`,props:{content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},download:{type:[String,Boolean]},hover:{type:String,default:`underline`,validator:function(e){return e?[`color`,`underline`].includes(e):!0}},href:{type:String,default:``},prefixIcon:{type:Function},size:{type:String,default:`medium`,validator:function(e){return e?[`small`,`medium`,`large`].includes(e):!0}},suffixIcon:{type:Function},target:{type:String,default:``},theme:{type:String,default:`default`,validator:function(e){return e?[`default`,`primary`,`danger`,`warning`,`success`].includes(e):!0}},underline:Boolean,onClick:Function},emits:[`click`],setup:function(e,t){var n=t.emit,r=mw(),i=Z(),a=Q(`link`),o=vw(),s=o.STATUS,c=o.SIZE,l=xC(`classPrefix`).classPrefix,u=Sw(),d=H(function(){return[`${a.value}`,`${a.value}--theme-${e.theme}`,W(W(W(W({},c.value[e.size],e.size!==`medium`),s.value.disabled,u.value),`${l.value}-is-underline`,e.underline),`${a.value}--hover-${e.hover}`,!u.value)]}),f=function(e){u.value||n(`click`,e)};return function(){var t=r(`default`,`content`),n=i(`prefixIcon`),o=i(`suffixIcon`);return B(`a`,{class:U(d.value),href:u.value||!e.href?void 0:e.href,target:e.target?e.target:void 0,download:e.download?e.download:void 0,onClick:f},[n?B(`span`,{class:`${a.value}__prefix-icon`},[n]):null,t,o?B(`span`,{class:`${a.value}__suffix-icon`},[o]):null])}}})),mA={align:{type:String,default:`top`,validator:function(e){return e?[`start`,`end`,`center`,`stretch`,`baseline`,`top`,`middle`,`bottom`].includes(e):!0}},gutter:{type:[Number,Object,Array],default:0},justify:{type:String,default:`start`,validator:function(e){return e?[`start`,`end`,`center`,`space-around`,`space-between`].includes(e):!0}},tag:{type:String,default:`div`}},hA=function(e){var t=`xs`;return t=e<768?`xs`:e>=768&&e<992?`sm`:e>=992&&e<1200?`md`:e>=1200&&e<1400?`lg`:e>=1400&&e<1880?`xl`:`xxl`,t};function gA(){var e=I(hA(SS?0:window.innerWidth));return Pw(`resize`,function(){e.value=hA(SS?0:window.innerWidth)}),e}function _A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vA(e){for(var t=1;t=0),`${e}-${r}-offset-${a.offset}`,parseInt(a.offset,10)>=0),`${e}-${r}-push-${a.push}`,parseInt(a.push,10)>=0),`${e}-${r}-pull-${a.pull}`,parseInt(a.pull,10)>=0))},{});return vA(W(W(W(W(W(W({},`${e}`,!0),`${e}-${n}`,!Vb(n)),`${e}-order-${r}`,r),`${e}-offset-${i}`,i),`${e}-push-${a}`,a),`${e}-pull-${o}`,o),s)}var wA=z({name:`TRow`,props:mA,setup:function(e){var t=L(e).gutter,n=Z();Ln(`rowContext`,Ft({gutter:t}));var r=gA(),i=Q(`row`),a=H(function(){return yA(i.value,e)}),o=H(function(){return bA(e.gutter,r.value)});return function(){var t=e.tag;return co(t,{class:a.value,style:o.value},[n(`default`)])}}}),TA=z({name:`TCol`,inject:[`rowContext`],props:{flex:{type:[String,Number]},lg:{type:[Number,Object]},md:{type:[Number,Object]},offset:{type:Number,default:0},order:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},sm:{type:[Number,Object]},span:{type:Number},tag:{type:String,default:`div`},xl:{type:[Number,Object]},xs:{type:[Number,Object]},xxl:{type:[Number,Object]}},setup:function(e){var t=Q(`col`),n=Z(),r=Rn(`rowContext`,Object.create(null)),i=gA(),a=H(function(){return CA(t.value,e)}),o=H(function(){var t={},n=e.flex;if(n&&(t.flex=xA(n)),r){var a=r.gutter;Object.assign(t,SA(a,i.value))}return t});return function(){var t=e.tag;return co(t,{class:a.value,style:o.value},[n(`default`)])}}}),EA=Y(wA),DA=Y(TA),OA=z({name:`TLayout`,setup:function(){var e=I(!1),t=Z(),n=Q(`layout`),r=H(function(){return[n.value,W({},`${n.value}--with-sider`,e.value)]});return Ln(`layout`,{hasSide:e}),function(){return B(`section`,{class:r.value},[t(`default`)])}}}),kA=z({name:`THeader`,props:{height:{type:String,default:``}},setup:function(e){var t=Q(`layout__header`),n=Z();return function(){return B(`header`,{class:t.value,style:e.height?{height:e.height}:{}},[n(`default`)])}}}),AA=z({name:`TFooter`,props:{height:{type:String,default:``}},setup:function(e){var t=Q(`layout__footer`),n=Z();return function(){return B(`footer`,{class:t.value,style:e.height?{height:e.height}:{}},[n(`default`)])}}}),jA=z({name:`TAside`,props:{width:{type:String,default:``}},setup:function(e){var t=Rn(`layout`,Object.create(null)).hasSide,n=Q(`layout__sider`),r=Z();if(t)return Fr(function(){t.value=!0}),zr(function(){t.value=!1}),function(){var t=e.width?{width:e.width}:{};return B(`aside`,{class:n.value,style:t},[r(`default`)])}}}),MA=z({name:`TContent`,props:{content:{type:[String,Function]},default:{type:[String,Function]}},setup:function(){var e=Q(`layout__content`),t=mw();return function(){return B(`main`,{class:e.value},[t(`default`,`content`)])}}}),NA=Y(jA),PA=Y(OA),FA=Y(kA),IA=Y(AA),LA=Y(MA),RA=Y(z({name:`TDivider`,props:{align:{type:String,default:`center`,validator:function(e){return e?[`left`,`right`,`center`].includes(e):!0}},content:{type:[String,Function]},dashed:Boolean,default:{type:[String,Function]},layout:{type:String,default:`horizontal`,validator:function(e){return e?[`horizontal`,`vertical`].includes(e):!0}},size:{type:[String,Number]}},setup:function(e){var t=Q(`divider`),n=mw();return function(){var r=n(`default`,`content`),i=H(function(){return e.layout!==`vertical`}),a=H(function(){return i.value&&!!r});return B(`div`,{class:[`${t.value}`,[`${t.value}--${e.layout}`],W(W(W({},`${t.value}--dashed`,!!e.dashed),`${t.value}--with-text`,!!a.value),`${t.value}--with-text-${e.align}`,!!a.value)],style:H(function(){return e.size?{margin:i.value?`${xT(e.size)} 0`:`0 ${xT(e.size)}`}:null}).value},[a.value&&B(`span`,{class:`${t.value}__inner-text`},[r])])}}})),zA={align:{type:String,validator:function(e){return e?[`start`,`end`,`center`,`baseline`].includes(e):!0}},breakLine:Boolean,direction:{type:String,default:`horizontal`,validator:function(e){return e?[`vertical`,`horizontal`].includes(e):!0}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:`medium`}};function BA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VA(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};return yb(e)?e:K(e)?e(co,t):K(e?.render)?e.render(co,t):e}function YA(e,t,n){var r=e.props?.[t];if(r)return r;var i=e.children,a=i?.[t]||i?.[n];return a?a?.():null}function XA(e,t){return e===qA.props}var ZA=z({name:`TDescriptionsRow`,props:{row:Array,itemType:String},setup:function(e){var t=Rn(KA),n=Q(`descriptions`),r=xC(`descriptions`).globalConfig,i=H(function(){return t.layout===`horizontal`}),a=H(function(){return t.itemLayout===`horizontal`}),o=function(o){var s=[`${n.value}__label`],c=null,l=null;return XA(e.itemType,o)?(c=o.label,l=o.span):(c=YA(o,`label`),l=o.props.span),B(`td`,V({colspan:i.value?a.value?1:l:1,class:s},{style:t.labelStyle}),[c,t.colon&&r.value.colonText])},s=function(r){var o=[`${n.value}__content`],s=null,c=null;return XA(e.itemType,r)?(s=r.content,c=r.span):(s=YA(r,`content`,`default`),c=r.props.span),B(`td`,V({colspan:i.value?c>1&&a.value?c*2-1:c:1,class:o},{style:t.contentStyle}),[s])},c=function(){return B(`tr`,null,[e.row.map(function(e){return B(fa,null,[o(e),s(e)])})])},l=function(){return B(fa,null,[B(`tr`,null,[e.row.map(function(e){return o(e)})]),B(`tr`,null,[e.row.map(function(e){return s(e)})])])},u=function(){return B(fa,null,[e.row.map(function(e){return B(`tr`,null,[o(e),s(e)])})])},d=function(){return B(fa,null,[e.row.map(function(e){return B(fa,null,[B(`tr`,null,[o(e)]),B(`tr`,null,[s(e)])])})])};return function(){return B(fa,null,[i.value?a.value?c():l():a.value?u():d()])}}}),QA=z({name:`TDescriptions`,props:GA,setup:function(e){var t=Q(`descriptions`),n=vw().SIZE,r=iw(),i=Z(),a=I(qA.props),o=function(){var t=e.column,n=e.layout,i=[];if(G(e.items))i=e.items.map(function(e){return{label:JA(e.label),content:JA(e.content),span:e.span||1}}),a.value=qA.props;else{var o=r(`TDescriptionsItem`);o.length!==0&&(i=o,a.value=qA.slots)}if(n===`vertical`)return[i];var s=[],c=t,l=[];return i.forEach(function(e,n){var r=1;XA(a.value,e)?(r=zb(e.span)?r:e.span,r=r>t?t:r):(e.props=e.props||{},r=zb(e.props?.span)?r:e.props.span,r=r>t?t:r,e.props.span=r),c>=r?(s.push(e),c-=r):(l.push(s),s=[e],c=t-r),n===i.length-1&&(XA(a.value,e)?e.span+=c:e.props.span+=c,l.push(s))}),l};Ln(KA,e);var s=function(){return B(`table`,{class:[`${t.value}__body`,n.value[e.size],W({},`${t.value}__body--fixed`,e.tableLayout===`fixed`),W({},`${t.value}__body--border`,e.bordered)]},[B(`tbody`,null,[o().map(function(e){return B(ZA,{"item-type":a.value,row:e},null)})])])},c=function(){var e=i(`title`);return e?B(`div`,{class:`${t.value}__header`},[e]):``};return function(){return B(`div`,{class:t.value},[c(),s()])}}}),$A=z({name:`TDescriptionsItem`,props:{content:{type:[String,Function]},default:{type:[String,Function]},label:{type:[String,Function]},span:{type:Number,default:1}}}),ej=Y(QA),tj=Y($A);function nj(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function rj(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){nj(a,r,i,o,s,`next`,e)}function s(e){nj(a,r,i,o,s,`throw`,e)}o(void 0)})}}var ij={exports:{}},aj={exports:{}};aj.exports,(function(e){function t(e,t){this.v=e,this.k=t}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(aj);var oj=aj.exports,sj={exports:{}},cj={exports:{}};cj.exports,(function(e){function t(n,r,i,a){var o=Object.defineProperty;try{o({},``,{})}catch{o=0}e.exports=t=function(e,n,r,i){if(n)o?o(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r;else{var a=function(n,r){t(e,n,function(e){return this._invoke(n,r,e)})};a(`next`,0),a(`throw`,1),a(`return`,2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(cj);var lj=cj.exports;sj.exports,(function(e){var t=lj;function n(){var r,i,a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.toStringTag||`@@toStringTag`;function c(e,n,a,o){var s=n&&n.prototype instanceof u?n:u,c=Object.create(s.prototype);return t(c,`_invoke`,function(e,t,n){var a,o,s,c=0,u=n||[],d=!1,f={p:0,n:0,v:r,a:p,f:p.bind(r,4),d:function(e,t){return a=e,o=0,s=r,f.n=t,l}};function p(e,t){for(o=e,s=t,i=0;!d&&c&&!n&&i3?(n=m===t)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=r):a[0]<=p&&((n=e<2&&pt||t>m)&&(a[4]=e,a[5]=t,f.n=m,o=0))}if(n||e>1)return l;throw d=!0,t}return function(n,u,m){if(c>1)throw TypeError(`Generator is already running`);for(d&&u===1&&p(u,m),o=u,s=m;(i=o<2?r:s)||!d;){a||(o?o<3?(o>1&&(f.n=-1),p(o,s)):f.n=s:f.v=s);try{if(c=2,a){if(o||(n=`next`),i=a[n]){if(!(i=i.call(a,s)))throw TypeError(`iterator result is not an object`);if(!i.done)return i;s=i.value,o<2&&(o=0)}else o===1&&(i=a.return)&&i.call(a),o<2&&(s=TypeError(`The iterator does not provide a '`+n+`' method`),o=1);a=r}else if((i=(d=f.n<0)?s:e.call(t,f))!==l)break}catch(e){a=r,o=1,s=e}finally{c=1}}return{value:i,done:d}}}(e,a,o),!0),c}var l={};function u(){}function d(){}function f(){}i=Object.getPrototypeOf;var p=[][o]?i(i([][o]())):(t(i={},o,function(){return this}),i),m=f.prototype=u.prototype=Object.create(p);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,t(e,s,`GeneratorFunction`)),e.prototype=Object.create(m),e}return d.prototype=f,t(m,`constructor`,f),t(f,`constructor`,d),d.displayName=`GeneratorFunction`,t(f,s,`GeneratorFunction`),t(m),t(m,s,`Generator`),t(m,o,function(){return this}),t(m,`toString`,function(){return`[object Generator]`}),(e.exports=n=function(){return{w:c,m:h}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(sj);var uj=sj.exports,dj={exports:{}},fj={exports:{}},pj={exports:{}};pj.exports,(function(e){var t=oj,n=lj;function r(e,i){function a(n,r,o,s){try{var c=e[n](r),l=c.value;return l instanceof t?i.resolve(l.v).then(function(e){a(`next`,e,o,s)},function(e){a(`throw`,e,o,s)}):i.resolve(l).then(function(e){c.value=e,o(c)},function(e){return a(`throw`,e,o,s)})}catch(e){s(e)}}var o;this.next||(n(r.prototype),n(r.prototype,typeof Symbol==`function`&&Symbol.asyncIterator||`@asyncIterator`,function(){return this})),n(this,`_invoke`,function(e,t,n){function r(){return new i(function(t,r){a(e,n,t,r)})}return o=o?o.then(r,r):r()},!0)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(pj);var mj=pj.exports;fj.exports,(function(e){var t=uj,n=mj;function r(e,r,i,a,o){return new n(t().w(e,r,i,a),o||Promise)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(fj);var hj=fj.exports;dj.exports,(function(e){var t=hj;function n(e,n,r,i,a){var o=t(e,n,r,i,a);return o.next().then(function(e){return e.done?e.value:o.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(dj);var gj=dj.exports,_j={exports:{}};_j.exports,(function(e){function t(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_j);var vj=_j.exports,yj={exports:{}},bj={exports:{}};bj.exports,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(bj);var xj=bj.exports;yj.exports,(function(e){var t=xj.default;function n(e){if(e!=null){var n=e[typeof Symbol==`function`&&Symbol.iterator||`@@iterator`],r=0;if(n)return n.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(t(e)+` is not iterable`)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(yj);var Sj=yj.exports;ij.exports,(function(e){var t=oj,n=uj,r=gj,i=hj,a=mj,o=vj,s=Sj;function c(){var l=n(),u=l.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(u):u.__proto__).constructor;function f(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===d||(t.displayName||t.name)===`GeneratorFunction`)}var p={throw:1,return:2,break:3,continue:3};function m(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,i,a){return t.resultName=i,n(r.d,s(e),a)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,t,n,r){return l.w(m(e),t,n,r&&r.reverse())},isGeneratorFunction:f,mark:l.m,awrap:function(e,n){return new t(e,n)},AsyncIterator:a,async:function(e,t,n,a,o){return(f(t)?i:r)(m(e),t,n,a,o)},keys:o,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports})(ij);var Cj=ij.exports,wj=Cj(),Tj=wj;try{regeneratorRuntime=wj}catch{(typeof globalThis>`u`?`undefined`:ud(globalThis))===`object`?globalThis.regeneratorRuntime=wj:Function(`r`,`regeneratorRuntime = r`)(wj)}var Ej=iS(Tj),Dj=Y(z({name:`TAffix`,props:{container:{type:[String,Function],default:function(){return function(){return window}}},content:{type:[String,Function]},default:{type:[String,Function]},offsetBottom:{type:Number,default:0},offsetTop:{type:Number,default:0},zIndex:{type:Number},onFixedChange:Function},emits:[`fixedChange`],setup:function(e,t){var n=Q(`affix`),r=mw(),i=I(null),a=I(null),o=I(document?.createElement(`div`)),s=I(!1),c=I(!1),l=I(),u=I(),d=0,f=function(){s.value||=(d=window.requestAnimationFrame(function(){d=0;var r=i.value?.getBoundingClientRect()??{top:0,width:0,height:0},c=r.top,f=r.width,p=r.height,m=0;l.value instanceof HTMLElement&&(m=l.value.getBoundingClientRect().top);var h,g=c-m,_=l.value[l.value instanceof Window?`innerHeight`:`clientHeight`]-p,v=m+_-e.offsetBottom;if(h=!Vb(e.offsetTop)&&g<=e.offsetTop?m+e.offsetTop:!Vb(e.offsetBottom)&&c>=v?v:!1,a.value){var y=h!==!1,b=i.value.contains(o.value);y?(a.value.className=n.value,u.value={top:`${h}px`,width:`${f}px`,height:`${p}px`,zIndex:e.zIndex},b||(o.value.style.width=`${f}px`,o.value.style.height=`${p}px`,i.value.appendChild(o.value))):(a.value.removeAttribute(`class`),u.value=void 0,b&&o.value.remove()),t.emit(`fixedChange`,y,{top:Number(h)}),K(e.onFixedChange)&&e.onFixedChange(y,{top:Number(h)})}s.value=!1}),!0)},p=function(){var t=rj(Ej.mark(function t(){return Ej.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,Sn();case 1:if(!c.value){t.next=2;break}return t.abrupt(`return`);case 2:l.value=jS(e.container),wS(l.value,`scroll`,f),wS(window,`resize`,f),c.value=!0;case 3:case`end`:return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),m=function(){!l.value||!c.value||(TS(l.value,`scroll`,f),TS(window,`resize`,f),d&&window.cancelAnimationFrame(d),c.value=!1)};return R(function(){return e.offsetTop},function(){f()}),R(function(){return e.offsetBottom},function(){f()}),R(function(){return e.zIndex},function(){f()}),Fr(p),Or(p),kr(m),Rr(m),t.expose({scrollContainer:l,affixWrapRef:i,handleScroll:f}),function(){return B(`div`,{ref:i},[B(`div`,{ref:a,style:u.value},[r(`default`,`content`)])])}}})),Oj={exports:{}};Oj.exports,(function(e,t){(function(t,n){e.exports=n()})(rS,function(){return function(){var e={686:(function(e,t,n){n.d(t,{default:function(){return O}});var r=n(279),i=n.n(r),a=n(370),o=n.n(a),s=n(817),c=n.n(s);function l(e){try{return document.execCommand(e)}catch{return!1}}var u=function(e){var t=c()(e);return l(`cut`),t};function d(e){var t=document.documentElement.getAttribute(`dir`)===`rtl`,n=document.createElement(`textarea`);n.style.fontSize=`12pt`,n.style.border=`0`,n.style.padding=`0`,n.style.margin=`0`,n.style.position=`absolute`,n.style[t?`right`:`left`]=`-9999px`;var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top=`${r}px`,n.setAttribute(`readonly`,``),n.value=e,n}var f=function(e,t){var n=d(e);t.container.appendChild(n);var r=c()(n);return l(`copy`),n.remove(),r},p=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},n=``;return typeof e==`string`?n=f(e,t):e instanceof HTMLInputElement&&![`text`,`search`,`url`,`tel`,`password`].includes(e?.type)?n=f(e.value,t):(n=c()(e),l(`copy`)),n};function m(e){"@babel/helpers - typeof";return m=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m(e)}var h=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.action,n=t===void 0?`copy`:t,r=e.container,i=e.target,a=e.text;if(n!==`copy`&&n!==`cut`)throw Error(`Invalid "action" value, use either "copy" or "cut"`);if(i!==void 0)if(i&&m(i)===`object`&&i.nodeType===1){if(n===`copy`&&i.hasAttribute(`disabled`))throw Error(`Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute`);if(n===`cut`&&(i.hasAttribute(`readonly`)||i.hasAttribute(`disabled`)))throw Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw Error(`Invalid "target" value, use a valid Element`);if(a)return p(a,{container:r});if(i)return n===`cut`?u(i):p(i,{container:r})};function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){for(var n=0;n`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function D(e,t){var n=`data-clipboard-${e}`;if(t.hasAttribute(n))return t.getAttribute(n)}var O=function(e){b(n,e);var t=S(n);function n(e,r){var i;return _(this,n),i=t.call(this),i.resolveOptions(r),i.listenClick(e),i}return y(n,[{key:`resolveOptions`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof e.action==`function`?e.action:this.defaultAction,this.target=typeof e.target==`function`?e.target:this.defaultTarget,this.text=typeof e.text==`function`?e.text:this.defaultText,this.container=g(e.container)===`object`?e.container:document.body}},{key:`listenClick`,value:function(e){var t=this;this.listener=o()(e,`click`,function(e){return t.onClick(e)})}},{key:`onClick`,value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||`copy`,r=h({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?`success`:`error`,{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:`defaultAction`,value:function(e){return D(`action`,e)}},{key:`defaultTarget`,value:function(e){var t=D(`target`,e);if(t)return document.querySelector(t)}},{key:`defaultText`,value:function(e){return D(`text`,e)}},{key:`destroy`,value:function(){this.listener.destroy()}}],[{key:`copy`,value:function(e){return p(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body})}},{key:`cut`,value:function(e){return u(e)}},{key:`isSupported`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[`copy`,`cut`],t=typeof e==`string`?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n&&=!!document.queryCommandSupported(e)}),n}}]),n}(i())}),828:(function(e){var t=9;if(typeof Element<`u`&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}function r(e,n){for(;e&&e.nodeType!==t;){if(typeof e.matches==`function`&&e.matches(n))return e;e=e.parentNode}}e.exports=r}),438:(function(e,t,n){var r=n(828);function i(e,t,n,r,i){var a=o.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}function a(e,t,n,r,a){return typeof e.addEventListener==`function`?i.apply(null,arguments):typeof n==`function`?i.bind(null,document).apply(null,arguments):(typeof e==`string`&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return i(e,t,n,r,a)}))}function o(e,t,n,i){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&i.call(e,n)}}e.exports=a}),879:(function(e,t){t.node=function(e){return e!==void 0&&e instanceof HTMLElement&&e.nodeType===1},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return e!==void 0&&(n===`[object NodeList]`||n===`[object HTMLCollection]`)&&`length`in e&&(e.length===0||t.node(e[0]))},t.string=function(e){return typeof e==`string`||e instanceof String},t.fn=function(e){return Object.prototype.toString.call(e)===`[object Function]`}}),370:(function(e,t,n){var r=n(879),i=n(438);function a(e,t,n){if(!e&&!t&&!n)throw Error(`Missing required arguments`);if(!r.string(t))throw TypeError(`Second argument must be a String`);if(!r.fn(n))throw TypeError(`Third argument must be a Function`);if(r.node(e))return o(e,t,n);if(r.nodeList(e))return s(e,t,n);if(r.string(e))return c(e,t,n);throw TypeError(`First argument must be a String, HTMLElement, HTMLCollection, or NodeList`)}function o(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function s(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function c(e,t,n){return i(document.body,e,t,n)}e.exports=a}),817:(function(e){function t(e){var t;if(e.nodeName===`SELECT`)e.focus(),t=e.value;else if(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`){var n=e.hasAttribute(`readonly`);n||e.setAttribute(`readonly`,``),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute(`readonly`),t=e.value}else{e.hasAttribute(`contenteditable`)&&e.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(e),r.removeAllRanges(),r.addRange(i),t=r.toString()}return t}e.exports=t}),279:(function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||={};return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||={})[e]||[]).slice(),r=0,i=n.length;rt.top?e:t}).link),l&&i.value.length&&i.value.indexOf(a.value)>i.value.indexOf(c)){var u=v(a.value);if(u){var d=Mj(u,o.value);if(o.value instanceof HTMLElement){var f=o.value.clientHeight;d+u.offsetHeight>0&&da`);if(!e){Object.assign(c,{});return}var t=e.offsetTop,n=e.offsetHeight;Object.assign(c,{top:`${t}px`,height:`${n}px`,opacity:1})},C=function(t){var n;(n=e.onClick)==null||n.call(e,t)},w=function(){var t=rj(Ej.mark(function t(n){var r,i,a,c,l;return Ej.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=v(n),x(n),r){t.next=1;break}return t.abrupt(`return`);case 1:return s.value=!0,i=e.targetOffset,a=NS(o.value),c=Mj(r,o.value),l=a+c-i,t.next=2,PS(l,{container:o.value});case 2:s.value=!1;case 3:case`end`:return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),T=function(){return h(`cursor`)||B(`div`,{class:d.value},null)};return Fr(rj(Ej.mark(function e(){return Ej.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(g(),!a.value){e.next=2;break}return e.next=1,Sn();case 1:w(a.value);case 2:case`end`:return e.stop()}},e)}))),zr(function(){o.value&&TS(o.value,`scroll`,_)}),Hn(function(){o.value&&TS(o.value,`scroll`,_),g()}),Ln(Fj,Ft({registerLink:y,unregisterLink:b,handleScrollTo:w,handleLinkClick:C,active:a})),function(){var t=e.size,i=e.affixProps,a=B(`div`,V({ref:r,class:[l.value,m.value[t]]},n),[B(`div`,{class:u.value},[B(`div`,{class:`${d.value}-wrapper`,style:c},[T()])]),h(`default`)]);return i?B(Dj,i,Ij(a)?a:{default:function(){return[a]}}):a}}}),Rj={href:{type:String,default:``,required:!0},target:{type:String,default:`_self`,validator:function(e){return[`_self`,`_blank`,`_parent`,`_top`].includes(e)}},title:{type:[String,Function],default:``},customScroll:{type:Boolean,default:!1}};function zj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bj(e){for(var t=1;t`u`?!1:e instanceof jM(e).ShadowRoot||e instanceof ShadowRoot}function FM(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!NM(i)||!AM(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function IM(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!NM(r)||!AM(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var LM={name:`applyStyles`,enabled:!0,phase:`write`,fn:FM,effect:IM,requires:[`computeStyles`]};function RM(e){return e.split(`-`)[0]}var zM=Math.max,BM=Math.min,VM=Math.round;function HM(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function UM(){return!/^((?!chrome|android).)*safari/i.test(HM())}function WM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&NM(e)&&(i=e.offsetWidth>0&&VM(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&VM(r.height)/e.offsetHeight||1);var o=(MM(e)?jM(e):window).visualViewport,s=!UM()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function GM(e){var t=WM(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function KM(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&PM(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function qM(e){return jM(e).getComputedStyle(e)}function JM(e){return[`table`,`td`,`th`].indexOf(AM(e))>=0}function YM(e){return((MM(e)?e.ownerDocument:e.document)||window.document).documentElement}function XM(e){return AM(e)===`html`?e:e.assignedSlot||e.parentNode||(PM(e)?e.host:null)||YM(e)}function ZM(e){return!NM(e)||qM(e).position===`fixed`?null:e.offsetParent}function QM(e){var t=/firefox/i.test(HM());if(/Trident/i.test(HM())&&NM(e)&&qM(e).position===`fixed`)return null;var n=XM(e);for(PM(n)&&(n=n.host);NM(n)&&[`html`,`body`].indexOf(AM(n))<0;){var r=qM(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function $M(e){for(var t=jM(e),n=ZM(e);n&&JM(n)&&qM(n).position===`static`;)n=ZM(n);return n&&(AM(n)===`html`||AM(n)===`body`&&qM(n).position===`static`)?t:n||QM(e)||t}function eN(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function tN(e,t,n){return zM(e,BM(t,n))}function nN(e,t,n){var r=tN(e,t,n);return r>n?n:r}function rN(){return{top:0,right:0,bottom:0,left:0}}function iN(e){return Object.assign({},rN(),e)}function aN(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var oN=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,iN(typeof e==`number`?aN(e,xM):e)};function sN(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=RM(n.placement),c=eN(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=oN(i.padding,n),d=GM(a),f=c===`y`?`top`:yM,p=c===`y`?_M:vM,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=$M(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=tN(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function cN(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||KM(t.elements.popper,r)&&(t.elements.arrow=r))}var lN={name:`arrow`,enabled:!0,phase:`main`,fn:sN,effect:cN,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function uN(e){return e.split(`-`)[1]}var dN={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function fN(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:VM(n*i)/i||0,y:VM(r*i)/i||0}}function pN(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=yM,b=`top`,x=window;if(l){var S=$M(n),C=`clientHeight`,w=`clientWidth`;if(S===jM(n)&&(S=YM(n),qM(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=_M;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=vM;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&dN),O=u===!0?fN({x:p,y:h},jM(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function mN(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:RM(t.placement),variation:uN(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,pN(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,pN(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var hN={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:mN,data:{}},gN={passive:!0};function _N(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=jM(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,gN)}),s&&c.addEventListener(`resize`,n.update,gN),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,gN)}),s&&c.removeEventListener(`resize`,n.update,gN)}}var vN={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:_N,data:{}},yN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bN(e){return e.replace(/left|right|bottom|top/g,function(e){return yN[e]})}var xN={start:`end`,end:`start`};function SN(e){return e.replace(/start|end/g,function(e){return xN[e]})}function CN(e){var t=jM(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function wN(e){return WM(YM(e)).left+CN(e).scrollLeft}function TN(e,t){var n=jM(e),r=YM(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=UM();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+wN(e),y:c}}function EN(e){var t=YM(e),n=CN(e),r=e.ownerDocument?.body,i=zM(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=zM(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+wN(e),s=-n.scrollTop;return qM(r||t).direction===`rtl`&&(o+=zM(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function DN(e){var t=qM(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ON(e){return[`html`,`body`,`#document`].indexOf(AM(e))>=0?e.ownerDocument.body:NM(e)&&DN(e)?e:ON(XM(e))}function kN(e,t){t===void 0&&(t=[]);var n=ON(e),r=n===e.ownerDocument?.body,i=jM(n),a=r?[i].concat(i.visualViewport||[],DN(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(kN(XM(a)))}function AN(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jN(e,t){var n=WM(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function MN(e,t,n){return t===`viewport`?AN(TN(e,n)):MM(t)?jN(t,n):AN(EN(YM(e)))}function NN(e){var t=kN(XM(e)),n=[`absolute`,`fixed`].indexOf(qM(e).position)>=0&&NM(e)?$M(e):e;return MM(n)?t.filter(function(e){return MM(e)&&KM(e,n)&&AM(e)!==`body`}):[]}function PN(e,t,n,r){var i=t===`clippingParents`?NN(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=MN(e,n,r);return t.top=zM(i.top,t.top),t.right=BM(i.right,t.right),t.bottom=BM(i.bottom,t.bottom),t.left=zM(i.left,t.left),t},MN(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function FN(e){var t=e.reference,n=e.element,r=e.placement,i=r?RM(r):null,a=r?uN(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case _M:c={x:o,y:t.y+t.height};break;case vM:c={x:t.x+t.width,y:s};break;case yM:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?eN(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case SM:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break}}return c}function IN(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?CM:s,l=n.rootBoundary,u=l===void 0?wM:l,d=n.elementContext,f=d===void 0?TM:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=iN(typeof g==`number`?aN(g,xM):g),v=f===`popper`?EM:TM,y=e.rects.popper,b=e.elements[m?v:f],x=PN(MM(b)?b:b.contextElement||YM(e.elements.popper),c,u,o),S=WM(e.elements.reference),C=FN({reference:S,element:y,placement:i}),w=AN(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function LN(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?OM:c,u=uN(r),d=u?s?DM:DM.filter(function(e){return uN(e)===u}):xM,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=IN(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[RM(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function RN(e){if(RM(e)===`auto`)return[];var t=bN(e);return[SN(e),t,SN(t)]}function zN(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=RM(g)===g,v=c||(_||!m?[bN(g)]:RN(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(RM(n)===`auto`?LN(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T=0,A=k?`width`:`height`,j=IN(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?vM:yM:O?_M:`top`;b[A]>x[A]&&(M=bN(M));var N=bN(M),P=[];if(a&&P.push(j[D]<=0),s&&P.push(j[M]<=0,j[N]<=0),P.every(function(e){return e})){w=E,C=!1;break}S.set(E,P)}if(C)for(var F=m?3:1,ee=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},te=F;te>0&&ee(te)!==`break`;te--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var BN={name:`flip`,enabled:!0,phase:`main`,fn:zN,requiresIfExists:[`offset`],data:{_skip:!1}};function VN(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HN(e){return[`top`,vM,_M,yM].some(function(t){return e[t]>=0})}function UN(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=IN(t,{elementContext:`reference`}),s=IN(t,{altBoundary:!0}),c=VN(o,r),l=VN(s,i,a),u=HN(c),d=HN(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var WN={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:UN};function GN(e,t,n){var r=RM(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function KN(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=OM.reduce(function(e,n){return e[n]=GN(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var qN={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:KN};function JN(e){var t=e.state,n=e.name;t.modifiersData[n]=FN({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var YN={name:`popperOffsets`,enabled:!0,phase:`read`,fn:JN,data:{}};function XN(e){return e===`x`?`y`:`x`}function ZN(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=IN(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=RM(t.placement),v=uN(t.placement),y=!v,b=eN(_),x=XN(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:yM,A=b===`y`?_M:vM,j=b===`y`?`height`:`width`,M=S[b],N=M+g[k],P=M-g[A],F=p?-w[j]/2:0,ee=v===`start`?C[j]:w[j],te=v===`start`?-w[j]:-C[j],ne=t.elements.arrow,re=p&&ne?GM(ne):{width:0,height:0},ie=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:rN(),ae=ie[k],oe=ie[A],se=tN(0,C[j],re[j]),ce=y?C[j]/2-F-se-ae-E.mainAxis:ee-se-ae-E.mainAxis,le=y?-C[j]/2+F+se+oe+E.mainAxis:te+se+oe+E.mainAxis,ue=t.elements.arrow&&$M(t.elements.arrow),de=ue?b===`y`?ue.clientTop||0:ue.clientLeft||0:0,fe=D?.[b]??0,pe=M+ce-fe-de,me=M+le-fe,he=tN(p?BM(N,pe):N,M,p?zM(P,me):P);S[b]=he,O[b]=he-M}if(s){var ge=b===`x`?`top`:yM,_e=b===`x`?_M:vM,ve=S[x],ye=x===`y`?`height`:`width`,be=ve+g[ge],xe=ve-g[_e],Se=[`top`,yM].indexOf(_)!==-1,Ce=D?.[x]??0,we=Se?be:ve-C[ye]-w[ye]-Ce+E.altAxis,Te=Se?ve+C[ye]+w[ye]-Ce-E.altAxis:xe,Ee=p&&Se?nN(we,ve,Te):tN(p?we:be,ve,p?Te:xe);S[x]=Ee,O[x]=Ee-ve}t.modifiersData[r]=O}}var QN={name:`preventOverflow`,enabled:!0,phase:`main`,fn:ZN,requiresIfExists:[`offset`]};function $N(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function eP(e){return e===jM(e)||!NM(e)?CN(e):$N(e)}function tP(e){var t=e.getBoundingClientRect(),n=VM(t.width)/e.offsetWidth||1,r=VM(t.height)/e.offsetHeight||1;return n!==1||r!==1}function nP(e,t,n){n===void 0&&(n=!1);var r=NM(t),i=NM(t)&&tP(t),a=YM(t),o=WM(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((AM(t)!==`body`||DN(a))&&(s=eP(t)),NM(t)?(c=WM(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=wN(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function rP(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function iP(e){var t=rP(e);return kM.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function aP(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function oP(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var sP={placement:`bottom`,modifiers:[],strategy:`absolute`};function cP(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function lP(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?sP:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},sP,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:MM(e)?kN(e):e.contextElement?kN(e.contextElement):[],popper:kN(t)};var s=iP(oP([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(cP(t,n)){i.rects={reference:nP(t,$M(n),i.options.strategy===`fixed`),popper:GM(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r0&&arguments[0]!==void 0?arguments[0]:[],t=[];return e.forEach(function(e){G(e)?t.push.apply(t,U(e)):e.type===fa?t.push.apply(t,U(pP(e.children))):t.push(e)}),t.filter(function(e){return!(e&&(e.type===ma||e.type===fa&&e.children.length===0||e.type===pa&&e.children.trim()===``))})}function mP(e,t){return!e&&!t?!1:!!(!e||!t||[`width`,`height`,`x`,`y`].some(function(n){return e[n]!==t[n]}))}function hP(e){var t=Wa(),n=I();return Fr(function(){n.value=e(t)}),Lr(function(){var r=e(t);n.value!==r&&(n.value=r)}),n}var gP=z({name:`TPopupTrigger`,props:{forwardRef:Function},emits:[`resize`],setup:function(e,t){var n=t.emit,r=t.slots,i=hP(function(e){return e.parent.vnode.el.nextElementSibling}),a=I();return R(i,function(){var t;(t=e.forwardRef)==null||t.call(e,i.value)}),Uw(i,function(e){a.value=J(e,1)[0].contentRect}),R(a,function(e,t){mP(e,t)&&n(`resize`)}),function(){var e=pP(r.default?.call(r));return e.length>1||e[0]?.type===pa?B(`span`,null,[e]):e[0]}}}),_P=z({name:`TPopupContent`,emits:[`resize`],setup:function(e,t){var n=t.emit,r=t.slots;return Uw(hP(function(e){return e.vnode.el.children[0]}),function(){n(`resize`)}),function(){return B(`div`,{style:`position: absolute; top: 0px; left: 0px; width: 100%`},[r.default()])}}}),vP=z({name:`TPopupContainer`,inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:dP.attach,forwardRef:Function},emits:[`resize`,`contentMounted`],setup:function(e,t){var n=t.emit,r=t.attrs,i=t.slots,a=t.expose,o=I(),s=I(!1);function c(){n(`resize`)}return Fr(function(){requestAnimationFrame(function(){s.value=e.visible})}),R(function(){return e.visible},function(t){t&&(s.value=e.visible)}),a({unmountContent:function(){s.value=!1}}),function(){var t,a=function(){return AS(e.attach,o.value)};return B(fa,null,[B(gP,{class:r.class,forwardRef:function(t){e.forwardRef(t),o.value=t},onResize:c},fP(t=i.default())?t:{default:function(){return[t]}}),s.value&&B(rr,{disabled:!a(),to:a()},{default:function(){return[B(_P,{onResize:c,onVnodeMounted:function(){return n(`contentMounted`)}},{default:function(){return[i.content&&i.content()]}})]}})])}}});function yP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bP(e){for(var t=1;tn.x&&t.xn.y&&t.y0&&(qP(a.value)||qP(o.value))?(TC.error(`Breadcrumb`,`需要设置 itemsBeforeCollapse 和 itemsAfterCollapse 属性来控制省略号前后的显示项数。`),!1):!(n<=0||r<=n||s>=r)});return{getDisplayItems:H(function(){var e=t.value;if(!s.value)return e;var r=e.length,i=e.slice(0,a.value),c=e.slice(r-o.value,r);return[].concat(U(i),[{content:n,disabled:!0,isEllipsisItem:!0}],U(c))}),getEllipsisItems:H(function(){var e=t.value;if(!s.value)return[];var n=e.slice(a.value,e.length-o.value);return n.map(function(e,t){return KP(KP({},e),{},{isLast:t===n.length-1})})})}};function YP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XP(e){for(var t=1;t=e.maxHeight&&(l.value=!0);var t=document.querySelector(`.${n.value}__item`);t&&(a.value=t.scrollHeight+2),s.value&&(c.value=s.value.offsetHeight)});var p=function(e){return K(e)?e(co):e},m=function(t,r){var o,s=[],l;return(o=t.forEach)==null||o.call(t,function(t,o){var h=oF({},t),g=i[r]||0,_=o*a.value+(r===0?c.value:0)-g;h.children?(h.children=m(h.children,r+1),l=B(`div`,{key:o},[B(rF,{style:h.style,class:[`${n.value}__item`,`${n.value}__item--suffix`,h.class],value:h.value,theme:h.theme,active:h.active,prefixIcon:h.prefixIcon,disabled:h.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,isSubmenu:!0},{default:function(){return[B(`div`,{class:`${n.value}__item-content`},[B(`span`,{class:`${n.value}__item-text`},[p(h.content)]),B(u,{class:`${n.value}__item-direction`,size:`16`},null)]),B(`div`,{class:[`${n.value}__submenu-wrapper`,W({},`${n.value}__submenu-wrapper--${e.direction}`,e.direction)],style:{position:`absolute`,top:`${_}px`}},[B(`div`,{class:[`${n.value}__submenu`,W({},`${n.value}__submenu--disabled`,h.disabled)],style:{position:`static`,maxHeight:`${e.maxHeight}px`},onScroll:function(e){return f(e,r+1)}},[B(`ul`,null,[h.children])])])]}}),h.divider?B(RA,null,null):null])):l=B(`div`,{key:o},[B(rF,{style:h.style,class:[`${n.value}__item`,h.class],value:h.value,theme:h.theme,active:h.active,prefixIcon:h.prefixIcon,disabled:h.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onClick:h.disabled||h.children?function(){return null}:function(e,t){return d({data:h,context:t})}},{default:function(){return[B(`span`,{class:`${n.value}__item-text`},[p(h.content)])]}}),h.divider?B(RA,null,null):null]),s.push(l)}),s};return function(){var i=t(`panelTopContent`),a=t(`panelBottomContent`);return B(`div`,{class:[r.value,`${r.value}--${e.direction}`,W({},`${r.value}--overflow`,l.value)],style:{maxHeight:`${e.maxHeight}px`},ref:o,onScroll:function(e){return f(e,0)}},[i?B(`div`,{class:`${n.value}__top-content`,ref:s},[i]):null,m(e.options,0),a?B(`div`,{class:`${n.value}__bottom-content`},[a]):null])}}});function cF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lF(e){for(var t=1;t0?uF(h):null})}).filter(function(e){return!!e.content})):G(e)&&G(e[0]?.children)?uF(e[0]?.children):[]};function dF(e){var t,n,r,i,a=iw(),o=Wa(),s=((t=a(`DropdownMenu`))==null||(t=t[0])==null||(t=t.children)==null||(n=t.default)==null?void 0:n.call(t))||((r=o.slots)==null||(i=r.dropdown)==null?void 0:i.call(r));return H(function(){return e.options&&e.options.length>0?e.options:uF(s)})}function fF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pF(e){for(var t=1;t0)for(var n=0,r=e.children.length;n0){var a=SF(this.data,n);a&&!a.children.some(function(e){return e.value===i.value})?a.children.push(i):this.cache.add(i)}else this.cache.add(i)}},{key:`select`,value:function(e){var t=bF(this.data,e,[])||[];return t.push(e),t.filter(function(e){return e!=null})}},{key:`expand`,value:function(e){var t=this;if(this.expandValues.has(e))return this.expandValues.delete(e),U(this.expandValues);if(this.expandValues.add(e),!this.isMutex.value)return U(this.expandValues);var n=xF(this.data,e)||[],r=new Set(n.filter(function(t){return t.children?.length>0&&t.value!==e}).map(function(e){return e.value}));return this.expandValues.forEach(function(e){r.has(e)&&t.expandValues.delete(e)}),U(this.expandValues)}},{key:`getChild`,value:function(e){var t=SF(this.data,e);return t?t.children:[]}}])}();function wF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TF(e){for(var t=1;tt+c-u)return l+s-c+u}else if(n===`start`)return l-d;else if(n===`center`)return l+(s-c)/2;else if(n===`end`)return l+s-c+u;return t}function IF(e,t,n){var r=e.navsContainer,i=e.activeTab,a=NF(r),o=NF(i),s=Math.abs(a-o);return n===`next`?t+s:t-s}function LF(e){var t=e.navsWrap,n=e.navsContainer,r=e.rightOperations,i=e.toRightBtn,a=NF(t),o=NF(n),s=NF(r),c=NF(i);return a-o+s-c}function RF(e,t){return Math.max(0,Math.min(e,t))}function zF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function BF(e){for(var t=1;t1}),b=H(function(){return c.valueMath.abs(n)?c.value+t:c.value+n)}},N=function(){setTimeout(function(){A(FF(_(),c.value,e.scrollPosition))},0)},P=function(){Sn(function(){h.value=LF(_()),h.value-c.value<=0&&A(h.value)})};R([function(){return e.placement},function(){return e.panels}],P),R([function(){return e.scrollPosition}],N),Fw(Yy(P),l.value);var F=function(t){var n;(n=e.onAdd)==null||n.call(e,{e:t})},ee=function(t,n){var r=n.value;if(n.disabled||e.value===r)return!1;e.onChange(r)},te=function(t){var n=t.e,r=t.value,i=t.index;e.onRemove({e:n,value:r,index:i})},ne=function(t){t!=null&&t.$el&&t?.value===e.value&&m.value!==t.$el&&(m.value=t.$el,N())},re=Tw(e).setNavsWrap;Fr(function(){re(u.value),P(),N()});var ie=function(){return e.panels.map(function(t,n){var r,i=t!=null&&(r=t.children)!=null&&r.label?t.children.label():K(t.label)?t.label(co):t.label||`选项卡${n+1}`,a=e.dragSort;return a&&t.draggable===!1&&(a=t.draggable),B(jF,{ref:ne,draggable:a,key:t.value,index:n,theme:e.theme,size:e.size,placement:e.placement,label:i,active:t.value===e.value,disabled:e.disabled||t.disabled,removable:t.removable,value:t.value,onClick:function(e){return ee(e,t)},onTabRemove:te,onTabPanelRemove:t.onRemove},null)})},ae=function(){return[B(`div`,{ref:d,class:[`${t.value}__operations`,`${t.value}__operations--left`]},[B(wo,{name:`fade`,mode:`out-in`,appear:!0},{default:function(){return[y.value?B(`div`,{class:w.value,onClick:function(){return j(`prev`)}},[B(r,null,null)]):null]}})]),B(`div`,{ref:f,class:[`${t.value}__operations`,`${t.value}__operations--right`]},[B(wo,{name:`fade`,mode:`out-in`,appear:!0},{default:function(){return[b.value?B(`div`,{ref:p,class:T.value,onClick:function(){return j(`next`)}},[B(i,null,null)]):null]}}),e.addable?B(`div`,{class:E.value,onClick:F},[B(a,null,null)]):null,g.value&&e.action])]},oe=function(){var t=ie();return B(`div`,{class:D.value},[B(`div`,{class:O.value,onWheel:M},[B(`div`,{ref:u,class:k.value,style:x.value},[e.theme!==`card`&&B(MF,{placement:e.placement,value:e.value,navs:t},null),t])])])};return function(){return B(`div`,{ref:l,class:[`${t.value}__nav`],style:S.value},[ae(),oe()])}}}),HF=Y(z({name:`TTabs`,props:AF,setup:function(e){var t=Q(`tabs`),n=Q(),r=Z(),i=L(e),a=i.value,o=i.modelValue,s=J(Zw(a,o,e.defaultValue||``,e.onChange),2),c=s[0],l=s[1];Ln(`tabs`,{value:c});var u=function(t){var n;(n=e.onAdd)==null||n.call(e,{e:t.e})},d=function(e){l(e)},f=function(t){var n,r=t.e,i=t.value,a=t.index;(n=e.onRemove)==null||n.call(e,{value:i,index:a,e:r})},p=function(){var e=r(`default`);if(!e)return[];var t=function(e){return e.map(function(e){return e.children&&G(e.children)?t(e.children):e}).flat().filter(function(e){return e.type.name===`TTabPanel`})};return t(e)},m=function(){var t,i=((t=e.list)!=null&&t.length?e.list:p())||[],a=r(`action`),o=i.map(function(e){var t=e;return e.props&&Object.keys(e.props).forEach(function(n){t[n]=e.props[n]}),t}),s={theme:e.theme,value:c.value,size:e.size,disabled:e.disabled,placement:e.placement,scrollPosition:e.scrollPosition,addable:e.addable,panels:o,dragSort:e.dragSort,action:a};return B(`div`,{class:W(W({},`${n.value}-tabs__header`,!0),`${n.value}-is-${e.placement}`,!0)},[B(VF,V(s,{onDragSort:e.onDragSort,onChange:d,onAdd:u,onRemove:f}),null)])},h=function(){var t,r=p();if((t=e.list)!=null&&t.length)return e.list.map(function(e){return B(kF,V(e,{onRemove:f}),null)});if(r&&r.length)return B(`div`,{class:[`${n.value}-tabs__content`]},[r])};return function(){return B(`div`,{class:[t.value]},[e.placement===`bottom`?[h(),m()]:[m(),h()]])}}})),UF=Y(kF),WF={content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,icon:{type:Function},popupProps:{type:Object},title:{type:[String,Function]},value:{type:[String,Number]}},GF=z({name:`TFakeArrow`,props:{isActive:{type:Boolean},overlayClassName:{type:[String,Object,Array]},overlayStyle:{type:[Object,String]}},setup:function(e){var t=Q(`fake-arrow`),n=H(function(){return[t.value,W(W({},`${t.value}--transform`,wT()),`${t.value}--active`,e.isActive),e.overlayClassName]});return function(){return B(`svg`,{class:n.value,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e.overlayStyle},[B(`path`,{d:`M3.75 5.7998L7.99274 10.0425L12.2361 5.79921`,stroke:`black`,"stroke-opacity":`0.9`,"stroke-width":`1.3`},null)])}}});function KF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qF(e){for(var t=1;t-1}),x=I(!1),S=I(!1),C=H(function(){return l.value===`light`?`#E7E7E7`:`#383838`}),w=H(function(){return v.value===`popup`?x.value:d?d.value?.includes(e.value):!1}),T=I(!1),E=I(),D=I(),O=I(),k=Q(`slide-down`);Yw(O,C);var A=I(null),j=I(null),M=function(){A.value!==null&&(clearTimeout(A.value),A.value=null),j.value!==null&&(clearTimeout(j.value),j.value=null)},N=function(e){var t=e.placement,n=E.value;if(n){var i=`${r.value}-menu__spacer`,a=t.startsWith(`bottom`),o=t.startsWith(`top`);n.classList.toggle(`${i}--bottom`,a),n.classList.toggle(`${i}--top`,o)}},P=H(function(){return[`${r.value}-submenu`,W(W({},`${r.value}-is-disabled`,e.disabled),`${r.value}-is-opened`,w.value)]}),F=H(function(){return[`${r.value}-menu__popup`,`${r.value}-is-${f?`horizontal`:`vertical`}`,W({},`${r.value}-is-opened`,x.value),e.popupProps?.overlayInnerClassName]}),ee=H(function(){return[`${r.value}-menu--${l.value}`,f&&`${r.value}-is-head-menu`,W({},`${r.value}-menu-is-nested`,T.value),e.popupProps?.overlayClassName]}),te=H(function(){return[`${r.value}-menu__item`,W(W(W({},`${r.value}-is-disabled`,e.disabled),`${r.value}-is-opened`,w.value),`${r.value}-is-active`,b.value)]}),ne=H(function(){return[`${r.value}-menu__sub`,W({},`${r.value}-is-opened`,w.value)]}),re=H(function(){return[W({},`${r.value}-fake-arrow--active`,w.value)]});Ln(`TdSubmenu`,Ft({value:c,addMenuItem:function(e){y.value.push(e),m&&m.addMenuItem(e)},setSubPopup:function(e){D.value=e},closeParentPopup:function(e){M(),j.value=setTimeout(function(){x.value=!1,j.value=null},100),K(g)&&g(e)},cancelHideTimer:function(){j.value!==null&&(clearTimeout(j.value),j.value=null),K(_)&&_()}}));var ie=function(e){K(h)&&h(e)},ae=function(){e.disabled||(M(),K(_)&&_(),A.value=setTimeout(function(){x.value||(p(e.value),Sn().then(function(){ie(E.value)})),x.value=!0,A.value=null},0))},oe=function(e){return e?.classList.contains(`${r.value}-menu__popup`)},se=function(e){M(),j.value=setTimeout(function(){var t=oe(e.relatedTarget);S.value||t||(x.value=!1,j.value=null)},100)},ce=function(e){var t=e.toElement,n=e.relatedTarget,r=t||n;if(r!==D.value){for(var i=function(e){return e===O.value};r!==null&&r!==document&&!i(r);)r=r.parentNode;S.value=!1,i(r)||(M(),j.value=setTimeout(function(){x.value=!1,j.value=null},100),g?.(e))}},le=function(){S.value=!0,j.value!==null&&(clearTimeout(j.value),j.value=null),K(_)&&_()},ue=function(){e.disabled||p(e.value)},de=function(t){var n,i=`right-top`;!T.value&&f&&(i=`bottom-left`);var o=B(`div`,{ref:E,class:[`${r.value}-menu__spacer`,W({},`${r.value}-menu__spacer--left`,T.value||!f)],onMouseenter:le,onMouseleave:ce},[B(`ul`,{class:`${r.value}-menu__popup-wrapper`},[a(`default`,`content`)])]),s={content:function(){return o}},c=((n=e.popupProps)==null||(n=n.popperOptions)==null?void 0:n.modifiers)||[],l=qF(qF({},e.popupProps?.popperOptions),{},{modifiers:[{name:`onPlacementChange`,enabled:!0,phase:`main`,fn:function(e){var t=e.state;N({placement:t.placement})}}].concat(U(c))});return B(OP,V(e.popupProps??{},{overlayInnerClassName:U(F.value),overlayClassName:U(ee.value),visible:x.value,placement:i,popperOptions:l}),qF({default:function(){return[B(`div`,{ref:O,class:te.value},[t])]}},s))},fe=function(){var e=i(`icon`),t=[B(`div`,{ref:O,class:te.value,onClick:ue},[e,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})])]),B(`ul`,{style:`opacity: 0; width: 0; height: 0; overflow: hidden`},[a(`default`,`content`)])],n=v.value===`popup`&&T.value,s=[e,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),B(GF,{overlayClassName:/menu/i.test(o?.parent.proxy.$options.name)?re.value:null,overlayStyle:{transform:`rotate(${n?-90:0}deg)`}},null)];return v.value===`normal`?t:de(s)},pe=function(){for(var e=n.content||n.default,t=i(`icon`),s=a(`default`,`content`),c=o.parent,l=44;c&&c.type.name!==`TMenu`;)c.type.name===`TSubmenu`&&(l+=16),c=c.parent;var u=_w(),d=u.beforeEnter,f=u.enter,p=u.afterEnter,m=u.beforeLeave,h=u.leave,g=u.afterLeave,_=v.value===`popup`&&T.value,y=[B(`div`,{ref:O,class:te.value,onClick:ue},[t,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),e&&B(GF,{overlayClassName:re.value,overlayStyle:{transform:`rotate(${_?-90:0}deg)`}},null)]),B(wo,{name:k.value,onBeforeEnter:d,onEnter:f,onAfterEnter:p,onBeforeLeave:m,onLeave:h,onAfterLeave:g},{default:function(){return[Fn(B(`ul`,{class:ne.value,style:{"--padding-left":`${l}px`}},[s]),[[Ho,w.value]])]}})],b=[t,B(`span`,{class:[`${r.value}-menu__content`]},[i(`title`,{silent:!0})]),B(GF,{overlayClassName:/menu/i.test(c.proxy.$options.name)?re.value:null,overlayStyle:{transform:`rotate(${_?-90:0}deg)`,"margin-left":`auto`}},null)];return v.value===`normal`?y:de(b)};return R(x,function(t){s.open(e.value,t?`add`:`remove`)}),R(E,function(){ie(E.value)}),Fr(function(){var t;s==null||(t=s.vMenu)==null||t.add({value:e.value,parent:m?.value,vnode:n.default});for(var r=o.parent;r&&!/^t(head)?menu/i.test((i=r)?.type.name);){var i;if(/submenu/i.test(r?.type.name)){T.value=!0;break}r=r?.parent}}),Rr(function(){M()}),function(){var e=null,t={},r;return v.value===`popup`&&(t={onMouseenter:ae,onMouseleave:se},u.value.length<2&&(r=B(`div`,{style:`display:none`},[a(`default`,`content`)]))),Object.keys(n).length>0&&(e=f?fe():pe()),B(`li`,V({class:P.value},t),[e,r])}}}),YF=z({name:`PopupOverflowContent`,props:{foldIndex:{type:Number,required:!0}},setup:function(e,t){var n=Q(),r=I(),i=function(){if(r.value){var t=`${n.value}-menu__item`,i=`${n.value}-submenu`,a=[],o=function(e,n){n>3||Array.from(e.children).forEach(function(e){e instanceof HTMLElement&&(e.classList.contains(t)||e.classList.contains(i)?a.push(e):o(e,n+1))})};o(r.value,0),a.forEach(function(t,n){t.style.display=n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. diff --git a/static/index.html b/static/index.html index ec6d72b..82bdf81 100644 --- a/static/index.html +++ b/static/index.html @@ -61,7 +61,7 @@ } catch (e) {} })(); - +