Files
maingate/console/static/js/617.ef9b57b1.chunk.js
2023-05-24 12:16:03 +09:00

1 line
6.1 KiB
JavaScript

"use strict";(self.webpackChunkmaingate_console=self.webpackChunkmaingate_console||[]).push([[617],{12582:function(e,n,t){t.r(n),t.d(n,{default:function(){return U}});var s=t(47313),c=t(1413),a=t(58467),r=[{path:"/",exact:!0,name:"Home"},{path:"/services",name:"\uc11c\ube44\uc2a4",element:s.lazy((function(){return Promise.all([t.e(691),t.e(491),t.e(348)]).then(t.bind(t,83348))}))},{path:"/services/add",name:"\uc11c\ube44\uc2a4 \ucd94\uac00",element:s.lazy((function(){return Promise.all([t.e(691),t.e(491),t.e(297)]).then(t.bind(t,86297))}))},{path:"/services/update",name:"\uc11c\ube44\uc2a4 \uc218\uc815",element:s.lazy((function(){return Promise.all([t.e(691),t.e(491),t.e(340)]).then(t.bind(t,68340))}))},{path:"/whitelists",name:"\ud654\uc774\ud2b8\ub9ac\uc2a4\ud2b8",element:s.lazy((function(){return Promise.all([t.e(691),t.e(491),t.e(18)]).then(t.bind(t,56018))}))},{path:"/accounts",name:"\uacc4\uc815",element:s.lazy((function(){return Promise.all([t.e(691),t.e(664)]).then(t.bind(t,41664))}))}],i=t(27998),o=t(46417),l=function(){var e=(0,a.TH)().pathname,n=function(e){var n=[];return e.split("/").reduce((function(e,t,s,c){var a="".concat(e,"/").concat(t),i=function(e,n){var t=n.find((function(n){return n.path===e}));return!!t&&t.name}(a,r);return i&&n.push({pathname:a,name:i,active:s+1===c.length}),a})),n}(e);return(0,o.jsxs)(i.fj,{className:"m-0 ms-2",children:[(0,o.jsx)(i.Sd,{href:"".concat("https://auth.action2quare.com/console","/#/services"),children:"Home"}),n.map((function(e,n){return(0,s.createElement)(i.Sd,(0,c.Z)((0,c.Z)({},e.active?{active:!0}:{href:"".concat("https://auth.action2quare.com/console","/#")+e.pathname}),{},{key:n}),e.name)}))]})},m=s.memo(l),u=function(){return(0,o.jsx)(i.KB,{lg:!0,children:(0,o.jsx)(s.Suspense,{fallback:(0,o.jsx)(i.LQ,{color:"primary"}),children:(0,o.jsxs)(a.Z5,{children:[r.map((function(e,n){return e.element&&(0,o.jsx)(a.AW,{path:e.path,element:(0,o.jsx)(e.element,{})},n)})),(0,o.jsx)(a.AW,{path:"/",element:(0,o.jsx)(a.Fg,{to:"login",replace:!0})}),(0,o.jsx)(a.AW,{path:"*",element:(0,o.jsx)(a.Fg,{to:"404",replace:!0})})]})})})},d=s.memo(u),h=function(){return(0,o.jsxs)(i.pG,{children:[(0,o.jsx)("div",{children:(0,o.jsxs)("span",{className:"ms-1",children:["COPYRIGHT(C)\xa0",(0,o.jsx)("a",{href:"https://www.action2quare.com",target:"_blank",rel:"noopener noreferrer",children:"ACTION SQUARE"}),"\xa0CO., LTD. ALL RIGHTS RESERVED."]})}),(0,o.jsxs)("div",{children:["VERSION ","0.0.1"]})]})},p=s.memo(h),x=t(74165),f=t(15861),j=t(85554),v=t(22370),b=t(28320),g=t(65328),N=t(30657),w=function(){var e=(0,j.I0)(),n=(0,a.s0)(),t=(0,N.kq)(),c=(0,N.Fp)(),r=c.instance,l=c.accounts,u=(0,j.v9)((function(e){return{sidebarShow:e.sidebarShow,picture:e.picture}})),d=u.sidebarShow,h=u.picture;function p(){return(p=(0,f.Z)((0,x.Z)().mark((function n(){return(0,x.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e({type:"set",accessToken:"",picture:""}),n.next=3,r.logoutRedirect();case 3:case"end":return n.stop()}}),n)})))).apply(this,arguments)}return(0,s.useEffect)((function(){t||n("/login")}),[]),(0,o.jsxs)(i.PO,{position:"sticky",className:"mb-4",children:[(0,o.jsxs)(i.KB,{fluid:!0,children:[(0,o.jsx)(i.X4,{className:"ps-1",onClick:function(){return e({type:"set",sidebarShow:!d})},children:(0,o.jsx)(v.Z,{icon:b.N,size:"lg"})}),(0,o.jsx)(i.g3,{className:"ms-3",children:(0,o.jsxs)(i.w5,{variant:"nav-item",children:[(0,o.jsxs)(i.SQ,{placement:"bottom-end",className:"py-0",caret:!1,children:[h&&(0,o.jsx)(i.cU,{src:h,size:"md",className:"me-2"}),l.length>0&&l[0].name]}),(0,o.jsxs)(i.$H,{className:"pt-0",placement:"bottom-end",children:[(0,o.jsx)(i.nR,{className:"bg-light fw-semibold py-2",children:"Account"}),(0,o.jsxs)(i.$f,{href:"javascript:void(0);",onClick:function(){return p.apply(this,arguments)},children:[(0,o.jsx)(v.Z,{icon:g.V,className:"me-2"}),"\ub85c\uadf8\uc544\uc6c3"]})]})]})})]}),(0,o.jsx)(i.rc,{}),(0,o.jsx)(i.KB,{fluid:!0,children:(0,o.jsx)(m,{})})]})},y=t(44925),Z=t(21330),k=["component","name","badge","icon"],S=["component","name","icon","to"],C=function(e){var n=e.items,t=(0,a.TH)(),r=function(e,n,t){return(0,o.jsxs)(o.Fragment,{children:[n&&n,e&&e,t&&(0,o.jsx)(i.C_,{color:t.color,className:"ms-auto",children:t.text})]})},l=function(e,n){var t=e.component,a=e.name,i=e.badge,o=e.icon,l=(0,y.Z)(e,k),m=t;return(0,s.createElement)(m,(0,c.Z)((0,c.Z)({},l.to&&!l.items&&{component:Z.OL}),{},{key:n},l),r(a,o,i))},m=function e(n,s){var a,i=n.component,m=n.name,u=n.icon,d=n.to,h=(0,y.Z)(n,S),p=i;return(0,o.jsx)(p,(0,c.Z)((0,c.Z)({idx:String(s),toggler:r(m,u),visible:t.pathname.startsWith(d)},h),{},{children:null===(a=n.items)||void 0===a?void 0:a.map((function(n,t){return n.items?e(n,t):l(n,t)}))}),s)};return(0,o.jsx)(s.Fragment,{children:n&&n.map((function(e,n){return e.items?m(e,n):l(e,n)}))})},T=t(41795),z=(t(98996),t(35544)),E=t(71226),H=t(99195),R=[{component:i.fd,name:"Home"},{component:i.U6,name:"\uc11c\ube44\uc2a4",to:"/services",icon:(0,o.jsx)(v.Z,{icon:z.s,customClassName:"nav-icon"})},{component:i.U6,name:"\ud654\uc774\ud2b8\ub9ac\uc2a4\ud2b8",to:"/whitelists",icon:(0,o.jsx)(v.Z,{icon:E.y,customClassName:"nav-icon"})},{component:i.U6,name:"\uacc4\uc815",to:"/accounts",icon:(0,o.jsx)(v.Z,{icon:H.d,customClassName:"nav-icon"})}],A=function(){var e=(0,j.I0)(),n=(0,j.v9)((function(e){return e.sidebarUnfoldable})),t=(0,j.v9)((function(e){return e.sidebarShow}));return(0,o.jsxs)(i.z3,{position:"fixed",unfoldable:n,visible:t,onVisibleChange:function(n){e({type:"set",sidebarShow:n})},children:[(0,o.jsxs)(i.Dl,{className:"d-none d-md-flex",to:"/",children:[(0,o.jsx)("h3",{className:"sidebar-brand-full",children:"Techcore"}),(0,o.jsx)("h3",{className:"sidebar-brand-narrow",children:"T"})]}),(0,o.jsx)(i.Xk,{children:(0,o.jsx)(T.Z,{children:(0,o.jsx)(C,{items:R})})}),(0,o.jsx)(i.iv,{className:"d-none d-lg-flex",onClick:function(){return e({type:"set",sidebarUnfoldable:!n})}})]})},P=s.memo(A),U=function(){return(0,o.jsxs)("div",{children:[(0,o.jsx)(P,{}),(0,o.jsxs)("div",{className:"wrapper d-flex flex-column min-vh-100 bg-light",children:[(0,o.jsx)(w,{}),(0,o.jsx)("div",{className:"body flex-grow-1 px-3",children:(0,o.jsx)(d,{})}),(0,o.jsx)(p,{})]})]})}}}]);