From c621da4fd682990af1520e0313dd763c621b041f Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 10 Jan 2019 16:04:13 +0100 Subject: [PATCH] Do not load 2fa admin settings async Signed-off-by: Roeland Jago Douma --- lib/private/Settings/Admin/Security.php | 26 ++++++-- settings/js/vue-0.js | 6 +- settings/js/vue-3.js | 4 +- settings/js/vue-4.js | 2 +- settings/js/vue-5.js | 2 +- settings/js/vue-6.js | 2 +- settings/js/vue-settings-admin-security.js | 48 ++++++++++---- .../js/vue-settings-admin-security.js.map | 2 +- .../js/vue-settings-apps-users-management.js | 22 +++---- .../vue-settings-apps-users-management.js.map | 2 +- settings/src/components/AdminTwoFactor.vue | 33 ++++------ settings/src/main-admin-security.js | 9 ++- settings/src/store/admin-security.js | 63 +++++++++++++++++++ .../templates/settings/admin/security.php | 1 + tests/lib/Settings/Admin/SecurityTest.php | 13 +++- 15 files changed, 175 insertions(+), 60 deletions(-) create mode 100644 settings/src/store/admin-security.js diff --git a/lib/private/Settings/Admin/Security.php b/lib/private/Settings/Admin/Security.php index dd80d4d3ae..21e18883cc 100644 --- a/lib/private/Settings/Admin/Security.php +++ b/lib/private/Settings/Admin/Security.php @@ -25,25 +25,35 @@ namespace OC\Settings\Admin; +use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor; use OCP\AppFramework\Http\TemplateResponse; use OCP\Encryption\IManager; +use OCP\IInitialStateService; use OCP\IUserManager; use OCP\Settings\ISettings; class Security implements ISettings { + /** @var IManager */ private $manager; /** @var IUserManager */ private $userManager; - /** - * @param IManager $manager - * @param IUserManager $userManager - */ - public function __construct(IManager $manager, IUserManager $userManager) { + /** @var MandatoryTwoFactor */ + private $mandatoryTwoFactor; + + /** @var IInitialStateService */ + private $initialState; + + public function __construct(IManager $manager, + IUserManager $userManager, + MandatoryTwoFactor $mandatoryTwoFactor, + IInitialStateService $initialState) { $this->manager = $manager; $this->userManager = $userManager; + $this->mandatoryTwoFactor = $mandatoryTwoFactor; + $this->initialState = $initialState; } /** @@ -61,6 +71,12 @@ class Security implements ISettings { } } + $this->initialState->provideInitialState( + 'settings', + 'mandatory2FAState', + $this->mandatoryTwoFactor->getState() + ); + $parameters = [ // Encryption API 'encryptionEnabled' => $this->manager->isEnabled(), diff --git a/settings/js/vue-0.js b/settings/js/vue-0.js index b8eb1cdd0c..ee1f02d007 100644 --- a/settings/js/vue-0.js +++ b/settings/js/vue-0.js @@ -1,4 +1,4 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{36:function(e,n,i){var r;window,r=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=81)}([function(t,e,n){"use strict";function i(t,e,n,i,r,o,a,s){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:u}}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";var i=n(26),r=n(27),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,i=t.length;nn.parts.length&&(i.parts.length=n.parts.length)}else{var a=[];for(r=0;r0&&n.unshift(e.target),t.contains(e.target)||function(t,e){if(!t||!e)return!1;for(var n=0,i=e.length;n-1:t.item.model},on:{change:[function(e){var n=t.item.model,i=e.target,r=!!i.checked;if(Array.isArray(n)){var o=t._i(n,null);i.checked?o<0&&t.$set(t.item,"model",n.concat([null])):o>-1&&t.$set(t.item,"model",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.item,"model",r)},t.item.action]}}):"radio"===t.item.input?n("input",{directives:[{name:"model",rawName:"v-model",value:t.item.model,expression:"item.model"}],class:t.item.input,attrs:{id:t.key,type:"radio"},domProps:{checked:t._q(t.item.model,null)},on:{change:[function(e){return t.$set(t.item,"model",null)},t.item.action]}}):n("input",{directives:[{name:"model",rawName:"v-model",value:t.item.model,expression:"item.model"}],class:t.item.input,attrs:{id:t.key,type:t.item.input},domProps:{value:t.item.model},on:{change:t.item.action,input:function(e){e.target.composing||t.$set(t.item,"model",e.target.value)}}}),t._v(" "),n("label",{attrs:{for:t.key},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.item.action(e)}}},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")])]],2):t.item.action?n("button",{staticClass:"menuitem",class:{active:t.item.active},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.item.action(e)}}},[n("span",{class:t.item.icon}),t._v(" "),t.item.text&&t.item.longtext?n("p",[n("strong",{staticClass:"menuitem-text"},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")]),n("br"),t._v(" "),n("span",{staticClass:"menuitem-text-detail"},[t._v("\n\t\t\t\t"+t._s(t.item.longtext)+"\n\t\t\t")])]):t.item.text?n("span",[t._v("\n\t\t\t"+t._s(t.item.text)+"\n\t\t")]):t.item.longtext?n("p",[t._v("\n\t\t\t"+t._s(t.item.longtext)+"\n\t\t")]):t._e()]):n("span",{staticClass:"menuitem",class:{active:t.item.active}},[n("span",{class:t.item.icon}),t._v(" "),t.item.text&&t.item.longtext?n("p",[n("strong",{staticClass:"menuitem-text"},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")]),n("br"),t._v(" "),n("span",{staticClass:"menuitem-text-detail"},[t._v("\n\t\t\t\t"+t._s(t.item.longtext)+"\n\t\t\t")])]):t.item.text?n("span",[t._v("\n\t\t\t"+t._s(t.item.text)+"\n\t\t")]):t.item.longtext?n("p",[t._v("\n\t\t\t"+t._s(t.item.longtext)+"\n\t\t")]):t._e()])])},[],!1,null,"a5db8fb0",null).exports},props:{menu:{type:Array,default:function(){return[{href:"https://nextcloud.com",icon:"icon-links",text:"Nextcloud"}]},required:!0}}},a=Object(r.a)(o,function(){var t=this.$createElement,e=this._self._c||t;return e("ul",this._l(this.menu,function(t,n){return e("popover-menu-item",{key:n,attrs:{item:t}})}),1)},[],!1,null,null,null).exports;n.d(e,"PopoverMenu",function(){return a}), +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{37:function(e,n,i){var r;window,r=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=81)}([function(t,e,n){"use strict";function i(t,e,n,i,r,o,a,s){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,l):[l]}return{exports:t,options:u}}n.d(e,"a",function(){return i})},function(t,e,n){"use strict";var i=n(26),r=n(27),o=Object.prototype.toString;function a(t){return"[object Array]"===o.call(t)}function s(t){return null!==t&&"object"==typeof t}function l(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),a(t))for(var n=0,i=t.length;nn.parts.length&&(i.parts.length=n.parts.length)}else{var a=[];for(r=0;r0&&n.unshift(e.target),t.contains(e.target)||function(t,e){if(!t||!e)return!1;for(var n=0,i=e.length;n-1:t.item.model},on:{change:[function(e){var n=t.item.model,i=e.target,r=!!i.checked;if(Array.isArray(n)){var o=t._i(n,null);i.checked?o<0&&t.$set(t.item,"model",n.concat([null])):o>-1&&t.$set(t.item,"model",n.slice(0,o).concat(n.slice(o+1)))}else t.$set(t.item,"model",r)},t.item.action]}}):"radio"===t.item.input?n("input",{directives:[{name:"model",rawName:"v-model",value:t.item.model,expression:"item.model"}],class:t.item.input,attrs:{id:t.key,type:"radio"},domProps:{checked:t._q(t.item.model,null)},on:{change:[function(e){return t.$set(t.item,"model",null)},t.item.action]}}):n("input",{directives:[{name:"model",rawName:"v-model",value:t.item.model,expression:"item.model"}],class:t.item.input,attrs:{id:t.key,type:t.item.input},domProps:{value:t.item.model},on:{change:t.item.action,input:function(e){e.target.composing||t.$set(t.item,"model",e.target.value)}}}),t._v(" "),n("label",{attrs:{for:t.key},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.item.action(e)}}},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")])]],2):t.item.action?n("button",{staticClass:"menuitem",class:{active:t.item.active},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.item.action(e)}}},[n("span",{class:t.item.icon}),t._v(" "),t.item.text&&t.item.longtext?n("p",[n("strong",{staticClass:"menuitem-text"},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")]),n("br"),t._v(" "),n("span",{staticClass:"menuitem-text-detail"},[t._v("\n\t\t\t\t"+t._s(t.item.longtext)+"\n\t\t\t")])]):t.item.text?n("span",[t._v("\n\t\t\t"+t._s(t.item.text)+"\n\t\t")]):t.item.longtext?n("p",[t._v("\n\t\t\t"+t._s(t.item.longtext)+"\n\t\t")]):t._e()]):n("span",{staticClass:"menuitem",class:{active:t.item.active}},[n("span",{class:t.item.icon}),t._v(" "),t.item.text&&t.item.longtext?n("p",[n("strong",{staticClass:"menuitem-text"},[t._v("\n\t\t\t\t"+t._s(t.item.text)+"\n\t\t\t")]),n("br"),t._v(" "),n("span",{staticClass:"menuitem-text-detail"},[t._v("\n\t\t\t\t"+t._s(t.item.longtext)+"\n\t\t\t")])]):t.item.text?n("span",[t._v("\n\t\t\t"+t._s(t.item.text)+"\n\t\t")]):t.item.longtext?n("p",[t._v("\n\t\t\t"+t._s(t.item.longtext)+"\n\t\t")]):t._e()])])},[],!1,null,"a5db8fb0",null).exports},props:{menu:{type:Array,default:function(){return[{href:"https://nextcloud.com",icon:"icon-links",text:"Nextcloud"}]},required:!0}}},a=Object(r.a)(o,function(){var t=this.$createElement,e=this._self._c||t;return e("ul",this._l(this.menu,function(t,n){return e("popover-menu-item",{key:n,attrs:{item:t}})}),1)},[],!1,null,null,null).exports;n.d(e,"PopoverMenu",function(){return a}), /** * @copyright Copyright (c) 2018 John Molakvoæ * @@ -319,11 +319,11 @@ Object(i.a)(l),e.default=l},function(t,e,n){var i=n(72);"string"==typeof i&&(i=[ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - */n.d(e,"Action",function(){return r.default}),n.d(e,"AppContent",function(){return o.default}),n.d(e,"AppNavigationItem",function(){return a.default}),n.d(e,"AppNavigationNew",function(){return s.default}),n.d(e,"AppNavigationSettings",function(){return l.default}),n.d(e,"Avatar",function(){return u.default}),n.d(e,"DatetimePicker",function(){return c.default}),n.d(e,"Modal",function(){return p.default}),n.d(e,"Multiselect",function(){return d.default}),n.d(e,"PopoverMenu",function(){return f.default}),n.d(e,"Tooltip",function(){return h.default}),"undefined"!=typeof window&&window.Vue&&m(window.Vue),e.default=function(t){for(var e=1;e0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(11),r=n(23),o=n(28),a=n(19),s=n(64);t.exports=function(t,e){var n=1==t,l=2==t,u=3==t,c=4==t,p=6==t,d=5==t||p,f=e||s;return function(e,s,h){for(var A,m,v=o(e),g=r(v),y=i(s,h,3),b=a(g.length),x=0,w=n?f(e,b):l?f(e,0):void 0;b>x;x++)if((d||x in g)&&(A=g[x],m=y(A,x,v),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return A;case 6:return x;case 2:w.push(A)}else if(c)return!1;return p?-1:u||c?c:w}}},function(t,e,n){var i=n(5),r=n(0).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(9);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(13).f,r=n(12),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(49)("keys"),r=n(30);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(16);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(5);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){"use strict";var i=n(0),r=n(12),o=n(9),a=n(67),s=n(29),l=n(7),u=n(77).f,c=n(45).f,p=n(13).f,d=n(51).trim,f=i.Number,h=f,A=f.prototype,m="Number"==o(n(44)(A)),v="trim"in String.prototype,g=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,i,r,o=(e=v?e.trim():d(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+e}for(var a,l=e.slice(2),u=0,c=l.length;ur)return NaN;return parseInt(l,i)}}return+e};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof f&&(m?l(function(){A.valueOf.call(n)}):"Number"!=o(n))?a(new h(g(e)),n,f):g(e)};for(var y,b=n(4)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)r(h,y=b[x])&&!r(f,y)&&p(f,y,c(h,y));f.prototype=A,A.constructor=f,n(6)(i,"Number",f)}},function(t,e,n){"use strict";function i(t){return!(0===t||(!Array.isArray(t)||0!==t.length)&&t)}function r(t){return function(){return!t.apply(void 0,arguments)}}function o(t,e,n,i){return t.filter(function(t){return function(t,e){return void 0===t&&(t="undefined"),null===t&&(t="null"),!1===t&&(t="false"),-1!==t.toString().toLowerCase().indexOf(e.trim())}(i(t,n),e)})}function a(t){return t.filter(function(t){return!t.$isLabel})}function s(t,e){return function(n){return n.reduce(function(n,i){return i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n},[])}}function l(t,e,i,r,a){return function(s){return s.map(function(s){var l;if(!s[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];var u=o(s[i],t,e,a);return u.length?(l={},n.i(f.a)(l,r,s[r]),n.i(f.a)(l,i,u),l):[]})}}var u=n(59),c=n(54),p=(n.n(c),n(95)),d=(n.n(p),n(31)),f=(n.n(d),n(58)),h=n(91),A=(n.n(h),n(98)),m=(n.n(A),n(92)),v=(n.n(m),n(88)),g=(n.n(v),n(97)),y=(n.n(g),n(89)),b=(n.n(y),n(96)),x=(n.n(b),n(93)),w=(n.n(x),n(90)),_=(n.n(w),function(){for(var t=arguments.length,e=new Array(t),n=0;n-1},isSelected:function(t){var e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},getOptionLabel:function(t){if(i(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;var e=this.customLabel(t,this.label);return i(e)?"":e},select:function(t,e){if(t.$isLabel&&this.groupSelect)this.selectGroup(t);else if(!(-1!==this.blockKeys.indexOf(e)||this.disabled||t.$isDisabled||t.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==e||this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t))return void("Tab"!==e&&this.removeElement(t));this.$emit("select",t,this.id),this.multiple?this.$emit("input",this.internalValue.concat([t]),this.id):this.$emit("input",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup:function(t){var e=this,n=this.options.find(function(n){return n[e.groupLabel]===t.$groupLabel});if(n)if(this.wholeGroupSelected(n)){this.$emit("remove",n[this.groupValues],this.id);var i=this.internalValue.filter(function(t){return-1===n[e.groupValues].indexOf(t)});this.$emit("input",i,this.id)}else{var o=n[this.groupValues].filter(r(this.isSelected));this.$emit("select",o,this.id),this.$emit("input",this.internalValue.concat(o),this.id)}},wholeGroupSelected:function(t){return t[this.groupValues].every(this.isSelected)},removeElement:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.disabled){if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();var i="object"===n.i(u.a)(t)?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.$emit("remove",t,this.id),this.multiple){var r=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("input",r,this.id)}else this.$emit("input",null,this.id);this.closeOnSelect&&e&&this.deactivate()}},removeLastElement:function(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate:function(){var t=this;this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.$nextTick(function(){return t.$refs.search.focus()})):this.$el.focus(),this.$emit("open",this.id))},deactivate:function(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search.blur():this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle:function(){this.isOpen?this.deactivate():this.activate()},adjustPosition:function(){if("undefined"!=typeof window){var t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||"below"===this.openDirection||"bottom"===this.openDirection?(this.prefferedOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.prefferedOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))}}}}},function(t,e,n){"use strict";var i=n(54),r=(n.n(i),n(31));n.n(r),e.a={data:function(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition:function(){return this.pointer*this.optionHeight},visibleElements:function(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions:function(){this.pointerAdjust()},isOpen:function(){this.pointerDirty=!1}},methods:{optionHighlight:function(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight:function(t,e){var n=this;if(!this.groupSelect)return["multiselect__option--group","multiselect__option--disabled"];var i=this.options.find(function(t){return t[n.groupLabel]===e.$groupLabel});return["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]},addPointerElement:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Enter",e=t.key;this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward:function(){this.pointer0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset:function(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust:function(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet:function(t){this.pointer=t,this.pointerDirty=!0}}}},function(t,e,n){"use strict";var i=n(36),r=n(74),o=n(15),a=n(18);t.exports=n(72)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){"use strict";var i=n(31),r=(n.n(i),n(32)),o=n(33);e.a={name:"vue-multiselect",mixins:[r.a,o.a],props:{name:{type:String,default:""},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:function(t){return"and ".concat(t," more")}},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{isSingleLabelVisible:function(){return this.singleValue&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible:function(){return!(this.internalValue.length||this.searchable&&this.isOpen)},visibleValues:function(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue:function(){return this.internalValue[0]},deselectLabelText:function(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText:function(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText:function(){return this.showLabels?this.selectLabel:""},selectGroupLabelText:function(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText:function(){return this.showLabels?this.selectedLabel:""},inputStyle:function(){if(this.searchable||this.multiple&&this.value&&this.value.length)return this.isOpen?{width:"auto"}:{width:"0",position:"absolute",padding:"0"}},contentStyle:function(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove:function(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.prefferedOpenDirection},showSearchInput:function(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)}}}},function(t,e,n){var i=n(1)("unscopables"),r=Array.prototype;null==r[i]&&n(8)(r,i,{}),t.exports=function(t){r[i][t]=!0}},function(t,e,n){var i=n(18),r=n(19),o=n(85);t.exports=function(t){return function(e,n,a){var s,l=i(e),u=r(l.length),c=o(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(9),r=n(1)("toStringTag"),o="Arguments"==i(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){"use strict";var i=n(2);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var i=n(0).document;t.exports=i&&i.documentElement},function(t,e,n){t.exports=!n(4)&&!n(7)(function(){return 7!=Object.defineProperty(n(21)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var i=n(9);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";function i(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=r(e),this.reject=r(n)}var r=n(14);t.exports.f=function(t){return new i(t)}},function(t,e,n){var i=n(2),r=n(76),o=n(22),a=n(27)("IE_PROTO"),s=function(){},l=function(){var t,e=n(21)("iframe"),i=o.length;for(e.style.display="none",n(40).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("\n\n\n","import { render, staticRenderFns } from \"./AdminTwoFactor.vue?vue&type=template&id=774f2231&\"\nimport script from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nexport * from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AdminTwoFactor.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{staticClass:\"settings-hint\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication can be enforced for all\tusers and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.loading)?_c('p',[_c('span',{staticClass:\"icon-loading-small two-factor-loading\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]):_c('p',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.state.enforced),expression:\"state.enforced\"}],staticClass:\"checkbox\",attrs:{\"type\":\"checkbox\",\"id\":\"two-factor-enforced\"},domProps:{\"checked\":Array.isArray(_vm.state.enforced)?_vm._i(_vm.state.enforced,null)>-1:(_vm.state.enforced)},on:{\"change\":[function($event){var $$a=_vm.state.enforced,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.state, \"enforced\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.state, \"enforced\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.state, \"enforced\", $$c)}},_vm.saveChanges]}}),_vm._v(\" \"),_c('label',{attrs:{\"for\":\"two-factor-enforced\"}},[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]),_vm._v(\" \"),_c('h3',[_vm._v(_vm._s(_vm.t('settings', 'Limit to groups')))]),_vm._v(\"\\n\\t\"+_vm._s(_vm.t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.'))+\"\\n\\t\"),_c('p',[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is enforced for all\tmembers of the following groups.'))+\"\\n\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Enforced groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.state.enforcedGroups),callback:function ($$v) {_vm.$set(_vm.state, \"enforcedGroups\", $$v)},expression:\"state.enforcedGroups\"}})],1),_vm._v(\" \"),_c('p',[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is not enforced for\tmembers of the following groups.'))+\"\\n\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Excluded groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.state.excludedGroups),callback:function ($$v) {_vm.$set(_vm.state, \"excludedGroups\", $$v)},expression:\"state.excludedGroups\"}})],1),_vm._v(\" \"),_c('p',[_c('em',[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.'))+\"\\n\\t\\t\")])]),_vm._v(\" \"),_c('p',[_c('button',{staticClass:\"button primary\",attrs:{\"disabled\":_vm.loading},on:{\"click\":_vm.saveChanges}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Save changes'))+\"\\n\\t\\t\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from 'vue'\n\nimport AdminTwoFactor from './components/AdminTwoFactor.vue'\n\n__webpack_nonce__ = btoa(OC.requestToken)\n\nVue.prototype.t = t;\n\nconst View = Vue.extend(AdminTwoFactor)\nnew View().$mount('#two-factor-auth-settings')\n","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of \n","import { render, staticRenderFns } from \"./AdminTwoFactor.vue?vue&type=template&id=47904f57&\"\nimport script from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nexport * from \"./AdminTwoFactor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AdminTwoFactor.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('p',{staticClass:\"settings-hint\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication can be enforced for all\tusers and specific groups. If they do not have a two-factor provider configured, they will be unable to log into the system.'))+\"\\n\\t\")]),_vm._v(\" \"),(_vm.loading)?_c('p',[_c('span',{staticClass:\"icon-loading-small two-factor-loading\"}),_vm._v(\" \"),_c('span',[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]):_c('p',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.state.enforced),expression:\"state.enforced\"}],staticClass:\"checkbox\",attrs:{\"type\":\"checkbox\",\"id\":\"two-factor-enforced\"},domProps:{\"checked\":Array.isArray(_vm.state.enforced)?_vm._i(_vm.state.enforced,null)>-1:(_vm.state.enforced)},on:{\"change\":[function($event){var $$a=_vm.state.enforced,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.state, \"enforced\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.state, \"enforced\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.state, \"enforced\", $$c)}},_vm.saveChanges]}}),_vm._v(\" \"),_c('label',{attrs:{\"for\":\"two-factor-enforced\"}},[_vm._v(_vm._s(_vm.t('settings', 'Enforce two-factor authentication')))])]),_vm._v(\" \"),_c('h3',[_vm._v(_vm._s(_vm.t('settings', 'Limit to groups')))]),_vm._v(\"\\n\\t\"+_vm._s(_vm.t('settings', 'Enforcement of two-factor authentication can be set for certain groups only.'))+\"\\n\\t\"),_c('p',[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is enforced for all\tmembers of the following groups.'))+\"\\n\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Enforced groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.state.enforcedGroups),callback:function ($$v) {_vm.$set(_vm.state, \"enforcedGroups\", $$v)},expression:\"state.enforcedGroups\"}})],1),_vm._v(\" \"),_c('p',[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('settings', 'Two-factor authentication is not enforced for\tmembers of the following groups.'))+\"\\n\\t\")]),_vm._v(\" \"),_c('p',[_c('Multiselect',{attrs:{\"options\":_vm.groups,\"placeholder\":_vm.t('settings', 'Excluded groups'),\"disabled\":_vm.loading,\"multiple\":true,\"searchable\":true,\"loading\":_vm.loadingGroups,\"show-no-options\":false,\"close-on-select\":false},on:{\"search-change\":_vm.searchGroup},model:{value:(_vm.state.excludedGroups),callback:function ($$v) {_vm.$set(_vm.state, \"excludedGroups\", $$v)},expression:\"state.excludedGroups\"}})],1),_vm._v(\" \"),_c('p',[_c('em',[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'When groups are selected/excluded, they use the following logic to determine if a user has 2FA enforced: If no groups are selected, 2FA is enabled for everyone except members of the excluded groups. If groups are selected, 2FA is enabled for all members of these. If a user is both in a selected and excluded group, the selected takes precedence and 2FA is enforced.'))+\"\\n\\t\\t\")])]),_vm._v(\" \"),_c('p',[_c('button',{staticClass:\"button primary\",attrs:{\"disabled\":_vm.loading},on:{\"click\":_vm.saveChanges}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.t('settings', 'Save changes'))+\"\\n\\t\\t\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*\n * @copyright 2019 Roeland Jago Douma \n *\n * @author 2019 Roeland Jago Douma \n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nexport const mutations = {\n\tsetEnforced(state, enabled) {\n\t\tVue.set(state, 'enforced', enabled)\n\t},\n\tsetEnforcedGroups(state, total) {\n\t\tVue.set(state, 'enforcedGroups', total)\n\t},\n\tsetExcludedGroups(state, used) {\n\t\tVue.set(state, 'excludedGroups', used)\n\t}\n}\n\nexport const actions = {\n\tsave ({commit}, ) {\n\t\tcommit('setEnabled', false);\n\n\t\treturn generateCodes()\n\t\t\t.then(({codes, state}) => {\n\t\t\tcommit('setEnabled', state.enabled);\n\t\tcommit('setTotal', state.total);\n\t\tcommit('setUsed', state.used);\n\t\tcommit('setCodes', codes);\n\t\treturn true;\n\t});\n\t}\n}\n\nexport default new Vuex.Store({\n\tstrict: process.env.NODE_ENV !== 'production',\n\tstate: {\n\t\tenforced: false,\n\t\tenforcedGroups: [],\n\t\texcludedGroups: [],\n\t},\n\tmutations,\n\tactions\n})\n","import Vue from 'vue'\n\nimport AdminTwoFactor from './components/AdminTwoFactor.vue'\nimport store from './store/admin-security'\n\n__webpack_nonce__ = btoa(OC.requestToken)\n\nVue.prototype.t = t;\n\nstore.replaceState(\n\tOCP.InitialState.loadState('settings', 'mandatory2FAState')\n)\n\nconst View = Vue.extend(AdminTwoFactor)\nnew View({\n\tstore\n}).$mount('#two-factor-auth-settings')\n","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of