
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.github.io
 */

import{d as D,N as O,u as M,n as $,i as w,g as b,z as C,w as _,b as F,c as I,s as B,F as H,ad as L,A as V,h as U,t as z,l as G}from"./index-nGFMSQGw.js";import q from"./index-CeCYhShg.js";import{_ as J}from"./item.vue_vue_type_script_setup_true_lang-B8QwDp3s.js";function K(t){for(var a=[],e=0;e<t.length;){var u=t[e];if(u==="*"||u==="+"||u==="?"){a.push({type:"MODIFIER",index:e,value:t[e++]});continue}if(u==="\\"){a.push({type:"ESCAPED_CHAR",index:e++,value:t[e++]});continue}if(u==="{"){a.push({type:"OPEN",index:e,value:t[e++]});continue}if(u==="}"){a.push({type:"CLOSE",index:e,value:t[e++]});continue}if(u===":"){for(var d="",r=e+1;r<t.length;){var i=t.charCodeAt(r);if(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||i===95){d+=t[r++];continue}break}if(!d)throw new TypeError("Missing parameter name at ".concat(e));a.push({type:"NAME",index:e,value:d}),e=r;continue}if(u==="("){var f=1,o="",r=e+1;if(t[r]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(r));for(;r<t.length;){if(t[r]==="\\"){o+=t[r++]+t[r++];continue}if(t[r]===")"){if(f--,f===0){r++;break}}else if(t[r]==="("&&(f++,t[r+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(r));o+=t[r++]}if(f)throw new TypeError("Unbalanced pattern at ".concat(e));if(!o)throw new TypeError("Missing pattern at ".concat(e));a.push({type:"PATTERN",index:e,value:o}),e=r;continue}a.push({type:"CHAR",index:e,value:t[e++]})}return a.push({type:"END",index:e,value:""}),a}function Q(t,a){a===void 0&&(a={});for(var e=K(t),u=a.prefixes,d=u===void 0?"./":u,r="[^".concat(Y(a.delimiter||"/#?"),"]+?"),i=[],f=0,o=0,s="",c=function(v){if(o<e.length&&e[o].type===v)return e[o++].value},n=function(v){var x=c(v);if(x!==void 0)return x;var A=e[o],P=A.type,S=A.index;throw new TypeError("Unexpected ".concat(P," at ").concat(S,", expected ").concat(v))},l=function(){for(var v="",x;x=c("CHAR")||c("ESCAPED_CHAR");)v+=x;return v};o<e.length;){var m=c("CHAR"),E=c("NAME"),h=c("PATTERN");if(E||h){var p=m||"";d.indexOf(p)===-1&&(s+=p,p=""),s&&(i.push(s),s=""),i.push({name:E||f++,prefix:p,suffix:"",pattern:h||r,modifier:c("MODIFIER")||""});continue}var y=m||c("ESCAPED_CHAR");if(y){s+=y;continue}s&&(i.push(s),s="");var N=c("OPEN");if(N){var p=l(),T=c("NAME")||"",g=c("PATTERN")||"",R=l();n("CLOSE"),i.push({name:T||(g?f++:""),pattern:T&&!g?r:g,prefix:p,suffix:R,modifier:c("MODIFIER")||""});continue}n("END")}return i}function W(t,a){return X(Q(t,a),a)}function X(t,a){a===void 0&&(a={});var e=Z(a),u=a.encode,d=u===void 0?function(o){return o}:u,r=a.validate,i=r===void 0?!0:r,f=t.map(function(o){if(typeof o=="object")return new RegExp("^(?:".concat(o.pattern,")$"),e)});return function(o){for(var s="",c=0;c<t.length;c++){var n=t[c];if(typeof n=="string"){s+=n;continue}var l=o?o[n.name]:void 0,m=n.modifier==="?"||n.modifier==="*",E=n.modifier==="*"||n.modifier==="+";if(Array.isArray(l)){if(!E)throw new TypeError('Expected "'.concat(n.name,'" to not repeat, but got an array'));if(l.length===0){if(m)continue;throw new TypeError('Expected "'.concat(n.name,'" to not be empty'))}for(var h=0;h<l.length;h++){var p=d(l[h],n);if(i&&!f[c].test(p))throw new TypeError('Expected all "'.concat(n.name,'" to match "').concat(n.pattern,'", but got "').concat(p,'"'));s+=n.prefix+p+n.suffix}continue}if(typeof l=="string"||typeof l=="number"){var p=d(String(l),n);if(i&&!f[c].test(p))throw new TypeError('Expected "'.concat(n.name,'" to match "').concat(n.pattern,'", but got "').concat(p,'"'));s+=n.prefix+p+n.suffix;continue}if(!m){var y=E?"an array":"a string";throw new TypeError('Expected "'.concat(n.name,'" to be ').concat(y))}}return s}}function Y(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Z(t){return t&&t.sensitive?"":"i"}const j=D({__name:"index",setup(t){const a=O(),e=M(),u=$(()=>{const r=[];return e.settings.home.enable&&r.push({path:e.settings.home.fullPath,title:e.settings.home.title}),a.meta.breadcrumbNeste&&a.meta.breadcrumbNeste.forEach(i=>{i.hide===!1&&r.push({path:i.path,title:i.title})}),r});function d(r){return W(r)(a.params)}return(r,i)=>w(e).mode==="pc"&&w(e).settings.app.routeBaseOn!=="filesystem"?(b(),C(q,{key:0,class:"breadcrumb whitespace-nowrap px-2"},{default:_(()=>[F(L,{name:"breadcrumb"},{default:_(()=>[(b(!0),I(H,null,B(w(u),(f,o)=>(b(),C(J,{key:`${o}_${f.path}_${f.title}`,to:o<w(u).length-1&&f.path!==""?d(f.path):""},{default:_(()=>[U(z(f.title),1)]),_:2},1032,["to"]))),128))]),_:1})]),_:1})):V("",!0)}}),re=G(j,[["__scopeId","data-v-3d594f3a"]]);export{re as default};
