1import{v as m}from"./main.BcZFamhR.js";import"./_plugin-vue_export-helper.JK7gpmAW.js";import"./vendor.BjW0zFP3.js";import"./userStore.BEVy7xRr.js";import"./utils.Cj7E1OwU.js";function A(o,e=[],l=null){const a=[],i=new Set(e);function s(t){const r={menuCd:t.menuCd||t.menu_cd,menuNm:t.menuNm||t.menu_nm,menuLvl:t.menuLvl||t.menu_lvl,lnkgUrlAddr:t.lnkgUrlAddr||t.lnkg_url_addr,lnkgUrlNm:t.lnkgUrlNm||t.lnkg_url_nm,lnkgUrlPath:t.lnkgUrlPath||t.lnkg_url_path,lnkKnd:t.lnkKnd||t.lnk_knd||"U",useYn:t.useYn||t.use_yn||"Y",delYn:t.delYn||t.del_yn||"N",pstgYn:t.pstgYn||t.pstg_yn||"Y",rltUrlAddr:t.rltUrlAddr||t.rlt_url_addr,children:t.children||[]};if(r.delYn==="Y"||r.useYn==="N"){r.children.length>0&&r.children.forEach(n=>s(n));return}if(r.lnkgUrlAddr&&r.lnkgUrlPath){const{path:n,query:d}=k(r.lnkgUrlAddr);if(n&&!i.has(n)){if(m(n)){r.children.length>0&&r.children.forEach(f=>s(f));return}i.add(n);const p=t.lnkKnd==="C"?t.lnkVl||t.lnk_vl:d.pstatSn||null,u=t.lnkKnd==="B"?t.lnkVl||t.lnk_vl:null;a.push({path:n,name:c(n),component:r.lnkgUrlPath,meta:{menuCd:r.menuCd,menuNm:r.menuNm,title:h(r.menuCd,l),pstatSn:p,bbsSn:u,sttSn:d.sttSn||null,defaultQuery:Object.keys(d).length>0?d:null,subTitle:r.menuNm,menuPath:r.menuCd}})}}if(r.rltUrlAddr)try{const n=typeof r.rltUrlAddr=="string"?JSON.parse(r.rltUrlAddr):r.rltUrlAddr;Array.isArray(n)&&n.forEach(d=>{d.path&&d.component&&!i.has(d.path)&&(i.add(d.path),a.push({path:d.path,name:c(d.path),component:d.component,meta:{menuCd:r.menuCd,menuNm:r.menuNm,parentRoute:r.lnkgUrlAddr,title:h(r.menuCd,l),subTitle:r.menuNm,menuPath:r.menuCd}}))})}catch{}r.children.length>0&&r.children.forEach(n=>s(n))}return o.forEach(t=>s(t)),a}function c(o){return o?o.split("/").filter(e=>e).map(e=>{if(e.startsWith(":")){const l=e.substring(1);return"By"+l.charAt(0).toUpperCase()+l.slice(1)}return e.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1).toLowerCase()).join("")}).join("")||"Route":"Unknown"}function h(o,e){if(!o||!e||e.size===0)return"";const l=o.substring(0,6);return e.get(l)?.menuNm||""}function k(o){if(!o)return{path:null,query:{}};const[e,l]=o.split("?"),a={};return l&&l.split("&").forEach(i=>{const[s,t]=i.split("=");s&&(a[s]=decodeURIComponent(t||""))}),{path:e,query:a}}export{A as extractRoutesFromMenuTree};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.