3 lines
8.8 KiB
JavaScript
3 lines
8.8 KiB
JavaScript
/*! For license information please see 6.e790f301.chunk.js.LICENSE.txt */
|
|
(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[6],{637:function(e,t,n){"use strict";t.parse=function(e,t){if("string"!==typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},a=e.split(s),c=i.decode||r,l=0;l<a.length;l++){var d=a[l],u=d.indexOf("=");if(!(u<0)){var h=d.substr(0,u).trim(),m=d.substr(++u,d.length).trim();'"'==m[0]&&(m=m.slice(1,-1)),void 0==n[h]&&(n[h]=o(m,c))}}return n},t.serialize=function(e,t,n){var r=n||{},s=r.encode||i;if("function"!==typeof s)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var o=s(t);if(o&&!a.test(o))throw new TypeError("argument val is invalid");var c=e+"="+o;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");c+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");c+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");c+="; Path="+r.path}if(r.expires){if("function"!==typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");c+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(c+="; HttpOnly");r.secure&&(c+="; Secure");if(r.sameSite){switch("string"===typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return c};var r=decodeURIComponent,i=encodeURIComponent,s=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e,t){try{return t(e)}catch(n){return e}}},690:function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),s=n(43),a=n(637);function o(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return"undefined"===typeof t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(r){}return e}var c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"===typeof e?a.parse(e,t):"object"===typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"===typeof document&&"string"===typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=a.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),o(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=o(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var r;"object"===typeof t&&(t=JSON.stringify(t)),this.cookies=c(c({},this.cookies),((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=a.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=c(c({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=c({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=a.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),d=n(20),u=n(630),h=i.a.lazy((function(){return n.e(8).then(n.bind(null,687))})),m=i.a.lazy((function(){return Promise.all([n.e(1),n.e(5)]).then(n.bind(null,691))})),p=i.a.lazy((function(){return Promise.all([n.e(1),n.e(7)]).then(n.bind(null,688))})),b=i.a.lazy((function(){return n.e(13).then(n.bind(null,689))})),j=[{path:"/",exact:!0,name:"Home"},{path:"/dashboard",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",component:h},{path:"/reports",exact:!0,name:"\u30ec\u30dd\u30fc\u30c8",component:m},{path:"/uploader",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:p},{path:"/secret",exact:!0,name:"\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",component:b}],f=n(17),x=Object(f.jsx)("div",{className:"pt-3 text-center",children:Object(f.jsx)("div",{className:"sk-spinner sk-spinner-pulse"})}),O=function(){return Object(f.jsx)("main",{className:"c-main",children:Object(f.jsx)(u.l,{fluid:!0,children:Object(f.jsx)(r.Suspense,{fallback:x,children:Object(f.jsxs)(d.d,{children:[j.map((function(e,t){return e.component&&Object(f.jsx)(d.b,{path:e.path,exact:e.exact,name:e.name,render:function(t){return null!==function(){var e=(new l).get("_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468");return console.log(e),e}()?Object(f.jsx)(e.component,Object(s.a)({},t)):Object(f.jsx)(d.a,{to:{pathname:"/sso"}})}},t)})),Object(f.jsx)(d.a,{from:"/",to:"/dashboard"})]})})})})},v=i.a.memo(O),g=function(){return Object(f.jsxs)(u.r,{fixed:!1,children:[Object(f.jsxs)("div",{children:[Object(f.jsx)("a",{href:"sumasen.net",target:"_blank",rel:"noopener noreferrer",children:"FBS"}),Object(f.jsx)("span",{className:"ml-1",children:"\xa9 2021 DigitalVox."})]}),Object(f.jsxs)("div",{className:"mfs-auto",children:[Object(f.jsx)("span",{className:"mr-1",children:"\u642d\u8f09"}),Object(f.jsx)("a",{href:"#",target:"_blank",rel:"noopener noreferrer",children:"DigitalVox"})]})]})},w=i.a.memo(g),N=n(159),S=n(629),y=function(){var e=Object(N.b)(),t=Object(N.c)((function(e){return e.sidebarShow}));return Object(f.jsxs)(u.u,{withSubheader:!0,children:[Object(f.jsx)(u.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(f.jsx)(u.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(f.jsx)(u.v,{className:"mx-auto d-lg-none",to:"/",children:Object(f.jsx)("h2",{children:"FBS"})}),Object(f.jsx)(u.w,{className:"d-md-down-none mr-auto",children:Object(f.jsx)(u.x,{className:"px-3",children:Object(f.jsx)(u.y,{to:"/dashboard",children:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9"})})}),Object(f.jsx)(u.w,{className:"px-3",children:Object(f.jsx)(C,{})}),Object(f.jsx)(u.U,{className:"px-3 justify-content-between",children:Object(f.jsx)(u.d,{className:"border-0 c-subheader-nav m-0 px-0 px-md-3",routes:j})})]})},C=function(){return Object(f.jsxs)(u.n,{inNav:!0,className:"c-header-nav-items mx-2",direction:"down",children:[Object(f.jsx)(u.q,{className:"c-header-nav-link",caret:!1,children:Object(f.jsx)("div",{className:"c-avatar",children:"Account"})}),Object(f.jsxs)(u.p,{className:"pt-0",placement:"bottom-end",children:[Object(f.jsx)(u.o,{header:!0,tag:"div",color:"light",className:"text-center",children:Object(f.jsx)("strong",{children:"Account"})}),Object(f.jsxs)(u.o,{onClick:function(){console.log("launch sso"),window.open("https://fsbsso.sumasen.net/Shibboleth.sso/Login","_self")},children:[Object(f.jsx)(S.a,{name:"cil-bell",className:"mfe-2"}),"SSO Login"]})]})]})},k=[{_tag:"CSidebarNavItem",name:"\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9",to:"/dashboard",icon:Object(f.jsx)(S.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"},{_tag:"CSidebarNavItem",name:"secret",to:"/secret",icon:"cil-drop"}],_=function(){var e=Object(N.b)(),t=Object(N.c)((function(e){return e.sidebarShow}));return Object(f.jsxs)(u.M,{show:t,onShowChange:function(t){return e({type:"set",sidebarShow:t})},children:[Object(f.jsxs)(u.N,{className:"d-md-down-none",to:"/",children:[Object(f.jsx)("h2",{children:"FBS"}),Object(f.jsx)(S.a,{className:"c-sidebar-brand-minimized",name:"sygnet",height:35})]}),Object(f.jsx)(u.P,{children:Object(f.jsx)(u.m,{items:k,components:{CSidebarNavDivider:u.Q,CSidebarNavDropdown:u.R,CSidebarNavItem:u.S,CSidebarNavTitle:u.T}})}),Object(f.jsx)(u.O,{className:"c-d-md-down-none"})]})},E=i.a.memo(_);t.default=function(){return Object(f.jsxs)("div",{className:"c-app c-default-layout",children:[Object(f.jsx)(E,{}),Object(f.jsxs)("div",{className:"c-wrapper",children:[Object(f.jsx)(y,{}),Object(f.jsx)("div",{className:"c-body",children:Object(f.jsx)(v,{})}),Object(f.jsx)(w,{})]})]})}}}]);
|
|
//# sourceMappingURL=6.e790f301.chunk.js.map
|