nextcloud/apps/settings/js/vue-settings-personal-webau...

181 lines
565 KiB
JavaScript
Raw Normal View History

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/js/",n(n.s=580)}([function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(14))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(0),o=n(56),s=n(6),i=n(40),a=n(57),c=n(99),l=o("wks"),u=r.Symbol,m=c?u:u&&u.withoutSetter||i;e.exports=function(e){return s(l,e)&&(a||"string"==typeof l[e])||(a&&s(u,e)?l[e]=u[e]:l[e]=m("Symbol."+e)),l[e]}},function(e,t,n){var r=n(0),o=n(23).f,s=n(12),i=n(10),a=n(48),c=n(97),l=n(46);e.exports=function(e,t){var n,u,m,p,f,d=e.target,g=e.global,A=e.stat;if(n=g?r:A?r[d]||a(d,{}):(r[d]||{}).prototype)for(u in t){if(p=t[u],m=e.noTargetGet?(f=o(n,u))&&f.value:n[u],!l(g?u:d+(A?".":"#")+u,e.forced)&&void 0!==m){if(typeof p==typeof m)continue;c(p,m)}(e.sham||m&&m.sham)&&s(p,"sham",!0),i(n,u,p,e)}}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(7),o=n(82),s=n(4),i=n(30),a=Object.defineProperty;t.f=r?a:function(e,t,n){if(s(e),t=i(t,!0),s(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var r=n(109),o=Object.prototype.toString;function s(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:c,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:l,isStream:function(e){return a(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchPara
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
var r=Object.freeze({});function o(e){return null==e}function s(e){return null!=e}function i(e){return!0===e}function a(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var l=Object.prototype.toString;function u(e){return"[object Object]"===l.call(e)}function m(e){return"[object RegExp]"===l.call(e)}function p(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return s(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function d(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===l?JSON.stringify(e,null,2):String(e)}function g(e){var t=parseFloat(e);return isNaN(t)?e:t}function A(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}A("slot,component",!0);var h=A("key,ref,slot,slot-scope,is");function v(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(e,t){return y.call(e,t)}function E(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,x=E((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),C=E((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),T=/\B([A-Z])/g,k=E((function(e){return e.replace(T,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function j(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function M(e,t){for(var n in t)e[n]=t[n];return e}function P(e){for(var t={},n=0;n<e.length;n++)e[n]&&M(t,e[n]);return t}function _(e,t,n){}var I=function(e,t,n){return!1},N=function(e){return e};function B(e,t){if(e===t)return!0;var n=c(e),r=c(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),s=Array.isArray(t);if(o&&s)return e.length===t.length&&e.every((function(e,n){return B(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||s)return!1;var i=Object.keys(e),a=Object.keys(t);return i.length===a.length&&i.every((function(n){return B(e[n],t[n])}))}catch(e){return!1}}function O(e,t){for(var n=0;n<e.length;n++)if(B(e[n],t))return n;return-1}function L(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var D=["component","directive","filter"],F=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],R={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:I,isReservedAttr:I,isUnknownElement:I,getTagNamespace:_,parsePlatformTagName:N,mustUseProp:I,async:!0,_lifecycleHooks:F},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function z(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var $=new RegExp("[^"+U.source+".$_\\d]");var G,Q="__proto__"in{},H="undefined"!=typeof window,Y="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,W=Y&&WXEnvironment.platform.toLowerCase(),V=H&&window.navigator.userAgent.toLowerCase(),Z=V&&/msie|trident/.test(V),J=V&&V.indexOf("msie 9.0")>0,q=V&&V.indexOf("edge/")>0,X=(V&&V.indexOf("android"),V&&/iphone|ipad|ipod|ios/.test(V)||"ios"===W),K=(V&&/chrome\/\d+/.test(V),V&&/phantomjs/.test(V),V&&V.match(/firefox\/(\d+)/)),ee={}.watch,te=!1;if(H)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){te=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var re=function(){return void 0===G&&(G=!H&&!Y&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),G},oe=H&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function se(e){return"function"==t
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var o=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function s(e){return e&&"[object Function]"==={}.toString.call(e)}function i(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=i(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:c(a(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),m=n&&/MSIE 10/.test(navigator.userAgent);function p(e){return 11===e?u:10===e?m:u||m}function f(e){if(!e)return document.documentElement;for(var t=p(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===i(n,"position")?f(n):n:e?e.ownerDocument.documentElement:document.documentElement}function d(e){return null!==e.parentNode?d(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,s=document.createRange();s.setStart(r,0),s.setEnd(o,0);var i,a,c=s.commonAncestorContainer;if(e!==c&&t!==c||r.contains(o))return"BODY"===(a=(i=c).nodeName)||"HTML"!==a&&f(i.firstElementChild)!==i?f(c):c;var l=d(e);return l.host?g(l.host,t):g(e,d(t).host)}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,s=e.ownerDocument.scrollingElement||o;return s[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=A(t,"top"),o=A(t,"left"),s=n?-1:1;return e.top+=r*s,e.bottom+=r*s,e.left+=o*s,e.right+=o*s,e}function v(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],p(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=p(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var E=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function T(e){return C({},e,{right:e.left+e.width,bottom:e.top+e.height})}function k(e){var t={};try{if(p(10)){t=e.getBoundingClientRect();var n=A(e,"top"),r=A(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?b(e.ownerDocument):{},a=s.width||e.clientWidth||o.width,c=s.height||e.clientHeight||o.height,l=e.offsetWidth-a,u=e.offsetHeight-c;if(l||u){var m=i(e);l-=v(m,"x"),u-
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},15:function(e,t){e.exports=n(205)},17:function(e,t){e.exports=n(80)},18:function(e,t){e.exports=n(51)},19:function(e,t){e.exports=n(101)},2:function(e,t,n){"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function i(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function a(e,t){for(var n={},r=[],o=0;o<e.length;o++){var a=e[o],c=t.base?a[0]+t.base:a[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var m=i(u),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==m?(s[m].references++,s[m].updater(p)):s.push({identifier:u,updater:g(p,t),references:1}),r.push(u)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var s=n.nc;s&&(r.nonce=s)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var i=o(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var l,u=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function m(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var s=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(s,i[t]):e.appendChild(s)}}function p(e,t,n){var r=n.css,o=n.media,s=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,d=0;function g(e,t){var n,r,o;if(t.singleton){var s=d++;n=f||(f=c(t)),r=m.bind(null,n,s,!1),o=m.bind(null,n,s,!0)}else n=c(t),r=p.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=i(n[r]);s[o].references--}for(var c=a(e,t),l=0;l<n.length;l++){var u=i(n[l]);0===s[u].references&&(s[u].updater(),s.splice(u,1))}n=c}}}},28:function(e,t){e.exports=n(216)},3:function(e,t,n){"use strict";function r(e,t,n,r,o,s,i,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var m=l.beforeCreate;l.beforeCreate=m?[].concat(m,c):[c]}return{exports:e,options:l}}n.d(t,"a",(function(){return r}))},38:function(e,t,n){"use strict";n(28),n(15);var r=n(5),o=n.n(r);
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.a={before:function(){this.$slots.default&&""!==this.text.trim()||(o.a.util.warn("".concat(this.$options.name," cannot be empty and requires a meaningful text content"),this),this.$destroy(),this.$el.remove())},beforeUpdate:function(){this.text=this.getText()},data:function(){return{text:this.getText()}},computed:{isLongText:function(){return this.text&&this.text.trim().length>20}},methods:{getText:function(){return this.$slots.default?this.$slots.default[0].text.trim():""}}}},39:function(e,t){e.exports=n(217)},49:function(e,t,n){"use strict";n(39),n(6),n(17),n(18),n(19);var r=n(38),o=(n(15),function(e,t){for(var n=e.$parent;n;){if(n.$options.name===t)return n;n=n.$parent}});t.a={mixins:[r.a],props:{icon:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:""}},computed:{isIconUrl:function(){try{return new URL(this.icon)}catch(e){return!1}}},methods:{onClick:function(e){if(this.$emit("click",e),this.closeAfterClick){var t=o(this,"Actions");t&&t.closeMenu&&t.closeMenu()}}}}},5:function(e,t){e.exports=n(15)},6:function(e,t){e.exports=n(50)},91:function(e,t,n){"use strict";var r=n(0),o=n.n(r),s=n(1),i=n.n(s)()(o.a);i.push([e.i,"li.active[data-v-42b28436]{background-color:var(--color-background-hover)}.action--disabled[data-v-42b28436]{pointer-events:none;opacity:.5}.action--disabled[data-v-42b28436]:hover,.action--disabled[data-v-42b28436]:focus{cursor:default;opacity:.5}.action--disabled *[data-v-42b28436]{opacity:1 !important}.action-button[data-v-42b28436]{display:flex;align-items:flex-start;width:100%;height:auto;margin:0;padding:0;padding-right:14px;cursor:pointer;white-space:nowrap;opacity:.7;color:var(--color-main-text);border:0;border-radius:0;background-color:transparent;box-shadow:none;font-weight:normal;font-size:var(--default-font-size);line-height:44px}.action-button[data-v-42b28436]:hover,.action-button[data-v-42b28436]:focus{opacity:1}.action-button>span[data-v-42b28436]{cursor:pointer;white-space:nowrap}.action-button__icon[data-v-42b28436]{width:44px;height:44px;opacity:1;background-position:14px center;background-size:16px;background-repeat:no-repeat}.action-button .material-design-icon[data-v-42b28436]{width:44px;height:44px;opacity:1}.action-button .material-design-icon .material-design-icon__svg[data-v-42b28436]{vertical-align:middle}.action-button p[data-v-42b28436]{width:220px;padding:7px 0;cursor:pointer;text-align:left;line-height:1.6em;overflow:hidden;text-overflow:ellipsis}.action-button__longtext[data-v-42b28436]{cursor:pointer;white-space:pre-wrap}.action-button__title[data-v-42b28436]{font-weight:bold;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:100%;display:inline-block}\n","",{version:3,sources:["webpack://./../../assets/action.scss","webpack://./../../assets/variables.scss"],names:[],mappings:"AAwBC,2BAEE,8CAA+C,CAC/C,mCAMD,mBAAoB,CACpB,UCQmB,CDVpB,kFAIE,cAAe,CACf,UCKkB,CDVpB,qCAQE,oBAAqB,CACrB,gCAOD,YAAa,CACb,sBAAuB,CAEvB,UAAW,CACX,WAAY,CACZ,QAAS,CACT,SAAU,CACV,kBCtB8C,CDwB9C,cAAe,CACf,kBAAmB,CAEnB,UCjBiB,CDkBjB,4BAA6B,CAC7B,QAAS,CACT,eAAgB,CAChB,4BAA6B,CAC7B,eAAgB,CAEhB,kBAAmB,CACnB,kCAAmC,CACnC,gBC5CmB,CDsBpB,4EA0BE,SC7Ba,CDGf,qCA8BE,cAAe,CACf,kBAAmB,CACnB,sCAGA,UCzDkB,CD0DlB,WC1DkB,CD2DlB,SCxCa,CDyCb,+BAAwC,CACxC,oBCzDa,CD0Db,2BAA4B,CAxC9B,sDA4CE,UClEkB,CDmElB,WCnEkB,CDoElB,SCjDa,CDGf,iFAiDG,qBAAsB,CAjDzB,kCAuDE,WAAY,CACZ,aAA8B,CAE9B,cAAe,CACf,eAAgB,CAEhB,iBAAkB,CAGlB,eAAgB,CAChB,sBAAuB,CACvB,0CAGA,cAAe,CAEf,oBAAqB,CACrB,uCAGA,gBAAiB,CACjB,sBAAuB,CACvB,eAAgB,CAChB,kBAAmB,CACnB,cAAe,CACf,oBAAqB",sourcesContent:["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Marco Ambrosini <marcoambrosini@pm.me>\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
/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
r.VTooltip.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data-v-'.concat("e08a231",'><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'),r.VTooltip.options.defaultHtml=!1,t.default=r.VTooltip},function(e,t,n){"use strict";var r=n(0),o=n.n(r),s=n(1),i=n.n(s)()(o.a);i.push([e.i,".vue-tooltip[data-v-e08a231]{position:absolute;z-index:100000;right:auto;left:auto;display:block;margin:0;margin-top:-3px;padding:10px 0;text-align:left;text-align:start;opacity:0;line-height:1.6;line-break:auto;filter:drop-shadow(0 1px 10px var(--color-box-shadow))}.vue-tooltip[data-v-e08a231][x-placement^='top'] .tooltip-arrow{bottom:0;margin-top:0;margin-bottom:0;border-width:10px 10px 0 10px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='bottom'] .tooltip-arrow{top:0;margin-top:0;margin-bottom:0;border-width:0 10px 10px 10px;border-top-color:transparent;border-right-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='right'] .tooltip-arrow{right:100%;margin-right:0;margin-left:0;border-width:10px 10px 10px 0;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='left'] .tooltip-arrow{left:100%;margin-right:0;margin-left:0;border-width:10px 0 10px 10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.vue-tooltip[data-v-e08a231][aria-hidden='true']{visibility:hidden;transition:opacity .15s, visibility .15s;opacity:0}.vue-tooltip[data-v-e08a231][aria-hidden='false']{visibility:visible;transition:opacity .15s;opacity:1}.vue-tooltip[data-v-e08a231] .tooltip-inner{max-width:350px;padding:5px 8px;text-align:center;color:var(--color-main-text);border-radius:var(--border-radius);background-color:var(--color-main-background)}.vue-tooltip[data-v-e08a231] .tooltip-arrow{position:absolute;z-index:1;width:0;height:0;margin:0;border-style:solid;border-color:var(--color-main-background)}\n","",{version:3,sources:["webpack://./index.scss"],names:[],mappings:"AAeA,6BACC,iBAAkB,CAClB,cAAe,CACf,UAAW,CACX,SAAU,CACV,aAAc,CACd,QAAS,CAET,eAAgB,CAChB,cAAe,CACf,eAAgB,CAChB,gBAAiB,CACjB,SAAU,CACV,eAAgB,CAEhB,eAAgB,CAChB,sDAAuD,CAhBxD,gEAqBG,QAAS,CACT,YAAa,CACb,eAAgB,CAChB,6BA1Be,CA2Bf,8BAA+B,CAC/B,+BAAgC,CAChC,6BAA8B,CA3BjC,mEAkCG,KAAM,CACN,YAAa,CACb,eAAgB,CAChB,6BAvCe,CAwCf,4BAA6B,CAC7B,8BAA+B,CAC/B,6BAA8B,CAxCjC,kEA+CG,UAAW,CACX,cAAe,CACf,aAAc,CACd,6BAAsD,CACtD,4BAA6B,CAC7B,+BAAgC,CAChC,6BAA8B,CArDjC,iEA4DG,SAAU,CACV,cAAe,CACf,aAAc,CACd,6BAjEe,CAkEf,4BAA6B,CAC7B,8BAA+B,CAC/B,+BAAgC,CAlEnC,iDAwEE,iBAAkB,CAClB,wCAAyC,CACzC,SAAU,CA1EZ,kDA6EE,kBAAmB,CACnB,uBAAwB,CACxB,SAAU,CA/EZ,4CAoFE,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,4BAA6B,CAC7B,kCAAmC,CACnC,6CAA8C,CAzFhD,4CA8FE,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CACT,QAAS,CACT,kBAAmB,CACnB,yCAA0C",sourcesContent:["$scope_version:\"e08a231\"; @import 'variables';\n/**\n* @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>\n* @copyright Copyright (c) 2016, Robin Appelman <robin@icewind.nl>\n* @copyright Copyright (c) 2016, Jan-Christoph Borchardt <hey@jancborchardt.net>\n* @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>\n* @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>\n*\n* Bootstrap v3.3.5 (http://getbootstrap.com)\n* Copyright 2011-2015 Twitter, Inc.\n* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n*/\n\n$arrow-width: 10px;\n\n.vue-tooltip[data-v-#{$scope_version}] {\n\tposition: absolute;\n\tz-index: 100000;\n\tright: auto;\n\tleft: auto;\n\tdisplay: block;\n\tmargin: 0;\n\t/* default to top */\n\tmargin-top: -3px;\n\tpadding: 10px 0;\n\ttext-align: left;\n\ttext-align: start;\n\topacity: 0;\n\tline-height: 1.6;\n\n\tline-break: auto;\n\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t// TOP\n\t&[x-placement^='top'] {\n\t\t.tooltip-arrow {\n\t\t\tbottom: 0;\n\t\t\tmargin-top: 0;\n\t\t\tmargin-bottom: 0;\n\t\t\tborder-width: $arrow-width $
/**
* @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>
*
* @author Marco Ambrosini <marcoambrosini@pm.me>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},,,function(e,t,n){"use strict";n(30),n(15),n(98);var r=n(5),o=n.n(r);t.a=function(e,t,n){if(void 0!==e)for(var r=e.length-1;r>=0;r--){var s=e[r],i=!s.componentOptions&&s.tag&&-1===t.indexOf(s.tag),a=!!s.componentOptions&&"string"==typeof s.componentOptions.tag,c=a&&-1===t.indexOf(s.componentOptions.tag);(i||!a||c)&&((i||c)&&o.a.util.warn("".concat(i?s.tag:s.componentOptions.tag," is not allowed inside the ").concat(n.$options.name," component"),n),e.splice(r,1))}}},function(e,t){e.exports=n(129)},function(e,t){e.exports=n(215)},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n.n(r),s=n(1),i=n.n(s),a=n(4),c=n.n(a),l=n(8),u=n(9),m=n(10),p=n(11),f=i()(o.a),d=c()(l.a),g=c()(u.a),A=c()(m.a),h=c()(p.a);f.push([e.i,'@font-face{font-family:"iconfont-vue-e08a231";src:url('+d+");src:url("+d+') format("embedded-opentype"),url('+g+') format("woff"),url('+A+') format("truetype"),url('+h+') format("svg")}.icon[data-v-1b33c33b]{font-style:normal;font-weight:400}.icon.arrow-left-double[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-left[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right-double[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.breadcrumb[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.checkmark[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.close[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.confirm[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.info[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.menu[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.more[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.pause[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.play[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.triangle-s[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-away[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-dnd[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-invisible[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-online[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.action-item[data-v-1b33c33b]{position:relative;display:inline-block}.action-item--single[data-v-1b33c33b]:hover,.action-item--single[data-v-1b33c33b]:focus,.action-item--single[data-v-1b33c33b]:active,.action-item__menutoggle[data-v-1b33c33b]:hover,.action-item__menutoggle[data-v-1b33c33b]:focus,.action-item__menutoggle[data-v-1b33c33b]:active{opacity:1;background-color:rgba(127,127,127,0.25)}.action-item__menutoggle[data-v-1b33c33b]:disabled,.action-item--single[data-v-1b33c33b]:disabled{opacity:.3 !important}.action-item.action-item--open .action-item__menutoggle[data-v-1b33c33b]{opacity:1;background-color:rgba(127,127,127,0.25)}.action-item--single[data-v-1b33c33b],.action-item__menutoggle[data-v-1b33c33b]{box-sizing:border-box;width:auto;min-width:44px;height:44px;margin:0;padding:14px;cursor:pointer;border:none;border-radius:22px;background-color:transparent}.action-item__menutoggle[data-v-1b33c33b]{display:flex;align-items:center;justify-content:center;opacity:.7;font-weight:bold;line-height:16px}.action-item__menutoggle[data-v-1b33c33b] span{width:16px;height:16px;line-height:16px}.action-item__menutoggle[data-v-1b33c33b]:before{content:\'\'}.action-item__menutoggle--default-icon[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";font-style:normal;font-weight:400;content:""}.action-item__menutoggle--default-icon[data-v-1b33c33b]::before{font-size:16px}.action-item__menutoggle--with-title[data-v-1b33c33b]{position:relative;padding-left:44p
/**
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},,,,,,,,,,,,function(e,t,n){"use strict";n(30),n(51),n(31),n(37),n(6),n(46),n(17),n(18),n(19),n(52),n(40),n(15);var r=n(22),o=n(33),s=n(50),i=n(12),a=n(47);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=["ActionButton","ActionCheckbox","ActionInput","ActionLink","ActionRadio","ActionRouter","ActionSeparator","ActionText","ActionTextEditable"],u={name:"Actions",directives:{tooltip:r.default},components:{Popover:a.default,VNodes:{functional:!0,render:function(e,t){return t.props.vnodes}}},props:{open:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},menuTitle:{type:String,default:null},primary:{type:Boolean,default:!1},defaultIcon:{type:String,default:"action-item__menutoggle--default-icon"},ariaLabel:{type:String,default:Object(i.b)("Actions")},placement:{type:String,default:"bottom"},boundariesElement:{type:Element,default:function(){return document.querySelector("body")}},container:{type:String,default:"body"},disabled:{type:Boolean,default:!1}},data:function(){return{actions:[],opened:this.open,focusIndex:0,randomId:"menu-"+Object(o.a)(),children:this.$children}},computed:{hasMultipleActions:function(){return this.actions.length>1},isValidSingleAction:function(){return 1===this.actions.length&&null!==this.firstActionElement},firstActionVNode:function(){return this.actions[0]},firstAction:function(){return this.children[0]?this.children[0]:{}},firstActionBinding:function(){if(this.firstActionVNode&&this.firstActionVNode.componentOptions){var e=this.firstActionVNode.componentOptions.tag;if("ActionLink"===e)return{is:"a",href:this.firstAction.href,target:this.firstAction.target,"aria-label":this.firstAction.ariaLabel};if("ActionRouter"===e)return{is:"router-link",to:this.firstAction.to,exact:this.firstAction.exact,"aria-label":this.firstAction.ariaLabel};if("ActionButton"===e)return{is:"button","aria-label":this.firstAction.ariaLabel}}return null},firstActionEvent:function(){var e,t,n;return null===(e=this.firstActionVNode)||void 0===e||null===(t=e.componentOptions)||void 0===t||null===(n=t.listeners)||void 0===n?void 0:n.click},firstActionEventBinding:function(){return this.firstActionEvent?"click":null},firstActionIconSlot:function(){var e,t;return null===(e=this.firstAction)||void 0===e||null===(t=e.$slots)||void 0===t?void 0:t.icon},firstActionClass:function(){var e=this.firstActionVNode&&this.firstActionVNode.data.staticClass,t=this.firstActionVNode&&this.firstActionVNode.data.class;return"".concat(e," ").concat(t)},iconSlotIsPopulated:function(){return!!this.$slots.icon}},watch:{open:function(e){e!==this.opened&&(this.opened=e)}},beforeMount:function(){this.initActions(),Object(s.a)(this.$slots.default,l,this)},beforeUpdate:function(){this.initActions(),Object(s.a)(this.$slots.default,l,this)},methods:{openMenu:function(e){this.opened||(this.opened=!0,this.$emit("update:open",!0),this.$emit("open"),this.onOpen(e))},closeMenu:function(e){this.opened&&(this.opened=!1,this.$emit("update:open",!1),this.$emit("close"),this.opened=!1,this.focusIndex=0,this.$refs.menuButton.focus())},onOpen:function(e){var t=this;this.$nextTick((function(){t.focusFirstAction(e)}))},onMouseFocusAction:function(e){if(document.activeElement!==e.target){var t=e.target.closest("li");if(t){var n=t.querySelector(".focusable");if(n){var r=function(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.$refs.menu.querySelectorAll(".focusable")).indexOf(n);r>-1&&(this.focusIndex=r,this.focusAction())
/**
* @copyright 2020, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/function h(){return(h=A(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(d.generateUrl)("/settings/api/personal/webauthn/registration"),e.next=3,f.a.get(t);case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,t){return y.apply(this,arguments)}function y(){return(y=A(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(d.generateUrl)("/settings/api/personal/webauthn/registration"),e.next=3,f.a.post(r,{name:t,data:n});case 3:return o=e.sent,e.abrupt("return",o.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return E.apply(this,arguments)}function E(){return(E=A(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(d.generateUrl)("/settings/api/personal/webauthn/registration/".concat(t)),e.next=3,f.a.delete(n);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e,t,n,r,o,s,i){try{var a=e[s](i),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function x(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){return function(t){return m.debug(e),t}},k=Object.freeze({READY:1,REGISTRATION:2,NAMING:3,PERSIST:4}),S={name:"AddDevice",props:{httpWarning:Boolean,isHttps:{type:Boolean,default:!1}},data:function(){return{name:"",credential:{},RegistrationSteps:k,step:k.READY}},methods:{arrayToBase64String:function(e){return btoa(String.fromCharCode.apply(String,x(e)))},start:function(){var e=this;return this.step=k.REGISTRATION,console.debug("Starting WebAuthn registration"),a()().then(this.getRegistrationData).then(this.register.bind(this)).then((function(){e.step=k.NAMING})).catch((function(t){console.error(t.name,t.message),e.step=k.READY}))},getRegistrationData:function(){console.debug("Fetching webauthn registration data");return function(){return h.apply(this,arguments)}().then((function(e){return console.debug(e),e.challenge=Uint8Array.from(function(e){var t=(e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(t){if(1===t)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");e+=new Array(5-t).join("=")}return window.atob(e)}(e.challenge),(function(e){return e.charCodeAt(0)})),e.user.id=Uint8Array.from(e.user.id,(function(e){return e.charCodeAt(0)})),e})).catch((function(e){throw console.error("Error getting webauthn registration data from server",e),new Error(t("settings","Server error while trying to add WebAuthn device"))}))},register:function(e){var t=this;return console.debug("starting webauthn registration"),navigator.credentials.create({publicKey:e}).then((function(e){t.credential={id:e.id,type:e.type,rawId:t.arrayToBase64String(new Uint8Array(e.rawId)),response:{clientDataJSON:t.arrayToBase64String(new Uint8Array(e.response.clientDataJSON)),attestationObject:t.arrayToBase64String(new Uint8Array(e.response.attestationObject))}}}))},submit:function(){var e=this;return this.step=k.PERSIST,a()().then(T("confirmed password")).then(this.saveRegistrationData).then(T("registration data saved")).then((function(){return e.reset()})).then(T("app reset")).catch(conso
/**
* @copyright 2020, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
r.nc=btoa(OC.requestToken),o.default.prototype.t=t,new(o.default.extend(Q))({propsData:{initialDevices:Object(s.loadState)("settings","webauthn-devices"),isHttps:"https:"===window.location.protocol,hasPublicKeyCredential:void 0!==window.PublicKeyCredential}}).$mount("#security-webauthn")}]);
//# sourceMappingURL=vue-settings-personal-webauthn.js.map?v=0bd769b8464e54e10922