(function(t){function e(e){for(var r,n,s=e[0],c=e[1],l=e[2],u=0,d=[];u250?v(t[1])-v(t[0])-40:v(t[1])-v(t[0])})),f.append("g").selectAll("g").data(d).enter().append("g").selectAll("text").data((function(t){return t})).enter().append("text").text((function(t,e){return t[1]-t[0]!==0?"".concat(n(t[1]-t[0])):""})).attr("y",(function(t){return v(t[1])>1140+l.left?m(t.data.key)+23:m(t.data.key)+33})).attr("x",(function(t){return v(t[1])-v(t[0])>250?v(t[1])-35:v(t[1])+5})).attr("font-size","12px").attr("font-family",'"Roboto", "sans-serif"').attr("font-weight","bold");f.append("g").attr("id","yaxis").call(r["c"](m).tickSize(0)).attr("font-size","12px").attr("font-family",'"Roboto", "sans-serif"').attr("text-anchor","start").selectAll(".domain line,path").style("opacity","0").selectAll(".tick text").on("mouseover",(function(t){var a=i.find((function(e){return e.key===t}));a.key!==a.root&&(e.transition().duration(200).style("opacity",1),e.html(a.root).style("left","".concat(r["e"].pageX,"px")).style("top","".concat(r["e"].pageY-28,"px")).style("max-width","200px"))})).on("mouseout",(function(t,a){r["w"](".bar-".concat(a)).style("opacity","1"),e.transition().duration(200).style("opacity",0)}));f.select("#yaxis").attr("transform","translate(".concat(l.left,",0)"))}};e["a"]=n},1:function(t,e){},"199d":function(t,e,a){"use strict";var r=a("8158"),n=a.n(r);n.a},"1ae1":function(t,e,a){"use strict";var r=a("086d"),n=a.n(r);n.a},"1fce":function(t,e){},2:function(t,e){},"2f39":function(t,e,a){"use strict";a.r(e);var r={};a.r(r),a.d(r,"stringPoly",(function(){return O})),a.d(r,"getPoly",(function(){return T})),a.d(r,"getLocalityCount",(function(){return I})),a.d(r,"getAllCategories",(function(){return P})),a.d(r,"getActiveLocalities",(function(){return E})),a.d(r,"getLocalities",(function(){return B})),a.d(r,"getSelType",(function(){return j})),a.d(r,"getCounties",(function(){return D})),a.d(r,"getCountiesNames",(function(){return $})),a.d(r,"readJudetLayer",(function(){return G})),a.d(r,"readLocLayer",(function(){return Q}));var n={};a.r(n),a.d(n,"setPolygon",(function(){return N})),a.d(n,"setActiveLocalities",(function(){return U})),a.d(n,"removeLocality",(function(){return H})),a.d(n,"updateSearchResults",(function(){return K})),a.d(n,"updateRegistry",(function(){return Y})),a.d(n,"resetPoly",(function(){return Z})),a.d(n,"setSelType",(function(){return W})),a.d(n,"createGeoJSON",(function(){return J}));var i={};a.r(i),a.d(i,"searchPoly",(function(){return X})),a.d(i,"searchIds",(function(){return tt})),a.d(i,"initData",(function(){return et})),a.d(i,"getVectorLayer",(function(){return at}));var o={};a.r(o),a.d(o,"name",(function(){return it})),a.d(o,"avatar",(function(){return ot})),a.d(o,"isTokenValid",(function(){return st}));var s={};a.r(s),a.d(s,"startApiCall",(function(){return ut})),a.d(s,"completeApiCall",(function(){return dt})),a.d(s,"toggleSidebar",(function(){return pt})),a.d(s,"setSidebarView",(function(){return ht})),a.d(s,"setToken",(function(){return ft})),a.d(s,"updateLoginStatus",(function(){return mt})),a.d(s,"updateProfile",(function(){return gt})),a.d(s,"updateUserState",(function(){return vt}));var c={};a.r(c),a.d(c,"login",(function(){return St})),a.d(c,"logout",(function(){return kt})),a.d(c,"register",(function(){return Ct})),a.d(c,"profile",(function(){return At})),a.d(c,"refreshToken",(function(){return Lt})),a.d(c,"getAuthHeader",(function(){return _t})),a.d(c,"testCall",(function(){return qt}));var l={};a.r(l),a.d(l,"getActiveEndPoint",(function(){return Ft})),a.d(l,"getScroll",(function(){return Rt})),a.d(l,"getActiveLevel",(function(){return Ot})),a.d(l,"getActiveGraphs",(function(){return Tt})),a.d(l,"getBreadcrumbs",(function(){return It})),a.d(l,"getActiveBreadcrumbs",(function(){return Pt})),a.d(l,"getActiveGraphsChecks",(function(){return Et})),a.d(l,"getAllGraphs",(function(){return Bt}));var u={};a.r(u),a.d(u,"navigateTo",(function(){return jt})),a.d(u,"setScroll",(function(){return Dt})),a.d(u,"updateRegistry",(function(){return $t})),a.d(u,"updateActiveMenu",(function(){return Gt})),a.d(u,"setActiveGraphs",(function(){return Qt})),a.d(u,"addActiveGraph",(function(){return Vt})),a.d(u,"updateAllGraphs",(function(){return Nt})),a.d(u,"goBreadcrumbs",(function(){return Ut})),a.d(u,"resetBreadcrumbs",(function(){return Ht})),a.d(u,"setActiveBreadcrumbs",(function(){return Kt}));var d={};a.r(d),a.d(d,"getRegistry",(function(){return Yt})),a.d(d,"getPage",(function(){return Zt})),a.d(d,"getNewGraph",(function(){return Wt})),a.d(d,"changeMenu",(function(){return Jt})),a.d(d,"getCategoryMenu",(function(){return Xt})),a.d(d,"getActivePage",(function(){return te}));var p={};a.r(p),a.d(p,"getConfigOrase",(function(){return re}));var h={};a.r(h),a.d(h,"getConfig",(function(){return se})),a.d(h,"changeDrawer",(function(){return ce}));a("ac1f"),a("5319"),a("96cf");var f=a("f44b"),m=a.n(f),g=(a("5c7d"),a("35fc"),a("573e"),a("81a9"),a("7d6e"),a("e54f"),a("62f2"),a("7e6d"),a("2b0e")),v=a("1f91"),y=a("42d2"),b=a("b05d"),w=a("0016"),x=a("2a19"),S=a("f508");g["default"].use(b["a"],{config:{notify:{type:"info"}},lang:v["a"],iconSet:y["a"],components:{QIcon:w["a"]},plugins:{Notify:x["a"],Loading:S["a"]}});var k=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"q-app"}},[a("router-view")],1)},C=[],A={name:"App"},L=A,_=a("2877"),q=Object(_["a"])(L,k,C,!1,null,null,null),M=q.exports,z=(a("45fc"),a("2f62")),F=(a("1ff9"),a("758b")),R={searchResults:{jud:[],judNames:[],locNames:[],localities:[],nrLoc:null,sir:[],tip:""},judetLayer:[],locLayer:[],activeLocalities:[],polygon:[],selType:"direct"};a("99af"),a("a15b"),a("d81d");function O(t){return t.polygon.map((function(t){return"".concat(t[0]," ").concat(t[1])})).join(", ")}function T(t){return t.polygon}function I(t){return t.searchResults.localities.length}function P(t){return t.searchResults.availableCategories.domains}function E(t){return t.activeLocalities}function B(t){return t.searchResults.localities}function j(t){return t.selType}function D(t){return t.searchResults.jud}function $(t){return t.searchResults.judNames}function G(t){return t.judetLayer}function Q(t){return t.locLayer}a("4160"),a("a434"),a("159b");var V=a("256f");function N(t,e){t.polygon=e}function U(t,e){t.activeLocalities=e}function H(t,e){return t.searchResults.localities.splice(e,1),t.activeLocalities.splice(e,1),!0}function K(t,e){return t.searchResults=e,t.activeLocalities=[],t.searchResults.localities=[],e.locations.forEach((function(e,a){t.activeLocalities.push("".concat(e.sirutA_niv2)),t.searchResults.localities.push(e)})),e}function Y(t,e){return t.searchResults=e,t.searchResults.judNames=t.searchResults.judNames||[],e}function Z(t){t.polygon=[],t.activeLocalities=[],t.searchResults={jud:[],judNames:[],locNames:[],localities:[],nrLoc:null,sir:[],tip:""}}function W(t,e){t.selType=e}function J(t,e){return e.jud.forEach((function(t,a){t.id="f".concat(t.properties.sir),t.geometry.coordinates.forEach((function(t,r){t.forEach((function(t,n){e.jud[a].geometry.coordinates[r][n]=V["d"](t)}))}))})),e.loc.forEach((function(t,a){t.id="f".concat(t.properties.sir),e.loc[a].geometry.type,t.geometry.coordinates.forEach((function(t,r){t.forEach((function(t,n){"MultiPolygon"!==e.loc[a].geometry.type?e.loc[a].geometry.coordinates[r][n]=V["d"](t):t.forEach((function(t,i){e.loc[a].geometry.coordinates[r][n][i]=V["d"](t)}))}))}))})),t.judetLayer={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4979"}},features:e.jud},t.locLayer={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4979"}},features:e.loc},!0}a("1276");function X(t,e){var a=t.commit,r=t.getters;return a("setPolygon",e),F["a"].post("/search/geo/",{coord:r.stringPoly}).then((function(t){return a("updateSearchResults",t.data)})).catch((function(t){throw t}))}function tt(t,e){var a=t.commit;return F["a"].post("/search/loc/",{sir:e.ids.split(",")}).then((function(t){return a("updateSearchResults",t.data)})).catch((function(t){throw t}))}function et(t,e){var a=t.commit;return F["a"].post("/search/loc/",{sir:e.ids.split(",")}).then((function(t){return a("updateSearchResults",t.data)})).catch((function(t){throw t}))}function at(t,e){var a=t.commit;return F["a"].get("/search/map/").then((function(t){return a("createGeoJSON",t.data)})).catch((function(t){throw t}))}var rt={namespaced:!0,state:R,getters:r,mutations:n,actions:i},nt={processing:0,sidebarOpen:!1,isLoggedIn:!1,sidebarView:"guest",user:null,token:null,expire_at:null};function it(t){return t.user&&t.user.first_name&&t.user.last_name?"".concat(t.user.first_name," ").concat(t.user.last_name):"N/A"}function ot(t){var e="";return"".concat(e,"/storage/").concat(t.user&&t.user.avatar?t.user.avatar:"users/default.png")}var st=function(t){return function(){return t.expire_at-new Date>3e5}},ct=a("5522"),lt=a.n(ct);function ut(t){t.processing+=1}function dt(t){t.processing=Math.max(0,t.processing-1)}function pt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.sidebarOpen=null===e?!t.sidebarOpen:e}function ht(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"guest";t.isLoggedIn?e="user":"user"===e&&(e="guest"),t.sidebarView=e}function ft(t,e){if(t.token=e||null,t.expire_at=null,e){var a=lt.a.decode(e.replace(/^Bearer /i,""),"",!0);t.expire_at=new Date(1e3*a.exp)}}function mt(t,e){e?t.sidebarView="user":(t.user=null,ft(t),t.isLoggedIn!==e&&(t.sidebarView="guest")),t.isLoggedIn=e}function gt(t,e){t.user=e}function vt(t,e){e&&e.data&&e.headers?(ft(t,e.headers.authorization),t.user=e.data,mt(t,!0)):mt(t,!1)}a("4de4"),a("c975"),a("13d5"),a("b64b"),a("d3b7"),a("e6cf");var yt=a("8e72"),bt=a.n(yt),wt=a("ff57"),xt=a.n(wt);function St(t,e){var a=t.commit;t.dispatch;return e.hasOwnProperty("remember")&&!0!==e.remember&&delete e.remember,F["b"].post("/auth/login",e).then((function(t){return a("updateUserState",t),t})).catch((function(t){throw t.response?a("updateLoginStatus",!1):t.request,t}))}function kt(t){var e=t.state,a=t.commit;return F["b"].get("/auth/logout",{headers:{Authorization:e.token}}).then((function(){return a("updateLoginStatus",!1)}))}function Ct(t,e){var a=t.commit;return F["b"].post("/auth/register",e).then((function(t){return a("updateUserState",t),t})).catch((function(t){throw t.response||t.request,t}))}function At(t){t.commit;return!0}function Lt(t){var e=t.state,a=t.commit;return F["b"].get("auth/token/refresh",{headers:{Authorization:e.token}}).then((function(t){return a("setToken",t.headers.authorization),Promise.resolve({headers:{Authorization:e.token}})})).catch((function(){return Promise.reject()}))}function _t(t){var e=t.state,a=t.getters,r=t.dispatch;return e.isLoggedIn?a.isTokenValid()?Promise.resolve({headers:{Authorization:e.token}}):r("account/refreshToken"):Promise.reject()}function qt(t){var e=t.state;return F["b"].get("zoom-api-test/ajax-test.php",{baseURL:"http://localhost/teste/",headers:{Authorization:e.token}}).then((function(t){return Promise.resolve({headers:{Authorization:e.token}})})).catch((function(t){throw t}))}var Mt={namespaced:!0,state:nt,getters:o,mutations:s,actions:c},zt=function(){return{registry:[],activeMenu:{},allGraphs:{},activeGraphs:[],activeGraphsCodes:[],breadcrumbs:[],activeEndPoint:0,viewBreadcrumbs:[],pageCode:[],scrollit:!1,note:""}};function Ft(t){return t.activeEndPoint}function Rt(t){return t.scrollit}function Ot(t){return void 0!==t.activeMenu.registry?t.activeMenu.registry:t.activeMenu.nodes}function Tt(t){return t.activeGraphs}function It(t){return t.breadcrumbs}function Pt(t){return t.viewBreadcrumbs}function Et(t){return t.activeGraphsCodes}function Bt(t){return t.allGraphs}a("fb6a");function jt(t,e){var a=null;if("undefined"!==typeof e.obj.code){if(t.breadcrumbs.push(e.obj),e.obj.code===e.code)return!0;if("undefined"===typeof e.obj.nodes)return!1;a=e.obj.nodes}else a=e.obj;for(var r=0;r1?t.activeMenu=t.breadcrumbs[t.breadcrumbs.length-2].nodes:t.activeMenu=t.registry,t.note="","undefined"!==typeof e.data.note&&(t.note=e.data.note),e.data}function Gt(t,e){return t.activeMenu=e,t.activeMenu}function Qt(t,e){t.activeGraphsCodes=e}function Vt(t,e){return t.activeGraphs.push(e.graphs[0]),e.graphs[0]}function Nt(t,e){t.allGraphs=e.graphs,t.activeGraphs=e.activeGraphs;var a=[];return t.activeGraphs.forEach((function(t,e){var r=t.code.split("-");r.pop(),a.push("".concat(r.join("-")))})),t.viewBreadcrumbs=t.breadcrumbs,t.activeGraphsCodes=a,e}function Ut(t,e){t.activeMenu=t.breadcrumbs[e.index],t.breadcrumbs=t.breadcrumbs.slice(0,e.index+1)}function Ht(t){t.breadcrumbs=[]}function Kt(t){t.viewBreadcrumbs=t.breadcrumbs}a("b0c0");function Yt(t,e){var a=t.commit;return F["a"].post("/".concat(e.category,"/registry/"),{sir:e.ids}).then((function(t){t.code=e.code,a("updateRegistry",t)})).catch((function(t){throw t}))}function Zt(t,e){var a=t.commit,r=t.state;return F["a"].post("/".concat(e.category,"/registry/"),{sir:e.ids,tip:e.code}).then((function(t){return r.pageCode=e.code,a("updateAllGraphs",t.data),t.data})).catch((function(t){throw t}))}function Wt(t,e){var a=t.commit;t.state;return F["a"].post("/".concat(e.category,"/search/"),{sir:e.ids.split(","),tip:e.code}).then((function(t){return a("addActiveGraph",t.data),t.data})).catch((function(t){throw t}))}function Jt(t,e){var a=t.commit,r=t.state;return r.breadcrumbs.push(e.item),a("updateActiveMenu",e.item),!0}function Xt(t,e){var a=t.commit,r=t.state,n=t.rootGetters,i=t.rootState;return r.activeEndPoint=e.id,F["a"].post("/".concat(e.id,"/registry/"),{sir:n["search/getActiveLocalities"]}).then((function(t){r.breadcrumbs.push({name:e.name,icon:i.icons[e.id],level:0,nodes:t.data.registry}),t.code=e.id,a("updateRegistry",t)})).catch((function(t){throw t}))}function te(t,e){var a=t.commit,r=(t.state,t.rootGetters);return F["a"].post("/".concat(e.category,"/registry/"),{sir:r["search/getActiveLocalities"]}).then((function(t){t.code=e.code,a("updateRegistry",t)})).catch((function(t){throw t}))}var ee={namespaced:!0,state:zt,getters:l,mutations:u,actions:d},ae={configOrase:null,drawer:!0};function re(t){return t.configOrase}var ne=a("1fce"),ie=a("bc3a"),oe=a.n(ie);function se(t,e){t.commit;var a=t.state;return oe.a.get("statics/date/config.json").then((function(t){a.configOrase=t.data.orase})).catch((function(t){throw t}))}function ce(t){var e=t.state;e.drawer=!e.drawer}var le={namespaced:!0,state:ae,getters:p,mutations:ne,actions:h};a("5bc0");g["default"].use(z["a"]);var ue=function(t){return!![/search\/name\/?$/i].some((function(e){return e.test(t)}))},de=function(){var t=new z["a"].Store({modules:{search:rt,account:Mt,registry:ee,alegeri:le},state:{processing:0,sidebarOpen:!1,miniState:!1,updates:0,icons:{pol:"ion-ios-ribbon",edu:"ion-ios-school",dem:"ion-ios-people",bus:"ion-ios-business"}},getters:{processing:function(t){return Boolean(t.processing)}},mutations:{setSidebarOpen:function(t,e){t.sidebarOpen=e},setMiniState:function(t,e){t.miniState=e},startApiCall:function(t,e){t.processing+=1,e&&ue(e)||S["a"].show({delay:250})},completeApiCall:function(t){t.processing=Math.max(0,t.processing-1),t.processing||S["a"].hide()}}});return F["a"].interceptors.request.use(function(){var e=m()(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.commit("startApiCall",a.url),a.headers.Authorization=t.state.account.token,e.abrupt("return",a);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),F["a"].interceptors.response.use((function(e){return t.commit("completeApiCall"),e}),(function(e){throw t.commit("completeApiCall"),e})),F["b"].interceptors.request.use((function(e){return t.commit("account/startApiCall"),e})),F["b"].interceptors.response.use((function(e){return t.commit("account/completeApiCall"),e}),(function(e){throw t.commit("account/completeApiCall"),e})),t},pe=a("8c4f"),he=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"hHh LpR FFF"}},[a("q-page-container",{staticStyle:{height:"calc(100vh - 40px)"}},[a("q-dialog",{staticClass:"bg-white",model:{value:t.opened,callback:function(e){t.opened=e},expression:"opened"}},[a("div",{staticClass:"bg-white",staticStyle:{"font-size":"1.5em",padding:"1em"}},[t._v("\n Aplicația Zoom Report este optimizată pentru utilizarea pe computer\n\n ")])]),a("router-view")],1)],1)},fe=[],me=a("c544"),ge=me["a"],ve=(a("b656"),a("4d5a")),ye=a("09e3"),be=a("24e8"),we=a("f09f"),xe=a("6ac5"),Se=a("cb32"),ke=a("66e5"),Ce=a("b047"),Ae=a("65c6"),Le=a("7ff0"),_e=a("8572"),qe=a("eebe"),Me=a.n(qe),ze=Object(_["a"])(ge,he,fe,!1,null,null,null),Fe=ze.exports;Me()(ze,"components",{QLayout:ve["a"],QPageContainer:ye["a"],QDialog:be["a"],QCard:we["a"],QToolbarTitle:xe["a"],QAvatar:Se["a"],QItem:ke["a"],QIcon:w["a"],QChip:Ce["a"],QToolbar:Ae["a"],QFooter:Le["a"],QField:_e["a"]});var Re=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"lHH lpR FFF"}},[a("q-page-container",{staticStyle:{"max-width":"625px",margin:"0 auto",height:"calc(100vh - 40px)"}},[a("router-view")],1)],1)},Oe=[],Te=a("b5f2"),Ie=Te["a"],Pe=(a("f493"),Object(_["a"])(Ie,Re,Oe,!1,null,null,null)),Ee=Pe.exports;Me()(Pe,"components",{QLayout:ve["a"],QPageContainer:ye["a"],QCard:we["a"],QToolbarTitle:xe["a"],QAvatar:Se["a"],QItem:ke["a"],QIcon:w["a"],QChip:Ce["a"],QToolbar:Ae["a"],QFooter:Le["a"],QField:_e["a"]});var Be=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"lHH lpR FFF"}},[a("q-page-container",{staticStyle:{height:"calc(100vh - 40px)"}},[a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("q-toolbar-title",[a("a",{attrs:{href:"https://zoom.report",target:"_blank"}},[a("img",{staticStyle:{height:"20px",width:"auto"},attrs:{src:"statics/logo-square.png"}})])]),t.$q.platform.is.mobile?a("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"menu"},on:{click:function(e){t.drawerRight=!t.drawerRight}}}):t._e()],1)],1),a("q-dialog",{staticClass:"bg-white",model:{value:t.opened,callback:function(e){t.opened=e},expression:"opened"}},[a("div",{staticClass:"bg-white",staticStyle:{"font-size":"1.5em",padding:"1em"}},[t._v("\n Aplicația Zoom Report este optimizată pentru utilizarea pe computer\n ")])]),a("router-view")],1)],1)},je=[],De=a("bc05"),$e=De["a"],Ge=(a("1ae1"),a("e359")),Qe=a("9c40"),Ve=Object(_["a"])($e,Be,je,!1,null,null,null);Ve.exports;Me()(Ve,"components",{QLayout:ve["a"],QPageContainer:ye["a"],QHeader:Ge["a"],QToolbar:Ae["a"],QToolbarTitle:xe["a"],QBtn:Qe["a"],QDialog:be["a"],QCard:we["a"],QAvatar:Se["a"],QItem:ke["a"],QIcon:w["a"],QFooter:Le["a"],QField:_e["a"]});var Ne=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-layout",{attrs:{view:"lHh Lpr lFf"}},[a("q-layout-header",[a("q-toolbar",{attrs:{color:"primary",glossy:"mat"===t.$q.theme,inverted:"ios"===t.$q.theme}},[a("q-btn",{attrs:{flat:"",dense:"",round:"","aria-label":"Menu"},on:{click:function(e){t.leftDrawerOpen=!t.leftDrawerOpen}}},[a("q-icon",{attrs:{name:"menu"}})],1),a("q-toolbar-title",[t._v("\n Quasar App\n "),a("div",{attrs:{slot:"subtitle"},slot:"subtitle"},[t._v("Running on Quasar v"+t._s(t.$q.version))])])],1)],1),a("drawer-home"),a("q-page-container",[a("div",{attrs:{id:"DashTimeline"}}),a("dash-area-chart",{attrs:{"chart-data":this.timeline}}),a("router-view")],1)],1)},Ue=[],He=a("b06b"),Ke=a("5698"),Ye={name:"MasterLayout",data:function(){return{leftDrawerOpen:this.$q.platform.is.desktop,timeline:[{name:"10/1/2012 3:00:00 AM",value:105},{name:"11/1/2012 2:00:00 AM",value:850080},{name:"12/1/2012 2:00:00 AM",value:2432339},{name:"1/1/2013 2:00:00 AM",value:624044}]}},mounted:function(){},methods:{openURL:He["a"],change:function(){Ke["v"]("#theGlobe").selectAll("path,circle,ellipse,.arcs,.flyers").remove()},drawTimeline:function(t){var e={top:20,right:10,bottom:20,left:40},a=800,r=a-e.left-e.right,n=500-e.top-e.bottom,i=Ke["s"]().range([0,r]),o=Ke["q"]().range([n,0]);Ke["z"]("%yyyy-%m-%d");t.forEach((function(t,e){t.date=parseInt(t.name,10),t.value+=t.value})),i.domain([2004,2015]),o.domain([0,Ke["n"](t,(function(t){return t.value}))]);var s=Ke["a"]().x((function(t){return i(t.date)})).y0(n).y1((function(t){return o(t.value)})),c=Ke["m"]().x((function(t){return i(t.date)})).y((function(t){return o(t.value)})),l=r+e.right+e.left,u=n+e.top+e.bottom,d=Ke["v"]("#DashTimeline").append("svg").attr("width","".concat(l)).attr("height","".concat(u)).append("g").attr("transform","translate(".concat(e.left," , ").concat(e.top,")"));d.append("path").data([t]).attr("class","area").attr("d",s),d.append("path").data([t]).attr("class","line").attr("d",c),d.append("g").attr("transform","translate(0,".concat(n,")")).attr("class","axiscolor").call(Ke["b"](i).ticks(4).tickFormat(Ke["f"](".0f"))),d.append("g").attr("class","axiscolor").call(Ke["c"](o).ticks(4))}}},Ze=Ye,We=(a("7685"),Object(_["a"])(Ze,Ne,Ue,!1,null,null,null));We.exports;Me()(We,"components",{QLayout:ve["a"],QToolbar:Ae["a"],QBtn:Qe["a"],QIcon:w["a"],QToolbarTitle:xe["a"],QPageContainer:ye["a"]});var Je,Xe,ta,ea,aa,ra,na,ia,oa=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"maxw q-px-xs q-px-md",staticStyle:{"padding-top":"60px"}},[a("q-toolbar",{attrs:{sticky:""}},[a("q-toolbar-title"),!0===t.overlay?a("q-btn",{attrs:{flat:"",dense:"",icon:"ion-ios-albums",label:"Date Disponibile"},on:{click:function(e){t.desk=!0}}}):t._e()],1),t.getActiveBreadcrumbs.length>0?[a("div",{staticClass:"row"},[a("q-breadcrumbs",{staticClass:"text-orange",attrs:{separator:" >","active-color":"secondary"}},[a("q-breadcrumbs-el",{attrs:{icon:"home"}}),t._l(t.getActiveBreadcrumbs,(function(e,r){return a("q-breadcrumbs-el",{key:"breadcrumb-"+e.code,style:"True"===e.link?"cursor:pointer; text-decoration: underline;":"",attrs:{label:""+e.name,clickable:""},on:{click:function(a){"True"===e.link?t.loadPage(e.code,r):t.linkfalse(e.link)}}})}))],2)],1),a("div",{staticClass:"row"},[a("h2",[t._v(t._s(t.getActiveBreadcrumbs[0].name))])]),a("div",{staticClass:"row"},[a("h1",[t._v(t._s(t.getActiveBreadcrumbs[t.getActiveBreadcrumbs.length-1].name))])])]:t._e(),t._l(t.viewGraphs,(function(e,r){return[a("graphs-component",{key:"graph-"+e+"-"+t.getActiveLocalities.join("-"),attrs:{code:""+e,id:"graphid-"+r,param:t.changedCode,ids:t.ids,cat:t.cat}})]})),a("div",[a("div",{staticClass:"row",class:{"gutter-md":1==t.$q.platform.is.desktop}},t._l(t.results,(function(e){return a("div",{key:e.id,staticClass:"col col-md-4 col-xs-12 box"},[a("div",{ref:"third",refInFor:!0,staticClass:"boxed"},[a("img",{staticStyle:{float:"left",width:"40px"},attrs:{src:"statics/icons/"+e.titlu[1]+".svg"}}),a("h3",{staticClass:"search"},[t._v(" "+t._s(e.titlu[1]))]),a("div",{staticStyle:{clear:"both"}},[a("hr")]),t._l(e.details,(function(e){return a("div",{key:e.id},[a("span",{staticStyle:{"font-size":"0.8em"}},[t._v(t._s(e.titlu)+" ("+t._s(e.year)+"):"),a("br")]),a("h4",[a("strong",{staticClass:"searchval"},[t._v(t._s(e.value)+" ")])]),a("hr")])})),a("hr"),a("q-btn",{staticClass:"full-width",attrs:{color:"primary",label:"Vezi raport "+e.titlu[1],to:"/"+e.titlu[1]+"?ids="+t.viewSearch.join(",")+"&tip="+t.tip}})],2)])})),0)]),a("q-drawer",{key:"r-"+t.getActiveLocalities.join("-"),attrs:{side:"right",overlay:t.overlay,"content-class":"right-menu",width:300,breakpoint:400},model:{value:t.desk,callback:function(e){t.desk=e},expression:"desk"}},[a("q-scroll-area",{staticClass:"right-menu",staticStyle:{height:"calc(100% - 50px)","margin-top":"50px","border-right":"1px solid #ddd"}},[t._l(this.getAllGraphs,(function(e,r){return[a("div",{key:"categ"+r},[a("div",{staticClass:"graphs-category"},[t._v("\n "+t._s(e.name)+"\n ")]),a("q-list",{attrs:{dense:""}},t._l(e.nodes,(function(e,r){return a("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"bread"+r,staticClass:"graphs-item-list",attrs:{dense:"",tag:"label"},on:{click:function(a){return t.updateGraphs(""+e.code)}}},[a("q-item-section",{attrs:{side:"",top:""}},[a("q-checkbox",{attrs:{val:""+e.code},model:{value:t.activeGraphs,callback:function(e){t.activeGraphs=e},expression:"activeGraphs"}})],1),a("q-item-section",[a("q-item-label",[t._v(t._s(e.name))])],1)],1)})),1)],1)]}))],2),1==t.overlay?a("div",{staticClass:"q-mini-drawer-hide absolute",staticStyle:{top:"15px",left:"-17px","z-index":"50000"}},[1==t.overlay&&1==t.desk?a("q-btn",{attrs:{dense:"",round:"",unelevated:"",color:"info",icon:"chevron_right"},on:{click:function(e){t.desk=!1}}}):t._e()],1):t._e(),a("q-item",{staticClass:"absolute-top right-menu-title",staticStyle:{height:"50px"}},[a("q-item-section",{staticClass:"icon-dense small-padding",attrs:{avatar:""}},[a("q-avatar",{attrs:{size:"48px"}},[a("q-icon",{attrs:{name:"ion-ios-albums"},on:{click:function(e){return t.closeright()}}})],1)],1),a("q-item-section",[a("q-item-label",[t._v("Date disponibile\n ")])],1)],1)],1),a("canvas",{staticStyle:{position:"fixed",left:"-5000px"},attrs:{id:"canvas",width:"1080px",height:"1080px"}}),a("div",{staticStyle:{position:"fixed",left:"-5000px"},attrs:{id:"hidden-svg"}})],2)},sa=[],ca=(a("c740"),a("7619")),la=a.n(ca),ua=a("0831"),da=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"row graph-title"},[a("div",{staticClass:"col-8"},[a("h5",{staticStyle:{color:"#6B81D9"}},[t._v(t._s(t.category))]),a("h3",[t._v(t._s(t.theComponent.name))])]),a("div",{staticClass:"col-4 text-right"},[a("q-btn",{attrs:{loading:t.genPoza,download:"grafic.png"},on:{click:function(e){return t.generatepoza(t.tab)}},scopedSlots:t._u([{key:"loading",fn:function(){return[a("q-spinner",{attrs:{color:"primary",size:"0.8em"}}),t._v("\n Se generează\n ")]},proxy:!0}])},[t._v("Descarcă PNG\n ")])],1)]),a("div",{staticClass:"row"}),a("div",{staticClass:"row"},[a("q-tabs",{attrs:{"narrow-indicator":"",dense:""},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},t._l(t.theComponent.nodes,(function(e){return a("q-tab",{key:e.code+"-"+t.getActiveLocalities.join("-")+"-"+t.$store.state.updates,attrs:{alert:"Blocked"===e.status&&"info",label:e.name,name:""+e.code}})})),1)],1),a("q-tab-panels",{attrs:{animated:""},on:{transition:function(e){return t.changeTab()}},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},t._l(t.theComponent.nodes,(function(e,r){return a("q-tab-panel",{key:"t"+e.code+"-"+t.getActiveLocalities.join("-"),attrs:{name:""+e.code}},[!0===t.nodata?a("div",[a("q-banner",{staticClass:"text-white bg-secondary",attrs:{"inline-actions":""}},[t._v("\n Date indisponibile pentru selecția aleasă de tine. "),a("br"),t._v("Încearcă o altă selecție.\n ")]),a("div",{staticStyle:{"margin-bottom":"2em"}})],1):"Blocked"!==e.status?a("div",[a("graphs-template",{key:"temp-"+e.code+"-"+t.getActiveLocalities.join("-"),attrs:{index:r,code:""+e.code,years:t.activeYears,graphData:t.graphData,description:t.description,lastUpdated:t.lastUpdated,sources:t.sources}})],1):a("div",[[a("div",{staticClass:"q-pa-md row items-start q-gutter-md"},[a("div",{staticClass:"col-md-4"},[a("q-card-section",{},[a("h1",{staticClass:"text-info"},[t._v("Statistică pentru conturi premium.")]),t._v("\n \n Îți trebuie cont premium pentru a avea acces la peste 5 milioane de data points.\n ")])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-primary text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 ZI")]),a("div",{staticClass:"text-subtitle2"},[t._v("Știi exact ce cauți.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€10 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/1"}},[a("q-btn",{staticClass:"bg-primary text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-info text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 LUNĂ")]),a("div",{staticClass:"text-subtitle2"},[t._v("Timp să aprofundezi.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€45 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/2"}},[a("q-btn",{staticClass:"bg-info text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1),a("q-card",{staticClass:"my-card"},[a("q-card-section",{staticClass:"bg-primary text-white text-center"},[a("div",{staticClass:"text-h6"},[t._v("PASS 1 AN")]),a("div",{staticClass:"text-subtitle2"},[t._v("Libertate totală.")])]),a("q-separator"),a("q-card-section",{staticClass:"text-center"},[a("h1",{staticClass:"text-uppercase price text-info text-bold"},[t._v("€299 ")])]),a("q-card-actions",{attrs:{align:"center"}},[a("a",{staticStyle:{"text-decoration":"none"},attrs:{href:"/pay/3"}},[a("q-btn",{staticClass:"bg-primary text-white",attrs:{flat:""}},[t._v("Alege")])],1)])],1)],1)]],2)])})),1)],1)},pa=[],ha=(a("a4d3"),a("e01a"),a("7db0"),a("0d73")),fa=a("e48b"),ma=a("00a5");Je="tspans",Xe=function(t){var e,a;return a="function"===typeof t,"object"!==xt()(t)||t.nodeType?!!(t instanceof fa["b"]||t.nodeType||a||e):!(!t.height||!t.width)},ta=function(t){var e,a,r,n;for(e=["height","width"],"function"===typeof t?a=t():t.nodeType?a=t.getBoundingClientRect():"object"===xt()(t)&&(a=t),r=Object.create(null),n=0;n0)n=r.pop(),s.text(s.text()+" "+n),i=s.node().getComputedTextLength()||0,i>e.width&&(c=s.text().split(" ").slice(0,-1).join(" "),s.text(c),o=-1*s.node().getComputedTextLength(),s=t.append("tspan"),s.attr("dx",o).attr("dy","1em").text(n));"number"===typeof a&&t.attr("y",t.attr("y")+a).attr("x",t.attr("x")+a)},ia=function(){var t,e,a;return t=function(t){t.each((function(){Object(ma["a"])(this).call(na[Je],ra(e,a),ea(a))}))},t.bounds=function(a){return a?!!Xe(a)&&(e=a,t):e},t.padding=function(e){return e?("number"===typeof e||"function"===typeof e)&&(a=e,t):a},t.method=function(e){return e?(Je=e,t):Je},t};var ga=ia,va=a("0c8f"),ya=(a("e260"),a("25f0"),a("ddb0"),{scrolltobottom:function(t){var e=ua["a"].getScrollTarget,a=ua["a"].setScrollPosition,r=(ua["a"].getScrollPosition,document.getElementById("q-app")),n=document.getElementById("".concat(t)),i=(document.getElementsByTagName("main")[0],document.body.getBoundingClientRect()),o=n.getBoundingClientRect(),s=o.top-i.top-230,c=750;a(e(r),s,c)},stackedBar:function(t){var e=Ke["v"](".tooltip"),a=Ke["g"]({decimal:",",thousands:".",grouping:[3]}),r=(a.format(","),t.data),n=t.titlu,i=(t.legend,t.color),o=t.graphDetails,s=(t.opacity,t.legenda,r.columns.filter((function(t){return"key"!==t}))),c=Ke["x"]();c.keys(s);var l=Ke["x"]().keys(s).offset(Ke["y"])(r),u=Ke["v"]("#all-".concat(n));u.append("g");var d=u.selectAll(".layer").data(l).enter().append("g").attr("class","layer").style("fill",(function(t,e){return i[e]})).attr("id",(function(t){return"layer-".concat(t.key)}));function p(t,a){u.node().parentNode.getBoundingClientRect();var r=Ke["w"]("#bar-".concat(n,"-").concat(t.data.key,"-").concat(a)).style("opacity","0.8");r.node().getBBox();e.style("left","".concat(Ke["e"].pageX,"px")),e.style("top","".concat(Ke["e"].pageY-window.scrollY+15,"px"))}function h(t,a){e.style("opacity",1),e.html((t[1]-t[0]).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1.")).style("max-width","200px")}function f(t,a){Ke["w"]("#bar-".concat(n,"-").concat(t.data.key,"-").concat(a)).style("opacity","1"),e.style("opacity",0)}d.selectAll("rect").data((function(t){return t.current=t.key,t})).enter().append("rect").attr("x",(function(t){return o.x(t.data.key)+.25*o.x.bandwidth()})).attr("y",(function(t){return t[1]=t[1]?t[0]:t[1]}))},graphAxis:function(t){var e=t.data,a=t.titlu,r=t.maxvalue,n=(t.color,t.clientWidth,t.clientHeight),i=t.clientRight,o=t.tick,s=t.stack,c=t.format,l={};l.name="#".concat(a);var u=Ke["v"]("#".concat(a)),d=1;void 0!==o&&(d=o),u.selectAll("*").remove();Ke["z"]("%Y");var p=e.columns.filter((function(t){return"key"!==t}));l.margin={top:20,right:i,bottom:30,left:40},l.height=n-l.margin.top-l.margin.bottom,l.svg=Ke["v"](l.name),l.width=Math.floor(u.node().parentNode.getBoundingClientRect().width)-l.margin.left-l.margin.right,l.x=Ke["p"]().rangeRound([0,.95*l.width]).paddingInner(-.05),l.y=Ke["q"]().range([l.height,0]);var h=[];if(e.forEach((function(t){h.push(t.key)})),l.x.domain(h),l.x.bandwidth()<30&&(d=2),l.xAxis=Ke["b"](l.x).scale(l.x).tickFormat((function(t,e){return e%d===0?t:null})),void 0!==s)l.y.domain([0,1.1*r]);else{var f=Ke["x"]().keys(p).offset(Ke["y"])(e);l.y.domain([1.5*Ke["o"](f,this.stackMin),Ke["n"](f,this.stackMax)])}var m=Ke["f"]("0.2s");void 0!==c&&(m=c),l.svg.attr("xmlns","http://www.w3.org/1999/xlink").attr("version","1.1").attr("preserveAspectRatio","xMinYMin meet").attr("viewBox","0 0 ".concat(l.width+l.margin.right," ").concat(l.height+l.margin.top+l.margin.bottom)),l.svg.append("defs").append("style").attr("type","text/css").text("@import url('https://fonts.googleapis.com/css?family=Roboto:400,300,600,700,800');"),l.yAxis=Ke["c"]().scale(l.y).tickSize(-l.width).tickFormat(m).ticks(5),l.svg.attr("width",l.width+l.margin.right).attr("height",l.height+l.margin.top+l.margin.bottom).append("rect").attr("width","100%").attr("height","100%").attr("fill","white"),l.svg.append("g").attr("id","all-".concat(a)).attr("class","all").attr("transform","translate(".concat(l.margin.left,",").concat(l.margin.top,")"));var g=u.selectAll(".all");return g.append("g").attr("transform","translate(".concat(0,",",l.height,")")).attr("id","xaxis").call(l.xAxis).attr("font-size","10px").attr("font-family",'"Roboto", "sans-serif"'),g.append("g").attr("stroke-dasharray","2,2").attr("id","yaxis").call(l.yAxis).attr("font-size","10px").attr("font-family",'"Roboto", "sans-serif"').selectAll(".domain line,path").style("opacity","0"),g.selectAll("#yaxis .tick line").style("opacity","0.15"),g.selectAll("#xaxis .tick line").style("opacity","0"),l}},xa=wa,Sa={install:function(t,e){},stackMin:function(t){return Ke["o"](t,(function(t){return t[0]}))},stackMax:function(t){return Ke["n"](t,(function(t){return t[1]}))},clockwise:function(t){var e=function(t){for(var e=t.length,a=0,r=e-1,n=0;n1&&"MultiPolygon"===s[t].geodata.geometry.type?s[t].geodata.geometry.coordinates.forEach((function(a,r){e.clockwise(s[t].geodata.geometry.coordinates[r][0])})):e.clockwise(s[t].geodata.geometry.coordinates[0]);var a=s[t].data.find((function(t){return t.root===c}));if(void 0===a)g[t].data=0;else if(""===l)g[t].data=a.value;else{var r=a.tree.find((function(t){return t.root===l}));if(void 0===r)g[t].data=0;else if(""===u)g[t].data=r.value;else{var n=r.tree.find((function(t){return t.root===u}));g[t].data=void 0===n?0:n.value}}g[t].name=s[t].code},y=0;y0&&(a.node().getBBox().width>80||a.node().getBBox().height>80)?1:0})).on("mouseover",(function(t,e){return A(t,e)})).on("mouseout",(function(t,e){return L(t,e)}));var q=p.select("defs"),M=q.append("linearGradient").attr("id","linear-gradient");M.append("stop").attr("offset","0%").attr("stop-color","#bdcdff"),M.append("stop").attr("offset","100%").attr("stop-color","#222f63"),m.append("rect").attr("width",h/5).attr("height",10).attr("y",f-30).attr("rx","5px").style("fill","url(#linear-gradient)"),m.append("text").text(i.value).attr("x",0).attr("y",f-35).style("font-size","10"),m.append("text").text(Ke["f"](".2s")(Math.min.apply(Math,bt()(b)))).attr("x",0).attr("y",f-10).style("font-size","10"),m.append("text").text(Ke["f"](".2s")(Math.max.apply(Math,bt()(b)))).attr("x",h/5).attr("y",f-10).attr("text-anchor","end").style("font-size","10")}},ka=Sa,Ca=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"boxed"},[0===t.geo?a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.years.length>0&&t.builder<4?a("q-select",{attrs:{id:"combo-"+t.code,options:t.years,dense:""},on:{input:function(e){return t.changeDropdown(t.activeYear)}},model:{value:t.activeYear,callback:function(e){t.activeYear=e},expression:"activeYear"}}):t._e()],1):a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.builder>1?a("q-select",{attrs:{id:"combo2-"+t.code,options:t.combos1,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[0],callback:function(e){t.$set(t.c,0,e)},expression:"c[0]"}}):t._e(),t.builder>2?a("q-select",{attrs:{id:"combo3-"+t.code,options:t.combos2,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[1],callback:function(e){t.$set(t.c,1,e)},expression:"c[1]"}}):t._e(),t.builder>3&&t.geo>0?a("q-select",{attrs:{id:"combo4-"+t.code,options:t.combos3,dense:""},on:{input:function(e){return t.changeDropdownGeo()}},model:{value:t.c[2],callback:function(e){t.$set(t.c,2,e)},expression:"c[2]"}}):t._e()],1),a("div",{staticClass:"full-width row wrap justify-start items-start"},[t.builder>3&&t.allObjects.length>0?a("div",{staticClass:"col-6"},[a("q-btn-group",{attrs:{outline:""}},t._l(t.allObjects,(function(e,r){return a("q-btn",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"active"+r,attrs:{outline:"",clickable:""},on:{click:function(e){return t.goBack(r)}}},[a("q-item-section",[a("span",{attrs:{id:"combo"+r+"-"+t.code}},[t._v("\n "+t._s(e.root)+"\n ")])]),a("q-item-section",{attrs:{side:""}},[a("q-icon",{attrs:{name:"ion-arrow-back"}})],1)],1)})),1)],1):t._e(),t.builder>3?a("div",{staticClass:"col-6"},[t.activeStep.length>0?[t.activeStep.length>0?a("q-select",{attrs:{options:t.activeStep,"option-label":"root",dense:""},on:{input:function(e){return t.changeActiveStep(t.selectstep)}},model:{value:t.selectstep,callback:function(e){t.selectstep=e},expression:"selectstep"}}):t._e()]:t._e()],2):t._e()]),a("div",{staticClass:"full-width row wrap justify-start items-start"},[a("div",{class:[t.index?0:"col-grow col-md-8","col-grow"]},[a("svg",{attrs:{id:"graph-"+t.code}})]),0===t.index&&t.builder<4?a("div",{staticClass:"col-grow col-md-4"},[a("div",{domProps:{innerHTML:t._s(t.description)}},[t._v("\n "+t._s(t.description)+"\n ")]),a("br"),t._v("\n Surse:"),a("br"),t._l(t.sources,(function(e){return[a("a",{key:"source"+e,attrs:{href:"http://"+e,target:"_blank"}},[t._v(" "+t._s(e)+" "),a("br")])]})),a("br"),a("span",{staticStyle:{color:"#FF5000","font-size":"0.8em"}},[t._v("Ultima updatare: "+t._s(t.lastUpdated))])],2):t._e()])])},Aa=[],La=(a("a9e3"),{name:"graphs-template",props:{ids:{type:String,default:""},index:{type:Number,default:0},years:{type:Array,default:function(){return[]}},cat:{type:String,default:""},code:{type:String,default:""},graphData:{type:Object,default:function(){}},description:{type:String,default:""},sources:{type:Array,default:function(){return[]}},lastUpdated:{type:String,default:""}},data:function(){return{theGraph:{},theComponent:{},tab:"Agregat",change:!1,activeYear:"",activeStep:[],stepnr:0,builder:0,allObjects:[],selectstep:0,geo:0,combos1:[],combos2:[],combos3:[],c:["","",""],first:!0}},watch:{years:{handler:function(t,e){this.activeYear=this.years[0]}},graphData:{handler:function(t,e){this.builder=Number(this.graphData.builder.split("_")[1]),"geo"===this.graphData.builder.split("_")[2]&&(this.geo=1)}}},computed:la()(la()({},Object(z["c"])("registry",["getAllGraphs","getActiveGraphsChecks","getActiveGraphs"])),Object(z["c"])("search",["getActiveLocalities"])),mounted:function(){this.updatecombos()},updated:function(){this.updatecombos()},methods:la()(la()({},Object(z["b"])("registry",["getNewGraph"])),{},{updatecombos:function(){this.first&&(this.builder>3&&0===this.geo&&(0===this.stepnr&&(this.activeStep=this.graphData.data),this.selectstep="Alege ".concat(this.getLegenda().label)),this.geo>0&&(this.combos1=this.graphData.legend.root.items,this.c[0]=this.combos1[0],this.activeYear=this.combos1[0],this.builder>2&&(this.combos2=this.graphData.legend.tree[0].root.items,this.c[1]=this.combos2[0]),this.builder>3&&(this.combos3=this.graphData.legend.tree[0].tree[0].root.items,this.c[2]=this.combos3[0]),this.changeDropdownGeo(),this.first=!1))},updateHorizontalBarChart:function(t){var e={data:[]};t.tree.forEach((function(t,a){t.key=t.root.substr(0,30),e.data.push(t)})),e.keys=["value"],e.color=["#7643BE","#6ed4ff"],e.titlu="graph-".concat(this.code),va["a"].negativeStackedBar(e)},updateMapChart:function(t,e,a,r){var n={};n.titlu="graph-".concat(t.code),n.features=t.featureCollection,n.legend=t.legend,n.id=e,n.id2=a,n.id3=r,ka.showMap(n)},updateMapChartB3:function(t,e,a,r){var n={};n.titlu="graph-".concat(t.code),n.features=t.featureCollection,n.legend=t.legend,n.id=e,n.id2=a,n.id3=r,ka.showMap(n)},getLegenda:function(){for(var t=this.graphData.legend,e=0;e0&&(this.activeStep=this.allObjects[t-1].tree),this.allObjects=this.allObjects.slice(0,t)},changeDropdownGeo:function(){this.updateMapChartB3(this.graphData,this.c[0],this.c[1],this.c[2])},changeDropdown:function(t){if(this.activeYear=t,"builder_2_geo"===this.graphData.builder){this.years.findIndex((function(e){return e===t}));this.updateMapChart(this.graphData,t,"")}else{var e=this.graphData.data.find((function(e){return e.root===t}));this.updateHorizontalBarChart(e)}}})}),_a=La,qa=a("ddd8"),Ma=a("e7a9"),za=a("4074"),Fa=a("1c1c"),Ra=a("714f"),Oa=Object(_["a"])(_a,Ca,Aa,!1,null,"b3961638",null),Ta=Oa.exports;Me()(Oa,"components",{QSelect:qa["a"],QBtnGroup:Ma["a"],QBtn:Qe["a"],QItemSection:za["a"],QIcon:w["a"],QList:Fa["a"],QItem:ke["a"]}),Me()(Oa,"directives",{Ripple:Ra["a"]});var Ia={name:"graphs-component",components:{GraphsTemplate:Ta},props:{ids:{type:String,default:""},cat:{type:String,default:""},code:{type:String,default:""},param:{type:String,default:""}},data:function(){return{theGraph:{},theComponent:{},tab:"Agregat",change:!1,activeYears:[],graphData:{},description:"",sources:[],lastUpdated:"",category:"",nodata:!1,genPoza:!1}},watch:{query:{handler:function(t,e){},deep:!0},param:{handler:function(t,e){this.initGraphs(this.code)}},getActiveGraphs:{handler:function(t,e){this.change&&(this.change=!1)}}},computed:la()(la()({},Object(z["c"])("registry",["getAllGraphs","getActiveGraphsChecks","getActiveGraphs","getActiveBreadcrumbs"])),Object(z["c"])("search",["getActiveLocalities","getCounties","getLocalities"])),mounted:function(){this.initGraphs(this.code)},methods:la()(la()({},Object(z["b"])("registry",["getNewGraph"])),{},{popspace:function(t,e){var a=t.legend.root.items.indexOf("");return a>-1&&t.legend.root.items.splice(a,1),e>2&&(a=t.legend.tree[0].root.items.indexOf(""),a>-1&&t.legend.tree[0].root.items.splice(a,1)),t},initGraphs:function(t){var e=this;this.getAllGraphs.forEach((function(a,r){var n=a.nodes.find((function(e){return e.code===t}));void 0!==n&&(e.theComponent=n,e.category=a.name,e.theGraph=n.nodes[0],e.tab=e.theGraph.code,e.description=n.description,e.sources=n.sources,e.lastUpdated=n.lastUpdated)}))},generateGraph:function(t){var e=this.getActiveGraphs.find((function(e){return e.code===t})),a=e.builder.split("_");"geo"===a[2]||0!==e.data.length?("builder_2"===e.builder&&this.generateVerticalBarChart(e),"builder_3"===e.builder&&this.generateHorizontalBarChart(e),"builder_4"!==e.builder&&"builder_5"!==e.builder||this.loadBuilder4(e),"builder_2_geo"===e.builder&&this.generateMap(this.popspace(e,2)),"builder_3_geo"===e.builder&&this.loadBuilder3Map(this.popspace(e,3)),"builder_4_geo"===e.builder&&this.loadBuilder3Map(this.popspace(e,4))):this.nodata=!0},generateMap:function(t){var e={};this.graphData=t,t.legend.root.items.sort((function(t,e){return parseFloat(t)e.length&&r(a(n),110,200),!0===this.overlay&&(this.desk=!1)}},ids:{handler:function(t,e){this.searchIds({ids:this.ids,tip:this.tip})}}},beforeRouteUpdate:function(t,e,a){var r=this;!0===this.$q.platform.is.mobile&&(this.desk=!1,this.overlay=!0),this.$store.state.registry.viewBreadcrumbs=this.getBreadcrumbs,this.getPage({category:t.query.cat,code:t.query.code.split(","),ids:t.query.ids.split(",")}).then((function(t){r.activeGraphs=r.getActiveGraphsChecks,r.changedCode=r.code,a()}))},methods:la()(la()(la()(la()({},Object(z["b"])("search",["searchIds"])),Object(z["b"])("registry",["getRegistry","getPage","getActivePage","getCategoryMenu"])),Object(z["d"])("registry",["updateRegistry","updateActiveMenu","getGraphs","setActiveGraphs","goBreadcrumbs","setActiveBreadcrumbs","resetBreadcrumbs"])),{},{updateGraphs:function(t){},closeright:function(){!0===this.overlay&&(this.desk=!1)},loadPage:function(t,e){this.miniState=!0,this.goBreadcrumbs({index:e}),this.$router.push({name:"graphs",query:{ids:"".concat(this.getActiveLocalities),code:"".concat([t]),cat:"".concat(this.getActiveEndPoint)}})},linkfalse:function(t){return!1}})},Za=Ya,Wa=(a("199d"),a("9989")),Ja=a("ead5"),Xa=a("079e"),tr=a("9404"),er=a("4983"),ar=a("8f8e"),rr=a("0170"),nr=a("05c0"),ir=Object(_["a"])(Za,oa,sa,!1,null,null,null);ir.exports;Me()(ir,"components",{QPage:Wa["a"],QToolbar:Ae["a"],QToolbarTitle:xe["a"],QBtn:Qe["a"],QBreadcrumbs:Ja["a"],QBreadcrumbsEl:Xa["a"],QDrawer:tr["a"],QScrollArea:er["a"],QList:Fa["a"],QItem:ke["a"],QItemSection:za["a"],QCheckbox:ar["a"],QItemLabel:rr["a"],QAvatar:Se["a"],QIcon:w["a"],QTooltip:nr["a"]}),Me()(ir,"directives",{Ripple:Ra["a"]});var or=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex flex-center"},[a("q-drawer",{key:"r-"+t.getActiveLocalities.join("-"),attrs:{side:"left",overlay:"","content-class":"listright",width:300,breakpoint:400},model:{value:t.desk,callback:function(e){t.desk=e},expression:"desk"}}),a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("q-toolbar-title",[a("img",{staticStyle:{height:"20px",width:"auto"},attrs:{src:"statics/logo-square.png"}}),a("span",{staticStyle:{"line-height":"1","font-size":"0.8em",top:"-4px",position:"relative",left:"10px"}},[t._v("Alegeri Parlamentare 2020")])]),a("q-btn",{attrs:{flat:"",round:"",dense:"",icon:"menu"},on:{click:function(e){t.drawerRight=!t.drawerRight}}})],1)],1),a("div",{ref:"themap",style:{height:"calc(100vh - "+t.filterSectionHeight+"px)"},attrs:{id:"ol-map"}}),a("div",{staticClass:"mapover"},[a("q-dialog",{attrs:{seamless:"",position:"left","content-class":"locselection locations"},model:{value:t.seamless,callback:function(e){t.seamless=e},expression:"seamless"}},[a("q-card",{style:"width: 260px; top: 40px; background: #FFF; color: #222f63;"},[a("q-card-section",{staticClass:"q-pt-xs"},[a("div",{staticClass:"text-bold q-mt-sm q-mb-xs text-info",staticStyle:{"font-size":"1.3em"}},[t._v(t._s(t.alegeriSelect.label))]),a("div",{staticClass:"row"},[a("div",{staticClass:"col-5"},[t._v("\n Filtre active:"),a("br")]),a("div",{staticClass:"col-7"},[t._v("\n Gen: "),a("strong",[t._v(t._s(t.activeGen))]),a("br")])]),a("div",{staticStyle:{height:"20px",width:"230px"}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(t.min))]),a("span",{staticStyle:{float:"right"}},[t._v(t._s(t.max))])]),a("div",{staticStyle:{"background-image":"linear-gradient(to right, rgba(179,227,238,0.8), rgba(1,94,111,0.8))",height:"20px",width:"230px"}})])],1)],1)],1),a("q-drawer",{ref:"drawer",attrs:{side:"right","content-class":"listright",width:300,breakpoint:400},model:{value:t.drawerRight,callback:function(e){t.drawerRight=e},expression:"drawerRight"}},[[a("q-select",{attrs:{outlined:"",options:t.listaOrase,label:"Nivel detaliu:"},on:{input:function(e){return t.changeOras()}},model:{value:t.orasSelect,callback:function(e){t.orasSelect=e},expression:"orasSelect"}}),a("q-separator"),a("q-separator"),a("br"),a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Total",value:"Total"},{label:"Femei",value:"Fem"},{label:"Bărbați",value:"Masc"}]},on:{input:function(e){return t.newGen()}},model:{value:t.activeGen,callback:function(e){t.activeGen=e},expression:"activeGen"}}),a("br"),a("br"),t.inIframe?t._e():[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6"},[a("iframe",{staticStyle:{border:"none",overflow:"hidden"},attrs:{src:"https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Falegeri.zoom.report/parlamentare&width=200&layout=button_count&action=like&size=small&show_faces=true&share=true&height=46&appId=385863942271436",width:"200",height:"46",scrolling:"no",frameborder:"0",allowTransparency:"true",allow:"encrypted-media"}})]),a("div",{staticClass:"col"}),a("div",{staticClass:"col-5 social"},[a("social-sharing",{attrs:{url:t.currentUrl,title:"ZOOM Report",description:"Platformă de vizualizare de date despre România care pot fi explorate în detaliu până la nivel de comună.",networks:t.overriddenNetworks},inlineTemplate:{render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("network",{attrs:{network:"facebook",id:"facebook"}},[a("q-icon",{attrs:{name:"ion-logo-facebook"}})],1),a("network",{attrs:{network:"linkedin",id:"linkedin"}},[a("q-icon",{attrs:{name:"ion-logo-linkedin"}})],1),a("network",{attrs:{network:"whatsapp",id:"whatsapp"}},[a("q-icon",{attrs:{name:"ion-logo-whatsapp"}})],1)],1)},staticRenderFns:[]}})],1)]),a("q-separator"),a("br"),a("h5",[a("strong",[t._v("Adauga ca widget în site-ul tău:")])]),a("q-input",{attrs:{filled:"",type:"textarea",readonly:""},model:{value:t.embedcode,callback:function(e){t.embedcode=e},expression:"embedcode"}}),a("br"),a("q-btn",{attrs:{label:"Copiază codul embed",flat:"",icon:"content_copy"},on:{click:function(e){return t.copyEmbded()}}}),a("br"),a("br")]],a("q-separator"),a("br"),t._v("\n Zoom Report este prima platformă de location intelligence din România."),a("br"),t._v("\n Află mai multe despre noi aici: "),a("a",{attrs:{href:"https://zoom.report",target:"_blank"}},[t._v("zoom.report")]),a("br")],2)],1)},sr=[],cr=(a("841c"),a("5cc6"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("e669")),lr=a("cdde"),ur=a("0967"),dr=a("c807"),pr=a("ac29"),hr=a("b2fc"),fr=a("cdf3"),mr=a("5831"),gr=a("6c77"),vr=a("83a6"),yr=a("8682"),br=a("ce2c"),wr=a("3e6b"),xr=a("480c"),Sr=a("a2e1"),kr=a("a2c7"),Cr=a("5eee"),Ar=a("d0e9"),Lr=a("50a5"),_r={name:"PageIndex",props:{oras:{type:String,default:""},alegeri:{type:String,default:""},id:{type:String,default:"-1"}},data:function(){return{overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}},currentUrl:"",embedcode:"",seamless:!0,leftDrawerOpen:!1,drawerRight:!0,model:"",zoom:7,center:[25.84062,45.58831],rotation:0,geolocPosition:void 0,glStyleUrl:"assets/zoomap.json",apiKey:"AlkdgacOfEBJPvA19SZYXGuUVFgBvEk769uQJqkzWa7YzGAY9YcOsfu3JNOI0ogQ",mapKey:"VmtCdnlzZVQ3ZTIkJjJCNGdp",imagerySet:"CanvasLight",drawType:"polygon",drawnFeatures:[],padding:"",interactionComplete:!1,alegeriSelect:{label:""},alegeriOptions:[],olmap:null,vectorsource:new mr["a"],vlayer:null,zoommap:null,draw:null,modify:null,locSource:new mr["a"],judetLayer:new wr["a"],locLayer:new wr["a"],selectedSource:new mr["a"],allSections:null,desk:!1,overlay:!1,polyLayer:[null,null],mapFeatures:[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],allKeys:[],allData:null,sectoare:["40_Full_WGS84_simpl_50"],sectoareSimplu:["40_Agg_WGS84_simpl_10"],curZoom:12,varste:["Total","18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80-84","85-119"],activeVarsta:"Total",activeGen:"Total",liste:{label:"Liste Permanente",value:"LP"},updated:"10:00",min:0,max:0,total:0,totalProcent:0,femei:0,barbati:0,thisSelect:null,view:null,orasSelect:{label:"Județe",value:"judete"},listaOrase:[],totalLabel:"Total",inIframe:!0}},computed:la()(la()(la()({},Object(z["c"])("search",["getSelType","getLocalityCount","getLocalities","getActiveLocalities","readJudetLayer","readLocLayer"])),Object(z["e"])("search",["searchResults","polygon"])),{},{tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir},filterSectionHeight:function(){return 60}}),watch:{getSelType:{handler:function(t){"direct"===t&&(this.draw.setActive(!1),this.clearPolygon())}}},mounted:function(){var t=this;if(this.currentUrl=window.location.href,this.inIframe=ur["b"].within.iframe,this.embedcode='
'),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Ke["l"]("date/config_prez.json").then((function(e){t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.configMenu(),t.totalLabel=t.config["".concat(t.oras)].total,""===t.alegeri&&(t.alegeri=t.config["".concat(t.oras)].default),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0);var a=null,r=null;if(t.zoommap.on("pointermove",(function(e){if(!e.dragging){var n=document.getElementById("genericTool"),i=document.getElementById("ol-map");if(void 0===a)return a=null,void(n.style.opacity=0);null!==a&&(a.setStyle(r),a=null);var o=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),a){if(-1===a.get("value"))return a=null,void(n.style.opacity=0);r=a.getStyle(),a.setStyle(new gr["c"]({fill:new vr["a"]({color:"rgba(255, 50, 0, 0.2)"}),stroke:new yr["a"]({color:"#FF5000",width:.5}),image:new br["a"]({radius:4,fill:new vr["a"]({color:"#FF5000"})})})),n.style.opacity=1;var s=i.getBoundingClientRect();n.style.left="".concat(s.left+e.pixel[0]+10,"px"),n.style.top="".concat(s.top+e.pixel[1]+10,"px"),-100===a.get("value")?n.innerHTML='

Secția: '.concat(a.get([t.config[t.orasSelect.value].unitate])," Nu s-a publicat

"):n.innerHTML="

".concat(a.get("titlu"),'

').concat(a.get("value")).concat(a.get("unitati"),"

").concat(a.get("details"))}else n.innerHTML=" "}})),t.resetBreadcrumbs(),t.polygon.length){var n=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];n.push(V["d"](e))}));var i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[n]}}]};t.vectorsource=new mr["a"]({features:(new Sr["a"]).readFeatures(i)})}})),this.resetBreadcrumbs(),this.polygon.length){var e=[];this.polygon.forEach((function(t){var a=[t[0],t[1]];e.push(V["d"](a))}));var a={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[e]}}]};this.vectorsource=new mr["a"]({features:(new Sr["a"]).readFeatures(a)})}this.$forceUpdate()},updated:function(){},methods:la()(la()(la()(la()(la()({},Object(z["d"])(["setSidebarOpen","setMiniState"])),Object(z["d"])("search",["resetPoly","removeLocality"])),Object(z["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(z["d"])("registry",["resetBreadcrumbs"])),{},{copyEmbded:function(){var t=this;Object(lr["a"])(this.embedcode).then((function(){t.$q.notify({color:"positive",position:"right",message:"Codul embed copiat",icon:"copy"})})).catch((function(){}))},loadMaps:function(t){var e=this;S["a"].show({spinner:cr["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],this.loadEncMap("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(t){t=JSON.parse(t),e.mapFeatures[0].features=e.mapFeatures[0].features.concat(t.features),e.zoommap.updateSize(),e.loadData()}))},configMenu:function(){var t=this,e=Object.keys(this.config);this.listaOrase=[],e.forEach((function(e){t.listaOrase.push({label:t.config[e].label,value:t.config[e].value})})),this.optionsLabel=this.config[this.orasSelect.value].colors,this.alegeriOptions=this.config[this.orasSelect.value].options},loadData:function(){var t=this;"undefined"===typeof this.config[this.orasSelect.value].files["".concat(this.alegeri)]&&(this.alegeri=this.config[this.orasSelect.value].default),oe.a.get("date/".concat(this.config[this.orasSelect.value].files["".concat(this.alegeri)]),{headers:{"Content-Type":"text/csv",Accept:"text/csv"}}).then((function(e){var a=Ke["d"](e.data),r=new Date(e.headers["last-modified"]);t.updated="".concat(r.getHours()<10?"0":"").concat(r.getHours(),":").concat(r.getMinutes()<10?"0":"").concat(r.getMinutes()),t.allKeys=Object.keys(a[0]),t.allData=a,t.colorMap(t.config[t.orasSelect.value].total,0,"s");var n=t.zoommap.getView().getZoom();t.zoommap.on("moveend",(function(e){var a=t.zoommap.getView().getZoom();n!==a&&(n=a,t.curZoom=n)})),S["a"].hide()}))},updateMap:function(t,e){var a=this;S["a"].show({spinner:cr["a"]}),setTimeout((function(){a.colorMap(t,0,e),setTimeout((function(){S["a"].hide()}),500)}),500)},colorMap:function(t,e,a){var r=this;this.zoommap.removeLayer(this.polyLayer[e]);var n=[];this.mapFeatures[e].features.forEach((function(e,i){"string"!==typeof e.properties[r.config[r.orasSelect.value].unitateHarta]&&(e.properties[r.config[r.orasSelect.value].unitateHarta]=e.properties[r.config[r.orasSelect.value].unitateHarta].toString());var o=e.properties[r.config[r.orasSelect.value].unitateHarta].split(",");e.properties.value=0;var s=0,c=0;o.forEach((function(a){var n=r.allData.find((function(t){return parseInt(t[r.config[r.orasSelect.value].unitate],10)===parseInt(a,10)}));s+=parseInt(n["".concat(t)],10),c+=parseInt(n[r.config[r.orasSelect.value].total],10),e.properties.nume=n[r.config[r.orasSelect.value].unitate],e.properties.titlu="".concat(r.config[r.orasSelect.value].titluLabel," ").concat(n[r.config[r.orasSelect.value].titlu])})),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*s/c*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=s),n.push(e.properties.value),e.properties.details=""})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %"));var i=Ke["q"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range(["rgba(179,227,238,0.8)","rgba(1,94,111,0.8)"]);this.polyLayer[e]=new wr["a"]({source:new mr["a"]({features:(new Sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new gr["c"]({fill:new vr["a"]({color:i(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e])},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newGen:function(){"Total"===this.activeGen&&this.activeVarsta,this.updateMap("".concat(this.activeGen),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.activeVarsta=null,this.flyTo(V["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"prezenta",query:{oras:"".concat(t.orasSelect.value),alegeri:"".concat(t.config["".concat(t.orasSelect.value)].default)}}).then((function(){t.embedcode='
'),t.drawerRight=!0,t.configMenu(),t.activeGen=t.config["".concat(t.orasSelect.value)].total,t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.alegeriSelect={label:t.titlu,value:t.config["".concat(t.orasSelect.value)].default},t.loadMaps(0)}))}))},flyTo:function(t,e){var a=2e3,r=this.config["".concat(this.orasSelect.value)].zoom,n=r-3;n<8&&(n=r);var i=2,o=!1;this.view.animate({center:t,duration:a},(function(t){i+=-1,o||0!==i&&t||(o=!0,e(t))})),this.view.animate({zoom:n,duration:a/2},{zoom:r,duration:a/2},(function(t){i+=-1,o||0!==i&&t||(o=!0)}))},totaluri:function(){for(var t=this,e={data:[]},a=[],r=0;r0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a.iframe-container{margin: 0 auto;max-width:100%;width:100%;height:450px;}@media only screen and (max-width: 992px) {.iframe-container{width: 80%;height:400px;}}@media only screen and (max-width: 600px) {.iframe-container{width: 100%; height:500px;}}
'),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Ke["l"]("date/config_prezenta.json").then((function(e){t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.configMenu(),t.totalLabel=t.config["".concat(t.oras)].total,""===t.alegeri&&(t.alegeri=t.config["".concat(t.oras)].default),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0);var a=null,r=null;if(t.zoommap.on("pointermove",(function(e){if(!e.dragging){var n=document.getElementById("genericTool"),i=document.getElementById("ol-map");if(void 0===a)return a=null,void(n.style.opacity=0);null!==a&&(a.setStyle(r),a=null);var o=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),a){if(-1===a.get("value"))return a=null,void(n.style.opacity=0);r=a.getStyle(),a.setStyle(new gr["c"]({fill:new vr["a"]({color:"rgba(255, 50, 0, 0.2)"}),stroke:new yr["a"]({color:"#FF5000",width:.5}),image:new br["a"]({radius:4,fill:new vr["a"]({color:"#FF5000"})})})),n.style.opacity=1;var s=i.getBoundingClientRect();n.style.left="".concat(s.left+e.pixel[0]+10,"px"),n.style.top="".concat(s.top+e.pixel[1]+10,"px"),-100===a.get("value")?n.innerHTML='

Secția: '.concat(a.get([t.config[t.orasSelect.value].unitate])," Nu s-a publicat

"):n.innerHTML="

".concat(a.get("titlu"),'

').concat(a.get("value")).concat(a.get("unitati"),"

").concat(a.get("details"))}else n.innerHTML=" "}})),t.resetBreadcrumbs(),t.polygon.length){var n=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];n.push(V["d"](e))}));var i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[n]}}]};t.vectorsource=new mr["a"]({features:(new Sr["a"]).readFeatures(i)})}})),this.resetBreadcrumbs(),this.polygon.length){var e=[];this.polygon.forEach((function(t){var a=[t[0],t[1]];e.push(V["d"](a))}));var a={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[e]}}]};this.vectorsource=new mr["a"]({features:(new Sr["a"]).readFeatures(a)})}this.$forceUpdate(),setTimeout((function(t){location.reload()}),9e5)},updated:function(){},methods:la()(la()(la()(la()(la()({},Object(z["d"])(["setSidebarOpen","setMiniState"])),Object(z["d"])("search",["resetPoly","removeLocality"])),Object(z["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(z["d"])("registry",["resetBreadcrumbs"])),{},{hidemenu:function(){var t=this;this.drawerRight=!this.drawerRight,setTimeout((function(){t.updateMyMap()}),300)},copyEmbded:function(){var t=this;Object(lr["a"])(this.embedcode).then((function(){t.$q.notify({color:"positive",position:"right",message:"Codul embed copiat",icon:"copy"})})).catch((function(){}))},loadMaps:function(t){var e=this;S["a"].show({spinner:cr["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],this.loadEncMap("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(t){t=JSON.parse(t),e.mapFeatures[0].features=e.mapFeatures[0].features.concat(t.features),e.zoommap.updateSize(),e.loadData()}))},configMenu:function(){var t=this,e=Object.keys(this.config);this.listaOrase=[],e.forEach((function(e){t.listaOrase.push({label:t.config[e].label,value:t.config[e].value})})),this.optionsLabel=this.config[this.orasSelect.value].colors,this.alegeriOptions=this.config[this.orasSelect.value].options},loadData:function(){var t=this;"undefined"===typeof this.config[this.orasSelect.value].files["".concat(this.alegeri)]&&(this.alegeri=this.config[this.orasSelect.value].default),oe.a.get("date/now-".concat(this.config[this.orasSelect.value].siruta,".csv"),{headers:{"Content-Type":"text/csv",Accept:"text/csv"}}).then((function(e){var a=Ke["d"](e.data),r=new Date(e.headers["last-modified"]);t.updated="".concat(r.getHours()<10?"0":"").concat(r.getHours(),":").concat(r.getMinutes()<10?"0":"").concat(r.getMinutes()),t.allKeys=Object.keys(a[0]),t.allData=a,t.colorMap(t.liste.value,0,"p");var n=t.zoommap.getView().getZoom();t.zoommap.on("moveend",(function(e){var a=t.zoommap.getView().getZoom();n!==a&&(n=a,t.curZoom=n)})),S["a"].hide(),t.totaluri()}))},updateMap:function(t,e){var a=this;S["a"].show({spinner:cr["a"]}),setTimeout((function(){a.colorMap(t,0,e),setTimeout((function(){S["a"].hide()}),500)}),500)},colorMap:function(t,e,a){var r=this;this.zoommap.removeLayer(this.polyLayer[e]);var n=[];this.mapFeatures[e].features.forEach((function(e,i){"string"!==typeof e.properties[r.config[r.orasSelect.value].unitateHarta]&&(e.properties[r.config[r.orasSelect.value].unitateHarta]=e.properties[r.config[r.orasSelect.value].unitateHarta].toString());var o=r.config[r.orasSelect.value].siruta,s=e.properties[r.config[r.orasSelect.value].unitateHarta].split(",");e.properties.value=0;var c=0,l=0;s.forEach((function(a){var n=r.allData.find((function(t){return parseInt(t[r.config[r.orasSelect.value].unitate],10)===parseInt(a,10)&&o===t.Siruta}));c+=parseInt(n["".concat(t)],10),l+=parseInt(n[r.config[r.orasSelect.value].total],10),e.properties.nume=n[r.config[r.orasSelect.value].unitate],e.properties.titlu="".concat(r.config[r.orasSelect.value].titluLabel," ").concat(n[r.config[r.orasSelect.value].titlu])})),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*c/l*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=c),n.push(e.properties.value),e.properties.details="".concat(c," din ").concat(l," pe liste."),"judete"!==r.orasSelect.value&&"uat"!==r.orasSelect.value&&(e.properties.details="".concat(c," din ").concat(l," pe liste.
Secția ").concat(s[0]))})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %"));var i=Ke["q"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range(["rgba(179,227,238,0.8)","rgba(1,94,111,0.8)"]);this.polyLayer[e]=new wr["a"]({source:new mr["a"]({features:(new Sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new gr["c"]({fill:new vr["a"]({color:i(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e])},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newGen:function(){"Total"===this.activeGen&&"Total"===this.activeVarsta?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.flyTo(V["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"prezenta",query:{oras:"".concat(t.orasSelect.value)}}).then((function(){t.embedcode='
'),t.drawerRight=!0,t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.loadMaps(0)}))}))},flyTo:function(t,e){var a=2e3,r=this.config["".concat(this.orasSelect.value)].zoom,n=r-3;n<8&&(n=r);var i=2,o=!1;this.view.animate({center:t,duration:a},(function(t){i+=-1,o||0!==i&&t||(o=!0,e(t))})),this.view.animate({zoom:n,duration:a/2},{zoom:r,duration:a/2},(function(t){i+=-1,o||0!==i&&t||(o=!0)}))},totaluri:function(){for(var t=this,e={data:[]},a=[],r=this.allData.filter((function(e){return e.Siruta===t.config[t.orasSelect.value].siruta})),n=0;n0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a-1?[a("div",{staticStyle:{height:"20px",width:"230px"}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(t.min))]),a("span",{staticStyle:{float:"right"}},[t._v(t._s(t.max))])]),a("div",{staticStyle:{"background-image":"linear-gradient(to right, rgba(179,227,238,1), rgba(1,94,111,1))",height:"20px",width:"230px"}})]:[a("p",[t._v("Legenda: ")]),a("q-list",{attrs:{bordered:"",dense:""}},t._l(t.legend,(function(e,r){return a("q-item",{directives:[{name:"ripple",rawName:"v-ripple"}],key:"k-"+e+"-"+r},[a("q-item-section",{style:"color: "+e.color,attrs:{avatar:""}},[a("q-icon",{attrs:{color:""+e.color,name:"stop"}})],1),a("q-item-section",[t._v(t._s(e.label))])],1)})),1)],a("div",{staticStyle:{"margin-top":"15px"}},[t._v("Rezultate finale")]),a("span",{staticStyle:{"font-size":"0.9em"}})],2)],1)],1)],1),a("q-drawer",{ref:"drawer",attrs:{side:"right","content-class":"listright",width:300,breakpoint:400},model:{value:t.drawerRight,callback:function(e){t.drawerRight=e},expression:"drawerRight"}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6"},[a("iframe",{staticStyle:{border:"none",overflow:"hidden"},attrs:{src:"https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Falegeri.zoom.report&width=200&layout=button_count&action=like&size=small&show_faces=true&share=true&height=46&appId=385863942271436",width:"200",height:"46",scrolling:"no",frameborder:"0",allowTransparency:"true",allow:"encrypted-media"}})]),a("div",{staticClass:"col-6 social"},[a("social-sharing",{attrs:{url:t.currentUrl,title:"ZOOM Report",description:"Platformă de vizualizare de date despre România care pot fi explorate în detaliu până la nivel de comună.",networks:t.overriddenNetworks},inlineTemplate:{render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("network",{attrs:{network:"facebook",id:"facebook"}},[a("q-icon",{attrs:{name:"ion-logo-facebook"}})],1),a("network",{attrs:{network:"linkedin",id:"linkedin"}},[a("q-icon",{attrs:{name:"ion-logo-linkedin"}})],1),a("network",{attrs:{network:"whatsapp",id:"whatsapp"}},[a("q-icon",{attrs:{name:"ion-logo-whatsapp"}})],1)],1)},staticRenderFns:[]}})],1)]),a("q-select",{attrs:{outlined:"",options:t.listaOrase,label:"Oraș:"},on:{input:function(e){return t.changeOras()}},model:{value:t.orasSelect,callback:function(e){t.orasSelect=e},expression:"orasSelect"}}),a("br"),[a("q-separator"),a("q-select",{attrs:{outlined:"",options:t.alegeriOptions,label:"Alegeri:"},on:{input:function(e){return t.goto(t.alegeriSelect)}},model:{value:t.alegeriSelect,callback:function(e){t.alegeriSelect=e},expression:"alegeriSelect"}}),a("br"),a("q-separator"),a("p",[t._v("Filtrează prezența")]),a("q-range",{attrs:{label:"",min:t.rangeMin,max:t.rangeMax,"label-always":""},on:{change:t.filterPrezenta},model:{value:t.prezentaRange,callback:function(e){t.prezentaRange=e},expression:"prezentaRange"}}),a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Caștigători pe secții",value:"win"},{label:"Voturi Nule",value:"nul"}]},on:{input:function(e){return t.toggle()}},model:{value:t.activeGen,callback:function(e){t.activeGen=e},expression:"activeGen"}}),a("br"),a("q-select",{attrs:{outlined:"",options:t.optionsLabel[t.alegeri],label:"Rezultate candidați"},on:{input:function(e){return t.newCGMB()}},model:{value:t.activeVarsta,callback:function(e){t.activeVarsta=e},expression:"activeVarsta"}}),a("br"),null!=t.activeVarsta&&"Total"!=t.activeVarsta?[a("p",[t._v("Filtrează procentul "+t._s(t.activeVarsta.label))]),a("q-range",{attrs:{label:"",min:t.rangeMinRez,max:t.rangeMaxRez,"label-always":""},on:{change:t.filterPrezenta},model:{value:t.rezultatRange,callback:function(e){t.rezultatRange=e},expression:"rezultatRange"}})]:t._e(),null!==t.mandate?a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Procente",value:1},{label:"Voturi",value:0},{label:"Mandate",value:2}]},on:{input:function(e){return t.changeGraph()}},model:{value:t.rezType,callback:function(e){t.rezType=e},expression:"rezType"}}):a("q-btn-toggle",{attrs:{spread:"","no-caps":"","toggle-color":"primary",options:[{label:"Procente",value:1},{label:"Voturi",value:0}]},on:{input:function(e){return t.changeGraph()}},model:{value:t.rezType,callback:function(e){t.rezType=e},expression:"rezType"}}),a("div",{staticClass:"row"},[a("svg",{attrs:{id:"graph"}})]),a("q-separator")],t._v("\n Sursa datelor: "),a("a",{attrs:{href:"https://prezenta.roaep.ro/",target:"_blank"}},[t._v("prezenta.roaep.ro")]),a("br"),a("br"),t._v("\n Zoom Report este prima platformă de location intelligence din România."),a("br"),t._v("\n Află mai multe despre noi aici: "),a("a",{attrs:{href:"htts://zoom.report",target:"_blank"}},[t._v("zoom.report")]),a("br"),a("br"),a("q-separator"),a("br")],2)],1)},$r=[],Gr=(a("6062"),a("3ca3"),{name:"PageIndex",props:{oras:{type:String,default:""},alegeri:{type:String,default:""},id:{type:String,default:"-1"}},data:function(){return{prezentaRange:{min:0,max:100},rangeMin:100,rangeMax:0,rezultatRange:{min:0,max:100},rangeMinRez:100,rangeMaxRez:0,fly:!1,orasSelect:{label:"București",value:"bucuresti"},listaOrase:[],alegeriSelect:null,seamless:!0,leftDrawerOpen:!1,drawerRight:!0,detailsDrawer:!1,model:"",zoom:7,rotation:0,geolocPosition:void 0,glStyleUrl:"assets/zoomap.json",apiKey:"AlkdgacOfEBJPvA19SZYXGuUVFgBvEk769uQJqkzWa7YzGAY9YcOsfu3JNOI0ogQ",mapKey:"VmtCdnlzZVQ3ZTIkJjJCNGdp",imagerySet:"CanvasLight",drawType:"polygon",drawnFeatures:[],padding:"",interactionComplete:!1,olmap:null,vectorsource:new mr["a"],vlayer:null,zoommap:null,draw:null,modify:null,locSource:new mr["a"],judetLayer:new wr["a"],locLayer:new wr["a"],selectedSource:new mr["a"],allSections:null,desk:!0,overlay:!0,polyLayer:[null,null],polyFeatures:[null,null],mapFeatures:[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],allKeys:[],allData:null,sectoare:["40_Full_WGS84_simpl_50"],sectoareSimplu:["40_Agg_WGS84_simpl_10"],curZoom:12,varste:["Total","18-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-64","65-69","70-74","75-79","80-84","85-119"],activeVarsta:null,activeGen:"win",liste:{label:"Liste Permanente",value:"LP"},updated:"10:00",min:0,max:0,total:0,totalProcent:0,femei:0,barbati:0,color3:null,currentUrl:"",overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}},rezType:null,secType:null,rezutlat:[],rezultatSec:[],legend:[],optionsLabel:{},view:null,mandate:null,maps:{cluj:{out:"54975_Full_WGS84.geojson",in:"54975_Full_WGS84.geojson"}},config:null,alegeriOptions:[],titlu:"",sectieDetalii:{data:[{uat_name:""}]},activeLayer:0}},computed:la()(la()(la()({},Object(z["c"])("search",["getSelType","getLocalityCount","getLocalities","getActiveLocalities","readJudetLayer","readLocLayer"])),Object(z["e"])("search",["searchResults","polygon"])),{},{tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir},filterSectionHeight:function(){return 60}}),watch:{getSelType:{handler:function(t){"direct"===t&&(this.draw.setActive(!1),this.clearPolygon())}}},mounted:function(){var t=this;this.currentUrl=window.location.href,"-1"!==this.id&&(this.activeGen=""),!0===this.$q.platform.is.mobile&&(this.desk=!1,this.drawerRight=!1,this.overlay=!0),Ke["l"]("date/config_prez.json").then((function(e){t.config=e.orase,t.orasSelect={label:t.config["".concat(t.oras)].label,value:t.oras},t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.alegeri})).label,t.alegeriSelect={label:t.titlu,value:t.alegeri},"undefined"!==typeof t.optionsLabel["".concat(t.alegeri)]&&(t.activeVarsta=t.optionsLabel["".concat(t.alegeri)][parseInt(t.id,10)]),t.onMapCreated(),t.loadMaps(0);var a=null,r=null;if(t.zoommap.on("click",(function(e){t.detailsDrawer=!0;var r=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(r,(function(t){return t})),a&&-1===a.get("value"))a=null;else{t.sectieDetalii={},t.sectieDetalii.data=a.get("allData"),t.sectieDetalii.Nr_SV=a.get("Nr_SV");var n=t.sectieDetalii.Nr_SV.split(",");t.sectieDetalii.total=0,t.sectieDetalii.prezenti=0,t.sectieDetalii.data.forEach((function(e){t.sectieDetalii.total+=parseInt(e.a,10),t.sectieDetalii.prezenti+=parseInt(e.b,10)})),t.secType=1,t.sectieRezulate(n)}})),t.zoommap.on("pointermove",(function(e){if(!e.dragging){var n=document.getElementById("genericTool"),i=document.getElementById("ol-map");if(void 0===a)return a=null,void(n.style.opacity=0);null!==a&&(a.setStyle(r),a=null);var o=t.zoommap.getEventPixel(e.originalEvent);if(a=t.zoommap.forEachFeatureAtPixel(o,(function(t){return t})),a){if(-1===a.get("value"))return a=null,void(n.style.opacity=0);r=a.getStyle(),a.setStyle(new gr["c"]({fill:new vr["a"]({color:"rgba(255, 50, 0, 0.2)"}),stroke:new yr["a"]({color:"#FF5000",width:.5}),image:new br["a"]({radius:4,fill:new vr["a"]({color:"#FF5000"})})})),n.style.opacity=1;var s=i.getBoundingClientRect();n.style.left="".concat(s.left+e.pixel[0]+10,"px"),n.style.top="".concat(s.top+e.pixel[1]+10,"px"),-100===a.get("value")?n.innerHTML='

Secția: '.concat(a.get("Nr_SV")," Nu s-a publicat

"):n.innerHTML="".concat(a.get("candidat"),':

').concat(a.get("value")).concat(a.get("unitati"),"

").concat(a.get("details"),"

").concat(a.get("nume"),"
Secții: (").concat(a.get("Nr_SV"),")

")}else n.innerHTML=" "}})),t.resetBreadcrumbs(),t.polygon.length){var n=[];t.polygon.forEach((function(t){var e=[t[0],t[1]];n.push(V["d"](e))}));var i={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",geometry:{type:"Polygon",coordinates:[n]}}]};t.vectorsource=new mr["a"]({features:(new Sr["a"]).readFeatures(i)})}})),this.$forceUpdate()},updated:function(){},methods:la()(la()(la()(la()(la()({},Object(z["d"])(["setSidebarOpen","setMiniState"])),Object(z["d"])("search",["resetPoly","removeLocality"])),Object(z["b"])("search",["searchIds","searchPoly","getVectorLayer"])),Object(z["d"])("registry",["resetBreadcrumbs"])),{},{loadMaps:function(t){var e=this;S["a"].show({spinner:cr["a"]}),this.mapFeatures=[{name:"all",type:"FeatureCollection",features:[]},{name:"all",type:"FeatureCollection",features:[]}],Ke["l"]("statics/maps/".concat(this.config[this.orasSelect.value].map.in)).then((function(a){e.mapFeatures[0].features=e.mapFeatures[0].features.concat(a.features),t>16&255,a>>8&255,255&a].join(","),",").concat(e,")");throw new Error("Bad Hex")},colors:function(t){return t<0?"rgba(0,0,0,0)":this.color3(t)},loadCustomCSV:function(){this.optionsLabel[this.alegeri]=[];for(var t=26;t12?(a.activeLayer=0,a.polyLayer[0].setVisible(!0),a.polyLayer[1].setVisible(!1)):(a.activeLayer=1,a.polyLayer[0].setVisible(!1),a.polyLayer[1].setVisible(!0)),setTimeout((function(){S["a"].hide()}),500)}),500)},filterPrezenta:function(){var t=this;new gr["c"]({opacity:0,stroke:!1}),new gr["c"]({opacity:1,stroke:!1});this.polyLayer[this.activeLayer].getSource().getFeatures().forEach((function(e,a){var r=e.get("color").replace(/^rgba?\(|\s+|\)$/g,"").split(","),n=r[3],i=e.get("allData");i.total=0,i.prezenti=0,i.forEach((function(t){i.total+=parseInt(t.a,10),i.prezenti+=parseInt(t.b,10)}));var o=parseInt(i.prezenti,10)/parseInt(i.total,10)*100,s=e.get("value");(ot.prezentaRange.max)&&(n=0),(st.rezultatRange.max)&&(n=0),e.setStyle(new gr["c"]({fill:new vr["a"]({color:"rgba(".concat(r[0],",").concat(r[1],",").concat(r[2],",").concat(n,")")}),stroke:!1}))}))},castigatori:function(t,e,a){var r=this;this.legend=[],this.resetRange(),this.zoommap.removeLayer(this.polyLayer[e]);var n=[],i=0,o=0,s=[];this.mapFeatures[e].features.forEach((function(e,c){1,"string"!==typeof e.properties.Nr_SV&&(e.properties.Nr_SV=e.properties.Nr_SV.toString());var l=e.properties.Nr_SV.split(",");e.properties.value=0;var u=[];r.optionsLabel[r.alegeri].forEach((function(t){u["".concat(t.label)]={val:0}}));var d=0,p=null,h=null,f=0,m=0;e.properties.allData=[];var g=0,v=0;if(l.forEach((function(t){var a=r.allData.find((function(e){return e.precinct_nr===t}));"undefined"!==typeof a&&(r.optionsLabel[r.alegeri].forEach((function(t){u["".concat(t.label)].val+=parseInt(a["".concat(t.value)],10),p=t})),e.properties.allData.push(a),d+=parseInt(a.c,10),g+=parseInt(a.a,10),v+=parseInt(a.b,10))})),r.calcPrezenta(g,v),null===p)return e.properties.value=-1,e.properties.color="rgba(0,0,0,0)",e.properties.unitati="%",e.properties.nume="",e.properties.candidat="",void(e.properties.details="");u.sort((function(t,e){var a=t.val,r=e.val,n=0;return ar&&(n=-1),n})),r.optionsLabel[r.alegeri].forEach((function(t){f".concat(f," voturi din ").concat(d," voturi valabile
"),e.properties.candidat="".concat(p.label,""),e.properties.details="față de ".concat(h.label,"")})),this.names=bt()(new Set(s)),this.names.forEach((function(t){void 0===r.legend.find((function(e){return e.label===t}))&&r.legend.push(r.optionsLabel[r.alegeri].find((function(e){return e.label===t})))})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %")),this.color3=Ke["r"](Ke["t"]),this.polyFeatures[e]=new mr["a"]({features:(new Sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),this.polyLayer[e]=new wr["a"]({source:this.polyFeatures[e],style:function(t){return new gr["c"]({fill:new vr["a"]({color:t.get("color"),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e]);var c=Ke["g"]({decimal:",",thousands:".",grouping:[3]}),l=c.format(",");this.total=l(i),this.totalProcent="".concat(parseInt(100*i/o*100,10)/100," %")},calcPrezenta:function(t,e){var a=100*e/t;a>this.rangeMax&&(this.rangeMax=Math.round(a+1)),a100&&(this.rangeMax=100),this.rangeMin<0&&(this.rangeMin=0),this.prezentaRange.min=this.rangeMin,this.prezentaRange.max=this.rangeMax},calcRezultat:function(t){t>this.rangeMaxRez&&(this.rangeMaxRez=Math.round(t+1)),t100&&(this.rangeMaxRez=100),this.rangeMinRez<0&&(this.rangeMinRez=0),this.rezultatRange.min=this.rangeMinRez,this.rezultatRange.max=this.rangeMaxRez},resetRange:function(){this.rangeMin=100,this.rangeMax=0,this.rangeMinRez=100,this.rangeMaxRez=0},colorMap:function(t,e,a){var r=this;this.zoommap.removeLayer(this.polyLayer[e]),this.resetRange();var n=[],i=0,o=0;this.mapFeatures[e].features.forEach((function(e,s){"string"!==typeof e.properties.Nr_SV&&(e.properties.Nr_SV=e.properties.Nr_SV.toString());var c=e.properties.Nr_SV.split(",");e.properties.value=0;var l=0,u=0,d=0,p=0;e.properties.allData=[],c.forEach((function(a){var n=r.allData.find((function(t){return t.precinct_nr===a}));"undefined"===typeof n?(l=-1,e.properties.nume="nu s-a numarat",u=1):(l+=parseInt(n["".concat(t)],10),u+=parseInt(n.c,10),e.properties.nume=n.precinct_nr,d+=parseInt(n.a,10),p+=parseInt(n.b,10)),e.properties.allData.push(n)})),r.calcPrezenta(d,p),e.properties.active="".concat(t),"p"===a?(e.properties.unitati="%",e.properties.value=parseInt(100*l/u*100,10)/100):(e.properties.unitati=" votanți",e.properties.value=l),r.calcRezultat(e.properties.value),i+=l,o+=u,-1!==l&&n.push(e.properties.value),e.properties.candidat=t,e.properties.details="".concat(l," din ").concat(u," pe liste.")})),this.min=Math.min.apply(Math,n),this.max=Math.max.apply(Math,n),"p"===a&&(this.min="".concat(Math.min.apply(Math,n)," %"),this.max="".concat(Math.max.apply(Math,n)," %")),this.color3=Ke["q"]().domain([Math.min.apply(Math,n),Math.max.apply(Math,n)]).range(["rgba(179,227,238,0.8)","rgba(1,94,111,0.8)"]),this.mapFeatures[e].features.forEach((function(t,e){t.properties.color=r.color3(t.properties.value)})),this.polyLayer[e]=new wr["a"]({source:new mr["a"]({features:(new Sr["a"]).readFeatures(JSON.stringify(this.mapFeatures[e]))}),style:function(t){return new gr["c"]({fill:new vr["a"]({color:r.colors(t.get("value")),opacity:1}),stroke:!1})}}),this.zoommap.addLayer(this.polyLayer[e]);var s=Ke["g"]({decimal:",",thousands:".",grouping:[3]}),c=s.format(",");this.total=c(i),this.totalProcent="".concat(parseInt(100*i/o*100,10)/100," %")},changeSectieGraph:function(t){this.updateHorizontalBarChart("graph-sectie",{root:"".concat(this.alegeri),tree:this.rezultatSec[this.secType]})},changeGraph:function(t){this.updateHorizontalBarChart("graph",{root:"".concat(this.alegeri),tree:this.rezultat[this.rezType]})},newVarsta:function(){"Total"===this.activeVarsta&&"Total"===this.activeGen?this.updateMap("LP","p"):this.updateMap("".concat(this.activeGen," ").concat(this.activeVarsta),"s"),this.liste={label:"Liste Permanente",value:"LP"}},toggle:function(){"nul"===this.activeGen?this.newNul():this.goto({value:this.alegeri})},changeOras:function(){var t=this;this.zoommap.removeLayer(this.polyLayer[0]),this.zoommap.removeLayer(this.polyLayer[1]),this.drawerRight=!1,this.activeVarsta=null,this.flyTo(V["d"](this.config["".concat(this.orasSelect.value)].center),(function(e){t.allData=[],t.$router.push({name:"rezultate",query:{oras:"".concat(t.orasSelect.value),alegeri:"".concat(t.config["".concat(t.orasSelect.value)].default)}}).then((function(){t.drawerRight=!0,t.configMenu(),t.titlu=t.alegeriOptions.find((function(e){return e.value===t.config["".concat(t.orasSelect.value)].default})).label,t.alegeriSelect={label:t.titlu,value:t.config["".concat(t.orasSelect.value)].default},t.loadMaps(0)}))}))},flyTo:function(t,e){var a=2e3,r=this.view.getZoom(),n=2,i=!1;this.view.animate({center:t,duration:a},(function(t){n+=-1,i||0!==n&&t||(i=!0,e(t))})),this.view.animate({zoom:r-3,duration:a/2},{zoom:r,duration:a/2},(function(t){n+=-1,i||0!==n&&t||(i=!0)}))},goto:function(t){var e=this;this.activeVarsta=null,this.activeGen="win",this.rezType=1,this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(t.value)}}).then((function(){e.loadData()}))},newNul:function(){this.activeVarsta=null,this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(this.alegeri),id:"".concat(this.optionsLabel[this.alegeri].length-1)}}),this.updateMap("d","p")},newCGMB:function(){this.activeGen="",this.$router.push({name:"rezultate",query:{oras:"".concat(this.orasSelect.value),alegeri:"".concat(this.alegeri),id:this.optionsLabel[this.alegeri].indexOf(this.activeVarsta)}}),this.updateMap("".concat(this.activeVarsta.value),"p")},newListe:function(){this.updateMap("".concat(this.liste.value),"p"),this.activeVarsta="Total",this.activeGen="Total"},updateHorizontalBarChart:function(t,e){var a={data:[]};e.tree.sort((function(t,e){return parseFloat(t.value)5&&(i+=n,o.push({root:c.label,value:n}))}));var u=parseInt(i/n,10);o.forEach((function(t,a){e.rezultatSec[2].push({root:t.root,value:Math.round(t.value/u)})})),this.updateHorizontalBarChart("graph-sectie",{root:"".concat(this.alegeri),tree:this.rezultatSec[this.secType]})},totaluri:function(){for(var t=this,e=[],a=26;a5&&(o+=i,s.push({root:c.label,value:i}))}));var c=parseInt(o/i,10);s.forEach((function(e,a){t.rezultat[2].push({root:e.root,value:Math.round(e.value/c)})})),this.updateHorizontalBarChart("graph",{root:"".concat(this.alegeri),tree:this.rezultat[1]})},onMapCreated:function(){this.vlayer=new wr["a"]({source:this.vectorsource,style:new gr["c"]({fill:new vr["a"]({color:"rgba(128, 153, 255, 0.2)"}),stroke:new yr["a"]({color:"#FF5000",width:2}),image:new br["a"]({radius:7,fill:new vr["a"]({color:"#8099FF"})})})}),this.view=new kr["a"]({zoom:12,center:V["d"](this.config["".concat(this.orasSelect.value)].center),loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0}),this.zoommap=new Cr["a"]({target:"ol-map",projection:"EPSG:4326",layers:[new xr["a"]({source:new Ar["a"]}),this.vlayer],view:this.view})},generateLayer:function(t,e,a,r){var n=new mr["a"]({features:(new Sr["a"]).readFeatures(t)}),i=new wr["a"]({source:n,style:new gr["c"]({fill:new vr["a"]({color:r}),stroke:new yr["a"]({color:e,width:a}),image:new br["a"]({radius:7,fill:new vr["a"]({color:"#8099FF"})})})});return i},addInteractions:function(){var t=this;this.modify=new dr["a"]({source:this.vectorsource}),this.zoommap.addInteraction(this.modify),this.draw=new pr["a"]({source:this.vectorsource,type:"Polygon",style:new gr["c"]({fill:new vr["a"]({color:"rgba(255, 80, 0, 0.2)"}),stroke:new yr["a"]({color:"#8099FF",width:2}),image:new br["a"]({radius:7,fill:new vr["a"]({color:"#8099FF"})})})}),this.zoommap.addInteraction(this.draw);var e=new hr["a"]({source:this.vectorsource});this.zoommap.addInteraction(e),this.vectorsource.getFeatures().length>0&&this.draw.setActive(!1),this.draw.on("drawend",(function(e){t.controlDoubleClickZoom(!1),t.draw.setActive(!1),t.updateSearch(e.feature),t.setMiniState(!1)})),this.modify.on("modifyend",(function(e){t.updateSearch(e.features.getArray()[0])}))},controlDoubleClickZoom:function(t){for(var e=this.zoommap.getInteractions(),a=0;a0?"":(t=-t,n(t))}))),g.append("g").selectAll("g").data(m).enter().append("g").attr("fill",(function(t){return b(t.key)})).selectAll("rect").data((function(t){return t})).enter().append("rect").attr("height",15).attr("rx",1).attr("ry",1).attr("y",(function(t){return v(t.data.key)+3})).attr("x",(function(t){return t[0]<0?k(t[0])-40:k(t[0])})).attr("width",(function(t){return t[0],k(t[1])-k(t[0])})).attr("id",(function(t,e){return"bar-".concat(o,"-").concat(t.data.key,"-").concat(e)})).on("mouseover",(function(t,e){return x(t,e)})).on("mouseout",(function(t,e){return S(t,e)})).on("mousemove",(function(t,e){return w(t,e)}));for(var C=[],A=function(t){C[t]=r["m"]().y((function(t){return v(t.key)+v.bandwidth()/2})).x((function(e){var a=0;return e.media[t]<0&&(a=-40),k(e.media[t])+a}))},L=0;L<2;L++)A(L);for(var _=0;_<2;_++){var q=g.append("g").attr("id","line-".concat(o,"-").concat(_));q.append("path").datum(i).attr("class","tur2-line").style("stroke",s[_+2]).style("stroke-width",1).attr("id","line-".concat(o,"-").concat(_)).attr("d",C[_])}}});e["a"]=n},"5be9":function(t,e,a){},"5d9f":function(t,e,a){},"758b":function(t,e,a){"use strict";a.d(e,"a",(function(){return c})),a.d(e,"b",(function(){return l}));var r=a("bc3a"),n=a.n(r),i=(a("ac1f"),a("5319"),new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0})),o=Intl.NumberFormat("ro-RO",{style:"decimal",minimumFractionDigits:0}),s={methods:{toTitleCase:function(t){return t.toLowerCase().replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g,(function(t){return t.toUpperCase()}))},slugify:function(t){return t.toLowerCase().normalize("NFD").replace(/[\s-_]+/g,"-").replace(/([\u0300-\u036f]|[^a-z0-9-])/g,"").replace(/^-+|-+$/g,"")},compareValues:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";return function(a,r){if(!Object.prototype.hasOwnProperty.call(a,t)||!Object.prototype.hasOwnProperty.call(r,t))return 0;var n="string"===typeof a[t]?a[t].toUpperCase():a[t],i="string"===typeof r[t]?r[t].toUpperCase():r[t],o=0;return n>i?o=1:ne?"".concat(t.substr(0,e).replace(/\s+$/,""),"…"):t}}};n.a.defaults.headers.common={Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","Content-Language":"ro"};var c=n.a.create({baseURL:"https://apitest.zoom.report",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),l=n.a.create({baseURL:"/api",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}});e["c"]=function(t){var e=t.Vue;e.prototype.$axios=n.a,e.prototype.$api=c,e.mixin(s)}},7685:function(t,e,a){"use strict";var r=a("a6be"),n=a.n(r);n.a},"7e6d":function(t,e,a){},8116:function(t,e,a){"use strict";var r=a("5d9f"),n=a.n(r);n.a},8158:function(t,e,a){},a6be:function(t,e,a){},b1b3:function(t,e,a){},b5f2:function(t,e,a){"use strict";(function(t){a("b06b"),a("5698"),a("bc3a"),a("df4d");var r=a("b5ae");a("758b"),a("db6e"),a("ce30");e["a"]={name:"algeriLayout",props:{code:{type:String,default:""}},data:function(){return{drawer:!0,miniState:!0,selType:"one",seamless:!0,backButton:!1,env:t.env,menuDock:0,activeEndPoint:"",presets:["Toate județele","Orașele din Alba"],selectedpreset:"",form:{nume:"",email:"",topics:[1,2,3,4,5,6],consent:"0"},scrolltop:30,model:"",opened:!1,activeLocalities:[],breadcrumbs:[],currentUrl:"",searchResult:[],desk:!0,overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}}}},validations:{form:{email:{required:r["required"],email:r["email"]},consent:{required:r["required"]}}}}}).call(this,a("4362"))},b656:function(t,e,a){"use strict";var r=a("5be9"),n=a.n(r);n.a},bc05:function(t,e,a){"use strict";(function(t){a("b06b"),a("5698"),a("bc3a"),a("df4d");var r=a("b5ae");a("758b"),a("db6e"),a("ce30");e["a"]={name:"algeriLayout",props:{code:{type:String,default:""}},data:function(){return{drawer:!0,miniState:!0,selType:"one",seamless:!0,backButton:!1,env:t.env,menuDock:0,activeEndPoint:"",presets:["Toate județele","Orașele din Alba"],selectedpreset:"",form:{nume:"",email:"",topics:[1,2,3,4,5,6],consent:"0"},scrolltop:30,model:"",opened:!1,activeLocalities:[],breadcrumbs:[],currentUrl:"",searchResult:[],desk:!0,overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}}}},validations:{form:{email:{required:r["required"],email:r["email"]},consent:{required:r["required"]}}}}}).call(this,a("4362"))},bd62:function(t,e,a){},c459:function(t,e,a){"use strict";var r=a("b1b3"),n=a.n(r);n.a},c4fe:function(t,e,a){},c544:function(t,e,a){"use strict";(function(t){a("99af"),a("4160"),a("a15b"),a("d81d"),a("d3b7"),a("e6cf"),a("ac1f"),a("25f0"),a("841c"),a("159b");var r=a("7619"),n=a.n(r),i=a("b06b"),o=(a("5698"),a("bc3a"),a("df4d")),s=a("2f62"),c=a("b5ae"),l=a("758b");a("db6e"),a("ce30"),a("2c72");e["a"]={name:"MyLayout",props:{code:{type:String,default:""}},data:function(){return{selType:"one",seamless:!0,backButton:!1,env:t.env,menuDock:0,activeEndPoint:"",presets:["Toate județele","Orașele din Alba"],selectedpreset:"",form:{nume:"",email:"",topics:[1,2,3,4,5,6],consent:"0"},scrolltop:30,model:"",opened:!1,activeLocalities:[],breadcrumbs:[],currentUrl:"",searchResult:[],desk:!0,overriddenNetworks:{test:{sharer:"https://google.com",type:"popup"}}}},validations:{form:{email:{required:c["required"],email:c["email"]},consent:{required:c["required"]}}},computed:n()(n()(n()(n()(n()(n()({},Object(s["e"])("search",["searchResults"])),Object(s["c"])("search",["getAllCategories","getLocalityCount","getLocalities","getActiveLocalities","getCounties","getCountiesNames"])),Object(s["e"])("account",{userLoggedIn:"isLoggedIn",authProcessing:"processing",accountSidebarView:"sidebarView"})),Object(s["c"])("account",["name","avatar"])),Object(s["c"])("registry",["getActiveLevel","getBreadcrumbs","getActiveEndPoint"])),{},{mobile:{get:function(){return this.$q.platform.is.mobile}},miniState:{get:function(){return this.$store.state.miniState},set:function(t){this.setMiniState(t)}},sidebarOpen:{get:function(){return this.$store.state.sidebarOpen},set:function(t){this.setMiniState(t)}},tip:function(){return this.searchResults.tip},viewSearch:function(){return this.searchResults.sir}}),mounted:function(){this.$q.notify.setDefaults({position:"bottom",timeout:2e3,textColor:"white",actions:[{icon:"close",color:"white"}]}),this.profile(),this.$q.platform.is.mobile?(this.desk=!1,this.setSidebarOpen(!0),this.setMiniState(!1)):(this.setSidebarOpen(!0),this.setMiniState(!0)),this.currentUrl=window.location.href},beforeUpdate:function(){},updated:function(){void 0!==this.$refs.me&&(this.scrolltop=this.$refs.breadh.clientHeight-30)},directives:{clickOutside:o["a"]},methods:n()(n()(n()(n()(n()(n()(n()(n()({},Object(s["d"])(["setSidebarOpen","setMiniState"])),Object(s["b"])("search",["searchIds","initData"])),Object(s["d"])("search",["removeLocality","resetPoly","setSelType"])),Object(s["d"])("account",{toggleAccountSidebar:"toggleSidebar"})),Object(s["b"])("account",["profile"])),Object(s["d"])("registry",["updateRegistry","updateActiveMenu","goBreadcrumbs","getGraphs","resetBreadcrumbs","setActiveGraphs"])),Object(s["b"])("registry",["getRegistry","getPage","changeMenu","getCategoryMenu"])),{},{enablePlugin:function(){},submit:function(t){var e=this;this.$v.form.$touch(),this.$v.form.$error?this.$q.notify("Un email valid este obligatoriu"):l["a"].post("user",{Email:this.form.email,Name:this.form.nume,Topics:this.form.topics.join(","),Consent:this.form.consent}).then((function(a){e.$q.notify({type:"positive",message:"Îți mulțumim! Te vom ține la curent"}),e.opened=!1,t(a)})).catch((function(t){400===t.response.status?e.$q.notify("Adresa introdusă există deja în baza noastră de date."):e.$q.notify("Eroare de conexiune.")}))},openModal:function(){this.opened=!0},openURL:i["a"],search:function(t,e,a){var r=this;t.length<3?(this.searchResult=[],a()):l["a"].post("search/name/",{coord:t}).then((function(t){r.searchResult=[],t.data.forEach((function(t){r.searchResult.push({label:"".concat(t.localitate_niv2," | ").concat(t.judet),judet:"".concat(t.judet),value:t.localitate_niv2,ids:t.sirutA_niv2,tagul:"".concat(t.localitate_niv2),tip:t.tip})})),e((function(){return new Promise((function(t,e){t(!0)}))})),r.$q.platform.is.mobile&&(r.setSidebarOpen(!0),r.setMiniState(!1)),r.$forceUpdate()}))},clearSelection:function(){this.resetPoly()},selected:function(t){var e=this,a=!1;this.$store.state.search.searchResults.localities.map((function(e){return e.siruta===t.ids&&(a=!0),e})),"/"===this.$route.path?(a||(this.$store.state.search.searchResults.localities.push({label:t.label,judet:t.judet,active:!0,siruta:t.ids}),this.$store.state.search.activeLocalities.push(t.ids.toString(10)),this.searchIds({ids:this.$store.state.search.activeLocalities.join(","),tip:""})),this.model={},this.searchResult=[]):this.$router.push({name:"graphs",query:{ids:"".concat(t.ids),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}).then((function(t){e.$router.go(0)}))},goBack:function(){this.$router.go(-1)},hideMenu:function(t){this.miniState=!0},openSearchMenu:function(){this.menuDock=0,this.$q.platform.is.mobile||(this.setSidebarOpen(!0),0===this.menuDock?this.miniState=!this.miniState:this.miniState&&(this.miniState=!1),"/"===this.$route.path&&(this.miniState=!1))},openDataMenu:function(){1===this.menuDock?(this.miniState=!this.miniState,this.$q.platform.is.mobile&&(this.setSidebarOpen(!1),this.miniState=!1)):this.miniState&&(this.miniState=!1),"/"===this.$route.path&&(this.miniState=!1),this.menuDock=1},closeBar:function(){this.miniState=!this.miniState,this.$q.platform.is.mobile&&(this.setSidebarOpen(!1),this.miniState=!1)},getMainMenu:function(){this.menuDock=1,this.miniState=!1},getReport:function(t){},searchTemp:function(t){},loadGroupPage:function(t){this.changeMenu({item:t,nodes:this.getActiveLevel}),this.loadPage(t)},loadPage:function(t){this.miniState=!0,this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([t.code]),cat:"".concat(this.getActiveEndPoint)}}),this.$q.platform.is.mobile&&this.setSidebarOpen(!1),this.$forceUpdate()},updateLocalities:function(){this.miniState=!0,this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}),this.$store.state.updates+=1,this.$forceUpdate()},updateList:function(t){var e=this;1!==this.activeLocalities.length||"/"===this.$route.path?(this.removeLocality(t),this.$forceUpdate(),"/"!==this.$route.path&&this.$router.push({name:"graphs",query:{ids:"".concat(this.activeLocalities),code:"".concat([this.$router.currentRoute.query.code]),cat:"".concat(this.$router.currentRoute.query.cat)}}).then((function(t){e.$router.go(0)}))):this.$q.notify({position:"top-left",color:"info",message:"Trebuie să fie cel puțin o localitate selectată."})},toggleSelect:function(){var t=this;this.activeLocalities.length===this.getLocalities.length?this.activeLocalities=[]:(this.activeLocalities=[],this.getLocalities.forEach((function(e,a){t.activeLocalities.push("".concat(e.sirutA_niv2))})))}})}}).call(this,a("4362"))},ce30:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-header",{staticClass:"graphs-title"},[a("q-toolbar",[a("img",{staticStyle:{height:"35px",width:"auto"},attrs:{src:"statics/logo-square.png"}}),a("p",{staticClass:"text-white",staticStyle:{"padding-top":"20px","padding-left":"20px"}},[t._v(" "+t._s(t.oras)+" Alegeri Locale 2020")])])],1)},n=[],i=a("7619"),o=a.n(i),s=a("2f62"),c=(a("758b"),{name:"graphs-header",props:{oras:{type:String,default:""}},data:function(){return{desk:!0,local:"",expanded:!1}},computed:o()(o()({},Object(s["e"])("account",["user","expire_at"])),Object(s["c"])("account",["name","avatar"])),mounted:function(){!0===this.$q.platform.is.mobile&&(this.desk=!1)},methods:o()(o()({},Object(s["b"])("account",["logout"])),Object(s["d"])(["setSidebarOpen","setMiniState"]))}),l=c,u=(a("fb68"),a("2877")),d=a("e359"),p=a("65c6"),h=a("eebe"),f=a.n(h),m=Object(u["a"])(l,r,n,!1,null,"1ca68ef6",null);m.exports;f()(m,"components",{QHeader:d["a"],QToolbar:p["a"]})},db6e:function(t,e,a){"use strict";var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-drawer",{attrs:{side:"right","content-class":"bg-grey-2"},model:{value:t.sidebarOpen,callback:function(e){t.sidebarOpen=e},expression:"sidebarOpen"}},["guest"===t.sidebarView?a("account-login"):t._e(),"recover"===t.sidebarView?a("account-recover"):t._e(),"register"===t.sidebarView?a("account-register"):t._e(),"user"===t.sidebarView?a("account-profile"):t._e(),a("q-inner-loading",{attrs:{color:"primary",visible:!!t.processing}})],1)},n=[],i=a("7619"),o=a.n(i),s=a("2f62"),c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("div",{staticClass:"q-title text-primary q-mt-md"},[t._v("\n Intră în cont\n ")]),a("div",{staticClass:"row justify-center"},[a("div",{staticClass:"col-12 form-fields"},[a("q-slide-transition",[t.showErrorMessage?a("q-alert",{staticClass:"q-mt-md",attrs:{type:"negative",appear:"",actions:[{icon:"close",handler:function(){t.showErrorMessage=!1}}],message:t.failedAuthMessage}}):t._e()],1),a("q-field",{staticClass:"q-my-md",attrs:{icon:"email","error-label":t.errors.email,error:t.$v.form.email.$error}},[a("q-input",{attrs:{type:"email","float-label":"Email"},on:{blur:t.$v.form.email.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doLogin()}},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}})],1),a("q-field",{staticClass:"q-my-md",attrs:{icon:"lock","error-label":t.errors.password,error:t.$v.form.password.$error}},[a("q-input",{attrs:{type:"password","float-label":"Parola"},on:{blur:t.$v.form.password.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doLogin()}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),a("q-field",{staticClass:"q-ma-md"},[a("q-checkbox",{staticClass:"text-primary",model:{value:t.form.remember,callback:function(e){t.$set(t.form,"remember",e)},expression:"form.remember"}},[t._v("\n  Ține-mă minte\n ")])],1),a("div",{staticClass:"row q-my-lg justify-center"},[a("q-btn",{staticClass:"col-8 no-shadow",attrs:{color:"primary",label:"Login",disable:t.disableLogin},on:{click:function(e){return t.doLogin()}}})],1),a("div",{staticClass:"row justify-center q-my-sm"},[a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Nu am cont"},on:{click:function(e){return t.setSidebarView("register")}}}),a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Am uitat parola",disable:""},on:{click:function(e){return t.setSidebarView("recover")}}})],1)],1),a("div",{staticClass:"col-8"})])])])},l=[],u=(a("07ac"),a("ac1f"),a("466d"),a("68bf")),d=a.n(u),p=a("b5ae"),h={name:"AccountLogin",data:function(){return{form:{email:"",password:"",remember:!1},errors:{email:"",password:""},submitted:!1,isAuthFailed:!1,showErrorMessage:!1,disableLogin:!1,failedAuthMessage:"Login failed",validationMessages:{email:{required:"We need a valid email",email:"We need a valid email",unique:"The email has already been taken"},password:{required:"Password is required",minLength:"Password is too short",isValid:""}}}},computed:o()(o()({},Object(s["e"])(["isLoggedIn","loginResponse"])),Object(s["c"])(["processing"])),validations:function(){return{form:{email:{required:p["required"],email:p["email"]},password:{required:p["required"],minLength:Object(p["minLength"])(4),isValid:function(t){return""===t||!this.isAuthFailed}}}}},methods:o()(o()(o()({},Object(s["b"])("account",["login"])),Object(s["d"])("account",["setSidebarView"])),{},{doLogin:function(){this.submitted=!0,this.$v.form.$touch(),this.$v.form.$error?this.showValidationErrors():(this.isAuthFailed=!1,this.showErrorMessage=!1,this.$v.form.$reset(),this.login(o()({},this.form)).catch(this.handleFailedLogin))},handleFailedLogin:function(t){var e=this;if(t.response&&403===t.response.status)this.failedAuthMessage=t.response.data.message;else if(t.response&&422===t.response.status){var a=Object.values(t.response.data.errors),r=d()(a,1),n=d()(r[0],1);this.failedAuthMessage=n[0]}else if(t.response&&429===t.response.status){var i=Object.values(t.response.data.errors),o=d()(i,1),s=d()(o[0],1);this.failedAuthMessage=s[0];var c=this.failedAuthMessage.match(/(\d+)\s?sec/i);2===c.length&&parseInt(c[1],10)&&(this.disableLogin=!0,setTimeout((function(){e.disableLogin=!1}),1e3*parseInt(c[1],10)))}this.isAuthFailed=!0,this.showErrorMessage=!0,this.showValidationErrors()},showValidationErrors:function(){if(this.submitted)for(var t in this.$v.form.$touch(),this.form)if(this.$v.form[t].$error){for(var e in this.$v.form[t].$params)if(!this.$v.form[t][e]){this.errors[t]=this.validationMessages[t][e];break}}else this.errors[t]=""}})},f=h,m=a("2877"),g=a("9989"),v=a("e9c1"),y=a("8572"),b=a("27f9"),w=a("8f8e"),x=a("9c40"),S=a("74f7"),k=a("eebe"),C=a.n(k),A=Object(m["a"])(f,c,l,!1,null,null,null),L=A.exports;C()(A,"components",{QPage:g["a"],QSlideTransition:v["a"],QField:y["a"],QInput:b["a"],QCheckbox:w["a"],QBtn:x["a"],QInnerLoading:S["a"]});var _=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[t._v("\n recover page\n "),a("q-btn",{staticClass:"full-width",attrs:{flat:"",color:"secondary",label:"Înapoi la Login"},nativeOn:{click:function(e){return t.setSidebarView("guest")}}})],1)])},q=[],M={name:"AccountRegister",methods:o()({},Object(s["d"])("account",["setSidebarView"]))},z=M,F=Object(m["a"])(z,_,q,!1,null,"2d89f438",null),R=F.exports;C()(F,"components",{QPage:g["a"],QBtn:x["a"]});var O=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("div",{staticClass:"q-title text-primary q-mt-md"},[t._v("\n Înregistrare cont nou\n ")]),a("div",{staticClass:"row justify-center q-my-sm"},[a("div",{staticClass:"col-12 form-fields"},[a("q-field",{staticClass:"q-my-sm",attrs:{icon:"person","error-label":t.errors.first_name,error:t.$v.form.first_name.$error}},[a("q-input",{attrs:{type:"text","float-label":"Prenume"},on:{blur:t.$v.form.first_name.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.first_name,callback:function(e){t.$set(t.form,"first_name",e)},expression:"form.first_name"}})],1),a("q-field",{staticClass:"q-my-sm",attrs:{inset:"icon","error-label":t.errors.last_name,error:t.$v.form.last_name.$error}},[a("q-input",{attrs:{type:"text","float-label":"Nume"},on:{blur:t.$v.form.last_name.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.last_name,callback:function(e){t.$set(t.form,"last_name",e)},expression:"form.last_name"}})],1),a("q-field",{staticClass:"q-mt-md q-mb-sm",attrs:{icon:"email","error-label":t.errors.email,error:t.$v.form.email.$error}},[a("q-input",{attrs:{type:"email","float-label":"Email"},on:{blur:t.$v.form.email.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.email,callback:function(e){t.$set(t.form,"email",e)},expression:"form.email"}})],1),a("q-field",{staticClass:"q-my-sm",attrs:{icon:"lock","error-label":t.errors.password,error:t.$v.form.password.$error}},[a("q-input",{attrs:{type:"password","float-label":"Parola"},on:{blur:t.$v.form.password.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),a("q-field",{staticClass:"q-mb-md",attrs:{inset:"icon","error-label":t.errors.password_confirmation,error:t.$v.form.password_confirmation.$error}},[a("q-input",{attrs:{type:"password","float-label":"Confirmă Parola"},on:{blur:t.$v.form.password_confirmation.$touch,input:function(e){return t.showValidationErrors()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.doCreateAccount()}},model:{value:t.form.password_confirmation,callback:function(e){t.$set(t.form,"password_confirmation",e)},expression:"form.password_confirmation"}})],1),a("q-field",{staticClass:"q-ml-sm q-my-md text-primary",attrs:{"error-label":t.errors.tos,error:t.$v.form.tos.$error}},[a("q-checkbox",{model:{value:t.form.tos,callback:function(e){t.$set(t.form,"tos",e)},expression:"form.tos"}},[a("small",{staticClass:"on-right text-left"},[t._v("\n Sunt de acord cu\n"),a("a",{staticClass:"text-info text-italic"},[t._v("Termenii și condițiile")]),t._v("\n și cu\n "),a("em",{staticClass:"text-info"},[t._v("Politica de confidențialitate")])])])],1)],1),a("div",{staticClass:"col-8"},[a("q-btn",{staticClass:"full-width q-my-md no-shadow",attrs:{color:"primary",label:"Register"},nativeOn:{click:function(e){return t.doCreateAccount()}}}),a("q-btn",{staticClass:"full-width",attrs:{flat:"",color:"secondary",label:"Înapoi la Login"},nativeOn:{click:function(e){return t.setSidebarView("guest")}}})],1)])])])},T=[],I={name:"AccountRegister",data:function(){return{form:{email:"",password:"",password_confirmation:"",first_name:"",last_name:"",tos:!1},errors:{email:"",password:"",password_confirmation:"",first_name:"",last_name:"",tos:""},submitted:!1,showErrorMessage:!1,validationMessages:{email:{required:"We need a valid email",email:"We need a valid email",unique:"The email has already been taken"},password:{required:"Password is required",minLength:"Password is too short"},password_confirmation:{sameAsPassword:"Passwords must be identical"},first_name:{required:"Given Name is required",minLength:"Given Name is too short"},last_name:{required:"Name is required",minLength:"Name is too short"},tos:{checked:"To continue, you must agree with our Privacy Policy"}}}},validations:function(){return{form:{email:{required:p["required"],email:p["email"]},password:{required:p["required"],minLength:Object(p["minLength"])(8)},password_confirmation:{sameAsPassword:Object(p["sameAs"])("password")},first_name:{required:p["required"],minLength:Object(p["minLength"])(2)},last_name:{required:p["required"],minLength:Object(p["minLength"])(2)},tos:{checked:Object(p["sameAs"])((function(){return!0}))}}}},methods:o()(o()(o()({},Object(s["b"])("account",["register"])),Object(s["d"])("account",["setSidebarView"])),{},{showValidationErrors:function(){if(this.submitted)for(var t in this.$v.form.$touch(),this.form)if(this.$v.form[t].$error){for(var e in this.$v.form[t].$params)if(!this.$v.form[t][e]){this.errors[t]=this.validationMessages[t][e];break}}else this.errors[t]=""},doCreateAccount:function(){this.submitted=!0,this.$v.form.$touch(),this.$v.form.$error?this.showValidationErrors():(this.showErrorMessage=!1,this.$v.form.$reset(),this.register(o()({},this.form)).catch(this.handleFailedLogin))}})},P=I,E=Object(m["a"])(P,O,T,!1,null,"529c78a7",null),B=E.exports;C()(E,"components",{QPage:g["a"],QField:y["a"],QInput:b["a"],QCheckbox:w["a"],QBtn:x["a"]});var j=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("q-page",{staticClass:"flex justify-center text-center col-12 animate-fade"},[a("div",{staticClass:"column page-content full-width q-pa-md"},[a("q-btn",{staticClass:"q-px-sm",attrs:{flat:"",color:"secondary",label:"Logout"},on:{click:function(e){return t.logout()}}})],1)])},D=[],$=(a("758b"),{name:"Profile",data:function(){return{}},computed:o()(o()({},Object(s["e"])("account",["user","expire_at"])),Object(s["c"])("account",["name","avatar"])),methods:o()({},Object(s["b"])("account",["logout"]))}),G=$,Q=Object(m["a"])(G,j,D,!1,null,"7eeadcc5",null),V=Q.exports;C()(Q,"components",{QPage:g["a"],QBtn:x["a"]});var N={name:"accountSidebar",components:{AccountProfile:V,AccountRecover:R,AccountRegister:B,AccountLogin:L},data:function(){return{}},computed:o()(o()({},Object(s["e"])("account",["processing","sidebarView"])),{},{sidebarOpen:{get:function(){return this.$store.state.account.sidebarOpen},set:function(t){this.toggleSidebar(t)}}}),methods:o()({},Object(s["d"])("account",["toggleSidebar"]))},U=N,H=a("9404"),K=Object(m["a"])(U,r,n,!1,null,"332ae518",null);K.exports;C()(K,"components",{QDrawer:H["a"],QInnerLoading:S["a"]})},f3a5:function(t,e,a){},f493:function(t,e,a){"use strict";var r=a("c4fe"),n=a.n(r);n.a},fb68:function(t,e,a){"use strict";var r=a("bd62"),n=a.n(r);n.a},fbb6:function(t,e,a){"use strict";var r=a("4399"),n=a.n(r);n.a}});