Blame view

api/public/js/app.3c181a04.js 17.7 KB
fa297f23d   Chris Bellas   Added config fetc...
1
2
3
4
  (function(e){function t(t){for(var r,a,u=t[0],i=t[1],s=t[2],d=0,f=[];d<u.length;d++)a=u[d],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&f.push(o[a][0]),o[a]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);l&&l(t);while(f.length)f.shift()();return c.push.apply(c,s||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==o[u]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},a={app:0},o={app:0},c=[];function u(e){return i.p+"js/"+({}[e]||e)+"."+{"chunk-2d0c55f2":"5c85b614","chunk-2d0d70a2":"7ea12236","chunk-2d0e55df":"3d7ea4b4","chunk-2d0e99de":"fb0153a3","chunk-2d224ec2":"03a05a00","chunk-ad9746d8":"9562ee9e"}[e]+".js"}function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.e=function(e){var t=[],n={"chunk-ad9746d8":1};a[e]?t.push(a[e]):0!==a[e]&&n[e]&&t.push(a[e]=new Promise((function(t,n){for(var r="css/"+({}[e]||e)+"."+{"chunk-2d0c55f2":"31d6cfe0","chunk-2d0d70a2":"31d6cfe0","chunk-2d0e55df":"31d6cfe0","chunk-2d0e99de":"31d6cfe0","chunk-2d224ec2":"31d6cfe0","chunk-ad9746d8":"9a04f192"}[e]+".css",o=i.p+r,c=document.getElementsByTagName("link"),u=0;u<c.length;u++){var s=c[u],d=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(d===r||d===o))return t()}var f=document.getElementsByTagName("style");for(u=0;u<f.length;u++){s=f[u],d=s.getAttribute("data-href");if(d===r||d===o)return t()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.onload=t,l.onerror=function(t){var r=t&&t.target&&t.target.src||o,c=new Error("Loading CSS chunk "+e+" failed.
  ("+r+")");c.code="CSS_CHUNK_LOAD_FAILED",c.request=r,delete a[e],l.parentNode.removeChild(l),n(c)},l.href=o;var p=document.getElementsByTagName("head")[0];p.appendChild(l)})).then((function(){a[e]=0})));var r=o[e];if(0!==r)if(r)t.push(r[2]);else{var c=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=c);var s,d=document.createElement("script");d.charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.src=u(e);var f=new Error;s=function(t){d.onerror=d.onload=null,clearTimeout(l);var n=o[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.
  ("+r+": "+a+")",f.name="ChunkLoadError",f.type=r,f.request=a,n[1](f)}o[e]=void 0}};var l=setTimeout((function(){s({type:"timeout",target:d})}),12e4);d.onerror=d.onload=s,document.head.appendChild(d)}return Promise.all(t)},i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],d=s.push.bind(s);s.push=t,s=s.slice();for(var f=0;f<s.length;f++)t(s[f]);var l=d;c.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"0a6b":function(e,t,n){"use strict";n.r(t),t["default"]=function(e,t,n){n()}},"0ce0":function(e,t,n){},3597:function(e,t,n){},5047:function(e,t,n){"use strict";var r=n("fa04"),a=n.n(r);a.a},"56d0":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"d-flex",class:{toggled:!e.sidebarShow},attrs:{id:"wrapper"}},[n("sidebar"),n("div",{attrs:{id:"page-content-wrapper"}},[n("main-header"),n("div",{staticClass:"container-fluid"},[n("transition",{attrs:{name:"fade"}},[n("router-view")],1)],1)],1)],1)},a=[],o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"border-right",attrs:{id:"sidebar-wrapper"}},[n("div",{staticClass:"sidebar-header"},[e._v(" KEA ")]),n("ul",{staticClass:"list-group list-group-flush"},[n("li",[n("router-link",{attrs:{to:{name:"panel.dashboard"}}},[e._v(" Dashboard ")])],1),n("h6",{staticClass:"text-center pt-3"},[e._v(" Monitor ")]),n("li",[n("router-link",{attrs:{to:{name:"panel.components.mltd"}}},[e._v(" MLTD ")])],1),n("li",[n("router-link",{attrs:{to:{name:"panel.components.od"}}},[e._v(" OD ")])],1),n("li",[n("router-link",{attrs:{to:{name:"panel.components.ceptd"}}},[e._v(" CEPTD ")])],1)])])},c=[],u={name:"Sidebar"},i=u,s=(n("ae14"),n("2877")),d=Object(s["a"])(i,o,c,!1,null,"466c867c",null),f=d.exports,l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-navbar",{staticClass:"bottom-shadow mb-3",attrs:{variant:"white"}},[n("b-button",{staticClass:"no-outline",attrs:{variant:"none"},on:{click:function(t){return e.$store.dispatch("ui/toggle","sidebarShow")}}},[n("fa",{attrs:{icon:"bars"}})],1)],1)},p=[],h=(n("96cf"),n("1da1")),m={name:"MainHeader",methods:{logout:function(){var e=this;return Object(h["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$store.dispatch("auth/logout");case 2:e.$router.push({name:"login"});case 3:case"end":return t.stop()}}),t)})))()}}},b=m,v=(n("71c6"),Object(s["a"])(b,l,p,!1,null,"3c68b016",null)),g=v.exports,k=n("2f62"),w={name:"PanelLayout",components:{Sidebar:f,MainHeader:g},computed:Object(k["b"])({sidebarShow:"ui/sidebarShow"})},y=w,O=(n("b77a"),Object(s["a"])(y,r,a,!1,null,"03a4fafb",null));t["default"]=O.exports},"56d7":function(e,t,n){"use strict";n.r(t);var r=n("5530"),a=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("2d26"),n("2b0e")),o=n("5f5b"),c=n("b1e0"),u=n("a65d"),i=n.n(u),s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("loading",{ref:"loading"}),n("transition",{attrs:{name:"page",mode:"out-in"}},[e.layout?n(e.layout,{tag:"component"}):e._e()],1)],1)},d=[],f=(n("d81d"),n("13d5"),n("d3b7"),n("ac1f"),n("5319"),n("ddb0"),n("3835")),l=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"progress",style:{width:e.percent+"%",height:e.height,opacity:e.show?1:0,"background-color":e.canSuccess?e.color:e.failedColor}})},p=[],h={data:function(){return{percent:0,show:!1,canSuccess:!0,duration:3e3,height:"2px",color:"#77b6ff",failedColor:"red"}},methods:{start:function(){var e=this;return this.show=!0,this.canSuccess=!0,this._timer&&(clearInterval(this._timer),this.percent=0),this._cut=1e4/Math.floor(this.duration),this._timer=setInterval((function(){e.increase(e._cut*Math.random()),e.percent>95&&e.finish()}),100),this},set:function(e){return this.show=!0,this.canSuccess=!0,this.percent=Math.floor(e),this},get:function(){return Math.floor(this.percent)},increase:function(e){return this.percent=this.percent+Math.floor(e),this},decrease:function(e){return this.percent=this.percent-Math.floor(e),this},finish:function(){return this.percent=100,this.hide(),this},pause:function(){return clearInterval(this._timer),this},hide:function(){var e=this;return clearInterval(this._timer),this._timer=null,setTimeout((function(){e.show=!1,e.$nextTick((function(){setTimeout((function(){e.percent=0}),200)}))}),500),this},fail:function(){return this.canSuccess=!1,this}}},m=h,b=(n("dc51"),n("2877")),v=Object(b["a"])(m,l,p,!1,null,"4a92ff42",null),g=v.exports,k=n("81be"),w=k.keys().map((function(e){return[e.replace(/(^.\/)|(\.vue$)/g,""),k(e)]})).reduce((function(e,t){var n=Object(f["a"])(t,2),r=n[0],a=n[1];return e[r]=a.default||a,e}),{}),y={el:"#app",components:{Loading:g},data:function(){return{layout:null,defaultLayout:"default"}},metaInfo:function(){var e=Object({VUE_APP_BASE_URL:"/api",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_NAME;return{title:e,titleTemplate:"%s ยท ".concat(e)}},mounted:function(){this.$loading=this.$refs.loading},methods:{setLayout:function(e){e&&w[e]||(e=this.defaultLayout),this.layout=w[e]}}},O=y,j=Object(b["a"])(O,s,d,!1,null,null,null),_=j.exports,x=(n("99af"),n("4de4"),n("4160"),n("fb6a"),n("3ca3"),n("159b"),n("96cf"),n("ade3")),E=n("2909"),S=n("1da1"),C=n("2f62");a["default"].use(C["a"]);var T=n("6c17"),L=T.keys().map((function(e){return[e.replace(/(^.\/)|(\.js$)/g,""),T(e)]})).reduce((function(e,t){var n=Object(f["a"])(t,2),a=n[0],o=n[1];return void 0===o.namespaced&&(o.namespaced=!0),Object(r["a"])({},e,Object(x["a"])({},a,o))}),{}),M=new C["a"].Store({modules:L});function U(e){return function(){return n("a383")("./".concat(e)).then((function(e){return e.default||e}))}}var $=[{path:"/",name:"panel",redirect:"/dashboard",component:U("panel/index.vue"),children:[{path:"dashboard",name:"panel.dashboard",component:U("panel/dashboard.vue")},{path:"components/mltd",name:"panel.components.mltd",component:U("panel/components/mltd.vue")},{path:"components/od",name:"panel.components.od",component:U("panel/components/od.vue")},{path:"components/ceptd",name:"panel.components.ceptd",component:U("panel/components/ceptd.vue")}]}],P=n("8c4f"),R=n("31bd");a["default"].use(P["a"]);var A=["check-auth"],N=Q(n("9091")),D=I();Object(R["sync"])(M,D);var F=D;function I(){var e=new P["a"]({scrollBehavior:J,mode:"history",routes:$});return e.beforeEach(B),e.afterEach(V),e}function B(e,t,n){return H.apply(this,arguments)}function H(){return H=Object(S["a"])(regeneratorRuntime.mark((function e(t,n,a){var o,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=[],e.prev=1,e.next=4,G(D.getMatchedComponents(Object(r["a"])({},t)));case 4:o=e.sent,e.next=12;break;case 7:if(e.prev=7,e.t0=e["catch"](1),!/^Loading( CSS)? chunk (\d)+ failed\./.test(e.t0.message)){e.next=12;break}return window.location.reload(!0),e.abrupt("return");case 12:if(0!==o.length){e.next=14;break}return e.abrupt("return",a());case 14:!1!==o[o.length-1].loading&&D.app.$nextTick((function(){return D.app.$loading.start()})),c=K(o),z(c,t,n,(function(){0===arguments.length&&D.app.setLayout(o[0].layout||""),a.apply(void 0,arguments)}));case 17:case"end":return e.stop()}}),e,null,[[1,7]])}))),H.apply(this,arguments)}function V(e,t,n){return q.apply(this,arguments)}function q(){return q=Object(S["a"])(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,D.app.$nextTick();case 2:D.app.$loading.finish();case 3:case"end":return e.stop()}}),e)}))),q.apply(this,arguments)}function z(e,t,n,r){var a=e.reverse(),o=function e(){if(arguments.length>0||0===a.length)return arguments.length>0&&D.app.$loading.finish(),r.apply(void 0,arguments);var o=a.pop();if("function"===typeof o)o(t,n,e);else{if(!N[o])throw Error("Undefined middleware [".concat(o,"]"));N[o](t,n,e)}};o()}function G(e){return Promise.all(e.map((function(e){return"function"===typeof e?e():e})))}function K(e){var t=[].concat(A);return e.filter((function(e){return e.middleware})).forEach((function(e){Array.isArray(e.middleware)?t.push.apply(t,Object(E["a"])(e.middleware)):t.push(e.middleware)})),t}function J(e,t,n){if(n)return n;if(e.hash)return{selector:e.hash};var a=D.getMatchedComponents(Object(r["a"])({},e)).slice(-1),o=Object(f["a"])(a,1),c=o[0];return c&&!1===c.scrollToTop?{}:{x:0,y:0}}function Q(e){return e.keys().map((function(t){return[t.replace(/(^.\/)|(\.js$)/g,""),e(t)]})).reduce((function(e,t){var n=Object(f["a"])(t,2),a=n[0],o=n[1];return Object(r["a"])({},e,Object(x["a"])({},a,o.default))}),{})}var W=n("bc3a"),X=n.n(W);X.a.interceptors.request.use((function(e){e.baseURL="/api";var t=M.getters["lang/locale"];return t&&(e.headers.common["Accept-Language"]=t),e})),X.a.interceptors.response.use((function(e){return e}),(function(e){return Promise.reject(e)}));var Y=n("ecee"),Z=n("ad3d"),ee=n("c074");Y["c"].add(ee["j"],ee["f"],ee["h"],ee["e"],ee["a"],ee["b"],ee["d"],ee["c"],ee["i"],ee["g"]),a["default"].component("fa",Z["a"]),a["default"].component("fa-layers",Z["b"]);n("bb35");a["default"].use(o["a"]),a["default"].use(c["a"]),a["default"].use(i.a,{position:"bottom-center",duration:5e3}),a["default"].config.performance=!0,new a["default"](Object(r["a"])({router:F,store:M},_)).$mount("#app")},"6c17":function(e,t,n){var r={"./auth.js":"c7d4","./ui.js":"f01d"};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id="6c17"},"71c6":function(e,t,n){"use strict";var r=n("bb10"),a=n.n(r);a.a},"74a4":function(e,t,n){"use strict";n.r(t);n("96cf");var r=n("1da1");t["default"]=function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r();case 1:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()},"81be":function(e,t,n){var r={"./panel.vue":"56d0","./public.vue":"a657"};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id="81be"},9091:function(e,t,n){var r={"./auth.js":"efbe","./check-auth.js":"74a4","./guest.js":"0a6b"};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id="9091"},"9fb0":function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"e",(function(){return u}));var r="LOGOUT",a="SAVE_TOKEN",o="FETCH_USER_SUCCESS",c="FETCH_USER_FAILURE",u="TOGGLE"},a383:function(e,t,n){var r={"./login":["c6f7","chunk-ad9746d8"],"./login.vue":["c6f7","chunk-ad9746d8"],"./panel":["e1cc","chunk-2d224ec2"],"./panel/":["e1cc","chunk-2d224ec2"],"./panel/components/ceptd":["8dfb","chunk-2d0e99de"],"./panel/components/ceptd.vue":["8dfb","chunk-2d0e99de"],"./panel/components/mltd":["93d3","chunk-2d0e55df"],"./panel/components/mltd.vue":["93d3","chunk-2d0e55df"],"./panel/components/od":["3f8a","chunk-2d0c55f2"],"./panel/components/od.vue":["3f8a","chunk-2d0c55f2"],"./panel/dashboard":["74b1","chunk-2d0d70a2"],"./panel/dashboard.vue":["74b1","chunk-2d0d70a2"],"./panel/index":["e1cc","chunk-2d224ec2"],"./panel/index.vue":["e1cc","chunk-2d224ec2"]};function a(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(r)},a.id="a383",e.exports=a},a657:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"base"},[n("header"),n("router-view"),n("footer")],1)},a=[],o={name:"PublicLayout"},c=o,u=(n("5047"),n("2877")),i=Object(u["a"])(c,r,a,!1,null,"7d981356",null);t["default"]=i.exports},ae14:function(e,t,n){"use strict";var r=n("3597"),a=n.n(r);a.a},b77a:function(e,t,n){"use strict";var r=n("b864"),a=n.n(r);a.a},b864:function(e,t,n){},bb10:function(e,t,n){},bb35:function(e,t,n){},c7d4:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return f})),n.d(t,"getters",(function(){return l})),n.d(t,"mutations",(function(){return p})),n.d(t,"actions",(function(){return h}));n("96cf");var r,a=n("1da1"),o=n("ade3"),c=n("bc3a"),u=n.n(c),i=n("a78e"),s=n.n(i),d=n("9fb0"),f={user:null,token:s.a.get("token")},l={user:function(e){return e.user},token:function(e){return e.token},check:function(e){return null!==e.user}},p=(r={},Object(o["a"])(r,d["d"],(function(e,t){var n=t.token,r=t.remember;e.token=n,s.a.set("token",n,{expires:r?365:null})})),Object(o["a"])(r,d["b"],(function(e,t){var n=t.user;e.user=n})),Object(o["a"])(r,d["a"],(function(e){e.token=null,s.a.remove("token")})),Object(o["a"])(r,d["c"],(function(e){e.user=null,e.token=null,s.a.remove("token")})),r),h={saveToken:function(e,t){var n=e.commit;e.dispatch;n(d["d"],t)},fetchUser:function(e){return Object(a["a"])(regeneratorRuntime.mark((function t(){var n,r,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,u.a.get("/user");case 4:r=t.sent,a=r.data,n(d["b"],{user:a}),t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](1),n(d["a"]);case 12:case"end":return t.stop()}}),t,null,[[1,9]])})))()},logout:function(e){return Object(a["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,u.a.post("/logout");case 4:t.next=8;break;case 6:t.prev=6,t.t0=t["catch"](1);case 8:n(d["c"]);case 9:case"end":return t.stop()}}),t,null,[[1,6]])})))()}}},dc51:function(e,t,n){"use strict";var r=n("0ce0"),a=n.n(r);a.a},efbe:function(e,t,n){"use strict";n.r(t);n("96cf");var r=n("1da1");t["default"]=function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r();case 1:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()},f01d:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return o})),n.d(t,"getters",(function(){return c})),n.d(t,"mutations",(function(){return u})),n.d(t,"actions",(function(){return i}));var r=n("ade3"),a=n("9fb0"),o={sidebarShow:!0,sidebarMinimize:!1},c={sidebarShow:function(e){return e.sidebarShow},sidebarMinimize:function(e){return e.sidebarMinimize}},u=Object(r["a"])({},a["e"],(function(e,t){e[t]=!e[t]})),i={toggle:function(e,t){var n=e.commit;n(a["e"],t)}}},fa04:function(e,t,n){}});
  //# sourceMappingURL=app.3c181a04.js.map