%PDF- %PDF-
Direktori : /var/www/html/diaspora/dashboard/js/ |
Current File : /var/www/html/diaspora/dashboard/js/app.a4cbd966.js |
(function(t){function e(e){for(var i,r,s=e[0],c=e[1],u=e[2],d=0,m=[];d<s.length;d++)r=s[d],o[r]&&m.push(o[r][0]),o[r]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(t[i]=c[i]);l&&l(e);while(m.length)m.shift()();return a.push.apply(a,u||[]),n()}function n(){for(var t,e=0;e<a.length;e++){for(var n=a[e],i=!0,s=1;s<n.length;s++){var c=n[s];0!==o[c]&&(i=!1)}i&&(a.splice(e--,1),t=r(r.s=n[0]))}return t}var i={},o={app:0},a=[];function r(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],c=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var l=c;a.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"034c":function(t,e,n){"use strict";var i=n("f021"),o=n.n(i);o.a},"31bf":function(t,e,n){"use strict";var i=n("b545"),o=n.n(i);o.a},4678:function(t,e,n){var i={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"73332","./en-il.js":"73332","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b146","./hu.js":"5b146","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function o(t){var e=a(t);return n(e)}function a(t){var e=i[t];if(!(e+1)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return e}o.keys=function(){return Object.keys(i)},o.resolve=a,t.exports=o,o.id="4678"},"4ec1":function(t,e,n){},"56d7":function(t,e,n){"use strict";n.r(e);n("cadf"),n("551c"),n("f751"),n("097d");var i=n("2b0e"),o=n("7bb1"),a=n("5f5b"),r=n("c1df"),s=n.n(r),c=n("b047"),u=n.n(c),l=n("415c"),d=n.n(l),m=n("ee98"),f=n.n(m),p=n("7212"),h=n.n(p),v=n("3730"),g=n.n(v),b=n("246a"),C=(n("8512"),n("2dd8"),n("0952"),n("dfa4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("custom-header"),n("div",{attrs:{id:"app-container"}},[n("router-view")],1),n("custom-footer"),n("notifications",{attrs:{max:1,position:"top right"}})],1)}),y=[],S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"navbar navbar-expand-md navbar-dark bg-primary fixed-top"},[n("div",{staticClass:"container d-flex"},[n("router-link",{staticClass:"navbar-brand",attrs:{tag:"a",to:"/"}},[n("a",{},[t._v("Diaspora Shqiptare")])]),t.isAuth?n("div",{staticClass:"text-left flex-grow-1"},[t._m(0),n("div",{staticClass:"collapse navbar-collapse",attrs:{id:"navbarSupportedContent"}},[n("ul",{staticClass:"navbar-nav mr-auto"},[t.isAdmin()?n("router-link",{staticClass:"nav-item px-2 py-2",attrs:{to:{name:"Users"},tag:"b-link","active-class":"bg-white text-primary"}},[t._v("\n Përdoruesit\n ")]):t._e(),t._l(t.routes,function(e,i){return n("router-link",{key:i,staticClass:"nav-item px-2 py-2",attrs:{to:{name:e.name},tag:"b-link","active-class":"bg-white text-primary"}},[t._v(t._s(e.label)+"\n ")])})],2),n("ul",{staticClass:"navbar-nav pull-right"},[t.isAuth?n("li",{staticClass:"nav-item active"},[n("a",{staticClass:"nav-link show-as-pointer",on:{click:function(e){return t.logout()}}},[t._v("Dil")])]):t._e()])])]):t._e()],1)])},w=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{staticClass:"navbar-toggler",attrs:{"aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation","data-target":"#navbarSupportedContent","data-toggle":"collapse",type:"button"}},[n("span",{staticClass:"navbar-toggler-icon"})])}],A=n("cebc"),k=n("2f62"),E=(n("7f7f"),n("bc3a")),$=n.n(E),j=(n("96cf"),n("3b8d")),M=n("0e44"),L=n("6ee6"),P={login:function(t){return new Promise(function(e,n){co.post("/v1/login",t).then(function(t){return e(t.data.token)},function(t){return n(t)})})},me:function(){return new Promise(function(t,e){co.get("/v1/me?include=roles").then(function(e){return t(e.data.data)},function(t){return e(t)})})},resetPassword:function(t){return new Promise(function(e,n){co.post("/v1/password/reset",t).then(function(t){return e(t)},function(t){return n(t)})})},logout:function(){return new Promise(function(t){t()})}},I={login:function(t,e){var n=t.commit;return new Promise(function(t,i){return P.login(e).then(function(e){n("TOKEN",e),t(e)},function(t){return i(t)})})},me:function(t){var e=t.commit;return new Promise(function(t,n){return P.me().then(function(n){e("USER_DATA",n),t(n)},function(t){n(t)})})},logout:function(t){return Object(L["a"])(t),new Promise(function(t,e){return P.logout().then(function(e){t({success:e})},function(t){e(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},O=function(t){return t.token},T=function(t){return!!t.isAuth},x=function(t){return t.userData},D={token:O,isAuth:T,userData:x},N=function(){return{token:null,userData:{},isAuth:!1}},q=function(t){Object.assign(t,N())},R=function(t,e){return t.token="Bearer ".concat(e),t.isAuth=!!t.token,t.token},U=function(t,e){return t.userData=e,t.userData},B={RESET_STATE:q,USER_DATA:U,TOKEN:R},V=N(),z={namespaced:!0,state:V,actions:I,getters:D,mutations:B},G={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.get(e).then(function(e){n("USERS",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getUser:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.getUser(e).then(function(e){n("SET_SELECTED_USER",e),t(e)},function(t){i(t)})})},getAvailableUsers:function(t){var e=t.commit;return new Promise(function(t,n){return uo.getAvailableUsers().then(function(n){e("SET_AVAILABLE_USERS",n.data),t(n)},function(t){n(t)})})},confirm:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.confirm(e).then(function(e){n("CONFIRM",e),t({success:e})},function(t){return i(t)})})},enable:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.enable(e).then(function(e){n("ENABLE",e),t({success:e})},function(t){return i(t)})})},disable:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.disable(e).then(function(e){n("DISABLE",e),t({success:e})},function(t){return i(t)})})},updatePassword:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return uo.updatePassword(e.user,e.payload).then(function(e){t(e)},function(t){return n(t)})})},createUser:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.create(e).then(function(e){n("CREATE_USER",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return uo.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return uo.uploadImage(e.user,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},getRoles:function(t){var e=t.commit;return new Promise(function(t,n){return uo.getRoles().then(function(n){e("ROLES",n),t(n)},function(t){return n(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},F=function(t){return t.users},Y=function(t){return t.meta},K=function(t){return t.isLoading},H=function(t){return t.selectedUser},J=function(t){return t.availableUsers},Q=function(t){return t.roles},W={users:F,meta:Y,isLoading:K,selectedUser:H,availableUsers:J,roles:Q},X=(n("20d6"),function(){return{users:[],availableUsers:[],roles:[],meta:{},selectedUser:{},isLoading:!1}}),Z=function(t){Object.assign(t,X())},tt=function(t,e){return t.isLoading=e,t.isLoading},et=function(t,e){return t.users=e.data,t.meta=e.meta,t.isLoading=!1,t.users},nt=function(t,e){return t.availableUsers=e,t.availableUsers},it=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_enabled=!0,t.users},ot=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_enabled=!1,t.users},at=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_confirmed=!0,t.users},rt=function(t,e){return t.users.push(e),t.users},st=function(t,e){return t.selectedUser=e,t.selectedUser},ct=function(t,e){return t.selectedUser=e,t.selectedUser},ut=function(t,e){return t.roles=e,t.roles},lt={RESET_STATE:Z,LOADING:tt,USERS:et,SET_AVAILABLE_USERS:nt,ENABLE:it,DISABLE:ot,CONFIRM:at,CREATE_USER:rt,SET_SELECTED_USER:st,UPLOAD_IMAGE:ct,ROLES:ut},dt=X(),mt={namespaced:!0,state:dt,actions:G,getters:W,mutations:lt},ft=function(t){var e=[];return _.forOwn(t,function(t,n){t&&e.push("".concat(n,"=").concat(t))}),e.join("&")},pt={get:function(t){return new Promise(function(e,n){co.get("/v1/countries?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getEnabledCountries:function(){return new Promise(function(t,e){co.get("/v1/countries/actions/getEnabled").then(function(e){return t(e.data.data)},function(t){return e(t)})})},getCountry:function(t){return new Promise(function(e,n){co.get("/v1/countries/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},getSections:function(t){return new Promise(function(e,n){co.get("/v1/country/".concat(t,"/sections")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},getSection:function(t){return new Promise(function(e,n){co.get("/v1/country/".concat(t,"/sections/").concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},getTravelCautions:function(){return new Promise(function(t,e){co.get("/v1/countries/actions/getTravelCautions").then(function(e){return t(e.data)},function(t){return e(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/countries",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/countries/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},enable:function(t){return new Promise(function(e,n){co.post("/v1/countries/".concat(t.id,"/actions/enable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},disable:function(t){return new Promise(function(e,n){co.post("/v1/countries/".concat(t.id,"/actions/disable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},createSection:function(t){return new Promise(function(e,n){co.post("/v1/country/".concat(t.country_id,"/sections"),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},updateSection:function(t){return new Promise(function(e,n){co.put("/v1/country/".concat(t.country_id,"/sections/").concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},moveUp:function(t){return new Promise(function(e,n){co.post("/v1/country/".concat(t.country_id,"/sections/").concat(t.id,"/actions/moveUp"),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},moveDown:function(t){return new Promise(function(e,n){co.post("/v1/country/".concat(t.country_id,"/sections/").concat(t.id,"/actions/moveDown"),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},enableSection:function(t){return new Promise(function(e,n){co.post("/v1/country/".concat(t.country_id,"/sections/").concat(t.id,"/actions/makeVisible"),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},disableSection:function(t){return new Promise(function(e,n){co.post("/v1/country/".concat(t.country_id,"/sections/").concat(t.id,"/actions/makeInvisible"),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})}},ht={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.get(e).then(function(e){n("COUNTRIES",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.getCountry(e).then(function(e){n("SET_SELECTED_COUNTRY",e),t(e)},function(t){i(t)})})},getEnabledCountries:function(t){var e=t.commit;return new Promise(function(t,n){return pt.getEnabledCountries().then(function(n){e("SET_ENABLED_COUNTRY",n),t(n)},function(t){n(t)})})},enable:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.enable(e).then(function(e){n("ENABLE",e),t({success:e})},function(t){return i(t)})})},disable:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.disable(e).then(function(e){n("DISABLE",e),t({success:e})},function(t){return i(t)})})},createCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.create(e).then(function(e){n("CREATE_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return pt.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},getSections:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.getSections(e).then(function(e){n("SET_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},getTravelCautions:function(t){var e=t.commit;return new Promise(function(t,n){return pt.getTravelCautions().then(function(n){e("SET_TRAVEL_CAUTIONS",n),t({success:n})},function(t){return n(t)})})},getSection:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.getSection(e).then(function(e){n("SET_SELECTED_SECTION",e),t({success:e})},function(t){return i(t)})})},createSection:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return pt.createSection(e).then(function(e){t({success:e})},function(t){return n(t)})})},updateSection:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return pt.updateSection(e).then(function(e){t({success:e})},function(t){return n(t)})})},moveUp:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.moveUp(e).then(function(e){n("SET_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},moveDown:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.moveDown(e).then(function(e){n("SET_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},enableSection:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.enableSection(e).then(function(e){n("ENABLE_SECTION",e),t({success:e})},function(t){return i(t)})})},disableSection:function(t,e){var n=t.commit;return new Promise(function(t,i){return pt.disableSection(e).then(function(e){n("DISABLE_SECTION",e),t({success:e})},function(t){return i(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},vt=function(t){return t.countries},gt=function(t){return t.meta},bt=function(t){return t.selectedCountry},Ct=function(t){return t.enabledCountries},_t=function(t){return t.isLoading},yt=function(t){return t.selectedCategory},St=function(t){return t.sections},wt=function(t){return t.travelCautions},At=function(t){return t.selectedSection},kt={countries:vt,meta:gt,selectedCountry:bt,enabledCountries:Ct,isLoading:_t,selectedCategory:yt,sections:St,travelCautions:wt,selectedSection:At},Et=function(){return{countries:[],enabledCountries:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},$t=function(t){Object.assign(t,Et())},jt=function(t,e){return t.isLoading=e,t.isLoading},Mt=function(t,e){return t.countries=e.data,t.meta=e.meta,t.isLoading=!1,t.countries},Lt=function(t,e){return t.enabledCountries=e,t.enabledCountries},Pt=function(t,e){return t.countries.push(e),t.countries},It=function(t,e){return t.selectedCountry=e,t.selectedCountry},Ot=function(t,e){var n=_.findIndex(t.countries,function(t){return t.id===e.id});return t.countries[n].is_enabled=!0,t.countries},Tt=function(t,e){var n=_.findIndex(t.countries,function(t){return t.id===e.id});return t.countries[n].is_enabled=!1,t.countries},xt=function(t,e){return t.sections=e,t.selectedSection={},t.sections},Dt=function(t,e){return t.selectedSection=e,t.selectedSection},Nt=function(t,e){return t.travelCautions=e,t.travelCautions},qt=function(t,e){var n=_.findIndex(t.sections,function(t){return t.id===e.id});return t.sections[n].is_visible=!0,t.sections},Rt=function(t,e){var n=_.findIndex(t.sections,function(t){return t.id===e.id});return t.sections[n].is_visible=!1,t.sections},Ut={RESET_STATE:$t,LOADING:jt,COUNTRIES:Mt,SET_ENABLED_COUNTRY:Lt,CREATE_COUNTRY:Pt,SET_SELECTED_COUNTRY:It,ENABLE:Ot,DISABLE:Tt,SET_COUNTRY_SECTIONS:xt,SET_SELECTED_SECTION:Dt,SET_TRAVEL_CAUTIONS:Nt,ENABLE_SECTION:qt,DISABLE_SECTION:Rt},Bt=Et(),Vt={namespaced:!0,state:Bt,actions:ht,getters:kt,mutations:Ut},zt={get:function(t){return new Promise(function(e,n){co.get("/v1/categories?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableCategories:function(){return new Promise(function(t,e){co.get("/v1/categories/actions/getAvailableCategories").then(function(e){return t(e.data)},function(t){return e(t)})})},getCategory:function(t){return new Promise(function(e,n){co.get("/v1/categories/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/categories",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/categories/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},archive:function(t){return new Promise(function(e,n){co.post("/v1/categories/".concat(t.id,"/actions/archive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},unArchive:function(t){return new Promise(function(e,n){co.post("/v1/categories/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})}},Gt={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.get(e).then(function(e){n("CATEGORIES",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getCategory:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.getCategory(e).then(function(e){n("SET_SELECTED_CATEGORY",e),t(e)},function(t){i(t)})})},getAvailableCategories:function(t){var e=t.commit;return new Promise(function(t,n){return zt.getAvailableCategories().then(function(n){e("SET_AVAILABLE_CATEGORIES",n.data),t(n)},function(t){n(t)})})},archive:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.archive(e).then(function(e){n("ARCHIVE",e),t({success:e})},function(t){return i(t)})})},unArchive:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.unArchive(e).then(function(e){n("UNARCHIVE",e),t({success:e})},function(t){return i(t)})})},createCategory:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.create(e).then(function(e){n("CREATE_CATEGORY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return zt.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return zt.uploadImage(e.category,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},Ft=function(t){return t.categories},Yt=function(t){return t.meta},Kt=function(t){return t.isLoading},Ht=function(t){return t.selectedCategory},Jt=function(t){return t.availableCategories},Qt={categories:Ft,meta:Yt,isLoading:Kt,selectedCategory:Ht,availableCategories:Jt},Wt=function(){return{categories:[],availableCategories:[],meta:{},selectedCategory:{},isLoading:!1}},Xt=function(t){Object.assign(t,Wt())},Zt=function(t,e){return t.isLoading=e,t.isLoading},te=function(t,e){return t.categories=e.data,t.meta=e.meta,t.isLoading=!1,t.categories},ee=function(t,e){return t.categories.push(e),t.categories},ne=function(t,e){return t.availableCategories=e,t.availableCategories},ie=function(t,e){return t.selectedCategory=e,t.selectedCategory},oe=function(t,e){return t.selectedCategory=e,t.selectedCategory},ae=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!0,t.categories},re=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!1,t.categories},se={RESET_STATE:Xt,LOADING:Zt,CATEGORIES:te,CREATE_CATEGORY:ee,SET_SELECTED_CATEGORY:ie,SET_AVAILABLE_CATEGORIES:ne,UPLOAD_IMAGE:oe,ARCHIVE:ae,UNARCHIVE:re},ce=Wt(),ue={namespaced:!0,state:ce,actions:Gt,getters:Qt,mutations:se},le={get:function(t){return new Promise(function(e,n){co.get("/v1/posts?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getPost:function(t){return new Promise(function(e,n){co.get("/v1/posts/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},publish:function(t){return new Promise(function(e,n){co.post("/v1/posts/".concat(t.id,"/actions/publish")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},featureMedia:function(t){return new Promise(function(e,n){co.post("/v1/posts/".concat(t.post_id,"/actions/featureMedia/").concat(t.image_id,"?include=media")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},archive:function(t){return new Promise(function(e,n){co.post("/v1/posts/".concat(t.id,"/actions/archive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},activate:function(t){return new Promise(function(e,n){co.post("/v1/posts/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/posts",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/posts/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},uploadImage:function(t,e){return new Promise(function(n,i){co.post("/v1/posts/".concat(t.id,"/actions/uploadFeaturedImage"),{featured_image:e}).then(function(t){return n(t.data.data)},function(t){return i(t)})})},deleteImage:function(t,e){return new Promise(function(n,i){co.delete("/v1/posts/".concat(t,"/actions/deleteImage/").concat(e)).then(function(t){return n(t)},function(t){return i(t)})})},getVideoTypes:function(){return new Promise(function(t,e){co.get("/v1/posts/actions/getVideoTypes").then(function(e){return t(e.data)},function(t){return e(t)})})},isDraft:function(t){return"DRAFT"===t.status},isPublished:function(t){return"PUBLISHED"===t.status},isArchived:function(t){return"ARCHIVED"===t.status}},de={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.get(e).then(function(e){n("POSTS",e),n("LOADING",!1),t(e)},function(t){n("LOADING",!1),i(t)})})},getPost:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.getPost(e).then(function(e){n("SET_SELECTED_POST",e),t(e)},function(t){i(t)})})},publish:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.publish(e).then(function(e){n("PUBLISH",e),t(e)},function(t){return i(t)})})},featureMedia:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.featureMedia(e).then(function(e){n("FEATURE_MEDIA",e),t(e)},function(t){return i(t)})})},archive:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.archive(e).then(function(e){n("ARCHIVE",e),t(e)},function(t){return i(t)})})},activate:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.activate(e).then(function(e){n("ACTIVATE",e),t(e)},function(t){return i(t)})})},createPost:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.create(e).then(function(e){n("CREATE_POST",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return le.update(e).then(function(e){t(e)},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.uploadImage(e.post,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},deleteImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return le.deleteImage(e.post_id,e.image_id).then(function(i){n("DELETE_IMAGE",e),t(i)},function(t){return i(t)})})},getVideoTypes:function(t){var e=t.commit;return new Promise(function(t,n){return le.getVideoTypes().then(function(n){e("VIDEO_TYPES",n),t(n)},function(t){return n(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},me=function(t){return t.posts},fe=function(t){return t.meta},pe=function(t){return t.isLoading},he=function(t){return t.selectedPost},ve=function(t){return t.videoTypes},ge={posts:me,meta:fe,isLoading:pe,selectedPost:he,videoTypes:ve},be=function(){return{posts:[],meta:{},selectedPost:{},isLoading:!1}},Ce=function(t){Object.assign(t,be())},_e=function(t,e){return t.isLoading=e,t.isLoading},ye=function(t,e){return t.posts=e.data,t.meta=e.meta,t.isLoading=!1,t.posts},Se=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].status=e.status,t.posts},we=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].media=e.media,t.selectedPost.media=e.media,t.posts},Ae=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].status=e.status,t.posts},ke=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].status=e.status,t.posts},Ee=function(t,e){return t.posts.push(e),t.posts},$e=function(t,e){return t.selectedPost=e,t.selectedPost},je=function(t,e){return t.selectedPost=e,t.selectedPost},Me=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.post_id}),i=t.posts[n].media,o=_.findIndex(i,function(t){return t.id===e.image_id});i.splice(o,1)},Le=function(t,e){return t.videoTypes=e,t.videoTypes},Pe={RESET_STATE:Ce,LOADING:_e,POSTS:ye,PUBLISH:Se,FEATURE_MEDIA:we,ARCHIVE:Ae,ACTIVATE:ke,CREATE_POST:Ee,SET_SELECTED_POST:$e,UPLOAD_IMAGE:je,DELETE_IMAGE:Me,VIDEO_TYPES:Le},Ie=be(),Oe={namespaced:!0,state:Ie,actions:de,getters:ge,mutations:Pe},Te={get:function(t){return new Promise(function(e,n){co.get("/v1/myCountrySections?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getCountry:function(t){return new Promise(function(e,n){co.get("/v1/myCountrySections/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},getCategories:function(){return new Promise(function(t,e){co.get("/v1/myCountrySections/actions/getCategories").then(function(e){return t(e.data.data)},function(t){return e(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/myCountrySections",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/myCountrySections/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},enable:function(t){return new Promise(function(e,n){co.post("/v1/myCountrySections/".concat(t.id,"/actions/enable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},disable:function(t){return new Promise(function(e,n){co.post("/v1/myCountrySections/".concat(t.id,"/actions/disable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},moveUp:function(t){return new Promise(function(e,n){co.post("/v1/myCountrySections/".concat(t.id,"/actions/moveUp"),t).then(function(t){return e(t.data)},function(t){return n(t)})})},moveDown:function(t){return new Promise(function(e,n){co.post("/v1/myCountrySections/".concat(t.id,"/actions/moveDown"),t).then(function(t){return e(t.data)},function(t){return n(t)})})}},xe={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.get(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.getCountry(e).then(function(e){n("SET_SELECTED_SECTION",e),t(e)},function(t){i(t)})})},getCategories:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.getCategories(e).then(function(e){n("SET_CATEGORIES",e),t(e)},function(t){i(t)})})},enable:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.enable(e).then(function(e){n("ENABLE",e),t({success:e})},function(t){return i(t)})})},disable:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.disable(e).then(function(e){n("DISABLE",e),t({success:e})},function(t){return i(t)})})},createCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.create(e).then(function(e){n("CREATE_MY_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return Te.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},moveUp:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.moveUp(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},moveDown:function(t,e){var n=t.commit;return new Promise(function(t,i){return Te.moveDown(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},De=function(t){return t.myCountrySections},Ne=function(t){return t.selectedSection},qe=function(t){return t.visibleCategories},Re=function(t){return t.isLoading},Ue={myCountrySections:De,isLoading:Re,visibleCategories:qe,selectedSection:Ne},Be=function(){return{myCountrySections:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},Ve=function(t){Object.assign(t,Be())},ze=function(t,e){return t.isLoading=e,t.isLoading},Ge=function(t,e){return t.myCountrySections=e.data,t.isLoading=!1,t.myCountrySections},Fe=function(t,e){return t.visibleCategories=e,t.visibleCategories},Ye=function(t,e){return t.myCountrySections.push(e),t.myCountrySections},Ke=function(t,e){return t.selectedSection=e,t.selectedSection},He=function(t,e){var n=_.findIndex(t.myCountrySections,function(t){return t.id===e.id});return t.myCountrySections[n].is_visible=!0,t.myCountrySections},Je=function(t,e){var n=_.findIndex(t.myCountrySections,function(t){return t.id===e.id});return t.myCountrySections[n].is_visible=!1,t.myCountrySections},Qe={RESET_STATE:Ve,LOADING:ze,MY_COUNTRY_SECTIONS:Ge,SET_CATEGORIES:Fe,CREATE_MY_COUNTRY:Ye,ENABLE:He,DISABLE:Je,SET_SELECTED_SECTION:Ke},We=Be(),Xe={namespaced:!0,state:We,actions:xe,getters:Ue,mutations:Qe},Ze={get:function(t){return new Promise(function(e,n){co.get("/v1/kkdSections?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getCountry:function(t){return new Promise(function(e,n){co.get("/v1/kkdSections/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/kkdSections",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/kkdSections/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},enable:function(t){return new Promise(function(e,n){co.post("/v1/kkdSections/".concat(t.id,"/actions/enable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},disable:function(t){return new Promise(function(e,n){co.post("/v1/kkdSections/".concat(t.id,"/actions/disable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},moveUp:function(t){return new Promise(function(e,n){co.post("/v1/kkdSections/".concat(t.id,"/actions/moveUp"),t).then(function(t){return e(t.data)},function(t){return n(t)})})},moveDown:function(t){return new Promise(function(e,n){co.post("/v1/kkdSections/".concat(t.id,"/actions/moveDown"),t).then(function(t){return e(t.data)},function(t){return n(t)})})}},tn={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.get(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.getCountry(e).then(function(e){n("SET_SELECTED_SECTION",e),t(e)},function(t){i(t)})})},enable:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.enable(e).then(function(e){n("ENABLE",e),t({success:e})},function(t){return i(t)})})},disable:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.disable(e).then(function(e){n("DISABLE",e),t({success:e})},function(t){return i(t)})})},createCountry:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.create(e).then(function(e){n("CREATE_MY_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return Ze.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},moveUp:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.moveUp(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},moveDown:function(t,e){var n=t.commit;return new Promise(function(t,i){return Ze.moveDown(e).then(function(e){n("MY_COUNTRY_SECTIONS",e),t({success:e})},function(t){return i(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},en=function(t){return t.kkdSections},nn=function(t){return t.selectedSection},on=function(t){return t.isLoading},an={kkdSections:en,isLoading:on,selectedSection:nn},rn=function(){return{kkdSections:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},sn=function(t){Object.assign(t,rn())},cn=function(t,e){return t.isLoading=e,t.isLoading},un=function(t,e){return t.kkdSections=e.data,t.isLoading=!1,t.kkdSections},ln=function(t,e){return t.kkdSections.push(e),t.kkdSections},dn=function(t,e){return t.selectedSection=e,t.selectedSection},mn=function(t,e){var n=_.findIndex(t.kkdSections,function(t){return t.id===e.id});return t.kkdSections[n].is_visible=!0,t.kkdSections},fn=function(t,e){var n=_.findIndex(t.kkdSections,function(t){return t.id===e.id});return t.kkdSections[n].is_visible=!1,t.kkdSections},pn={RESET_STATE:sn,LOADING:cn,MY_COUNTRY_SECTIONS:un,CREATE_MY_COUNTRY:ln,ENABLE:mn,DISABLE:fn,SET_SELECTED_SECTION:dn},hn=rn(),vn={namespaced:!0,state:hn,actions:tn,getters:an,mutations:pn},gn={get:function(t){return new Promise(function(e,n){co.get("/v1/members?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getMember:function(t){return new Promise(function(e,n){co.get("/v1/members/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},publish:function(t){return new Promise(function(e,n){co.post("/v1/members/".concat(t.id,"/actions/publish")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},featureMedia:function(t){return new Promise(function(e,n){co.post("/v1/members/".concat(t.member_id,"/actions/featureMedia/").concat(t.image_id,"?include=media")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},archive:function(t){return new Promise(function(e,n){co.post("/v1/members/".concat(t.id,"/actions/archive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},activate:function(t){return new Promise(function(e,n){co.post("/v1/members/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/members",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/members/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},uploadImage:function(t,e){return new Promise(function(n,i){co.post("/v1/members/".concat(t.id,"/actions/updateAvatar"),{avatar:e}).then(function(t){return n(t.data.data)},function(t){return i(t)})})},deleteImage:function(t,e){return new Promise(function(n,i){co.delete("/v1/members/".concat(t,"/actions/deleteImage/").concat(e)).then(function(t){return n(t)},function(t){return i(t)})})},getVideoTypes:function(){return new Promise(function(t,e){co.get("/v1/members/actions/getVideoTypes").then(function(e){return t(e.data)},function(t){return e(t)})})},isDraft:function(t){return"DRAFT"===t.status},isPublished:function(t){return"PUBLISHED"===t.status},isArchived:function(t){return"ARCHIVED"===t.status}},bn={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.get(e).then(function(e){n("MEMBERS",e),n("LOADING",!1),t(e)},function(t){n("LOADING",!1),i(t)})})},getMember:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.getMember(e).then(function(e){n("SET_SELECTED_MEMBER",e),t(e)},function(t){i(t)})})},publish:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.publish(e).then(function(e){n("PUBLISH",e),t(e)},function(t){return i(t)})})},featureMedia:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.featureMedia(e).then(function(e){n("FEATURE_MEDIA",e),t(e)},function(t){return i(t)})})},archive:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.archive(e).then(function(e){n("ARCHIVE",e),t(e)},function(t){return i(t)})})},activate:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.activate(e).then(function(e){n("ACTIVATE",e),t(e)},function(t){return i(t)})})},createMember:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.create(e).then(function(e){n("CREATE_MEMBER",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return gn.update(e).then(function(e){t(e)},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.uploadImage(e.member,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},deleteImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return gn.deleteImage(e.member_id,e.image_id).then(function(i){n("DELETE_IMAGE",e),t(i)},function(t){return i(t)})})},getVideoTypes:function(t){var e=t.commit;return new Promise(function(t,n){return gn.getVideoTypes().then(function(n){e("VIDEO_TYPES",n),t(n)},function(t){return n(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},Cn=function(t){return t.members},_n=function(t){return t.meta},yn=function(t){return t.isLoading},Sn=function(t){return t.selectedMember},wn=function(t){return t.videoTypes},An={members:Cn,meta:_n,isLoading:yn,selectedMember:Sn,videoTypes:wn},kn=function(){return{members:[],meta:{},selectedMember:{},isLoading:!1}},En=function(t){Object.assign(t,kn())},$n=function(t,e){return t.isLoading=e,t.isLoading},jn=function(t,e){return t.members=e.data,t.meta=e.meta,t.isLoading=!1,t.members},Mn=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].status=e.status,t.members},Ln=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].media=e.media,t.selectedMember.media=e.media,t.members},Pn=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].status=e.status,t.members},In=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].status=e.status,t.members},On=function(t,e){return t.members.push(e),t.members},Tn=function(t,e){return t.selectedMember=e,t.selectedMember},xn=function(t,e){return t.selectedMember=e,t.selectedMember},Dn=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.member_id}),i=t.members[n].media,o=_.findIndex(i,function(t){return t.id===e.image_id});i.splice(o,1)},Nn=function(t,e){return t.videoTypes=e,t.videoTypes},qn={RESET_STATE:En,LOADING:$n,MEMBERS:jn,PUBLISH:Mn,FEATURE_MEDIA:Ln,ARCHIVE:Pn,ACTIVATE:In,CREATE_MEMBER:On,SET_SELECTED_MEMBER:Tn,UPLOAD_IMAGE:xn,DELETE_IMAGE:Dn,VIDEO_TYPES:Nn},Rn=kn(),Un={namespaced:!0,state:Rn,actions:bn,getters:An,mutations:qn},Bn={get:function(t){return new Promise(function(e,n){co.get("/v1/myCountryCategories?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableMyCountryCategories:function(){return new Promise(function(t,e){co.get("/v1/myCountryCategories/actions/getAvailableMyCountryCategories").then(function(e){return t(e.data)},function(t){return e(t)})})},getCategory:function(t){return new Promise(function(e,n){co.get("/v1/myCountryCategories/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/myCountryCategories",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/myCountryCategories/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},archive:function(t){return new Promise(function(e,n){co.post("/v1/myCountryCategories/".concat(t.id,"/actions/archive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},unArchive:function(t){return new Promise(function(e,n){co.post("/v1/myCountryCategories/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})}},Vn={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.get(e).then(function(e){n("CATEGORIES",e),n("LOADING",!1),t({success:e})},function(t){n("LOADING",!1),i(t)})})},getCategory:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.getCategory(e).then(function(e){n("SET_SELECTED_CATEGORY",e),t(e)},function(t){i(t)})})},getAvailableCategories:function(t){var e=t.commit;return new Promise(function(t,n){return Bn.getAvailableCategories().then(function(n){e("SET_AVAILABLE_CATEGORIES",n.data),t(n)},function(t){n(t)})})},archive:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.archive(e).then(function(e){n("ARCHIVE",e),t({success:e})},function(t){return i(t)})})},unArchive:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.unArchive(e).then(function(e){n("UNARCHIVE",e),t({success:e})},function(t){return i(t)})})},createCategory:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.create(e).then(function(e){n("CREATE_CATEGORY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return Bn.update(e).then(function(e){t({success:e})},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return Bn.uploadImage(e.category,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},zn=function(t){return t.categories},Gn=function(t){return t.meta},Fn=function(t){return t.isLoading},Yn=function(t){return t.selectedCategory},Kn=function(t){return t.availableCategories},Hn={categories:zn,meta:Gn,isLoading:Fn,selectedCategory:Yn,availableCategories:Kn},Jn=function(){return{categories:[],availableCategories:[],meta:{},selectedCategory:{},isLoading:!1}},Qn=function(t){Object.assign(t,Jn())},Wn=function(t,e){return t.isLoading=e,t.isLoading},Xn=function(t,e){return t.categories=e.data,t.meta=e.meta,t.isLoading=!1,t.categories},Zn=function(t,e){return t.categories.push(e),t.categories},ti=function(t,e){return t.availableCategories=e,t.availableCategories},ei=function(t,e){return t.selectedCategory=e,t.selectedCategory},ni=function(t,e){return t.selectedCategory=e,t.selectedCategory},ii=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!0,t.categories},oi=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!1,t.categories},ai={RESET_STATE:Qn,LOADING:Wn,CATEGORIES:Xn,CREATE_CATEGORY:Zn,SET_SELECTED_CATEGORY:ei,SET_AVAILABLE_CATEGORIES:ti,UPLOAD_IMAGE:ni,ARCHIVE:ii,UNARCHIVE:oi},ri=Jn(),si={namespaced:!0,state:ri,actions:Vn,getters:Hn,mutations:ai},ci={get:function(t){return new Promise(function(e,n){co.get("/v1/events?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getEvent:function(t){return new Promise(function(e,n){co.get("/v1/events/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},publish:function(t){return new Promise(function(e,n){co.post("/v1/events/".concat(t.id,"/actions/publish")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},featureMedia:function(t){return new Promise(function(e,n){co.post("/v1/events/".concat(t.event_id,"/actions/featureMedia/").concat(t.image_id,"?include=media")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},archive:function(t){return new Promise(function(e,n){co.post("/v1/events/".concat(t.id,"/actions/archive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},activate:function(t){return new Promise(function(e,n){co.post("/v1/events/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/events",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/events/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},uploadImage:function(t,e){return new Promise(function(n,i){co.post("/v1/events/".concat(t.id,"/actions/uploadFeaturedImage"),{featured_image:e}).then(function(t){return n(t.data.data)},function(t){return i(t)})})},deleteImage:function(t,e){return new Promise(function(n,i){co.delete("/v1/events/".concat(t,"/actions/deleteImage/").concat(e)).then(function(t){return n(t)},function(t){return i(t)})})},getModules:function(){return new Promise(function(t,e){co.get("/v1/events/actions/getModules").then(function(e){return t(e.data)},function(t){return e(t)})})},getVideoTypes:function(){return new Promise(function(t,e){co.get("/v1/events/actions/getVideoTypes").then(function(e){return t(e.data)},function(t){return e(t)})})},isDraft:function(t){return"DRAFT"===t.status},isPublished:function(t){return"PUBLISHED"===t.status},isArchived:function(t){return"ARCHIVED"===t.status}},ui={loader:function(t,e){var n=t.commit;return new Promise(function(t){n("LOADING",e),t()})},get:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.get(e).then(function(e){n("EVENTS",e),n("LOADING",!1),t(e)},function(t){n("LOADING",!1),i(t)})})},getEvent:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.getEvent(e).then(function(e){n("SET_SELECTED_EVENT",e),t(e)},function(t){i(t)})})},publish:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.publish(e).then(function(e){n("PUBLISH",e),t(e)},function(t){return i(t)})})},featureMedia:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.featureMedia(e).then(function(e){n("FEATURE_MEDIA",e),t(e)},function(t){return i(t)})})},archive:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.archive(e).then(function(e){n("ARCHIVE",e),t(e)},function(t){return i(t)})})},activate:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.activate(e).then(function(e){n("ACTIVATE",e),t(e)},function(t){return i(t)})})},createEvent:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.create(e).then(function(e){n("CREATE_EVENT",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(L["a"])(t),new Promise(function(t,n){return ci.update(e).then(function(e){t(e)},function(t){return n(t)})})},uploadImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.uploadImage(e.event,e.encodedImage).then(function(i){n("UPLOAD_IMAGE",i),t(e.encodedImage)},function(t){return i(t)})})},deleteImage:function(t,e){var n=t.commit;return new Promise(function(t,i){return ci.deleteImage(e.event_id,e.image_id).then(function(i){n("DELETE_IMAGE",e),t(i)},function(t){return i(t)})})},getModules:function(t){var e=t.commit;return new Promise(function(t,n){return ci.getModules().then(function(n){e("MODULES",n),t(n)},function(t){return n(t)})})},getVideoTypes:function(t){var e=t.commit;return new Promise(function(t,n){return ci.getVideoTypes().then(function(n){e("VIDEO_TYPES",n),t(n)},function(t){return n(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},li=function(t){return t.events},di=function(t){return t.meta},mi=function(t){return t.isLoading},fi=function(t){return t.selectedEvent},pi=function(t){return t.modules},hi=function(t){return t.videoTypes},vi={events:li,meta:di,isLoading:mi,selectedEvent:fi,modules:pi,videoTypes:hi},gi=function(){return{events:[],meta:{},selectedEvent:{},isLoading:!1}},bi=function(t){Object.assign(t,gi())},Ci=function(t,e){return t.isLoading=e,t.isLoading},_i=function(t,e){return t.events=e.data,t.meta=e.meta,t.isLoading=!1,t.events},yi=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.id});return t.events[n].status=e.status,t.events},Si=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.id});return t.events[n].media=e.media,t.selectedEvent.media=e.media,t.events},wi=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.id});return t.events[n].status=e.status,t.events},Ai=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.id});return t.events[n].status=e.status,t.events},ki=function(t,e){return t.events.push(e),t.events},Ei=function(t,e){return t.selectedEvent=e,t.selectedEvent},$i=function(t,e){return t.selectedEvent=e,t.selectedEvent},ji=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.event_id}),i=t.events[n].media,o=_.findIndex(i,function(t){return t.id===e.image_id});i.splice(o,1)},Mi=function(t,e){return t.videoTypes=e,t.videoTypes},Li=function(t,e){return t.modules=e,t.modules},Pi={RESET_STATE:bi,LOADING:Ci,EVENTS:_i,PUBLISH:yi,FEATURE_MEDIA:Si,ARCHIVE:wi,ACTIVATE:Ai,CREATE_EVENT:ki,SET_SELECTED_EVENT:Ei,UPLOAD_IMAGE:$i,DELETE_IMAGE:ji,VIDEO_TYPES:Mi,MODULES:Li},Ii=gi(),Oi={namespaced:!0,state:Ii,actions:ui,getters:vi,mutations:Pi};i["default"].use(k["a"]);var Ti=new k["a"].Store({plugins:[Object(M["a"])()],modules:{auth:z,users:mt,countries:Vt,categories:ue,posts:Oe,myCountrySections:Xe,kkdSections:vn,members:Un,myCountryCategories:si,events:Oi},actions:{resetStates:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.dispatch("auth/resetState");case 2:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()}}),xi=new i["default"],Di=n("a925"),Ni={delete:"Fshi",no_data:"Nuk ka të dhëna të disponueshme.",phrase:'Krijuar me <span class="fa fa-fw fa-heart"></span> nga <a href="https://coding.al">coding.al</a>',confirmation_question:"Konfirmo veprimin",featureMedia:"Imazh kryesor",check_data_to_enable:"Ju lutem kontrolloni që informacioni është vendosur në të gjitha gjuhët e disponueshme në mënyrë që ky informacion të jetë i disponueshëm.",available_in:"I disponueshëm në",media:{upload:"Ngarko"},close:"Mbyll",save:"Ruaj"},qi={en:{common:Ni}},Ri={email:"Email",password:"Fjalëkalimi",submit:"Ruaj",login:"Hyr"},Ui={en:{auth:Ri}},Bi={name:"Emri",surname:"Mbiemri",email:"Email",search:"Kërko",clean:"Pastro",create:"Krijo",export:"Eksport",roles:"Roli",actions:"Veprime",enable:"Aktivizo",disable:"Arkivo",confirm:"Konfirmo",save:"Ruaj",role:"Roli",choose_role:"Zgjidh rolin",cancel:"Anullo",update_password:"Modifiko fjalëkalimin",edit:"Modifiko",user_confirm_confirmation:"Jeni të sigurtë që doni të konfirmoni këtë përdorues?",user_confirmed_successfully:"Përdoruesi u konfirmua me sukses",user_enable_confirmation:"Jeni të sigurtë që doni të aktivizoni këtë përdorues?",user_enabled_successfully:"Përdoruesi u aktivizua me sukses",user_disable_confirmation:"Jeni të sigurtë që doni të arkivoni këtë përdorues?",user_disabled_successfully:"Përdoruesi u arkivua me sukses",password:"Fjalëkalimi",password_confirmation:"Konfirmo fjalëkalimin",password_updated_successfully:"Fjalëkalimi u modifikua me sukses",user_created_successfully:"Përdoruesi u krijua me sukses",user_updated_successfully:"Përdoruesi u modifikua me sukses",image_uploaded_successfully:"Foto profilit u ngarkua me sukses",defaultOption:"Të gjithë"},Vi={en:{users:Bi}},zi={slug:"Fjalë kyce",name:"Emri",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",enable:"Aktivizo",disable:"Arkivo",save:"Ruaj",code:"Kodi",travel_precaution:"Kujdesi përgjatë udhëtimit",cancel:"Anullo",edit:"Modifiko",country_enable_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni informacionin rreth këtij shteti?",country_disable_confirmation:"Jeni të sigurtë që dëshironi të arkivoni informacionin rreth këtij shteti?",country_created_successfully:"Shteti u krijua me sukses",country_updated_successfully:"Shteti u modifikua me sukses",country_enabled_successfully:"Informazioni u shtua me sukses",country_disabled_successfully:"Informazioni u modifikua me sukses",sections:{title:"Titulli",order:"Renditja",description:"Përshkrimi",content:"Kontenti",moveUp:"Lëviz sipër në renditje",moveDown:"Lëviz poshtë në renditje",enable_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni informacionin rreth këtij shteti?",disable_confirmation:"Jeni të sigurtë që dëshironi të arkivoni informacionin rreth këtij shteti?",enabled_successfully:"Informazioni u aktivizua me sukses",disabled_successfully:"Informazioni u arkivua me sukses",no_data:"Nuk ka ende të dhëna të disponueshme, klikoni më poshtë për të krijuar të dhënat e para.",created_successfully:"Informazioni u shtua me sukses",updated_successfully:"Informazioni u modifikua me sukses"}},Gi={en:{countries:zi}},Fi={slug:"Fjalë kyce",name:"Emri",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",save:"Ruaj",cancel:"Anullo",archive:"Arkivo",unArchive:"Aktivizo",category_archived:"Kategoria u arkivua me sukses",category_unarchived:"Kategoria u aktivizua me sukses",category_archive_confirmation:"Jeni të sigurtë që dëshironi të arkivoni këtë kategori? Të gjitha postimet e kësaj kategorie nuk do të jenë më të disponueshme.",category_unarchive_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni këtë kategori? Të gjitha postimet e kësaj kategorie do të jenë sërish të disponueshme.",edit:"Modifiko",category_created_successfully:"Kategoria u krijua me sukses",category_updated_successfully:"Kategoria u modifikua me sukses",defaultOption:"Të gjitha"},Yi={en:{categories:Fi}},Ki={title:"Titulli",short_desc:"Përshkrimi Description",author:"Autori",content:"Konteti",published_at:"Publikuar në Published at",publish:"Publiko",feature:"Feature",archive:"Arkivo",enable:"Aktivizo",publish_confirmation:"Jeni të sigurtë që doni të publikoni këtë postim?",post_published:"Postimi u publikua me sukses",post_featured:"Post featured successfully",archive_confirmation:"Jeni të sigurtë që doni të arkivoni këtë postim?",post_archived:"Postimi u arkivua me sukses",activate_confirmation:"Jeni të sigurtë që doni të aktivizoni këtë postim?",post_activated:"Postimi u aktivizua me sukses",country:"Shteti",category:"Kategoria",status:"Statusi",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",save:"Ruaj",read_count:"Lexime",cancel:"Anullo",edit:"Modifiko",featuredImage:"Imazh kryesor",cropperPrompt:"Modifiko imazhin para ngarkimit",delete_media_confirmation:"Jeni të sigurtë që doni të fshini këtë imazh?",post_created_successfully:"Postimi u krijua me sukses",post_updated_successfully:"Postimi u modifikua me sukses",image_uploaded_successfully:"Imazhi u ngarkua me sukses",video_type:"Tipi video",label_video_url:'<span class="text-gray">Video id (https://youtu.be/<b>TvhqNGI5_VQ</b>)</span>',placeholder_video_url:"TvhqNGI5_VQ",statuses:{DRAFT:"Draft",PUBLISHED:"Publikuar",ARCHIVED:"Arkivuar"}},Hi={en:{posts:Ki}},Ji={slug:"Fjalë kyce",name:"Emri",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",enable:"Aktivizo",category:"Kategori",title:"Titulli",disable:"Arkivo",save:"Ruaj",code:"Kodi",travel_precaution:"Kujdesi përgjatë udhëtimit",cancel:"Anullo",edit:"Modifiko",country_enable_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni këtë informacion?",country_disable_confirmation:"Jeni të sigurtë që dëshironi të arkivoni këtë informacion?",country_created_successfully:"Informazioni u krijua me sukses",country_updated_successfully:"Informazioni u modifikua me sukses",country_enabled_successfully:"Informazioni u shtua me sukses",country_disabled_successfully:"Informazioni u modifikua me sukses"},Qi={en:{myCountrySections:Ji}},Wi={slug:"Fjalë kyce",name:"Emri",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",enable:"Aktivizo",title:"Titulli",disable:"Arkivo",save:"Ruaj",code:"Kodi",travel_precaution:"Kujdesi përgjatë udhëtimit",cancel:"Anullo",edit:"Modifiko",country_enable_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni këtë informacion?",country_disable_confirmation:"Jeni të sigurtë që dëshironi të arkivoni këtë informacion?",country_created_successfully:"Informazioni u krijua me sukses",country_updated_successfully:"Informazioni u modifikua me sukses",country_enabled_successfully:"Informazioni u shtua me sukses",country_disabled_successfully:"Informazioni u modifikua me sukses"},Xi={en:{kkdSections:Wi}},Zi={name:"Emri",position:"Pozicioni",author:"Autori",description:"Pershkrimi",published_at:"Publikuar në",publish:"Publiko",archive:"Arkivo",enable:"Aktivizo",publish_confirmation:"Jeni të sigurtë që doni të publikoni këtë anëtar?",post_published:"Anëtari u publikua me sukses",archive_confirmation:"Jeni të sigurtë që doni të arkivoni këtë anëtar?",post_archived:"Anëtari u arkivua me sukses",activate_confirmation:"Jeni të sigurtë që doni të aktivizoni këtë anëtar?",post_activated:"Anëtari u aktivizua me sukses",status:"Statusi",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",save:"Ruaj",cancel:"Anullo",edit:"Modifiko",cropperPrompt:"Modifiko imazhin para ngarkimit",delete_media_confirmation:"Jeni të sigurtë që doni të fshini këtë imazh?",member_created_successfully:"Anëtari u krijua me sukses",member_updated_successfully:"Anëtari u modifikua me sukses",video_type:"Tipi video",avatar:"Foto",image_uploaded_successfully:"Imazhi u ngarkua me sukses",label_video_url:'<span class="text-gray">Video id (https://youtu.be/<b>TvhqNGI5_VQ</b>)</span>',placeholder_video_url:"TvhqNGI5_VQ",statuses:{DRAFT:"Draft",PUBLISHED:"Publikuar",ARCHIVED:"Arkivuar"}},to={en:{members:Zi}},eo={slug:"Fjalë kyce",title:"Titulli",name:"Emri",search:"Kërko",clean:"Pastro",create:"Krijo",actions:"Veprime",save:"Ruaj",cancel:"Anullo",archive:"Arkivo",unArchive:"Aktivizo",category_archived:"Kategoria u arkivua me sukses",category_unarchived:"Kategoria u aktivizua me sukses",category_archive_confirmation:"Jeni të sigurtë që dëshironi të arkivoni këtë kategori? Të gjitha postimet e kësaj kategorie nuk do të jenë më të disponueshme.",category_unarchive_confirmation:"Jeni të sigurtë që dëshironi të aktivizoni këtë kategori? Të gjitha postimet e kësaj kategorie do të jenë sërish të disponueshme.",edit:"Modifiko",category_created_successfully:"Kategoria u krijua me sukses",category_updated_successfully:"Kategoria u modifikua me sukses",defaultOption:"Të gjitha"},no={en:{myCountryCategories:eo}},io={title:"Titulli",short_desc:"Përshkrimi Description",author:"Autori",content:"Konteti",published_at:"Publikuar në Published at",publish:"Publiko",feature:"Feature",archive:"Arkivo",enable:"Aktivizo",publish_confirmation:"Jeni të sigurtë që doni të publikoni këtë eventim?",event_published:"Aktiviteti u publikua me sukses",event_featured:"Aktiviteti featured successfully",archive_confirmation:"Jeni të sigurtë që doni të arkivoni këtë aktivitet?",event_archived:"Aktiviteti u arkivua me sukses",activate_confirmation:"Jeni të sigurtë që doni të aktivizoni këtë aktivitet?",event_activated:"Aktiviteti u aktivizua me sukses",country:"Shteti",category:"Kategoria",status:"Statusi",search:"Kërko",clean:"Pastro",for:"Për",when:"Orari",location:"Vendi",create:"Krijo",actions:"Veprime",save:"Ruaj",read_count:"Lexime",cancel:"Anullo",edit:"Modifiko",featuredImage:"Imazh kryesor",cropperPrompt:"Modifiko imazhin para ngarkimit",delete_media_confirmation:"Jeni të sigurtë që doni të fshini këtë imazh?",event_created_successfully:"Aktiviteti u krijua me sukses",event_updated_successfully:"Aktiviteti u modifikua me sukses",image_uploaded_successfully:"Imazhi u ngarkua me sukses",video_type:"Tipi video",label_video_url:'<span class="text-gray">Video id (https://youtu.be/<b>TvhqNGI5_VQ</b>)</span>',placeholder_video_url:"TvhqNGI5_VQ",statuses:{DRAFT:"Draft",PUBLISHED:"Publikuar",ARCHIVED:"Arkivuar"}},oo={en:{events:io}};i["default"].use(Di["a"]);var ao=new Di["a"]({locale:"sq",fallbackLocale:"sq",messages:{}});ao.mergeLocaleMessage("en",qi.en),ao.mergeLocaleMessage("sq",qi.en),ao.mergeLocaleMessage("en",Ui.en),ao.mergeLocaleMessage("sq",Ui.en),ao.mergeLocaleMessage("en",Vi.en),ao.mergeLocaleMessage("sq",Vi.en),ao.mergeLocaleMessage("en",Gi.en),ao.mergeLocaleMessage("sq",Gi.en),ao.mergeLocaleMessage("en",Yi.en),ao.mergeLocaleMessage("sq",Yi.en),ao.mergeLocaleMessage("en",Hi.en),ao.mergeLocaleMessage("sq",Hi.en),ao.mergeLocaleMessage("en",Qi.en),ao.mergeLocaleMessage("sq",Qi.en),ao.mergeLocaleMessage("en",Xi.en),ao.mergeLocaleMessage("sq",Xi.en),ao.mergeLocaleMessage("en",to.en),ao.mergeLocaleMessage("sq",to.en),ao.mergeLocaleMessage("en",no.en),ao.mergeLocaleMessage("sq",no.en),ao.mergeLocaleMessage("en",oo.en),ao.mergeLocaleMessage("sq",oo.en);var ro=ao,so=$.a.create({baseURL:"http://api.diaspora.coding.al/api/",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json","Accept-Language":"en"}});so.interceptors.request.use(function(t){var e=Ti.getters["auth/token"];return e&&(t.headers.Authorization=e),t.headers["Accept-Language"]=ro.locale||"en",t},function(t){return 401===t.response.status&&Ti.dispatch("auth/logout"),Promise.reject(t.response.data)}),so.interceptors.response.use(function(t){return t},function(t){return t.response&&401===t.response.status&&(Ti.dispatch("resetStates"),xi.$emit("received-401",t.response.data)),Promise.reject(t.response?t.response.data:t)});var co=so,uo={get:function(t){return new Promise(function(e,n){co.get("/v1/users?".concat(ft(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableUsers:function(){return new Promise(function(t,e){co.get("/v1/users/actions/getAvailableUsers").then(function(e){return t(e.data)},function(t){return e(t)})})},getUser:function(t){return new Promise(function(e,n){co.get("/v1/users/".concat(t)).then(function(t){return e(t.data.data)},function(t){return n(t)})})},confirm:function(t){return new Promise(function(e,n){co.post("/v1/users/".concat(t.id,"/actions/confirm")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},enable:function(t){return new Promise(function(e,n){co.post("/v1/users/".concat(t.id,"/actions/enable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},disable:function(t){return new Promise(function(e,n){co.post("/v1/users/".concat(t.id,"/actions/disable")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},updatePassword:function(t,e){return new Promise(function(n,i){co.post("/v1/users/".concat(t.id,"/actions/updatePassword"),e).then(function(t){return n(t.data.data)},function(t){return i(t)})})},create:function(t){return new Promise(function(e,n){co.post("/v1/users",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return new Promise(function(e,n){co.put("/v1/users/".concat(t.id),t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},exportExcel:function(t){return new Promise(function(e,n){co({url:"v1/users/actions/exportExcel?".concat(ft(t)),method:"GET",responseType:"blob"}).then(function(t){var n=window.URL.createObjectURL(new Blob([t.data])),i=document.createElement("a");i.href=n,i.setAttribute("download","export.xlsx"),document.body.appendChild(i),i.click(),e(t.data.data)},function(t){return n(t)})})},uploadImage:function(t,e){return new Promise(function(n,i){co.post("/v1/users/".concat(t.id,"/actions/uploadImage"),{image:e}).then(function(t){return n(t.data.data)},function(t){return i(t)})})},getRoles:function(){return new Promise(function(t,e){co.get("/v1/users/actions/getRoles").then(function(e){return t(e.data.data)},function(t){return e(t)})})},isAdmin:function(){var t=Ti.getters["auth/userData"];return this.hasRole(t,"admin")},isEditor:function(){var t=Ti.getters["auth/userData"];return this.hasRole(t,"editor")},isRedactor:function(){var t=Ti.getters["auth/userData"];return this.hasRole(t,"redactor")},hasRole:function(t,e){return!!t&&_.map(t.roles,function(t){return t.name}).indexOf(e)>-1},getRolesNames:function(t){return _.map(t.roles,function(t){return t.name}).join(", ")}},lo={name:"Header",components:{},computed:Object(A["a"])({},Object(k["b"])({isAuth:"auth/isAuth",token:"auth/token"})),data:function(){return{routes:[{label:"Shtetet",name:"Countries"},{label:"Kategoritë",name:"Categories"},{label:"Postimet",name:"Posts"},{label:"Kategoritë Vendi im",name:"MyCountryCategories"},{label:"Vendi im",name:"MyCountry"},{label:"KKD",name:"KkdSections"},{label:"Anetaret",name:"Members"},{label:"Aktivitete",name:"Events"}]}},methods:Object(A["a"])({},uo,{logout:function(){var t=this;t.$store.dispatch("resetStates"),t.$router.push({name:"Login"})}})},mo=lo,fo=(n("31bf"),n("2877")),po=Object(fo["a"])(mo,S,w,!1,null,"3e4b989d",null),ho=po.exports,vo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("p",{staticClass:"text-center",domProps:{innerHTML:t._s(t.$t("common.phrase"))}})])])])},go=[],bo={name:"Header"},Co=bo,_o=Object(fo["a"])(Co,vo,go,!1,null,"60234f42",null),yo=_o.exports,So={name:"app",components:{CustomHeader:ho,CustomFooter:yo},mounted:function(){var t=this;xi.$on("received-401",function(e){t.notificationService.error(e),t.$router.push({name:"Login"})}),t.$validator.extend("required",{getMessage:function(){return"Kjo fushë është e detyrueshme"},validate:function(t){return!!t}}),t.$validator.extend("max",{getMessage:function(t,e){return"Kjo fushë nuk duhet të ketë më shumë se ".concat(e[0]," karaktere")},validate:function(t,e){return t&&t.length<=parseInt(e[0],10)}}),t.$validator.extend("url",{getMessage:function(){return"Kjo fushë duhet të jetë një url e vlefshme"},validate:function(t){return/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)}}),t.$validator.extend("email",{getMessage:function(){return"Kjo fushë duhet të jetë një email i vlefshëm"},validate:function(t){var e=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;return e.test(String(t).toLowerCase())}})}},wo=So,Ao=(n("5c0b"),Object(fo["a"])(wo,C,y,!1,null,null,null)),ko=Ao.exports,Eo=n("75fc"),$o=n("8c4f"),jo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[t._m(0),n("div",{staticClass:"row pb-3"},[n("div",{staticClass:"col-md-6 offset-md-3"},[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.login(t.user)}}},[n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("auth.email"),placeholder:t.$t("auth.email"),id:"email",name:"email",type:"text"},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}}),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("auth.password"),placeholder:t.$t("auth.password"),id:"password",name:"password",type:"password"},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}}),n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col mx-auto"},[n("CALButton",{attrs:{disabled:t.errors.any(),"button-class":"btn btn-primary w-100",type:"submit",loading:t.loadingLogin}},[t._v("\n "+t._s(t.$t("auth.login"))+"\n ")])],1)])])],1)])])])},Mo=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"row pt-5 pb-5"},[n("div",{staticClass:"col-md-6 offset-md-3 text-center"},[n("img",{attrs:{src:"assets/logo.png",width:"250px"}})])])}],Lo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:t.id},domProps:{innerHTML:t._s(t.isRequired?t.label+"*":t.label)}}),"checkbox"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.InputData,expression:"InputData"}],staticClass:"form-control",attrs:{disabled:t.disabled,id:t.id,min:t.min,name:t.name,placeholder:t.placeholder,autocomplete:"off",type:"checkbox"},domProps:{checked:Array.isArray(t.InputData)?t._i(t.InputData,null)>-1:t.InputData},on:{input:function(e){return t.$emit("input",e.target.value)},change:[function(e){var n=t.InputData,i=e.target,o=!!i.checked;if(Array.isArray(n)){var a=null,r=t._i(n,a);i.checked?r<0&&(t.InputData=n.concat([a])):r>-1&&(t.InputData=n.slice(0,r).concat(n.slice(r+1)))}else t.InputData=o},function(e){return t.inputChanged()}]}}):"radio"===t.type?n("input",{directives:[{name:"model",rawName:"v-model",value:t.InputData,expression:"InputData"}],staticClass:"form-control",attrs:{disabled:t.disabled,id:t.id,min:t.min,name:t.name,placeholder:t.placeholder,autocomplete:"off",type:"radio"},domProps:{checked:t._q(t.InputData,null)},on:{input:function(e){return t.$emit("input",e.target.value)},change:[function(e){t.InputData=null},function(e){return t.inputChanged()}]}}):n("input",{directives:[{name:"model",rawName:"v-model",value:t.InputData,expression:"InputData"}],staticClass:"form-control",attrs:{disabled:t.disabled,id:t.id,min:t.min,name:t.name,placeholder:t.placeholder,autocomplete:"off",type:t.type},domProps:{value:t.InputData},on:{input:[function(e){e.target.composing||(t.InputData=e.target.value)},function(e){return t.$emit("input",e.target.value)}],change:function(e){return t.inputChanged()}}})])},Po=[],Io=(n("c5f6"),{name:"Input",$_veeValidate:{value:function(){return this.InputData},name:function(){return this.name}},props:{min:{type:Number,required:!1},name:{type:String,required:!1},label:{type:String,required:!1},placeholder:{type:String,required:!1},type:{type:String,required:!1},id:{type:String,required:!1},disabled:{type:Boolean,required:!1},isRequired:{type:Boolean,default:!1},value:{},validation:{}},data:function(){return{InputData:void 0}},created:function(){this.InputData=this.value},watch:{value:function(t){this.InputData=t}},methods:{inputChanged:function(){this.$emit("input",this.InputData),"function"===typeof this.change&&this.change()}}}),Oo=Io,To=Object(fo["a"])(Oo,Lo,Po,!1,null,"53552180",null),xo=To.exports,Do=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("vue-ladda",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],class:t.buttonClass,attrs:{"data-style":"zoom-in","data-size":"s",type:t.type,loading:t.loading,title:t.title,disabled:t.disabled},on:{click:function(e){return t.$emit("click")}}},[t._t("default",[n("i",{staticClass:"fa",class:t.faIcon})])],2)},No=[],qo={name:"Button",props:{faIcon:{type:String,default:null},title:{type:String,default:null},buttonClass:{type:[String,Array]},loading:{type:Boolean,default:!1},type:{type:String,default:"button"},disabled:{type:[Boolean,String]}}},Ro=qo,Uo=Object(fo["a"])(Ro,Do,No,!1,null,null,null),Bo=Uo.exports,Vo={computed:Object(A["a"])({},Object(k["b"])({})),components:{InputComponent:xo,CALButton:Bo},data:function(){return{user:{},loadingLogin:!1,search:null}},methods:{login:function(t){var e=this;e.loadingLogin=!0,e.$store.dispatch("auth/login",t).then(function(){e.$store.dispatch("auth/me").then(function(){e.loadingLogin=!1,e.$router.push({name:"Posts"})},function(){e.loadingLogin=!1})},function(t){e.loadingLogin=!1,e.notificationService.error(t)})}}},zo=Vo,Go=Object(fo["a"])(zo,jo,Mo,!1,null,null,null),Fo=Go.exports,Yo=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[t._m(0),n("div",{staticClass:"row pb-3"},[n("div",{staticClass:"col-md-6 offset-md-3"},[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.login(t.user)}}},[n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("auth.password"),placeholder:t.$t("auth.password"),id:"password",name:"password",type:"password"},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}}),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.password_confirmation"),placeholder:t.$t("users.password_confirmation"),id:"password_confirmation",name:"password_confirmation",type:"password"},model:{value:t.user.password_confirmation,callback:function(e){t.$set(t.user,"password_confirmation",e)},expression:"user.password_confirmation"}}),n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col mx-auto"},[n("CALButton",{attrs:{disabled:t.errors.any(),"button-class":"btn btn-primary w-100",type:"submit",loading:t.loadingLogin}},[t._v("\n "+t._s(t.$t("auth.submit"))+"\n ")])],1)])])],1)])])])},Ko=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"row pt-5 pb-5"},[n("div",{staticClass:"col-md-6 offset-md-3 text-center"},[n("img",{attrs:{src:"assets/logo.png",width:"250px"}})])])}],Ho={computed:Object(A["a"])({},Object(k["b"])({})),components:{InputComponent:xo,CALButton:Bo},data:function(){return{user:{},loadingLogin:!1,search:null}},methods:{login:function(){var t=this,e=this.$route.query,n=e.token,i=e.email;this.user.email=i,P.resetPassword(Object(A["a"])({},{token:n},this.user)).then(function(){t.$router.push({name:"ResetPasswordSuccess"})},function(){t.notificationService.error("Ju lutem kontrolloni te dhenat e vendosura, ne rast se errori perseritet kontaktoni me administratoret e sistemit!")})}}},Jo=Ho,Qo=Object(fo["a"])(Jo,Yo,Ko,!1,null,null,null),Wo=Qo.exports,Xo=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},Zo=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row pt-5 pb-5"},[n("div",{staticClass:"col-md-6 offset-md-3 text-center"},[n("img",{attrs:{src:"assets/logo.png",width:"250px"}})])]),n("div",{staticClass:"row pb-3"},[n("div",{staticClass:"col-md-6 offset-md-3"},[n("h3",{staticClass:"text-center"},[t._v('Fjalekalimi juaj u ndryshua me sukses! Ju lutem kthehu ne aplikacion "Diaspora Shqiptare" per tu loguar.')])])])])}],ta={},ea=ta,na=Object(fo["a"])(ea,Xo,Zo,!1,null,null,null),ia=na.exports,oa=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},aa=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("h1",{staticClass:"text-center"},[t._v("PRIVATËSIA")]),n("h3",[t._v("OBJEKTI I KËSAJ RREGULLOREJE")]),n("p",[t._v("Kjo Rregullore ka për objekt informimin e subjekteve të të dhënave personale mbi mënyrën e mbledhjes,\n përpunimit, përhapjes, ruajtjes dhe masave të sigurisë që janë marrë për të dhënat e tyre.")]),n("p",[t._v("Bazuar në:")]),n("ul",[n("li",[t._v("Kushtetutën e Republikës së Shqipërisë")]),n("li",[t._v("Ligjin Nr.9887 datë 10.03.2008 ‘Për Mbrojtjen e të Dhënave Personale’")]),n("li",[t._v("Ligjin Nr.9918 datë 19.05.2008 ‘Për Komunikimet Elektronike dhe Postare’ si dhe aktet e tjera nënligjore\n në plotësim\n ")])]),n("p",[t._v("INSTANT kryen përpunimin e ligjshëm të të dhënave personale duke respektuar dhe garantuar të drejtat dhe\n liritë themelore të njeriut dhe, në veçanti, të drejtën e ruajtjes së jetës private.")]),n("h3",[t._v("MBROJTJA E TË DHËNAVE")]),n("p",[t._v("Mbrojtja e të dhënave bazohet në:")]),n("ul",[n("li",[t._v("Përpunimin në mënyrë të drejtë dhe të ligjshme;")]),n("li",[t._v("Grumbullimin për qëllime specifike, të përcaktuara qartë, e legjitime dhe në përpunimin në përputhje me\n këto qëllime;\n ")]),n("li",[t._v("Mjaftueshmërinë e të dhënave, të cilat duhet të lidhen me qëllimin e përpunimit dhe të mos e tejkalojnë\n këtë qëllim;\n ")]),n("li",[t._v("Saktësinë që të dhënat duhet të kenë dhe, kur është e nevojshme, duhet të përditësohen duhet ndërmarrë\n çdo hap i arsyeshëm për të fshirë apo korrigjuar të dhëna të pasakta apo të paplota, në lidhje me\n qëllimin për të cilin janë mbledhur apo për të cilin përpunohen më tej;\n ")]),n("li",[t._v("Mbajtjen në atë formë, që të lejojë identifikimin e subjekteve të të dhënave për një kohë, por jo më\n tepër sesa është e nevojshme për qëllimin, për të cilin ato janë grumbulluar ose përpunuar më tej.\n ")])]),n("h3",[t._v("TË DREJTAT E SUBJEKTIT TË TË DHËNAVE")]),n("p",[n("strong",[t._v("– E drejta për akses")])]),n("p",[t._v("Çdo person ka të drejtë që pa pagesë me kërkesë me shkrim, të marrë nga kontrolluesi:")]),n("ul",[n("li",[t._v("konfirmimin nëse të dhënat personale po i përpunohen ose jo, informacion për qëllimin e përpunimit, për\n kategoritë e të dhënave të përpunuara dhe për marrësit e kategoritë e marrësve, të cilëve u përhapen të\n dhënat personale;\n ")]),n("li",[t._v("\n në një formë të kuptueshme, të dhënat personale dhe informacionin e disponueshëm për burimin e tyre;\n ")])]),n("p",[t._v("Kontrolluesi, brenda 30 ditëve nga data e marrjes së kërkesës, informon subjektin e të dhënave ose i shpjegon\n atij arsyet e mosdhënies së informacionit.")]),n("h3",[t._v("E DREJTA PËR TË KËRKUAR BLLOKIMIN,KORRIGJIM, FSHIRRJEN")]),n("p",[t._v("Çdo subjekt i të dhënave ka të drejtë të kërkojë bllokimin, korrigjimin ose fshirjen e të dhënave pa pagesë,\n kur vihet në dijeni se të dhënat rreth tij nuk janë të rregullta, të vërteta, të plota ose janë përpunuar\n dhe mbledhur në kundërshtim me dispozitat e këtij ligji.")]),n("p",[t._v("Kontrolluesi, brenda 30 ditëve nga data e marrjes së kërkesës së subjektit të të dhënave, duhet ta informojë\n atë për përpunimin e ligjshëm të të dhënave, kryerjen ose moskryerjen e bllokimit, korrigjimit apo të\n fshirjes.")]),n("p",[t._v("Kur kontrolluesi nuk bën bllokimin, korrigjimin ose fshirjen e të dhënave të kërkuara prej tij, subjekti i të\n dhënave ka të drejtë të ankohet te komisioneri.")]),n("h3",[t._v("PËRHAPJA E TË DHËNAVE PERSONALE")]),n("p",[t._v("INSTANT nuk i transmeton të dhënat tuaja personale palëve të treta, me përjashtim të rasteve kur është dhënë\n pëlqimi juaj shprehimisht për një gjë të tillë.")]),n("h3",[t._v("MASAT E SIGURISË NË LIDHJE ME TË DHËNAT PERSONALE")]),n("p",[t._v("INSTANT, është i ndërgjegjshëm për rëndësinë dhe sensitivitetin e të dhënave personale dhe respekton në\n mënyrë rigoroze masat për sigurinë që parashikohen në Ligjin Nr 9887 datë 10.03.2008 ‘Për Mbrojtjen e të\n Dhënave Personale’ Kjo arrihet nëpërmjet përdorimit të teknikave të avancuara dhe moderne për të ruajtur\n bazat e të dhënave dhe sistemet e saj kompjuterike. Po ashtu, INSTANT kujdeset që transferimi dhe\n regjistrimi i të dhënave të bëhet me masa të plota sigurie në përputhje të plotë me legjislacionin\n përkatës.")]),n("p",[t._v("Ky njoftim mbi ruajtjen e privatësisë për të arritur mbrojtjen e të dhënave personale nuk përfshin lidhjet\n midis kësaj faqeje dhe faqeve të tjera. Ne ju inkurajojmë të lexoni deklaratat e privatësisë në faqet e\n tjera të internetit që ju vizitoni pasi kushtet e këtyre faqeve mund të ndryshojnë nga ato të\n INSTANT-it.")]),n("h3",[t._v("PYETJE APO ANKESA")]),n("p",[t._v("Me anë të shpjegimit të mësipërm, INSTANT shpreson t’ju ketë informuar saktësisht dhe në mënyrë të plotë\n rreth çështjeve të privatësisë suaj.")]),n("p",[t._v("Nëse keni pyetje, ankesa/kërkesa, ose vërejtje rreth këtyre çështjeve, mos hezitoni që të na kontaktoni në\n adresën e mëposhtme")])])}],ra={computed:Object(A["a"])({},Object(k["b"])({})),data:function(){return{user:{},loadingLogin:!1,search:null}}},sa=ra,ca=Object(fo["a"])(sa,oa,aa,!1,null,null,null),ua=ca.exports,la=[{path:"/",name:"Login",component:Fo,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Ti.getters["auth/isAuth"]?i({name:"Posts"}):i();case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/arp",name:"ResetPassword",component:Wo},{path:"/rps",name:"ResetPasswordSuccess",component:ia},{path:"/privacy_policy",name:"PrivacyPolicy",component:ua}],da=la,ma=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("users.name"),placeholder:t.$t("users.name"),id:"name",name:"name",type:"text"},model:{value:t.search.name,callback:function(e){t.$set(t.search,"name",e)},expression:"search.name"}})],1),n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("users.surname"),placeholder:t.$t("users.surname"),id:"surname",name:"surname",type:"text"},model:{value:t.search.surname,callback:function(e){t.$set(t.search,"surname",e)},expression:"search.surname"}})],1),n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("users.email"),placeholder:t.$t("users.email"),id:"email",name:"email",type:"text"},model:{value:t.search.email,callback:function(e){t.$set(t.search,"email",e)},expression:"search.email"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("users.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("users.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createUser()}}},[t._v(t._s(t.$t("users.create"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-info mr-1",loading:t.exportAction},on:{click:function(e){return t.exportData()}}},[t._v(t._s(t.$t("users.export"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.users&&0!==t.users.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.users&&t.users.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("users.name")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("users.surname")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("users.email")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("users.roles")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("users.actions")))])])]),n("tbody",t._l(t.users,function(e){return n("tr",{key:e.id,class:e.is_confirmed?"":"table-danger"},[n("td",[t._v(t._s(e.name))]),n("td",[t._v(t._s(e.surname))]),n("td",[t._v(t._s(e.email))]),n("td",[t._v(t._s(t.UserService.getRolesNames(e)))]),n("td",{staticClass:"text-right"},[e.is_confirmed?t._e():n("CALButton",{attrs:{title:t.$t("users.confirm"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showConfirmUserConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]),e.is_confirmed&&!e.is_enabled?n("CALButton",{attrs:{title:t.$t("users.enable"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showEnableUserConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]):t._e(),e.is_confirmed&&e.is_enabled?n("CALButton",{attrs:{title:t.$t("users.disable"),"button-class":"btn btn-danger btn-sm m-1"},on:{click:function(n){return t.showDisableUserConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]):t._e(),n("CALButton",{attrs:{title:t.$t("users.update_password"),"button-class":"btn btn-warning btn-sm m-1"},on:{click:function(n){return t.showPasswordModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-key"})]),n("CALButton",{attrs:{title:t.$t("users.edit"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})])],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1)]),t.isShowingConfirmUserConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.userAction,message:t.$t("users.user_confirm_confirmation")},on:{cancel:function(e){return t.closeConfirmUserConfirmationModal()},confirm:t.confirmUser}}):t._e(),t.isShowingEnableUserConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.userAction,message:t.$t("users.user_enable_confirmation")},on:{cancel:function(e){return t.closeEnableUserConfirmationModal()},confirm:t.enableUser}}):t._e(),t.isShowingDisableUserConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.userAction,message:t.$t("users.user_disable_confirmation")},on:{cancel:function(e){return t.closeDisableUserConfirmationModal()},confirm:t.disableUser}}):t._e(),t.isShowingPasswordModal?n("password-modal",{attrs:{"loading-button":t.userAction},on:{cancel:function(e){return t.closePasswordModal()},confirm:t.updatePassword}}):t._e()],1)},fa=[],pa=(n("386d"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.showSpinner?n("div",{staticClass:"coding-al-action-spinner primary-spinner"},[n("div",{staticClass:"bounce1"}),n("div",{staticClass:"bounce2"}),n("div",{staticClass:"bounce3"})]):t._e()}),ha=[],va={props:{showSpinner:{type:Boolean,required:!0}}},ga=va,ba=Object(fo["a"])(ga,pa,ha,!1,null,"649c46c5",null),Ca=ba.exports,_a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"modal-fade"}},[n("div",{staticClass:"modal",staticStyle:{display:"block"}},[n("div",{staticClass:"modal-dialog d-flex",attrs:{role:"document"}},[n("div",{staticClass:"modal-content"},[n("div",{staticClass:"modal-header"},[n("h5",{staticClass:"modal-title"},[t._v(t._s(t.ttl))])]),n("div",{staticClass:"modal-body"},[t._t("default",[n("p",[t._v(t._s(t.message))])])],2),n("div",{staticClass:"modal-footer"},[n("CALButton",{attrs:{"button-class":"btn btn-primary",loading:t.loadingButton},on:{click:t.onConfirm}},[n("span",[t._v(t._s(t.$t("common.save")))])]),n("CALButton",{attrs:{"button-class":"btn btn-secondary","data-dismiss":"modal",loading:t.loadingButton},on:{click:t.onCancel}},[n("span",[t._v(t._s(t.$t("common.close")))])])],1)])])])])},ya=[],Sa={name:"ConfirmationModal",components:{CALButton:Bo},props:{title:{required:!1},message:{required:!1},loadingButton:{required:!0}},data:function(){return{ttl:""}},mounted:function(){this.title?this.ttl=this.title:this.ttl=this.$t("common.confirmation_question")},methods:{onConfirm:function(){this.$emit("confirm")},onCancel:function(){this.$emit("cancel")}}},wa=Sa,Aa=Object(fo["a"])(wa,_a,ya,!1,null,null,null),ka=Aa.exports,Ea=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"modal-fade"}},[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.onConfirm(e)}}},[n("div",{staticClass:"modal",staticStyle:{display:"block"}},[n("div",{staticClass:"modal-dialog modal-md d-flex",attrs:{role:"document"}},[n("div",{staticClass:"modal-content"},[n("div",{staticClass:"modal-header"},[n("h5",{staticClass:"modal-title"},[t._v(t._s(t.$t("users.update_password")))])]),n("div",{staticClass:"modal-body"},[n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.password"),placeholder:t.$t("users.password"),id:"password",name:"password",type:"password"},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}}),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.password_confirmation"),placeholder:t.$t("users.password_confirmation"),id:"password_confirmation",name:"password_confirmation",type:"password"},model:{value:t.user.password_confirmation,callback:function(e){t.$set(t.user,"password_confirmation",e)},expression:"user.password_confirmation"}})],1),n("div",{staticClass:"modal-footer"},[n("CALButton",{attrs:{disabled:t.errors.any(),"button-class":"btn btn-primary",loading:t.loadingButton}},[n("span",[t._v(t._s(t.$t("users.save")))])]),n("CALButton",{attrs:{"button-class":"btn btn-default","data-dismiss":"modal",type:"button",loading:t.loadingButton},on:{click:t.onCancel}},[t._v("\n "+t._s(t.$t("users.cancel"))+"\n ")])],1)])])])])])},$a=[],ja={name:"PasswordModal",props:{loadingButton:{required:!0}},components:{InputComponent:xo,CALButton:Bo},data:function(){return{user:{}}},methods:{onConfirm:function(){this.$emit("confirm",this.user)},onCancel:function(){this.$emit("cancel")}}},Ma=ja,La=Object(fo["a"])(Ma,Ea,$a,!1,null,null,null),Pa=La.exports,Ia=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{on:{click:function(e){return t.$emit("click")}}},[n("p",{staticClass:"text-center mb-0"},[t._v(t._s(t.message))])])},Oa=[],Ta={name:"EmptyComponent",props:{message:{required:!0}}},xa=Ta,Da=Object(fo["a"])(xa,Ia,Oa,!1,null,null,null),Na=Da.exports,qa={computed:Object(A["a"])({},Object(k["b"])({users:"users/users",meta:"users/meta",isLoading:"users/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,NoData:Na,CALButton:Bo,ConfirmationModal:ka,PasswordModal:Pa},data:function(){return{isShowingConfirmUserConfirmationModal:!1,isShowingDisableUserConfirmationModal:!1,isShowingEnableUserConfirmationModal:!1,isShowingPasswordModal:!1,userAction:!1,searchAction:!1,exportAction:!1,search:{include:"roles"},selectedUser:{},UserService:uo}},methods:Object(A["a"])({},Object(k["c"])({setSelectedUser:"users/SET_SELECTED_USER"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("users/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},enableUser:function(){var t=this;t.showSpinner("userAction"),t.$store.dispatch("users/enable",t.selectedUser).then(function(){t.notificationService.success(t.$t("users.user_enabled_successfully")),t.hideSpinner("userAction"),t.closeEnableUserConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("userAction")})},disableUser:function(){var t=this;t.showSpinner("userAction"),t.$store.dispatch("users/disable",t.selectedUser).then(function(){t.notificationService.success(t.$t("users.user_disabled_successfully")),t.hideSpinner("userAction"),t.closeDisableUserConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("userAction")})},confirmUser:function(){var t=this;t.showSpinner("userAction"),t.$store.dispatch("users/confirm",t.selectedUser).then(function(){t.notificationService.success(t.$t("users.user_confirmed_successfully")),t.hideSpinner("userAction"),t.closeConfirmUserConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("userAction")})},edit:function(t){var e=this;e.selectedUser=t,e.setSelectedUser(t),e.$router.push({name:"EditUser",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},resetSelectedUser:function(){this.selectedUser={}},showEnableUserConfirmationModal:function(t){this.selectedUser=t,this.setSelectedUser(t),this.isShowingEnableUserConfirmationModal=!0},closeEnableUserConfirmationModal:function(){this.isShowingEnableUserConfirmationModal=!1,this.resetSelectedUser()},showDisableUserConfirmationModal:function(t){this.selectedUser=t,this.setSelectedUser(t),this.isShowingDisableUserConfirmationModal=!0},closeDisableUserConfirmationModal:function(){this.isShowingDisableUserConfirmationModal=!1,this.resetSelectedUser()},showConfirmUserConfirmationModal:function(t){this.selectedUser=t,this.setSelectedUser(t),this.isShowingConfirmUserConfirmationModal=!0},closeConfirmUserConfirmationModal:function(){this.isShowingConfirmUserConfirmationModal=!1,this.resetSelectedUser()},showPasswordModal:function(t){this.selectedUser=t,this.setSelectedUser(t),this.isShowingPasswordModal=!0},closePasswordModal:function(){this.isShowingPasswordModal=!1,this.resetSelectedUser()},updatePassword:function(t){var e=this;e.showSpinner("userAction"),e.$store.dispatch("users/updatePassword",{user:e.selectedUser,payload:t}).then(function(){e.notificationService.success(e.$t("users.password_updated_successfully")),e.hideSpinner("userAction"),e.closePasswordModal()},function(t){e.notificationService.error(t),e.hideSpinner("userAction")})},createUser:function(){this.$router.push({name:"NewUser"})},exportData:function(){var t=this;t.showSpinner("exportAction"),uo.exportExcel(t.search).then(function(){t.hideSpinner("exportAction")},function(e){t.notificationService.error(e),t.hideSpinner("exportAction")})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},Ra=qa,Ua=Object(fo["a"])(Ra,ma,fa,!1,null,null,null),Ba=Ua.exports,Va=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("user",{attrs:{isNew:!0,loading:t.saving,user:t.user},on:{save:t.save}})],1)])])},za=[],Ga=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.user)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingUser}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingUser,expression:"!loadingUser"}]},[t.isNew?t._e():n("media-upload",{attrs:{className:"user-avatar",loading:t.loading,resource:t.user.avatar},on:{fileAdded:t.imageSelected}}),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.name"),placeholder:t.$t("users.name"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.user.name,callback:function(e){t.$set(t.user,"name",e)},expression:"user.name"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.surname"),placeholder:t.$t("users.surname"),id:"surname",name:"surname",type:"text","is-required":!0},model:{value:t.user.surname,callback:function(e){t.$set(t.user,"surname",e)},expression:"user.surname"}}),t.errors.has("surname")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("surname")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|email",expression:"'required|email'",modifiers:{initial:!0}}],attrs:{disabled:!t.isNew,label:t.$t("users.email"),placeholder:t.$t("users.email"),id:"email",name:"email",type:"text","is-required":!0},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}}),t.errors.has("email")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("email")))]):t._e(),t.isNew?n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"role"}},[t._v(t._s(t.$t("users.role"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.user.role_id,expression:"user.role_id"},{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"role",name:"role"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.user,"role_id",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v(t._s(t.$t("users.choose_role")))]),t._l(t.roles,function(e){return n("option",{key:e.name,domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})],2)]):t._e(),t.errors.has("role")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("role")))]):t._e(),t.isNew?n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.password"),placeholder:t.$t("users.password"),id:"password",name:"password",type:"password","is-required":!0},model:{value:t.user.password,callback:function(e){t.$set(t.user,"password",e)},expression:"user.password"}}):t._e(),t.errors.has("password")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("password")))]):t._e(),t.isNew?n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("users.password_confirmation"),placeholder:t.$t("users.password_confirmation"),id:"password_confirmation",name:"password_confirmation",type:"password","is-required":!0},model:{value:t.user.password_confirmation,callback:function(e){t.$set(t.user,"password_confirmation",e)},expression:"user.password_confirmation"}}):t._e(),t.errors.has("password_confirmation")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("password_confirmation")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("users.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("users.cancel"))+"\n ")])],1)],1)},Fa=[],Ya=(n("28a5"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.className},[n("div",[n("div",{ref:"button",staticClass:"media-upload m-auto",class:{loading:t.loading},style:{backgroundImage:"url("+t.resource+")"}},[n("div",{staticClass:"edit-image-hover"},[n("p",[t._v(t._s(t.$t("common.media.upload")))])])])])])}),Ka=[],Ha=n("ebc7"),Ja=n.n(Ha),Qa={name:"MediaUpload",props:{resource:{type:String,required:!1},options:{type:Object,required:!1},loading:{type:Boolean,required:!0},className:{type:String}},data:function(){return{defaultOptions:{allowDuplicateUploads:!0,attributes:{accept:"image/*"}}}},mounted:function(){var t=this,e={accept:"image/*"},n=new Ja.a(t.defaultOptions);n.assignBrowse(this.$refs.button,!1,!0,e),n.on("fileAdded",function(e,n){t.$emit("fileAdded",{file:e,event:n})}),n.on("fileSuccess",function(e,n){t.$emit("fileSuccess",{file:e,message:n})}),n.on("fileError",function(e,n){t.$emit("fileError",{file:e,message:n})})},watch:{resource:function(){this.$forceUpdate()}}},Wa=Qa,Xa=Object(fo["a"])(Wa,Ya,Ka,!1,null,null,null),Za=Xa.exports,tr={getBase64:function(t){return new Promise(function(e){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.readAsDataURL(t)})}},er={props:{user:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingUser:!1}},computed:Object(A["a"])({},Object(k["b"])({roles:"users/roles"})),components:{InputComponent:xo,LoadingSpinner:Ca,CALButton:Bo,MediaUpload:Za},methods:{back:function(){history.back()},imageSelected:function(t){var e=this;tr.getBase64(t.file.file).then(function(t){e.user.avatar=t,e.$emit("fileAdded",{user:e.user,encodedImage:t.split(",")[1]})})},getRoles:function(){this.$store.dispatch("users/getRoles")}},mounted:function(){var t=this;this.getRoles(),!t.isNew&&this.user.id&&(t.loadingUser=!0,t.$store.dispatch("users/getUser",t.$route.params.id).then(function(){t.loadingUser=!1},function(){t.loadingUser=!1}))}},nr=er,ir=Object(fo["a"])(nr,Ga,Fa,!1,null,null,null),or=ir.exports,ar={computed:Object(A["a"])({},Object(k["b"])({users:"users/users",isLoading:"users/isLoading"})),components:{User:or},data:function(){return{user:{role_id:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("users/createUser",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("users.user_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},rr=ar,sr=Object(fo["a"])(rr,Va,za,!1,null,null,null),cr=sr.exports,ur=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("user",{attrs:{isNew:!1,loading:t.updating,user:t.user},on:{fileAdded:t.uploadImage,save:t.save}})],1)])])},lr=[],dr={computed:Object(A["a"])({},Object(k["b"])({user:"users/selectedUser"})),components:{User:or},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("users/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("users.user_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("users/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("users.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},mr=dr,fr=Object(fo["a"])(mr,ur,lr,!1,null,null,null),pr=fr.exports,hr=[{path:"/users",name:"Users",component:Ba,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/users/new",name:"NewUser",component:cr,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/users/:id",props:!0,name:"EditUser",component:pr,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],vr=hr,gr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("countries.name"),placeholder:t.$t("countries.name"),id:"surname",name:"surname",type:"text"},model:{value:t.search.name,callback:function(e){t.$set(t.search,"name",e)},expression:"search.name"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("countries.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("countries.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createCountry()}}},[t._v(t._s(t.$t("countries.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.countries&&0!==t.countries.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.countries&&t.countries.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("countries.name")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("countries.travel_precaution")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("countries.actions")))])])]),n("tbody",t._l(t.countries,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.name))]),n("td",[t._v(t._s(e.travel_precaution_readable))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[e.can_be_enabled?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),n("CALButton",{attrs:{title:t.$t("countries.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]),e.is_enabled?t._e():n("CALButton",{attrs:{title:t.$t("countries.enable"),disabled:!e.can_be_enabled,"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showEnableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]),e.is_enabled?n("CALButton",{attrs:{title:t.$t("countries.disable"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showDisableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]):t._e()],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1)]),t.isShowingEnableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("countries.country_enable_confirmation")},on:{cancel:function(e){return t.closeEnableCountryConfirmationModal()},confirm:t.enableCountry}}):t._e(),t.isShowingDisableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("countries.country_disable_confirmation")},on:{cancel:function(e){return t.closeDisableCountryConfirmationModal()},confirm:t.disableCountry}}):t._e()],1)},br=[],Cr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",{staticStyle:{position:"absolute",top:"0"}},t._l(t.languages,function(t){return n("country-flag",{key:t,attrs:{country:"sq"===t?"al":"us",size:"small"}})}),1)},_r=[],yr=n("027b"),Sr={name:"AvailableIn",components:{CountryFlag:yr["a"]},props:{languages:{type:Array,default:function(){return[]}}}},wr=Sr,Ar=Object(fo["a"])(wr,Cr,_r,!1,null,null,null),kr=Ar.exports,Er={computed:Object(A["a"])({},Object(k["b"])({countries:"countries/countries",meta:"countries/meta",isLoading:"countries/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,ConfirmationModal:ka,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{importTarget:"".concat("http://api.diaspora.coding.al/api/","v1/countries/actions/import"),countryAction:!1,searchAction:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{},selectedCountry:{}}},methods:Object(A["a"])({},Object(k["c"])({setSelectedCountry:"countries/SET_SELECTED_COUNTRY"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("countries/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedCountry=t,e.setSelectedCountry(t),e.$router.push({name:"EditCountry",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createCountry:function(){this.$router.push({name:"NewCountry"})},resetSelectedCountry:function(){this.selectedCountry={}},enableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("countries/enable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("countries.country_enabled_successfully")),t.hideSpinner("countryAction"),t.closeEnableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},disableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("countries/disable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("countries.country_disabled_successfully")),t.hideSpinner("countryAction"),t.closeDisableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},showEnableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingEnableCountryConfirmationModal=!0},closeEnableCountryConfirmationModal:function(){this.isShowingEnableCountryConfirmationModal=!1,this.resetSelectedCountry()},showDisableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingDisableCountryConfirmationModal=!0},closeDisableCountryConfirmationModal:function(){this.isShowingDisableCountryConfirmationModal=!1,this.resetSelectedCountry()}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},$r=Er,jr=Object(fo["a"])($r,gr,br,!1,null,null,null),Mr=jr.exports,Lr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("country",{attrs:{country:t.country,isNew:!0,loading:t.saving},on:{save:t.save}})],1)},Pr=[],Ir=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.country)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingCountry}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingCountry,expression:"!loadingCountry"}]},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("countries.code"),placeholder:t.$t("countries.code"),id:"code",name:"code",type:"text","is-required":!0,disabled:!!t.country.id},model:{value:t.country.iso_2,callback:function(e){t.$set(t.country,"iso_2",e)},expression:"country.iso_2"}}),t.errors.has("code")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("code")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("countries.name"),placeholder:t.$t("countries.name"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.country.name,callback:function(e){t.$set(t.country,"name",e)},expression:"country.name"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"travel_precaution"}},[t._v(t._s(t.$t("countries.travel_precaution")))]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.country.travel_precaution,expression:"country.travel_precaution"}],staticClass:"form-control",attrs:{id:"travel_precaution",name:"travel_precaution"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.country,"travel_precaution",e.target.multiple?n:n[0])}}},t._l(t.travelCautions,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])}),0)]),t.errors.has("travel_precaution")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("travel_precaution")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("countries.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("countries.cancel"))+"\n ")])],1)],1)])]),t.isNew?t._e():n("div",{staticClass:"row mt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingSections}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingSections,expression:"!loadingSections"}]},[t.sections&&0!==t.sections.length?t._e():n("div",{staticClass:"text-center"},[n("no-data",{attrs:{message:t.$t("countries.sections.no_data")}}),n("CALButton",{attrs:{"button-class":"btn btn-success px-4 mt-2",type:"button"},on:{click:t.createSection}},[t._v(t._s(t.$t("countries.create")))])],1),t.sections&&t.sections.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("countries.sections.order")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("countries.sections.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v("\n "+t._s(t.$t("countries.actions"))+"\n "),n("CALButton",{attrs:{title:t.$t("countries.create"),"button-class":"btn btn-success btn-sm m-1"},on:{click:t.createSection}},[n("i",{staticClass:"fa fa-fw fa-plus"})])],1)])]),n("tbody",t._l(t.sections,function(e,i){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.order))]),n("td",[t._v(t._s(e.title))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1"},[e.can_be_enabled?t._e():n("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"fa fa-fw fa-info",attrs:{title:t.$t("common.check_data_to_enable")}})]),e.is_visible?t._e():n("CALButton",{attrs:{title:t.$t("countries.enable"),"button-class":"btn btn-success btn-sm m-1",disabled:!e.can_be_enabled},on:{click:function(n){return t.showEnableSectionConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]),e.is_visible?n("CALButton",{attrs:{title:t.$t("countries.disable"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showDisableSectionConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]):t._e(),n("CALButton",{attrs:{title:t.$t("countries.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]),i!==t.sections.length-1?n("CALButton",{attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveDown"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.moveDown(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-down"})]):t._e(),0!==i?n("CALButton",{staticClass:"btn btn-success btn-sm m-1",attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveUp")},on:{click:function(n){return t.moveUp(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-up"})]):t._e()],1)])}),0)]):t._e()])],1),t.isShowingEnableSectionConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.sectionAction,message:t.$t("countries.sections.enable_confirmation")},on:{cancel:function(e){return t.closeEnableSectionConfirmationModal()},confirm:t.enableSection}}):t._e(),t.isShowingDisableSectionConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.sectionAction,message:t.$t("countries.sections.disable_confirmation")},on:{cancel:function(e){return t.closeDisableSectionConfirmationModal()},confirm:t.disableSection}}):t._e()],1)])},Or=[],Tr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("span",{on:{click:function(e){return t.selectLanguage("sq")}}},[n("country-flag",{class:t.getClass("sq"),attrs:{country:"al",size:"big"}})],1),n("span",{on:{click:function(e){return t.selectLanguage("en")}}},[n("country-flag",{class:t.getClass("en"),attrs:{country:"us",size:"big"}})],1)])},xr=[],Dr={name:"LanguagePicker",components:{CountryFlag:yr["a"]},data:function(){return{}},methods:{getClass:function(t){return t===this.$i18n.locale?"selected":""},selectLanguage:function(t){this.$i18n.locale=t,xi.$emit("language-selected",t)}},destroyed:function(){this.selectLanguage("sq")}},Nr=Dr,qr=Object(fo["a"])(Nr,Tr,xr,!1,null,null,null),Rr=qr.exports,Ur={props:{country:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(A["a"])({},Object(k["b"])({sections:"countries/sections",travelCautions:"countries/travelCautions"})),data:function(){return{loadingCountry:!1,loadingSections:!1,loadingMove:!1,selectedSection:{},sectionAction:!1,isShowingEnableSectionConfirmationModal:!1,isShowingDisableSectionConfirmationModal:!1}},components:{InputComponent:xo,LanguagePicker:Rr,CALButton:Bo,NoData:Na,ConfirmationModal:ka,AvailableIn:kr,LoadingSpinner:Ca},methods:Object(A["a"])({},Object(k["c"])({setSelectedSection:"countries/SET_SELECTED_SECTION"}),{back:function(){history.back()},getCountry:function(){var t=this;t.loadingCountry=!0,t.$store.dispatch("countries/getCountry",t.$route.params.id).then(function(){t.loadingCountry=!1},function(){t.loadingCountry=!1})},edit:function(t){this.setSelectedSection(t),this.$router.push({name:"EditSection",params:{id:this.$route.params.id,sectionId:t.id}})},createSection:function(){this.$router.push({name:"NewSection",params:{id:this.$route.params.id}})},getSections:function(){var t=this;t.loadingSections=!0,t.$store.dispatch("countries/getSections",t.$route.params.id).then(function(){t.loadingSections=!1},function(){t.loadingSections=!1})},getTravelCautions:function(){this.$store.dispatch("countries/getTravelCautions")},moveDown:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("countries/moveDown",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},moveUp:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("countries/moveUp",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},resetSelectedSection:function(){this.selectedSection={}},showEnableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingEnableSectionConfirmationModal=!0},closeEnableSectionConfirmationModal:function(){this.isShowingEnableSectionConfirmationModal=!1,this.resetSelectedSection()},enableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("countries/enableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("countries.sections.enabled_successfully")),t.hideSpinner("sectionAction"),t.closeEnableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})},showDisableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingDisableSectionConfirmationModal=!0},closeDisableSectionConfirmationModal:function(){this.isShowingDisableSectionConfirmationModal=!1,this.resetSelectedSection()},disableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("countries/disableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("countries.sections.disabled_successfully")),t.hideSpinner("sectionAction"),t.closeDisableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})}}),mounted:function(){var t=this,e=this;!e.isNew&&this.country.id&&(this.getCountry(),this.getSections(),this.getTravelCautions()),xi.$on("language-selected",function(){!e.isNew&&t.country.id?(t.getCountry(),t.getSections(),t.getTravelCautions()):(e.country.iso_2="",e.country.name="")})},beforeDestroy:function(){xi.$off("language-selected")}},Br=Ur,Vr=Object(fo["a"])(Br,Ir,Or,!1,null,null,null),zr=Vr.exports,Gr={computed:Object(A["a"])({},Object(k["b"])({countries:"countries/countries",isLoading:"countries/isLoading"})),components:{Country:zr},data:function(){return{country:{},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("countries/createCountry",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("countries.country_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},Fr=Gr,Yr=Object(fo["a"])(Fr,Lr,Pr,!1,null,null,null),Kr=Yr.exports,Hr=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("Country",{attrs:{country:t.country,isNew:!1,loading:t.updating},on:{save:t.save}})],1)},Jr=[],Qr={computed:Object(A["a"])({},Object(k["b"])({country:"countries/selectedCountry"})),components:{Country:zr},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("countries/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("countries.country_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("countries/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("countries.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},Wr=Qr,Xr=Object(fo["a"])(Wr,Hr,Jr,!1,null,null,null),Zr=Xr.exports,ts=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("Section",{attrs:{section:t.section,isNew:!0,loading:t.saving},on:{save:t.save}})],1)])])},es=[],ns=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.save(e)}}},[n("div",{staticClass:"row"},[n("div",{staticClass:"form-group col-sm-12"},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingSection}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingSection,expression:"!loadingSection"}]},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("countries.sections.title"),placeholder:t.$t("countries.sections.title"),id:"code",name:"code",type:"text","is-required":!0},model:{value:t.section.title,callback:function(e){t.$set(t.section,"title",e)},expression:"section.title"}}),t.errors.has("code")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("code")))]):t._e()],1)],1),n("div",{staticClass:"form-group col-sm-12 full-screen-editor"},[n("label",[t._v(t._s(t.$t("countries.sections.content"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"description"},model:{value:t.section.description,callback:function(e){t.$set(t.section,"description",e)},expression:"section.description"}})],1),t.errors.has("description")?n("div",{staticClass:"error-message col-sm-12"},[t._v(t._s(t.errors.first("description")))]):t._e(),n("div",{staticClass:"form-group col-sm-12"},[n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v("\n "+t._s(t.$t("countries.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v("\n "+t._s(t.$t("countries.cancel"))+"\n ")])],1)])])])},is=[],os=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ckeditor",{attrs:{editor:t.editor,config:t.editorConfig,id:t.id,name:t.name},on:{change:function(e){return t.inputChanged()},input:function(e){return t.$emit("input",e)}},model:{value:t.InputData,callback:function(e){t.InputData=e},expression:"InputData"}})},as=[],rs=n("0469"),ss=n("290f"),cs=n("2d79"),us=n("d4c1"),ls=n("613a"),ds=n("031f"),ms=n("a599"),fs=n("7041"),ps=n("8068"),hs=n("f61b"),vs=n("62e5"),gs=n("8b25"),bs=n("c4b1"),Cs=n("4801"),_s={name:"ContentEditor",$_veeValidate:{value:function(){return this.InputData},name:function(){return this.name}},props:{min:{type:Number,required:!1},name:{type:String,required:!1},id:{type:String,required:!1},disabled:{type:Boolean,required:!1},value:{},validation:{}},data:function(){return{InputData:void 0,editor:rs["a"],editorConfig:{plugins:[ss["a"],cs["a"],us["a"],ls["a"],ds["a"],ms["a"],fs["a"],ps["a"],hs["a"],gs["a"],bs["a"],Cs["a"],vs["a"]],toolbar:{items:["heading","|","bold","italic","underline","strikethrough","subscript","superscript","link","|","bulletedList","numberedList","|","fontSize","fontColor","fontBackgroundColor","alignment","|","undo","redo"]}}}},created:function(){this.InputData=this.value},watch:{value:function(t){this.InputData=t}},methods:{inputChanged:function(){this.$emit("input",this.InputData),"function"===typeof this.change&&this.change()}}},ys=_s,Ss=Object(fo["a"])(ys,os,as,!1,null,"7359aee1",null),ws=Ss.exports,As={props:{section:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(A["a"])({},Object(k["b"])({sections:"countries/sections"})),data:function(){return{editorConfig:{toolbar:["heading","|","bold","italic","link","bulletedList","numberedList","blockQuote"]},loadingSection:!1}},components:{ContentEditor:ws,InputComponent:xo,LanguagePicker:Rr,CALButton:Bo,LoadingSpinner:Ca},methods:{back:function(){history.back()},save:function(){this.$emit("save",Object(A["a"])({},this.section,{country_id:this.$route.params.id}))},getSection:function(){var t=this;t.loadingSection=!0,t.$store.dispatch("countries/getSection",t.$route.params.sectionId).then(function(){t.loadingSection=!1},function(){t.loadingSection=!1})}},mounted:function(){var t=this;!t.isNew&&this.section.id&&this.getSection(),xi.$on("language-selected",function(){!t.isNew&&t.section.id?t.getSection():(t.section.title="",t.section.description="")})},beforeDestroy:function(){xi.$off("language-selected")}},ks=As,Es=Object(fo["a"])(ks,ns,is,!1,null,null,null),$s=Es.exports,js={computed:Object(A["a"])({},Object(k["b"])({section:"countries/selectedSection"})),components:{Section:$s},data:function(){return{saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("countries/createSection",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("countries.sections.created_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},Ms=js,Ls=Object(fo["a"])(Ms,ts,es,!1,null,null,null),Ps=Ls.exports,Is=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("Section",{attrs:{section:t.section,isNew:!1,loading:t.updating},on:{save:t.save}})],1)])])},Os=[],Ts={computed:Object(A["a"])({},Object(k["b"])({section:"countries/selectedSection"})),components:{Section:$s},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("countries/updateSection",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("countries.sections.updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})}}},xs=Ts,Ds=Object(fo["a"])(xs,Is,Os,!1,null,null,null),Ns=Ds.exports,qs=[{path:"/countries",name:"Countries",component:Mr,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/countries/new",name:"NewCountry",component:Kr,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/countries/:id",props:!0,name:"EditCountry",component:Zr,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/countries/:id/sections/new",props:!0,name:"NewSection",component:Ps,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/countries/:id/sections/:sectionId",props:!0,name:"EditSection",component:Ns,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Rs=qs,Us=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("categories.slug"),placeholder:t.$t("categories.slug"),id:"name",name:"name",type:"text"},model:{value:t.search.slug,callback:function(e){t.$set(t.search,"slug",e)},expression:"search.slug"}})],1),n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("categories.name"),placeholder:t.$t("categories.name"),id:"surname",name:"surname",type:"text"},model:{value:t.search.name,callback:function(e){t.$set(t.search,"name",e)},expression:"search.name"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit",buttonClass:"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("categories.search"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("categories.clean"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-success mr-1"},on:{click:function(e){return t.createCategory()}}},[t._v(t._s(t.$t("categories.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.categories&&0!==t.categories.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.categories&&t.categories.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("categories.slug")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("categories.name")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("categories.actions")))])])]),n("tbody",t._l(t.categories,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.slug))]),n("td",[t._v(t._s(e.name))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[e.can_use?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),n("CALButton",{attrs:{title:t.$t("categories.edit"),buttonClass:"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]),e.is_archived?t._e():n("CALButton",{attrs:{title:t.$t("categories.archive"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showArchiveCategoryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]),e.is_archived?n("CALButton",{attrs:{title:t.$t("categories.unArchive"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showUnArchiveCategoryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]):t._e()],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1)]),t.isShowingArchiveCategoryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.categoryAction,message:t.$t("categories.category_archive_confirmation")},on:{cancel:function(e){return t.closeArchiveCategoryConfirmationModal()},confirm:t.archiveCategory}}):t._e(),t.isShowingUnArchiveCategoryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.categoryAction,message:t.$t("categories.category_unarchive_confirmation")},on:{cancel:function(e){return t.closeUnArchiveCategoryConfirmationModal()},confirm:t.unArchiveCategory}}):t._e()],1)},Bs=[],Vs={computed:Object(A["a"])({},Object(k["b"])({categories:"categories/categories",meta:"categories/meta",isLoading:"categories/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,CALButton:Bo,ConfirmationModal:ka,AvailableIn:kr,NoData:Na},data:function(){return{importTarget:"".concat("http://api.diaspora.coding.al/api/","v1/categories/actions/import"),categoryAction:!1,searchAction:!1,isShowingArchiveCategoryConfirmationModal:!1,isShowingUnArchiveCategoryConfirmationModal:!1,search:{},selectedCategory:{}}},methods:Object(A["a"])({},Object(k["c"])({setSelectedCategory:"categories/SET_SELECTED_CATEGORY"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("categories/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedCategory=t,e.setSelectedCategory(t),e.$router.push({name:"EditCategory",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createCategory:function(){this.$router.push({name:"NewCategory"})},resetSelectedCategory:function(){this.selectedCategory={}},showArchiveCategoryConfirmationModal:function(t){this.selectedCategory=t,this.setSelectedCategory(t),this.isShowingArchiveCategoryConfirmationModal=!0},closeArchiveCategoryConfirmationModal:function(){this.isShowingArchiveCategoryConfirmationModal=!1,this.resetSelectedCategory()},archiveCategory:function(){var t=this;t.showSpinner("categoryAction"),t.$store.dispatch("categories/archive",t.selectedCategory).then(function(){t.notificationService.success(t.$t("categories.category_archived")),t.hideSpinner("categoryAction"),t.closeArchiveCategoryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("categoryAction")})},showUnArchiveCategoryConfirmationModal:function(t){this.selectedCategory=t,this.setSelectedCategory(t),this.isShowingUnArchiveCategoryConfirmationModal=!0},closeUnArchiveCategoryConfirmationModal:function(){this.isShowingUnArchiveCategoryConfirmationModal=!1,this.resetSelectedCategory()},unArchiveCategory:function(){var t=this;t.showSpinner("categoryAction"),t.$store.dispatch("categories/unArchive",t.selectedCategory).then(function(){t.notificationService.success(t.$t("categories.category_unarchived")),t.hideSpinner("categoryAction"),t.closeUnArchiveCategoryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("categoryAction")})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},zs=Vs,Gs=Object(fo["a"])(zs,Us,Bs,!1,null,null,null),Fs=Gs.exports,Ys=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("category",{attrs:{category:t.category,isNew:!0,loading:t.saving},on:{save:t.save}})],1)])])},Ks=[],Hs=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.category)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingCategory}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingCategory,expression:"!loadingCategory"}]},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("categories.name"),placeholder:t.$t("categories.name"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.category.name,callback:function(e){t.$set(t.category,"name",e)},expression:"category.name"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{disabled:!t.isNew,label:t.$t("categories.slug"),placeholder:t.$t("categories.slug"),id:"slug",name:"slug",type:"text","is-required":!0},model:{value:t.category.slug,callback:function(e){t.$set(t.category,"slug",e)},expression:"category.slug"}}),t.errors.has("slug")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("slug")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit",buttonClass:"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("categories.save"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-secondary mr-1",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("categories.cancel"))+"\n ")])],1)],1)},Js=[],Qs={props:{category:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingCategory:!1}},components:{InputComponent:xo,CALButton:Bo,LanguagePicker:Rr,LoadingSpinner:Ca},methods:{back:function(){history.back()},getCategory:function(){var t=this;t.loadingCategory=!0,t.$store.dispatch("categories/getCategory",t.$route.params.id).then(function(){t.loadingCategory=!1},function(){t.loadingCategory=!1})}},mounted:function(){var t=this;!t.isNew&&t.category.id&&t.getCategory(),xi.$on("language-selected",function(){!t.isNew&&t.category.id?t.getCategory():(t.category.name="",t.category.slug="")})},beforeDestroy:function(){xi.$off("language-selected")}},Ws=Qs,Xs=Object(fo["a"])(Ws,Hs,Js,!1,null,null,null),Zs=Xs.exports,tc={computed:Object(A["a"])({},Object(k["b"])({categories:"categories/categories",isLoading:"categories/isLoading"})),components:{Category:Zs},data:function(){return{category:{},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("categories/createCategory",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("categories.category_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},ec=tc,nc=Object(fo["a"])(ec,Ys,Ks,!1,null,null,null),ic=nc.exports,oc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("category",{attrs:{category:t.category,isNew:!1,loading:t.updating},on:{fileAdded:t.uploadImage,save:t.save}})],1)])])},ac=[],rc={computed:Object(A["a"])({},Object(k["b"])({category:"categories/selectedCategory"})),components:{Category:Zs},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("categories/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("categories.category_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("categories/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("categories.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},sc=rc,cc=Object(fo["a"])(sc,oc,ac,!1,null,null,null),uc=cc.exports,lc=[{path:"/categories",name:"Categories",component:Fs,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/categories/new",name:"NewCategory",component:ic,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/categories/:id",props:!0,name:"EditCategory",component:uc,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],dc=lc,mc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("posts.title"),placeholder:t.$t("posts.title"),id:"$t('posts.title')",name:"$t('posts.title')",type:"text"},model:{value:t.search.title,callback:function(e){t.$set(t.search,"title",e)},expression:"search.title"}})],1),n("div",{staticClass:"col-sm-3"},[n("select-component",{attrs:{label:t.$t("posts.category"),id:t.$t("posts.category"),name:t.$t("posts.category"),"default-option":t.$t("categories.defaultOption"),data:t.availableCategories},model:{value:t.search.category,callback:function(e){t.$set(t.search,"category",e)},expression:"search.category"}})],1),n("div",{staticClass:"col-sm-3"},[n("select-component",{attrs:{label:t.$t("posts.author"),id:t.$t("posts.author"),name:t.$t("posts.author"),"default-option":t.$t("users.defaultOption"),data:t.availableUsers},model:{value:t.search.author,callback:function(e){t.$set(t.search,"author",e)},expression:"search.author"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("posts.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("posts.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createPost()}}},[t._v(t._s(t.$t("posts.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.posts&&0!==t.posts.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.posts&&t.posts.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{scope:"col",title:t.$t("posts.read_count")}},[n("i",{staticClass:"fa fa-eye"})]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("posts.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("posts.author")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("posts.status")))]),n("th",{staticClass:"text-right",attrs:{width:"180px",scope:"col"}},[t._v(t._s(t.$t("posts.actions")))])])]),n("tbody",t._l(t.posts,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.read_count))]),n("td",[t._v(t._s(e.title))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",[t._v(t._s(e.author.name)+" "+t._s(e.author.surname))]),n("td",[t._v(t._s(t.$t("posts.statuses."+e.status)))]),n("td",{staticClass:"text-right",attrs:{width:"180px"}},[e.can_be_published?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),e.can_be_published&&t.PostService.isDraft(e)&&!t.isEditor()?n("CALButton",{attrs:{title:t.$t("posts.publish"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showPublishModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-upload"})]):t._e(),t.PostService.isArchived(e)||t.isEditor()?t._e():n("CALButton",{attrs:{title:t.$t("posts.archive"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showArchiveModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-archive"})]),t.isAdmin()&&"ARCHIVED"===e.status?n("CALButton",{attrs:{title:t.$t("posts.enable"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showActivateModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-check"})]):t._e(),t.PostService.isDraft(e)||!t.isEditor()?n("CALButton",{attrs:{title:t.$t("posts.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]):t._e()],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1),t.isShowingPublishModal?n("confirmation-modal",{attrs:{"loading-button":t.postAction,message:t.$t("posts.publish_confirmation")},on:{cancel:function(e){return t.closePublishConfirmationModal()},confirm:t.publish}}):t._e(),t.isShowingFeatureModal?n("confirmation-modal",{attrs:{"loading-button":t.postAction,message:t.$t("posts.feature_confirmation")},on:{cancel:function(e){return t.closeFeatureConfirmationModal()},confirm:t.feature}}):t._e(),t.isShowingArchiveModal?n("confirmation-modal",{attrs:{"loading-button":t.postAction,message:t.$t("posts.archive_confirmation")},on:{cancel:function(e){return t.closeArchiveConfirmationModal()},confirm:t.archive}}):t._e(),t.isShowingActivateModal?n("confirmation-modal",{attrs:{"loading-button":t.postAction,message:t.$t("posts.activate_confirmation")},on:{cancel:function(e){return t.closeActivateConfirmationModal()},confirm:t.activate}}):t._e()],1)])},fc=[],pc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:t.name}},[t._v(t._s(t.label))]),n("select",{staticClass:"form-control",attrs:{id:t.name,name:t.name,disabled:t.disabled,placeholder:t.placeholder},domProps:{value:t.inputData},on:{input:function(e){return t.$emit("input",e.target.value)}}},[n("option",{attrs:{value:"",selected:""}},[t._v(t._s(t.defaultOption))]),t._l(t.data,function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+" "+t._s(e.surname||null)+"\n ")])})],2)])},hc=[],vc={name:"SelectComponent",props:{name:{type:String,required:!1},label:{type:String,required:!1},placeholder:{type:String,required:!1},defaultOption:{type:String,required:!0},data:{type:Array,required:!0},id:{type:String,required:!1},disabled:{type:Boolean,required:!1},isRequired:{type:Boolean,default:!1},value:{}},data:function(){return{inputData:""}},watch:{value:function(t){this.inputData=t}}},gc=vc,bc=Object(fo["a"])(gc,pc,hc,!1,null,"10e86a4a",null),Cc=bc.exports,_c={computed:Object(A["a"])({},Object(k["b"])({posts:"posts/posts",meta:"posts/meta",isLoading:"posts/isLoading",availableCategories:"categories/availableCategories",availableUsers:"users/availableUsers"})),components:{InputComponent:xo,SelectComponent:Cc,ConfirmationModal:ka,LoadingSpinner:Ca,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{postAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{},selectedPost:{},PostService:le}},methods:Object(A["a"])({},uo,Object(k["c"])({setSelectedPost:"posts/SET_SELECTED_POST"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("posts/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedPost=t,e.setSelectedPost(t),e.$router.push({name:"EditPost",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createPost:function(){this.$router.push({name:"NewPost"})},showPublishModal:function(t){this.selectedPost=t,this.setSelectedPost(t),this.isShowingPublishModal=!0},closePublishConfirmationModal:function(){this.isShowingPublishModal=!1},publish:function(){var t=this;t.showSpinner("postAction"),t.$store.dispatch("posts/publish",t.selectedPost).then(function(){t.notificationService.success(t.$t("posts.post_published")),t.hideSpinner("postAction"),t.closePublishConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("postAction")})},closeFeatureConfirmationModal:function(){this.isShowingFeatureModal=!1},feature:function(){var t=this;t.showSpinner("postAction"),t.$store.dispatch("posts/feature",t.selectedPost).then(function(){t.notificationService.success(t.$t("posts.post_featured")),t.hideSpinner("postAction"),t.closeFeatureConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("postAction")})},showArchiveModal:function(t){this.selectedPost=t,this.setSelectedPost(t),this.isShowingArchiveModal=!0},showActivateModal:function(t){this.selectedPost=t,this.setSelectedPost(t),this.isShowingActivateModal=!0},closeArchiveConfirmationModal:function(){this.isShowingArchiveModal=!1},closeActivateConfirmationModal:function(){this.isShowingActivateModal=!1},archive:function(){var t=this;t.showSpinner("postAction"),t.$store.dispatch("posts/archive",t.selectedPost).then(function(){t.notificationService.success(t.$t("posts.post_archived")),t.hideSpinner("postAction"),t.closeArchiveConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("postAction")})},activate:function(){var t=this;t.showSpinner("postAction"),t.$store.dispatch("posts/activate",t.selectedPost).then(function(){t.notificationService.success(t.$t("posts.post_activated")),t.hideSpinner("postAction"),t.closeActivateConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("postAction")})},requestAvailableCategories:function(){this.$store.dispatch("categories/getAvailableCategories")},requestAvailableUsers:function(){this.$store.dispatch("users/getAvailableUsers")}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch(),this.requestAvailableCategories(),this.requestAvailableUsers()}},yc=_c,Sc=Object(fo["a"])(yc,mc,fc,!1,null,null,null),wc=Sc.exports,Ac=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("post",{attrs:{isNew:!0,loading:t.saving,post:t.post},on:{save:t.save}})],1)])])},kc=[],Ec=(n("a481"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.post)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingPost}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingPost,expression:"!loadingPost"}],staticClass:"post-container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"form-group col-sm-12"},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|max:60",expression:"'required|max:60'",modifiers:{initial:!0}}],attrs:{label:t.$t("posts.title"),placeholder:t.$t("posts.title"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.post.title,callback:function(e){t.$set(t.post,"title",e)},expression:"post.title"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"short_desc"}},[t._v(t._s(t.$t("posts.short_desc"))+"*")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.post.short_desc,expression:"post.short_desc"},{name:"validate",rawName:"v-validate.initial",value:"required|max:140",expression:"'required|max:140'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"short_desc",name:"short_desc",rows:"5"},domProps:{value:t.post.short_desc},on:{input:function(e){e.target.composing||t.$set(t.post,"short_desc",e.target.value)}}})]),t.errors.has("short_desc")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("short_desc")))]):t._e(),n("div",{staticClass:"form-group full-screen-editor"},[n("label",[t._v(t._s(t.$t("posts.content"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"content"},model:{value:t.post.content,callback:function(e){t.$set(t.post,"content",e)},expression:"post.content"}})],1),t.errors.has("content")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("content")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"country"}},[t._v(t._s(t.$t("posts.country"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.post.country_id,expression:"post.country_id"},{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"country",name:"country",disabled:t.cantChangeCC()},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.post,"country_id",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.enabledCountries,function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})],2)]),t.errors.has("country")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("country")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"category"}},[t._v(t._s(t.$t("posts.category"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.post.category_id,expression:"post.category_id"},{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"category",name:"category",disabled:t.cantChangeCC()},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.post,"category_id",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.usableCategories,function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})],2)]),t.errors.has("category")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("category")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder"},[t._v(t._s(t.$t("posts.featuredImage"))+"*")]),n("media-upload",{attrs:{loading:t.loading,className:"featured-post "+(t.post.featured_image?"has-image":""),resource:t.post.featured_image},on:{fileAdded:t.imageSelected}})],1),t.post.featured_image?t._e():n("div",{staticClass:"error-message"},[t._v("Ngarkimi imazhit është i detyrueshëm")]),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"category"}},[t._v(t._s(t.$t("posts.video_type")))]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.post.video_type,expression:"post.video_type"}],staticClass:"form-control",attrs:{id:"video_type",name:"video_type"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.post,"video_type",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("No video")]),t._l(t.videoTypes,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])})],2)]),t.post.video_type?n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("posts.label_video_url"),placeholder:t.$t("posts.placeholder_video_url"),id:"video_url",name:"video_url",type:"text","is-required":!0},model:{value:t.post.video_url,callback:function(e){t.$set(t.post,"video_url",e)},expression:"post.video_url"}}):t._e(),t.errors.has("video_url")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("video_url")))]):t._e(),t.post.id&&t.flowConfig?n("slider",{attrs:{"flow-config":t.flowConfig,images:t.post.media,postId:t.post.id}}):t._e()],1)]),n("br"),n("CALButton",{attrs:{disabled:t.errors.any()||!t.post.featured_image,type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("posts.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("posts.cancel"))+"\n ")])],1),n("cropper-modal",{attrs:{image:t.newImage,isShowingArchiveModal:t.cropping},on:{confirm:t.uploadImage,close:t.closeCropper}})],1)}),$c=[],jc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("swiper",{ref:"postSwiper",attrs:{id:""+t.postId,options:t.options},on:{slideChange:t.onSlideChange}},[t._l(t.currentImages,function(e){return n("swiper-slide",{key:e.id,staticClass:"slide-container",style:{backgroundImage:"url("+e.url+")"}},[n("div",{staticClass:"actions-container"},[n("CALButton",{attrs:{title:t.$t("common.delete"),"button-class":"btn btn-primary action-button",type:"button"},on:{click:function(n){return t.showDeleteModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-2x fa-trash"})])],1)])}),t.flowConfig?n("swiper-slide",{staticClass:"slide-container dashed"},[n("file-uploader",{staticClass:"h-100",attrs:{options:t.flowConfig},on:{fileSuccess:t.onFileUploaded}},[n("div",{staticClass:"row h-100"},[n("div",{staticClass:"col-sm-12 file-uploader"},[n("img",{attrs:{alt:"",src:"assets/drag-drop.svg",width:"40%"}})])])])],1):t._e()],2),t.currentImages.length>0?n("div",{staticClass:"swiper-pagination",attrs:{id:"pagination-"+t.postId}}):t._e(),t.isShowingDeleteModal?n("confirmation-modal",{attrs:{"loading-button":t.loading,message:t.$t("posts.delete_media_confirmation")},on:{cancel:function(e){return t.closeDeleteModal()},confirm:t.deleteImage}}):t._e()],1)},Mc=[],Lc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"button",staticClass:"file-uploader-container",on:{click:function(e){!t.isUploading&&t.$emit("click")}}},[t.isUploading?t._e():t._t("default"),t.isUploading?n("div",{staticClass:"h-100"},[n("p",{staticClass:"loading"},[n("vue-ladda",{attrs:{"data-style":"zoom-in","data-size":"xl",loading:t.isUploading,progress:t.flow.progress(),disabled:!0}},[t._v("\n UPLOADING\n ")])],1)]):t._e()],2)},Pc=[],Ic={name:"FileUploader",props:{label:{type:String,required:!1},options:{type:Object,required:!0}},data:function(){return{isUploading:!1,flow:{}}},mounted:function(){var t=this;t.flow=new Ja.a(t.options),t.flow.assignBrowse(t.$refs.button,!1,!0,t.options.attributes),t.flow.assignDrop(t.$refs.button,!1,!0,t.options.attributes),t.flow.on("fileAdded",function(e,n){t.isUploading=!1,t.$emit("fileAdded",{file:e,event:n})}),t.flow.on("filesSubmitted",function(){t.options.uploadOnClick||(t.isUploading=!0,t.flow.upload()),t.$emit("fileSubmitted",t.flow)}),t.flow.on("fileSuccess",function(e,n){t.isUploading=!1,t.$emit("fileSuccess",{file:e,message:n})}),t.flow.on("fileError",function(e,n){t.isUploading=!1,t.$emit("fileError",{file:e,message:n})})}},Oc=Ic,Tc=Object(fo["a"])(Oc,Lc,Pc,!1,null,null,null),xc=Tc.exports,Dc={components:{FileUploader:xc,CALButton:Bo,ConfirmationModal:ka},name:"Slider",data:function(){return{isShowingDeleteModal:!1,selectedImage:{},loading:!1,loadingFeature:!1,isReadOnly:!1,currentImages:this.images,options:{slidesPerView:1,pagination:{el:"#pagination-".concat(this.postId),clickable:!0}}}},props:{images:{type:Array,default:function(){return[]}},postId:{type:Number},inactive:{type:Boolean,default:!1},front:{type:Boolean,default:!1},flowConfig:{required:!1}},watch:{images:function(t){this.currentImages=t,this.onSlideChange()}},methods:{onSlideChange:function(){if(this.swiper&&this.currentImages.length>0&&this.currentImages.length>=this.swiper.activeIndex){var t=this.currentImages[this.swiper.activeIndex];this.$emit("onSlideChanged",t)}},onFileUploaded:function(t){this.currentImages.push(JSON.parse(t.message).data)},showDeleteModal:function(t){this.selectedImage=t,this.isShowingDeleteModal=!0},closeDeleteModal:function(){this.selectedImage={},this.isShowingDeleteModal=!1},deleteImage:function(){var t=this,e=this;e.loading=!0,e.$store.dispatch("posts/deleteImage",{post_id:e.postId,image_id:e.selectedImage.id}).then(function(){e.loading=!1;var t=e.currentImages.indexOf(e.selectedImage);t>-1&&(e.currentImages.splice(t,1),e.currentImages=e.currentImages.slice(0)),e.closeDeleteModal()},function(n){e.notificationService.error(n),t.loading=!1})},featureMedia:function(t){var e=this,n=this;n.loadingFeature=!0,n.$store.dispatch("posts/featureMedia",{post_id:n.postId,image_id:t.id}).then(function(){n.loadingFeature=!1},function(t){n.notificationService.error(t),e.loadingFeature=!1})}},computed:{swiper:function(){return this.$refs.postSwiper?this.$refs.postSwiper.swiper:null}}},Nc=Dc,qc=(n("034c"),Object(fo["a"])(Nc,jc,Mc,!1,null,null,null)),Rc=qc.exports,Uc=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isShowingArchiveModal&&t.image?n("confirmation-modal",{attrs:{"loading-button":t.postAction,title:t.$t("posts.cropperPrompt")},on:{cancel:function(e){return t.close()},confirm:t.confirmAction}},[n("vue-cropper",{ref:"cropper",attrs:{"view-mode":1,"drag-mode":"crop",autoCropArea:1,aspectRatio:t.aspectRatio,"min-container-width":t.minContainerWidth,"min-container-height":t.minContainerHeight,src:t.image,alt:"Source Image"}})],1):t._e()},Bc=[],Vc=n("95c3"),zc=n.n(Vc),Gc=(n("6107"),{name:"CropperModal",components:{VueCropper:zc.a,ConfirmationModal:ka},props:{isShowingArchiveModal:null,image:{type:String,default:null},aspectRatio:{type:Number,default:16/9},minContainerWidth:{type:Number,default:250},minContainerHeight:{type:Number,default:180}},data:function(){return{postAction:!1,cropImg:null}},methods:{confirmAction:function(){this.postAction=!0,this.cropImg=this.$refs.cropper.getCroppedCanvas().toDataURL(),this.$emit("confirm",this.cropImg),this.postAction=!1},close:function(){this.$emit("close")}}}),Fc=Gc,Yc=Object(fo["a"])(Fc,Uc,Bc,!1,null,"024fb7b5",null),Kc=Yc.exports,Hc={props:{post:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{cropping:!1,newImage:null,loadingPost:!1,publishedAtConfig:{enableTime:!0,time_24hr:!0,wrap:!0,altFormat:"d/m/Y H:i",altInput:!0,dateFormat:"d/m/Y H:i"},flowConfig:{testChunks:!1,allowDuplicateUploads:!0,attributes:{accept:"image/*"},target:"".concat("http://api.diaspora.coding.al/api/","v1/posts/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Ti.getters["auth/token"])}}}},computed:Object(A["a"])({},Object(k["b"])({categories:"categories/categories",enabledCountries:"countries/enabledCountries",videoTypes:"posts/videoTypes",userData:"auth/userData"}),{usableCategories:function(){return this.categories.filter(function(t){return t.can_use})}}),components:{ContentEditor:ws,Slider:Rc,InputComponent:xo,LanguagePicker:Rr,LoadingSpinner:Ca,MediaUpload:Za,CropperModal:Kc,CALButton:Bo},methods:{back:function(){history.back()},getPost:function(){var t=this;t.loadingPost=!0,t.$store.dispatch("posts/getPost",t.$route.params.id).then(function(){t.loadingPost=!1},function(){t.loadingPost=!1})},getVideoTypes:function(){this.$store.dispatch("posts/getVideoTypes")},getEnabledCountries:function(){this.$store.dispatch("countries/getEnabledCountries")},cantChangeCC:function(){return!this.isNew&&"en"===this.$i18n.locale},imageSelected:function(t){var e=this;tr.getBase64(t.file.file).then(function(t){e.newImage=t}),e.cropping=!0},uploadImage:function(t){var e=this;e.post.featured_image=t,e.isNew||e.$emit("onFeaturedImageChange",{post:e.post,encodedImage:t.split(",")[1]}),e.closeCropper()},closeCropper:function(){this.newImage=null,this.cropping=!1}},mounted:function(){var t=this,e=this;!e.isNew&&this.post.id&&this.getPost(),this.getVideoTypes(),this.getEnabledCountries(),xi.$on("language-selected",function(){!e.isNew&&t.post.id?t.getPost():(e.post.title="",e.post.short_desc="",e.post.content=""),t.getVideoTypes(),t.getEnabledCountries()})},beforeDestroy:function(){xi.$off("language-selected")}},Jc=Hc,Qc=Object(fo["a"])(Jc,Ec,$c,!1,null,null,null),Wc=Qc.exports,Xc={computed:Object(A["a"])({},Object(k["b"])({posts:"posts/posts",isLoading:"posts/isLoading"})),components:{Post:Wc},data:function(){return{post:{content:"",video_type:"",country_id:"",category_id:"",featured_image:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("posts/createPost",t).then(function(t){e.saving=!1,e.notificationService.success(e.$t("posts.post_updated_successfully")),e.$router.replace({name:"EditPost",params:{id:t.id}})},function(t){e.saving=!1,e.notificationService.error(t)})}}},Zc=Xc,tu=Object(fo["a"])(Zc,Ac,kc,!1,null,null,null),eu=tu.exports,nu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("post",{attrs:{isNew:!1,loading:t.updating,post:t.post},on:{onFeaturedImageChange:t.uploadFeaturedImage,save:t.save}})],1)])])},iu=[],ou={computed:Object(A["a"])({},Object(k["b"])({post:"posts/selectedPost"})),components:{Post:Wc},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("posts/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("posts.post_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadFeaturedImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("posts/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("posts.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},au=ou,ru=Object(fo["a"])(au,nu,iu,!1,null,null,null),su=ru.exports,cu=[{path:"/posts",name:"Posts",component:wc,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/posts/new",name:"NewPost",component:eu,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){var o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:o=Ti.getters["categories/categories"],0===o.length?Ti.dispatch("categories/get").then(function(){i(Ti.getters["auth/isAuth"])}):i(Ti.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/posts/:id",props:!0,name:"EditPost",component:su,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){var o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:o=Ti.getters["categories/categories"],0===o.length?Ti.dispatch("categories/get").then(function(){i(Ti.getters["auth/isAuth"])}):i(Ti.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],uu=cu,lu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("myCountrySections.title"),placeholder:t.$t("myCountrySections.title"),id:"title",name:"title",type:"text"},model:{value:t.search.title,callback:function(e){t.$set(t.search,"title",e)},expression:"search.title"}})],1),n("div",{staticClass:"col-sm-3"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"category"}},[t._v(t._s(t.$t("myCountrySections.category"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.search.category_id,expression:"search.category_id"}],staticClass:"form-control",attrs:{id:"category",name:"category"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.search,"category_id",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.visibleCategories,function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n "+t._s(e.title)+"\n ")])})],2)])]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("myCountrySections.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("myCountrySections.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createCountry()}}},[t._v(t._s(t.$t("myCountrySections.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.myCountrySections&&0!==t.myCountrySections.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.myCountrySections&&t.myCountrySections.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("myCountrySections.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("myCountrySections.actions")))])])]),n("tbody",t._l(t.myCountrySections,function(e,i){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.title))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[e.can_be_enabled?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),n("CALButton",{attrs:{title:t.$t("myCountrySections.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]),e.is_visible?t._e():n("CALButton",{attrs:{title:t.$t("myCountrySections.enable"),disabled:!e.can_be_enabled,"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showEnableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]),e.is_visible?n("CALButton",{attrs:{title:t.$t("myCountrySections.disable"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showDisableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]):t._e(),i!==t.myCountrySections.length-1?n("CALButton",{attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveDown"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.moveDown(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-down"})]):t._e(),0!==i?n("CALButton",{staticClass:"btn btn-success btn-sm m-1",attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveUp")},on:{click:function(n){return t.moveUp(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-up"})]):t._e()],1)])}),0)]):t._e()],1)]),t.isShowingEnableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("myCountrySections.country_enable_confirmation")},on:{cancel:function(e){return t.closeEnableCountryConfirmationModal()},confirm:t.enableCountry}}):t._e(),t.isShowingDisableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("myCountrySections.country_disable_confirmation")},on:{cancel:function(e){return t.closeDisableCountryConfirmationModal()},confirm:t.disableCountry}}):t._e()],1)},du=[],mu={computed:Object(A["a"])({},Object(k["b"])({myCountrySections:"myCountrySections/myCountrySections",visibleCategories:"myCountrySections/visibleCategories",isLoading:"myCountrySections/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,ConfirmationModal:ka,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{countryAction:!1,searchAction:!1,loadingMove:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{category_id:""},selectedCountry:{}}},methods:Object(A["a"])({},Object(k["c"])({setSelectedCountry:"myCountrySections/SET_SELECTED_SECTION"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("myCountrySections/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles",category_id:""},t.internalSearch()},edit:function(t){var e=this;e.selectedCountry=t,e.setSelectedCountry(t),e.$router.push({name:"EditMyCountrySection",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createCountry:function(){this.$router.push({name:"NewMyCountrySection"})},resetSelectedCountry:function(){this.selectedCountry={}},enableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("myCountrySections/enable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("myCountrySections.country_enabled_successfully")),t.hideSpinner("countryAction"),t.closeEnableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},disableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("myCountrySections/disable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("myCountrySections.country_disabled_successfully")),t.hideSpinner("countryAction"),t.closeDisableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},showEnableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingEnableCountryConfirmationModal=!0},closeEnableCountryConfirmationModal:function(){this.isShowingEnableCountryConfirmationModal=!1,this.resetSelectedCountry()},showDisableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingDisableCountryConfirmationModal=!0},closeDisableCountryConfirmationModal:function(){this.isShowingDisableCountryConfirmationModal=!1,this.resetSelectedCountry()},moveDown:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("myCountrySections/moveDown",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},moveUp:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("myCountrySections/moveUp",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.$store.dispatch("myCountrySections/getCategories"),this.internalSearch()}},fu=mu,pu=Object(fo["a"])(fu,lu,du,!1,null,null,null),hu=pu.exports,vu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("country",{attrs:{"my-country":t.country,isNew:!0,loading:t.saving},on:{save:t.save}})],1)])])},gu=[],bu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.myCountry)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingCountry}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingCountry,expression:"!loadingCountry"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("myCountrySections.title"),placeholder:t.$t("myCountrySections.title"),id:"title",name:"title",type:"text","is-required":!0},model:{value:t.myCountry.title,callback:function(e){t.$set(t.myCountry,"title",e)},expression:"myCountry.title"}}),t.errors.has("title")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("title")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"category"}},[t._v(t._s(t.$t("myCountrySections.category"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.myCountry.category_id,expression:"myCountry.category_id"},{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"category",name:"category",disabled:t.cantChangeCC()},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.myCountry,"category_id",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.visibleCategories,function(e){return n("option",{key:e.id,domProps:{value:e.id}},[t._v("\n "+t._s(e.title)+"\n ")])})],2)]),t.errors.has("category")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("category")))]):t._e(),n("div",{staticClass:"form-group full-screen-editor"},[n("label",[t._v(t._s(t.$t("countries.sections.content"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"description"},model:{value:t.myCountry.description,callback:function(e){t.$set(t.myCountry,"description",e)},expression:"myCountry.description"}})],1),t.errors.has("description")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("description")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("myCountrySections.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("myCountrySections.cancel"))+"\n ")])],1)])])],1)])},Cu=[],_u={props:{myCountry:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(A["a"])({},Object(k["b"])({sections:"myCountrySections/sections",visibleCategories:"myCountrySections/visibleCategories",travelCautions:"myCountrySections/travelCautions"})),data:function(){return{loadingCountry:!1,loadingSections:!1,loadingMove:!1,selectedSection:{},sectionAction:!1,isShowingEnableSectionConfirmationModal:!1,isShowingDisableSectionConfirmationModal:!1}},components:{InputComponent:xo,LanguagePicker:Rr,CALButton:Bo,ContentEditor:ws,LoadingSpinner:Ca},methods:Object(A["a"])({},Object(k["c"])({setSelectedSection:"myCountrySections/SET_SELECTED_SECTION"}),{back:function(){history.back()},getCategories:function(){this.$store.dispatch("myCountrySections/getCategories")},getCountry:function(){var t=this;t.loadingCountry=!0,t.$store.dispatch("myCountrySections/getCountry",t.$route.params.id).then(function(){t.loadingCountry=!1},function(){t.loadingCountry=!1})},edit:function(t){this.setSelectedSection(t),this.$router.push({name:"EditSection",params:{id:this.$route.params.id,sectionId:t.id}})},createSection:function(){this.$router.push({name:"NewSection",params:{id:this.$route.params.id}})},cantChangeCC:function(){return!this.isNew&&"en"===this.$i18n.locale},getTravelCautions:function(){this.$store.dispatch("myCountrySections/getTravelCautions")},moveDown:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("myCountrySections/moveDown",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},moveUp:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("myCountrySections/moveUp",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},resetSelectedSection:function(){this.selectedSection={}},showEnableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingEnableSectionConfirmationModal=!0},closeEnableSectionConfirmationModal:function(){this.isShowingEnableSectionConfirmationModal=!1,this.resetSelectedSection()},enableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("myCountrySections/enableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("myCountrySections.sections.enabled_successfully")),t.hideSpinner("sectionAction"),t.closeEnableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})},showDisableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingDisableSectionConfirmationModal=!0},closeDisableSectionConfirmationModal:function(){this.isShowingDisableSectionConfirmationModal=!1,this.resetSelectedSection()},disableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("myCountrySections/disableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("myCountrySections.sections.disabled_successfully")),t.hideSpinner("sectionAction"),t.closeDisableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})}}),mounted:function(){var t=this,e=this;this.getCategories(),!e.isNew&&this.myCountry.id&&this.getCountry(),xi.$on("language-selected",function(){!e.isNew&&t.myCountry.id?t.getCountry():(e.myCountry.title="",e.myCountry.description="")})},beforeDestroy:function(){xi.$off("language-selected")}},yu=_u,Su=Object(fo["a"])(yu,bu,Cu,!1,null,null,null),wu=Su.exports,Au={computed:Object(A["a"])({},Object(k["b"])({countries:"countries/countries",isLoading:"countries/isLoading"})),components:{Country:wu},data:function(){return{country:{description:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("myCountrySections/createCountry",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("countries.country_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},ku=Au,Eu=Object(fo["a"])(ku,vu,gu,!1,null,null,null),$u=Eu.exports,ju=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("Country",{attrs:{"my-country":t.country,isNew:!1,loading:t.updating},on:{save:t.save}})],1)])])},Mu=[],Lu={computed:Object(A["a"])({},Object(k["b"])({country:"myCountrySections/selectedSection"})),components:{Country:wu},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("myCountrySections/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("myCountrySections.country_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})}}},Pu=Lu,Iu=Object(fo["a"])(Pu,ju,Mu,!1,null,null,null),Ou=Iu.exports,Tu=[{path:"/myCountry",name:"MyCountry",component:hu,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/myCountry/new",name:"NewMyCountrySection",component:$u,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/myCountry/:id",props:!0,name:"EditMyCountrySection",component:Ou,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],xu=Tu,Du=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("kkdSections.title"),placeholder:t.$t("kkdSections.title"),id:"title",name:"title",type:"text"},model:{value:t.search.title,callback:function(e){t.$set(t.search,"title",e)},expression:"search.title"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("kkdSections.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("kkdSections.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createCountry()}}},[t._v(t._s(t.$t("kkdSections.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.kkdSections&&0!==t.kkdSections.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.kkdSections&&t.kkdSections.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("kkdSections.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("kkdSections.actions")))])])]),n("tbody",t._l(t.kkdSections,function(e,i){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.title))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[e.can_be_enabled?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),n("CALButton",{attrs:{title:t.$t("kkdSections.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]),e.is_visible?t._e():n("CALButton",{attrs:{title:t.$t("kkdSections.enable"),disabled:!e.can_be_enabled,"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showEnableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-check"})]),e.is_visible?n("CALButton",{attrs:{title:t.$t("kkdSections.disable"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showDisableCountryConfirmationModal(e)}}},[n("span",{staticClass:"fa fa-fw fa-times"})]):t._e(),i!==t.kkdSections.length-1?n("CALButton",{attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveDown"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.moveDown(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-down"})]):t._e(),0!==i?n("CALButton",{staticClass:"btn btn-success btn-sm m-1",attrs:{loading:t.loadingMove,title:t.$t("countries.sections.moveUp")},on:{click:function(n){return t.moveUp(e)}}},[n("span",{staticClass:"fa fa-fw fa-arrow-up"})]):t._e()],1)])}),0)]):t._e()],1)]),t.isShowingEnableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("kkdSections.country_enable_confirmation")},on:{cancel:function(e){return t.closeEnableCountryConfirmationModal()},confirm:t.enableCountry}}):t._e(),t.isShowingDisableCountryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.countryAction,message:t.$t("kkdSections.country_disable_confirmation")},on:{cancel:function(e){return t.closeDisableCountryConfirmationModal()},confirm:t.disableCountry}}):t._e()],1)},Nu=[],qu={computed:Object(A["a"])({},Object(k["b"])({kkdSections:"kkdSections/kkdSections",isLoading:"kkdSections/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,ConfirmationModal:ka,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{countryAction:!1,searchAction:!1,loadingMove:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{},selectedCountry:{}}},methods:Object(A["a"])({},Object(k["c"])({setSelectedCountry:"kkdSections/SET_SELECTED_SECTION"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("kkdSections/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedCountry=t,e.setSelectedCountry(t),e.$router.push({name:"EditKkdSection",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createCountry:function(){this.$router.push({name:"NewKkdSection"})},resetSelectedCountry:function(){this.selectedCountry={}},enableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("kkdSections/enable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("kkdSections.country_enabled_successfully")),t.hideSpinner("countryAction"),t.closeEnableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},disableCountry:function(){var t=this;t.showSpinner("countryAction"),t.$store.dispatch("kkdSections/disable",t.selectedCountry).then(function(){t.notificationService.success(t.$t("kkdSections.country_disabled_successfully")),t.hideSpinner("countryAction"),t.closeDisableCountryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("countryAction")})},showEnableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingEnableCountryConfirmationModal=!0},closeEnableCountryConfirmationModal:function(){this.isShowingEnableCountryConfirmationModal=!1,this.resetSelectedCountry()},showDisableCountryConfirmationModal:function(t){this.selectedCountry=t,this.setSelectedCountry(t),this.isShowingDisableCountryConfirmationModal=!0},closeDisableCountryConfirmationModal:function(){this.isShowingDisableCountryConfirmationModal=!1,this.resetSelectedCountry()},moveDown:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("kkdSections/moveDown",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},moveUp:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("kkdSections/moveUp",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},Ru=qu,Uu=Object(fo["a"])(Ru,Du,Nu,!1,null,null,null),Bu=Uu.exports,Vu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("country",{attrs:{"my-country":t.country,isNew:!0,loading:t.saving},on:{save:t.save}})],1)])])},zu=[],Gu=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.myCountry)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingCountry}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingCountry,expression:"!loadingCountry"}]},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("kkdSections.title"),placeholder:t.$t("kkdSections.title"),id:"title",name:"title",type:"text","is-required":!0},model:{value:t.myCountry.title,callback:function(e){t.$set(t.myCountry,"title",e)},expression:"myCountry.title"}}),t.errors.has("title")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("title")))]):t._e(),n("div",{staticClass:"form-group full-screen-editor"},[n("label",[t._v(t._s(t.$t("countries.sections.content"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"description"},model:{value:t.myCountry.description,callback:function(e){t.$set(t.myCountry,"description",e)},expression:"myCountry.description"}})],1),t.errors.has("description")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("description")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("kkdSections.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("kkdSections.cancel"))+"\n ")])],1)])])],1)])},Fu=[],Yu={props:{myCountry:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(A["a"])({},Object(k["b"])({sections:"kkdSections/sections",travelCautions:"kkdSections/travelCautions"})),data:function(){return{loadingCountry:!1,loadingSections:!1,loadingMove:!1,selectedSection:{},sectionAction:!1,isShowingEnableSectionConfirmationModal:!1,isShowingDisableSectionConfirmationModal:!1}},components:{InputComponent:xo,LanguagePicker:Rr,CALButton:Bo,ContentEditor:ws,LoadingSpinner:Ca},methods:Object(A["a"])({},Object(k["c"])({setSelectedSection:"kkdSections/SET_SELECTED_SECTION"}),{back:function(){history.back()},getCountry:function(){var t=this;t.loadingCountry=!0,t.$store.dispatch("kkdSections/getCountry",t.$route.params.id).then(function(){t.loadingCountry=!1},function(){t.loadingCountry=!1})},edit:function(t){this.setSelectedSection(t),this.$router.push({name:"EditSection",params:{id:this.$route.params.id,sectionId:t.id}})},createSection:function(){this.$router.push({name:"NewSection",params:{id:this.$route.params.id}})},getSections:function(){var t=this;t.loadingSections=!0,t.$store.dispatch("kkdSections/getSections",t.$route.params.id).then(function(){t.loadingSections=!1},function(){t.loadingSections=!1})},getTravelCautions:function(){this.$store.dispatch("kkdSections/getTravelCautions")},moveDown:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("kkdSections/moveDown",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},moveUp:function(t){var e=this;e.loadingMove=!0,e.$store.dispatch("kkdSections/moveUp",t).then(function(){e.loadingMove=!1},function(){e.loadingMove=!1})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},resetSelectedSection:function(){this.selectedSection={}},showEnableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingEnableSectionConfirmationModal=!0},closeEnableSectionConfirmationModal:function(){this.isShowingEnableSectionConfirmationModal=!1,this.resetSelectedSection()},enableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("kkdSections/enableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("kkdSections.sections.enabled_successfully")),t.hideSpinner("sectionAction"),t.closeEnableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})},showDisableSectionConfirmationModal:function(t){this.selectedSection=t,this.setSelectedSection(t),this.isShowingDisableSectionConfirmationModal=!0},closeDisableSectionConfirmationModal:function(){this.isShowingDisableSectionConfirmationModal=!1,this.resetSelectedSection()},disableSection:function(){var t=this;t.showSpinner("sectionAction"),t.$store.dispatch("kkdSections/disableSection",t.selectedSection).then(function(){t.notificationService.success(t.$t("kkdSections.sections.disabled_successfully")),t.hideSpinner("sectionAction"),t.closeDisableSectionConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("sectionAction")})}}),mounted:function(){var t=this,e=this;!e.isNew&&this.myCountry.id&&this.getCountry(),xi.$on("language-selected",function(){!e.isNew&&t.myCountry.id?t.getCountry():(e.myCountry.title="",e.myCountry.description="")})},beforeDestroy:function(){xi.$off("language-selected")}},Ku=Yu,Hu=Object(fo["a"])(Ku,Gu,Fu,!1,null,null,null),Ju=Hu.exports,Qu={computed:Object(A["a"])({},Object(k["b"])({countries:"countries/countries",isLoading:"countries/isLoading"})),components:{Country:Ju},data:function(){return{country:{description:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("kkdSections/createCountry",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("countries.country_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},Wu=Qu,Xu=Object(fo["a"])(Wu,Vu,zu,!1,null,null,null),Zu=Xu.exports,tl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("Country",{attrs:{"my-country":t.country,isNew:!1,loading:t.updating},on:{save:t.save}})],1)])])},el=[],nl={computed:Object(A["a"])({},Object(k["b"])({country:"kkdSections/selectedSection"})),components:{Country:Ju},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("kkdSections/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("kkdSections.country_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})}}},il=nl,ol=Object(fo["a"])(il,tl,el,!1,null,null,null),al=ol.exports,rl=[{path:"/kkd",name:"KkdSections",component:Bu,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/kkd/new",name:"NewKkdSection",component:Zu,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/kkd/:id",props:!0,name:"EditKkdSection",component:al,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],sl=rl,cl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("members.name"),placeholder:t.$t("members.name"),id:"$t('members.name')",name:"$t('members.name')",type:"text"},model:{value:t.search.name,callback:function(e){t.$set(t.search,"name",e)},expression:"search.name"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("members.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("members.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createMember()}}},[t._v(t._s(t.$t("members.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.members&&0!==t.members.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.members&&t.members.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("members.name")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("members.position")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("members.status")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{width:"180px",scope:"col"}},[t._v(t._s(t.$t("members.actions")))])])]),n("tbody",t._l(t.members,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.name))]),n("td",[t._v(t._s(e.position))]),n("td",[t._v(t._s(t.$t("members.statuses."+e.status)))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right",attrs:{width:"180px"}},[e.can_be_published?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),e.can_be_published&&t.MemberService.isDraft(e)&&!t.isEditor()?n("CALButton",{attrs:{title:t.$t("members.publish"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showPublishModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-upload"})]):t._e(),t.MemberService.isArchived(e)||t.isEditor()?t._e():n("CALButton",{attrs:{title:t.$t("members.archive"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showArchiveModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-archive"})]),t.isAdmin()&&"ARCHIVED"===e.status?n("CALButton",{attrs:{title:t.$t("members.enable"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showActivateModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-check"})]):t._e(),t.MemberService.isDraft(e)||!t.isEditor()?n("CALButton",{attrs:{title:t.$t("members.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]):t._e()],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1),t.isShowingPublishModal?n("confirmation-modal",{attrs:{"loading-button":t.memberAction,message:t.$t("members.publish_confirmation")},on:{cancel:function(e){return t.closePublishConfirmationModal()},confirm:t.publish}}):t._e(),t.isShowingFeatureModal?n("confirmation-modal",{attrs:{"loading-button":t.memberAction,message:t.$t("members.feature_confirmation")},on:{cancel:function(e){return t.closeFeatureConfirmationModal()},confirm:t.feature}}):t._e(),t.isShowingArchiveModal?n("confirmation-modal",{attrs:{"loading-button":t.memberAction,message:t.$t("members.archive_confirmation")},on:{cancel:function(e){return t.closeArchiveConfirmationModal()},confirm:t.archive}}):t._e(),t.isShowingActivateModal?n("confirmation-modal",{attrs:{"loading-button":t.memberAction,message:t.$t("members.activate_confirmation")},on:{cancel:function(e){return t.closeActivateConfirmationModal()},confirm:t.activate}}):t._e()],1)])},ul=[],ll={computed:Object(A["a"])({},Object(k["b"])({members:"members/members",meta:"members/meta",isLoading:"members/isLoading",availableCategories:"categories/availableCategories",availableUsers:"users/availableUsers"})),components:{InputComponent:xo,ConfirmationModal:ka,LoadingSpinner:Ca,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{memberAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{},selectedMember:{},MemberService:gn}},methods:Object(A["a"])({},uo,Object(k["c"])({setSelectedMember:"members/SET_SELECTED_MEMBER"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("members/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedMember=t,e.setSelectedMember(t),e.$router.push({name:"EditMember",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createMember:function(){this.$router.push({name:"NewMember"})},showPublishModal:function(t){this.selectedMember=t,this.setSelectedMember(t),this.isShowingPublishModal=!0},closePublishConfirmationModal:function(){this.isShowingPublishModal=!1},publish:function(){var t=this;t.showSpinner("memberAction"),t.$store.dispatch("members/publish",t.selectedMember).then(function(){t.notificationService.success(t.$t("members.member_published")),t.hideSpinner("memberAction"),t.closePublishConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("memberAction")})},closeFeatureConfirmationModal:function(){this.isShowingFeatureModal=!1},feature:function(){var t=this;t.showSpinner("memberAction"),t.$store.dispatch("members/feature",t.selectedMember).then(function(){t.notificationService.success(t.$t("members.member_featured")),t.hideSpinner("memberAction"),t.closeFeatureConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("memberAction")})},showArchiveModal:function(t){this.selectedMember=t,this.setSelectedMember(t),this.isShowingArchiveModal=!0},showActivateModal:function(t){this.selectedMember=t,this.setSelectedMember(t),this.isShowingActivateModal=!0},closeArchiveConfirmationModal:function(){this.isShowingArchiveModal=!1},closeActivateConfirmationModal:function(){this.isShowingActivateModal=!1},archive:function(){var t=this;t.showSpinner("memberAction"),t.$store.dispatch("members/archive",t.selectedMember).then(function(){t.notificationService.success(t.$t("members.member_archived")),t.hideSpinner("memberAction"),t.closeArchiveConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("memberAction")})},activate:function(){var t=this;t.showSpinner("memberAction"),t.$store.dispatch("members/activate",t.selectedMember).then(function(){t.notificationService.success(t.$t("members.member_activated")),t.hideSpinner("memberAction"),t.closeActivateConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("memberAction")})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},dl=ll,ml=Object(fo["a"])(dl,cl,ul,!1,null,null,null),fl=ml.exports,pl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("member",{attrs:{isNew:!0,loading:t.saving,member:t.member},on:{save:t.save}})],1)])])},hl=[],vl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.member)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingMember}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingMember,expression:"!loadingMember"}],staticClass:"member-container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"form-group col-sm-12"},[n("language-picker"),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder"},[t._v(t._s(t.$t("members.avatar"))+"*")]),n("media-upload",{attrs:{loading:t.loading,className:"featured-post "+(t.member.avatar?"has-image":""),resource:t.member.avatar},on:{fileAdded:t.imageSelected}})],1),t.member.avatar?t._e():n("div",{staticClass:"error-message"},[t._v("Ngarkimi imazhit është i detyrueshëm")]),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|max:60",expression:"'required|max:60'",modifiers:{initial:!0}}],attrs:{label:t.$t("members.name"),placeholder:t.$t("members.name"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.member.name,callback:function(e){t.$set(t.member,"name",e)},expression:"member.name"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|max:60",expression:"'required|max:60'",modifiers:{initial:!0}}],attrs:{label:t.$t("members.position"),placeholder:t.$t("members.position"),id:"position",name:"position",type:"text","is-required":!0},model:{value:t.member.position,callback:function(e){t.$set(t.member,"position",e)},expression:"member.position"}}),t.errors.has("position")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("position")))]):t._e(),n("div",{staticClass:"form-group full-screen-editor"},[n("label",[t._v(t._s(t.$t("members.description"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"description"},model:{value:t.member.description,callback:function(e){t.$set(t.member,"description",e)},expression:"member.description"}})],1),t.errors.has("description")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("description")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"video_type"}},[t._v(t._s(t.$t("members.video_type")))]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.member.video_type,expression:"member.video_type"}],staticClass:"form-control",attrs:{id:"video_type",name:"video_type"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.member,"video_type",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("No video")]),t._l(t.videoTypes,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])})],2)]),t.member.video_type?n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("members.label_video_url"),placeholder:t.$t("members.placeholder_video_url"),id:"video_url",name:"video_url",type:"text","is-required":!0},model:{value:t.member.video_url,callback:function(e){t.$set(t.member,"video_url",e)},expression:"member.video_url"}}):t._e(),t.errors.has("video_url")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("video_url")))]):t._e()],1)]),n("br"),n("CALButton",{attrs:{disabled:t.errors.any()||!t.member.avatar,type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("members.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("members.cancel"))+"\n ")])],1),n("cropper-modal",{attrs:{image:t.newImage,isShowingArchiveModal:t.cropping,"aspect-ratio":1,"min-container-height":250,"min-container-width":250},on:{confirm:t.uploadImage,close:t.closeCropper}})],1)},gl=[],bl={props:{member:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{cropping:!1,newImage:null,loadingMember:!1,publishedAtConfig:{enableTime:!0,time_24hr:!0,wrap:!0,altFormat:"d/m/Y H:i",altInput:!0,dateFormat:"d/m/Y H:i"},flowConfig:{testChunks:!1,allowDuplicateUploads:!0,attributes:{accept:"image/*"},target:"".concat("http://api.diaspora.coding.al/api/","v1/members/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Ti.getters["auth/token"])}}}},computed:Object(A["a"])({},Object(k["b"])({categories:"categories/categories",enabledCountries:"countries/enabledCountries",videoTypes:"members/videoTypes",userData:"auth/userData"}),{usableCategories:function(){return this.categories.filter(function(t){return t.can_use})}}),components:{ContentEditor:ws,InputComponent:xo,LanguagePicker:Rr,MediaUpload:Za,LoadingSpinner:Ca,CropperModal:Kc,CALButton:Bo},methods:{back:function(){history.back()},getMember:function(){var t=this;t.loadingMember=!0,t.$store.dispatch("members/getMember",t.$route.params.id).then(function(){t.loadingMember=!1},function(){t.loadingMember=!1})},getVideoTypes:function(){this.$store.dispatch("members/getVideoTypes")},getEnabledCountries:function(){this.$store.dispatch("countries/getEnabledCountries")},cantChangeCC:function(){return!this.isNew&&"en"===this.$i18n.locale},imageSelected:function(t){var e=this;tr.getBase64(t.file.file).then(function(t){e.newImage=t}),e.cropping=!0},uploadImage:function(t){var e=this;e.member.avatar=t,e.isNew||e.$emit("onAvatarChange",{member:e.member,encodedImage:t.split(",")[1]}),e.closeCropper()},closeCropper:function(){this.newImage=null,this.cropping=!1}},mounted:function(){var t=this,e=this;!e.isNew&&this.member.id&&this.getMember(),this.getVideoTypes(),this.getEnabledCountries(),xi.$on("language-selected",function(){!e.isNew&&t.member.id?t.getMember():(e.member.title="",e.member.short_desc="",e.member.content=""),t.getVideoTypes(),t.getEnabledCountries()})},beforeDestroy:function(){xi.$off("language-selected")}},Cl=bl,_l=Object(fo["a"])(Cl,vl,gl,!1,null,null,null),yl=_l.exports,Sl={computed:Object(A["a"])({},Object(k["b"])({members:"members/members",isLoading:"members/isLoading"})),components:{Member:yl},data:function(){return{member:{position:"",description:"",video_type:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("members/createMember",t).then(function(t){e.saving=!1,e.notificationService.success(e.$t("members.member_created_successfully")),e.$router.replace({name:"EditMember",params:{id:t.id}})},function(t){e.saving=!1,e.notificationService.error(t)})}}},wl=Sl,Al=Object(fo["a"])(wl,pl,hl,!1,null,null,null),kl=Al.exports,El=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("member",{attrs:{isNew:!1,loading:t.updating,member:t.member},on:{onAvatarChange:t.uploadFeaturedImage,save:t.save}})],1)])])},$l=[],jl={computed:Object(A["a"])({},Object(k["b"])({member:"members/selectedMember"})),components:{Member:yl},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("members/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("members.member_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadFeaturedImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("members/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("members.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},Ml=jl,Ll=Object(fo["a"])(Ml,El,$l,!1,null,null,null),Pl=Ll.exports,Il=[{path:"/members",name:"Members",component:fl,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/members/new",name:"NewMember",component:kl,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){var o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:o=Ti.getters["categories/categories"],0===o.length?Ti.dispatch("categories/get").then(function(){i(Ti.getters["auth/isAuth"])}):i(Ti.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/members/:id",props:!0,name:"EditMember",component:Pl,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){var o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:o=Ti.getters["categories/categories"],0===o.length?Ti.dispatch("categories/get").then(function(){i(Ti.getters["auth/isAuth"])}):i(Ti.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Ol=Il,Tl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("myCountryCategories.title"),placeholder:t.$t("myCountryCategories.title"),id:"title",name:"title",type:"text"},model:{value:t.search.title,callback:function(e){t.$set(t.search,"title",e)},expression:"search.title"}})],1)]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit",buttonClass:"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("myCountryCategories.search"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("myCountryCategories.clean"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-success mr-1"},on:{click:function(e){return t.createCategory()}}},[t._v(t._s(t.$t("myCountryCategories.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.categories&&0!==t.categories.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.categories&&t.categories.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("myCountryCategories.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{scope:"col"}},[t._v(t._s(t.$t("myCountryCategories.actions")))])])]),n("tbody",t._l(t.categories,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.title))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right"},[e.can_be_enabled?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),n("CALButton",{attrs:{title:t.$t("myCountryCategories.edit"),buttonClass:"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})])],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1)]),t.isShowingArchiveCategoryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.categoryAction,message:t.$t("myCountryCategories.category_archive_confirmation")},on:{cancel:function(e){return t.closeArchiveCategoryConfirmationModal()},confirm:t.archiveCategory}}):t._e(),t.isShowingUnArchiveCategoryConfirmationModal?n("confirmation-modal",{attrs:{"loading-button":t.categoryAction,message:t.$t("myCountryCategories.category_unarchive_confirmation")},on:{cancel:function(e){return t.closeUnArchiveCategoryConfirmationModal()},confirm:t.unArchiveCategory}}):t._e()],1)},xl=[],Dl={computed:Object(A["a"])({},Object(k["b"])({categories:"myCountryCategories/categories",meta:"myCountryCategories/meta",isLoading:"myCountryCategories/isLoading"})),components:{InputComponent:xo,LoadingSpinner:Ca,CALButton:Bo,ConfirmationModal:ka,AvailableIn:kr,NoData:Na},data:function(){return{importTarget:"".concat("http://api.diaspora.coding.al/api/","v1/myCountryCategories/actions/import"),categoryAction:!1,searchAction:!1,isShowingArchiveCategoryConfirmationModal:!1,isShowingUnArchiveCategoryConfirmationModal:!1,search:{},selectedCategory:{}}},methods:Object(A["a"])({},Object(k["c"])({setSelectedCategory:"myCountryCategories/SET_SELECTED_CATEGORY"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("myCountryCategories/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedCategory=t,e.setSelectedCategory(t),e.$router.push({name:"EditCountryCategory",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createCategory:function(){this.$router.push({name:"NewCountryCategory"})},resetSelectedCategory:function(){this.selectedCategory={}},showArchiveCategoryConfirmationModal:function(t){this.selectedCategory=t,this.setSelectedCategory(t),this.isShowingArchiveCategoryConfirmationModal=!0},closeArchiveCategoryConfirmationModal:function(){this.isShowingArchiveCategoryConfirmationModal=!1,this.resetSelectedCategory()},archiveCategory:function(){var t=this;t.showSpinner("categoryAction"),t.$store.dispatch("myCountryCategories/archive",t.selectedCategory).then(function(){t.notificationService.success(t.$t("myCountryCategories.category_archived")),t.hideSpinner("categoryAction"),t.closeArchiveCategoryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("categoryAction")})},showUnArchiveCategoryConfirmationModal:function(t){this.selectedCategory=t,this.setSelectedCategory(t),this.isShowingUnArchiveCategoryConfirmationModal=!0},closeUnArchiveCategoryConfirmationModal:function(){this.isShowingUnArchiveCategoryConfirmationModal=!1,this.resetSelectedCategory()},unArchiveCategory:function(){var t=this;t.showSpinner("categoryAction"),t.$store.dispatch("myCountryCategories/unArchive",t.selectedCategory).then(function(){t.notificationService.success(t.$t("myCountryCategories.category_unarchived")),t.hideSpinner("categoryAction"),t.closeUnArchiveCategoryConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("categoryAction")})}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch()}},Nl=Dl,ql=Object(fo["a"])(Nl,Tl,xl,!1,null,null,null),Rl=ql.exports,Ul=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("category",{attrs:{category:t.category,isNew:!0,loading:t.saving},on:{save:t.save}})],1)])])},Bl=[],Vl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.category)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingCategory}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingCategory,expression:"!loadingCategory"}]},[n("language-picker"),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("myCountryCategories.title"),placeholder:t.$t("myCountryCategories.title"),id:"title",name:"title",type:"text","is-required":!0},model:{value:t.category.title,callback:function(e){t.$set(t.category,"title",e)},expression:"category.title"}}),t.errors.has("title")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("title")))]):t._e(),n("CALButton",{attrs:{disabled:t.errors.any(),type:"submit",buttonClass:"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("myCountryCategories.save"))+"\n ")]),n("CALButton",{attrs:{buttonClass:"btn btn-secondary mr-1",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("myCountryCategories.cancel"))+"\n ")])],1)],1)},zl=[],Gl={props:{category:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingCategory:!1}},components:{InputComponent:xo,CALButton:Bo,LanguagePicker:Rr,LoadingSpinner:Ca},methods:{back:function(){history.back()},getCategory:function(){var t=this;t.loadingCategory=!0,t.$store.dispatch("myCountryCategories/getCategory",t.$route.params.id).then(function(){t.loadingCategory=!1},function(){t.loadingCategory=!1})}},mounted:function(){var t=this;!t.isNew&&t.category.id&&t.getCategory(),xi.$on("language-selected",function(){!t.isNew&&t.category.id?t.getCategory():(t.category.name="",t.category.slug="")})},beforeDestroy:function(){xi.$off("language-selected")}},Fl=Gl,Yl=Object(fo["a"])(Fl,Vl,zl,!1,null,null,null),Kl=Yl.exports,Hl={computed:Object(A["a"])({},Object(k["b"])({categories:"myCountryCategories/categories",isLoading:"myCountryCategories/isLoading"})),components:{Category:Kl},data:function(){return{category:{},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,e.$store.dispatch("myCountryCategories/createCategory",t).then(function(){e.saving=!1,e.notificationService.success(e.$t("categories.category_updated_successfully")),history.back()},function(t){e.saving=!1,e.notificationService.error(t)})}}},Jl=Hl,Ql=Object(fo["a"])(Jl,Ul,Bl,!1,null,null,null),Wl=Ql.exports,Xl=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("category",{attrs:{category:t.category,isNew:!1,loading:t.updating},on:{fileAdded:t.uploadImage,save:t.save}})],1)])])},Zl=[],td={computed:Object(A["a"])({},Object(k["b"])({category:"myCountryCategories/selectedCategory"})),components:{Category:Kl},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,this.$store.dispatch("myCountryCategories/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("categories.category_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("myCountryCategories/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("categories.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},ed=td,nd=Object(fo["a"])(ed,Xl,Zl,!1,null,null,null),id=nd.exports,od=[{path:"/myCountryCategories",name:"MyCountryCategories",component:Rl,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/myCountryCategories/new",name:"NewCountryCategory",component:Wl,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/myCountryCategories/:id",props:!0,name:"EditCountryCategory",component:id,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],ad=od,rd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.startSearch(e)}}},[n("div",{staticClass:"row pt-1"},[n("div",{staticClass:"col-sm-3"},[n("input-component",{attrs:{label:t.$t("events.title"),placeholder:t.$t("events.title"),id:"$t('events.title')",name:"$t('events.title')",type:"text"},model:{value:t.search.title,callback:function(e){t.$set(t.search,"title",e)},expression:"search.title"}})],1),n("div",{staticClass:"col-sm-3"},[n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder"},[t._v(t._s(t.$t("events.for")))]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.search.for,expression:"search.for"}],staticClass:"form-control",attrs:{id:"category",name:"category"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.search,"for",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.availableModules,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])})],2)])])]),n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-12"},[n("CALButton",{attrs:{type:"submit","button-class":"btn btn-primary mr-1",loading:t.searchAction}},[t._v(t._s(t.$t("events.search"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",loading:t.searchAction},on:{click:function(e){return t.clearSearch()}}},[t._v(t._s(t.$t("events.clean"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-success mr-1"},on:{click:function(e){return t.createEvent()}}},[t._v(t._s(t.$t("events.create"))+"\n ")])],1)])]),n("div",{staticClass:"row pt-5"},[n("div",{staticClass:"col-sm-12"},[n("loading-spinner",{attrs:{"show-spinner":t.isLoading}}),t.isLoading||t.events&&0!==t.events.length?t._e():n("no-data",{attrs:{message:t.$t("common.no_data")}}),t.events&&t.events.length>0?n("table",{staticClass:"table mt-1"},[n("thead",{staticClass:"thead-light"},[n("tr",[n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("events.title")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("events.for")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("events.when")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("events.location")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("events.status")))]),n("th",{attrs:{scope:"col"}},[t._v(t._s(t.$t("common.available_in")))]),n("th",{staticClass:"text-right",attrs:{width:"180px",scope:"col"}},[t._v(t._s(t.$t("events.actions")))])])]),n("tbody",t._l(t.events,function(e){return n("tr",{key:e.id},[n("td",[t._v(t._s(e.title))]),n("td",[t._v(t._s(e.readable_for))]),n("td",[t._v(t._s(t.getReadableDate(e.when)))]),n("td",[t._v(t._s(e.location))]),n("td",[t._v(t._s(t.$t("events.statuses."+e.status)))]),n("td",{staticClass:"position-relative"},[n("AvailableIn",{attrs:{languages:e.available_in}})],1),n("td",{staticClass:"text-right",attrs:{width:"180px"}},[e.can_be_published?t._e():n("CALButton",{staticClass:"btn btn-transparent btn-sm m-1",attrs:{title:t.$t("common.check_data_to_enable")}},[n("span",{staticClass:"fa fa-fw fa-info"})]),e.can_be_published&&t.EventService.isDraft(e)&&!t.isEditor()?n("CALButton",{attrs:{title:t.$t("events.publish"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showPublishModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-upload"})]):t._e(),t.EventService.isArchived(e)||t.isEditor()?t._e():n("CALButton",{attrs:{title:t.$t("events.archive"),"button-class":"btn btn-primary btn-sm m-1"},on:{click:function(n){return t.showArchiveModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-archive"})]),t.isAdmin()&&"ARCHIVED"===e.status?n("CALButton",{attrs:{title:t.$t("events.enable"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.showActivateModal(e)}}},[n("i",{staticClass:"fa fa-fw fa-check"})]):t._e(),t.EventService.isDraft(e)||!t.isEditor()?n("CALButton",{attrs:{title:t.$t("events.edit"),"button-class":"btn btn-success btn-sm m-1"},on:{click:function(n){return t.edit(e)}}},[n("i",{staticClass:"fa fa-fw fa-pencil"})]):t._e()],1)])}),0)]):t._e(),t.meta&&t.meta.pagination?n("b-pagination",{attrs:{"per-page":t.meta.pagination.per_page,"total-rows":t.meta.pagination.total,size:"sm"},on:{change:t.changePage},model:{value:t.meta.pagination.current_page,callback:function(e){t.$set(t.meta.pagination,"current_page",e)},expression:"meta.pagination.current_page"}}):t._e()],1),t.isShowingPublishModal?n("confirmation-modal",{attrs:{"loading-button":t.eventAction,message:t.$t("events.publish_confirmation")},on:{cancel:function(e){return t.closePublishConfirmationModal()},confirm:t.publish}}):t._e(),t.isShowingFeatureModal?n("confirmation-modal",{attrs:{"loading-button":t.eventAction,message:t.$t("events.feature_confirmation")},on:{cancel:function(e){return t.closeFeatureConfirmationModal()},confirm:t.feature}}):t._e(),t.isShowingArchiveModal?n("confirmation-modal",{attrs:{"loading-button":t.eventAction,message:t.$t("events.archive_confirmation")},on:{cancel:function(e){return t.closeArchiveConfirmationModal()},confirm:t.archive}}):t._e(),t.isShowingActivateModal?n("confirmation-modal",{attrs:{"loading-button":t.eventAction,message:t.$t("events.activate_confirmation")},on:{cancel:function(e){return t.closeActivateConfirmationModal()},confirm:t.activate}}):t._e()],1)])},sd=[],cd={computed:Object(A["a"])({},Object(k["b"])({events:"events/events",meta:"events/meta",isLoading:"events/isLoading",availableModules:"events/modules",availableUsers:"users/availableUsers"})),components:{InputComponent:xo,ConfirmationModal:ka,LoadingSpinner:Ca,CALButton:Bo,AvailableIn:kr,NoData:Na},data:function(){return{eventAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{for:""},selectedEvent:{},EventService:ci}},methods:Object(A["a"])({},uo,Object(k["c"])({setSelectedEvent:"events/SET_SELECTED_EVENT"}),{startSearch:function(){var t=this;t.search.page=1,t.internalSearch()},internalSearch:function(){var t=this;t.showSpinner("searchAction"),t.$router.push({query:t.search}),t.$store.dispatch("events/get",t.search).then(function(){t.hideSpinner("searchAction")},function(){t.hideSpinner("searchAction")})},changePage:function(t){var e=this;e.search.page=t,e.internalSearch()},clearSearch:function(){var t=this;t.search={include:"roles"},t.internalSearch()},edit:function(t){var e=this;e.selectedEvent=t,e.setSelectedEvent(t),e.$router.push({name:"EditEvent",params:{id:t.id}})},showSpinner:function(t){this[t]=!0},hideSpinner:function(t){this[t]=!1},createEvent:function(){this.$router.push({name:"NewEvent"})},showPublishModal:function(t){this.selectedEvent=t,this.setSelectedEvent(t),this.isShowingPublishModal=!0},closePublishConfirmationModal:function(){this.isShowingPublishModal=!1},publish:function(){var t=this;t.showSpinner("eventAction"),t.$store.dispatch("events/publish",t.selectedEvent).then(function(){t.notificationService.success(t.$t("events.event_published")),t.hideSpinner("eventAction"),t.closePublishConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("eventAction")})},closeFeatureConfirmationModal:function(){this.isShowingFeatureModal=!1},feature:function(){var t=this;t.showSpinner("eventAction"),t.$store.dispatch("events/feature",t.selectedEvent).then(function(){t.notificationService.success(t.$t("events.event_featured")),t.hideSpinner("eventAction"),t.closeFeatureConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("eventAction")})},showArchiveModal:function(t){this.selectedEvent=t,this.setSelectedEvent(t),this.isShowingArchiveModal=!0},showActivateModal:function(t){this.selectedEvent=t,this.setSelectedEvent(t),this.isShowingActivateModal=!0},closeArchiveConfirmationModal:function(){this.isShowingArchiveModal=!1},closeActivateConfirmationModal:function(){this.isShowingActivateModal=!1},archive:function(){var t=this;t.showSpinner("eventAction"),t.$store.dispatch("events/archive",t.selectedEvent).then(function(){t.notificationService.success(t.$t("events.event_archived")),t.hideSpinner("eventAction"),t.closeArchiveConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("eventAction")})},activate:function(){var t=this;t.showSpinner("eventAction"),t.$store.dispatch("events/activate",t.selectedEvent).then(function(){t.notificationService.success(t.$t("events.event_activated")),t.hideSpinner("eventAction"),t.closeActivateConfirmationModal()},function(e){t.notificationService.error(e),t.hideSpinner("eventAction")})},requestAvailableModules:function(){this.$store.dispatch("events/getModules")},getReadableDate:function(t){return this.$moment(t).format("DD/MM/YYYY - HH:mm")}}),created:function(){var t=this;t.search=Object.assign(t.search,t.$route.query),this.internalSearch(),this.requestAvailableModules()}},ud=cd,ld=Object(fo["a"])(ud,rd,sd,!1,null,null,null),dd=ld.exports,md=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("event",{attrs:{isNew:!0,loading:t.saving,event:t.event},on:{save:t.save}})],1)])])},fd=[],pd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("form",{attrs:{autocomplete:"off"},on:{submit:function(e){return e.preventDefault(),t.$emit("save",t.event)}}},[n("loading-spinner",{staticClass:"mt-5",attrs:{"show-spinner":t.loadingEvent}}),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.loadingEvent,expression:"!loadingEvent"}],staticClass:"event-container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"form-group col-sm-12"},[n("language-picker"),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder"},[t._v(t._s(t.$t("events.featuredImage"))+"*")]),n("media-upload",{attrs:{loading:t.loading,className:"featured-post "+(t.event.featured_image?"has-image":""),resource:t.event.featured_image},on:{fileAdded:t.imageSelected}})],1),t.event.featured_image?t._e():n("div",{staticClass:"error-message"},[t._v("Ngarkimi imazhit është i detyrueshëm")]),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|max:60",expression:"'required|max:60'",modifiers:{initial:!0}}],attrs:{label:t.$t("events.title"),placeholder:t.$t("events.title"),id:"name",name:"name",type:"text","is-required":!0},model:{value:t.event.title,callback:function(e){t.$set(t.event,"title",e)},expression:"event.title"}}),t.errors.has("name")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("name")))]):t._e(),n("date-picker-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{id:"when",label:t.$t("events.when"),config:t.publishedAtConfig},model:{value:t.event.when,callback:function(e){t.$set(t.event,"when",e)},expression:"event.when"}}),t.errors.has("when")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("when")))]):t._e(),n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required|max:100",expression:"'required|max:100'",modifiers:{initial:!0}}],attrs:{label:t.$t("events.location"),placeholder:t.$t("events.location"),id:"location",name:"location",type:"text","is-required":!0},model:{value:t.event.location,callback:function(e){t.$set(t.event,"location",e)},expression:"event.location"}}),t.errors.has("location")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("location")))]):t._e(),n("div",{staticClass:"form-group full-screen-editor"},[n("label",[t._v(t._s(t.$t("events.content"))+"*")]),n("content-editor",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{name:"content"},model:{value:t.event.description,callback:function(e){t.$set(t.event,"description",e)},expression:"event.description"}})],1),t.errors.has("content")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("content")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"category"}},[t._v(t._s(t.$t("events.for"))+"*")]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.event.for,expression:"event.for"},{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],staticClass:"form-control",attrs:{id:"category",name:"category",disabled:t.cantChangeCC()},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.event,"for",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("None")]),t._l(t.availableModules,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])})],2)]),t.errors.has("category")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("category")))]):t._e(),n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-control-placeholder",attrs:{for:"video_type"}},[t._v(t._s(t.$t("events.video_type")))]),n("select",{directives:[{name:"model",rawName:"v-model",value:t.event.video_type,expression:"event.video_type"}],staticClass:"form-control",attrs:{id:"video_type",name:"video_type"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.$set(t.event,"video_type",e.target.multiple?n:n[0])}}},[n("option",{attrs:{value:""}},[t._v("No video")]),t._l(t.videoTypes,function(e){return n("option",{key:e.code,domProps:{value:e.code}},[t._v("\n "+t._s(e.description)+"\n ")])})],2)]),t.event.video_type?n("input-component",{directives:[{name:"validate",rawName:"v-validate.initial",value:"required",expression:"'required'",modifiers:{initial:!0}}],attrs:{label:t.$t("events.label_video_url"),placeholder:t.$t("events.placeholder_video_url"),id:"video_url",name:"video_url",type:"text","is-required":!0},model:{value:t.event.video_url,callback:function(e){t.$set(t.event,"video_url",e)},expression:"event.video_url"}}):t._e(),t.errors.has("video_url")?n("div",{staticClass:"error-message"},[t._v(t._s(t.errors.first("video_url")))]):t._e()],1)]),n("br"),n("CALButton",{attrs:{disabled:t.errors.any()||!t.event.featured_image,type:"submit","button-class":"btn btn-success mr-1",loading:t.loading}},[t._v(t._s(t.$t("events.save"))+"\n ")]),n("CALButton",{attrs:{"button-class":"btn btn-secondary mr-1",type:"button",loading:t.loading},on:{click:function(e){return t.back()}}},[t._v(t._s(t.$t("events.cancel"))+"\n ")])],1),n("cropper-modal",{attrs:{image:t.newImage,isShowingArchiveModal:t.cropping},on:{confirm:t.uploadImage,close:t.closeCropper}})],1)},hd=[],vd=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",[n("div",{staticClass:"form-group"},[n("label",{staticClass:"datapicker-label",attrs:{for:t.id}},[t._v(t._s(t.label))]),n("div",{staticClass:"input-group d-flex align-items-bottom"},[n("flat-pickr",{staticClass:"form-control",attrs:{config:t.config,id:t.id,name:"date"},on:{"on-change":t.onChange,"on-open":t.onOpen},model:{value:t.DateValue,callback:function(e){t.DateValue=e},expression:"DateValue"}})],1)])])},gd=[],bd=n("c38f"),Cd=n.n(bd),_d={name:"DatepickerComponent",$_veeValidate:{value:function(){return this.DateValue},name:function(){return this.id}},props:{clear:{required:!1,type:Boolean,default:!0},options:{required:!1,type:Object},label:{required:!1,type:String},id:{required:!1,type:String},placeholder:{required:!1,type:String},value:{required:!1},config:{required:!1,default:function(){return{wrap:!0,altFormat:"d/m/Y",altInput:!0,dateFormat:"d/m/Y"}}}},data:function(){return{DateValue:void 0}},methods:{setDateValue:function(t){t&&(this.DateValue=this.$moment(t).toDate())},onChange:function(t){this.$emit("input",t[0]),this.$emit("dateChange",t[0])},onOpen:function(t){this.$emit("datePickerOpen",t)}},created:function(){var t=this;t.value&&t.setDateValue(t.value)},mounted:function(){this.options&&(this.config=Object.assign(this.options,this.config)),this.$emit("dateChange",this.DateValue)},components:{flatPickr:Cd.a}},yd=_d,Sd=(n("9ac3"),Object(fo["a"])(yd,vd,gd,!1,null,"2e60f7d6",null)),wd=Sd.exports,Ad={props:{event:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{cropping:!1,newImage:null,loadingEvent:!1,publishedAtConfig:{enableTime:!0,time_24hr:!0,wrap:!0,altFormat:"d/m/Y H:i",altInput:!0,dateFormat:"d/m/Y H:i"},flowConfig:{testChunks:!1,allowDuplicateUploads:!0,attributes:{accept:"image/*"},target:"".concat("http://api.diaspora.coding.al/api/","v1/events/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Ti.getters["auth/token"])}}}},computed:Object(A["a"])({},Object(k["b"])({categories:"categories/categories",availableModules:"events/modules",videoTypes:"events/videoTypes",userData:"auth/userData"})),components:{ContentEditor:ws,InputComponent:xo,DatePickerComponent:wd,LanguagePicker:Rr,LoadingSpinner:Ca,MediaUpload:Za,CropperModal:Kc,CALButton:Bo},methods:{back:function(){history.back()},getEvent:function(){var t=this;t.loadingEvent=!0,t.$store.dispatch("events/getEvent",t.$route.params.id).then(function(){t.loadingEvent=!1},function(){t.loadingEvent=!1})},getModules:function(){this.$store.dispatch("events/getModules")},getVideoTypes:function(){this.$store.dispatch("events/getVideoTypes")},cantChangeCC:function(){return!this.isNew&&"en"===this.$i18n.locale},imageSelected:function(t){var e=this;tr.getBase64(t.file.file).then(function(t){e.newImage=t}),e.cropping=!0},uploadImage:function(t){var e=this;e.event.featured_image=t,e.isNew||e.$emit("onFeaturedImageChange",{event:e.event,encodedImage:t.split(",")[1]}),e.closeCropper()},closeCropper:function(){this.newImage=null,this.cropping=!1}},mounted:function(){var t=this,e=this;!e.isNew&&this.event.id&&this.getEvent(),this.getModules(),this.getVideoTypes(),xi.$on("language-selected",function(){!e.isNew&&t.event.id?t.getEvent():(e.event.title="",e.event.short_desc="",e.event.content=""),t.getModules(),t.getVideoTypes()})},beforeDestroy:function(){xi.$off("language-selected")}},kd=Ad,Ed=Object(fo["a"])(kd,pd,hd,!1,null,null,null),$d=Ed.exports,jd={computed:Object(A["a"])({},Object(k["b"])({events:"events/events",isLoading:"events/isLoading"})),components:{Event:$d},data:function(){return{event:{description:"",video_type:"",for:"",featured_image:""},saving:!1}},methods:{save:function(t){var e=this;e.saving=!0,t.when=this.$moment(t.when).format("YYYY-MM-DD HH:mm:ss"),e.$store.dispatch("events/createEvent",t).then(function(t){e.saving=!1,e.notificationService.success(e.$t("events.event_updated_successfully")),e.$router.replace({name:"EditEvent",params:{id:t.id}})},function(t){e.saving=!1,e.notificationService.error(t)})}}},Md=jd,Ld=Object(fo["a"])(Md,md,fd,!1,null,null,null),Pd=Ld.exports,Id=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-sm-6 offset-3"},[n("event",{attrs:{isNew:!1,loading:t.updating,event:t.event},on:{onFeaturedImageChange:t.uploadFeaturedImage,save:t.save}})],1)])])},Od=[],Td={computed:Object(A["a"])({},Object(k["b"])({event:"events/selectedEvent"})),components:{Event:$d},data:function(){return{updating:!1}},methods:{save:function(t){var e=this;e.updating=!0,t.when=this.$moment(t.when).format("YYYY-MM-DD HH:mm:ss"),this.$store.dispatch("events/update",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("events.event_updated_successfully")),history.back()},function(t){e.updating=!1,e.notificationService.error(t)})},uploadFeaturedImage:function(t){var e=this;e.updating=!0,e.$store.dispatch("events/uploadImage",t).then(function(){e.updating=!1,e.notificationService.success(e.$t("events.image_uploaded_successfully"))},function(t){e.updating=!1,e.notificationService.error(t)})}}},xd=Td,Dd=Object(fo["a"])(xd,Id,Od,!1,null,null,null),Nd=Dd.exports,qd=[{path:"/events",name:"Events",component:dd,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Ti.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/events/new",name:"NewEvent",component:Pd,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Ti.dispatch("events/getModules").then(function(){i(Ti.getters["auth/isAuth"])});case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()},{path:"/events/:id",props:!0,name:"EditEvent",component:Nd,beforeEnter:function(){var t=Object(j["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Ti.dispatch("events/getModules").then(function(){i(Ti.getters["auth/isAuth"])});case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Rd=qd;i["default"].use($o["a"]);var Ud=new $o["a"]({base:"/",routes:[].concat(Object(Eo["a"])(da),Object(Eo["a"])(vr),Object(Eo["a"])(Rs),Object(Eo["a"])(dc),Object(Eo["a"])(uu),Object(Eo["a"])(xu),Object(Eo["a"])(sl),Object(Eo["a"])(Ol),Object(Eo["a"])(ad),Object(Eo["a"])(Rd),[{path:"*",redirect:"/posts"}]),scrollBehavior:function(){return{x:0,y:0}}}),Bd=Ud,Vd=(n("456d"),n("ac6a"),new i["default"]);function zd(t){Vd.$notify({duration:3e4,type:"error",title:"Error",text:t})}var Gd={success:function(t){Vd.$notify({duration:5e3,type:"success",title:"Success",text:t})},warning:function(t){Vd.$notify({duration:5e3,type:"warn",title:"Warning",text:t})},info:function(t){Vd.$notify({duration:5e3,title:"Info",text:t})},chat:function(t,e,n){Vd.$notify({title:t,duration:15e3,text:e,data:n})},error:function(t){if("string"!==typeof t)if(t.error&&(t=t.error),t.body&&(t=t.body.error),t.data&&(t=t.data),"string"!==typeof t)if("string"!==typeof t.message)try{Object.keys(t.message).forEach(function(e){"string"===typeof t.message[e]?zd(t.message[e]):t.message[e].forEach(function(t){zd(t)})})}catch(e){zd("Unexpected error occurred. Please contact your system admin.")}else zd(t.message);else zd(t);else zd(t)}},Fd=Gd,Yd=n("1157"),Kd=n.n(Yd),Hd='<div class="coding-al-action-spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n</div>',Jd={update:function(t,e){e.value.loading?Kd()(t).prop("disabled",!0).html(Hd):Kd()(t).prop("disabled",e.value.defaultDisable).html(e.value.defaultValue)}},Qd=Jd;i["default"].use(g.a),i["default"].use(a["a"]),i["default"].directive("action-loading-spinner",Qd),i["default"].use(o["a"],{validity:!0,validator:"new"}),i["default"].component("vue-ladda",b["a"]),i["default"].use(u.a,s.a),i["default"].use(d.a),i["default"].use(f.a),i["default"].use(h.a),i["default"].set(i["default"].prototype,"notificationService",Fd),i["default"].prototype.moment=s.a,i["default"].filter("formatDate",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD/MM/YYYY HH:mm";return s()(t).format(e)}),i["default"].config.productionTip=!1,new i["default"]({router:Bd,i18n:ro,store:Ti,render:function(t){return t(ko)}}).$mount("#app")},"5c0b":function(t,e,n){"use strict";var i=n("5e27"),o=n.n(i);o.a},"5e27":function(t,e,n){},"9ac3":function(t,e,n){"use strict";var i=n("4ec1"),o=n.n(i);o.a},b545:function(t,e,n){},f021:function(t,e,n){}}); //# sourceMappingURL=app.a4cbd966.js.map