text: /*! Copyright Pyplan 2020. All rights reserved. */
  (window.webpackJsonp=window.webpackJsonp||[]).push([[300,5],{2128:function(e,l,n){"use strict";(function(t,s){var i,a,c=n(18);i=[n(706),n(713),n(683),n(2129),n(2130),n(2131)],void 0===(a=function(e,l,n,i,a,o){return t.View.extend({el:s("#n_o_n_e"),field:"",tagId:"",currentView:void 0,render:function(l,t,u){var r=this,d=i();(new n).show({title:"Filter tasks",html:d,modalClass:"filterviewModal",buttons:[{title:"OK",css:"primary",code:"ok"},{title:(0,c.translate)("cancel"),code:"cancel"}],callback:function(e,n){"ok"==e&&r.applyFilters(l,t,n,u)},onClose:function(e){r.removeView(e)},onLoad:function(l){(0,c.postRender)(l),r.addHandlers(l);var n=new e;n.listUsers(function(e){var n=a({items:e}),i=s("#users.filterlist ul");i.selectonic({multi:!0,keyboard:!0,keyboardMode:"toggle",mouseMode:"toggle",focusOnHover:!0,selectionBlur:!1,focusBlur:!1,select:function(e,l){},unselectAll:function(e,l){}}),l.find("#users.filterlist ul").append(n),i.perfectScrollbar(),r.initializeSelectedFilters(t,l)}),n.listStates(function(e){var n=o({items:e}),i=s("#status.filterlist ul");i.selectonic({multi:!0,keyboard:!0,keyboardMode:"toggle",mouseMode:"toggle",focusOnHover:!0,selectionBlur:!1,focusBlur:!1,select:function(e,l){},unselectAll:function(e,l){}}),l.find("#status.filterlist ul").append(n),i.perfectScrollbar(),r.initializeSelectedFilters(t,l)})}})},removeView:function(e){this.currentView=null},addHandlers:function(e){e.find(".selectAll").on("click",function(){e.find("#users.filterlist ul li:visible").each(function(e,l){s(l).addClass("j-selected")})}),e.find(".selectNone").on("click",function(){e.find("#users.filterlist ul li").each(function(e,l){s("#users.filterlist ul").selectonic("unselect",l)})}),e.find(".selectAllStatus").on("click",function(){e.find("#status.filterlist ul li:visible").each(function(e,l){s(l).addClass("j-selected")})}),e.find(".selectNoneStatus").on("click",function(){e.find("#status.filterlist ul li").each(function(e,l){s("#status.filterlist ul").selectonic("unselect",l)})})},initializeSelectedFilters:function(e,l){var n=e;n&&(s(n.usersSelected).each(function(e,n){l.find("#users.filterlist ul li").each(function(e,l){parseInt(s(l).attr("data-id"))===n&&s("#users.filterlist ul").selectonic("select",l)})}),s(n.statusSelected).each(function(e,n){l.find("#status.filterlist ul li").each(function(e,l){parseInt(s(l).attr("data-id"))===n&&s("#status.filterlist ul").selectonic("select",l)})})),l.find(".info .filtered").html(l.find("#users.filterlist ul li").length),l.find(".info .total").html(l.find("#users.filterlist ul li").length)},setFiltersPreference:function(e){(new l).UpdateUserPreference("workflowFilters",JSON.stringify(e))},applyFilters:function(e,l,n,t){for(var i=e,a=(l={usersSelected:[],statusSelected:[]},n.find("#users.filterlist ul li.j-selected")),c=0;c<a.length;c++)l.usersSelected.push(parseInt(s(a[c]).attr("data-id")));var o=n.find("#status.filterlist ul li.j-selected");for(c=0;c<o.length;c++)l.statusSelected.push(parseInt(s(o[c]).attr("data-id")));if(l.usersSelected.length>0)for(c=0;c<i.length;c++){for(var u,r=[],d=0;d<l.usersSelected.length;d++)(u=i[c].tasks.filter(function(e){return e.userId===l.usersSelected[d]})).length>0&&r.push(u);r.length>0?i[c].tasks=r[0]:i[c].tasks=[]}if(l.statusSelected.length>0)for(c=0;c<i.length;c++){var f,m=[];for(d=0;d<l.statusSelected.length;d++)(f=i[c].tasks.filter(function(e){return e.stateId===l.statusSelected[d]})).length>0&&m.push(f);m.length>0?i[c].tasks=m[0]:i[c].tasks=[]}this.setFiltersPreference(l),t(l)}})}.apply(l,i))||(e.exports=a)}).call(this,n(218),n(1))},2129:function(e,l,n){var t=n(690);function s(e){return e&&(e.__esModule?e.default:e)}e.exports=(t.default||t).template({compiler:[8,">= 4.3.0"],main:function(e,l,t,i,a){var c=null!=l?l:e.nullContext||{},o=e.escapeExpression;return'<div class="filterview unselectable">\n\n    <div class="row" style="padding: 10px 0;">\n      <div class="col-sm-6">\n        <div class="form-group">\n          <label for="textfield" class="control-label col-sm-2" style="padding-top: 4px;">Users:</label>\n          <div class="col-sm-10">\n            <a href="#" class="btn btn-small btn-lime selectAll">'+o(s(n(688)).call(c,"_all",{name:"L",hash:{},data:a,loc:{start:{line:8,column:65},end:{line:8,column:77}}}))+'</a>\n\n            <a href="#" class="btn btn-small btn-lime selectNone">'+o(s(n(688)).call(c,"_none",{name:"L",hash:{},data:a,loc:{start:{line:10,column:66},end:{line:10,column:79}}}))+'</a>\n          </div>\n        </div>\n      </div>\n\n      <div class="col-sm-6">\n        <div class="form-group">\n          <label for="textfield" class="control-label col-sm-2" style="padding-top: 4px;">Status:</label>\n          <div class="col-sm-10">\n            <a href="#" class="btn btn-small btn-lime selectAllStatus">'+o(s(n(688)).call(c,"_all",{name:"L",hash:{},data:a,loc:{start:{line:19,column:71},end:{line:19,column:83}}}))+'</a>\n\n            <a href="#" class="btn btn-small btn-lime selectNoneStatus">'+o(s(n(688)).call(c,"_none",{name:"L",hash:{},data:a,loc:{start:{line:21,column:72},end:{line:21,column:85}}}))+'</a>\n          </div>\n        </div>\n      </div>\n    </div>\n\n    <div class="row" style="padding: 10px 0;">\n      <div id="users" class="col-sm-6 filterlist">\n          <ul></ul>\n      </div>\n\n      <div id="status" class="col-sm-6 filterlist">\n          <ul></ul>\n      </div>\n    </div>\n\n    <div class="info">\n        '+o(s(n(688)).call(c,"filtered",{name:"L",hash:{},data:a,loc:{start:{line:38,column:8},end:{line:38,column:24}}}))+' <span class="number filtered">4</span> '+o(s(n(688)).call(c,"from",{name:"L",hash:{},data:a,loc:{start:{line:38,column:64},end:{line:38,column:76}}}))+' <span class="number total">8</span>\n    </div>\n\n\n</div>\n\n\n'},useData:!0})},2130:function(e,l,n){var t=n(690);e.exports=(t.default||t).template({1:function(e,l,n,t,s){var i,a=null!=l?l:e.nullContext||{},c=e.hooks.helperMissing,o=e.escapeExpression;return'<li data-id="'+o("function"==typeof(i=null!=(i=n.userId||(null!=l?l.userId:l))?i:c)?i.call(a,{name:"userId",hash:{},data:s,loc:{start:{line:2,column:13},end:{line:2,column:23}}}):i)+'">\n    <span>'+o("function"==typeof(i=null!=(i=n.fullName||(null!=l?l.fullName:l))?i:c)?i.call(a,{name:"fullName",hash:{},data:s,loc:{start:{line:3,column:10},end:{line:3,column:22}}}):i)+"</span>\n</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,l,n,t,s){var i;return null!=(i=n.each.call(null!=l?l:e.nullContext||{},null!=l?l.items:l,{name:"each",hash:{},fn:e.program(1,s,0),inverse:e.noop,data:s,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?i:""},useData:!0})},2131:function(e,l,n){var t=n(690);e.exports=(t.default||t).template({1:function(e,l,n,t,s){var i,a=null!=l?l:e.nullContext||{},c=e.hooks.helperMissing,o=e.escapeExpression;return'<li data-id="'+o("function"==typeof(i=null!=(i=n.taskStateId||(null!=l?l.taskStateId:l))?i:c)?i.call(a,{name:"taskStateId",hash:{},data:s,loc:{start:{line:2,column:13},end:{line:2,column:28}}}):i)+'">\n    <span>'+o("function"==typeof(i=null!=(i=n.name||(null!=l?l.name:l))?i:c)?i.call(a,{name:"name",hash:{},data:s,loc:{start:{line:3,column:10},end:{line:3,column:18}}}):i)+"</span>\n</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,l,n,t,s){var i;return null!=(i=n.each.call(null!=l?l:e.nullContext||{},null!=l?l.items:l,{name:"each",hash:{},fn:e.program(1,s,0),inverse:e.noop,data:s,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?i:""},useData:!0})},683:function(e,l,n){"use strict";(function(t){var s;void 0===(s=function(){return t.Controller.extend({name:"showModal",show:function(e){Promise.all([n.e(2),n.e(121)]).then(function(){var l=[n(700)];(function(l){(new l).render(e)}).apply(null,l)}).catch(n.oe)}})}.apply(l,[]))||(e.exports=s)}).call(this,n(694))}}]);