/*! For license information please see 6.56d056cf.chunk.js.LICENSE.txt */ (this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6],{655:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&this.changeListeners.splice(t,1)},e}(),b=n(21),j=n(637),v=i.a.lazy((function(){return n.e(9).then(n.bind(null,771))})),x=i.a.lazy((function(){return Promise.all([n.e(5),n.e(7)]).then(n.bind(null,772))})),O=i.a.lazy((function(){return n.e(8).then(n.bind(null,773))})),y=i.a.lazy((function(){return n.e(14).then(n.bind(null,774))})),g=[{path:"/",exact:!0,name:"Home"},{path:"/dashboard",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",component:v},{path:"/reports",exact:!0,name:"\u30ec\u30dd\u30fc\u30c8",component:x},{path:"/uploader",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:O},{path:"/secret",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:y}],S=n(18),w=Object(S.jsx)("div",{className:"pt-3 text-center",children:Object(S.jsx)("div",{className:"sk-spinner sk-spinner-pulse",children:" "})}),N=function(){var e=Object(r.useState)(""),t=Object(u.a)(e,2),n=t[0],i=t[1],a=Object(r.useState)(""),l=Object(u.a)(a,2),h=l[0],p=l[1];function f(){return(f=Object(c.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d()("https://fsbsso.sumasen.net/Shibboleth.sso/Session");case 2:t=e.sent,i(t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(){return(v=Object(c.a)(o.a.mark((function e(){var t,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.attributes[0].values[0],console.log(t),"FBS","api","c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8",e.next=7,d.a.get("https://api.ts.bizside.biz/api/v7/FBS/users?email="+t,{auth:{username:"api",password:"c558a56c63c44f65956adde8863ecc3558f3e55a465d4338bb2e7d2692866fd8"}});case 7:r=e.sent,p(r);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(){if(localStorage.setItem("state","off"),void 0===(new m).get("_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468"))return null;(function(){return f.apply(this,arguments)})().then((function(){console.log("fetch session"),n.length>0&&function(){return v.apply(this,arguments)}().then((function(){return console.log("requesting user data"),console.log(h),!0}))}))}return Object(S.jsxs)("main",{className:"c-main",children:[Object(S.jsx)(j.l,{fluid:!0,children:Object(S.jsxs)(r.Suspense,{fallback:w,children:[Object(S.jsxs)(b.d,{children:[" ",g.map((function(e,t){return e.component&&Object(S.jsx)(b.b,{path:e.path,exact:e.exact,name:e.name,render:function(t){return null!==x()?Object(S.jsx)(e.component,Object(s.a)({},t)):Object(S.jsx)(b.a,{to:{pathname:"/sso"}})}},t)})),Object(S.jsx)(b.a,{from:"/",to:"/dashboard"})]})," "]})})," "]})},C=i.a.memo(N),k=function(){return Object(S.jsxs)(j.r,{fixed:!1,children:[Object(S.jsxs)("div",{children:[Object(S.jsx)("a",{href:"sumasen.net",target:"_blank",rel:"noopener noreferrer",children:"FBS"}),Object(S.jsx)("span",{className:"ml-1",children:"\xa9 2021 DigitalVox."})]}),Object(S.jsxs)("div",{className:"mfs-auto",children:[Object(S.jsx)("span",{className:"mr-1",children:"\u642d\u8f09"}),Object(S.jsx)("a",{href:"#",target:"_blank",rel:"noopener noreferrer",children:"DigitalVox"})]})]})},_=i.a.memo(k),E=n(166),T=n(636),A=function(){var e=Object(E.b)(),t=Object(E.c)((function(e){return e.sidebarShow}));return Object(S.jsxs)(j.u,{withSubheader:!0,children:[Object(S.jsx)(j.V,{inHeader:!0,className:"ml-md-3 d-lg-none",onClick:function(){var n=!![!1,"responsive"].includes(t)||"responsive";e({type:"set",sidebarShow:n})}}),Object(S.jsx)(j.V,{inHeader:!0,className:"ml-3 d-md-down-none",onClick:function(){var n=![!0,"responsive"].includes(t)&&"responsive";e({type:"set",sidebarShow:n})}}),Object(S.jsx)(j.v,{className:"mx-auto d-lg-none",to:"/",children:Object(S.jsx)("h2",{children:"FBS"})}),Object(S.jsx)(j.w,{className:"d-md-down-none mr-auto",children:Object(S.jsx)(j.x,{className:"px-3",children:Object(S.jsx)(j.y,{to:"/dashboard",children:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9"})})}),Object(S.jsx)(j.w,{className:"px-3",children:Object(S.jsx)(I,{})}),Object(S.jsx)(j.U,{className:"px-3 justify-content-between",children:Object(S.jsx)(j.d,{className:"border-0 c-subheader-nav m-0 px-0 px-md-3",routes:g})})]})},I=function(){return Object(S.jsxs)(j.n,{inNav:!0,className:"c-header-nav-items mx-2",direction:"down",children:[Object(S.jsx)(j.q,{className:"c-header-nav-link",caret:!1,children:"\u30a2\u30ab\u30a6\u30f3\u30c8"}),Object(S.jsxs)(j.p,{className:"pt-0",placement:"bottom-end",children:[Object(S.jsx)(j.o,{header:!0,tag:"div",color:"light",className:"text-center",children:Object(S.jsx)("strong",{children:"\u30a2\u30ab\u30a6\u30f3\u30c8"})}),Object(S.jsxs)(j.o,{onClick:function(){console.log("launch sso"),window.open("https://fsbsso.sumasen.net/Shibboleth.sso/Login","_self")},children:[Object(S.jsx)(T.a,{name:"cil-bell",className:"mfe-2"}),"SSO \u30ed\u30b0\u30a4\u30f3"]})]})]})},D=[{_tag:"CSidebarNavItem",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",to:"/dashboard",icon:Object(S.jsx)(T.a,{name:"cil-speedometer",customClasses:"c-sidebar-nav-icon"})},{_tag:"CSidebarNavTitle",_children:["\u30ec\u30dd\u30fc\u30c8"]},{_tag:"CSidebarNavItem",name:"\u5831\u544a\u66f8",to:"/reports",icon:"cil-drop"},{_tag:"CSidebarNavItem",name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",to:"/uploader",icon:"cil-drop"}],L=function(){var e=Object(E.b)(),t=Object(E.c)((function(e){return e.sidebarShow}));return Object(S.jsxs)(j.M,{show:t,onShowChange:function(t){return e({type:"set",sidebarShow:t})},children:[Object(S.jsxs)(j.N,{className:"d-md-down-none",to:"/",children:[Object(S.jsx)("h2",{children:"FBS"}),Object(S.jsx)(T.a,{className:"c-sidebar-brand-minimized",name:"sygnet",height:35})]}),Object(S.jsx)(j.P,{children:Object(S.jsx)(j.m,{items:D,components:{CSidebarNavDivider:j.Q,CSidebarNavDropdown:j.R,CSidebarNavItem:j.S,CSidebarNavTitle:j.T}})}),Object(S.jsx)(j.O,{className:"c-d-md-down-none"})]})},U=i.a.memo(L);t.default=function(){return Object(S.jsxs)("div",{className:"c-app c-default-layout",children:[Object(S.jsx)(U,{}),Object(S.jsxs)("div",{className:"c-wrapper",children:[Object(S.jsx)(A,{}),Object(S.jsx)("div",{className:"c-body",children:Object(S.jsx)(C,{})}),Object(S.jsx)(_,{})]})]})}}}]); //# sourceMappingURL=6.56d056cf.chunk.js.map