You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
26 KiB

import{C as ut}from"./config-provider-8f3fcf99.js";import{h as rt,R as ot,e as Q,c as O,q as Ie,E as st,d as He,j as $,S as ze,p as ie,m as at,F as it}from"./index-51b73230.js";const En=rt(ut);var vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qe={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t={name:"zh-tw",el:{colorpicker:{confirm:"確認",clear:"清空",defaultLabel:"色彩選擇器",description:"目前色彩為 {color}。按一下 Enter 以選擇新色彩。"},datepicker:{now:"現在",today:"今天",cancel:"取消",clear:"清空",confirm:"確認",dateTablePrompt:"使用方向鍵與 Enter 鍵以選擇日期",monthTablePrompt:"使用方向鍵與 Enter 鍵以選擇月份",yearTablePrompt:"使用方向鍵與 Enter 鍵以選擇年份",selectedDate:"已選日期",selectDate:"選擇日期",selectTime:"選擇時間",startDate:"開始日期",startTime:"開始時間",endDate:"結束日期",endTime:"結束時間",prevYear:"前一年",nextYear:"後一年",prevMonth:"上個月",nextMonth:"下個月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"減少數值",increase:"增加數值"},select:{loading:"載入中",noMatch:"無相符資料",noData:"無資料",placeholder:"請選擇"},dropdown:{toggleDropdown:"切換下拉選單"},cascader:{noMatch:"無相符資料",loading:"載入中",placeholder:"請選擇",noData:"無資料"},pagination:{goto:"前往",pagesize:"項/頁",total:"共 {total} 項",pageClassifier:"頁",page:"頁",prev:"上一頁",next:"下一頁",currentPage:"第 {pager} 頁",prevPages:"向前 {pager} 頁",nextPages:"向后 {pager} 頁",deprecationWarning:"偵測到已過時的使用方式,請參閱 el-pagination 說明文件以了解更多資訊"},dialog:{close:"關閉此對話框"},drawer:{close:"關閉此對話框"},messagebox:{title:"提示",confirm:"確定",cancel:"取消",error:"輸入的資料不符規定!",close:"關閉此對話框"},upload:{deleteTip:"按一下 Delete 鍵以刪除",delete:"刪除",preview:"查看圖片",continue:"繼續上傳"},slider:{defaultLabel:"滑桿介於 {min} 至 {max}",defaultRangeStartLabel:"選擇起始值",defaultRangeEndLabel:"選擇結束值"},table:{emptyText:"暫無資料",confirmFilter:"篩選",resetFilter:"重置",clearFilter:"全部",sumText:"合計"},tree:{emptyText:"暫無資料"},transfer:{noMatch:"無相符資料",noData:"無資料",titles:["列表 1","列表 2"],filterPlaceholder:"請輸入搜尋內容",noCheckedFormat:"共 {total} 項",hasCheckedFormat:"已選 {checked}/{total} 項"},image:{error:"載入失敗"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"確認",cancelButtonText:"取消"}}};e.default=t})(qe);const yn=ct(qe),lt="modulepreload",ft=function(e,t){return new URL(e,t).href},Ae={},Cn=function(t,n,u){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=ft(a,u),a in Ae)return;Ae[a]=!0;const d=a.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(!!u)for(let o=r.length-1;o>=0;o--){const c=r[o];if(c.href===a&&(!d||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${m}`))return;const l=document.createElement("link");if(l.rel=d?"stylesheet":lt,d||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),d)return new Promise((o,c)=>{l.addEventListener("load",o),l.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};/*!
* vue-router v4.1.6
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/const H=typeof window<"u";function ht(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const A=Object.assign;function ce(e,t){const n={};for(const u in t){const r=t[u];n[u]=x(r)?r.map(e):e(r)}return n}const W=()=>{},x=Array.isArray,dt=/\/$/,pt=e=>e.replace(dt,"");function le(e,t,n="/"){let u,r={},a="",d="";const m=t.indexOf("#");let i=t.indexOf("?");return m<i&&m>=0&&(i=-1),i>-1&&(u=t.slice(0,i),a=t.slice(i+1,m>-1?m:t.length),r=e(a)),m>-1&&(u=u||t.slice(0,m),d=t.slice(m,t.length)),u=vt(u??t,n),{fullPath:u+(a&&"?")+a+d,path:u,query:r,hash:d}}function mt(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Pe(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function gt(e,t,n){const u=t.matched.length-1,r=n.matched.length-1;return u>-1&&u===r&&z(t.matched[u],n.matched[r])&&Ge(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function z(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ge(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Et(e[n],t[n]))return!1;return!0}function Et(e,t){return x(e)?Be(e,t):x(t)?Be(t,e):e===t}function Be(e,t){return x(t)?e.length===t.length&&e.every((n,u)=>n===t[u]):e.length===1&&e[0]===t}function vt(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),u=e.split("/");let r=n.length-1,a,d;for(a=0;a<u.length;a++)if(d=u[a],d!==".")if(d==="..")r>1&&r--;else break;return n.slice(0,r).join("/")+"/"+u.slice(a-(a===u.length?1:0)).join("/")}var X;(function(e){e.pop="pop",e.push="push"})(X||(X={}));var Y;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Y||(Y={}));function yt(e){if(!e)if(H){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),pt(e)}const Ct=/^[^#]+#/;function Rt(e,t){return e.replace(Ct,"#")+t}function wt(e,t){const n=document.documentElement.getBoundingClientRect(),u=e.getBoundingClientRect();return{behavior:t.behavior,left:u.left-n.left-(t.left||0),top:u.top-n.top-(t.top||0)}}const ee=()=>({left:window.pageXOffset,top:window.pageYOffset});function At(e){let t;if("el"in e){const n=e.el,u=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?u?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=wt(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Se(e,t){return(history.state?history.state.position-t:-1)+e}const he=new Map;function Pt(e,t){he.set(e,t)}function Bt(e){const t=he.get(e);return he.delete(e),t}let St=()=>location.protocol+"//"+location.host;function Ue(e,t){const{pathname:n,search:u,hash:r}=t,a=e.indexOf("#");if(a>-1){let m=r.includes(e.slice(a))?e.slice(a).length:1,i=r.slice(m);return i[0]!=="/"&&(i="/"+i),Pe(i,"")}return Pe(n,e)+u+r}function bt(e,t,n,u){let r=[],a=[],d=null;const m=({state:f})=>{const g=Ue(e,location),y=n.value,S=t.value;let B=0;if(f){if(n.value=g,t.value=f,d&&d===y){d=null;return}B=S?f.position-S.position:0}else u(g);r.forEach(C=>{C(n.value,y,{delta:B,type:X.pop,direction:B?B>0?Y.forward:Y.back:Y.unknown})})};function i(){d=n.value}function l(f){r.push(f);const g=()=>{const y=r.indexOf(f);y>-1&&r.splice(y,1)};return a.push(g),g}function o(){const{history:f}=window;f.state&&f.replaceState(A({},f.state,{scroll:ee()}),"")}function c(){for(const f of a)f();a=[],window.removeEventListener("popstate",m),window.removeEventListener("beforeunload",o)}return window.addEventListener("popstate",m),window.addEventListener("beforeunload",o),{pauseListeners:i,listen:l,destroy:c}}function be(e,t,n,u=!1,r=!1){return{back:e,current:t,forward:n,replaced:u,position:window.history.length,scroll:r?ee():null}}function Ft(e){const{history:t,location:n}=window,u={value:Ue(e,n)},r={value:t.state};r.value||a(u.value,{back:null,current:u.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,l,o){const c=e.indexOf("#"),f=c>-1?(n.host&&document.querySelector("base")?e:e.slice(c))+i:St()+e+i;try{t[o?"replaceState":"pushState"](l,"",f),r.value=l}catch(g){console.error(g),n[o?"replace":"assign"](f)}}function d(i,l){const o=A({},t.state,be(r.value.back,i,r.value.forward,!0),l,{position:r.value.position});a(i,o,!0),u.value=i}function m(i,l){const o=A({},r.value,t.state,{forward:i,scroll:ee()});a(o.current,o,!0);const c=A({},be(u.value,i,null),{position:o.position+1},l);a(i,c,!1),u.value=i}return{location:u,state:r,push:m,replace:d}}function kt(e){e=yt(e);const t=Ft(e),n=bt(e,t.state,t.location,t.replace);function u(a,d=!0){d||n.pauseListeners(),history.go(a)}const r=A({location:"",base:e,go:u,createHref:Rt.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Rn(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),kt(e)}function Dt(e){return typeof e=="string"||e&&typeof e=="object"}function Ke(e){return typeof e=="string"||typeof e=="symbol"}const L={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ve=Symbol("");var Fe;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Fe||(Fe={}));function q(e,t){return A(new Error,{type:e,[Ve]:!0},t)}function M(e,t){return e instanceof Error&&Ve in e&&(t==null||!!(e.type&t))}const ke="[^/]+?",_t={sensitive:!1,strict:!1,start:!0,end:!0},Ot=/[.+*?^${}()[\]/\\]/g;function xt(e,t){const n=A({},_t,t),u=[];let r=n.start?"^":"";const a=[];for(const l of e){const o=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let c=0;c<l.length;c++){const f=l[c];let g=40+(n.sensitive?.25:0);if(f.type===0)c||(r+="/"),r+=f.value.replace(Ot,"\\$&"),g+=40;else if(f.type===1){const{value:y,repeatable:S,optional:B,regexp:C}=f;a.push({name:y,repeatable:S,optional:B});const w=C||ke;if(w!==ke){g+=10;try{new RegExp(`(${w})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${y}" (${w}): `+_.message)}}let k=S?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;c||(k=B&&l.length<2?`(?:/${k})`:"/"+k),B&&(k+="?"),r+=k,g+=20,B&&(g+=-8),S&&(g+=-20),w===".*"&&(g+=-50)}o.push(g)}u.push(o)}if(n.strict&&n.end){const l=u.length-1;u[l][u[l].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const d=new RegExp(r,n.sensitive?"":"i");function m(l){const o=l.match(d),c={};if(!o)return null;for(let f=1;f<o.length;f++){const g=o[f]||"",y=a[f-1];c[y.name]=g&&y.repeatable?g.split("/"):g}return c}function i(l){let o="",c=!1;for(const f of e){(!c||!o.endsWith("/"))&&(o+="/"),c=!1;for(const g of f)if(g.type===0)o+=g.value;else if(g.type===1){const{value:y,repeatable:S,optional:B}=g,C=y in l?l[y]:"";if(x(C)&&!S)throw new Error(`Provided param "${y}" is an array but it is not repeatable (* or + modifiers)`);const w=x(C)?C.join("/"):C;if(!w)if(B)f.length<2&&(o.endsWith("/")?o=o.slice(0,-1):c=!0);else throw new Error(`Missing required param "${y}"`);o+=w}}return o||"/"}return{re:d,score:u,keys:a,parse:m,stringify:i}}function Tt(e,t){let n=0;for(;n<e.length&&n<t.length;){const u=t[n]-e[n];if(u)return u;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function Mt(e,t){let n=0;const u=e.score,r=t.score;for(;n<u.length&&n<r.length;){const a=Tt(u[n],r[n]);if(a)return a;n++}if(Math.abs(r.length-u.length)===1){if(De(u))return 1;if(De(r))return-1}return r.length-u.length}function De(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Lt={type:0,value:""},jt=/[a-zA-Z0-9_]/;function Nt(e){if(!e)return[[]];if(e==="/")return[[Lt]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${l}": ${g}`)}let n=0,u=n;const r=[];let a;function d(){a&&r.push(a),a=[]}let m=0,i,l="",o="";function c(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:o,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),l="")}function f(){l+=i}for(;m<e.length;){if(i=e[m++],i==="\\"&&n!==2){u=n,n=4;continue}switch(n){case 0:i==="/"?(l&&c(),d()):i===":"?(c(),n=1):f();break;case 4:f(),n=u;break;case 1:i==="("?n=2:jt.test(i)?f():(c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&m--);break;case 2:i===")"?o[o.length-1]=="\\"?o=o.slice(0,-1)+i:n=3:o+=i;break;case 3:c(),n=0,i!=="*"&&i!=="?"&&i!=="+"&&m--,o="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),c(),d(),r}function $t(e,t,n){const u=xt(Nt(e.path),n),r=A(u,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function It(e,t){const n=[],u=new Map;t=xe({strict:!1,end:!0,sensitive:!1},t);function r(o){return u.get(o)}function a(o,c,f){const g=!f,y=Ht(o);y.aliasOf=f&&f.record;const S=xe(t,o),B=[y];if("alias"in o){const k=typeof o.alias=="string"?[o.alias]:o.alias;for(const _ of k)B.push(A({},y,{components:f?f.record.components:y.components,path:_,aliasOf:f?f.record:y}))}let C,w;for(const k of B){const{path:_}=k;if(c&&_[0]!=="/"){const N=c.record.path,T=N[N.length-1]==="/"?"":"/";k.path=c.record.path+(_&&T+_)}if(C=$t(k,c,S),f?f.alias.push(C):(w=w||C,w!==C&&w.alias.push(C),g&&o.name&&!Oe(C)&&d(o.name)),y.children){const N=y.children;for(let T=0;T<N.length;T++)a(N[T],C,f&&f.children[T])}f=f||C,(C.record.components&&Object.keys(C.record.components).length||C.record.name||C.record.redirect)&&i(C)}return w?()=>{d(w)}:W}function d(o){if(Ke(o)){const c=u.get(o);c&&(u.delete(o),n.splice(n.indexOf(c),1),c.children.forEach(d),c.alias.forEach(d))}else{const c=n.indexOf(o);c>-1&&(n.splice(c,1),o.record.name&&u.delete(o.record.name),o.children.forEach(d),o.alias.forEach(d))}}function m(){return n}function i(o){let c=0;for(;c<n.length&&Mt(o,n[c])>=0&&(o.record.path!==n[c].record.path||!Qe(o,n[c]));)c++;n.splice(c,0,o),o.record.name&&!Oe(o)&&u.set(o.record.name,o)}function l(o,c){let f,g={},y,S;if("name"in o&&o.name){if(f=u.get(o.name),!f)throw q(1,{location:o});S=f.record.name,g=A(_e(c.params,f.keys.filter(w=>!w.optional).map(w=>w.name)),o.params&&_e(o.params,f.keys.map(w=>w.name))),y=f.stringify(g)}else if("path"in o)y=o.path,f=n.find(w=>w.re.test(y)),f&&(g=f.parse(y),S=f.record.name);else{if(f=c.name?u.get(c.name):n.find(w=>w.re.test(c.path)),!f)throw q(1,{location:o,currentLocation:c});S=f.record.name,g=A({},c.params,o.params),y=f.stringify(g)}const B=[];let C=f;for(;C;)B.unshift(C.record),C=C.parent;return{name:S,path:y,params:g,matched:B,meta:qt(B)}}return e.forEach(o=>a(o)),{addRoute:a,resolve:l,removeRoute:d,getRoutes:m,getRecordMatcher:r}}function _e(e,t){const n={};for(const u of t)u in e&&(n[u]=e[u]);return n}function Ht(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:zt(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function zt(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const u in e.components)t[u]=typeof n=="boolean"?n:n[u];return t}function Oe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function qt(e){return e.reduce((t,n)=>A(t,n.meta),{})}function xe(e,t){const n={};for(const u in e)n[u]=u in t?t[u]:e[u];return n}function Qe(e,t){return t.children.some(n=>n===e||Qe(e,n))}const We=/#/g,Gt=/&/g,Ut=/\//g,Kt=/=/g,Vt=/\?/g,Ye=/\+/g,Qt=/%5B/g,Wt=/%5D/g,Xe=/%5E/g,Yt=/%60/g,Ze=/%7B/g,Xt=/%7C/g,Je=/%7D/g,Zt=/%20/g;function me(e){return encodeURI(""+e).replace(Xt,"|").replace(Qt,"[").replace(Wt,"]")}function Jt(e){return me(e).replace(Ze,"{").replace(Je,"}").replace(Xe,"^")}function de(e){return me(e).replace(Ye,"%2B").replace(Zt,"+").replace(We,"%23").replace(Gt,"%26").replace(Yt,"`").replace(Ze,"{").replace(Je,"}").replace(Xe,"^")}function en(e){return de(e).replace(Kt,"%3D")}function tn(e){return me(e).replace(We,"%23").replace(Vt,"%3F")}function nn(e){return e==null?"":tn(e).replace(Ut,"%2F")}function J(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function un(e){const t={};if(e===""||e==="?")return t;const u=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<u.length;++r){const a=u[r].replace(Ye," "),d=a.indexOf("="),m=J(d<0?a:a.slice(0,d)),i=d<0?null:J(a.slice(d+1));if(m in t){let l=t[m];x(l)||(l=t[m]=[l]),l.push(i)}else t[m]=i}return t}function Te(e){let t="";for(let n in e){const u=e[n];if(n=en(n),u==null){u!==void 0&&(t+=(t.length?"&":"")+n);continue}(x(u)?u.map(a=>a&&de(a)):[u&&de(u)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function rn(e){const t={};for(const n in e){const u=e[n];u!==void 0&&(t[n]=x(u)?u.map(r=>r==null?null:""+r):u==null?u:""+u)}return t}const on=Symbol(""),Me=Symbol(""),te=Symbol(""),ge=Symbol(""),pe=Symbol("");function V(){let e=[];function t(u){return e.push(u),()=>{const r=e.indexOf(u);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function j(e,t,n,u,r){const a=u&&(u.enterCallbacks[r]=u.enterCallbacks[r]||[]);return()=>new Promise((d,m)=>{const i=c=>{c===!1?m(q(4,{from:n,to:t})):c instanceof Error?m(c):Dt(c)?m(q(2,{from:t,to:c})):(a&&u.enterCallbacks[r]===a&&typeof c=="function"&&a.push(c),d())},l=e.call(u&&u.instances[r],t,n,i);let o=Promise.resolve(l);e.length<3&&(o=o.then(i)),o.catch(c=>m(c))})}function fe(e,t,n,u){const r=[];for(const a of e)for(const d in a.components){let m=a.components[d];if(!(t!=="beforeRouteEnter"&&!a.instances[d]))if(sn(m)){const l=(m.__vccOpts||m)[t];l&&r.push(j(l,n,u,a,d))}else{let i=m();r.push(()=>i.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${d}" at "${a.path}"`));const o=ht(l)?l.default:l;a.components[d]=o;const f=(o.__vccOpts||o)[t];return f&&j(f,n,u,a,d)()}))}}return r}function sn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Le(e){const t=$(te),n=$(ge),u=O(()=>t.resolve(Q(e.to))),r=O(()=>{const{matched:i}=u.value,{length:l}=i,o=i[l-1],c=n.matched;if(!o||!c.length)return-1;const f=c.findIndex(z.bind(null,o));if(f>-1)return f;const g=je(i[l-2]);return l>1&&je(o)===g&&c[c.length-1].path!==g?c.findIndex(z.bind(null,i[l-2])):f}),a=O(()=>r.value>-1&&fn(n.params,u.value.params)),d=O(()=>r.value>-1&&r.value===n.matched.length-1&&Ge(n.params,u.value.params));function m(i={}){return ln(i)?t[Q(e.replace)?"replace":"push"](Q(e.to)).catch(W):Promise.resolve()}return{route:u,href:O(()=>u.value.href),isActive:a,isExactActive:d,navigate:m}}const an=He({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"}},useLink:Le,setup(e,{slots:t}){const n=Ie(Le(e)),{options:u}=$(te),r=O(()=>({[Ne(e.activeClass,u.linkActiveClass,"router-link-active")]:n.isActive,[Ne(e.exactActiveClass,u.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:ze("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}}),cn=an;function ln(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){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function fn(e,t){for(const n in t){const u=t[n],r=e[n];if(typeof u=="string"){if(u!==r)return!1}else if(!x(r)||r.length!==u.length||u.some((a,d)=>a!==r[d]))return!1}return!0}function je(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ne=(e,t,n)=>e??t??n,hn=He({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const u=$(pe),r=O(()=>e.route||u.value),a=$(Me,0),d=O(()=>{let l=Q(a);const{matched:o}=r.value;let c;for(;(c=o[l])&&!c.components;)l++;return l}),m=O(()=>r.value.matched[d.value]);ie(Me,O(()=>d.value+1)),ie(on,m),ie(pe,r);const i=at();return it(()=>[i.value,m.value,e.name],([l,o,c],[f,g,y])=>{o&&(o.instances[c]=l,g&&g!==o&&l&&l===f&&(o.leaveGuards.size||(o.leaveGuards=g.leaveGuards),o.updateGuards.size||(o.updateGuards=g.updateGuards))),l&&o&&(!g||!z(o,g)||!f)&&(o.enterCallbacks[c]||[]).forEach(S=>S(l))},{flush:"post"}),()=>{const l=r.value,o=e.name,c=m.value,f=c&&c.components[o];if(!f)return $e(n.default,{Component:f,route:l});const g=c.props[o],y=g?g===!0?l.params:typeof g=="function"?g(l):g:null,B=ze(f,A({},y,t,{onVnodeUnmounted:C=>{C.component.isUnmounted&&(c.instances[o]=null)},ref:i}));return $e(n.default,{Component:B,route:l})||B}}});function $e(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const dn=hn;function wn(e){const t=It(e.routes,e),n=e.parseQuery||un,u=e.stringifyQuery||Te,r=e.history,a=V(),d=V(),m=V(),i=ot(L);let l=L;H&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const o=ce.bind(null,s=>""+s),c=ce.bind(null,nn),f=ce.bind(null,J);function g(s,p){let h,E;return Ke(s)?(h=t.getRecordMatcher(s),E=p):E=s,t.addRoute(E,h)}function y(s){const p=t.getRecordMatcher(s);p&&t.removeRoute(p)}function S(){return t.getRoutes().map(s=>s.record)}function B(s){return!!t.getRecordMatcher(s)}function C(s,p){if(p=A({},p||i.value),typeof s=="string"){const v=le(n,s,p.path),F=t.resolve({path:v.path},p),K=r.createHref(v.fullPath);return A(v,F,{params:f(F.params),hash:J(v.hash),redirectedFrom:void 0,href:K})}let h;if("path"in s)h=A({},s,{path:le(n,s.path,p.path).path});else{const v=A({},s.params);for(const F in v)v[F]==null&&delete v[F];h=A({},s,{params:c(s.params)}),p.params=c(p.params)}const E=t.resolve(h,p),P=s.hash||"";E.params=o(f(E.params));const b=mt(u,A({},s,{hash:Jt(P),path:E.path})),R=r.createHref(b);return A({fullPath:b,hash:P,query:u===Te?rn(s.query):s.query||{}},E,{redirectedFrom:void 0,href:R})}function w(s){return typeof s=="string"?le(n,s,i.value.path):A({},s)}function k(s,p){if(l!==s)return q(8,{from:p,to:s})}function _(s){return G(s)}function N(s){return _(A(w(s),{replace:!0}))}function T(s){const p=s.matched[s.matched.length-1];if(p&&p.redirect){const{redirect:h}=p;let E=typeof h=="function"?h(s):h;return typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=w(E):{path:E},E.params={}),A({query:s.query,hash:s.hash,params:"path"in E?{}:s.params},E)}}function G(s,p){const h=l=C(s),E=i.value,P=s.state,b=s.force,R=s.replace===!0,v=T(h);if(v)return G(A(w(v),{state:typeof v=="object"?A({},P,v.state):P,force:b,replace:R}),p||h);const F=h;F.redirectedFrom=p;let K;return!b&&gt(u,E,h)&&(K=q(16,{to:F,from:E}),Re(E,E,!0,!1)),(K?Promise.resolve(K):Ee(F,E)).catch(D=>M(D)?M(D,2)?D:re(D):ue(D,F,E)).then(D=>{if(D){if(M(D,2))return G(A({replace:R},w(D.to),{state:typeof D.to=="object"?A({},P,D.to.state):P,force:b}),p||F)}else D=ye(F,E,!0,R,P);return ve(F,E,D),D})}function et(s,p){const h=k(s,p);return h?Promise.reject(h):Promise.resolve()}function Ee(s,p){let h;const[E,P,b]=pn(s,p);h=fe(E.reverse(),"beforeRouteLeave",s,p);for(const v of E)v.leaveGuards.forEach(F=>{h.push(j(F,s,p))});const R=et.bind(null,s,p);return h.push(R),I(h).then(()=>{h=[];for(const v of a.list())h.push(j(v,s,p));return h.push(R),I(h)}).then(()=>{h=fe(P,"beforeRouteUpdate",s,p);for(const v of P)v.updateGuards.forEach(F=>{h.push(j(F,s,p))});return h.push(R),I(h)}).then(()=>{h=[];for(const v of s.matched)if(v.beforeEnter&&!p.matched.includes(v))if(x(v.beforeEnter))for(const F of v.beforeEnter)h.push(j(F,s,p));else h.push(j(v.beforeEnter,s,p));return h.push(R),I(h)}).then(()=>(s.matched.forEach(v=>v.enterCallbacks={}),h=fe(b,"beforeRouteEnter",s,p),h.push(R),I(h))).then(()=>{h=[];for(const v of d.list())h.push(j(v,s,p));return h.push(R),I(h)}).catch(v=>M(v,8)?v:Promise.reject(v))}function ve(s,p,h){for(const E of m.list())E(s,p,h)}function ye(s,p,h,E,P){const b=k(s,p);if(b)return b;const R=p===L,v=H?history.state:{};h&&(E||R?r.replace(s.fullPath,A({scroll:R&&v&&v.scroll},P)):r.push(s.fullPath,P)),i.value=s,Re(s,p,h,R),re()}let U;function tt(){U||(U=r.listen((s,p,h)=>{if(!we.listening)return;const E=C(s),P=T(E);if(P){G(A(P,{replace:!0}),E).catch(W);return}l=E;const b=i.value;H&&Pt(Se(b.fullPath,h.delta),ee()),Ee(E,b).catch(R=>M(R,12)?R:M(R,2)?(G(R.to,E).then(v=>{M(v,20)&&!h.delta&&h.type===X.pop&&r.go(-1,!1)}).catch(W),Promise.reject()):(h.delta&&r.go(-h.delta,!1),ue(R,E,b))).then(R=>{R=R||ye(E,b,!1),R&&(h.delta&&!M(R,8)?r.go(-h.delta,!1):h.type===X.pop&&M(R,20)&&r.go(-1,!1)),ve(E,b,R)}).catch(W)}))}let ne=V(),Ce=V(),Z;function ue(s,p,h){re(s);const E=Ce.list();return E.length?E.forEach(P=>P(s,p,h)):console.error(s),Promise.reject(s)}function nt(){return Z&&i.value!==L?Promise.resolve():new Promise((s,p)=>{ne.add([s,p])})}function re(s){return Z||(Z=!s,tt(),ne.list().forEach(([p,h])=>s?h(s):p()),ne.reset()),s}function Re(s,p,h,E){const{scrollBehavior:P}=e;if(!H||!P)return Promise.resolve();const b=!h&&Bt(Se(s.fullPath,0))||(E||!h)&&history.state&&history.state.scroll||null;return st().then(()=>P(s,p,b)).then(R=>R&&At(R)).catch(R=>ue(R,s,p))}const oe=s=>r.go(s);let se;const ae=new Set,we={currentRoute:i,listening:!0,addRoute:g,removeRoute:y,hasRoute:B,getRoutes:S,resolve:C,options:e,push:_,replace:N,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:a.add,beforeResolve:d.add,afterEach:m.add,onError:Ce.add,isReady:nt,install(s){const p=this;s.component("RouterLink",cn),s.component("RouterView",dn),s.config.globalProperties.$router=p,Object.defineProperty(s.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(i)}),H&&!se&&i.value===L&&(se=!0,_(r.location).catch(P=>{}));const h={};for(const P in L)h[P]=O(()=>i.value[P]);s.provide(te,p),s.provide(ge,Ie(h)),s.provide(pe,i);const E=s.unmount;ae.add(s),s.unmount=function(){ae.delete(s),ae.size<1&&(l=L,U&&U(),U=null,i.value=L,se=!1,Z=!1),E()}}};return we}function I(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function pn(e,t){const n=[],u=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let d=0;d<a;d++){const m=t.matched[d];m&&(e.matched.find(l=>z(l,m))?u.push(m):n.push(m));const i=e.matched[d];i&&(t.matched.find(l=>z(l,i))||r.push(i))}return[n,u,r]}function An(){return $(te)}function Pn(){return $(ge)}export{En as E,Cn as _,wn as a,An as b,Rn as c,vn as d,ct as g,Pn as u,yn as z};