!function(){var e={54:function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},l=0;l<t.length;l++){var i=t[l],s=i[0],a={id:e+":"+l,css:i[1],media:i[2],sourceMap:i[3]};n[s]?n[s].parts.push(a):r.push(n[s]={id:s,parts:[a]})}return r}r.d(t,{A:function(){return h}});var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},s=l&&(document.head||document.getElementsByTagName("head")[0]),a=null,o=0,c=!1,u=function(){},d=null,p="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e,t,r,l){c=r,d=l||{};var s=n(e,t);return v(s),function(t){for(var r=[],l=0;l<s.length;l++){var a=s[l];(o=i[a.id]).refs--,r.push(o)}for(t?v(s=n(e,t)):s=[],l=0;l<r.length;l++){var o;if(0===(o=r[l]).refs){for(var c=0;c<o.parts.length;c++)o.parts[c]();delete i[o.id]}}}}function v(e){for(var t=0;t<e.length;t++){var r=e[t],n=i[r.id];if(n){n.refs++;for(var l=0;l<n.parts.length;l++)n.parts[l](r.parts[l]);for(;l<r.parts.length;l++)n.parts.push(b(r.parts[l]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var s=[];for(l=0;l<r.parts.length;l++)s.push(b(r.parts[l]));i[r.id]={id:r.id,refs:1,parts:s}}}}function g(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function b(e){var t,r,n=document.querySelector("style["+p+'~="'+e.id+'"]');if(n){if(c)return u;n.parentNode.removeChild(n)}if(f){var l=o++;n=a||(a=g()),t=y.bind(null,n,l,!1),r=y.bind(null,n,l,!0)}else n=g(),t=C.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var m,x=(m=[],function(e,t){return m[e]=t,m.filter(Boolean).join("\n")});function y(e,t,r,n){var l=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,l);else{var i=document.createTextNode(l),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function C(e,t){var r=t.css,n=t.media,l=t.sourceMap;if(n&&e.setAttribute("media",n),d.ssrId&&e.setAttribute(p,t.id),l&&(r+="\n/*# sourceURL="+l.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(l))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},423:function(e,t,r){var n=r(710);n.__esModule&&(n=n.default),"string"==typeof n&&(n=[[e.id,n,""]]),n.locals&&(e.exports=n.locals),(0,r(54).A)("11fe897c",n,!0,{})},710:function(){}},t={};function r(n){var l=t[n];if(void 0!==l)return l.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e;r(423),e=jQuery,Craft.UserPermissions=Garnish.Base.extend({$wrapper:null,$selectAllBtn:null,$allCheckboxes:null,init:function(t){this.$wrapper=e(t),this.$selectAllBtn=this.$wrapper.find(".select-all"),this.$allCheckboxes=this.$wrapper.find("input[type=checkbox]"),this.addListener(this.$selectAllBtn,"click","toggleSelectAll"),this.addListener(this.$allCheckboxes,"click","toggleCheckbox"),this.updateSelectAllBtn()},toggleSelectAll:function(e){this.canSelectAll()?this.$allCheckboxes.filter(":not(:checked)").trigger("click"):this.$allCheckboxes.filter(":checked").trigger("click"),e.preventDefault()},toggleCheckbox:function(t){var r=e(t.currentTarget);if(r.prop("disabled"))t.preventDefault();else{var n=r.parent("li").find("> ul > li > input[type=checkbox]");r.prop("checked")?n.prop("disabled",!1):(n.filter(":checked").trigger("click"),n.prop("disabled",!0)),this.updateSelectAllBtn()}},updateSelectAllBtn:function(){this.canSelectAll()?this.$selectAllBtn.text(Craft.t("app","Select All")):this.$selectAllBtn.text(Craft.t("app","Deselect All"))},canSelectAll:function(){return!!this.$allCheckboxes.filter(":not(:checked)").length}})}()}();
//# sourceMappingURL=UserPermissions.js.map