%PDF- %PDF-
Direktori : /var/www/html/diaspora/dashboard_production/js/ |
Current File : /var/www/html/diaspora/dashboard_production/js/app.99d26411.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("8e5f"),y=n.n(C),S=(n("8512"),n("2dd8"),n("0952"),n("dfa4"),n("e607"),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)}),w=[],k=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)])},A=[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"})])}],E=n("cebc"),$=n("2f62"),j=(n("7f7f"),n("bc3a")),M=n.n(j),L=(n("96cf"),n("3b8d")),P=n("0e44"),I=n("6ee6"),O={login:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.post("/v1/password/reset",t).then(function(t){return e(t)},function(t){return n(t)})})},logout:function(){return new Promise(function(t){t()})}},T={login:function(t,e){var n=t.commit;return new Promise(function(t,i){return O.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 O.me().then(function(n){e("USER_DATA",n),t(n)},function(t){n(t)})})},logout:function(t){return Object(I["a"])(t),new Promise(function(t,e){return O.logout().then(function(e){t({success:e})},function(t){e(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},x=function(t){return t.token},D=function(t){return!!t.isAuth},N=function(t){return t.userData},q={token:x,isAuth:D,userData:N},R=function(){return{token:null,userData:{},isAuth:!1}},U=function(t){Object.assign(t,R())},B=function(t,e){return t.token="Bearer ".concat(e),t.isAuth=!!t.token,t.token},V=function(t,e){return t.userData=e,t.userData},z={RESET_STATE:U,USER_DATA:V,TOKEN:B},G=R(),F={namespaced:!0,state:G,actions:T,getters:q,mutations:z},Y={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 mo.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 mo.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 mo.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 mo.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 mo.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 mo.disable(e).then(function(e){n("DISABLE",e),t({success:e})},function(t){return i(t)})})},updatePassword:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return mo.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 mo.create(e).then(function(e){n("CREATE_USER",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return mo.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 mo.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 mo.getRoles().then(function(n){e("ROLES",n),t(n)},function(t){return n(t)})})},resetState:function(t){var e=t.commit;e("RESET_STATE")}},K=function(t){return t.users},H=function(t){return t.meta},J=function(t){return t.isLoading},Q=function(t){return t.selectedUser},W=function(t){return t.availableUsers},X=function(t){return t.roles},Z={users:K,meta:H,isLoading:J,selectedUser:Q,availableUsers:W,roles:X},tt=(n("20d6"),function(){return{users:[],availableUsers:[],roles:[],meta:{},selectedUser:{},isLoading:!1}}),et=function(t){Object.assign(t,tt())},nt=function(t,e){return t.isLoading=e,t.isLoading},it=function(t,e){return t.users=e.data,t.meta=e.meta,t.isLoading=!1,t.users},ot=function(t,e){return t.availableUsers=e,t.availableUsers},at=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_enabled=!0,t.users},rt=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_enabled=!1,t.users},st=function(t,e){var n=_.findIndex(t.users,function(t){return t.id===e.id});return t.users[n].is_confirmed=!0,t.users},ct=function(t,e){return t.users.push(e),t.users},ut=function(t,e){return t.selectedUser=e,t.selectedUser},lt=function(t,e){return t.selectedUser=e,t.selectedUser},dt=function(t,e){return t.roles=e,t.roles},mt={RESET_STATE:et,LOADING:nt,USERS:it,SET_AVAILABLE_USERS:ot,ENABLE:at,DISABLE:rt,CONFIRM:st,CREATE_USER:ct,SET_SELECTED_USER:ut,UPLOAD_IMAGE:lt,ROLES:dt},ft=tt(),pt={namespaced:!0,state:ft,actions:Y,getters:Z,mutations:mt},ht=function(t){var e=[];return _.forOwn(t,function(t,n){t&&e.push("".concat(n,"=").concat(t))}),e.join("&")},vt={get:function(t){return new Promise(function(e,n){lo.get("/v1/countries?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getEnabledCountries:function(){return new Promise(function(t,e){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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)})})}},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 vt.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 vt.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 vt.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 vt.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 vt.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 vt.create(e).then(function(e){n("CREATE_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return vt.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 vt.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 vt.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 vt.getSection(e).then(function(e){n("SET_SELECTED_SECTION",e),t({success:e})},function(t){return i(t)})})},createSection:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return vt.createSection(e).then(function(e){t({success:e})},function(t){return n(t)})})},updateSection:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return vt.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 vt.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 vt.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 vt.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 vt.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")}},bt=function(t){return t.countries},Ct=function(t){return t.meta},_t=function(t){return t.selectedCountry},yt=function(t){return t.enabledCountries},St=function(t){return t.isLoading},wt=function(t){return t.selectedCategory},kt=function(t){return t.sections},At=function(t){return t.travelCautions},Et=function(t){return t.selectedSection},$t={countries:bt,meta:Ct,selectedCountry:_t,enabledCountries:yt,isLoading:St,selectedCategory:wt,sections:kt,travelCautions:At,selectedSection:Et},jt=function(){return{countries:[],enabledCountries:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},Mt=function(t){Object.assign(t,jt())},Lt=function(t,e){return t.isLoading=e,t.isLoading},Pt=function(t,e){return t.countries=e.data,t.meta=e.meta,t.isLoading=!1,t.countries},It=function(t,e){return t.enabledCountries=e,t.enabledCountries},Ot=function(t,e){return t.countries.push(e),t.countries},Tt=function(t,e){return t.selectedCountry=e,t.selectedCountry},xt=function(t,e){var n=_.findIndex(t.countries,function(t){return t.id===e.id});return t.countries[n].is_enabled=!0,t.countries},Dt=function(t,e){var n=_.findIndex(t.countries,function(t){return t.id===e.id});return t.countries[n].is_enabled=!1,t.countries},Nt=function(t,e){return t.sections=e,t.selectedSection={},t.sections},qt=function(t,e){return t.selectedSection=e,t.selectedSection},Rt=function(t,e){return t.travelCautions=e,t.travelCautions},Ut=function(t,e){var n=_.findIndex(t.sections,function(t){return t.id===e.id});return t.sections[n].is_visible=!0,t.sections},Bt=function(t,e){var n=_.findIndex(t.sections,function(t){return t.id===e.id});return t.sections[n].is_visible=!1,t.sections},Vt={RESET_STATE:Mt,LOADING:Lt,COUNTRIES:Pt,SET_ENABLED_COUNTRY:It,CREATE_COUNTRY:Ot,SET_SELECTED_COUNTRY:Tt,ENABLE:xt,DISABLE:Dt,SET_COUNTRY_SECTIONS:Nt,SET_SELECTED_SECTION:qt,SET_TRAVEL_CAUTIONS:Rt,ENABLE_SECTION:Ut,DISABLE_SECTION:Bt},zt=jt(),Gt={namespaced:!0,state:zt,actions:gt,getters:$t,mutations:Vt},Ft={get:function(t){return new Promise(function(e,n){lo.get("/v1/categories?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableCategories:function(){return new Promise(function(t,e){lo.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){lo.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){lo.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){lo.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){lo.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){lo.post("/v1/categories/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})}},Yt={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 Ft.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 Ft.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 Ft.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 Ft.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 Ft.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 Ft.create(e).then(function(e){n("CREATE_CATEGORY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return Ft.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 Ft.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")}},Kt=function(t){return t.categories},Ht=function(t){return t.meta},Jt=function(t){return t.isLoading},Qt=function(t){return t.selectedCategory},Wt=function(t){return t.availableCategories},Xt={categories:Kt,meta:Ht,isLoading:Jt,selectedCategory:Qt,availableCategories:Wt},Zt=function(){return{categories:[],availableCategories:[],meta:{},selectedCategory:{},isLoading:!1}},te=function(t){Object.assign(t,Zt())},ee=function(t,e){return t.isLoading=e,t.isLoading},ne=function(t,e){return t.categories=e.data,t.meta=e.meta,t.isLoading=!1,t.categories},ie=function(t,e){return t.categories.push(e),t.categories},oe=function(t,e){return t.availableCategories=e,t.availableCategories},ae=function(t,e){return t.selectedCategory=e,t.selectedCategory},re=function(t,e){return t.selectedCategory=e,t.selectedCategory},se=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!0,t.categories},ce=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!1,t.categories},ue={RESET_STATE:te,LOADING:ee,CATEGORIES:ne,CREATE_CATEGORY:ie,SET_SELECTED_CATEGORY:ae,SET_AVAILABLE_CATEGORIES:oe,UPLOAD_IMAGE:re,ARCHIVE:se,UNARCHIVE:ce},le=Zt(),de={namespaced:!0,state:le,actions:Yt,getters:Xt,mutations:ue},me={get:function(t){return new Promise(function(e,n){lo.get("/v1/posts?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getPost:function(t){return new Promise(function(e,n){lo.get("/v1/posts/".concat(t,"?include=categories")).then(function(t){return e(t.data.data)},function(t){return n(t)})})},publish:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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 t.categoriesId=t.categories.map(function(t){return t.id}),new Promise(function(e,n){lo.post("/v1/posts",t).then(function(t){return e(t.data.data)},function(t){return n(t)})})},update:function(t){return t.categoriesId=t.categories.map(function(t){return t.id}),new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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}},fe={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 me.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 me.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 me.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 me.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 me.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 me.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 me.create(e).then(function(e){n("CREATE_POST",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return me.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 me.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 me.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 me.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")}},pe=function(t){return t.posts},he=function(t){return t.meta},ve=function(t){return t.isLoading},ge=function(t){return t.selectedPost},be=function(t){return t.videoTypes},Ce={posts:pe,meta:he,isLoading:ve,selectedPost:ge,videoTypes:be},_e=function(){return{posts:[],meta:{},selectedPost:{},isLoading:!1}},ye=function(t){Object.assign(t,_e())},Se=function(t,e){return t.isLoading=e,t.isLoading},we=function(t,e){return t.posts=e.data,t.meta=e.meta,t.isLoading=!1,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},Ae=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},Ee=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].status=e.status,t.posts},$e=function(t,e){var n=_.findIndex(t.posts,function(t){return t.id===e.id});return t.posts[n].status=e.status,t.posts},je=function(t,e){return t.posts.push(e),t.posts},Me=function(t,e){return t.selectedPost=e,t.selectedPost},Le=function(t,e){return t.selectedPost=e,t.selectedPost},Pe=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)},Ie=function(t,e){return t.videoTypes=e,t.videoTypes},Oe={RESET_STATE:ye,LOADING:Se,POSTS:we,PUBLISH:ke,FEATURE_MEDIA:Ae,ARCHIVE:Ee,ACTIVATE:$e,CREATE_POST:je,SET_SELECTED_POST:Me,UPLOAD_IMAGE:Le,DELETE_IMAGE:Pe,VIDEO_TYPES:Ie},Te=_e(),xe={namespaced:!0,state:Te,actions:fe,getters:Ce,mutations:Oe},De={get:function(t){return new Promise(function(e,n){lo.get("/v1/myCountrySections?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getCountry:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.post("/v1/myCountrySections/".concat(t.id,"/actions/moveDown"),t).then(function(t){return e(t.data)},function(t){return n(t)})})}},Ne={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 De.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 De.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 De.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 De.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 De.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 De.create(e).then(function(e){n("CREATE_MY_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return De.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 De.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 De.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")}},qe=function(t){return t.myCountrySections},Re=function(t){return t.selectedSection},Ue=function(t){return t.visibleCategories},Be=function(t){return t.isLoading},Ve={myCountrySections:qe,isLoading:Be,visibleCategories:Ue,selectedSection:Re},ze=function(){return{myCountrySections:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},Ge=function(t){Object.assign(t,ze())},Fe=function(t,e){return t.isLoading=e,t.isLoading},Ye=function(t,e){return t.myCountrySections=e.data,t.isLoading=!1,t.myCountrySections},Ke=function(t,e){return t.visibleCategories=e,t.visibleCategories},He=function(t,e){return t.myCountrySections.push(e),t.myCountrySections},Je=function(t,e){return t.selectedSection=e,t.selectedSection},Qe=function(t,e){var n=_.findIndex(t.myCountrySections,function(t){return t.id===e.id});return t.myCountrySections[n].is_visible=!0,t.myCountrySections},We=function(t,e){var n=_.findIndex(t.myCountrySections,function(t){return t.id===e.id});return t.myCountrySections[n].is_visible=!1,t.myCountrySections},Xe={RESET_STATE:Ge,LOADING:Fe,MY_COUNTRY_SECTIONS:Ye,SET_CATEGORIES:Ke,CREATE_MY_COUNTRY:He,ENABLE:Qe,DISABLE:We,SET_SELECTED_SECTION:Je},Ze=ze(),tn={namespaced:!0,state:Ze,actions:Ne,getters:Ve,mutations:Xe},en={get:function(t){return new Promise(function(e,n){lo.get("/v1/kkdSections?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getCountry:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.post("/v1/kkdSections/".concat(t.id,"/actions/moveDown"),t).then(function(t){return e(t.data)},function(t){return n(t)})})}},nn={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 en.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 en.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 en.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 en.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 en.create(e).then(function(e){n("CREATE_MY_COUNTRY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return en.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 en.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 en.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")}},on=function(t){return t.kkdSections},an=function(t){return t.selectedSection},rn=function(t){return t.isLoading},sn={kkdSections:on,isLoading:rn,selectedSection:an},cn=function(){return{kkdSections:[],sections:[],travelCautions:[],meta:{},selectedCountry:{},selectedSection:{},isLoading:!1}},un=function(t){Object.assign(t,cn())},ln=function(t,e){return t.isLoading=e,t.isLoading},dn=function(t,e){return t.kkdSections=e.data,t.isLoading=!1,t.kkdSections},mn=function(t,e){return t.kkdSections.push(e),t.kkdSections},fn=function(t,e){return t.selectedSection=e,t.selectedSection},pn=function(t,e){var n=_.findIndex(t.kkdSections,function(t){return t.id===e.id});return t.kkdSections[n].is_visible=!0,t.kkdSections},hn=function(t,e){var n=_.findIndex(t.kkdSections,function(t){return t.id===e.id});return t.kkdSections[n].is_visible=!1,t.kkdSections},vn={RESET_STATE:un,LOADING:ln,MY_COUNTRY_SECTIONS:dn,CREATE_MY_COUNTRY:mn,ENABLE:pn,DISABLE:hn,SET_SELECTED_SECTION:fn},gn=cn(),bn={namespaced:!0,state:gn,actions:nn,getters:sn,mutations:vn},Cn={get:function(t){return new Promise(function(e,n){lo.get("/v1/members?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getMember:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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}},_n={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 Cn.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 Cn.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 Cn.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 Cn.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 Cn.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 Cn.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 Cn.create(e).then(function(e){n("CREATE_MEMBER",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return Cn.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 Cn.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 Cn.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 Cn.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")}},yn=function(t){return t.members},Sn=function(t){return t.meta},wn=function(t){return t.isLoading},kn=function(t){return t.selectedMember},An=function(t){return t.videoTypes},En={members:yn,meta:Sn,isLoading:wn,selectedMember:kn,videoTypes:An},$n=function(){return{members:[],meta:{},selectedMember:{},isLoading:!1}},jn=function(t){Object.assign(t,$n())},Mn=function(t,e){return t.isLoading=e,t.isLoading},Ln=function(t,e){return t.members=e.data,t.meta=e.meta,t.isLoading=!1,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].media=e.media,t.selectedMember.media=e.media,t.members},On=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].status=e.status,t.members},Tn=function(t,e){var n=_.findIndex(t.members,function(t){return t.id===e.id});return t.members[n].status=e.status,t.members},xn=function(t,e){return t.members.push(e),t.members},Dn=function(t,e){return t.selectedMember=e,t.selectedMember},Nn=function(t,e){return t.selectedMember=e,t.selectedMember},qn=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)},Rn=function(t,e){return t.videoTypes=e,t.videoTypes},Un={RESET_STATE:jn,LOADING:Mn,MEMBERS:Ln,PUBLISH:Pn,FEATURE_MEDIA:In,ARCHIVE:On,ACTIVATE:Tn,CREATE_MEMBER:xn,SET_SELECTED_MEMBER:Dn,UPLOAD_IMAGE:Nn,DELETE_IMAGE:qn,VIDEO_TYPES:Rn},Bn=$n(),Vn={namespaced:!0,state:Bn,actions:_n,getters:En,mutations:Un},zn={get:function(t){return new Promise(function(e,n){lo.get("/v1/myCountryCategories?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableMyCountryCategories:function(){return new Promise(function(t,e){lo.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){lo.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){lo.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){lo.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){lo.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){lo.post("/v1/myCountryCategories/".concat(t.id,"/actions/unArchive")).then(function(t){return e(t.data.data)},function(t){return n(t)})})}},Gn={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 zn.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 zn.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 zn.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 zn.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 zn.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 zn.create(e).then(function(e){n("CREATE_CATEGORY",e),t({success:e})},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return zn.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 zn.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")}},Fn=function(t){return t.categories},Yn=function(t){return t.meta},Kn=function(t){return t.isLoading},Hn=function(t){return t.selectedCategory},Jn=function(t){return t.availableCategories},Qn={categories:Fn,meta:Yn,isLoading:Kn,selectedCategory:Hn,availableCategories:Jn},Wn=function(){return{categories:[],availableCategories:[],meta:{},selectedCategory:{},isLoading:!1}},Xn=function(t){Object.assign(t,Wn())},Zn=function(t,e){return t.isLoading=e,t.isLoading},ti=function(t,e){return t.categories=e.data,t.meta=e.meta,t.isLoading=!1,t.categories},ei=function(t,e){return t.categories.push(e),t.categories},ni=function(t,e){return t.availableCategories=e,t.availableCategories},ii=function(t,e){return t.selectedCategory=e,t.selectedCategory},oi=function(t,e){return t.selectedCategory=e,t.selectedCategory},ai=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!0,t.categories},ri=function(t,e){var n=_.findIndex(t.categories,function(t){return t.id===e.id});return t.categories[n].is_archived=!1,t.categories},si={RESET_STATE:Xn,LOADING:Zn,CATEGORIES:ti,CREATE_CATEGORY:ei,SET_SELECTED_CATEGORY:ii,SET_AVAILABLE_CATEGORIES:ni,UPLOAD_IMAGE:oi,ARCHIVE:ai,UNARCHIVE:ri},ci=Wn(),ui={namespaced:!0,state:ci,actions:Gn,getters:Qn,mutations:si},li={get:function(t){return new Promise(function(e,n){lo.get("/v1/events?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getEvent:function(t){return new Promise(function(e,n){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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}},di={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 li.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 li.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 li.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 li.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 li.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 li.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 li.create(e).then(function(e){n("CREATE_EVENT",e),t(e)},function(t){return i(t)})})},update:function(t,e){return Object(I["a"])(t),new Promise(function(t,n){return li.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 li.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 li.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 li.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 li.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")}},mi=function(t){return t.events},fi=function(t){return t.meta},pi=function(t){return t.isLoading},hi=function(t){return t.selectedEvent},vi=function(t){return t.modules},gi=function(t){return t.videoTypes},bi={events:mi,meta:fi,isLoading:pi,selectedEvent:hi,modules:vi,videoTypes:gi},Ci=function(){return{events:[],meta:{},selectedEvent:{},isLoading:!1}},_i=function(t){Object.assign(t,Ci())},yi=function(t,e){return t.isLoading=e,t.isLoading},Si=function(t,e){return t.events=e.data,t.meta=e.meta,t.isLoading=!1,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},ki=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},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},Ei=function(t,e){var n=_.findIndex(t.events,function(t){return t.id===e.id});return t.events[n].status=e.status,t.events},$i=function(t,e){return t.events.push(e),t.events},ji=function(t,e){return t.selectedEvent=e,t.selectedEvent},Mi=function(t,e){return t.selectedEvent=e,t.selectedEvent},Li=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)},Pi=function(t,e){return t.videoTypes=e,t.videoTypes},Ii=function(t,e){return t.modules=e,t.modules},Oi={RESET_STATE:_i,LOADING:yi,EVENTS:Si,PUBLISH:wi,FEATURE_MEDIA:ki,ARCHIVE:Ai,ACTIVATE:Ei,CREATE_EVENT:$i,SET_SELECTED_EVENT:ji,UPLOAD_IMAGE:Mi,DELETE_IMAGE:Li,VIDEO_TYPES:Pi,MODULES:Ii},Ti=Ci(),xi={namespaced:!0,state:Ti,actions:di,getters:bi,mutations:Oi};i["default"].use($["a"]);var Di=new $["a"].Store({plugins:[Object(P["a"])()],modules:{auth:F,users:pt,countries:Gt,categories:de,posts:xe,myCountrySections:tn,kkdSections:bn,members:Vn,myCountryCategories:ui,events:xi},actions:{resetStates:function(){var t=Object(L["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}()}}),Ni=new i["default"],qi=n("a925"),Ri={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"},Ui={en:{common:Ri}},Bi={email:"Email",password:"Fjalëkalimi",submit:"Ruaj",login:"Hyr"},Vi={en:{auth:Bi}},zi={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ë"},Gi={en:{users:zi}},Fi={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"}},Yi={en:{countries:Fi}},Ki={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"},Hi={en:{categories:Ki}},Ji={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"}},Qi={en:{posts:Ji}},Wi={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"},Xi={en:{myCountrySections:Wi}},Zi={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"},to={en:{kkdSections:Zi}},eo={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"}},no={en:{members:eo}},io={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"},oo={en:{myCountryCategories:io}},ao={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"}},ro={en:{events:ao}};i["default"].use(qi["a"]);var so=new qi["a"]({locale:"sq",fallbackLocale:"sq",messages:{}});so.mergeLocaleMessage("en",Ui.en),so.mergeLocaleMessage("sq",Ui.en),so.mergeLocaleMessage("en",Vi.en),so.mergeLocaleMessage("sq",Vi.en),so.mergeLocaleMessage("en",Gi.en),so.mergeLocaleMessage("sq",Gi.en),so.mergeLocaleMessage("en",Yi.en),so.mergeLocaleMessage("sq",Yi.en),so.mergeLocaleMessage("en",Hi.en),so.mergeLocaleMessage("sq",Hi.en),so.mergeLocaleMessage("en",Qi.en),so.mergeLocaleMessage("sq",Qi.en),so.mergeLocaleMessage("en",Xi.en),so.mergeLocaleMessage("sq",Xi.en),so.mergeLocaleMessage("en",to.en),so.mergeLocaleMessage("sq",to.en),so.mergeLocaleMessage("en",no.en),so.mergeLocaleMessage("sq",no.en),so.mergeLocaleMessage("en",oo.en),so.mergeLocaleMessage("sq",oo.en),so.mergeLocaleMessage("en",ro.en),so.mergeLocaleMessage("sq",ro.en);var co=so,uo=M.a.create({baseURL:"http://api.diasporashqiptare.info/api/",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json","Accept-Language":"en"}});uo.interceptors.request.use(function(t){var e=Di.getters["auth/token"];return e&&(t.headers.Authorization=e),t.headers["Accept-Language"]=co.locale||"en",t},function(t){return 401===t.response.status&&Di.dispatch("auth/logout"),Promise.reject(t.response.data)}),uo.interceptors.response.use(function(t){return t},function(t){return t.response&&401===t.response.status&&(Di.dispatch("resetStates"),Ni.$emit("received-401",t.response.data)),Promise.reject(t.response?t.response.data:t)});var lo=uo,mo={get:function(t){return new Promise(function(e,n){lo.get("/v1/users?".concat(ht(t))).then(function(t){return e(t.data)},function(t){return n(t)})})},getAvailableUsers:function(){return new Promise(function(t,e){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo.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){lo({url:"v1/users/actions/exportExcel?".concat(ht(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){lo.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){lo.get("/v1/users/actions/getRoles").then(function(e){return t(e.data.data)},function(t){return e(t)})})},isAdmin:function(){var t=Di.getters["auth/userData"];return this.hasRole(t,"admin")},isEditor:function(){var t=Di.getters["auth/userData"];return this.hasRole(t,"editor")},isRedactor:function(){var t=Di.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(", ")}},fo={name:"Header",components:{},computed:Object(E["a"])({},Object($["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(E["a"])({},mo,{logout:function(){var t=this;t.$store.dispatch("resetStates"),t.$router.push({name:"Login"})}})},po=fo,ho=(n("31bf"),n("2877")),vo=Object(ho["a"])(po,k,A,!1,null,"3e4b989d",null),go=vo.exports,bo=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"))}})])])])},Co=[],_o={name:"Header"},yo=_o,So=Object(ho["a"])(yo,bo,Co,!1,null,"60234f42",null),wo=So.exports,ko={name:"app",components:{CustomHeader:go,CustomFooter:wo},mounted:function(){var t=this;Ni.$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())}})}},Ao=ko,Eo=(n("5c0b"),Object(ho["a"])(Ao,S,w,!1,null,null,null)),$o=Eo.exports,jo=n("75fc"),Mo=n("8c4f"),Lo=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)])])])},Po=[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"}})])])}],Io=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()}}})])},Oo=[],To=(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()}}}),xo=To,Do=Object(ho["a"])(xo,Io,Oo,!1,null,"53552180",null),No=Do.exports,qo=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)},Ro=[],Uo={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]}}},Bo=Uo,Vo=Object(ho["a"])(Bo,qo,Ro,!1,null,null,null),zo=Vo.exports,Go={computed:Object(E["a"])({},Object($["b"])({})),components:{InputComponent:No,CALButton:zo},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)})}}},Fo=Go,Yo=Object(ho["a"])(Fo,Lo,Po,!1,null,null,null),Ko=Yo.exports,Ho=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)])])])},Jo=[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"}})])])}],Qo={computed:Object(E["a"])({},Object($["b"])({})),components:{InputComponent:No,CALButton:zo},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,O.resetPassword(Object(E["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!")})}}},Wo=Qo,Xo=Object(ho["a"])(Wo,Ho,Jo,!1,null,null,null),Zo=Xo.exports,ta=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},ea=[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.')])])])])}],na={},ia=na,oa=Object(ho["a"])(ia,ta,ea,!1,null,null,null),aa=oa.exports,ra=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},sa=[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")])])}],ca={computed:Object(E["a"])({},Object($["b"])({})),data:function(){return{user:{},loadingLogin:!1,search:null}}},ua=ca,la=Object(ho["a"])(ua,ra,sa,!1,null,null,null),da=la.exports,ma=[{path:"/",name:"Login",component:Ko,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Di.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:Zo},{path:"/rps",name:"ResetPasswordSuccess",component:aa},{path:"/privacy_policy",name:"PrivacyPolicy",component:da}],fa=ma,pa=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)},ha=[],va=(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()}),ga=[],ba={props:{showSpinner:{type:Boolean,required:!0}}},Ca=ba,_a=Object(ho["a"])(Ca,va,ga,!1,null,"649c46c5",null),ya=_a.exports,Sa=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)])])])])},wa=[],ka={name:"ConfirmationModal",components:{CALButton:zo},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")}}},Aa=ka,Ea=Object(ho["a"])(Aa,Sa,wa,!1,null,null,null),$a=Ea.exports,ja=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)])])])])])},Ma=[],La={name:"PasswordModal",props:{loadingButton:{required:!0}},components:{InputComponent:No,CALButton:zo},data:function(){return{user:{}}},methods:{onConfirm:function(){this.$emit("confirm",this.user)},onCancel:function(){this.$emit("cancel")}}},Pa=La,Ia=Object(ho["a"])(Pa,ja,Ma,!1,null,null,null),Oa=Ia.exports,Ta=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))])])},xa=[],Da={name:"EmptyComponent",props:{message:{required:!0}}},Na=Da,qa=Object(ho["a"])(Na,Ta,xa,!1,null,null,null),Ra=qa.exports,Ua={computed:Object(E["a"])({},Object($["b"])({users:"users/users",meta:"users/meta",isLoading:"users/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,NoData:Ra,CALButton:zo,ConfirmationModal:$a,PasswordModal:Oa},data:function(){return{isShowingConfirmUserConfirmationModal:!1,isShowingDisableUserConfirmationModal:!1,isShowingEnableUserConfirmationModal:!1,isShowingPasswordModal:!1,userAction:!1,searchAction:!1,exportAction:!1,search:{include:"roles"},selectedUser:{},UserService:mo}},methods:Object(E["a"])({},Object($["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"),mo.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()}},Ba=Ua,Va=Object(ho["a"])(Ba,pa,ha,!1,null,null,null),za=Va.exports,Ga=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)])])},Fa=[],Ya=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)},Ka=[],Ha=(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")))])])])])])}),Ja=[],Qa=n("ebc7"),Wa=n.n(Qa),Xa={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 Wa.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()}}},Za=Xa,tr=Object(ho["a"])(Za,Ha,Ja,!1,null,null,null),er=tr.exports,nr={getBase64:function(t){return new Promise(function(e){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.readAsDataURL(t)})}},ir={props:{user:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingUser:!1}},computed:Object(E["a"])({},Object($["b"])({roles:"users/roles"})),components:{InputComponent:No,LoadingSpinner:ya,CALButton:zo,MediaUpload:er},methods:{back:function(){history.back()},imageSelected:function(t){var e=this;nr.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}))}},or=ir,ar=Object(ho["a"])(or,Ya,Ka,!1,null,null,null),rr=ar.exports,sr={computed:Object(E["a"])({},Object($["b"])({users:"users/users",isLoading:"users/isLoading"})),components:{User:rr},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)})}}},cr=sr,ur=Object(ho["a"])(cr,Ga,Fa,!1,null,null,null),lr=ur.exports,dr=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)])])},mr=[],fr={computed:Object(E["a"])({},Object($["b"])({user:"users/selectedUser"})),components:{User:rr},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)})}}},pr=fr,hr=Object(ho["a"])(pr,dr,mr,!1,null,null,null),vr=hr.exports,gr=[{path:"/users",name:"Users",component:za,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:lr,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:vr,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],br=gr,Cr=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)},_r=[],yr=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)},Sr=[],wr=n("027b"),kr={name:"AvailableIn",components:{CountryFlag:wr["a"]},props:{languages:{type:Array,default:function(){return[]}}}},Ar=kr,Er=Object(ho["a"])(Ar,yr,Sr,!1,null,null,null),$r=Er.exports,jr={computed:Object(E["a"])({},Object($["b"])({countries:"countries/countries",meta:"countries/meta",isLoading:"countries/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,ConfirmationModal:$a,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{importTarget:"".concat("http://api.diasporashqiptare.info/api/","v1/countries/actions/import"),countryAction:!1,searchAction:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{},selectedCountry:{}}},methods:Object(E["a"])({},Object($["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()}},Mr=jr,Lr=Object(ho["a"])(Mr,Cr,_r,!1,null,null,null),Pr=Lr.exports,Ir=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)},Or=[],Tr=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)])},xr=[],Dr=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)])},Nr=[],qr={name:"LanguagePicker",components:{CountryFlag:wr["a"]},data:function(){return{}},methods:{getClass:function(t){return t===this.$i18n.locale?"selected":""},selectLanguage:function(t){this.$i18n.locale=t,Ni.$emit("language-selected",t)}},destroyed:function(){this.selectLanguage("sq")}},Rr=qr,Ur=Object(ho["a"])(Rr,Dr,Nr,!1,null,null,null),Br=Ur.exports,Vr={props:{country:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(E["a"])({},Object($["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:No,LanguagePicker:Br,CALButton:zo,NoData:Ra,ConfirmationModal:$a,AvailableIn:$r,LoadingSpinner:ya},methods:Object(E["a"])({},Object($["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()),Ni.$on("language-selected",function(){!e.isNew&&t.country.id?(t.getCountry(),t.getSections(),t.getTravelCautions()):(e.country.iso_2="",e.country.name="")})},beforeDestroy:function(){Ni.$off("language-selected")}},zr=Vr,Gr=Object(ho["a"])(zr,Tr,xr,!1,null,null,null),Fr=Gr.exports,Yr={computed:Object(E["a"])({},Object($["b"])({countries:"countries/countries",isLoading:"countries/isLoading"})),components:{Country:Fr},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)})}}},Kr=Yr,Hr=Object(ho["a"])(Kr,Ir,Or,!1,null,null,null),Jr=Hr.exports,Qr=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)},Wr=[],Xr={computed:Object(E["a"])({},Object($["b"])({country:"countries/selectedCountry"})),components:{Country:Fr},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)})}}},Zr=Xr,ts=Object(ho["a"])(Zr,Qr,Wr,!1,null,null,null),es=ts.exports,ns=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)])])},is=[],os=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)])])])},as=[],rs=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"}})},ss=[],cs=n("0469"),us=n("290f"),ls=n("2d79"),ds=n("d4c1"),ms=n("613a"),fs=n("031f"),ps=n("a599"),hs=n("7041"),vs=n("8068"),gs=n("f61b"),bs=n("62e5"),Cs=n("8b25"),_s=n("c4b1"),ys=n("4801"),Ss={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:cs["a"],editorConfig:{plugins:[us["a"],ls["a"],ds["a"],ms["a"],fs["a"],ps["a"],hs["a"],vs["a"],gs["a"],Cs["a"],_s["a"],ys["a"],bs["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()}}},ws=Ss,ks=Object(ho["a"])(ws,rs,ss,!1,null,"7359aee1",null),As=ks.exports,Es={props:{section:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(E["a"])({},Object($["b"])({sections:"countries/sections"})),data:function(){return{editorConfig:{toolbar:["heading","|","bold","italic","link","bulletedList","numberedList","blockQuote"]},loadingSection:!1}},components:{ContentEditor:As,InputComponent:No,LanguagePicker:Br,CALButton:zo,LoadingSpinner:ya},methods:{back:function(){history.back()},save:function(){this.$emit("save",Object(E["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(),Ni.$on("language-selected",function(){!t.isNew&&t.section.id?t.getSection():(t.section.title="",t.section.description="")})},beforeDestroy:function(){Ni.$off("language-selected")}},$s=Es,js=Object(ho["a"])($s,os,as,!1,null,null,null),Ms=js.exports,Ls={computed:Object(E["a"])({},Object($["b"])({section:"countries/selectedSection"})),components:{Section:Ms},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)})}}},Ps=Ls,Is=Object(ho["a"])(Ps,ns,is,!1,null,null,null),Os=Is.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:!1,loading:t.updating},on:{save:t.save}})],1)])])},xs=[],Ds={computed:Object(E["a"])({},Object($["b"])({section:"countries/selectedSection"})),components:{Section:Ms},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)})}}},Ns=Ds,qs=Object(ho["a"])(Ns,Ts,xs,!1,null,null,null),Rs=qs.exports,Us=[{path:"/countries",name:"Countries",component:Pr,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Jr,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:es,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Os,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Rs,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Bs=Us,Vs=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)},zs=[],Gs={computed:Object(E["a"])({},Object($["b"])({categories:"categories/categories",meta:"categories/meta",isLoading:"categories/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,CALButton:zo,ConfirmationModal:$a,AvailableIn:$r,NoData:Ra},data:function(){return{importTarget:"".concat("http://api.diasporashqiptare.info/api/","v1/categories/actions/import"),categoryAction:!1,searchAction:!1,isShowingArchiveCategoryConfirmationModal:!1,isShowingUnArchiveCategoryConfirmationModal:!1,search:{},selectedCategory:{}}},methods:Object(E["a"])({},Object($["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()}},Fs=Gs,Ys=Object(ho["a"])(Fs,Vs,zs,!1,null,null,null),Ks=Ys.exports,Hs=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)])])},Js=[],Qs=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)},Ws=[],Xs={props:{category:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingCategory:!1}},components:{InputComponent:No,CALButton:zo,LanguagePicker:Br,LoadingSpinner:ya},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(),Ni.$on("language-selected",function(){!t.isNew&&t.category.id?t.getCategory():(t.category.name="",t.category.slug="")})},beforeDestroy:function(){Ni.$off("language-selected")}},Zs=Xs,tc=Object(ho["a"])(Zs,Qs,Ws,!1,null,null,null),ec=tc.exports,nc={computed:Object(E["a"])({},Object($["b"])({categories:"categories/categories",isLoading:"categories/isLoading"})),components:{Category:ec},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)})}}},ic=nc,oc=Object(ho["a"])(ic,Hs,Js,!1,null,null,null),ac=oc.exports,rc=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)])])},sc=[],cc={computed:Object(E["a"])({},Object($["b"])({category:"categories/selectedCategory"})),components:{Category:ec},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)})}}},uc=cc,lc=Object(ho["a"])(uc,rc,sc,!1,null,null,null),dc=lc.exports,mc=[{path:"/categories",name:"Categories",component:Ks,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:ac,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:dc,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],fc=mc,pc=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)])},hc=[],vc=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)])},gc=[],bc={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}}},Cc=bc,_c=Object(ho["a"])(Cc,vc,gc,!1,null,"10e86a4a",null),yc=_c.exports,Sc={computed:Object(E["a"])({},Object($["b"])({posts:"posts/posts",meta:"posts/meta",isLoading:"posts/isLoading",availableCategories:"categories/availableCategories",availableUsers:"users/availableUsers"})),components:{InputComponent:No,SelectComponent:yc,ConfirmationModal:$a,LoadingSpinner:ya,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{postAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{},selectedPost:{},PostService:me}},methods:Object(E["a"])({},mo,Object($["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()}},wc=Sc,kc=Object(ho["a"])(wc,pc,hc,!1,null,null,null),Ac=kc.exports,Ec=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)])])},$c=[],jc=(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("multiselect",{attrs:{options:t.usableCategories,searchable:!1,label:"name","track-by":"name",multiple:!0},model:{value:t.post.categories,callback:function(e){t.$set(t.post,"categories",e)},expression:"post.categories"}})],1),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)}),Mc=[],Lc=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)},Pc=[],Ic=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)},Oc=[],Tc={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 Wa.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})})}},xc=Tc,Dc=Object(ho["a"])(xc,Ic,Oc,!1,null,null,null),Nc=Dc.exports,qc={components:{FileUploader:Nc,CALButton:zo,ConfirmationModal:$a},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}}},Rc=qc,Uc=(n("034c"),Object(ho["a"])(Rc,Lc,Pc,!1,null,null,null)),Bc=Uc.exports,Vc=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()},zc=[],Gc=n("95c3"),Fc=n.n(Gc),Yc=(n("6107"),{name:"CropperModal",components:{VueCropper:Fc.a,ConfirmationModal:$a},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")}}}),Kc=Yc,Hc=Object(ho["a"])(Kc,Vc,zc,!1,null,"024fb7b5",null),Jc=Hc.exports,Qc={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.diasporashqiptare.info/api/","v1/posts/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Di.getters["auth/token"])}}}},computed:Object(E["a"])({},Object($["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:As,Slider:Bc,InputComponent:No,LanguagePicker:Br,LoadingSpinner:ya,MediaUpload:er,CropperModal:Jc,CALButton:zo},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;nr.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(),Ni.$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(){Ni.$off("language-selected")}},Wc=Qc,Xc=Object(ho["a"])(Wc,jc,Mc,!1,null,null,null),Zc=Xc.exports,tu={computed:Object(E["a"])({},Object($["b"])({posts:"posts/posts",isLoading:"posts/isLoading"})),components:{Post:Zc},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)})}}},eu=tu,nu=Object(ho["a"])(eu,Ec,$c,!1,null,null,null),iu=nu.exports,ou=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)])])},au=[],ru={computed:Object(E["a"])({},Object($["b"])({post:"posts/selectedPost"})),components:{Post:Zc},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)})}}},su=ru,cu=Object(ho["a"])(su,ou,au,!1,null,null,null),uu=cu.exports,lu=[{path:"/posts",name:"Posts",component:Ac,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:iu,beforeEnter:function(){var t=Object(L["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=Di.getters["categories/categories"],0===o.length?Di.dispatch("categories/get").then(function(){i(Di.getters["auth/isAuth"])}):i(Di.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:uu,beforeEnter:function(){var t=Object(L["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=Di.getters["categories/categories"],0===o.length?Di.dispatch("categories/get").then(function(){i(Di.getters["auth/isAuth"])}):i(Di.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],du=lu,mu=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)},fu=[],pu={computed:Object(E["a"])({},Object($["b"])({myCountrySections:"myCountrySections/myCountrySections",visibleCategories:"myCountrySections/visibleCategories",isLoading:"myCountrySections/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,ConfirmationModal:$a,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{countryAction:!1,searchAction:!1,loadingMove:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{category_id:""},selectedCountry:{}}},methods:Object(E["a"])({},Object($["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()}},hu=pu,vu=Object(ho["a"])(hu,mu,fu,!1,null,null,null),gu=vu.exports,bu=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)])])},Cu=[],_u=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)])},yu=[],Su={props:{myCountry:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(E["a"])({},Object($["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:No,LanguagePicker:Br,CALButton:zo,ContentEditor:As,LoadingSpinner:ya},methods:Object(E["a"])({},Object($["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(),Ni.$on("language-selected",function(){!e.isNew&&t.myCountry.id?t.getCountry():(e.myCountry.title="",e.myCountry.description="")})},beforeDestroy:function(){Ni.$off("language-selected")}},wu=Su,ku=Object(ho["a"])(wu,_u,yu,!1,null,null,null),Au=ku.exports,Eu={computed:Object(E["a"])({},Object($["b"])({countries:"countries/countries",isLoading:"countries/isLoading"})),components:{Country:Au},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)})}}},$u=Eu,ju=Object(ho["a"])($u,bu,Cu,!1,null,null,null),Mu=ju.exports,Lu=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)])])},Pu=[],Iu={computed:Object(E["a"])({},Object($["b"])({country:"myCountrySections/selectedSection"})),components:{Country:Au},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)})}}},Ou=Iu,Tu=Object(ho["a"])(Ou,Lu,Pu,!1,null,null,null),xu=Tu.exports,Du=[{path:"/myCountry",name:"MyCountry",component:gu,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Mu,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:xu,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Nu=Du,qu=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)},Ru=[],Uu={computed:Object(E["a"])({},Object($["b"])({kkdSections:"kkdSections/kkdSections",isLoading:"kkdSections/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,ConfirmationModal:$a,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{countryAction:!1,searchAction:!1,loadingMove:!1,isShowingEnableCountryConfirmationModal:!1,isShowingDisableCountryConfirmationModal:!1,search:{},selectedCountry:{}}},methods:Object(E["a"])({},Object($["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()}},Bu=Uu,Vu=Object(ho["a"])(Bu,qu,Ru,!1,null,null,null),zu=Vu.exports,Gu=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)])])},Fu=[],Yu=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)])},Ku=[],Hu={props:{myCountry:{required:!0},isNew:{required:!0},loading:{required:!0}},computed:Object(E["a"])({},Object($["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:No,LanguagePicker:Br,CALButton:zo,ContentEditor:As,LoadingSpinner:ya},methods:Object(E["a"])({},Object($["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(),Ni.$on("language-selected",function(){!e.isNew&&t.myCountry.id?t.getCountry():(e.myCountry.title="",e.myCountry.description="")})},beforeDestroy:function(){Ni.$off("language-selected")}},Ju=Hu,Qu=Object(ho["a"])(Ju,Yu,Ku,!1,null,null,null),Wu=Qu.exports,Xu={computed:Object(E["a"])({},Object($["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("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)})}}},Zu=Xu,tl=Object(ho["a"])(Zu,Gu,Fu,!1,null,null,null),el=tl.exports,nl=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)])])},il=[],ol={computed:Object(E["a"])({},Object($["b"])({country:"kkdSections/selectedSection"})),components:{Country:Wu},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)})}}},al=ol,rl=Object(ho["a"])(al,nl,il,!1,null,null,null),sl=rl.exports,cl=[{path:"/kkd",name:"KkdSections",component:zu,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:el,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:sl,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],ul=cl,ll=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)])},dl=[],ml={computed:Object(E["a"])({},Object($["b"])({members:"members/members",meta:"members/meta",isLoading:"members/isLoading",availableCategories:"categories/availableCategories",availableUsers:"users/availableUsers"})),components:{InputComponent:No,ConfirmationModal:$a,LoadingSpinner:ya,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{memberAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{},selectedMember:{},MemberService:Cn}},methods:Object(E["a"])({},mo,Object($["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()}},fl=ml,pl=Object(ho["a"])(fl,ll,dl,!1,null,null,null),hl=pl.exports,vl=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)])])},gl=[],bl=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)},Cl=[],_l={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.diasporashqiptare.info/api/","v1/members/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Di.getters["auth/token"])}}}},computed:Object(E["a"])({},Object($["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:As,InputComponent:No,LanguagePicker:Br,MediaUpload:er,LoadingSpinner:ya,CropperModal:Jc,CALButton:zo},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;nr.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(),Ni.$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(){Ni.$off("language-selected")}},yl=_l,Sl=Object(ho["a"])(yl,bl,Cl,!1,null,null,null),wl=Sl.exports,kl={computed:Object(E["a"])({},Object($["b"])({members:"members/members",isLoading:"members/isLoading"})),components:{Member:wl},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)})}}},Al=kl,El=Object(ho["a"])(Al,vl,gl,!1,null,null,null),$l=El.exports,jl=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)])])},Ml=[],Ll={computed:Object(E["a"])({},Object($["b"])({member:"members/selectedMember"})),components:{Member:wl},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)})}}},Pl=Ll,Il=Object(ho["a"])(Pl,jl,Ml,!1,null,null,null),Ol=Il.exports,Tl=[{path:"/members",name:"Members",component:hl,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:$l,beforeEnter:function(){var t=Object(L["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=Di.getters["categories/categories"],0===o.length?Di.dispatch("categories/get").then(function(){i(Di.getters["auth/isAuth"])}):i(Di.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:Ol,beforeEnter:function(){var t=Object(L["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=Di.getters["categories/categories"],0===o.length?Di.dispatch("categories/get").then(function(){i(Di.getters["auth/isAuth"])}):i(Di.getters["auth/isAuth"]);case 2:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],xl=Tl,Dl=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)},Nl=[],ql={computed:Object(E["a"])({},Object($["b"])({categories:"myCountryCategories/categories",meta:"myCountryCategories/meta",isLoading:"myCountryCategories/isLoading"})),components:{InputComponent:No,LoadingSpinner:ya,CALButton:zo,ConfirmationModal:$a,AvailableIn:$r,NoData:Ra},data:function(){return{importTarget:"".concat("http://api.diasporashqiptare.info/api/","v1/myCountryCategories/actions/import"),categoryAction:!1,searchAction:!1,isShowingArchiveCategoryConfirmationModal:!1,isShowingUnArchiveCategoryConfirmationModal:!1,search:{},selectedCategory:{}}},methods:Object(E["a"])({},Object($["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()}},Rl=ql,Ul=Object(ho["a"])(Rl,Dl,Nl,!1,null,null,null),Bl=Ul.exports,Vl=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)])])},zl=[],Gl=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)},Fl=[],Yl={props:{category:{required:!0},isNew:{required:!0},loading:{required:!0}},data:function(){return{loadingCategory:!1}},components:{InputComponent:No,CALButton:zo,LanguagePicker:Br,LoadingSpinner:ya},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(),Ni.$on("language-selected",function(){!t.isNew&&t.category.id?t.getCategory():(t.category.name="",t.category.slug="")})},beforeDestroy:function(){Ni.$off("language-selected")}},Kl=Yl,Hl=Object(ho["a"])(Kl,Gl,Fl,!1,null,null,null),Jl=Hl.exports,Ql={computed:Object(E["a"])({},Object($["b"])({categories:"myCountryCategories/categories",isLoading:"myCountryCategories/isLoading"})),components:{Category:Jl},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)})}}},Wl=Ql,Xl=Object(ho["a"])(Wl,Vl,zl,!1,null,null,null),Zl=Xl.exports,td=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)])])},ed=[],nd={computed:Object(E["a"])({},Object($["b"])({category:"myCountryCategories/selectedCategory"})),components:{Category:Jl},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)})}}},id=nd,od=Object(ho["a"])(id,td,ed,!1,null,null,null),ad=od.exports,rd=[{path:"/myCountryCategories",name:"MyCountryCategories",component:Bl,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Zl,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:ad,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.getters["auth/isAuth"]);case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],sd=rd,cd=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)])},ud=[],ld={computed:Object(E["a"])({},Object($["b"])({events:"events/events",meta:"events/meta",isLoading:"events/isLoading",availableModules:"events/modules",availableUsers:"users/availableUsers"})),components:{InputComponent:No,ConfirmationModal:$a,LoadingSpinner:ya,CALButton:zo,AvailableIn:$r,NoData:Ra},data:function(){return{eventAction:!1,searchAction:!1,importAction:!1,isShowingPublishModal:!1,isShowingFeatureModal:!1,isShowingArchiveModal:!1,isShowingActivateModal:!1,search:{for:""},selectedEvent:{},EventService:li}},methods:Object(E["a"])({},mo,Object($["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()}},dd=ld,md=Object(ho["a"])(dd,cd,ud,!1,null,null,null),fd=md.exports,pd=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)])])},hd=[],vd=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)},gd=[],bd=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)])])},Cd=[],_d=n("c38f"),yd=n.n(_d),Sd={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:yd.a}},wd=Sd,kd=(n("9ac3"),Object(ho["a"])(wd,bd,Cd,!1,null,"2e60f7d6",null)),Ad=kd.exports,Ed={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.diasporashqiptare.info/api/","v1/events/").concat(this.$route.params.id,"/actions/uploadImage"),headers:{Authorization:"".concat(Di.getters["auth/token"])}}}},computed:Object(E["a"])({},Object($["b"])({categories:"categories/categories",availableModules:"events/modules",videoTypes:"events/videoTypes",userData:"auth/userData"})),components:{ContentEditor:As,InputComponent:No,DatePickerComponent:Ad,LanguagePicker:Br,LoadingSpinner:ya,MediaUpload:er,CropperModal:Jc,CALButton:zo},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;nr.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(),Ni.$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(){Ni.$off("language-selected")}},$d=Ed,jd=Object(ho["a"])($d,vd,gd,!1,null,null,null),Md=jd.exports,Ld={computed:Object(E["a"])({},Object($["b"])({events:"events/events",isLoading:"events/isLoading"})),components:{Event:Md},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)})}}},Pd=Ld,Id=Object(ho["a"])(Pd,pd,hd,!1,null,null,null),Od=Id.exports,Td=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)])])},xd=[],Dd={computed:Object(E["a"])({},Object($["b"])({event:"events/selectedEvent"})),components:{Event:Md},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)})}}},Nd=Dd,qd=Object(ho["a"])(Nd,Td,xd,!1,null,null,null),Rd=qd.exports,Ud=[{path:"/events",name:"Events",component:fd,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:i(Di.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:Od,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Di.dispatch("events/getModules").then(function(){i(Di.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:Rd,beforeEnter:function(){var t=Object(L["a"])(regeneratorRuntime.mark(function t(e,n,i){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:Di.dispatch("events/getModules").then(function(){i(Di.getters["auth/isAuth"])});case 1:case"end":return t.stop()}},t)}));function e(e,n,i){return t.apply(this,arguments)}return e}()}],Bd=Ud;i["default"].use(Mo["a"]);var Vd=new Mo["a"]({base:"/",routes:[].concat(Object(jo["a"])(fa),Object(jo["a"])(br),Object(jo["a"])(Bs),Object(jo["a"])(fc),Object(jo["a"])(du),Object(jo["a"])(Nu),Object(jo["a"])(ul),Object(jo["a"])(xl),Object(jo["a"])(sd),Object(jo["a"])(Bd),[{path:"*",redirect:"/posts"}]),scrollBehavior:function(){return{x:0,y:0}}}),zd=Vd,Gd=(n("456d"),n("ac6a"),new i["default"]);function Fd(t){Gd.$notify({duration:3e4,type:"error",title:"Error",text:t})}var Yd={success:function(t){Gd.$notify({duration:5e3,type:"success",title:"Success",text:t})},warning:function(t){Gd.$notify({duration:5e3,type:"warn",title:"Warning",text:t})},info:function(t){Gd.$notify({duration:5e3,title:"Info",text:t})},chat:function(t,e,n){Gd.$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]?Fd(t.message[e]):t.message[e].forEach(function(t){Fd(t)})})}catch(e){Fd("Unexpected error occurred. Please contact your system admin.")}else Fd(t.message);else Fd(t);else Fd(t)}},Kd=Yd,Hd=n("1157"),Jd=n.n(Hd),Qd='<div class="coding-al-action-spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n</div>',Wd={update:function(t,e){e.value.loading?Jd()(t).prop("disabled",!0).html(Qd):Jd()(t).prop("disabled",e.value.defaultDisable).html(e.value.defaultValue)}},Xd=Wd;i["default"].use(g.a),i["default"].use(a["a"]),i["default"].directive("action-loading-spinner",Xd),i["default"].use(o["a"],{validity:!0,validator:"new"}),i["default"].component("vue-ladda",b["a"]),i["default"].component("multiselect",y.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",Kd),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:zd,i18n:co,store:Di,render:function(t){return t($o)}}).$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.99d26411.js.map