(function(){var t,e,n;n=[function(t){return"groupBy=substr(uid,1)"},function(t){return"uid="+t+"*&groupBy=uid"},function(t){return"uid="+t}],e={actives:[{title:"markAsDone",icon:"check"}],done:[{title:"deleteNotification",icon:"trash"}],new:[{title:"save",icon:"save"}],home:[]},t=angular.module("llngNotificationsExplorer",["ui.tree","ui.bootstrap","llApp"]),t.controller("NotificationsExplorerCtrl",["$scope","$translator","$location","$q","$http","$uibModal",function(t,i,o,r,a,u){var c,s,l;return t.links=links,t.menulinks=menulinks,t.staticPrefix=staticPrefix,t.scriptname=scriptname,t.formPrefix=formPrefix,t.availableLanguages=availableLanguages,t.waiting=!0,t.showM=!1,t.showT=!0,t.showForm=!1,t.data=[],t.form={},t.formPost={},t.currentScope=null,t.currentNotification=null,t.menu=e,t.translateP=i.translateP,t.translate=i.translate,t.translateTitle=function(t){return i.translateField(t,"title")},t.menuClick=function(e){if(e.popup)window.open(e.popup);else switch(e.action||(e.action=e.title),typeof e.action){case"function":e.action(t.currentNode,t);break;case"string":t[e.action]();break;default:console.log(typeof e.action)}return t.showM=!1},t.markAsDone=function(){return t.waiting=!0,a.put(scriptname+"notifications/"+t.type+"/"+t.currentNotification.uid+"_"+t.currentNotification.reference,{done:1}).then(function(e){return t.currentNotification=null,t.currentScope.remove(),t.message={title:"notificationDeleted"},t.showModal("alert.html"),t.waiting=!1,t.init()},function(e){return t.message={title:"notificationNotDeleted",message:e.statusText},t.showModal("alert.html"),t.waiting=!1,t.init()})},t.deleteNotification=function(){return t.waiting=!0,a.delete(scriptname+"notifications/"+t.type+"/"+t.currentNotification.uid+"_"+t.currentNotification.reference+"_"+t.currentNotification.done).then(function(e){return t.currentNotification=null,t.currentScope.remove(),t.message={title:"notificationPurged"},t.showModal("alert.html"),t.waiting=!1,t.init()},function(e){return t.message={title:"notificationNotPurged",message:e.statusText},t.showModal("alert.html"),t.waiting=!1,t.init()})},t.stoggle=function(e){var n;if(n=e.$modelValue,0===n.nodes.length)return t.updateTree(n.value,n.nodes,n.level,n.query),e.toggle()},t.notifDate=function(t){var e;return null!=t?(t.match(/(\d{4})-(\d{2})-(\d{2})/)&&(t=t.substr(0,4)+t.substr(5,2)+t.substr(8,2)),e=new Date(t.substr(0,4),t.substr(4,2)-1,t.substr(6,2)),e.toLocaleDateString()):""},t.getLanguage=function(e){return t.lang=e,t.form="white",t.init(),t.showM=!1},t.$on("$locationChangeSuccess",function(e,n,i){var o;return o=n.match(/#!?\/(\w+)/),t.type=null!=o?o[1]:"actives","new"===t.type?t.displayCreateForm():(t.showForm=!1,t.init())}),c=0,t.updateTree=function(e,i,o,r){var u;return t.waiting=!0,u=n[o](e,r),a.get(scriptname+"notifications/"+t.type+"?"+u).then(function(e){var r,a,s,l,f;if(r=e.data,r.result)for(f=r.values,a=0,s=f.length;a