From 6e52a19b96c62296227be08021c7d69afda776cd Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 10 Jun 2024 16:08:50 +0200 Subject: [PATCH] fix(settings): Use axios directly for health check to preven URL sanitizing When using Apache with `DirectorySlash` it will respond with 301 and the URL with trailing slash. But when using traefik as the reverse proxy it can not rewrite redirects, this leads to the problem that the Apache response is using HTTP in the redirect but the real server (traefik) is only listening on HTTPS. Signed-off-by: Ferdinand Thiessen Signed-off-by: nextcloud-command --- apps/settings/src/store/apps.js | 5 +++-- dist/settings-vue-settings-apps-users-management.js | 4 ++-- dist/settings-vue-settings-apps-users-management.js.map | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/settings/src/store/apps.js b/apps/settings/src/store/apps.js index c6ca84562b8c7..7fbd7a2d524d0 100644 --- a/apps/settings/src/store/apps.js +++ b/apps/settings/src/store/apps.js @@ -24,6 +24,7 @@ import api from './api.js' import Vue from 'vue' +import axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' import { showError, showInfo } from '@nextcloud/dialogs' @@ -186,13 +187,13 @@ const actions = { }) // check for server health - return api.get(generateUrl('apps/files/')) + return axios.get(generateUrl('apps/files/')) .then(() => { if (response.data.update_required) { showInfo( t( 'settings', - 'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.' + 'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.', ), { onClick: () => window.location.reload(), diff --git a/dist/settings-vue-settings-apps-users-management.js b/dist/settings-vue-settings-apps-users-management.js index b554c243cfdfc..f5983f11323ba 100644 --- a/dist/settings-vue-settings-apps-users-management.js +++ b/dist/settings-vue-settings-apps-users-management.js @@ -1,3 +1,3 @@ /*! For license information please see settings-vue-settings-apps-users-management.js.LICENSE.txt */ -(()=>{var e,r,o,i={92973:(t,e,r)=>{"use strict";r.d(e,{l:()=>o});var n=r(53334);const o=Object.freeze({installed:(0,n.Tl)("settings","Your apps"),enabled:(0,n.Tl)("settings","Active apps"),disabled:(0,n.Tl)("settings","Disabled apps"),updates:(0,n.Tl)("settings","Updates"),"app-bundles":(0,n.Tl)("settings","App bundles"),featured:(0,n.Tl)("settings","Featured apps"),supported:(0,n.Tl)("settings","Supported apps")})},58692:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(53529).YK)().setApp("settings").detectUser().build()},32843:(e,r,o)=>{"use strict";var i=o(85471),s=o(80284),a=o(58723);const u={name:"App",beforeMount(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}},c=(0,o(14486).A)(u,(function(){return(0,this._self._c)("router-view")}),[],!1,null,null,null).exports;var p=o(96763);function d(t,e){for(var r in e)t[r]=e[r];return t}var l=/[!'()*]/g,h=function(t){return"%"+t.charCodeAt(0).toString(16)},f=/%2C/g,m=function(t){return encodeURIComponent(t).replace(l,h).replace(f,",")};function g(t){try{return decodeURIComponent(t)}catch(t){}return t}var y=function(t){return null==t||"object"==typeof t?t:String(t)};function v(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var r=t.replace(/\+/g," ").split("="),n=g(r.shift()),o=r.length>0?g(r.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]})),e):e}function b(t){var e=t?Object.keys(t).map((function(e){var r=t[e];if(void 0===r)return"";if(null===r)return m(e);if(Array.isArray(r)){var n=[];return r.forEach((function(t){void 0!==t&&(null===t?n.push(m(e)):n.push(m(e)+"="+m(t)))})),n.join("&")}return m(e)+"="+m(r)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var w=/\/?$/;function A(t,e,r,n){var o=n&&n.options.stringifyQuery,i=e.query||{};try{i=E(i)}catch(t){}var s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:P(e,o),matched:t?_(t):[]};return r&&(s.redirectedFrom=P(r,o)),Object.freeze(s)}function E(t){if(Array.isArray(t))return t.map(E);if(t&&"object"==typeof t){var e={};for(var r in t)e[r]=E(t[r]);return e}return t}var x=A(null,{path:"/"});function _(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function P(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var o=t.hash;return void 0===o&&(o=""),(r||"/")+(e||b)(n)+o}function I(t,e,r){return e===x?t===e:!!e&&(t.path&&e.path?t.path.replace(w,"")===e.path.replace(w,"")&&(r||t.hash===e.hash&&C(t.query,e.query)):!(!t.name||!e.name)&&t.name===e.name&&(r||t.hash===e.hash&&C(t.query,e.query)&&C(t.params,e.params)))}function C(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),n=Object.keys(e).sort();return r.length===n.length&&r.every((function(r,o){var i=t[r];if(n[o]!==r)return!1;var s=e[r];return null==i||null==s?i===s:"object"==typeof i&&"object"==typeof s?C(i,s):String(i)===String(s)}))}function L(t){for(var e=0;e=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}(o.path||""),c=e&&e.path||"/",p=u.path?N(u.path,c,r||o.append):c,l=function(t,e,r){void 0===e&&(e={});var n,o=r||v;try{n=o(t||"")}catch(t){n={}}for(var i in e){var s=e[i];n[i]=Array.isArray(s)?s.map(y):y(s)}return n}(u.query,o.query,n&&n.options.parseQuery),h=o.hash||u.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:l,hash:h}}var Y,Q=function(){},X={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,r=this.$router,n=this.$route,o=r.resolve(this.to,n,this.append),i=o.location,s=o.route,a=o.href,u={},c=r.options.linkActiveClass,p=r.options.linkExactActiveClass,l=null==c?"router-link-active":c,h=null==p?"router-link-exact-active":p,f=null==this.activeClass?l:this.activeClass,m=null==this.exactActiveClass?h:this.exactActiveClass,g=s.redirectedFrom?A(null,W(s.redirectedFrom),null,r):s;u[m]=I(n,g,this.exactPath),u[f]=this.exact||this.exactPath?u[m]:function(t,e){return 0===t.path.replace(w,"/").indexOf(e.path.replace(w,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var r in e)if(!(r in t))return!1;return!0}(t.query,e.query)}(n,g);var y=u[m]?this.ariaCurrentValue:null,v=function(t){Z(t)&&(e.replace?r.replace(i,Q):r.push(i,Q))},b={click:Z};Array.isArray(this.event)?this.event.forEach((function(t){b[t]=v})):b[this.event]=v;var E={class:u},x=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:a,route:s,navigate:v,isActive:u[f],isExactActive:u[m]});if(x){if(1===x.length)return x[0];if(x.length>1||!x.length)return 0===x.length?t():t("span",{},x)}if("a"===this.tag)E.on=b,E.attrs={href:a,"aria-current":y};else{var _=tt(this.$slots.default);if(_){_.isStatic=!1;var P=_.data=d({},_.data);for(var C in P.on=P.on||{},P.on){var L=P.on[C];C in b&&(P.on[C]=Array.isArray(L)?L:[L])}for(var R in b)R in P.on?P.on[R].push(b[R]):P.on[R]=v;var O=_.data.attrs=d({},_.data.attrs);O.href=a,O["aria-current"]=y}else E.on=b}return t(this.tag,E,this.$slots.default)}};function Z(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function tt(t){if(t)for(var e,r=0;r-1&&(u.params[l]=r.params[l]);return u.path=J(p.path,u.params),a(p,u,s)}if(u.path){u.params={};for(var h=0;h-1}function Nt(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function Ut(t,e,r){var n=function(o){o>=t.length?r():t[o]?e(t[o],(function(){n(o+1)})):n(o+1)};n(0)}function Tt(t,e){return kt(t.map((function(t){return Object.keys(t.components).map((function(r){return e(t.components[r],t.instances[r],t,r)}))})))}function kt(t){return Array.prototype.concat.apply([],t)}var jt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function St(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var Ft=function(t,e){this.router=t,this.base=function(t){if(!t)if(et){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}(e),this.current=x,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function $t(t,e,r,n){var o=Tt(t,(function(t,n,o,i){var s=function(t,e){return"function"!=typeof t&&(t=Y.extend(t)),t.options[e]}(t,e);if(s)return Array.isArray(s)?s.map((function(t){return r(t,n,o,i)})):r(s,n,o,i)}));return kt(n?o.reverse():o)}function Dt(t,e){if(e)return function(){return t.apply(e,arguments)}}Ft.prototype.listen=function(t){this.cb=t},Ft.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Ft.prototype.onError=function(t){this.errorCbs.push(t)},Ft.prototype.transitionTo=function(t,e,r){var n,o=this;try{n=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(n,(function(){o.updateRoute(n),e&&e(n),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(n,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(n)})))}),(function(t){r&&r(t),t&&!o.ready&&(Nt(t,It.redirected)&&i===x||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Ft.prototype.confirmTransition=function(t,e,r){var n=this,o=this.current;this.pending=t;var i,s,a=function(t){!Nt(t)&&Ot(t)&&(n.errorCbs.length?n.errorCbs.forEach((function(e){e(t)})):p.error(t)),r&&r(t)},u=t.matched.length-1,c=o.matched.length-1;if(I(t,o)&&u===c&&t.matched[u]===o.matched[c])return this.ensureURL(),t.hash&&ft(this.router,o,t,!1),a(((s=Lt(i=o,t,It.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",s));var d,l=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r0)){var e=this.router,r=e.options.scrollBehavior,n=xt&&r;n&&this.listeners.push(ht());var o=function(){var r=t.current,o=qt(t.base);t.current===x&&o===t._startLocation||t.transitionTo(o,(function(t){n&&ft(e,t,r,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){_t(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Pt(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.ensureURL=function(t){if(qt(this.base)!==this.current.fullPath){var e=U(this.base+this.current.fullPath);t?_t(e):Pt(e)}},e.prototype.getCurrentLocation=function(){return qt(this.base)},e}(Ft);function qt(t){var e=window.location.pathname,r=e.toLowerCase(),n=t.toLowerCase();return!t||r!==n&&0!==r.indexOf(U(n+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Mt=function(t){function e(e,r,n){t.call(this,e,r),n&&function(t){var e=qt(t);if(!/^\/#/.test(e))return window.location.replace(U(t+"/#"+e)),!0}(this.base)||Gt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,r=xt&&e;r&&this.listeners.push(ht());var n=function(){var e=t.current;Gt()&&t.transitionTo(Vt(),(function(n){r&&ft(t.router,n,e,!0),xt||zt(n.fullPath)}))},o=xt?"popstate":"hashchange";window.addEventListener(o,n),this.listeners.push((function(){window.removeEventListener(o,n)}))}},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Ht(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Vt()!==e&&(t?Ht(e):zt(e))},e.prototype.getCurrentLocation=function(){return Vt()},e}(Ft);function Gt(){var t=Vt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function Vt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Kt(t){var e=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}function Ht(t){xt?_t(Kt(t)):window.location.hash=t}function zt(t){xt?Pt(Kt(t)):window.location.replace(Kt(t))}var Jt=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)}),r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,(function(){var t=e.current;e.index=r,e.updateRoute(n),e.router.afterHooks.forEach((function(e){e&&e(n,t)}))}),(function(t){Nt(t,It.duplicated)&&(e.index=r)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Ft),Wt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=it(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xt&&!1!==t.fallback,this.fallback&&(e="hash"),et||(e="abstract"),this.mode=e,e){case"history":this.history=new Bt(this,t.base);break;case"hash":this.history=new Mt(this,t.base,this.fallback);break;case"abstract":this.history=new Jt(this,t.base)}},Yt={currentRoute:{configurable:!0}};Wt.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},Yt.currentRoute.get=function(){return this.history&&this.history.current},Wt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var r=e.apps.indexOf(t);r>-1&&e.apps.splice(r,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var r=this.history;if(r instanceof Bt||r instanceof Mt){var n=function(t){r.setupListeners(),function(t){var n=r.current,o=e.options.scrollBehavior;xt&&o&&"fullPath"in t&&ft(e,t,n,!1)}(t)};r.transitionTo(r.getCurrentLocation(),n,n)}r.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Wt.prototype.beforeEach=function(t){return Xt(this.beforeHooks,t)},Wt.prototype.beforeResolve=function(t){return Xt(this.resolveHooks,t)},Wt.prototype.afterEach=function(t){return Xt(this.afterHooks,t)},Wt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Wt.prototype.onError=function(t){this.history.onError(t)},Wt.prototype.push=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.push(t,e,r)}));this.history.push(t,e,r)},Wt.prototype.replace=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.replace(t,e,r)}));this.history.replace(t,e,r)},Wt.prototype.go=function(t){this.history.go(t)},Wt.prototype.back=function(){this.go(-1)},Wt.prototype.forward=function(){this.go(1)},Wt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Wt.prototype.resolve=function(t,e,r){var n=W(t,e=e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath,s=function(t,e,r){var n="hash"===r?"#"+e:e;return t?U(t+"/"+n):n}(this.history.base,i,this.mode);return{location:n,route:o,href:s,normalizedTo:n,resolved:o}},Wt.prototype.getRoutes=function(){return this.matcher.getRoutes()},Wt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Wt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Wt.prototype,Yt);var Qt=Wt;function Xt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}Wt.install=function t(e){if(!t.installed||Y!==e){t.installed=!0,Y=e;var r=function(t){return void 0!==t},n=function(t,e){var n=t.$options._parentVnode;r(n)&&r(n=n.data)&&r(n=n.registerRouteInstance)&&n(t,e)};e.mixin({beforeCreate:function(){r(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",R),e.component("RouterLink",X);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Wt.version="3.6.5",Wt.isNavigationFailure=Nt,Wt.NavigationFailureType=It,Wt.START_LOCATION=x,et&&window.Vue&&window.Vue.use(Wt);var Zt=o(99498),te=o(92973),ee=o(95353),re=o(26287),ne=o(36124);o(51257);const oe=function(t){return t.replace(/\/$/,"")},ie=()=>(0,ne.C)(),se=(t,e)=>re.A.get(oe(t),e),ae=(t,e)=>re.A.post(oe(t),e),ue=(t,e)=>re.A.put(oe(t),e),ce=(t,e)=>re.A.delete(oe(t),{params:e});var pe=o(87485),de=o(58692),le=o(35810),he=o(96763);const fe=function(t,e){return 1===e?t.sort(((t,e)=>t.usercount-t.disabledt.name.localeCompare(e.name)))},me={id:"",name:"",usercount:0,disabled:0,canAdd:!0,canRemove:!0},ge={appendUsers(t,e){const r=t.users.map((t=>{let{id:e}=t;return e})),n=Object.values(e).filter((t=>{let{id:e}=t;return!r.includes(e)})),o=t.users.concat(n);t.usersOffset+=t.usersLimit,t.users=o},updateDisabledUsers(t,e){t.disabledUsersOffset+=t.disabledUsersLimit},setPasswordPolicyMinLength(t,e){t.minPasswordLength=""!==e?e:0},initGroups(t,e){let{groups:r,orderBy:n,userCount:o}=e;t.groups=r.map((t=>Object.assign({},me,t))),t.orderBy=n,t.userCount=o,t.groups=fe(t.groups,t.orderBy)},addGroup(t,e){let{gid:r,displayName:n}=e;try{if(void 0!==t.groups.find((t=>t.id===r)))return;const e=Object.assign({},me,{id:r,name:n});t.groups.unshift(e),t.groups=fe(t.groups,t.orderBy)}catch(t){he.error("Can't create group",t)}},renameGroup(t,e){let{gid:r,displayName:n}=e;const o=t.groups.findIndex((t=>t.id===r));if(o>=0){const e=t.groups[o];e.name=n,t.groups.splice(o,1,e),t.groups=fe(t.groups,t.orderBy)}},removeGroup(t,e){const r=t.groups.findIndex((t=>t.id===e));r>=0&&t.groups.splice(r,1)},addUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount++,i.groups.push(n),t.groups=fe(t.groups,t.orderBy)},removeUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount--;const s=i.groups;s.splice(s.indexOf(n),1),t.groups=fe(t.groups,t.orderBy)},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;t.users.find((t=>t.id===r)).subadmin.push(n)},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;const o=t.users.find((t=>t.id===r)).subadmin;o.splice(o.indexOf(n),1)},deleteUser(t,e){const r=t.users.findIndex((t=>t.id===e));this.commit("updateUserCounts",{user:t.users[r],actionType:"remove"}),t.users.splice(r,1)},addUserData(t,e){const r=e.data.ocs.data;t.users.unshift(r),this.commit("updateUserCounts",{user:r,actionType:"create"})},enableDisableUser(t,e){let{userid:r,enabled:n}=e;const o=t.users.find((t=>t.id===r));o.enabled=n,this.commit("updateUserCounts",{user:o,actionType:n?"enable":"disable"})},updateUserCounts(t,e){let{user:r,actionType:n}=e;if(0===t.userCount)return;const o=t.groups.find((t=>"disabled"===t.id));switch(n){case"enable":case"disable":o.usercount+=r.enabled?-1:1,t.userCount+=r.enabled?1:-1,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled+=r.enabled?-1:1}));break;case"create":t.userCount++,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).usercount++}));break;case"remove":r.enabled?(t.userCount--,r.groups.forEach((e=>{const r=t.groups.find((t=>t.id===e));r?r.usercount--:he.warn("User group "+e+" does not exist during user removal")}))):(o.usercount--,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled--})));break;default:de.A.error("Unknown action type in updateUserCounts: '".concat(n,"'"))}},setUserData(t,e){let{userid:r,key:n,value:o}=e;if("quota"===n){const e=(0,le.lT)(o,!0);t.users.find((t=>t.id===r))[n][n]=null!==e?e:o}else t.users.find((t=>t.id===r))[n]=o},resetUsers(t){t.users=[],t.usersOffset=0,t.disabledUsersOffset=0},setShowConfig(t,e){let{key:r,value:n}=e;t.showConfig[r]=n}},ye=re.A.CancelToken;let ve=null;const be={state:{users:[],groups:[],orderBy:1,minPasswordLength:0,usersOffset:0,usersLimit:25,disabledUsersOffset:0,disabledUsersLimit:25,userCount:0,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}},mutations:ge,getters:{getUsers:t=>t.users,getGroups:t=>t.groups,getSubadminGroups:t=>t.groups.filter((t=>"admin"!==t.id&&"disabled"!==t.id)),getPasswordPolicyMinLength:t=>t.minPasswordLength,getUsersOffset:t=>t.usersOffset,getUsersLimit:t=>t.usersLimit,getDisabledUsersOffset:t=>t.disabledUsersOffset,getDisabledUsersLimit:t=>t.disabledUsersLimit,getUserCount:t=>t.userCount,getShowConfig:t=>t.showConfig},actions:{searchUsers(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},getUser:(t,e)=>se((0,Zt.KT)("cloud/users/".concat(e))).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})),getUsers(t,e){let{offset:r,limit:n,search:o,group:i}=e;return ve&&ve.cancel("Operation canceled by another search request."),ve=ye.source(),o="string"==typeof o?o:"",o=o.replace(/in:[^\s]+/g,"").trim(),i="string"==typeof i?i:"",""!==i?se((0,Zt.KT)("cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}",{group:encodeURIComponent(i),offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})):se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},async getDisabledUsers(t,e){let{offset:r,limit:n,search:o}=e;const i=(0,Zt.KT)("cloud/users/disabled?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o});try{const e=await se(i),r=Object.keys(e.data.ocs.data.users).length;return r>0&&(t.commit("appendUsers",e.data.ocs.data.users),t.commit("updateDisabledUsers",e.data.ocs.data.users)),r}catch(e){t.commit("API_FAILURE",e)}},getGroups(t,e){let{offset:r,limit:n,search:o}=e;o="string"==typeof o?o:"";const i=-1===n?"":"&limit=".concat(n);return se((0,Zt.KT)("cloud/groups?offset={offset}&search={search}",{offset:r,search:o})+i).then((e=>Object.keys(e.data.ocs.data.groups).length>0&&(e.data.ocs.data.groups.forEach((function(e){t.commit("addGroup",{gid:e,displayName:e})})),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromList(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).then((e=>Object.keys(e.data.ocs.data.users).length>0&&(t.commit("appendUsers",e.data.ocs.data.users),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromGroup(t,e){let{groupid:r,offset:n,limit:o}=e;return se((0,Zt.KT)("cloud/users/{groupId}/details?offset={offset}&limit={limit}",{groupId:encodeURIComponent(r),offset:n,limit:o})).then((e=>t.commit("getUsersFromList",e.data.ocs.data.users))).catch((e=>t.commit("API_FAILURE",e)))},getPasswordPolicyMinLength:t=>!(!(0,pe.F)().password_policy||!(0,pe.F)().password_policy.minLength)&&(t.commit("setPasswordPolicyMinLength",(0,pe.F)().password_policy.minLength),(0,pe.F)().password_policy.minLength),addGroup:(t,e)=>ie().then((r=>ae((0,Zt.KT)("cloud/groups"),{groupid:e}).then((r=>(t.commit("addGroup",{gid:e,displayName:e}),{gid:e,displayName:e}))).catch((t=>{throw t})))).catch((r=>{throw t.commit("API_FAILURE",{gid:e,error:r}),r})),renameGroup(t,e){let{groupid:r,displayName:n}=e;return ie().then((e=>ue((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(r)}),{key:"displayname",value:n}).then((e=>(t.commit("renameGroup",{gid:r,displayName:n}),{groupid:r,displayName:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{groupid:r,error:e}),e}))},removeGroup:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(e)})).then((r=>t.commit("removeGroup",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{gid:e,error:r}))),addUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("addUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{userid:r,error:e}),e}))},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("addUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},wipeUserDevices:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/wipe",{userid:e})).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),deleteUser:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((r=>t.commit("deleteUser",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),addUser(t,e){let{commit:r,dispatch:n}=t,{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}=e;return ie().then((t=>ae((0,Zt.KT)("cloud/users"),{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}).then((t=>n("addUserData",o||t.data.ocs.data.id))).catch((t=>{throw t})))).catch((t=>{throw r("API_FAILURE",{userid:o,error:t}),t}))},addUserData:(t,e)=>ie().then((r=>se((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((e=>t.commit("addUserData",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),enableDisableUser(t,e){let{userid:r,enabled:n=!0}=e;const o=n?"enable":"disable";return ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}/{userStatus}",{userid:r,userStatus:o})).then((e=>t.commit("enableDisableUser",{userid:r,enabled:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},setUserData(t,e){let{userid:r,key:n,value:o}=e;const i=["email","displayname","manager"];return-1!==["email","language","quota","displayname","password","manager"].indexOf(n)&&"string"==typeof o&&(-1===i.indexOf(n)&&o.length>0||-1!==i.indexOf(n))?ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}",{userid:r}),{key:n,value:o}).then((e=>t.commit("setUserData",{userid:r,key:n,value:o}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e}))):Promise.reject(new Error("Invalid request data"))},sendWelcomeMail:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/welcome",{userid:e})).then((t=>!0)).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r})))}};var we=o(85168),Ae=o(96763);const Ee={APPS_API_FAILURE(e,r){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+r.error.response.data.data.message,{isHTML:!0}),Ae.error(e,r)},initCategories(t,e){let{categories:r,updateCount:n}=e;t.categories=r,t.updateCount=n},updateCategories(t,e){t.gettingCategoriesPromise=e},setUpdateCount(t,e){t.updateCount=e},addCategory(t,e){t.categories.push(e)},appendCategories(t,e){t.categories=e},setAllApps(t,e){t.apps=e},setError(t,e){let{appId:r,error:n}=e;Array.isArray(r)||(r=[r]),r.forEach((e=>{t.apps.find((t=>t.id===e)).error=n}))},clearError(t,e){let{appId:r,error:n}=e;t.apps.find((t=>t.id===r)).error=null},enableApp(t,e){let{appId:r,groups:n}=e;const o=t.apps.find((t=>t.id===r));o.active=!0,o.groups=n},disableApp(t,e){const r=t.apps.find((t=>t.id===e));r.active=!1,r.groups=[],r.removable&&(r.canUnInstall=!0)},uninstallApp(t,e){t.apps.find((t=>t.id===e)).active=!1,t.apps.find((t=>t.id===e)).groups=[],t.apps.find((t=>t.id===e)).needsDownload=!0,t.apps.find((t=>t.id===e)).installed=!1,t.apps.find((t=>t.id===e)).canUnInstall=!1,t.apps.find((t=>t.id===e)).canInstall=!0},updateApp(t,e){const r=t.apps.find((t=>t.id===e)),n=r.update;r.update=null,r.version=n,t.updateCount--},resetApps(t){t.apps=[]},reset(t){t.apps=[],t.categories=[],t.updateCount=0},startLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!0)})):i.Ay.set(t.loading,e,!0)},stopLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!1)})):i.Ay.set(t.loading,e,!1)}},xe={enableApp(e,r){let n,{appId:o,groups:i}=r;return n=Array.isArray(o)?o:[o],ie().then((r=>(e.commit("startLoading",n),e.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/enable"),{appIds:n,groups:i}).then((r=>(e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((t=>{e.commit("enableApp",{appId:t,groups:i})})),se((0,Zt.Jv)("apps/files/")).then((()=>{r.data.update_required&&((0,we.cf)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:()=>window.location.reload(),close:!1}),setTimeout((function(){location.reload()}),5e3))})).catch((()=>{Array.isArray(o)||((0,we.Qg)(t("settings","Error: This app cannot be enabled because it makes the server unstable")),e.commit("setError",{appId:n,error:t("settings","Error: This app cannot be enabled because it makes the server unstable")}),e.dispatch("disableApp",{appId:o}))}))))).catch((t=>{e.commit("stopLoading",n),e.commit("stopLoading","install"),e.commit("setError",{appId:n,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:o,error:t})}))))).catch((t=>e.commit("API_FAILURE",{appId:o,error:t})))},forceEnableApp(t,e){let r,{appId:n,groups:o}=e;return r=Array.isArray(n)?n:[n],ie().then((()=>(t.commit("startLoading",r),t.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/force"),{appId:n}).then((t=>{location.reload()})).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("setError",{appId:r,error:e.response.data.data.message}),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},disableApp(t,e){let r,{appId:n}=e;return r=Array.isArray(n)?n:[n],ie().then((e=>(t.commit("startLoading",r),ae((0,Zt.Jv)("settings/apps/disable"),{appIds:r}).then((e=>(t.commit("stopLoading",r),r.forEach((e=>{t.commit("disableApp",e)})),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},uninstallApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),se((0,Zt.Jv)("settings/apps/uninstall/".concat(r))).then((e=>(t.commit("stopLoading",r),t.commit("uninstallApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},updateApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),t.commit("startLoading","install"),se((0,Zt.Jv)("settings/apps/update/".concat(r))).then((e=>(t.commit("stopLoading","install"),t.commit("stopLoading",r),t.commit("updateApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},getAllApps:t=>(t.commit("startLoading","list"),se((0,Zt.Jv)("settings/apps/list")).then((e=>(t.commit("setAllApps",e.data.apps),t.commit("stopLoading","list"),!0))).catch((e=>t.commit("API_FAILURE",e)))),async getCategories(t){let{shouldRefetchCategories:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e||!t.state.gettingCategoriesPromise){t.commit("startLoading","categories");try{const e=se((0,Zt.Jv)("settings/apps/categories"));t.commit("updateCategories",e);const r=await e;return r.data.length>0?(t.commit("appendCategories",r.data),t.commit("stopLoading","categories"),!0):(t.commit("stopLoading","categories"),!1)}catch(e){t.commit("API_FAILURE",e)}}return t.state.gettingCategoriesPromise}},_e={state:{apps:[],categories:[],updateCount:0,loading:{},loadingList:!1,gettingCategoriesPromise:null},mutations:Ee,getters:{loading:t=>function(e){return t.loading[e]},getCategories:t=>t.categories,getAllApps:t=>t.apps,getUpdateCount:t=>t.updateCount,getCategoryById:t=>e=>t.categories.find((t=>t.id===e))},actions:xe},Pe={state:{serverData:{}},mutations:{setServerData(t,e){t.serverData=e}},getters:{getServerData:t=>t.serverData},actions:{}},Ie={state:{},mutations:{},getters:{},actions:{setAppConfig(t,e){let{app:r,key:n,value:o}=e;return ie().then((t=>ae((0,Zt.KT)("apps/provisioning_api/api/v1/config/apps/{app}/{key}",{app:r,key:n}),{value:o}).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{app:r,key:n,value:o,error:e})))}}};var Ce=o(96763);i.Ay.use(ee.Ay);const Le={API_FAILURE(e,r){try{const e=r.error.response.data.ocs.meta.message;(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+e,{isHTML:!0})}catch(e){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed."))}Ce.error(e,r)}},Re=new ee.il({modules:{users:be,apps:_e,settings:Pe,oc:Ie},strict:!1,mutations:Le});o(32981);const Oe=()=>Promise.all([o.e(4208),o.e(3239)]).then(o.bind(o,84380)),Ne=()=>Promise.all([o.e(4208),o.e(4529)]).then(o.bind(o,86470));i.Ay.use(Qt);const Ue=document.title,Te=new Qt({mode:"history",base:(0,Zt.Jv)(""),linkActiveClass:"active",routes:[{path:"/:index(index.php/)?settings/users",component:Oe,props:!0,name:"users",meta:{title:()=>t("settings","Active users")},children:[{path:":selectedGroup",name:"group",meta:{title:e=>"admin"===e.params.selectedGroup?t("settings","Admins"):"disabled"===e.params.selectedGroup?t("settings","Disabled users"):decodeURIComponent(e.params.selectedGroup)},component:Oe}]},{path:"/:index(index.php/)?settings/apps",component:Ne,props:!0,name:"apps",meta:{title:()=>t("settings","Your apps")},children:[{path:":category",name:"apps-category",meta:{title:async e=>{if("apps"===e.name)return t("settings","Your apps");if(te.l[e.params.category])return te.l[e.params.category];await Re.dispatch("getCategories");const r=Re.getters.getCategoryById(e.params.category);return r.displayName?r.displayName:void 0}},component:Ne,children:[{path:":id",name:"apps-details",component:Ne}]}]}]});Te.afterEach((async t=>{var e,r;const n=await(null===(e=(r=t.meta).title)||void 0===e?void 0:e.call(r,t));n?(document.title="".concat(n," - ").concat(Ue),function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}(n)):document.title=Ue}));const ke=Te;i.Ay.use(s.Ay,{defaultHtml:!1}),(0,a.O)(Re,ke),o.nc=btoa(OC.requestToken),i.Ay.prototype.t=t,i.Ay.prototype.n=n,i.Ay.prototype.OC=OC,i.Ay.prototype.OCA=OCA,i.Ay.prototype.oc_userconfig=oc_userconfig,new i.Ay({router:ke,store:Re,render:t=>t(c)}).$mount("#content")},58723:(t,e)=>{function r(t,e){var n={name:t.name,path:t.path,hash:t.hash,query:t.query,params:t.params,fullPath:t.fullPath,meta:t.meta};return e&&(n.from=r(e)),Object.freeze(n)}e.O=function(t,e,n){var o=(n||{}).moduleName||"route";t.registerModule(o,{namespaced:!0,state:r(e.currentRoute),mutations:{ROUTE_CHANGED:function(e,n){t.state[o]=r(n.to,n.from)}}});var i,s=!1,a=t.watch((function(t){return t[o]}),(function(t){var r=t.fullPath;r!==i&&(null!=i&&(s=!0,e.push(t)),i=r)}),{sync:!0}),u=e.afterEach((function(e,r){s?s=!1:(i=e.fullPath,t.commit(o+"/ROUTE_CHANGED",{to:e,from:r}))}));return function(){null!=u&&u(),null!=a&&a(),t.unregisterModule(o)}}},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>N,H4:()=>R,PY:()=>L,Q$:()=>O,R3:()=>b,VL:()=>v,lJ:()=>C,lT:()=>j,pt:()=>w,v7:()=>k});var n=r(21777),o=r(84697),i=r(43627),s=r(71089),a=r(66656),u=r(44719),c=r(36117),p=r(2568);const d=null===(l=(0,n.HW)())?(0,o.YK)().setApp("files").build():(0,o.YK)().setApp("files").setUid(l.uid).build();var l,h=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(h||{});const f=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],m={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},g=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...f]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},y=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...m}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},v=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t`},b=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,n.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const A=function(t,e){return null!==t.match(e)},E=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=h.NONE&&t.permissions<=h.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&A(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,i.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class _{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(_.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,r)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,r),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,r)=>this.readonlyAttributes.includes(e)?(d.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,r)};constructor(t,e){E(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,s.O0)(this.source.slice(t.length))}get basename(){return(0,i.basename)(this.source)}get extension(){return(0,i.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return(0,i.dirname)(t.slice(e+r.length)||"/")}const t=new URL(this.source);return(0,i.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:h.NONE:h.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return A(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,i.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return t.slice(e+r.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){E({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,i.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,r]of Object.entries(t))try{void 0===r?delete this.attributes[e]:this.attributes[e]=r}catch(t){if(t instanceof TypeError)continue;throw t}}}class P extends _{get type(){return w.File}}class I extends _{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const C=`/files/${(0,n.HW)()?.uid}`,L=(0,a.dC)("dav"),R=function(t=L,e={}){const r=(0,u.UU)(t,{headers:e});function o(t){r.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,n.zo)(o),o((0,n.do)()),(0,u.Gu)().patch("fetch",((t,e)=>{const r=e.headers;return r?.method&&(e.method=r.method,delete r.method),fetch(t,e)})),r},O=(t,e="/",r=C)=>{const n=new AbortController;return new c.CancelablePromise((async(o,i,s)=>{s((()=>n.abort()));try{o((await t.getDirectoryContents(`${r}${e}`,{signal:n.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>N(t,r))))}catch(t){i(t)}}))},N=function(t,e=C,r=L){let o=(0,n.HW)()?.uid;const i=document.querySelector("input#isPublic")?.value;if(i)o=o??document.querySelector("input#sharingUserId")?.value,o=o??"anonymous";else if(!o)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=h.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=h.CREATE),t.includes("G")&&(e|=h.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=h.UPDATE),t.includes("D")&&(e|=h.DELETE),t.includes("R")&&(e|=h.SHARE),e):e}(s?.permissions),u=String(s?.["owner-id"]||o),c={id:s?.fileid||0,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",size:s?.size||Number.parseInt(s.getcontentlength||"0"),permissions:a,owner:u,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new P(c):new I(c)};window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);const U=["B","KB","MB","GB","TB","PB"],T=["B","KiB","MiB","GiB","TiB","PiB"];function k(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let o=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;o=Math.min((r?T.length:U.length)-1,o);const i=r?T[o]:U[o];let s=(t/Math.pow(n?1e3:1024,o)).toFixed(1);return!0===e&&0===o?("0.0"!==s?"< 1 ":"0 ")+(r?T[1]:U[1]):(s=o<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,p.lO)()),s+" "+i)}function j(t,e=!1){try{t=`${t}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch(t){return null}const r=t.match(/^([0-9]*(\.[0-9]*)?)([kmgtp]?)(i?)b?$/);if(null===r||"."===r[1]||""===r[1])return null;const n=`${r[1]}`,o="i"===r[4]||e?1024:1e3;return Math.round(Number.parseFloat(n)*o**{"":0,k:1,m:2,g:3,t:4,p:5,e:6}[r[3]])}var S={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),o=n.length;for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};F.buildOptions=function(t){return Object.assign({},$,t)},F.defaultOptions=$,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var D={};function B(t,e,r){let n;const o={};for(let i=0;i0&&(o[e.textNodeName]=n):void 0!==n&&(o[e.textNodeName]=n),o}function q(t){const e=Object.keys(t);for(let t=0;t`,i=!1;continue}if(u===e.commentPropName){o+=n+`\x3c!--${a[u][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const t=J(a[":@"],e),r="?xml"===u?"":n;let s=a[u][0][e.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${t}?>`,i=!0;continue}let p=n;""!==p&&(p+=e.indentBy);const d=n+`<${u}${J(a[":@"],e)}`,l=H(a[u],e,c,p);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=d+">":o+=d+"/>":l&&0!==l.length||!e.suppressEmptyNode?l&&l.endsWith(">")?o+=d+`>${l}${n}`:(o+=d+">",l&&""!==n&&(l.includes("/>")||l.includes("`):o+=d+"/>",i=!0}return o}function z(t){const e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r0&&(r="\n"),H(t,e,"",r)},X={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Z(t){this.options=Object.assign({},X,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=rt),this.processTextOrObjNode=tt,this.options.format?(this.indentate=et,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function tt(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function et(t){return this.options.indentBy.repeat(t)}function rt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Z.prototype.build=function(t){return this.options.preserveOrder?Q(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Z.prototype.j2x=function(t,e){let r="",n="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(n+="");else if(null===t[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)n+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+t[o]);else if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const r=t[o].length;let i="";for(let s=0;s"+t+o}},Z.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+o+"0&&this.options.processEntities)for(let e=0;e{if(!r){var i=1/0;for(p=0;p=o)&&Object.keys(a.O).every((t=>a.O[t](r[u])))?r.splice(u--,1):(s=!1,o0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[r,n,o]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>(({3239:"settings-users",4529:"settings-apps-view"}[t]||t)+"-"+t+".js?v="+{1110:"2909496e7e35d6258214",3239:"840dea09a2ae7fa5cda6",4529:"1c12345652ab9d108a9c",8902:"bb051769bbf8ba8e1826"}[t]),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},o="nextcloud:",a.l=(t,e,n,i)=>{if(r[t])r[t].push(e);else{var s,u;if(void 0!==n)for(var c=document.getElementsByTagName("script"),p=0;p{s.onerror=s.onload=null,clearTimeout(h);var o=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(n))),e)return e(n)},h=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2689,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2689:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var i=a.p+a.u(e),s=new Error;a.l(i,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,i=r[0],s=r[1],u=r[2],c=0;if(i.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(u)var p=u(a)}for(e&&e(r);ca(32843)));u=a.O(u)})(); -//# sourceMappingURL=settings-vue-settings-apps-users-management.js.map?v=81c9c3788f8e2420812a \ No newline at end of file +(()=>{var e,r,o,i={92973:(t,e,r)=>{"use strict";r.d(e,{l:()=>o});var n=r(53334);const o=Object.freeze({installed:(0,n.Tl)("settings","Your apps"),enabled:(0,n.Tl)("settings","Active apps"),disabled:(0,n.Tl)("settings","Disabled apps"),updates:(0,n.Tl)("settings","Updates"),"app-bundles":(0,n.Tl)("settings","App bundles"),featured:(0,n.Tl)("settings","Featured apps"),supported:(0,n.Tl)("settings","Supported apps")})},58692:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const n=(0,r(53529).YK)().setApp("settings").detectUser().build()},32843:(e,r,o)=>{"use strict";var i=o(85471),s=o(80284),a=o(58723);const u={name:"App",beforeMount(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}},c=(0,o(14486).A)(u,(function(){return(0,this._self._c)("router-view")}),[],!1,null,null,null).exports;var p=o(96763);function d(t,e){for(var r in e)t[r]=e[r];return t}var l=/[!'()*]/g,h=function(t){return"%"+t.charCodeAt(0).toString(16)},f=/%2C/g,m=function(t){return encodeURIComponent(t).replace(l,h).replace(f,",")};function g(t){try{return decodeURIComponent(t)}catch(t){}return t}var y=function(t){return null==t||"object"==typeof t?t:String(t)};function v(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var r=t.replace(/\+/g," ").split("="),n=g(r.shift()),o=r.length>0?g(r.join("=")):null;void 0===e[n]?e[n]=o:Array.isArray(e[n])?e[n].push(o):e[n]=[e[n],o]})),e):e}function b(t){var e=t?Object.keys(t).map((function(e){var r=t[e];if(void 0===r)return"";if(null===r)return m(e);if(Array.isArray(r)){var n=[];return r.forEach((function(t){void 0!==t&&(null===t?n.push(m(e)):n.push(m(e)+"="+m(t)))})),n.join("&")}return m(e)+"="+m(r)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var w=/\/?$/;function A(t,e,r,n){var o=n&&n.options.stringifyQuery,i=e.query||{};try{i=E(i)}catch(t){}var s={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:P(e,o),matched:t?_(t):[]};return r&&(s.redirectedFrom=P(r,o)),Object.freeze(s)}function E(t){if(Array.isArray(t))return t.map(E);if(t&&"object"==typeof t){var e={};for(var r in t)e[r]=E(t[r]);return e}return t}var x=A(null,{path:"/"});function _(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function P(t,e){var r=t.path,n=t.query;void 0===n&&(n={});var o=t.hash;return void 0===o&&(o=""),(r||"/")+(e||b)(n)+o}function I(t,e,r){return e===x?t===e:!!e&&(t.path&&e.path?t.path.replace(w,"")===e.path.replace(w,"")&&(r||t.hash===e.hash&&C(t.query,e.query)):!(!t.name||!e.name)&&t.name===e.name&&(r||t.hash===e.hash&&C(t.query,e.query)&&C(t.params,e.params)))}function C(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var r=Object.keys(t).sort(),n=Object.keys(e).sort();return r.length===n.length&&r.every((function(r,o){var i=t[r];if(n[o]!==r)return!1;var s=e[r];return null==i||null==s?i===s:"object"==typeof i&&"object"==typeof s?C(i,s):String(i)===String(s)}))}function L(t){for(var e=0;e=0&&(e=t.slice(n),t=t.slice(0,n));var o=t.indexOf("?");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{path:t,query:r,hash:e}}(o.path||""),c=e&&e.path||"/",p=u.path?N(u.path,c,r||o.append):c,l=function(t,e,r){void 0===e&&(e={});var n,o=r||v;try{n=o(t||"")}catch(t){n={}}for(var i in e){var s=e[i];n[i]=Array.isArray(s)?s.map(y):y(s)}return n}(u.query,o.query,n&&n.options.parseQuery),h=o.hash||u.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:p,query:l,hash:h}}var Y,Q=function(){},X={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,r=this.$router,n=this.$route,o=r.resolve(this.to,n,this.append),i=o.location,s=o.route,a=o.href,u={},c=r.options.linkActiveClass,p=r.options.linkExactActiveClass,l=null==c?"router-link-active":c,h=null==p?"router-link-exact-active":p,f=null==this.activeClass?l:this.activeClass,m=null==this.exactActiveClass?h:this.exactActiveClass,g=s.redirectedFrom?A(null,W(s.redirectedFrom),null,r):s;u[m]=I(n,g,this.exactPath),u[f]=this.exact||this.exactPath?u[m]:function(t,e){return 0===t.path.replace(w,"/").indexOf(e.path.replace(w,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var r in e)if(!(r in t))return!1;return!0}(t.query,e.query)}(n,g);var y=u[m]?this.ariaCurrentValue:null,v=function(t){Z(t)&&(e.replace?r.replace(i,Q):r.push(i,Q))},b={click:Z};Array.isArray(this.event)?this.event.forEach((function(t){b[t]=v})):b[this.event]=v;var E={class:u},x=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:a,route:s,navigate:v,isActive:u[f],isExactActive:u[m]});if(x){if(1===x.length)return x[0];if(x.length>1||!x.length)return 0===x.length?t():t("span",{},x)}if("a"===this.tag)E.on=b,E.attrs={href:a,"aria-current":y};else{var _=tt(this.$slots.default);if(_){_.isStatic=!1;var P=_.data=d({},_.data);for(var C in P.on=P.on||{},P.on){var L=P.on[C];C in b&&(P.on[C]=Array.isArray(L)?L:[L])}for(var R in b)R in P.on?P.on[R].push(b[R]):P.on[R]=v;var O=_.data.attrs=d({},_.data.attrs);O.href=a,O["aria-current"]=y}else E.on=b}return t(this.tag,E,this.$slots.default)}};function Z(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function tt(t){if(t)for(var e,r=0;r-1&&(u.params[l]=r.params[l]);return u.path=J(p.path,u.params),a(p,u,s)}if(u.path){u.params={};for(var h=0;h-1}function Nt(t,e){return Ot(t)&&t._isRouter&&(null==e||t.type===e)}function Ut(t,e,r){var n=function(o){o>=t.length?r():t[o]?e(t[o],(function(){n(o+1)})):n(o+1)};n(0)}function Tt(t,e){return kt(t.map((function(t){return Object.keys(t.components).map((function(r){return e(t.components[r],t.instances[r],t,r)}))})))}function kt(t){return Array.prototype.concat.apply([],t)}var jt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function St(t){var e=!1;return function(){for(var r=[],n=arguments.length;n--;)r[n]=arguments[n];if(!e)return e=!0,t.apply(this,r)}}var Ft=function(t,e){this.router=t,this.base=function(t){if(!t)if(et){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}(e),this.current=x,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function $t(t,e,r,n){var o=Tt(t,(function(t,n,o,i){var s=function(t,e){return"function"!=typeof t&&(t=Y.extend(t)),t.options[e]}(t,e);if(s)return Array.isArray(s)?s.map((function(t){return r(t,n,o,i)})):r(s,n,o,i)}));return kt(n?o.reverse():o)}function Dt(t,e){if(e)return function(){return t.apply(e,arguments)}}Ft.prototype.listen=function(t){this.cb=t},Ft.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Ft.prototype.onError=function(t){this.errorCbs.push(t)},Ft.prototype.transitionTo=function(t,e,r){var n,o=this;try{n=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var i=this.current;this.confirmTransition(n,(function(){o.updateRoute(n),e&&e(n),o.ensureURL(),o.router.afterHooks.forEach((function(t){t&&t(n,i)})),o.ready||(o.ready=!0,o.readyCbs.forEach((function(t){t(n)})))}),(function(t){r&&r(t),t&&!o.ready&&(Nt(t,It.redirected)&&i===x||(o.ready=!0,o.readyErrorCbs.forEach((function(e){e(t)}))))}))},Ft.prototype.confirmTransition=function(t,e,r){var n=this,o=this.current;this.pending=t;var i,s,a=function(t){!Nt(t)&&Ot(t)&&(n.errorCbs.length?n.errorCbs.forEach((function(e){e(t)})):p.error(t)),r&&r(t)},u=t.matched.length-1,c=o.matched.length-1;if(I(t,o)&&u===c&&t.matched[u]===o.matched[c])return this.ensureURL(),t.hash&&ft(this.router,o,t,!1),a(((s=Lt(i=o,t,It.duplicated,'Avoided redundant navigation to current location: "'+i.fullPath+'".')).name="NavigationDuplicated",s));var d,l=function(t,e){var r,n=Math.max(t.length,e.length);for(r=0;r0)){var e=this.router,r=e.options.scrollBehavior,n=xt&&r;n&&this.listeners.push(ht());var o=function(){var r=t.current,o=qt(t.base);t.current===x&&o===t._startLocation||t.transitionTo(o,(function(t){n&&ft(e,t,r,!0)}))};window.addEventListener("popstate",o),this.listeners.push((function(){window.removeEventListener("popstate",o)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){_t(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Pt(U(n.base+t.fullPath)),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.ensureURL=function(t){if(qt(this.base)!==this.current.fullPath){var e=U(this.base+this.current.fullPath);t?_t(e):Pt(e)}},e.prototype.getCurrentLocation=function(){return qt(this.base)},e}(Ft);function qt(t){var e=window.location.pathname,r=e.toLowerCase(),n=t.toLowerCase();return!t||r!==n&&0!==r.indexOf(U(n+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Mt=function(t){function e(e,r,n){t.call(this,e,r),n&&function(t){var e=qt(t);if(!/^\/#/.test(e))return window.location.replace(U(t+"/#"+e)),!0}(this.base)||Gt()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,r=xt&&e;r&&this.listeners.push(ht());var n=function(){var e=t.current;Gt()&&t.transitionTo(Vt(),(function(n){r&&ft(t.router,n,e,!0),xt||zt(n.fullPath)}))},o=xt?"popstate":"hashchange";window.addEventListener(o,n),this.listeners.push((function(){window.removeEventListener(o,n)}))}},e.prototype.push=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){Ht(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this,o=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),ft(n.router,t,o,!1),e&&e(t)}),r)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;Vt()!==e&&(t?Ht(e):zt(e))},e.prototype.getCurrentLocation=function(){return Vt()},e}(Ft);function Gt(){var t=Vt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function Vt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Kt(t){var e=window.location.href,r=e.indexOf("#");return(r>=0?e.slice(0,r):e)+"#"+t}function Ht(t){xt?_t(Kt(t)):window.location.hash=t}function zt(t){xt?Pt(Kt(t)):window.location.replace(Kt(t))}var Jt=function(t){function e(e,r){t.call(this,e,r),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index+1).concat(t),n.index++,e&&e(t)}),r)},e.prototype.replace=function(t,e,r){var n=this;this.transitionTo(t,(function(t){n.stack=n.stack.slice(0,n.index).concat(t),e&&e(t)}),r)},e.prototype.go=function(t){var e=this,r=this.index+t;if(!(r<0||r>=this.stack.length)){var n=this.stack[r];this.confirmTransition(n,(function(){var t=e.current;e.index=r,e.updateRoute(n),e.router.afterHooks.forEach((function(e){e&&e(n,t)}))}),(function(t){Nt(t,It.duplicated)&&(e.index=r)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Ft),Wt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=it(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!xt&&!1!==t.fallback,this.fallback&&(e="hash"),et||(e="abstract"),this.mode=e,e){case"history":this.history=new Bt(this,t.base);break;case"hash":this.history=new Mt(this,t.base,this.fallback);break;case"abstract":this.history=new Jt(this,t.base)}},Yt={currentRoute:{configurable:!0}};Wt.prototype.match=function(t,e,r){return this.matcher.match(t,e,r)},Yt.currentRoute.get=function(){return this.history&&this.history.current},Wt.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var r=e.apps.indexOf(t);r>-1&&e.apps.splice(r,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var r=this.history;if(r instanceof Bt||r instanceof Mt){var n=function(t){r.setupListeners(),function(t){var n=r.current,o=e.options.scrollBehavior;xt&&o&&"fullPath"in t&&ft(e,t,n,!1)}(t)};r.transitionTo(r.getCurrentLocation(),n,n)}r.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Wt.prototype.beforeEach=function(t){return Xt(this.beforeHooks,t)},Wt.prototype.beforeResolve=function(t){return Xt(this.resolveHooks,t)},Wt.prototype.afterEach=function(t){return Xt(this.afterHooks,t)},Wt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Wt.prototype.onError=function(t){this.history.onError(t)},Wt.prototype.push=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.push(t,e,r)}));this.history.push(t,e,r)},Wt.prototype.replace=function(t,e,r){var n=this;if(!e&&!r&&"undefined"!=typeof Promise)return new Promise((function(e,r){n.history.replace(t,e,r)}));this.history.replace(t,e,r)},Wt.prototype.go=function(t){this.history.go(t)},Wt.prototype.back=function(){this.go(-1)},Wt.prototype.forward=function(){this.go(1)},Wt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Wt.prototype.resolve=function(t,e,r){var n=W(t,e=e||this.history.current,r,this),o=this.match(n,e),i=o.redirectedFrom||o.fullPath,s=function(t,e,r){var n="hash"===r?"#"+e:e;return t?U(t+"/"+n):n}(this.history.base,i,this.mode);return{location:n,route:o,href:s,normalizedTo:n,resolved:o}},Wt.prototype.getRoutes=function(){return this.matcher.getRoutes()},Wt.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Wt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==x&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Wt.prototype,Yt);var Qt=Wt;function Xt(t,e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}Wt.install=function t(e){if(!t.installed||Y!==e){t.installed=!0,Y=e;var r=function(t){return void 0!==t},n=function(t,e){var n=t.$options._parentVnode;r(n)&&r(n=n.data)&&r(n=n.registerRouteInstance)&&n(t,e)};e.mixin({beforeCreate:function(){r(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",R),e.component("RouterLink",X);var o=e.config.optionMergeStrategies;o.beforeRouteEnter=o.beforeRouteLeave=o.beforeRouteUpdate=o.created}},Wt.version="3.6.5",Wt.isNavigationFailure=Nt,Wt.NavigationFailureType=It,Wt.START_LOCATION=x,et&&window.Vue&&window.Vue.use(Wt);var Zt=o(99498),te=o(92973),ee=o(95353),re=o(26287),ne=o(36124);o(51257);const oe=function(t){return t.replace(/\/$/,"")},ie=()=>(0,ne.C)(),se=(t,e)=>re.A.get(oe(t),e),ae=(t,e)=>re.A.post(oe(t),e),ue=(t,e)=>re.A.put(oe(t),e),ce=(t,e)=>re.A.delete(oe(t),{params:e});var pe=o(87485),de=o(58692),le=o(35810),he=o(96763);const fe=function(t,e){return 1===e?t.sort(((t,e)=>t.usercount-t.disabledt.name.localeCompare(e.name)))},me={id:"",name:"",usercount:0,disabled:0,canAdd:!0,canRemove:!0},ge={appendUsers(t,e){const r=t.users.map((t=>{let{id:e}=t;return e})),n=Object.values(e).filter((t=>{let{id:e}=t;return!r.includes(e)})),o=t.users.concat(n);t.usersOffset+=t.usersLimit,t.users=o},updateDisabledUsers(t,e){t.disabledUsersOffset+=t.disabledUsersLimit},setPasswordPolicyMinLength(t,e){t.minPasswordLength=""!==e?e:0},initGroups(t,e){let{groups:r,orderBy:n,userCount:o}=e;t.groups=r.map((t=>Object.assign({},me,t))),t.orderBy=n,t.userCount=o,t.groups=fe(t.groups,t.orderBy)},addGroup(t,e){let{gid:r,displayName:n}=e;try{if(void 0!==t.groups.find((t=>t.id===r)))return;const e=Object.assign({},me,{id:r,name:n});t.groups.unshift(e),t.groups=fe(t.groups,t.orderBy)}catch(t){he.error("Can't create group",t)}},renameGroup(t,e){let{gid:r,displayName:n}=e;const o=t.groups.findIndex((t=>t.id===r));if(o>=0){const e=t.groups[o];e.name=n,t.groups.splice(o,1,e),t.groups=fe(t.groups,t.orderBy)}},removeGroup(t,e){const r=t.groups.findIndex((t=>t.id===e));r>=0&&t.groups.splice(r,1)},addUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount++,i.groups.push(n),t.groups=fe(t.groups,t.orderBy)},removeUserGroup(t,e){let{userid:r,gid:n}=e;const o=t.groups.find((t=>t.id===n)),i=t.users.find((t=>t.id===r));o&&i.enabled&&t.userCount>0&&o.usercount--;const s=i.groups;s.splice(s.indexOf(n),1),t.groups=fe(t.groups,t.orderBy)},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;t.users.find((t=>t.id===r)).subadmin.push(n)},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;const o=t.users.find((t=>t.id===r)).subadmin;o.splice(o.indexOf(n),1)},deleteUser(t,e){const r=t.users.findIndex((t=>t.id===e));this.commit("updateUserCounts",{user:t.users[r],actionType:"remove"}),t.users.splice(r,1)},addUserData(t,e){const r=e.data.ocs.data;t.users.unshift(r),this.commit("updateUserCounts",{user:r,actionType:"create"})},enableDisableUser(t,e){let{userid:r,enabled:n}=e;const o=t.users.find((t=>t.id===r));o.enabled=n,this.commit("updateUserCounts",{user:o,actionType:n?"enable":"disable"})},updateUserCounts(t,e){let{user:r,actionType:n}=e;if(0===t.userCount)return;const o=t.groups.find((t=>"disabled"===t.id));switch(n){case"enable":case"disable":o.usercount+=r.enabled?-1:1,t.userCount+=r.enabled?1:-1,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled+=r.enabled?-1:1}));break;case"create":t.userCount++,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).usercount++}));break;case"remove":r.enabled?(t.userCount--,r.groups.forEach((e=>{const r=t.groups.find((t=>t.id===e));r?r.usercount--:he.warn("User group "+e+" does not exist during user removal")}))):(o.usercount--,r.groups.forEach((e=>{t.groups.find((t=>t.id===e)).disabled--})));break;default:de.A.error("Unknown action type in updateUserCounts: '".concat(n,"'"))}},setUserData(t,e){let{userid:r,key:n,value:o}=e;if("quota"===n){const e=(0,le.lT)(o,!0);t.users.find((t=>t.id===r))[n][n]=null!==e?e:o}else t.users.find((t=>t.id===r))[n]=o},resetUsers(t){t.users=[],t.usersOffset=0,t.disabledUsersOffset=0},setShowConfig(t,e){let{key:r,value:n}=e;t.showConfig[r]=n}},ye=re.A.CancelToken;let ve=null;const be={state:{users:[],groups:[],orderBy:1,minPasswordLength:0,usersOffset:0,usersLimit:25,disabledUsersOffset:0,disabledUsersLimit:25,userCount:0,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}},mutations:ge,getters:{getUsers:t=>t.users,getGroups:t=>t.groups,getSubadminGroups:t=>t.groups.filter((t=>"admin"!==t.id&&"disabled"!==t.id)),getPasswordPolicyMinLength:t=>t.minPasswordLength,getUsersOffset:t=>t.usersOffset,getUsersLimit:t=>t.usersLimit,getDisabledUsersOffset:t=>t.disabledUsersOffset,getDisabledUsersLimit:t=>t.disabledUsersLimit,getUserCount:t=>t.userCount,getShowConfig:t=>t.showConfig},actions:{searchUsers(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},getUser:(t,e)=>se((0,Zt.KT)("cloud/users/".concat(e))).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})),getUsers(t,e){let{offset:r,limit:n,search:o,group:i}=e;return ve&&ve.cancel("Operation canceled by another search request."),ve=ye.source(),o="string"==typeof o?o:"",o=o.replace(/in:[^\s]+/g,"").trim(),i="string"==typeof i?i:"",""!==i?se((0,Zt.KT)("cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}",{group:encodeURIComponent(i),offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)})):se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o}),{cancelToken:ve.token}).then((e=>{const r=Object.keys(e.data.ocs.data.users).length;return r>0&&t.commit("appendUsers",e.data.ocs.data.users),r})).catch((e=>{re.A.isCancel(e)||t.commit("API_FAILURE",e)}))},async getDisabledUsers(t,e){let{offset:r,limit:n,search:o}=e;const i=(0,Zt.KT)("cloud/users/disabled?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o});try{const e=await se(i),r=Object.keys(e.data.ocs.data.users).length;return r>0&&(t.commit("appendUsers",e.data.ocs.data.users),t.commit("updateDisabledUsers",e.data.ocs.data.users)),r}catch(e){t.commit("API_FAILURE",e)}},getGroups(t,e){let{offset:r,limit:n,search:o}=e;o="string"==typeof o?o:"";const i=-1===n?"":"&limit=".concat(n);return se((0,Zt.KT)("cloud/groups?offset={offset}&search={search}",{offset:r,search:o})+i).then((e=>Object.keys(e.data.ocs.data.groups).length>0&&(e.data.ocs.data.groups.forEach((function(e){t.commit("addGroup",{gid:e,displayName:e})})),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromList(t,e){let{offset:r,limit:n,search:o}=e;return o="string"==typeof o?o:"",se((0,Zt.KT)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).then((e=>Object.keys(e.data.ocs.data.users).length>0&&(t.commit("appendUsers",e.data.ocs.data.users),!0))).catch((e=>t.commit("API_FAILURE",e)))},getUsersFromGroup(t,e){let{groupid:r,offset:n,limit:o}=e;return se((0,Zt.KT)("cloud/users/{groupId}/details?offset={offset}&limit={limit}",{groupId:encodeURIComponent(r),offset:n,limit:o})).then((e=>t.commit("getUsersFromList",e.data.ocs.data.users))).catch((e=>t.commit("API_FAILURE",e)))},getPasswordPolicyMinLength:t=>!(!(0,pe.F)().password_policy||!(0,pe.F)().password_policy.minLength)&&(t.commit("setPasswordPolicyMinLength",(0,pe.F)().password_policy.minLength),(0,pe.F)().password_policy.minLength),addGroup:(t,e)=>ie().then((r=>ae((0,Zt.KT)("cloud/groups"),{groupid:e}).then((r=>(t.commit("addGroup",{gid:e,displayName:e}),{gid:e,displayName:e}))).catch((t=>{throw t})))).catch((r=>{throw t.commit("API_FAILURE",{gid:e,error:r}),r})),renameGroup(t,e){let{groupid:r,displayName:n}=e;return ie().then((e=>ue((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(r)}),{key:"displayname",value:n}).then((e=>(t.commit("renameGroup",{gid:r,displayName:n}),{groupid:r,displayName:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{groupid:r,error:e}),e}))},removeGroup:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/groups/{groupId}",{groupId:encodeURIComponent(e)})).then((r=>t.commit("removeGroup",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{gid:e,error:r}))),addUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("addUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserGroup(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserGroup",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>{throw t.commit("API_FAILURE",{userid:r,error:e}),e}))},addUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ae((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("addUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},removeUserSubAdmin(t,e){let{userid:r,gid:n}=e;return ie().then((e=>ce((0,Zt.KT)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((e=>t.commit("removeUserSubAdmin",{userid:r,gid:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},wipeUserDevices:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/wipe",{userid:e})).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),deleteUser:(t,e)=>ie().then((r=>ce((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((r=>t.commit("deleteUser",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),addUser(t,e){let{commit:r,dispatch:n}=t,{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}=e;return ie().then((t=>ae((0,Zt.KT)("cloud/users"),{userid:o,password:i,displayName:s,email:a,groups:u,subadmin:c,quota:p,language:d,manager:l}).then((t=>n("addUserData",o||t.data.ocs.data.id))).catch((t=>{throw t})))).catch((t=>{throw r("API_FAILURE",{userid:o,error:t}),t}))},addUserData:(t,e)=>ie().then((r=>se((0,Zt.KT)("cloud/users/{userid}",{userid:e})).then((e=>t.commit("addUserData",e))).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r}))),enableDisableUser(t,e){let{userid:r,enabled:n=!0}=e;const o=n?"enable":"disable";return ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}/{userStatus}",{userid:r,userStatus:o})).then((e=>t.commit("enableDisableUser",{userid:r,enabled:n}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e})))},setUserData(t,e){let{userid:r,key:n,value:o}=e;const i=["email","displayname","manager"];return-1!==["email","language","quota","displayname","password","manager"].indexOf(n)&&"string"==typeof o&&(-1===i.indexOf(n)&&o.length>0||-1!==i.indexOf(n))?ie().then((e=>ue((0,Zt.KT)("cloud/users/{userid}",{userid:r}),{key:n,value:o}).then((e=>t.commit("setUserData",{userid:r,key:n,value:o}))).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{userid:r,error:e}))):Promise.reject(new Error("Invalid request data"))},sendWelcomeMail:(t,e)=>ie().then((t=>ae((0,Zt.KT)("cloud/users/{userid}/welcome",{userid:e})).then((t=>!0)).catch((t=>{throw t})))).catch((r=>t.commit("API_FAILURE",{userid:e,error:r})))}};var we=o(85168),Ae=o(96763);const Ee={APPS_API_FAILURE(e,r){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+r.error.response.data.data.message,{isHTML:!0}),Ae.error(e,r)},initCategories(t,e){let{categories:r,updateCount:n}=e;t.categories=r,t.updateCount=n},updateCategories(t,e){t.gettingCategoriesPromise=e},setUpdateCount(t,e){t.updateCount=e},addCategory(t,e){t.categories.push(e)},appendCategories(t,e){t.categories=e},setAllApps(t,e){t.apps=e},setError(t,e){let{appId:r,error:n}=e;Array.isArray(r)||(r=[r]),r.forEach((e=>{t.apps.find((t=>t.id===e)).error=n}))},clearError(t,e){let{appId:r,error:n}=e;t.apps.find((t=>t.id===r)).error=null},enableApp(t,e){let{appId:r,groups:n}=e;const o=t.apps.find((t=>t.id===r));o.active=!0,o.groups=n},disableApp(t,e){const r=t.apps.find((t=>t.id===e));r.active=!1,r.groups=[],r.removable&&(r.canUnInstall=!0)},uninstallApp(t,e){t.apps.find((t=>t.id===e)).active=!1,t.apps.find((t=>t.id===e)).groups=[],t.apps.find((t=>t.id===e)).needsDownload=!0,t.apps.find((t=>t.id===e)).installed=!1,t.apps.find((t=>t.id===e)).canUnInstall=!1,t.apps.find((t=>t.id===e)).canInstall=!0},updateApp(t,e){const r=t.apps.find((t=>t.id===e)),n=r.update;r.update=null,r.version=n,t.updateCount--},resetApps(t){t.apps=[]},reset(t){t.apps=[],t.categories=[],t.updateCount=0},startLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!0)})):i.Ay.set(t.loading,e,!0)},stopLoading(t,e){Array.isArray(e)?e.forEach((e=>{i.Ay.set(t.loading,e,!1)})):i.Ay.set(t.loading,e,!1)}},xe={enableApp(e,r){let n,{appId:o,groups:i}=r;return n=Array.isArray(o)?o:[o],ie().then((r=>(e.commit("startLoading",n),e.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/enable"),{appIds:n,groups:i}).then((r=>(e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((t=>{e.commit("enableApp",{appId:t,groups:i})})),re.A.get((0,Zt.Jv)("apps/files/")).then((()=>{r.data.update_required&&((0,we.cf)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:()=>window.location.reload(),close:!1}),setTimeout((function(){location.reload()}),5e3))})).catch((()=>{Array.isArray(o)||((0,we.Qg)(t("settings","Error: This app cannot be enabled because it makes the server unstable")),e.commit("setError",{appId:n,error:t("settings","Error: This app cannot be enabled because it makes the server unstable")}),e.dispatch("disableApp",{appId:o}))}))))).catch((t=>{e.commit("stopLoading",n),e.commit("stopLoading","install"),e.commit("setError",{appId:n,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:o,error:t})}))))).catch((t=>e.commit("API_FAILURE",{appId:o,error:t})))},forceEnableApp(t,e){let r,{appId:n,groups:o}=e;return r=Array.isArray(n)?n:[n],ie().then((()=>(t.commit("startLoading",r),t.commit("startLoading","install"),ae((0,Zt.Jv)("settings/apps/force"),{appId:n}).then((t=>{location.reload()})).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("setError",{appId:r,error:e.response.data.data.message}),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},disableApp(t,e){let r,{appId:n}=e;return r=Array.isArray(n)?n:[n],ie().then((e=>(t.commit("startLoading",r),ae((0,Zt.Jv)("settings/apps/disable"),{appIds:r}).then((e=>(t.commit("stopLoading",r),r.forEach((e=>{t.commit("disableApp",e)})),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:n,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:n,error:e})))},uninstallApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),se((0,Zt.Jv)("settings/apps/uninstall/".concat(r))).then((e=>(t.commit("stopLoading",r),t.commit("uninstallApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},updateApp(t,e){let{appId:r}=e;return ie().then((e=>(t.commit("startLoading",r),t.commit("startLoading","install"),se((0,Zt.Jv)("settings/apps/update/".concat(r))).then((e=>(t.commit("stopLoading","install"),t.commit("stopLoading",r),t.commit("updateApp",r),!0))).catch((e=>{t.commit("stopLoading",r),t.commit("stopLoading","install"),t.commit("APPS_API_FAILURE",{appId:r,error:e})}))))).catch((e=>t.commit("API_FAILURE",{appId:r,error:e})))},getAllApps:t=>(t.commit("startLoading","list"),se((0,Zt.Jv)("settings/apps/list")).then((e=>(t.commit("setAllApps",e.data.apps),t.commit("stopLoading","list"),!0))).catch((e=>t.commit("API_FAILURE",e)))),async getCategories(t){let{shouldRefetchCategories:e=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e||!t.state.gettingCategoriesPromise){t.commit("startLoading","categories");try{const e=se((0,Zt.Jv)("settings/apps/categories"));t.commit("updateCategories",e);const r=await e;return r.data.length>0?(t.commit("appendCategories",r.data),t.commit("stopLoading","categories"),!0):(t.commit("stopLoading","categories"),!1)}catch(e){t.commit("API_FAILURE",e)}}return t.state.gettingCategoriesPromise}},_e={state:{apps:[],categories:[],updateCount:0,loading:{},loadingList:!1,gettingCategoriesPromise:null},mutations:Ee,getters:{loading:t=>function(e){return t.loading[e]},getCategories:t=>t.categories,getAllApps:t=>t.apps,getUpdateCount:t=>t.updateCount,getCategoryById:t=>e=>t.categories.find((t=>t.id===e))},actions:xe},Pe={state:{serverData:{}},mutations:{setServerData(t,e){t.serverData=e}},getters:{getServerData:t=>t.serverData},actions:{}},Ie={state:{},mutations:{},getters:{},actions:{setAppConfig(t,e){let{app:r,key:n,value:o}=e;return ie().then((t=>ae((0,Zt.KT)("apps/provisioning_api/api/v1/config/apps/{app}/{key}",{app:r,key:n}),{value:o}).catch((t=>{throw t})))).catch((e=>t.commit("API_FAILURE",{app:r,key:n,value:o,error:e})))}}};var Ce=o(96763);i.Ay.use(ee.Ay);const Le={API_FAILURE(e,r){try{const e=r.error.response.data.ocs.meta.message;(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed.")+"
"+e,{isHTML:!0})}catch(e){(0,we.Qg)(t("settings","An error occurred during the request. Unable to proceed."))}Ce.error(e,r)}},Re=new ee.il({modules:{users:be,apps:_e,settings:Pe,oc:Ie},strict:!1,mutations:Le});o(32981);const Oe=()=>Promise.all([o.e(4208),o.e(3239)]).then(o.bind(o,84380)),Ne=()=>Promise.all([o.e(4208),o.e(4529)]).then(o.bind(o,86470));i.Ay.use(Qt);const Ue=document.title,Te=new Qt({mode:"history",base:(0,Zt.Jv)(""),linkActiveClass:"active",routes:[{path:"/:index(index.php/)?settings/users",component:Oe,props:!0,name:"users",meta:{title:()=>t("settings","Active users")},children:[{path:":selectedGroup",name:"group",meta:{title:e=>"admin"===e.params.selectedGroup?t("settings","Admins"):"disabled"===e.params.selectedGroup?t("settings","Disabled users"):decodeURIComponent(e.params.selectedGroup)},component:Oe}]},{path:"/:index(index.php/)?settings/apps",component:Ne,props:!0,name:"apps",meta:{title:()=>t("settings","Your apps")},children:[{path:":category",name:"apps-category",meta:{title:async e=>{if("apps"===e.name)return t("settings","Your apps");if(te.l[e.params.category])return te.l[e.params.category];await Re.dispatch("getCategories");const r=Re.getters.getCategoryById(e.params.category);return r.displayName?r.displayName:void 0}},component:Ne,children:[{path:":id",name:"apps-details",component:Ne}]}]}]});Te.afterEach((async t=>{var e,r;const n=await(null===(e=(r=t.meta).title)||void 0===e?void 0:e.call(r,t));n?(document.title="".concat(n," - ").concat(Ue),function(t){const e=document.getElementById("page-heading-level-1");e&&(e.textContent=t)}(n)):document.title=Ue}));const ke=Te;i.Ay.use(s.Ay,{defaultHtml:!1}),(0,a.O)(Re,ke),o.nc=btoa(OC.requestToken),i.Ay.prototype.t=t,i.Ay.prototype.n=n,i.Ay.prototype.OC=OC,i.Ay.prototype.OCA=OCA,i.Ay.prototype.oc_userconfig=oc_userconfig,new i.Ay({router:ke,store:Re,render:t=>t(c)}).$mount("#content")},58723:(t,e)=>{function r(t,e){var n={name:t.name,path:t.path,hash:t.hash,query:t.query,params:t.params,fullPath:t.fullPath,meta:t.meta};return e&&(n.from=r(e)),Object.freeze(n)}e.O=function(t,e,n){var o=(n||{}).moduleName||"route";t.registerModule(o,{namespaced:!0,state:r(e.currentRoute),mutations:{ROUTE_CHANGED:function(e,n){t.state[o]=r(n.to,n.from)}}});var i,s=!1,a=t.watch((function(t){return t[o]}),(function(t){var r=t.fullPath;r!==i&&(null!=i&&(s=!0,e.push(t)),i=r)}),{sync:!0}),u=e.afterEach((function(e,r){s?s=!1:(i=e.fullPath,t.commit(o+"/ROUTE_CHANGED",{to:e,from:r}))}));return function(){null!=u&&u(),null!=a&&a(),t.unregisterModule(o)}}},35810:(t,e,r)=>{"use strict";r.d(e,{Al:()=>N,H4:()=>R,PY:()=>L,Q$:()=>O,R3:()=>b,VL:()=>v,lJ:()=>C,lT:()=>j,pt:()=>w,v7:()=>k});var n=r(21777),o=r(84697),i=r(43627),s=r(71089),a=r(66656),u=r(44719),c=r(36117),p=r(2568);const d=null===(l=(0,n.HW)())?(0,o.YK)().setApp("files").build():(0,o.YK)().setApp("files").setUid(l.uid).build();var l,h=(t=>(t[t.NONE=0]="NONE",t[t.CREATE=4]="CREATE",t[t.READ=1]="READ",t[t.UPDATE=2]="UPDATE",t[t.DELETE=8]="DELETE",t[t.SHARE=16]="SHARE",t[t.ALL=31]="ALL",t))(h||{});const f=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],m={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"},g=function(){return void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...f]),window._nc_dav_properties.map((t=>`<${t} />`)).join(" ")},y=function(){return void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...m}),Object.keys(window._nc_dav_namespaces).map((t=>`xmlns:${t}="${window._nc_dav_namespaces?.[t]}"`)).join(" ")},v=function(){return`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t`},b=function(t){return`\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${(0,n.HW)()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${t}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`};var w=(t=>(t.Folder="folder",t.File="file",t))(w||{});const A=function(t,e){return null!==t.match(e)},E=(t,e)=>{if(t.id&&"number"!=typeof t.id)throw new Error("Invalid id type of value");if(!t.source)throw new Error("Missing mandatory source");try{new URL(t.source)}catch(t){throw new Error("Invalid source format, source must be a valid URL")}if(!t.source.startsWith("http"))throw new Error("Invalid source format, only http(s) is supported");if(t.mtime&&!(t.mtime instanceof Date))throw new Error("Invalid mtime type");if(t.crtime&&!(t.crtime instanceof Date))throw new Error("Invalid crtime type");if(!t.mime||"string"!=typeof t.mime||!t.mime.match(/^[-\w.]+\/[-+\w.]+$/gi))throw new Error("Missing or invalid mandatory mime");if("size"in t&&"number"!=typeof t.size&&void 0!==t.size)throw new Error("Invalid size type");if("permissions"in t&&void 0!==t.permissions&&!("number"==typeof t.permissions&&t.permissions>=h.NONE&&t.permissions<=h.ALL))throw new Error("Invalid permissions");if(t.owner&&null!==t.owner&&"string"!=typeof t.owner)throw new Error("Invalid owner type");if(t.attributes&&"object"!=typeof t.attributes)throw new Error("Invalid attributes type");if(t.root&&"string"!=typeof t.root)throw new Error("Invalid root type");if(t.root&&!t.root.startsWith("/"))throw new Error("Root must start with a leading slash");if(t.root&&!t.source.includes(t.root))throw new Error("Root must be part of the source");if(t.root&&A(t.source,e)){const r=t.source.match(e)[0];if(!t.source.includes((0,i.join)(r,t.root)))throw new Error("The root must be relative to the service. e.g /files/emma")}if(t.status&&!Object.values(x).includes(t.status))throw new Error("Status must be a valid NodeStatus")};var x=(t=>(t.NEW="new",t.FAILED="failed",t.LOADING="loading",t.LOCKED="locked",t))(x||{});class _{_data;_attributes;_knownDavService=/(remote|public)\.php\/(web)?dav/i;readonlyAttributes=Object.entries(Object.getOwnPropertyDescriptors(_.prototype)).filter((t=>"function"==typeof t[1].get&&"__proto__"!==t[0])).map((t=>t[0]));handler={set:(t,e,r)=>!this.readonlyAttributes.includes(e)&&Reflect.set(t,e,r),deleteProperty:(t,e)=>!this.readonlyAttributes.includes(e)&&Reflect.deleteProperty(t,e),get:(t,e,r)=>this.readonlyAttributes.includes(e)?(d.warn(`Accessing "Node.attributes.${e}" is deprecated, access it directly on the Node instance.`),Reflect.get(this,e)):Reflect.get(t,e,r)};constructor(t,e){E(t,e||this._knownDavService),this._data={...t,attributes:{}},this._attributes=new Proxy(this._data.attributes,this.handler),this.update(t.attributes??{}),e&&(this._knownDavService=e)}get source(){return this._data.source.replace(/\/$/i,"")}get encodedSource(){const{origin:t}=new URL(this.source);return t+(0,s.O0)(this.source.slice(t.length))}get basename(){return(0,i.basename)(this.source)}get extension(){return(0,i.extname)(this.source)}get dirname(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return(0,i.dirname)(t.slice(e+r.length)||"/")}const t=new URL(this.source);return(0,i.dirname)(t.pathname)}get mime(){return this._data.mime}get mtime(){return this._data.mtime}set mtime(t){this._data.mtime=t}get crtime(){return this._data.crtime}get size(){return this._data.size}set size(t){this.updateMtime(),this._data.size=t}get attributes(){return this._attributes}get permissions(){return null!==this.owner||this.isDavRessource?void 0!==this._data.permissions?this._data.permissions:h.NONE:h.READ}set permissions(t){this.updateMtime(),this._data.permissions=t}get owner(){return this.isDavRessource?this._data.owner:null}get isDavRessource(){return A(this.source,this._knownDavService)}get root(){return this._data.root?this._data.root.replace(/^(.+)\/$/,"$1"):this.isDavRessource&&(0,i.dirname)(this.source).split(this._knownDavService).pop()||null}get path(){if(this.root){let t=this.source;this.isDavRessource&&(t=t.split(this._knownDavService).pop());const e=t.indexOf(this.root),r=this.root.replace(/\/$/,"");return t.slice(e+r.length)||"/"}return(this.dirname+"/"+this.basename).replace(/\/\//g,"/")}get fileid(){return this._data?.id}get status(){return this._data?.status}set status(t){this._data.status=t}move(t){E({...this._data,source:t},this._knownDavService),this._data.source=t,this.updateMtime()}rename(t){if(t.includes("/"))throw new Error("Invalid basename");this.move((0,i.dirname)(this.source)+"/"+t)}updateMtime(){this._data.mtime&&(this._data.mtime=new Date)}update(t){for(const[e,r]of Object.entries(t))try{void 0===r?delete this.attributes[e]:this.attributes[e]=r}catch(t){if(t instanceof TypeError)continue;throw t}}}class P extends _{get type(){return w.File}}class I extends _{constructor(t){super({...t,mime:"httpd/unix-directory"})}get type(){return w.Folder}get extension(){return null}get mime(){return"httpd/unix-directory"}}const C=`/files/${(0,n.HW)()?.uid}`,L=(0,a.dC)("dav"),R=function(t=L,e={}){const r=(0,u.UU)(t,{headers:e});function o(t){r.setHeaders({...e,"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}return(0,n.zo)(o),o((0,n.do)()),(0,u.Gu)().patch("fetch",((t,e)=>{const r=e.headers;return r?.method&&(e.method=r.method,delete r.method),fetch(t,e)})),r},O=(t,e="/",r=C)=>{const n=new AbortController;return new c.CancelablePromise((async(o,i,s)=>{s((()=>n.abort()));try{o((await t.getDirectoryContents(`${r}${e}`,{signal:n.signal,details:!0,data:`\n\t\t\n\t\t\t\n\t\t\t\t${g()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`,headers:{method:"REPORT"},includeSelf:!0})).data.filter((t=>t.filename!==e)).map((t=>N(t,r))))}catch(t){i(t)}}))},N=function(t,e=C,r=L){let o=(0,n.HW)()?.uid;const i=document.querySelector("input#isPublic")?.value;if(i)o=o??document.querySelector("input#sharingUserId")?.value,o=o??"anonymous";else if(!o)throw new Error("No user id found");const s=t.props,a=function(t=""){let e=h.NONE;return t?((t.includes("C")||t.includes("K"))&&(e|=h.CREATE),t.includes("G")&&(e|=h.READ),(t.includes("W")||t.includes("N")||t.includes("V"))&&(e|=h.UPDATE),t.includes("D")&&(e|=h.DELETE),t.includes("R")&&(e|=h.SHARE),e):e}(s?.permissions),u=String(s?.["owner-id"]||o),c={id:s?.fileid||0,source:`${r}${t.filename}`,mtime:new Date(Date.parse(t.lastmod)),mime:t.mime||"application/octet-stream",size:s?.size||Number.parseInt(s.getcontentlength||"0"),permissions:a,owner:u,root:e,attributes:{...t,...s,hasPreview:s?.["has-preview"]}};return delete c.attributes?.props,"file"===t.type?new P(c):new I(c)};window._oc_config,window._oc_config?.blacklist_files_regex&&new RegExp(window._oc_config.blacklist_files_regex);const U=["B","KB","MB","GB","TB","PB"],T=["B","KiB","MiB","GiB","TiB","PiB"];function k(t,e=!1,r=!1,n=!1){r=r&&!n,"string"==typeof t&&(t=Number(t));let o=t>0?Math.floor(Math.log(t)/Math.log(n?1e3:1024)):0;o=Math.min((r?T.length:U.length)-1,o);const i=r?T[o]:U[o];let s=(t/Math.pow(n?1e3:1024,o)).toFixed(1);return!0===e&&0===o?("0.0"!==s?"< 1 ":"0 ")+(r?T[1]:U[1]):(s=o<2?parseFloat(s).toFixed(0):parseFloat(s).toLocaleString((0,p.lO)()),s+" "+i)}function j(t,e=!1){try{t=`${t}`.toLocaleLowerCase().replaceAll(/\s+/g,"").replaceAll(",",".")}catch(t){return null}const r=t.match(/^([0-9]*(\.[0-9]*)?)([kmgtp]?)(i?)b?$/);if(null===r||"."===r[1]||""===r[1])return null;const n=`${r[1]}`,o="i"===r[4]||e?1024:1e3;return Math.round(Number.parseFloat(n)*o**{"":0,k:1,m:2,g:3,t:4,p:5,e:6}[r[3]])}var S={};!function(t){const e=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+e+"]["+e+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",n=new RegExp("^"+r+"$");t.isExist=function(t){return void 0!==t},t.isEmptyObject=function(t){return 0===Object.keys(t).length},t.merge=function(t,e,r){if(e){const n=Object.keys(e),o=n.length;for(let i=0;i!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};F.buildOptions=function(t){return Object.assign({},$,t)},F.defaultOptions=$,!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat),new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var D={};function B(t,e,r){let n;const o={};for(let i=0;i0&&(o[e.textNodeName]=n):void 0!==n&&(o[e.textNodeName]=n),o}function q(t){const e=Object.keys(t);for(let t=0;t`,i=!1;continue}if(u===e.commentPropName){o+=n+`\x3c!--${a[u][0][e.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const t=J(a[":@"],e),r="?xml"===u?"":n;let s=a[u][0][e.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${t}?>`,i=!0;continue}let p=n;""!==p&&(p+=e.indentBy);const d=n+`<${u}${J(a[":@"],e)}`,l=H(a[u],e,c,p);-1!==e.unpairedTags.indexOf(u)?e.suppressUnpairedNode?o+=d+">":o+=d+"/>":l&&0!==l.length||!e.suppressEmptyNode?l&&l.endsWith(">")?o+=d+`>${l}${n}`:(o+=d+">",l&&""!==n&&(l.includes("/>")||l.includes("`):o+=d+"/>",i=!0}return o}function z(t){const e=Object.keys(t);for(let r=0;r0&&e.processEntities)for(let r=0;r0&&(r="\n"),H(t,e,"",r)},X={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Z(t){this.options=Object.assign({},X,t),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=rt),this.processTextOrObjNode=tt,this.options.format?(this.indentate=et,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function tt(t,e,r){const n=this.j2x(t,r+1);return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,n.attrStr,r):this.buildObjectNode(n.val,e,n.attrStr,r)}function et(t){return this.options.indentBy.repeat(t)}function rt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}Z.prototype.build=function(t){return this.options.preserveOrder?Q(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},Z.prototype.j2x=function(t,e){let r="",n="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(n+="");else if(null===t[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)n+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+t[o]);else if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);n+=this.replaceEntitiesValue(e)}else n+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const r=t[o].length;let i="";for(let s=0;s"+t+o}},Z.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+o+"0&&this.options.processEntities)for(let e=0;e{if(!r){var i=1/0;for(p=0;p=o)&&Object.keys(a.O).every((t=>a.O[t](r[u])))?r.splice(u--,1):(s=!1,o0&&e[p-1][2]>o;p--)e[p]=e[p-1];e[p]=[r,n,o]},a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,r)=>(a.f[r](t,e),e)),[])),a.u=t=>(({3239:"settings-users",4529:"settings-apps-view"}[t]||t)+"-"+t+".js?v="+{1110:"2909496e7e35d6258214",3239:"840dea09a2ae7fa5cda6",4529:"1c12345652ab9d108a9c",8902:"bb051769bbf8ba8e1826"}[t]),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},o="nextcloud:",a.l=(t,e,n,i)=>{if(r[t])r[t].push(e);else{var s,u;if(void 0!==n)for(var c=document.getElementsByTagName("script"),p=0;p{s.onerror=s.onload=null,clearTimeout(h);var o=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(n))),e)return e(n)},h=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),a.j=2689,(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),(()=>{a.b=document.baseURI||self.location.href;var t={2689:0};a.f.j=(e,r)=>{var n=a.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=t[e]=[r,o]));r.push(n[2]=o);var i=a.p+a.u(e),s=new Error;a.l(i,(r=>{if(a.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,n[1](s)}}),"chunk-"+e,e)}},a.O.j=e=>0===t[e];var e=(e,r)=>{var n,o,i=r[0],s=r[1],u=r[2],c=0;if(i.some((e=>0!==t[e]))){for(n in s)a.o(s,n)&&(a.m[n]=s[n]);if(u)var p=u(a)}for(e&&e(r);ca(32843)));u=a.O(u)})(); +//# sourceMappingURL=settings-vue-settings-apps-users-management.js.map?v=24750fe22a1a5a48166a \ No newline at end of file diff --git a/dist/settings-vue-settings-apps-users-management.js.map b/dist/settings-vue-settings-apps-users-management.js.map index b126ba8ab30e5..b8d7e14da1ca5 100644 --- a/dist/settings-vue-settings-apps-users-management.js.map +++ b/dist/settings-vue-settings-apps-users-management.js.map @@ -1 +1 @@ -{"version":3,"file":"settings-vue-settings-apps-users-management.js?v=81c9c3788f8e2420812a","mappings":";UAAIA,ECAAC,EACAC,kECwBG,MAAMC,EAAoBC,OAAOC,OAAO,CAC9CC,WAAWC,EAAAA,EAAAA,IAAE,WAAY,aACzBC,SAASD,EAAAA,EAAAA,IAAE,WAAY,eACvBE,UAAUF,EAAAA,EAAAA,IAAE,WAAY,iBACxBG,SAASH,EAAAA,EAAAA,IAAE,WAAY,WACvB,eAAeA,EAAAA,EAAAA,IAAE,WAAY,eAC7BI,UAAUJ,EAAAA,EAAAA,IAAE,WAAY,iBACxBK,WAAWL,EAAAA,EAAAA,IAAE,WAAY,mECR1B,SAAeM,WAAAA,MACbC,OAAO,YACPC,aACAC,2ECAF,MC3ByK,ED2BzK,CACAC,KAAA,MACAC,WAAAA,GAGA,OADAC,SAAAC,eAAA,eAEA,KAAAC,OAAAC,OAAA,gBAAAC,KAAAC,MAAAL,SAAAC,eAAA,cAAAK,QAAAC,QAEA,GEjBA,GAXgB,cACd,GCRW,WAA+C,OAAOC,EAA5BC,KAAYC,MAAMF,IAAa,cACtE,GACsB,IDSpB,EACA,KACA,KACA,MAI8B,uBEChC,SAASG,EAAQC,EAAGC,GAClB,IAAK,IAAIC,KAAOD,EACdD,EAAEE,GAAOD,EAAEC,GAEb,OAAOF,CACT,CAIA,IAAIG,EAAkB,WAClBC,EAAwB,SAAUC,GAAK,MAAO,IAAMA,E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D,EAAoBM,OAAEpgC,EAAW,CAAC,OAAO,IAAO8/B,EAAoB,SAC9F+D,EAAsB/D,EAAoBM,EAAEyD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/settings/src/constants/AppsConstants.js","webpack:///nextcloud/apps/settings/src/logger.js","webpack:///nextcloud/apps/settings/src/App.vue","webpack:///nextcloud/apps/settings/src/App.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/settings/src/App.vue?536c","webpack://nextcloud/./apps/settings/src/App.vue?4d15","webpack:///nextcloud/node_modules/vue-router/dist/vue-router.esm.js","webpack:///nextcloud/apps/settings/src/store/api.js","webpack:///nextcloud/apps/settings/src/store/users.js","webpack:///nextcloud/apps/settings/src/store/apps.js","webpack:///nextcloud/apps/settings/src/store/settings.js","webpack:///nextcloud/apps/settings/src/store/oc.js","webpack:///nextcloud/apps/settings/src/store/index.js","webpack:///nextcloud/core/src/OCP/accessibility.js","webpack:///nextcloud/apps/settings/src/router.js","webpack:///nextcloud/apps/settings/src/main-apps-users-management.js","webpack:///nextcloud/node_modules/vuex-router-sync/index.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright 2022, Julia Kirschenheuter \n *\n * @author Julia Kirschenheuter \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { translate as t } from '@nextcloud/l10n'\n\n/** Enum of verification constants, according to Apps */\nexport const APPS_SECTION_ENUM = Object.freeze({\n\tinstalled: t('settings', 'Your apps'),\n\tenabled: t('settings', 'Active apps'),\n\tdisabled: t('settings', 'Disabled apps'),\n\tupdates: t('settings', 'Updates'),\n\t'app-bundles': t('settings', 'App bundles'),\n\tfeatured: t('settings', 'Featured apps'),\n\tsupported: t('settings', 'Supported apps'), // From subscription\n})\n","/**\n * @copyright 2020 Christoph Wurst \n *\n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('settings')\n\t.detectUser()\n\t.build()\n","\n\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=50420604\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\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 render(){var _vm=this,_c=_vm._self._c;return _c('router-view')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*!\n * vue-router v3.6.5\n * (c) 2022 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error((\"[vue-router] \" + message))\n }\n}\n\nfunction warn (condition, message) {\n if (!condition) {\n typeof console !== 'undefined' && console.warn((\"[vue-router] \" + message));\n }\n}\n\nfunction extend (a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a\n}\n\n/* */\n\nvar encodeReserveRE = /[!'()*]/g;\nvar encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };\nvar commaRE = /%2C/g;\n\n// fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\nvar encode = function (str) { return encodeURIComponent(str)\n .replace(encodeReserveRE, encodeReserveReplacer)\n .replace(commaRE, ','); };\n\nfunction decode (str) {\n try {\n return decodeURIComponent(str)\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"Error decoding \\\"\" + str + \"\\\". Leaving it intact.\"));\n }\n }\n return str\n}\n\nfunction resolveQuery (\n query,\n extraQuery,\n _parseQuery\n) {\n if ( extraQuery === void 0 ) extraQuery = {};\n\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n process.env.NODE_ENV !== 'production' && warn(false, e.message);\n parsedQuery = {};\n }\n for (var key in extraQuery) {\n var value = extraQuery[key];\n parsedQuery[key] = Array.isArray(value)\n ? value.map(castQueryParamValue)\n : castQueryParamValue(value);\n }\n return parsedQuery\n}\n\nvar castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };\n\nfunction parseQuery (query) {\n var res = {};\n\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n\n return res\n}\n\nfunction stringifyQuery (obj) {\n var res = obj\n ? Object.keys(obj)\n .map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return ''\n }\n\n if (val === null) {\n return encode(key)\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return\n }\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&')\n }\n\n return encode(key) + '=' + encode(val)\n })\n .filter(function (x) { return x.length > 0; })\n .join('&')\n : null;\n return res ? (\"?\" + res) : ''\n}\n\n/* */\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute (\n record,\n location,\n redirectedFrom,\n router\n) {\n var stringifyQuery = router && router.options.stringifyQuery;\n\n var query = location.query || {};\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || (record && record.name),\n meta: (record && record.meta) || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery),\n matched: record ? formatMatch(record) : []\n };\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);\n }\n return Object.freeze(route)\n}\n\nfunction clone (value) {\n if (Array.isArray(value)) {\n return value.map(clone)\n } else if (value && typeof value === 'object') {\n var res = {};\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n return res\n } else {\n return value\n }\n}\n\n// the starting route that represents the initial state\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch (record) {\n var res = [];\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n return res\n}\n\nfunction getFullPath (\n ref,\n _stringifyQuery\n) {\n var path = ref.path;\n var query = ref.query; if ( query === void 0 ) query = {};\n var hash = ref.hash; if ( hash === void 0 ) hash = '';\n\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash\n}\n\nfunction isSameRoute (a, b, onlyPath) {\n if (b === START) {\n return a === b\n } else if (!b) {\n return false\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query))\n } else if (a.name && b.name) {\n return (\n a.name === b.name &&\n (onlyPath || (\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query) &&\n isObjectEqual(a.params, b.params))\n )\n )\n } else {\n return false\n }\n}\n\nfunction isObjectEqual (a, b) {\n if ( a === void 0 ) a = {};\n if ( b === void 0 ) b = {};\n\n // handle null value #1566\n if (!a || !b) { return a === b }\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n if (aKeys.length !== bKeys.length) {\n return false\n }\n return aKeys.every(function (key, i) {\n var aVal = a[key];\n var bKey = bKeys[i];\n if (bKey !== key) { return false }\n var bVal = b[key];\n // query values can be null and undefined\n if (aVal == null || bVal == null) { return aVal === bVal }\n // check nested equality\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal)\n }\n return String(aVal) === String(bVal)\n })\n}\n\nfunction isIncludedRoute (current, target) {\n return (\n current.path.replace(trailingSlashRE, '/').indexOf(\n target.path.replace(trailingSlashRE, '/')\n ) === 0 &&\n (!target.hash || current.hash === target.hash) &&\n queryIncludes(current.query, target.query)\n )\n}\n\nfunction queryIncludes (current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false\n }\n }\n return true\n}\n\nfunction handleRouteEntered (route) {\n for (var i = 0; i < route.matched.length; i++) {\n var record = route.matched[i];\n for (var name in record.instances) {\n var instance = record.instances[name];\n var cbs = record.enteredCbs[name];\n if (!instance || !cbs) { continue }\n delete record.enteredCbs[name];\n for (var i$1 = 0; i$1 < cbs.length; i$1++) {\n if (!instance._isBeingDestroyed) { cbs[i$1](instance); }\n }\n }\n }\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render (_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n // used by devtools to display a router-view badge\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode ? parent.$vnode.data : {};\n if (vnodeData.routerView) {\n depth++;\n }\n if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n var cachedData = cache[name];\n var cachedComponent = cachedData && cachedData.component;\n if (cachedComponent) {\n // #2301\n // pass props\n if (cachedData.configProps) {\n fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);\n }\n return h(cachedComponent, data, children)\n } else {\n // render previous empty view\n return h()\n }\n }\n\n var matched = route.matched[depth];\n var component = matched && matched.components[name];\n\n // render empty node if no matched route or no config component\n if (!matched || !component) {\n cache[name] = null;\n return h()\n }\n\n // cache component\n cache[name] = { component: component };\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (\n (val && current !== vm) ||\n (!val && current === vm)\n ) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // register instance in init hook\n // in case kept-alive component be actived when routes changed\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive &&\n vnode.componentInstance &&\n vnode.componentInstance !== matched.instances[name]\n ) {\n matched.instances[name] = vnode.componentInstance;\n }\n\n // if the route transition has already been confirmed then we weren't\n // able to call the cbs during confirmation as the component was not\n // registered yet, so we call it here.\n handleRouteEntered(route);\n };\n\n var configProps = matched.props && matched.props[name];\n // save route and configProps in cache\n if (configProps) {\n extend(cache[name], {\n route: route,\n configProps: configProps\n });\n fillPropsinData(component, data, route, configProps);\n }\n\n return h(component, data, children)\n }\n};\n\nfunction fillPropsinData (component, data, route, configProps) {\n // resolve props\n var propsToPass = data.props = resolveProps(route, configProps);\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass);\n // pass non-declared props as attrs\n var attrs = data.attrs = data.attrs || {};\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n}\n\nfunction resolveProps (route, config) {\n switch (typeof config) {\n case 'undefined':\n return\n case 'object':\n return config\n case 'function':\n return config(route)\n case 'boolean':\n return config ? route.params : undefined\n default:\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n \"props in \\\"\" + (route.path) + \"\\\" is a \" + (typeof config) + \", \" +\n \"expecting an object, function or boolean.\"\n );\n }\n }\n}\n\n/* */\n\nfunction resolvePath (\n relative,\n base,\n append\n) {\n var firstChar = relative.charAt(0);\n if (firstChar === '/') {\n return relative\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative\n }\n\n var stack = base.split('/');\n\n // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n }\n\n // resolve relative path\n var segments = relative.replace(/^\\//, '').split('/');\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n }\n\n // ensure leading slash\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/')\n}\n\nfunction parsePath (path) {\n var hash = '';\n var query = '';\n\n var hashIndex = path.indexOf('#');\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction cleanPath (path) {\n return path.replace(/\\/(?:\\s*\\/)+/g, '/')\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/* */\n\n// $flow-disable-line\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams (\n path,\n params,\n routeMsg\n) {\n params = params || {};\n try {\n var filler =\n regexpCompileCache[path] ||\n (regexpCompileCache[path] = pathToRegexp_1.compile(path));\n\n // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string\n if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }\n\n return filler(params, { pretty: true })\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n // Fix #3072 no warn if `pathMatch` is string\n warn(typeof params.pathMatch === 'string', (\"missing param for \" + routeMsg + \": \" + (e.message)));\n }\n return ''\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n\n/* */\n\nfunction normalizeLocation (\n raw,\n current,\n append,\n router\n) {\n var next = typeof raw === 'string' ? { path: raw } : raw;\n // named target\n if (next._normalized) {\n return next\n } else if (next.name) {\n next = extend({}, raw);\n var params = next.params;\n if (params && typeof params === 'object') {\n next.params = extend({}, params);\n }\n return next\n }\n\n // relative params\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params$1 = extend(extend({}, current.params), next.params);\n if (current.name) {\n next.name = current.name;\n next.params = params$1;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params$1, (\"path \" + (current.path)));\n } else if (process.env.NODE_ENV !== 'production') {\n warn(false, \"relative params navigation requires a current route.\");\n }\n return next\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = (current && current.path) || '/';\n var path = parsedPath.path\n ? resolvePath(parsedPath.path, basePath, append || next.append)\n : basePath;\n\n var query = resolveQuery(\n parsedPath.query,\n next.query,\n router && router.options.parseQuery\n );\n\n var hash = next.hash || parsedPath.hash;\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n }\n}\n\n/* */\n\n// work around weird flow bug\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar noop = function () {};\n\nvar warnedCustomSlot;\nvar warnedTagProp;\nvar warnedEventProp;\n\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n custom: Boolean,\n exact: Boolean,\n exactPath: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n ariaCurrentValue: {\n type: String,\n default: 'page'\n },\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render (h) {\n var this$1$1 = this;\n\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(\n this.to,\n current,\n this.append\n );\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass;\n // Support global empty active class\n var activeClassFallback =\n globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback =\n globalExactActiveClass == null\n ? 'router-link-exact-active'\n : globalExactActiveClass;\n var activeClass =\n this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass =\n this.exactActiveClass == null\n ? exactActiveClassFallback\n : this.exactActiveClass;\n\n var compareTarget = route.redirectedFrom\n ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)\n : route;\n\n classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);\n classes[activeClass] = this.exact || this.exactPath\n ? classes[exactActiveClass]\n : isIncludedRoute(current, compareTarget);\n\n var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1$1.replace) {\n router.replace(location, noop);\n } else {\n router.push(location, noop);\n }\n }\n };\n\n var on = { click: guardEvent };\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = { class: classes };\n\n var scopedSlot =\n !this.$scopedSlots.$hasNormal &&\n this.$scopedSlots.default &&\n this.$scopedSlots.default({\n href: href,\n route: route,\n navigate: handler,\n isActive: classes[activeClass],\n isExactActive: classes[exactActiveClass]\n });\n\n if (scopedSlot) {\n if (process.env.NODE_ENV !== 'production' && !this.custom) {\n !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an element. Use the custom prop to remove this warning:\\n\\n');\n warnedCustomSlot = true;\n }\n if (scopedSlot.length === 1) {\n return scopedSlot[0]\n } else if (scopedSlot.length > 1 || !scopedSlot.length) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n (\" with to=\\\"\" + (this.to) + \"\\\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.\")\n );\n }\n return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if ('tag' in this.$options.propsData && !warnedTagProp) {\n warn(\n false,\n \"'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedTagProp = true;\n }\n if ('event' in this.$options.propsData && !warnedEventProp) {\n warn(\n false,\n \"'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedEventProp = true;\n }\n }\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = { href: href, 'aria-current': ariaCurrentValue };\n } else {\n // find the first child and apply listener and href\n var a = findAnchor(this.$slots.default);\n if (a) {\n // in case the is a static node\n a.isStatic = false;\n var aData = (a.data = extend({}, a.data));\n aData.on = aData.on || {};\n // transform existing events in both objects into arrays so we can push later\n for (var event in aData.on) {\n var handler$1 = aData.on[event];\n if (event in on) {\n aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];\n }\n }\n // append new listeners for router-link\n for (var event$1 in on) {\n if (event$1 in aData.on) {\n // on[event] is always a function\n aData.on[event$1].push(on[event$1]);\n } else {\n aData.on[event$1] = handler;\n }\n }\n\n var aAttrs = (a.data.attrs = extend({}, a.data.attrs));\n aAttrs.href = href;\n aAttrs['aria-current'] = ariaCurrentValue;\n } else {\n // doesn't have child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default)\n }\n};\n\nfunction guardEvent (e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }\n // don't redirect when preventDefault called\n if (e.defaultPrevented) { return }\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) { return }\n // don't redirect if `target=\"_blank\"`\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target)) { return }\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault) {\n e.preventDefault();\n }\n return true\n}\n\nfunction findAnchor (children) {\n if (children) {\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.tag === 'a') {\n return child\n }\n if (child.children && (child = findAnchor(child.children))) {\n return child\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install (Vue) {\n if (install.installed && _Vue === Vue) { return }\n install.installed = true;\n\n _Vue = Vue;\n\n var isDef = function (v) { return v !== undefined; };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n this._router.init(this);\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;\n }\n registerInstance(this, this);\n },\n destroyed: function destroyed () {\n registerInstance(this);\n }\n });\n\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get () { return this._routerRoot._router }\n });\n\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get () { return this._routerRoot._route }\n });\n\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n\n var strats = Vue.config.optionMergeStrategies;\n // use the same hook merging strategy for route hooks\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n\n/* */\n\nvar inBrowser = typeof window !== 'undefined';\n\n/* */\n\nfunction createRouteMap (\n routes,\n oldPathList,\n oldPathMap,\n oldNameMap,\n parentRoute\n) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || [];\n // $flow-disable-line\n var pathMap = oldPathMap || Object.create(null);\n // $flow-disable-line\n var nameMap = oldNameMap || Object.create(null);\n\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);\n });\n\n // ensure wildcard routes are always at the end\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n // warn if routes do not include leading slashes\n var found = pathList\n // check for missing leading slash\n .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });\n\n if (found.length > 0) {\n var pathNames = found.map(function (path) { return (\"- \" + path); }).join('\\n');\n warn(false, (\"Non-nested routes must include a leading slash character. Fix the following routes: \\n\" + pathNames));\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n }\n}\n\nfunction addRouteRecord (\n pathList,\n pathMap,\n nameMap,\n route,\n parent,\n matchAs\n) {\n var path = route.path;\n var name = route.name;\n if (process.env.NODE_ENV !== 'production') {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(\n typeof route.component !== 'string',\n \"route config \\\"component\\\" for path: \" + (String(\n path || name\n )) + \" cannot be a \" + \"string id. Use an actual component instead.\"\n );\n\n warn(\n // eslint-disable-next-line no-control-regex\n !/[^\\u0000-\\u007F]+/.test(path),\n \"Route with path \\\"\" + path + \"\\\" contains unencoded characters, make sure \" +\n \"your path is correctly encoded before passing it to the router. Use \" +\n \"encodeURI to encode static segments of your path.\"\n );\n }\n\n var pathToRegexpOptions =\n route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || { default: route.component },\n alias: route.alias\n ? typeof route.alias === 'string'\n ? [route.alias]\n : route.alias\n : [],\n instances: {},\n enteredCbs: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props:\n route.props == null\n ? {}\n : route.components\n ? route.props\n : { default: route.props }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (process.env.NODE_ENV !== 'production') {\n if (\n route.name &&\n !route.redirect &&\n route.children.some(function (child) { return /^\\/?$/.test(child.path); })\n ) {\n warn(\n false,\n \"Named Route '\" + (route.name) + \"' has a default child route. \" +\n \"When navigating to this named route (:to=\\\"{name: '\" + (route.name) + \"'}\\\"), \" +\n \"the default child route will not be rendered. Remove the name from \" +\n \"this route and use the name of the default child route for named \" +\n \"links instead.\"\n );\n }\n }\n route.children.forEach(function (child) {\n var childMatchAs = matchAs\n ? cleanPath((matchAs + \"/\" + (child.path)))\n : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n for (var i = 0; i < aliases.length; ++i) {\n var alias = aliases[i];\n if (process.env.NODE_ENV !== 'production' && alias === path) {\n warn(\n false,\n (\"Found an alias with the same value as the path: \\\"\" + path + \"\\\". You have to remove that alias. It will be ignored in development.\")\n );\n // skip in dev to make it work\n continue\n }\n\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(\n pathList,\n pathMap,\n nameMap,\n aliasRoute,\n parent,\n record.path || '/' // matchAs\n );\n }\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if (process.env.NODE_ENV !== 'production' && !matchAs) {\n warn(\n false,\n \"Duplicate named routes definition: \" +\n \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + (record.path) + \"\\\" }\"\n );\n }\n }\n}\n\nfunction compileRouteRegex (\n path,\n pathToRegexpOptions\n) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n if (process.env.NODE_ENV !== 'production') {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(\n !keys[key.name],\n (\"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\")\n );\n keys[key.name] = true;\n });\n }\n return regex\n}\n\nfunction normalizePath (\n path,\n parent,\n strict\n) {\n if (!strict) { path = path.replace(/\\/$/, ''); }\n if (path[0] === '/') { return path }\n if (parent == null) { return path }\n return cleanPath(((parent.path) + \"/\" + path))\n}\n\n/* */\n\n\n\nfunction createMatcher (\n routes,\n router\n) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes (routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function addRoute (parentOrRoute, route) {\n var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;\n // $flow-disable-line\n createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);\n\n // add aliases of parent\n if (parent && parent.alias.length) {\n createRouteMap(\n // $flow-disable-line route is defined if parent is\n parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),\n pathList,\n pathMap,\n nameMap,\n parent\n );\n }\n }\n\n function getRoutes () {\n return pathList.map(function (path) { return pathMap[path]; })\n }\n\n function match (\n raw,\n currentRoute,\n redirectedFrom\n ) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n warn(record, (\"Route with name '\" + name + \"' does not exist\"));\n }\n if (!record) { return _createRoute(null, location) }\n var paramNames = record.regex.keys\n .filter(function (key) { return !key.optional; })\n .map(function (key) { return key.name; });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n location.path = fillParams(record.path, location.params, (\"named route \\\"\" + name + \"\\\"\"));\n return _createRoute(record, location, redirectedFrom)\n } else if (location.path) {\n location.params = {};\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom)\n }\n }\n }\n // no match\n return _createRoute(null, location)\n }\n\n function redirect (\n record,\n location\n ) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function'\n ? originalRedirect(createRoute(record, location, null, router))\n : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = { path: redirect };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false, (\"invalid redirect option: \" + (JSON.stringify(redirect)))\n );\n }\n return _createRoute(null, location)\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n assert(targetRecord, (\"redirect failed: named route \\\"\" + name + \"\\\" not found.\"));\n }\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location)\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record);\n // 2. resolve params\n var resolvedPath = fillParams(rawPath, params, (\"redirect route with path \\\"\" + rawPath + \"\\\"\"));\n // 3. rematch with existing query and hash\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location)\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"invalid redirect option: \" + (JSON.stringify(redirect))));\n }\n return _createRoute(null, location)\n }\n }\n\n function alias (\n record,\n location,\n matchAs\n ) {\n var aliasedPath = fillParams(matchAs, location.params, (\"aliased route with path \\\"\" + matchAs + \"\\\"\"));\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location)\n }\n return _createRoute(null, location)\n }\n\n function _createRoute (\n record,\n location,\n redirectedFrom\n ) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location)\n }\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs)\n }\n return createRoute(record, location, redirectedFrom, router)\n }\n\n return {\n match: match,\n addRoute: addRoute,\n getRoutes: getRoutes,\n addRoutes: addRoutes\n }\n}\n\nfunction matchRoute (\n regex,\n path,\n params\n) {\n var m = path.match(regex);\n\n if (!m) {\n return false\n } else if (!params) {\n return true\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];\n }\n }\n\n return true\n}\n\nfunction resolveRecordPath (path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true)\n}\n\n/* */\n\n// use User Timing api (if present) for more accurate key precision\nvar Time =\n inBrowser && window.performance && window.performance.now\n ? window.performance\n : Date;\n\nfunction genStateKey () {\n return Time.now().toFixed(3)\n}\n\nvar _key = genStateKey();\n\nfunction getStateKey () {\n return _key\n}\n\nfunction setStateKey (key) {\n return (_key = key)\n}\n\n/* */\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll () {\n // Prevent browser scroll behavior on History popstate\n if ('scrollRestoration' in window.history) {\n window.history.scrollRestoration = 'manual';\n }\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with\n // window.location.protocol + '//' + window.location.host\n // location.host contains the port and location.hostname doesn't\n var protocolAndPath = window.location.protocol + '//' + window.location.host;\n var absolutePath = window.location.href.replace(protocolAndPath, '');\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, window.history.state);\n stateCopy.key = getStateKey();\n window.history.replaceState(stateCopy, '', absolutePath);\n window.addEventListener('popstate', handlePopState);\n return function () {\n window.removeEventListener('popstate', handlePopState);\n }\n}\n\nfunction handleScroll (\n router,\n to,\n from,\n isPop\n) {\n if (!router.app) {\n return\n }\n\n var behavior = router.options.scrollBehavior;\n if (!behavior) {\n return\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n }\n\n // wait until re-render finishes before scrolling\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(\n router,\n to,\n from,\n isPop ? position : null\n );\n\n if (!shouldScroll) {\n return\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll\n .then(function (shouldScroll) {\n scrollToPosition((shouldScroll), position);\n })\n .catch(function (err) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition () {\n var key = getStateKey();\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction handlePopState (e) {\n saveScrollPosition();\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n}\n\nfunction getScrollPosition () {\n var key = getStateKey();\n if (key) {\n return positionStore[key]\n }\n}\n\nfunction getElementPosition (el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n }\n}\n\nfunction isValidPosition (obj) {\n return isNumber(obj.x) || isNumber(obj.y)\n}\n\nfunction normalizePosition (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n }\n}\n\nfunction normalizeOffset (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n }\n}\n\nfunction isNumber (v) {\n return typeof v === 'number'\n}\n\nvar hashStartsWithNumberRE = /^#\\d/;\n\nfunction scrollToPosition (shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n if (isObject && typeof shouldScroll.selector === 'string') {\n // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]\n // but at the same time, it doesn't make much sense to select an element with an id and an extra selector\n var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line\n ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line\n : document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset =\n shouldScroll.offset && typeof shouldScroll.offset === 'object'\n ? shouldScroll.offset\n : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n // $flow-disable-line\n if ('scrollBehavior' in document.documentElement.style) {\n window.scrollTo({\n left: position.x,\n top: position.y,\n // $flow-disable-line\n behavior: shouldScroll.behavior\n });\n } else {\n window.scrollTo(position.x, position.y);\n }\n }\n}\n\n/* */\n\nvar supportsPushState =\n inBrowser &&\n (function () {\n var ua = window.navigator.userAgent;\n\n if (\n (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n ) {\n return false\n }\n\n return window.history && typeof window.history.pushState === 'function'\n })();\n\nfunction pushState (url, replace) {\n saveScrollPosition();\n // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n var history = window.history;\n try {\n if (replace) {\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, history.state);\n stateCopy.key = getStateKey();\n history.replaceState(stateCopy, '', url);\n } else {\n history.pushState({ key: setStateKey(genStateKey()) }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState (url) {\n pushState(url, true);\n}\n\n// When changing thing, also edit router.d.ts\nvar NavigationFailureType = {\n redirected: 2,\n aborted: 4,\n cancelled: 8,\n duplicated: 16\n};\n\nfunction createNavigationRedirectedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.redirected,\n (\"Redirected when going from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (stringifyRoute(\n to\n )) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createNavigationDuplicatedError (from, to) {\n var error = createRouterError(\n from,\n to,\n NavigationFailureType.duplicated,\n (\"Avoided redundant navigation to current location: \\\"\" + (from.fullPath) + \"\\\".\")\n );\n // backwards compatible with the first introduction of Errors\n error.name = 'NavigationDuplicated';\n return error\n}\n\nfunction createNavigationCancelledError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.cancelled,\n (\"Navigation cancelled from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" with a new navigation.\")\n )\n}\n\nfunction createNavigationAbortedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.aborted,\n (\"Navigation aborted from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createRouterError (from, to, type, message) {\n var error = new Error(message);\n error._isRouter = true;\n error.from = from;\n error.to = to;\n error.type = type;\n\n return error\n}\n\nvar propertiesToLog = ['params', 'query', 'hash'];\n\nfunction stringifyRoute (to) {\n if (typeof to === 'string') { return to }\n if ('path' in to) { return to.path }\n var location = {};\n propertiesToLog.forEach(function (key) {\n if (key in to) { location[key] = to[key]; }\n });\n return JSON.stringify(location, null, 2)\n}\n\nfunction isError (err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1\n}\n\nfunction isNavigationFailure (err, errorType) {\n return (\n isError(err) &&\n err._isRouter &&\n (errorType == null || err.type === errorType)\n )\n}\n\n/* */\n\nfunction runQueue (queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n step(0);\n}\n\n/* */\n\nfunction resolveAsyncComponents (matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n }\n // save resolved on async factory in case it's used elsewhere\n def.resolved = typeof resolvedDef === 'function'\n ? resolvedDef\n : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n if (pending <= 0) {\n next();\n }\n });\n\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n process.env.NODE_ENV !== 'production' && warn(false, msg);\n if (!error) {\n error = isError(reason)\n ? reason\n : new Error(msg);\n next(error);\n }\n });\n\n var res;\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) { next(); }\n }\n}\n\nfunction flatMapComponents (\n matched,\n fn\n) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) { return fn(\n m.components[key],\n m.instances[key],\n m, key\n ); })\n }))\n}\n\nfunction flatten (arr) {\n return Array.prototype.concat.apply([], arr)\n}\n\nvar hasSymbol =\n typeof Symbol === 'function' &&\n typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule (obj) {\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')\n}\n\n// in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\nfunction once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}\n\n/* */\n\nvar History = function History (router, base) {\n this.router = router;\n this.base = normalizeBase(base);\n // start with a route object that stands for \"nowhere\"\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n this.listeners = [];\n};\n\nHistory.prototype.listen = function listen (cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady (cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError (errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo (\n location,\n onComplete,\n onAbort\n) {\n var this$1$1 = this;\n\n var route;\n // catch redirect option https://github.com/vuejs/vue-router/issues/3201\n try {\n route = this.router.match(location, this.current);\n } catch (e) {\n this.errorCbs.forEach(function (cb) {\n cb(e);\n });\n // Exception should still be thrown\n throw e\n }\n var prev = this.current;\n this.confirmTransition(\n route,\n function () {\n this$1$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1$1.ensureURL();\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n\n // fire ready cbs once\n if (!this$1$1.ready) {\n this$1$1.ready = true;\n this$1$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n },\n function (err) {\n if (onAbort) {\n onAbort(err);\n }\n if (err && !this$1$1.ready) {\n // Initial redirection should not mark the history as ready yet\n // because it's triggered by the redirection instead\n // https://github.com/vuejs/vue-router/issues/3225\n // https://github.com/vuejs/vue-router/issues/3331\n if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {\n this$1$1.ready = true;\n this$1$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n }\n }\n );\n};\n\nHistory.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {\n var this$1$1 = this;\n\n var current = this.current;\n this.pending = route;\n var abort = function (err) {\n // changed after adding errors with\n // https://github.com/vuejs/vue-router/pull/3047 before that change,\n // redirect and aborted navigation would produce an err == null\n if (!isNavigationFailure(err) && isError(err)) {\n if (this$1$1.errorCbs.length) {\n this$1$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'uncaught error during route navigation:');\n }\n console.error(err);\n }\n }\n onAbort && onAbort(err);\n };\n var lastRouteIndex = route.matched.length - 1;\n var lastCurrentIndex = current.matched.length - 1;\n if (\n isSameRoute(route, current) &&\n // in the case the route map has been dynamically appended to\n lastRouteIndex === lastCurrentIndex &&\n route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]\n ) {\n this.ensureURL();\n if (route.hash) {\n handleScroll(this.router, current, route, false);\n }\n return abort(createNavigationDuplicatedError(current, route))\n }\n\n var ref = resolveQueue(\n this.current.matched,\n route.matched\n );\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n\n var queue = [].concat(\n // in-component leave guards\n extractLeaveGuards(deactivated),\n // global before hooks\n this.router.beforeHooks,\n // in-component update hooks\n extractUpdateHooks(updated),\n // in-config enter guards\n activated.map(function (m) { return m.beforeEnter; }),\n // async components\n resolveAsyncComponents(activated)\n );\n\n var iterator = function (hook, next) {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n try {\n hook(route, current, function (to) {\n if (to === false) {\n // next(false) -> abort navigation, ensure current URL\n this$1$1.ensureURL(true);\n abort(createNavigationAbortedError(current, route));\n } else if (isError(to)) {\n this$1$1.ensureURL(true);\n abort(to);\n } else if (\n typeof to === 'string' ||\n (typeof to === 'object' &&\n (typeof to.path === 'string' || typeof to.name === 'string'))\n ) {\n // next('/') or next({ path: '/' }) -> redirect\n abort(createNavigationRedirectedError(current, route));\n if (typeof to === 'object' && to.replace) {\n this$1$1.replace(to);\n } else {\n this$1$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n // wait until async components are resolved before\n // extracting in-component enter guards\n var enterGuards = extractEnterGuards(activated);\n var queue = enterGuards.concat(this$1$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n this$1$1.pending = null;\n onComplete(route);\n if (this$1$1.router.app) {\n this$1$1.router.app.$nextTick(function () {\n handleRouteEntered(route);\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute (route) {\n this.current = route;\n this.cb && this.cb(route);\n};\n\nHistory.prototype.setupListeners = function setupListeners () {\n // Default implementation is empty\n};\n\nHistory.prototype.teardown = function teardown () {\n // clean up event listeners\n // https://github.com/vuejs/vue-router/issues/2341\n this.listeners.forEach(function (cleanupListener) {\n cleanupListener();\n });\n this.listeners = [];\n\n // reset current history route\n // https://github.com/vuejs/vue-router/issues/3294\n this.current = START;\n this.pending = null;\n};\n\nfunction normalizeBase (base) {\n if (!base) {\n if (inBrowser) {\n // respect tag\n var baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n }\n // make sure there's the starting slash\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n }\n // remove trailing slash\n return base.replace(/\\/$/, '')\n}\n\nfunction resolveQueue (\n current,\n next\n) {\n var i;\n var max = Math.max(current.length, next.length);\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break\n }\n }\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n }\n}\n\nfunction extractGuards (\n records,\n name,\n bind,\n reverse\n) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n if (guard) {\n return Array.isArray(guard)\n ? guard.map(function (guard) { return bind(guard, instance, match, key); })\n : bind(guard, instance, match, key)\n }\n });\n return flatten(reverse ? guards.reverse() : guards)\n}\n\nfunction extractGuard (\n def,\n key\n) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n return def.options[key]\n}\n\nfunction extractLeaveGuards (deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)\n}\n\nfunction extractUpdateHooks (updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard)\n}\n\nfunction bindGuard (guard, instance) {\n if (instance) {\n return function boundRouteGuard () {\n return guard.apply(instance, arguments)\n }\n }\n}\n\nfunction extractEnterGuards (\n activated\n) {\n return extractGuards(\n activated,\n 'beforeRouteEnter',\n function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key)\n }\n )\n}\n\nfunction bindEnterGuard (\n guard,\n match,\n key\n) {\n return function routeEnterGuard (to, from, next) {\n return guard(to, from, function (cb) {\n if (typeof cb === 'function') {\n if (!match.enteredCbs[key]) {\n match.enteredCbs[key] = [];\n }\n match.enteredCbs[key].push(cb);\n }\n next(cb);\n })\n }\n}\n\n/* */\n\nvar HTML5History = /*@__PURE__*/(function (History) {\n function HTML5History (router, base) {\n History.call(this, router, base);\n\n this._startLocation = getLocation(this.base);\n }\n\n if ( History ) HTML5History.__proto__ = History;\n HTML5History.prototype = Object.create( History && History.prototype );\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n\n // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n var location = getLocation(this$1$1.base);\n if (this$1$1.current === START && location === this$1$1._startLocation) {\n return\n }\n\n this$1$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n };\n window.addEventListener('popstate', handleRoutingEvent);\n this.listeners.push(function () {\n window.removeEventListener('popstate', handleRoutingEvent);\n });\n };\n\n HTML5History.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL (push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {\n return getLocation(this.base)\n };\n\n return HTML5History;\n}(History));\n\nfunction getLocation (base) {\n var path = window.location.pathname;\n var pathLowerCase = path.toLowerCase();\n var baseLowerCase = base.toLowerCase();\n // base=\"/a\" shouldn't turn path=\"/app\" into \"/a/pp\"\n // https://github.com/vuejs/vue-router/issues/3555\n // so we ensure the trailing slash in the base\n if (base && ((pathLowerCase === baseLowerCase) ||\n (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {\n path = path.slice(base.length);\n }\n return (path || '/') + window.location.search + window.location.hash\n}\n\n/* */\n\nvar HashHistory = /*@__PURE__*/(function (History) {\n function HashHistory (router, base, fallback) {\n History.call(this, router, base);\n // check history fallback deeplinking\n if (fallback && checkFallback(this.base)) {\n return\n }\n ensureSlash();\n }\n\n if ( History ) HashHistory.__proto__ = History;\n HashHistory.prototype = Object.create( History && History.prototype );\n HashHistory.prototype.constructor = HashHistory;\n\n // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n HashHistory.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n if (!ensureSlash()) {\n return\n }\n this$1$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1$1.router, route, current, true);\n }\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n };\n var eventType = supportsPushState ? 'popstate' : 'hashchange';\n window.addEventListener(\n eventType,\n handleRoutingEvent\n );\n this.listeners.push(function () {\n window.removeEventListener(eventType, handleRoutingEvent);\n });\n };\n\n HashHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL (push) {\n var current = this.current.fullPath;\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n return getHash()\n };\n\n return HashHistory;\n}(History));\n\nfunction checkFallback (base) {\n var location = getLocation(base);\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true\n }\n}\n\nfunction ensureSlash () {\n var path = getHash();\n if (path.charAt(0) === '/') {\n return true\n }\n replaceHash('/' + path);\n return false\n}\n\nfunction getHash () {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#');\n // empty path\n if (index < 0) { return '' }\n\n href = href.slice(index + 1);\n\n return href\n}\n\nfunction getUrl (path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return (base + \"#\" + path)\n}\n\nfunction pushHash (path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash (path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n\n/* */\n\nvar AbstractHistory = /*@__PURE__*/(function (History) {\n function AbstractHistory (router, base) {\n History.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if ( History ) AbstractHistory.__proto__ = History;\n AbstractHistory.prototype = Object.create( History && History.prototype );\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);\n this$1$1.index++;\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.go = function go (n) {\n var this$1$1 = this;\n\n var targetIndex = this.index + n;\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return\n }\n var route = this.stack[targetIndex];\n this.confirmTransition(\n route,\n function () {\n var prev = this$1$1.current;\n this$1$1.index = targetIndex;\n this$1$1.updateRoute(route);\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n },\n function (err) {\n if (isNavigationFailure(err, NavigationFailureType.duplicated)) {\n this$1$1.index = targetIndex;\n }\n }\n );\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/'\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL () {\n // noop\n };\n\n return AbstractHistory;\n}(History));\n\n/* */\n\n\n\nvar VueRouter = function VueRouter (options) {\n if ( options === void 0 ) options = {};\n\n if (process.env.NODE_ENV !== 'production') {\n warn(this instanceof VueRouter, \"Router must be called with the new operator.\");\n }\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n\n var mode = options.mode || 'hash';\n this.fallback =\n mode === 'history' && !supportsPushState && options.fallback !== false;\n if (this.fallback) {\n mode = 'hash';\n }\n if (!inBrowser) {\n mode = 'abstract';\n }\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break\n default:\n if (process.env.NODE_ENV !== 'production') {\n assert(false, (\"invalid mode: \" + mode));\n }\n }\n};\n\nvar prototypeAccessors = { currentRoute: { configurable: true } };\n\nVueRouter.prototype.match = function match (raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom)\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current\n};\n\nVueRouter.prototype.init = function init (app /* Vue component instance */) {\n var this$1$1 = this;\n\n process.env.NODE_ENV !== 'production' &&\n assert(\n install.installed,\n \"not installed. Make sure to call `Vue.use(VueRouter)` \" +\n \"before creating root instance.\"\n );\n\n this.apps.push(app);\n\n // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1$1.apps.indexOf(app);\n if (index > -1) { this$1$1.apps.splice(index, 1); }\n // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }\n\n if (!this$1$1.app) { this$1$1.history.teardown(); }\n });\n\n // main app previously initialized\n // return as we don't need to set up new history listener\n if (this.app) {\n return\n }\n\n this.app = app;\n\n var history = this.history;\n\n if (history instanceof HTML5History || history instanceof HashHistory) {\n var handleInitialScroll = function (routeOrError) {\n var from = history.current;\n var expectScroll = this$1$1.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll && 'fullPath' in routeOrError) {\n handleScroll(this$1$1, routeOrError, from, false);\n }\n };\n var setupListeners = function (routeOrError) {\n history.setupListeners();\n handleInitialScroll(routeOrError);\n };\n history.transitionTo(\n history.getCurrentLocation(),\n setupListeners,\n setupListeners\n );\n }\n\n history.listen(function (route) {\n this$1$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach (fn) {\n return registerHook(this.beforeHooks, fn)\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve (fn) {\n return registerHook(this.resolveHooks, fn)\n};\n\nVueRouter.prototype.afterEach = function afterEach (fn) {\n return registerHook(this.afterHooks, fn)\n};\n\nVueRouter.prototype.onReady = function onReady (cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError (errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.push(location, resolve, reject);\n })\n } else {\n this.history.push(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.replace(location, resolve, reject);\n })\n } else {\n this.history.replace(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.go = function go (n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back () {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward () {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {\n var route = to\n ? to.matched\n ? to\n : this.resolve(to).route\n : this.currentRoute;\n if (!route) {\n return []\n }\n return [].concat.apply(\n [],\n route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key]\n })\n })\n )\n};\n\nVueRouter.prototype.resolve = function resolve (\n to,\n current,\n append\n) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n }\n};\n\nVueRouter.prototype.getRoutes = function getRoutes () {\n return this.matcher.getRoutes()\n};\n\nVueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {\n this.matcher.addRoute(parentOrRoute, route);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nVueRouter.prototype.addRoutes = function addRoutes (routes) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');\n }\n this.matcher.addRoutes(routes);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties( VueRouter.prototype, prototypeAccessors );\n\nvar VueRouter$1 = VueRouter;\n\nfunction registerHook (list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n if (i > -1) { list.splice(i, 1); }\n }\n}\n\nfunction createHref (base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path\n}\n\n// We cannot remove this as it would be a breaking change\nVueRouter.install = install;\nVueRouter.version = '3.6.5';\nVueRouter.isNavigationFailure = isNavigationFailure;\nVueRouter.NavigationFailureType = NavigationFailureType;\nVueRouter.START_LOCATION = START;\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\nvar version = '3.6.5';\n\nexport { NavigationFailureType, Link as RouterLink, View as RouterView, START as START_LOCATION, VueRouter$1 as default, isNavigationFailure, version };\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n * @author Sujith Haridasan \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport axios from '@nextcloud/axios'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nconst sanitize = function(url) {\n\treturn url.replace(/\\/$/, '') // Remove last url slash\n}\n\nexport default {\n\n\t/**\n\t * This Promise is used to chain a request that require an admin password confirmation\n\t * Since chaining Promise have a very precise behavior concerning catch and then,\n\t * you'll need to be careful when using it.\n\t * e.g\n\t * // store\n\t * action(context) {\n\t * return api.requireAdmin().then((response) => {\n\t * return api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {API failure});\n\t * }).catch((error) => {requireAdmin failure});\n\t * }\n\t * // vue\n\t * this.$store.dispatch('action').then(() => {always executed})\n\t *\n\t * Since Promise.then().catch().then() will always execute the last then\n\t * this.$store.dispatch('action').then will always be executed\n\t *\n\t * If you want requireAdmin failure to also catch the API request failure\n\t * you will need to throw a new error in the api.get.catch()\n\t *\n\t * e.g\n\t * api.requireAdmin().then((response) => {\n\t * api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {throw error;});\n\t * }).catch((error) => {requireAdmin OR API failure});\n\t *\n\t * @return {Promise}\n\t */\n\trequireAdmin() {\n\t\treturn confirmPassword()\n\t},\n\tget(url, options) {\n\t\treturn axios.get(sanitize(url), options)\n\t},\n\tpost(url, data) {\n\t\treturn axios.post(sanitize(url), data)\n\t},\n\tpatch(url, data) {\n\t\treturn axios.patch(sanitize(url), data)\n\t},\n\tput(url, data) {\n\t\treturn axios.put(sanitize(url), data)\n\t},\n\tdelete(url, data) {\n\t\treturn axios.delete(sanitize(url), { params: data })\n\t},\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author Arthur Schiwon \n * @author Christoph Wurst \n * @author Daniel Calviño Sánchez \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n * @author Vincent Petry \n * @author Stephan Orbaugh \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport logger from '../logger.js'\nimport { parseFileSize } from \"@nextcloud/files\"\n\nconst orderGroups = function(groups, orderBy) {\n\t/* const SORT_USERCOUNT = 1;\n\t * const SORT_GROUPNAME = 2;\n\t * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n\t */\n\tif (orderBy === 1) {\n\t\treturn groups.sort((a, b) => a.usercount - a.disabled < b.usercount - b.disabled)\n\t} else {\n\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t}\n}\n\nconst defaults = {\n\tgroup: {\n\t\tid: '',\n\t\tname: '',\n\t\tusercount: 0,\n\t\tdisabled: 0,\n\t\tcanAdd: true,\n\t\tcanRemove: true,\n\t},\n}\n\nconst state = {\n\tusers: [],\n\tgroups: [],\n\torderBy: 1,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tdisabledUsersOffset: 0,\n\tdisabledUsersLimit: 25,\n\tuserCount: 0,\n\tshowConfig: {\n\t\tshowStoragePath: false,\n\t\tshowUserBackend: false,\n\t\tshowLastLogin: false,\n\t\tshowNewUserForm: false,\n\t\tshowLanguages: false,\n\t},\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\tconst existingUsers = state.users.map(({ id }) => id)\n\t\tconst newUsers = Object.values(usersObj)\n\t\t\t.filter(({ id }) => !existingUsers.includes(id))\n\n\t\tconst users = state.users.concat(newUsers)\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\n\t},\n\tupdateDisabledUsers(state, _usersObj) {\n\t\tstate.disabledUsersOffset += state.disabledUsersLimit\n\t},\n\tsetPasswordPolicyMinLength(state, length) {\n\t\tstate.minPasswordLength = length !== '' ? length : 0\n\t},\n\tinitGroups(state, { groups, orderBy, userCount }) {\n\t\tstate.groups = groups.map(group => Object.assign({}, defaults.group, group))\n\t\tstate.orderBy = orderBy\n\t\tstate.userCount = userCount\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\n\t},\n\taddGroup(state, { gid, displayName }) {\n\t\ttry {\n\t\t\tif (typeof state.groups.find((group) => group.id === gid) !== 'undefined') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// extend group to default values\n\t\t\tconst group = Object.assign({}, defaults.group, {\n\t\t\t\tid: gid,\n\t\t\t\tname: displayName,\n\t\t\t})\n\t\t\tstate.groups.unshift(group)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t\t} catch (e) {\n\t\t\tconsole.error('Can\\'t create group', e)\n\t\t}\n\t},\n\trenameGroup(state, { gid, displayName }) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tconst updatedGroup = state.groups[groupIndex]\n\t\t\tupdatedGroup.name = displayName\n\t\t\tstate.groups.splice(groupIndex, 1, updatedGroup)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t\t}\n\t},\n\tremoveGroup(state, gid) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tstate.groups.splice(groupIndex, 1)\n\t\t}\n\t},\n\taddUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// increase count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount++\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.push(gid)\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t},\n\tremoveUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// lower count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount--\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t},\n\taddUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.push(gid)\n\t},\n\tremoveUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\tdeleteUser(state, userid) {\n\t\tconst userIndex = state.users.findIndex(user => user.id === userid)\n\t\tthis.commit('updateUserCounts', { user: state.users[userIndex], actionType: 'remove' })\n\t\tstate.users.splice(userIndex, 1)\n\t},\n\taddUserData(state, response) {\n\t\tconst user = response.data.ocs.data\n\t\tstate.users.unshift(user)\n\t\tthis.commit('updateUserCounts', { user, actionType: 'create' })\n\t},\n\tenableDisableUser(state, { userid, enabled }) {\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\tuser.enabled = enabled\n\t\tthis.commit('updateUserCounts', { user, actionType: enabled ? 'enable' : 'disable' })\n\t},\n\t// update active/disabled counts, groups counts\n\tupdateUserCounts(state, { user, actionType }) {\n\t\t// 0 is a special value\n\t\tif (state.userCount === 0) {\n\t\t\treturn\n\t\t}\n\n\t\tconst disabledGroup = state.groups.find(group => group.id === 'disabled')\n\t\tswitch (actionType) {\n\t\tcase 'enable':\n\t\tcase 'disable':\n\t\t\tdisabledGroup.usercount += user.enabled ? -1 : 1 // update Disabled Users count\n\t\t\tstate.userCount += user.enabled ? 1 : -1 // update Active Users count\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\tgroup.disabled += user.enabled ? -1 : 1 // update group disabled count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'create':\n\t\t\tstate.userCount++ // increment Active Users count\n\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tstate.groups\n\t\t\t\t\t.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t .usercount++ // increment group total count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'remove':\n\t\t\tif (user.enabled) {\n\t\t\t\tstate.userCount-- // decrement Active Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tif (!group) {\n\t\t\t\t\t\tconsole.warn('User group ' + userGroup + ' does not exist during user removal')\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tgroup.usercount-- // decrement group total count\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdisabledGroup.usercount-- // decrement Disabled Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tgroup.disabled-- // decrement group disabled count\n\t\t\t\t})\n\t\t\t}\n\t\t\tbreak\n\t\tdefault:\n\t\t\tlogger.error(`Unknown action type in updateUserCounts: '${actionType}'`)\n\t\t\t// not throwing error to interrupt execution as this is not fatal\n\t\t}\n\t},\n\tsetUserData(state, { userid, key, value }) {\n\t\tif (key === 'quota') {\n\t\t\tconst humanValue = parseFileSize(value, true)\n\t\t\tstate.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value\n\t\t} else {\n\t\t\tstate.users.find(user => user.id === userid)[key] = value\n\t\t}\n\t},\n\n\t/**\n\t * Reset users list\n\t *\n\t * @param {object} state the store state\n\t */\n\tresetUsers(state) {\n\t\tstate.users = []\n\t\tstate.usersOffset = 0\n\t\tstate.disabledUsersOffset = 0\n\t},\n\n\tsetShowConfig(state, { key, value }) {\n\t\tstate.showConfig[key] = value\n\t},\n}\n\nconst getters = {\n\tgetUsers(state) {\n\t\treturn state.users\n\t},\n\tgetGroups(state) {\n\t\treturn state.groups\n\t},\n\tgetSubadminGroups(state) {\n\t\t// Can't be subadmin of admin or disabled\n\t\treturn state.groups.filter(group => group.id !== 'admin' && group.id !== 'disabled')\n\t},\n\tgetPasswordPolicyMinLength(state) {\n\t\treturn state.minPasswordLength\n\t},\n\tgetUsersOffset(state) {\n\t\treturn state.usersOffset\n\t},\n\tgetUsersLimit(state) {\n\t\treturn state.usersLimit\n\t},\n\tgetDisabledUsersOffset(state) {\n\t\treturn state.disabledUsersOffset\n\t},\n\tgetDisabledUsersLimit(state) {\n\t\treturn state.disabledUsersLimit\n\t},\n\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n\tgetShowConfig(state) {\n\t\treturn state.showConfig\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\n\n\t/**\n\t * search users\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @return {Promise}\n\t */\n\tsearchUsers(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search })).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get user details\n\t *\n\t * @param {object} context store context\n\t * @param {string} userId user id\n\t * @return {Promise}\n\t */\n\tgetUser(context, userId) {\n\t\treturn api.get(generateOcsUrl(`cloud/users/${userId}`)).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @param {string} options.group Get users from group\n\t * @return {Promise}\n\t */\n\tgetUsers(context, { offset, limit, search, group }) {\n\t\tif (searchRequestCancelSource) {\n\t\t\tsearchRequestCancelSource.cancel('Operation canceled by another search request.')\n\t\t}\n\t\tsearchRequestCancelSource = CancelToken.source()\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\t/**\n\t\t * Adding filters in the search bar such as in:files, in:users, etc.\n\t\t * collides with this particular search, so we need to remove them\n\t\t * here and leave only the original search query\n\t\t */\n\t\tsearch = search.replace(/in:[^\\s]+/g, '').trim()\n\n\t\tgroup = typeof group === 'string' ? group : ''\n\t\tif (group !== '') {\n\t\t\treturn api.get(generateOcsUrl('cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}', { group: encodeURIComponent(group), offset, limit, search }), {\n\t\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\t}\n\t\t\t\t\treturn usersCount\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }), {\n\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t}\n\t\t\t\treturn usersCount\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t}\n\t\t\t})\n\t},\n\n\t/**\n\t * Get disabled users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @return {Promise}\n\t */\n\tasync getDisabledUsers(context, { offset, limit, search }) {\n\t\tconst url = generateOcsUrl('cloud/users/disabled?offset={offset}&limit={limit}&search={search}', { offset, limit, search })\n\t\ttry {\n\t\t\tconst response = await api.get(url)\n\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\tif (usersCount > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\tcontext.commit('updateDisabledUsers', response.data.ocs.data.users)\n\t\t\t}\n\t\t\treturn usersCount\n\t\t} catch (error) {\n\t\t\tcontext.commit('API_FAILURE', error)\n\t\t}\n\t},\n\n\tgetGroups(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\tconst limitParam = limit === -1 ? '' : `&limit=${limit}`\n\t\treturn api.get(generateOcsUrl('cloud/groups?offset={offset}&search={search}', { offset, search }) + limitParam)\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tresponse.data.ocs.data.groups.forEach(function(group) {\n\t\t\t\t\t\tcontext.commit('addGroup', { gid: group, displayName: group })\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search -\n\t * @return {Promise}\n\t */\n\tgetUsersFromList(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }))\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details from a groupid\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.groupid -\n\t * @return {Promise}\n\t */\n\tgetUsersFromGroup(context, { groupid, offset, limit }) {\n\t\treturn api.get(generateOcsUrl('cloud/users/{groupId}/details?offset={offset}&limit={limit}', { groupId: encodeURIComponent(groupid), offset, limit }))\n\t\t\t.then((response) => context.commit('getUsersFromList', response.data.ocs.data.users))\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tgetPasswordPolicyMinLength(context) {\n\t\tif (getCapabilities().password_policy && getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', getCapabilities().password_policy.minLength)\n\t\t\treturn getCapabilities().password_policy.minLength\n\t\t}\n\t\treturn false\n\t},\n\n\t/**\n\t * Add group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\taddGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/groups'), { groupid: gid })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('addGroup', { gid, displayName: gid })\n\t\t\t\t\treturn { gid, displayName: gid }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { gid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from adding the user to a group that doesn't exists\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Rename group\n\t *\n\t * @param {object} context store context\n\t * @param {string} groupid Group id\n\t * @param {string} displayName Group display name\n\t * @return {Promise}\n\t */\n\trenameGroup(context, { groupid, displayName }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(groupid) }), { key: 'displayname', value: displayName })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('renameGroup', { gid: groupid, displayName })\n\t\t\t\t\treturn { groupid, displayName }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { groupid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from renaming the group\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Remove group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\tremoveGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(gid) }))\n\t\t\t\t.then((response) => context.commit('removeGroup', gid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { gid, error }))\n\t},\n\n\t/**\n\t * Add user to group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { userid, error })\n\t\t\t// let's throw one more time to prevent\n\t\t\t// the view from removing the user row on failure\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Add user to group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Mark all user devices for remote wipe\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\twipeUserDevices(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/wipe', { userid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Delete a user\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tdeleteUser(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('deleteUser', userid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Add a user\n\t *\n\t * @param {object} context store context\n\t * @param {Function} context.commit -\n\t * @param {Function} context.dispatch -\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.password User password\n\t * @param {string} options.displayName User display name\n\t * @param {string} options.email User email\n\t * @param {string} options.groups User groups\n\t * @param {string} options.subadmin User subadmin groups\n\t * @param {string} options.quota User email\n\t * @param {string} options.language User language\n\t * @param {string} options.manager User manager\n\t * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language, manager }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language, manager })\n\t\t\t\t.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcommit('API_FAILURE', { userid, error })\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Get user data and commit addition\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\taddUserData(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.get(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('addUserData', response))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Enable or disable user\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {boolean} options.enabled User enablement status\n\t * @return {Promise}\n\t */\n\tenableDisableUser(context, { userid, enabled = true }) {\n\t\tconst userStatus = enabled ? 'enable' : 'disable'\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}/{userStatus}', { userid, userStatus }))\n\t\t\t\t.then((response) => context.commit('enableDisableUser', { userid, enabled }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Edit user data\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.key User field to edit\n\t * @param {string} options.value Value of the change\n\t * @return {Promise}\n\t */\n\tsetUserData(context, { userid, key, value }) {\n\t\tconst allowedEmpty = ['email', 'displayname', 'manager']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password', 'manager'].indexOf(key) !== -1) {\n\t\t\t// We allow empty email or displayname\n\t\t\tif (typeof value === 'string'\n\t\t\t\t&& (\n\t\t\t\t\t(allowedEmpty.indexOf(key) === -1 && value.length > 0)\n\t\t\t\t\t|| allowedEmpty.indexOf(key) !== -1\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn api.requireAdmin().then((response) => {\n\t\t\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}', { userid }), { key, value })\n\t\t\t\t\t\t.then((response) => context.commit('setUserData', { userid, key, value }))\n\t\t\t\t\t\t.catch((error) => { throw error })\n\t\t\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t\t\t}\n\t\t}\n\t\treturn Promise.reject(new Error('Invalid request data'))\n\t},\n\n\t/**\n\t * Send welcome mail\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tsendWelcomeMail(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/welcome', { userid }))\n\t\t\t\t.then(response => true)\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 Julius Härtl \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport Vue from 'vue'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\n\nconst state = {\n\tapps: [],\n\tcategories: [],\n\tupdateCount: 0,\n\tloading: {},\n\tloadingList: false,\n\tgettingCategoriesPromise: null,\n}\n\nconst mutations = {\n\n\tAPPS_API_FAILURE(state, error) {\n\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '
' + error.error.response.data.data.message, { isHTML: true })\n\t\tconsole.error(state, error)\n\t},\n\n\tinitCategories(state, { categories, updateCount }) {\n\t\tstate.categories = categories\n\t\tstate.updateCount = updateCount\n\t},\n\n\tupdateCategories(state, categoriesPromise) {\n\t\tstate.gettingCategoriesPromise = categoriesPromise\n\t},\n\n\tsetUpdateCount(state, updateCount) {\n\t\tstate.updateCount = updateCount\n\t},\n\n\taddCategory(state, category) {\n\t\tstate.categories.push(category)\n\t},\n\n\tappendCategories(state, categoriesArray) {\n\t\t// convert obj to array\n\t\tstate.categories = categoriesArray\n\t},\n\n\tsetAllApps(state, apps) {\n\t\tstate.apps = apps\n\t},\n\n\tsetError(state, { appId, error }) {\n\t\tif (!Array.isArray(appId)) {\n\t\t\tappId = [appId]\n\t\t}\n\t\tappId.forEach((_id) => {\n\t\t\tconst app = state.apps.find(app => app.id === _id)\n\t\t\tapp.error = error\n\t\t})\n\t},\n\n\tclearError(state, { appId, error }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.error = null\n\t},\n\n\tenableApp(state, { appId, groups }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = true\n\t\tapp.groups = groups\n\t},\n\n\tdisableApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = false\n\t\tapp.groups = []\n\t\tif (app.removable) {\n\t\t\tapp.canUnInstall = true\n\t\t}\n\t},\n\n\tuninstallApp(state, appId) {\n\t\tstate.apps.find(app => app.id === appId).active = false\n\t\tstate.apps.find(app => app.id === appId).groups = []\n\t\tstate.apps.find(app => app.id === appId).needsDownload = true\n\t\tstate.apps.find(app => app.id === appId).installed = false\n\t\tstate.apps.find(app => app.id === appId).canUnInstall = false\n\t\tstate.apps.find(app => app.id === appId).canInstall = true\n\t},\n\n\tupdateApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tconst version = app.update\n\t\tapp.update = null\n\t\tapp.version = version\n\t\tstate.updateCount--\n\n\t},\n\n\tresetApps(state) {\n\t\tstate.apps = []\n\t},\n\treset(state) {\n\t\tstate.apps = []\n\t\tstate.categories = []\n\t\tstate.updateCount = 0\n\t},\n\tstartLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, true)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, true)\n\t\t}\n\t},\n\tstopLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, false)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, false)\n\t\t}\n\t},\n}\n\nconst getters = {\n\tloading(state) {\n\t\treturn function(id) {\n\t\t\treturn state.loading[id]\n\t\t}\n\t},\n\tgetCategories(state) {\n\t\treturn state.categories\n\t},\n\tgetAllApps(state) {\n\t\treturn state.apps\n\t},\n\tgetUpdateCount(state) {\n\t\treturn state.updateCount\n\t},\n\tgetCategoryById: (state) => (selectedCategoryId) => {\n\t\treturn state.categories.find((category) => category.id === selectedCategoryId)\n\t},\n}\n\nconst actions = {\n\n\tenableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/enable'), { appIds: apps, groups })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('enableApp', { appId: _appId, groups })\n\t\t\t\t\t})\n\n\t\t\t\t\t// check for server health\n\t\t\t\t\treturn api.get(generateUrl('apps/files/'))\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tif (response.data.update_required) {\n\t\t\t\t\t\t\t\tshowInfo(\n\t\t\t\t\t\t\t\t\tt(\n\t\t\t\t\t\t\t\t\t\t'settings',\n\t\t\t\t\t\t\t\t\t\t'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tonClick: () => window.location.reload(),\n\t\t\t\t\t\t\t\t\t\tclose: false,\n\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, 5000)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\tif (!Array.isArray(appId)) {\n\t\t\t\t\t\t\t\tshowError(t('settings', 'Error: This app cannot be enabled because it makes the server unstable'))\n\t\t\t\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\t\t\t\terror: t('settings', 'Error: This app cannot be enabled because it makes the server unstable'),\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tcontext.dispatch('disableApp', { appId })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tforceEnableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then(() => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/force'), { appId })\n\t\t\t\t.then((response) => {\n\t\t\t\t\t// TODO: find a cleaner solution\n\t\t\t\t\tlocation.reload()\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tdisableApp(context, { appId }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\treturn api.post(generateUrl('settings/apps/disable'), { appIds: apps })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('disableApp', _appId)\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tuninstallApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\treturn api.get(generateUrl(`settings/apps/uninstall/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('uninstallApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tupdateApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.get(generateUrl(`settings/apps/update/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('updateApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tgetAllApps(context) {\n\t\tcontext.commit('startLoading', 'list')\n\t\treturn api.get(generateUrl('settings/apps/list'))\n\t\t\t.then((response) => {\n\t\t\t\tcontext.commit('setAllApps', response.data.apps)\n\t\t\t\tcontext.commit('stopLoading', 'list')\n\t\t\t\treturn true\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tasync getCategories(context, { shouldRefetchCategories = false } = {}) {\n\t\tif (shouldRefetchCategories || !context.state.gettingCategoriesPromise) {\n\t\t\tcontext.commit('startLoading', 'categories')\n\t\t\ttry {\n\t\t\t\tconst categoriesPromise = api.get(generateUrl('settings/apps/categories'))\n\t\t\t\tcontext.commit('updateCategories', categoriesPromise)\n\t\t\t\tconst categoriesPromiseResponse = await categoriesPromise\n\t\t\t\tif (categoriesPromiseResponse.data.length > 0) {\n\t\t\t\t\tcontext.commit('appendCategories', categoriesPromiseResponse.data)\n\t\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\treturn false\n\t\t\t} catch (error) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t}\n\t\treturn context.state.gettingCategoriesPromise\n\t},\n\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\n\nconst state = {\n\tserverData: {},\n}\nconst mutations = {\n\tsetServerData(state, data) {\n\t\tstate.serverData = data\n\t},\n}\nconst getters = {\n\tgetServerData(state) {\n\t\treturn state.serverData\n\t},\n}\nconst actions = {}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst state = {}\nconst mutations = {}\nconst getters = {}\nconst actions = {\n\t/**\n\t * Set application config in database\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.app Application name\n\t * @param {boolean} options.key Config key\n\t * @param {boolean} options.value Value to set\n\t * @return {Promise}\n\t */\n\tsetAppConfig(context, { app, key, value }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('apps/provisioning_api/api/v1/config/apps/{app}/{key}', { app, key }), { value })\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { app, key, value, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users.js'\nimport apps from './apps.js'\nimport settings from './settings.js'\nimport oc from './oc.js'\nimport { showError } from '@nextcloud/dialogs'\n\nVue.use(Vuex)\n\nconst debug = process.env.NODE_ENV !== 'production'\n\nconst mutations = {\n\tAPI_FAILURE(state, error) {\n\t\ttry {\n\t\t\tconst message = error.error.response.data.ocs.meta.message\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '
' + message, { isHTML: true })\n\t\t} catch (e) {\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.'))\n\t\t}\n\t\tconsole.error(state, error)\n\t},\n}\n\nexport default new Store({\n\tmodules: {\n\t\tusers,\n\t\tapps,\n\t\tsettings,\n\t\toc,\n\t},\n\tstrict: debug,\n\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2022 Joas Schilling \n *\n * @author Joas Schilling \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\n/**\n * Set the page heading\n *\n * @param {string} heading page title from the history api\n * @since 27.0.0\n */\nexport function setPageHeading(heading) {\n\tconst headingEl = document.getElementById('page-heading-level-1')\n\tif (headingEl) {\n\t\theadingEl.textContent = heading\n\t}\n}\nexport default {\n\t/**\n\t * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered\n\t */\n\tdisableKeyboardShortcuts() {\n\t\treturn loadState('theming', 'shortcutsDisabled', false)\n\t},\n\tsetPageHeading,\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { APPS_SECTION_ENUM } from './constants/AppsConstants.js'\nimport store from './store/index.js'\nimport { setPageHeading } from '../../../core/src/OCP/accessibility.js'\n\n// Dynamic loading\nconst Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users.vue')\nconst Apps = () => import(/* webpackChunkName: 'settings-apps-view' */'./views/Apps.vue')\n\nVue.use(Router)\n\n/*\n * This is the list of routes where the vuejs app will\n * take over php to provide data\n * You need to forward the php routing (routes.php) to\n * the settings-vue template, where the vue-router will\n * ensure the proper route.\n * ⚠️ Routes needs to match the php routes.\n */\nconst baseTitle = document.title\nconst router = new Router({\n\tmode: 'history',\n\t// if index.php is in the url AND we got this far, then it's working:\n\t// let's keep using index.php in the url\n\tbase: generateUrl(''),\n\tlinkActiveClass: 'active',\n\troutes: [\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/users',\n\t\t\tcomponent: Users,\n\t\t\tprops: true,\n\t\t\tname: 'users',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Active users')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':selectedGroup',\n\t\t\t\t\tname: 'group',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: (to) => {\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'admin') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Admins')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'disabled') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Disabled users')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn decodeURIComponent(to.params.selectedGroup)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Users,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/apps',\n\t\t\tcomponent: Apps,\n\t\t\tprops: true,\n\t\t\tname: 'apps',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':category',\n\t\t\t\t\tname: 'apps-category',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: async (to) => {\n\t\t\t\t\t\t\tif (to.name === 'apps') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (APPS_SECTION_ENUM[to.params.category]) {\n\t\t\t\t\t\t\t\treturn APPS_SECTION_ENUM[to.params.category]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait store.dispatch('getCategories')\n\t\t\t\t\t\t\tconst category = store.getters.getCategoryById(to.params.category)\n\t\t\t\t\t\t\tif (category.displayName) {\n\t\t\t\t\t\t\t\treturn category.displayName\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: ':id',\n\t\t\t\t\t\t\tname: 'apps-details',\n\t\t\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n})\n\nrouter.afterEach(async (to) => {\n\tconst metaTitle = await to.meta.title?.(to)\n\tif (metaTitle) {\n\t\tdocument.title = `${metaTitle} - ${baseTitle}`\n\t\tsetPageHeading(metaTitle)\n\t} else {\n\t\tdocument.title = baseTitle\n\t}\n})\n\nexport default router\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author rakekniven \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport VTooltip from 'v-tooltip'\nimport { sync } from 'vuex-router-sync'\n\nimport App from './App.vue'\nimport router from './router.js'\nimport store from './store/index.js'\n\nVue.use(VTooltip, { defaultHtml: false })\n\nsync(store, router)\n\n// CSP config for webpack dynamic chunk loading\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\n// bind to window\nVue.prototype.t = t\nVue.prototype.n = n\nVue.prototype.OC = OC\nVue.prototype.OCA = OCA\n// eslint-disable-next-line camelcase\nVue.prototype.oc_userconfig = oc_userconfig\n\nconst app = new Vue({\n\trouter,\n\tstore,\n\trender: h => h(App),\n}).$mount('#content')\n\nexport { app, router, store }\n","exports.sync = function (store, router, options) {\n var moduleName = (options || {}).moduleName || 'route'\n\n store.registerModule(moduleName, {\n namespaced: true,\n state: cloneRoute(router.currentRoute),\n mutations: {\n 'ROUTE_CHANGED': function ROUTE_CHANGED (state, transition) {\n store.state[moduleName] = cloneRoute(transition.to, transition.from)\n }\n }\n })\n\n var isTimeTraveling = false\n var currentPath\n\n // sync router on store change\n var storeUnwatch = store.watch(\n function (state) { return state[moduleName]; },\n function (route) {\n var fullPath = route.fullPath;\n if (fullPath === currentPath) {\n return\n }\n if (currentPath != null) {\n isTimeTraveling = true\n router.push(route)\n }\n currentPath = fullPath\n },\n { sync: true }\n )\n\n // sync store on router navigation\n var afterEachUnHook = router.afterEach(function (to, from) {\n if (isTimeTraveling) {\n isTimeTraveling = false\n return\n }\n currentPath = to.fullPath\n store.commit(moduleName + '/ROUTE_CHANGED', { to: to, from: from })\n })\n\n return function unsync () {\n // On unsync, remove router hook\n if (afterEachUnHook != null) {\n afterEachUnHook()\n }\n\n // On unsync, remove store watch\n if (storeUnwatch != null) {\n storeUnwatch()\n }\n\n // On unsync, unregister Module with store\n store.unregisterModule(moduleName)\n }\n}\n\nfunction cloneRoute (to, from) {\n var clone = {\n name: to.name,\n path: to.path,\n hash: to.hash,\n query: to.query,\n params: to.params,\n fullPath: to.fullPath,\n meta: to.meta\n }\n if (from) {\n clone.from = cloneRoute(from)\n }\n return Object.freeze(clone)\n}\n\n","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\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 */\nconst getLogger = (user) => {\n if (user === null) {\n return getLoggerBuilder().setApp(\"files\").build();\n }\n return getLoggerBuilder().setApp(\"files\").setUid(user.uid).build();\n};\nconst logger = getLogger(getCurrentUser());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n};\nconst davGetFavoritesReport = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastModified}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = { ...data, attributes: {} };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n this._data.status = status;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n this._data.source = destination;\n this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst davRootPath = `/files/${getCurrentUser()?.uid}`;\nconst davRemoteURL = generateRemoteUrl(\"dav\");\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n const isPublic = document.querySelector(\"input#isPublic\")?.value;\n if (isPublic) {\n userId = userId ?? document.querySelector(\"input#sharingUserId\")?.value;\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const nodeData = {\n id: props?.fileid || 0,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nconst forbiddenCharacters = window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\nconst forbiddenFilenameRegex = window._oc_config?.blacklist_files_regex ? new RegExp(window._oc_config.blacklist_files_regex) : null;\nfunction isFilenameValid(filename) {\n if (forbiddenCharacters.some((character) => filename.includes(character))) {\n return false;\n }\n if (forbiddenFilenameRegex !== null && filename.match(forbiddenFilenameRegex)) {\n return false;\n }\n return true;\n}\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers, orders) {\n identifiers = identifiers ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const identifiers = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use displayName too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use displayName if available, fallback to name\n (v) => v.attributes?.displayName || v.basename,\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers, orders);\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Navigation {\n _views = [];\n _currentView = null;\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n }\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n }\n }\n get views() {\n return this._views;\n }\n setActive(view) {\n this._currentView = view;\n }\n get active() {\n return this._currentView;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err)\n return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1)\n ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err)\n return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i])\n ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\")\n key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\")\n node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i))\n i += 8;\n else if (hasBody && isAttlist(xmlData, i))\n i += 8;\n else if (hasBody && isNotation(xmlData, i))\n i += 9;\n else if (isComment)\n comment = true;\n else\n throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\")\n return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\")\n return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\")\n return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\")\n return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr))\n return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\")\n return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\")\n return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (eNotation) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\")\n return num;\n else if (numStr === numTrimmedByZeros)\n return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros)\n return num;\n else\n return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr)\n return num;\n else if (sign + numTrimmedByZeros === numStr)\n return num;\n else\n return str;\n }\n if (trimmedStr === numStr)\n return num;\n else if (trimmedStr === sign + numStr)\n return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\")\n numStr = \"0\";\n else if (numStr[0] === \".\")\n numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\")\n numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities)\n val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\")\n aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData)\n throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags)\n ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0)\n val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2)\n throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false)\n ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0)\n isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp)\n return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary)\n attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result)\n return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\")\n return true;\n else if (newval === \"false\")\n return false;\n else\n return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0)\n newJpath = property;\n else\n newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0)\n text = tagObj[property];\n else\n text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode)\n val2[options.textNodeName] = \"\";\n else\n val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0)\n compressedObj[options.textNodeName] = text;\n } else if (text !== void 0)\n compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\")\n return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\")\n ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true)\n validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0)\n return orderedResult;\n else\n return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0)\n continue;\n let newJPath = \"\";\n if (jPath.length === 0)\n newJPath = tagName;\n else\n newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode)\n xmlStr += tagStart + \">\";\n else\n xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key))\n continue;\n if (key !== \":@\")\n return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr))\n continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName)\n return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key))\n continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\")\n ;\n else if (item === null) {\n if (key[0] === \"?\")\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n listTagVal += this.j2x(item, level + 1).val;\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, \"\", level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else\n return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\")\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode)\n closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \" 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (!(\"order\" in view) || typeof view.order !== \"number\") {\n throw new Error(\"View order is required and must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n return true;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"3239\":\"settings-users\",\"4529\":\"settings-apps-view\"}[chunkId] || chunkId) + \"-\" + chunkId + \".js?v=\" + {\"1110\":\"2909496e7e35d6258214\",\"3239\":\"840dea09a2ae7fa5cda6\",\"4529\":\"1c12345652ab9d108a9c\",\"8902\":\"bb051769bbf8ba8e1826\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2689;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2689: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(32843)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","APPS_SECTION_ENUM","Object","freeze","installed","t","enabled","disabled","updates","featured","supported","getLoggerBuilder","setApp","detectUser","build","name","beforeMount","document","getElementById","$store","commit","JSON","parse","dataset","server","_c","this","_self","extend","a","b","key","encodeReserveRE","encodeReserveReplacer","c","charCodeAt","toString","commaRE","encode","str","encodeURIComponent","replace","decode","decodeURIComponent","err","castQueryParamValue","value","String","parseQuery","query","res","trim","split","forEach","param","parts","shift","val","length","join","undefined","Array","isArray","push","stringifyQuery","obj","keys","map","result","val2","filter","x","trailingSlashRE","createRoute","record","location","redirectedFrom","router","options","clone","e","route","meta","path","hash","params","fullPath","getFullPath","matched","formatMatch","START","unshift","parent","ref","_stringifyQuery","isSameRoute","onlyPath","isObjectEqual","aKeys","sort","bKeys","every","i","aVal","bVal","handleRouteEntered","instances","instance","cbs","enteredCbs","i$1","_isBeingDestroyed","View","functional","props","type","default","render","_","children","data","routerView","h","$createElement","$route","cache","_routerViewCache","depth","inactive","_routerRoot","vnodeData","$vnode","keepAlive","_directInactive","_inactive","$parent","routerViewDepth","cachedData","cachedComponent","component","configProps","fillPropsinData","components","registerRouteInstance","vm","current","hook","prepatch","vnode","componentInstance","init","propsToPass","config","resolveProps","attrs","resolvePath","relative","base","append","firstChar","charAt","stack","pop","segments","segment","cleanPath","isarray","arr","prototype","call","pathToRegexp_1","pathToRegexp","RegExp","groups","source","match","prefix","delimiter","optional","repeat","partial","asterisk","pattern","attachKeys","regexpToRegexp","flags","arrayToRegexp","tokensToRegExp","stringToRegexp","parse_1","tokensToFunction_1","tokensToFunction","tokensToRegExp_1","PATH_REGEXP","tokens","index","defaultDelimiter","exec","m","escaped","offset","slice","next","capture","group","modifier","escapeGroup","escapeString","substr","encodeURIComponentPretty","encodeURI","toUpperCase","matches","opts","pretty","token","TypeError","stringify","j","test","re","sensitive","strict","end","endsWithDelimiter","compile","regexpCompileCache","create","fillParams","routeMsg","filler","pathMatch","normalizeLocation","raw","_normalized","params$1","rawPath","parsedPath","hashIndex","indexOf","queryIndex","parsePath","basePath","extraQuery","_parseQuery","parsedQuery","resolveQuery","_Vue","noop","Link","to","required","tag","custom","Boolean","exact","exactPath","activeClass","exactActiveClass","ariaCurrentValue","event","this$1$1","$router","resolve","href","classes","globalActiveClass","linkActiveClass","globalExactActiveClass","linkExactActiveClass","activeClassFallback","exactActiveClassFallback","compareTarget","target","queryIncludes","isIncludedRoute","handler","guardEvent","on","click","class","scopedSlot","$scopedSlots","$hasNormal","navigate","isActive","isExactActive","findAnchor","$slots","isStatic","aData","handler$1","event$1","aAttrs","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","currentTarget","getAttribute","preventDefault","child","inBrowser","window","createRouteMap","routes","oldPathList","oldPathMap","oldNameMap","parentRoute","pathList","pathMap","nameMap","addRouteRecord","l","splice","matchAs","pathToRegexpOptions","normalizedPath","normalizePath","caseSensitive","regex","compileRouteRegex","alias","redirect","beforeEnter","childMatchAs","aliases","aliasRoute","createMatcher","currentRoute","_createRoute","paramNames","record$1","matchRoute","originalRedirect","hasOwnProperty","resolveRecordPath","aliasedMatch","aliasedRecord","addRoute","parentOrRoute","getRoutes","addRoutes","len","Time","performance","now","Date","genStateKey","toFixed","_key","getStateKey","setStateKey","positionStore","setupScroll","history","scrollRestoration","protocolAndPath","protocol","host","absolutePath","stateCopy","state","replaceState","addEventListener","handlePopState","removeEventListener","handleScroll","from","isPop","app","behavior","scrollBehavior","$nextTick","position","getScrollPosition","shouldScroll","then","scrollToPosition","catch","saveScrollPosition","pageXOffset","y","pageYOffset","isValidPosition","isNumber","normalizePosition","v","hashStartsWithNumberRE","isObject","selector","el","querySelector","docRect","documentElement","getBoundingClientRect","elRect","left","top","getElementPosition","style","scrollTo","ua","supportsPushState","navigator","userAgent","pushState","url","NavigationFailureType","redirected","aborted","cancelled","duplicated","createNavigationCancelledError","createRouterError","message","error","Error","_isRouter","propertiesToLog","isError","isNavigationFailure","errorType","runQueue","queue","fn","cb","step","flatMapComponents","flatten","concat","apply","hasSymbol","Symbol","toStringTag","once","called","args","arguments","History","baseEl","normalizeBase","pending","ready","readyCbs","readyErrorCbs","errorCbs","listeners","extractGuards","records","bind","reverse","guards","def","guard","extractGuard","bindGuard","listen","onReady","errorCb","onError","transitionTo","onComplete","onAbort","prev","confirmTransition","updateRoute","ensureURL","afterHooks","abort","console","lastRouteIndex","lastCurrentIndex","max","Math","updated","activated","deactivated","resolveQueue","extractLeaveGuards","beforeHooks","extractUpdateHooks","hasAsync","cid","resolvedDef","__esModule","resolved","reject","reason","msg","comp","iterator","createNavigationAbortedError","createNavigationRedirectedError","enterGuards","bindEnterGuard","extractEnterGuards","resolveHooks","setupListeners","teardown","cleanupListener","HTML5History","_startLocation","getLocation","__proto__","constructor","expectScroll","supportsScroll","handleRoutingEvent","go","n","fromRoute","getCurrentLocation","pathname","pathLowerCase","toLowerCase","baseLowerCase","search","HashHistory","fallback","checkFallback","ensureSlash","getHash","replaceHash","eventType","pushHash","getUrl","AbstractHistory","targetIndex","VueRouter","apps","matcher","mode","prototypeAccessors","configurable","get","$once","routeOrError","handleInitialScroll","_route","beforeEach","registerHook","beforeResolve","afterEach","Promise","back","forward","getMatchedComponents","createHref","normalizedTo","defineProperties","VueRouter$1","list","install","Vue","isDef","registerInstance","callVal","$options","_parentVnode","mixin","beforeCreate","_router","util","defineReactive","destroyed","defineProperty","strats","optionMergeStrategies","beforeRouteEnter","beforeRouteLeave","beforeRouteUpdate","created","version","START_LOCATION","use","sanitize","requireAdmin","confirmPassword","axios","post","put","delete","orderGroups","orderBy","usercount","localeCompare","defaults","id","canAdd","canRemove","mutations","appendUsers","usersObj","existingUsers","users","_ref","newUsers","values","_ref2","includes","usersOffset","usersLimit","updateDisabledUsers","_usersObj","disabledUsersOffset","disabledUsersLimit","setPasswordPolicyMinLength","minPasswordLength","initGroups","_ref3","userCount","assign","addGroup","_ref4","gid","displayName","find","renameGroup","_ref5","groupIndex","findIndex","groupSearch","updatedGroup","removeGroup","addUserGroup","_ref6","userid","user","removeUserGroup","_ref7","addUserSubAdmin","_ref8","subadmin","removeUserSubAdmin","_ref9","deleteUser","userIndex","actionType","addUserData","response","ocs","enableDisableUser","_ref10","updateUserCounts","_ref11","disabledGroup","userGroup","warn","logger","setUserData","_ref12","humanValue","parseFileSize","resetUsers","setShowConfig","_ref13","showConfig","CancelToken","searchRequestCancelSource","showStoragePath","showUserBackend","showLastLogin","showNewUserForm","showLanguages","getters","getUsers","getGroups","getSubadminGroups","getPasswordPolicyMinLength","getUsersOffset","getUsersLimit","getDisabledUsersOffset","getDisabledUsersLimit","getUserCount","getShowConfig","actions","searchUsers","context","_ref14","limit","api","generateOcsUrl","isCancel","getUser","userId","_ref15","cancel","cancelToken","usersCount","getDisabledUsers","_ref16","_ref17","limitParam","getUsersFromList","_ref18","getUsersFromGroup","_ref19","groupid","groupId","getCapabilities","password_policy","minLength","_ref20","_ref21","_ref22","_ref23","_ref24","wipeUserDevices","addUser","_ref25","_ref26","dispatch","password","email","quota","language","manager","_ref27","userStatus","_ref28","allowedEmpty","sendWelcomeMail","APPS_API_FAILURE","showError","isHTML","initCategories","categories","updateCount","updateCategories","categoriesPromise","gettingCategoriesPromise","setUpdateCount","addCategory","category","appendCategories","categoriesArray","setAllApps","setError","appId","_id","clearError","enableApp","active","disableApp","removable","canUnInstall","uninstallApp","needsDownload","canInstall","updateApp","update","resetApps","reset","startLoading","loading","stopLoading","generateUrl","appIds","_appId","update_required","showInfo","onClick","reload","close","setTimeout","forceEnableApp","getAllApps","getCategories","shouldRefetchCategories","categoriesPromiseResponse","loadingList","getUpdateCount","getCategoryById","selectedCategoryId","serverData","setServerData","getServerData","setAppConfig","Vuex","API_FAILURE","Store","modules","settings","oc","process","Users","Apps","Router","baseTitle","title","selectedGroup","async","store","_to$meta$title","_to$meta","metaTitle","heading","headingEl","textContent","setPageHeading","VTooltip","defaultHtml","sync","__webpack_nonce__","btoa","OC","requestToken","OCA","oc_userconfig","App","$mount","cloneRoute","exports","moduleName","registerModule","namespaced","transition","currentPath","isTimeTraveling","storeUnwatch","watch","afterEachUnHook","unregisterModule","setUid","uid","Permission","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","getDavProperties","_nc_dav_properties","prop","getDavNameSpaces","_nc_dav_namespaces","ns","davGetDefaultPropfind","davGetRecentSearch","lastModified","FileType","FileType2","isDavRessource","davService","validateData","URL","startsWith","mtime","crtime","mime","size","permissions","NONE","ALL","owner","attributes","root","service","status","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","entries","getOwnPropertyDescriptors","set","Reflect","deleteProperty","receiver","Proxy","encodedSource","origin","basename","extension","extname","dirname","firstMatch","updateMtime","READ","fileid","move","destination","rename","basename2","File","Folder","super","davRootPath","davRemoteURL","davGetClient","remoteURL","headers","client","setHeaders","requesttoken","patch","headers2","method","fetch","getFavoriteNodes","davClient","davRoot","controller","AbortController","CancelablePromise","onCancel","getDirectoryContents","signal","details","includeSelf","node","filename","davResultToNode","filesRoot","isPublic","permString","CREATE","UPDATE","DELETE","SHARE","davParsePermissions","nodeData","lastmod","Number","parseInt","getcontentlength","hasPreview","_oc_config","blacklist_files_regex","humanList","humanListBinary","formatFileSize","skipSmallSizes","binaryPrefixes","base1000","order","floor","log","min","readableFormat","relativeSize","pow","parseFloat","toLocaleString","forceBinary","toLocaleLowerCase","replaceAll","decimalString","round","k","g","p","util$3","nameStartChar","nameRegexp","regexName","isExist","isEmptyObject","merge","arrayMode","getValue","isName","string","getAllMatches","allmatches","startIndex","lastIndex","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","allowBooleanAttributes","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","tagName","attributeValueProcessor","attrName","stopNodes","alwaysCreateTextNode","commentPropName","unpairedTags","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","buildOptions","defaultOptions","node2json","compress","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","replaceEntitiesValue","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attrStr","attr","attrVal","suppressBooleanAttributes","lastIndexOf","textValue","entities","entity","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","jObj","arrayNodeName","buildAttrPairStr","newval","arrLen","listTagVal","item","Ks","L","closeTag","tagEndExp","piClosingChar","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","r","getter","definition","o","enumerable","f","chunkId","all","reduce","promises","u","globalThis","Function","done","script","needAttach","scripts","getElementsByTagName","s","createElement","charset","timeout","setAttribute","src","onScriptComplete","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","nmd","paths","scriptUrl","importScripts","currentScript","baseURI","self","installedChunks","installedChunkData","promise","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"settings-vue-settings-apps-users-management.js?v=24750fe22a1a5a48166a","mappings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AIuC,EAAuB,CAACC,EAA4B5/B,KACvD,IAKIm8B,EAAUiB,EALVX,EAAWz8B,EAAK,GAChB6/B,EAAc7/B,EAAK,GACnB8/B,EAAU9/B,EAAK,GAGIlB,EAAI,EAC3B,GAAG29B,EAASsD,MAAMxiB,GAAgC,IAAxB+hB,EAAgB/hB,KAAa,CACtD,IAAI4e,KAAY0D,EACZ3D,EAAoBe,EAAE4C,EAAa1D,KACrCD,EAAoBp3B,EAAEq3B,GAAY0D,EAAY1D,IAGhD,GAAG2D,EAAS,IAAIljC,EAASkjC,EAAQ5D,EAClC,CAEA,IADG0D,GAA4BA,EAA2B5/B,GACrDlB,EAAI29B,EAASvgC,OAAQ4C,IACzBs+B,EAAUX,EAAS39B,GAChBo9B,EAAoBe,EAAEqC,EAAiBlC,IAAYkC,EAAgBlC,IACrEkC,EAAgBlC,GAAS,KAE1BkC,EAAgBlC,GAAW,EAE5B,OAAOlB,EAAoBM,EAAE5/B,EAAO,EAGjCojC,EAAqBX,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FW,EAAmBnkC,QAAQ8jC,EAAqB9qB,KAAK,KAAM,IAC3DmrB,EAAmBzjC,KAAOojC,EAAqB9qB,KAAK,KAAMmrB,EAAmBzjC,KAAKsY,KAAKmrB,QCvFvF9D,EAAoBxP,QAAKtwB,ECGzB,IAAI6jC,EAAsB/D,EAAoBM,OAAEpgC,EAAW,CAAC,OAAO,IAAO8/B,EAAoB,SAC9F+D,EAAsB/D,EAAoBM,EAAEyD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/settings/src/constants/AppsConstants.js","webpack:///nextcloud/apps/settings/src/logger.js","webpack:///nextcloud/apps/settings/src/App.vue","webpack:///nextcloud/apps/settings/src/App.vue?vue&type=script&lang=js","webpack://nextcloud/./apps/settings/src/App.vue?536c","webpack://nextcloud/./apps/settings/src/App.vue?4d15","webpack:///nextcloud/node_modules/vue-router/dist/vue-router.esm.js","webpack:///nextcloud/apps/settings/src/store/api.js","webpack:///nextcloud/apps/settings/src/store/users.js","webpack:///nextcloud/apps/settings/src/store/apps.js","webpack:///nextcloud/apps/settings/src/store/settings.js","webpack:///nextcloud/apps/settings/src/store/oc.js","webpack:///nextcloud/apps/settings/src/store/index.js","webpack:///nextcloud/core/src/OCP/accessibility.js","webpack:///nextcloud/apps/settings/src/router.js","webpack:///nextcloud/apps/settings/src/main-apps-users-management.js","webpack:///nextcloud/node_modules/vuex-router-sync/index.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright 2022, Julia Kirschenheuter \n *\n * @author Julia Kirschenheuter \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { translate as t } from '@nextcloud/l10n'\n\n/** Enum of verification constants, according to Apps */\nexport const APPS_SECTION_ENUM = Object.freeze({\n\tinstalled: t('settings', 'Your apps'),\n\tenabled: t('settings', 'Active apps'),\n\tdisabled: t('settings', 'Disabled apps'),\n\tupdates: t('settings', 'Updates'),\n\t'app-bundles': t('settings', 'App bundles'),\n\tfeatured: t('settings', 'Featured apps'),\n\tsupported: t('settings', 'Supported apps'), // From subscription\n})\n","/**\n * @copyright 2020 Christoph Wurst \n *\n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('settings')\n\t.detectUser()\n\t.build()\n","\n\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=50420604\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\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 render(){var _vm=this,_c=_vm._self._c;return _c('router-view')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/*!\n * vue-router v3.6.5\n * (c) 2022 Evan You\n * @license MIT\n */\n/* */\n\nfunction assert (condition, message) {\n if (!condition) {\n throw new Error((\"[vue-router] \" + message))\n }\n}\n\nfunction warn (condition, message) {\n if (!condition) {\n typeof console !== 'undefined' && console.warn((\"[vue-router] \" + message));\n }\n}\n\nfunction extend (a, b) {\n for (var key in b) {\n a[key] = b[key];\n }\n return a\n}\n\n/* */\n\nvar encodeReserveRE = /[!'()*]/g;\nvar encodeReserveReplacer = function (c) { return '%' + c.charCodeAt(0).toString(16); };\nvar commaRE = /%2C/g;\n\n// fixed encodeURIComponent which is more conformant to RFC3986:\n// - escapes [!'()*]\n// - preserve commas\nvar encode = function (str) { return encodeURIComponent(str)\n .replace(encodeReserveRE, encodeReserveReplacer)\n .replace(commaRE, ','); };\n\nfunction decode (str) {\n try {\n return decodeURIComponent(str)\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"Error decoding \\\"\" + str + \"\\\". Leaving it intact.\"));\n }\n }\n return str\n}\n\nfunction resolveQuery (\n query,\n extraQuery,\n _parseQuery\n) {\n if ( extraQuery === void 0 ) extraQuery = {};\n\n var parse = _parseQuery || parseQuery;\n var parsedQuery;\n try {\n parsedQuery = parse(query || '');\n } catch (e) {\n process.env.NODE_ENV !== 'production' && warn(false, e.message);\n parsedQuery = {};\n }\n for (var key in extraQuery) {\n var value = extraQuery[key];\n parsedQuery[key] = Array.isArray(value)\n ? value.map(castQueryParamValue)\n : castQueryParamValue(value);\n }\n return parsedQuery\n}\n\nvar castQueryParamValue = function (value) { return (value == null || typeof value === 'object' ? value : String(value)); };\n\nfunction parseQuery (query) {\n var res = {};\n\n query = query.trim().replace(/^(\\?|#|&)/, '');\n\n if (!query) {\n return res\n }\n\n query.split('&').forEach(function (param) {\n var parts = param.replace(/\\+/g, ' ').split('=');\n var key = decode(parts.shift());\n var val = parts.length > 0 ? decode(parts.join('=')) : null;\n\n if (res[key] === undefined) {\n res[key] = val;\n } else if (Array.isArray(res[key])) {\n res[key].push(val);\n } else {\n res[key] = [res[key], val];\n }\n });\n\n return res\n}\n\nfunction stringifyQuery (obj) {\n var res = obj\n ? Object.keys(obj)\n .map(function (key) {\n var val = obj[key];\n\n if (val === undefined) {\n return ''\n }\n\n if (val === null) {\n return encode(key)\n }\n\n if (Array.isArray(val)) {\n var result = [];\n val.forEach(function (val2) {\n if (val2 === undefined) {\n return\n }\n if (val2 === null) {\n result.push(encode(key));\n } else {\n result.push(encode(key) + '=' + encode(val2));\n }\n });\n return result.join('&')\n }\n\n return encode(key) + '=' + encode(val)\n })\n .filter(function (x) { return x.length > 0; })\n .join('&')\n : null;\n return res ? (\"?\" + res) : ''\n}\n\n/* */\n\nvar trailingSlashRE = /\\/?$/;\n\nfunction createRoute (\n record,\n location,\n redirectedFrom,\n router\n) {\n var stringifyQuery = router && router.options.stringifyQuery;\n\n var query = location.query || {};\n try {\n query = clone(query);\n } catch (e) {}\n\n var route = {\n name: location.name || (record && record.name),\n meta: (record && record.meta) || {},\n path: location.path || '/',\n hash: location.hash || '',\n query: query,\n params: location.params || {},\n fullPath: getFullPath(location, stringifyQuery),\n matched: record ? formatMatch(record) : []\n };\n if (redirectedFrom) {\n route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery);\n }\n return Object.freeze(route)\n}\n\nfunction clone (value) {\n if (Array.isArray(value)) {\n return value.map(clone)\n } else if (value && typeof value === 'object') {\n var res = {};\n for (var key in value) {\n res[key] = clone(value[key]);\n }\n return res\n } else {\n return value\n }\n}\n\n// the starting route that represents the initial state\nvar START = createRoute(null, {\n path: '/'\n});\n\nfunction formatMatch (record) {\n var res = [];\n while (record) {\n res.unshift(record);\n record = record.parent;\n }\n return res\n}\n\nfunction getFullPath (\n ref,\n _stringifyQuery\n) {\n var path = ref.path;\n var query = ref.query; if ( query === void 0 ) query = {};\n var hash = ref.hash; if ( hash === void 0 ) hash = '';\n\n var stringify = _stringifyQuery || stringifyQuery;\n return (path || '/') + stringify(query) + hash\n}\n\nfunction isSameRoute (a, b, onlyPath) {\n if (b === START) {\n return a === b\n } else if (!b) {\n return false\n } else if (a.path && b.path) {\n return a.path.replace(trailingSlashRE, '') === b.path.replace(trailingSlashRE, '') && (onlyPath ||\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query))\n } else if (a.name && b.name) {\n return (\n a.name === b.name &&\n (onlyPath || (\n a.hash === b.hash &&\n isObjectEqual(a.query, b.query) &&\n isObjectEqual(a.params, b.params))\n )\n )\n } else {\n return false\n }\n}\n\nfunction isObjectEqual (a, b) {\n if ( a === void 0 ) a = {};\n if ( b === void 0 ) b = {};\n\n // handle null value #1566\n if (!a || !b) { return a === b }\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n if (aKeys.length !== bKeys.length) {\n return false\n }\n return aKeys.every(function (key, i) {\n var aVal = a[key];\n var bKey = bKeys[i];\n if (bKey !== key) { return false }\n var bVal = b[key];\n // query values can be null and undefined\n if (aVal == null || bVal == null) { return aVal === bVal }\n // check nested equality\n if (typeof aVal === 'object' && typeof bVal === 'object') {\n return isObjectEqual(aVal, bVal)\n }\n return String(aVal) === String(bVal)\n })\n}\n\nfunction isIncludedRoute (current, target) {\n return (\n current.path.replace(trailingSlashRE, '/').indexOf(\n target.path.replace(trailingSlashRE, '/')\n ) === 0 &&\n (!target.hash || current.hash === target.hash) &&\n queryIncludes(current.query, target.query)\n )\n}\n\nfunction queryIncludes (current, target) {\n for (var key in target) {\n if (!(key in current)) {\n return false\n }\n }\n return true\n}\n\nfunction handleRouteEntered (route) {\n for (var i = 0; i < route.matched.length; i++) {\n var record = route.matched[i];\n for (var name in record.instances) {\n var instance = record.instances[name];\n var cbs = record.enteredCbs[name];\n if (!instance || !cbs) { continue }\n delete record.enteredCbs[name];\n for (var i$1 = 0; i$1 < cbs.length; i$1++) {\n if (!instance._isBeingDestroyed) { cbs[i$1](instance); }\n }\n }\n }\n}\n\nvar View = {\n name: 'RouterView',\n functional: true,\n props: {\n name: {\n type: String,\n default: 'default'\n }\n },\n render: function render (_, ref) {\n var props = ref.props;\n var children = ref.children;\n var parent = ref.parent;\n var data = ref.data;\n\n // used by devtools to display a router-view badge\n data.routerView = true;\n\n // directly use parent context's createElement() function\n // so that components rendered by router-view can resolve named slots\n var h = parent.$createElement;\n var name = props.name;\n var route = parent.$route;\n var cache = parent._routerViewCache || (parent._routerViewCache = {});\n\n // determine current view depth, also check to see if the tree\n // has been toggled inactive but kept-alive.\n var depth = 0;\n var inactive = false;\n while (parent && parent._routerRoot !== parent) {\n var vnodeData = parent.$vnode ? parent.$vnode.data : {};\n if (vnodeData.routerView) {\n depth++;\n }\n if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {\n inactive = true;\n }\n parent = parent.$parent;\n }\n data.routerViewDepth = depth;\n\n // render previous view if the tree is inactive and kept-alive\n if (inactive) {\n var cachedData = cache[name];\n var cachedComponent = cachedData && cachedData.component;\n if (cachedComponent) {\n // #2301\n // pass props\n if (cachedData.configProps) {\n fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);\n }\n return h(cachedComponent, data, children)\n } else {\n // render previous empty view\n return h()\n }\n }\n\n var matched = route.matched[depth];\n var component = matched && matched.components[name];\n\n // render empty node if no matched route or no config component\n if (!matched || !component) {\n cache[name] = null;\n return h()\n }\n\n // cache component\n cache[name] = { component: component };\n\n // attach instance registration hook\n // this will be called in the instance's injected lifecycle hooks\n data.registerRouteInstance = function (vm, val) {\n // val could be undefined for unregistration\n var current = matched.instances[name];\n if (\n (val && current !== vm) ||\n (!val && current === vm)\n ) {\n matched.instances[name] = val;\n }\n }\n\n // also register instance in prepatch hook\n // in case the same component instance is reused across different routes\n ;(data.hook || (data.hook = {})).prepatch = function (_, vnode) {\n matched.instances[name] = vnode.componentInstance;\n };\n\n // register instance in init hook\n // in case kept-alive component be actived when routes changed\n data.hook.init = function (vnode) {\n if (vnode.data.keepAlive &&\n vnode.componentInstance &&\n vnode.componentInstance !== matched.instances[name]\n ) {\n matched.instances[name] = vnode.componentInstance;\n }\n\n // if the route transition has already been confirmed then we weren't\n // able to call the cbs during confirmation as the component was not\n // registered yet, so we call it here.\n handleRouteEntered(route);\n };\n\n var configProps = matched.props && matched.props[name];\n // save route and configProps in cache\n if (configProps) {\n extend(cache[name], {\n route: route,\n configProps: configProps\n });\n fillPropsinData(component, data, route, configProps);\n }\n\n return h(component, data, children)\n }\n};\n\nfunction fillPropsinData (component, data, route, configProps) {\n // resolve props\n var propsToPass = data.props = resolveProps(route, configProps);\n if (propsToPass) {\n // clone to prevent mutation\n propsToPass = data.props = extend({}, propsToPass);\n // pass non-declared props as attrs\n var attrs = data.attrs = data.attrs || {};\n for (var key in propsToPass) {\n if (!component.props || !(key in component.props)) {\n attrs[key] = propsToPass[key];\n delete propsToPass[key];\n }\n }\n }\n}\n\nfunction resolveProps (route, config) {\n switch (typeof config) {\n case 'undefined':\n return\n case 'object':\n return config\n case 'function':\n return config(route)\n case 'boolean':\n return config ? route.params : undefined\n default:\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n \"props in \\\"\" + (route.path) + \"\\\" is a \" + (typeof config) + \", \" +\n \"expecting an object, function or boolean.\"\n );\n }\n }\n}\n\n/* */\n\nfunction resolvePath (\n relative,\n base,\n append\n) {\n var firstChar = relative.charAt(0);\n if (firstChar === '/') {\n return relative\n }\n\n if (firstChar === '?' || firstChar === '#') {\n return base + relative\n }\n\n var stack = base.split('/');\n\n // remove trailing segment if:\n // - not appending\n // - appending to trailing slash (last segment is empty)\n if (!append || !stack[stack.length - 1]) {\n stack.pop();\n }\n\n // resolve relative path\n var segments = relative.replace(/^\\//, '').split('/');\n for (var i = 0; i < segments.length; i++) {\n var segment = segments[i];\n if (segment === '..') {\n stack.pop();\n } else if (segment !== '.') {\n stack.push(segment);\n }\n }\n\n // ensure leading slash\n if (stack[0] !== '') {\n stack.unshift('');\n }\n\n return stack.join('/')\n}\n\nfunction parsePath (path) {\n var hash = '';\n var query = '';\n\n var hashIndex = path.indexOf('#');\n if (hashIndex >= 0) {\n hash = path.slice(hashIndex);\n path = path.slice(0, hashIndex);\n }\n\n var queryIndex = path.indexOf('?');\n if (queryIndex >= 0) {\n query = path.slice(queryIndex + 1);\n path = path.slice(0, queryIndex);\n }\n\n return {\n path: path,\n query: query,\n hash: hash\n }\n}\n\nfunction cleanPath (path) {\n return path.replace(/\\/(?:\\s*\\/)+/g, '/')\n}\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var defaultDelimiter = options && options.delimiter || '/';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n var next = str[index];\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var modifier = res[6];\n var asterisk = res[7];\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var partial = prefix != null && next != null && next !== prefix;\n var repeat = modifier === '+' || modifier === '*';\n var optional = modifier === '?' || modifier === '*';\n var delimiter = res[2] || defaultDelimiter;\n var pattern = capture || group;\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options));\n }\n }\n\n return function (obj, opts) {\n var path = '';\n var data = obj || {};\n var options = opts || {};\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix;\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = '(?:' + token.pattern + ')';\n\n keys.push(token);\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = prefix + '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/');\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)';\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options);\n keys = [];\n }\n\n options = options || {};\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/* */\n\n// $flow-disable-line\nvar regexpCompileCache = Object.create(null);\n\nfunction fillParams (\n path,\n params,\n routeMsg\n) {\n params = params || {};\n try {\n var filler =\n regexpCompileCache[path] ||\n (regexpCompileCache[path] = pathToRegexp_1.compile(path));\n\n // Fix #2505 resolving asterisk routes { name: 'not-found', params: { pathMatch: '/not-found' }}\n // and fix #3106 so that you can work with location descriptor object having params.pathMatch equal to empty string\n if (typeof params.pathMatch === 'string') { params[0] = params.pathMatch; }\n\n return filler(params, { pretty: true })\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n // Fix #3072 no warn if `pathMatch` is string\n warn(typeof params.pathMatch === 'string', (\"missing param for \" + routeMsg + \": \" + (e.message)));\n }\n return ''\n } finally {\n // delete the 0 if it was added\n delete params[0];\n }\n}\n\n/* */\n\nfunction normalizeLocation (\n raw,\n current,\n append,\n router\n) {\n var next = typeof raw === 'string' ? { path: raw } : raw;\n // named target\n if (next._normalized) {\n return next\n } else if (next.name) {\n next = extend({}, raw);\n var params = next.params;\n if (params && typeof params === 'object') {\n next.params = extend({}, params);\n }\n return next\n }\n\n // relative params\n if (!next.path && next.params && current) {\n next = extend({}, next);\n next._normalized = true;\n var params$1 = extend(extend({}, current.params), next.params);\n if (current.name) {\n next.name = current.name;\n next.params = params$1;\n } else if (current.matched.length) {\n var rawPath = current.matched[current.matched.length - 1].path;\n next.path = fillParams(rawPath, params$1, (\"path \" + (current.path)));\n } else if (process.env.NODE_ENV !== 'production') {\n warn(false, \"relative params navigation requires a current route.\");\n }\n return next\n }\n\n var parsedPath = parsePath(next.path || '');\n var basePath = (current && current.path) || '/';\n var path = parsedPath.path\n ? resolvePath(parsedPath.path, basePath, append || next.append)\n : basePath;\n\n var query = resolveQuery(\n parsedPath.query,\n next.query,\n router && router.options.parseQuery\n );\n\n var hash = next.hash || parsedPath.hash;\n if (hash && hash.charAt(0) !== '#') {\n hash = \"#\" + hash;\n }\n\n return {\n _normalized: true,\n path: path,\n query: query,\n hash: hash\n }\n}\n\n/* */\n\n// work around weird flow bug\nvar toTypes = [String, Object];\nvar eventTypes = [String, Array];\n\nvar noop = function () {};\n\nvar warnedCustomSlot;\nvar warnedTagProp;\nvar warnedEventProp;\n\nvar Link = {\n name: 'RouterLink',\n props: {\n to: {\n type: toTypes,\n required: true\n },\n tag: {\n type: String,\n default: 'a'\n },\n custom: Boolean,\n exact: Boolean,\n exactPath: Boolean,\n append: Boolean,\n replace: Boolean,\n activeClass: String,\n exactActiveClass: String,\n ariaCurrentValue: {\n type: String,\n default: 'page'\n },\n event: {\n type: eventTypes,\n default: 'click'\n }\n },\n render: function render (h) {\n var this$1$1 = this;\n\n var router = this.$router;\n var current = this.$route;\n var ref = router.resolve(\n this.to,\n current,\n this.append\n );\n var location = ref.location;\n var route = ref.route;\n var href = ref.href;\n\n var classes = {};\n var globalActiveClass = router.options.linkActiveClass;\n var globalExactActiveClass = router.options.linkExactActiveClass;\n // Support global empty active class\n var activeClassFallback =\n globalActiveClass == null ? 'router-link-active' : globalActiveClass;\n var exactActiveClassFallback =\n globalExactActiveClass == null\n ? 'router-link-exact-active'\n : globalExactActiveClass;\n var activeClass =\n this.activeClass == null ? activeClassFallback : this.activeClass;\n var exactActiveClass =\n this.exactActiveClass == null\n ? exactActiveClassFallback\n : this.exactActiveClass;\n\n var compareTarget = route.redirectedFrom\n ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router)\n : route;\n\n classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);\n classes[activeClass] = this.exact || this.exactPath\n ? classes[exactActiveClass]\n : isIncludedRoute(current, compareTarget);\n\n var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;\n\n var handler = function (e) {\n if (guardEvent(e)) {\n if (this$1$1.replace) {\n router.replace(location, noop);\n } else {\n router.push(location, noop);\n }\n }\n };\n\n var on = { click: guardEvent };\n if (Array.isArray(this.event)) {\n this.event.forEach(function (e) {\n on[e] = handler;\n });\n } else {\n on[this.event] = handler;\n }\n\n var data = { class: classes };\n\n var scopedSlot =\n !this.$scopedSlots.$hasNormal &&\n this.$scopedSlots.default &&\n this.$scopedSlots.default({\n href: href,\n route: route,\n navigate: handler,\n isActive: classes[activeClass],\n isExactActive: classes[exactActiveClass]\n });\n\n if (scopedSlot) {\n if (process.env.NODE_ENV !== 'production' && !this.custom) {\n !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an
element. Use the custom prop to remove this warning:\\n\\n');\n warnedCustomSlot = true;\n }\n if (scopedSlot.length === 1) {\n return scopedSlot[0]\n } else if (scopedSlot.length > 1 || !scopedSlot.length) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false,\n (\" with to=\\\"\" + (this.to) + \"\\\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element.\")\n );\n }\n return scopedSlot.length === 0 ? h() : h('span', {}, scopedSlot)\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if ('tag' in this.$options.propsData && !warnedTagProp) {\n warn(\n false,\n \"'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedTagProp = true;\n }\n if ('event' in this.$options.propsData && !warnedEventProp) {\n warn(\n false,\n \"'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link.\"\n );\n warnedEventProp = true;\n }\n }\n\n if (this.tag === 'a') {\n data.on = on;\n data.attrs = { href: href, 'aria-current': ariaCurrentValue };\n } else {\n // find the first child and apply listener and href\n var a = findAnchor(this.$slots.default);\n if (a) {\n // in case the is a static node\n a.isStatic = false;\n var aData = (a.data = extend({}, a.data));\n aData.on = aData.on || {};\n // transform existing events in both objects into arrays so we can push later\n for (var event in aData.on) {\n var handler$1 = aData.on[event];\n if (event in on) {\n aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];\n }\n }\n // append new listeners for router-link\n for (var event$1 in on) {\n if (event$1 in aData.on) {\n // on[event] is always a function\n aData.on[event$1].push(on[event$1]);\n } else {\n aData.on[event$1] = handler;\n }\n }\n\n var aAttrs = (a.data.attrs = extend({}, a.data.attrs));\n aAttrs.href = href;\n aAttrs['aria-current'] = ariaCurrentValue;\n } else {\n // doesn't have child, apply listener to self\n data.on = on;\n }\n }\n\n return h(this.tag, data, this.$slots.default)\n }\n};\n\nfunction guardEvent (e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }\n // don't redirect when preventDefault called\n if (e.defaultPrevented) { return }\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0) { return }\n // don't redirect if `target=\"_blank\"`\n if (e.currentTarget && e.currentTarget.getAttribute) {\n var target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target)) { return }\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault) {\n e.preventDefault();\n }\n return true\n}\n\nfunction findAnchor (children) {\n if (children) {\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.tag === 'a') {\n return child\n }\n if (child.children && (child = findAnchor(child.children))) {\n return child\n }\n }\n }\n}\n\nvar _Vue;\n\nfunction install (Vue) {\n if (install.installed && _Vue === Vue) { return }\n install.installed = true;\n\n _Vue = Vue;\n\n var isDef = function (v) { return v !== undefined; };\n\n var registerInstance = function (vm, callVal) {\n var i = vm.$options._parentVnode;\n if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {\n i(vm, callVal);\n }\n };\n\n Vue.mixin({\n beforeCreate: function beforeCreate () {\n if (isDef(this.$options.router)) {\n this._routerRoot = this;\n this._router = this.$options.router;\n this._router.init(this);\n Vue.util.defineReactive(this, '_route', this._router.history.current);\n } else {\n this._routerRoot = (this.$parent && this.$parent._routerRoot) || this;\n }\n registerInstance(this, this);\n },\n destroyed: function destroyed () {\n registerInstance(this);\n }\n });\n\n Object.defineProperty(Vue.prototype, '$router', {\n get: function get () { return this._routerRoot._router }\n });\n\n Object.defineProperty(Vue.prototype, '$route', {\n get: function get () { return this._routerRoot._route }\n });\n\n Vue.component('RouterView', View);\n Vue.component('RouterLink', Link);\n\n var strats = Vue.config.optionMergeStrategies;\n // use the same hook merging strategy for route hooks\n strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;\n}\n\n/* */\n\nvar inBrowser = typeof window !== 'undefined';\n\n/* */\n\nfunction createRouteMap (\n routes,\n oldPathList,\n oldPathMap,\n oldNameMap,\n parentRoute\n) {\n // the path list is used to control path matching priority\n var pathList = oldPathList || [];\n // $flow-disable-line\n var pathMap = oldPathMap || Object.create(null);\n // $flow-disable-line\n var nameMap = oldNameMap || Object.create(null);\n\n routes.forEach(function (route) {\n addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);\n });\n\n // ensure wildcard routes are always at the end\n for (var i = 0, l = pathList.length; i < l; i++) {\n if (pathList[i] === '*') {\n pathList.push(pathList.splice(i, 1)[0]);\n l--;\n i--;\n }\n }\n\n if (process.env.NODE_ENV === 'development') {\n // warn if routes do not include leading slashes\n var found = pathList\n // check for missing leading slash\n .filter(function (path) { return path && path.charAt(0) !== '*' && path.charAt(0) !== '/'; });\n\n if (found.length > 0) {\n var pathNames = found.map(function (path) { return (\"- \" + path); }).join('\\n');\n warn(false, (\"Non-nested routes must include a leading slash character. Fix the following routes: \\n\" + pathNames));\n }\n }\n\n return {\n pathList: pathList,\n pathMap: pathMap,\n nameMap: nameMap\n }\n}\n\nfunction addRouteRecord (\n pathList,\n pathMap,\n nameMap,\n route,\n parent,\n matchAs\n) {\n var path = route.path;\n var name = route.name;\n if (process.env.NODE_ENV !== 'production') {\n assert(path != null, \"\\\"path\\\" is required in a route configuration.\");\n assert(\n typeof route.component !== 'string',\n \"route config \\\"component\\\" for path: \" + (String(\n path || name\n )) + \" cannot be a \" + \"string id. Use an actual component instead.\"\n );\n\n warn(\n // eslint-disable-next-line no-control-regex\n !/[^\\u0000-\\u007F]+/.test(path),\n \"Route with path \\\"\" + path + \"\\\" contains unencoded characters, make sure \" +\n \"your path is correctly encoded before passing it to the router. Use \" +\n \"encodeURI to encode static segments of your path.\"\n );\n }\n\n var pathToRegexpOptions =\n route.pathToRegexpOptions || {};\n var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);\n\n if (typeof route.caseSensitive === 'boolean') {\n pathToRegexpOptions.sensitive = route.caseSensitive;\n }\n\n var record = {\n path: normalizedPath,\n regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),\n components: route.components || { default: route.component },\n alias: route.alias\n ? typeof route.alias === 'string'\n ? [route.alias]\n : route.alias\n : [],\n instances: {},\n enteredCbs: {},\n name: name,\n parent: parent,\n matchAs: matchAs,\n redirect: route.redirect,\n beforeEnter: route.beforeEnter,\n meta: route.meta || {},\n props:\n route.props == null\n ? {}\n : route.components\n ? route.props\n : { default: route.props }\n };\n\n if (route.children) {\n // Warn if route is named, does not redirect and has a default child route.\n // If users navigate to this route by name, the default child will\n // not be rendered (GH Issue #629)\n if (process.env.NODE_ENV !== 'production') {\n if (\n route.name &&\n !route.redirect &&\n route.children.some(function (child) { return /^\\/?$/.test(child.path); })\n ) {\n warn(\n false,\n \"Named Route '\" + (route.name) + \"' has a default child route. \" +\n \"When navigating to this named route (:to=\\\"{name: '\" + (route.name) + \"'}\\\"), \" +\n \"the default child route will not be rendered. Remove the name from \" +\n \"this route and use the name of the default child route for named \" +\n \"links instead.\"\n );\n }\n }\n route.children.forEach(function (child) {\n var childMatchAs = matchAs\n ? cleanPath((matchAs + \"/\" + (child.path)))\n : undefined;\n addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);\n });\n }\n\n if (!pathMap[record.path]) {\n pathList.push(record.path);\n pathMap[record.path] = record;\n }\n\n if (route.alias !== undefined) {\n var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];\n for (var i = 0; i < aliases.length; ++i) {\n var alias = aliases[i];\n if (process.env.NODE_ENV !== 'production' && alias === path) {\n warn(\n false,\n (\"Found an alias with the same value as the path: \\\"\" + path + \"\\\". You have to remove that alias. It will be ignored in development.\")\n );\n // skip in dev to make it work\n continue\n }\n\n var aliasRoute = {\n path: alias,\n children: route.children\n };\n addRouteRecord(\n pathList,\n pathMap,\n nameMap,\n aliasRoute,\n parent,\n record.path || '/' // matchAs\n );\n }\n }\n\n if (name) {\n if (!nameMap[name]) {\n nameMap[name] = record;\n } else if (process.env.NODE_ENV !== 'production' && !matchAs) {\n warn(\n false,\n \"Duplicate named routes definition: \" +\n \"{ name: \\\"\" + name + \"\\\", path: \\\"\" + (record.path) + \"\\\" }\"\n );\n }\n }\n}\n\nfunction compileRouteRegex (\n path,\n pathToRegexpOptions\n) {\n var regex = pathToRegexp_1(path, [], pathToRegexpOptions);\n if (process.env.NODE_ENV !== 'production') {\n var keys = Object.create(null);\n regex.keys.forEach(function (key) {\n warn(\n !keys[key.name],\n (\"Duplicate param keys in route with path: \\\"\" + path + \"\\\"\")\n );\n keys[key.name] = true;\n });\n }\n return regex\n}\n\nfunction normalizePath (\n path,\n parent,\n strict\n) {\n if (!strict) { path = path.replace(/\\/$/, ''); }\n if (path[0] === '/') { return path }\n if (parent == null) { return path }\n return cleanPath(((parent.path) + \"/\" + path))\n}\n\n/* */\n\n\n\nfunction createMatcher (\n routes,\n router\n) {\n var ref = createRouteMap(routes);\n var pathList = ref.pathList;\n var pathMap = ref.pathMap;\n var nameMap = ref.nameMap;\n\n function addRoutes (routes) {\n createRouteMap(routes, pathList, pathMap, nameMap);\n }\n\n function addRoute (parentOrRoute, route) {\n var parent = (typeof parentOrRoute !== 'object') ? nameMap[parentOrRoute] : undefined;\n // $flow-disable-line\n createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);\n\n // add aliases of parent\n if (parent && parent.alias.length) {\n createRouteMap(\n // $flow-disable-line route is defined if parent is\n parent.alias.map(function (alias) { return ({ path: alias, children: [route] }); }),\n pathList,\n pathMap,\n nameMap,\n parent\n );\n }\n }\n\n function getRoutes () {\n return pathList.map(function (path) { return pathMap[path]; })\n }\n\n function match (\n raw,\n currentRoute,\n redirectedFrom\n ) {\n var location = normalizeLocation(raw, currentRoute, false, router);\n var name = location.name;\n\n if (name) {\n var record = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n warn(record, (\"Route with name '\" + name + \"' does not exist\"));\n }\n if (!record) { return _createRoute(null, location) }\n var paramNames = record.regex.keys\n .filter(function (key) { return !key.optional; })\n .map(function (key) { return key.name; });\n\n if (typeof location.params !== 'object') {\n location.params = {};\n }\n\n if (currentRoute && typeof currentRoute.params === 'object') {\n for (var key in currentRoute.params) {\n if (!(key in location.params) && paramNames.indexOf(key) > -1) {\n location.params[key] = currentRoute.params[key];\n }\n }\n }\n\n location.path = fillParams(record.path, location.params, (\"named route \\\"\" + name + \"\\\"\"));\n return _createRoute(record, location, redirectedFrom)\n } else if (location.path) {\n location.params = {};\n for (var i = 0; i < pathList.length; i++) {\n var path = pathList[i];\n var record$1 = pathMap[path];\n if (matchRoute(record$1.regex, location.path, location.params)) {\n return _createRoute(record$1, location, redirectedFrom)\n }\n }\n }\n // no match\n return _createRoute(null, location)\n }\n\n function redirect (\n record,\n location\n ) {\n var originalRedirect = record.redirect;\n var redirect = typeof originalRedirect === 'function'\n ? originalRedirect(createRoute(record, location, null, router))\n : originalRedirect;\n\n if (typeof redirect === 'string') {\n redirect = { path: redirect };\n }\n\n if (!redirect || typeof redirect !== 'object') {\n if (process.env.NODE_ENV !== 'production') {\n warn(\n false, (\"invalid redirect option: \" + (JSON.stringify(redirect)))\n );\n }\n return _createRoute(null, location)\n }\n\n var re = redirect;\n var name = re.name;\n var path = re.path;\n var query = location.query;\n var hash = location.hash;\n var params = location.params;\n query = re.hasOwnProperty('query') ? re.query : query;\n hash = re.hasOwnProperty('hash') ? re.hash : hash;\n params = re.hasOwnProperty('params') ? re.params : params;\n\n if (name) {\n // resolved named direct\n var targetRecord = nameMap[name];\n if (process.env.NODE_ENV !== 'production') {\n assert(targetRecord, (\"redirect failed: named route \\\"\" + name + \"\\\" not found.\"));\n }\n return match({\n _normalized: true,\n name: name,\n query: query,\n hash: hash,\n params: params\n }, undefined, location)\n } else if (path) {\n // 1. resolve relative redirect\n var rawPath = resolveRecordPath(path, record);\n // 2. resolve params\n var resolvedPath = fillParams(rawPath, params, (\"redirect route with path \\\"\" + rawPath + \"\\\"\"));\n // 3. rematch with existing query and hash\n return match({\n _normalized: true,\n path: resolvedPath,\n query: query,\n hash: hash\n }, undefined, location)\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, (\"invalid redirect option: \" + (JSON.stringify(redirect))));\n }\n return _createRoute(null, location)\n }\n }\n\n function alias (\n record,\n location,\n matchAs\n ) {\n var aliasedPath = fillParams(matchAs, location.params, (\"aliased route with path \\\"\" + matchAs + \"\\\"\"));\n var aliasedMatch = match({\n _normalized: true,\n path: aliasedPath\n });\n if (aliasedMatch) {\n var matched = aliasedMatch.matched;\n var aliasedRecord = matched[matched.length - 1];\n location.params = aliasedMatch.params;\n return _createRoute(aliasedRecord, location)\n }\n return _createRoute(null, location)\n }\n\n function _createRoute (\n record,\n location,\n redirectedFrom\n ) {\n if (record && record.redirect) {\n return redirect(record, redirectedFrom || location)\n }\n if (record && record.matchAs) {\n return alias(record, location, record.matchAs)\n }\n return createRoute(record, location, redirectedFrom, router)\n }\n\n return {\n match: match,\n addRoute: addRoute,\n getRoutes: getRoutes,\n addRoutes: addRoutes\n }\n}\n\nfunction matchRoute (\n regex,\n path,\n params\n) {\n var m = path.match(regex);\n\n if (!m) {\n return false\n } else if (!params) {\n return true\n }\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = regex.keys[i - 1];\n if (key) {\n // Fix #1994: using * with props: true generates a param named 0\n params[key.name || 'pathMatch'] = typeof m[i] === 'string' ? decode(m[i]) : m[i];\n }\n }\n\n return true\n}\n\nfunction resolveRecordPath (path, record) {\n return resolvePath(path, record.parent ? record.parent.path : '/', true)\n}\n\n/* */\n\n// use User Timing api (if present) for more accurate key precision\nvar Time =\n inBrowser && window.performance && window.performance.now\n ? window.performance\n : Date;\n\nfunction genStateKey () {\n return Time.now().toFixed(3)\n}\n\nvar _key = genStateKey();\n\nfunction getStateKey () {\n return _key\n}\n\nfunction setStateKey (key) {\n return (_key = key)\n}\n\n/* */\n\nvar positionStore = Object.create(null);\n\nfunction setupScroll () {\n // Prevent browser scroll behavior on History popstate\n if ('scrollRestoration' in window.history) {\n window.history.scrollRestoration = 'manual';\n }\n // Fix for #1585 for Firefox\n // Fix for #2195 Add optional third attribute to workaround a bug in safari https://bugs.webkit.org/show_bug.cgi?id=182678\n // Fix for #2774 Support for apps loaded from Windows file shares not mapped to network drives: replaced location.origin with\n // window.location.protocol + '//' + window.location.host\n // location.host contains the port and location.hostname doesn't\n var protocolAndPath = window.location.protocol + '//' + window.location.host;\n var absolutePath = window.location.href.replace(protocolAndPath, '');\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, window.history.state);\n stateCopy.key = getStateKey();\n window.history.replaceState(stateCopy, '', absolutePath);\n window.addEventListener('popstate', handlePopState);\n return function () {\n window.removeEventListener('popstate', handlePopState);\n }\n}\n\nfunction handleScroll (\n router,\n to,\n from,\n isPop\n) {\n if (!router.app) {\n return\n }\n\n var behavior = router.options.scrollBehavior;\n if (!behavior) {\n return\n }\n\n if (process.env.NODE_ENV !== 'production') {\n assert(typeof behavior === 'function', \"scrollBehavior must be a function\");\n }\n\n // wait until re-render finishes before scrolling\n router.app.$nextTick(function () {\n var position = getScrollPosition();\n var shouldScroll = behavior.call(\n router,\n to,\n from,\n isPop ? position : null\n );\n\n if (!shouldScroll) {\n return\n }\n\n if (typeof shouldScroll.then === 'function') {\n shouldScroll\n .then(function (shouldScroll) {\n scrollToPosition((shouldScroll), position);\n })\n .catch(function (err) {\n if (process.env.NODE_ENV !== 'production') {\n assert(false, err.toString());\n }\n });\n } else {\n scrollToPosition(shouldScroll, position);\n }\n });\n}\n\nfunction saveScrollPosition () {\n var key = getStateKey();\n if (key) {\n positionStore[key] = {\n x: window.pageXOffset,\n y: window.pageYOffset\n };\n }\n}\n\nfunction handlePopState (e) {\n saveScrollPosition();\n if (e.state && e.state.key) {\n setStateKey(e.state.key);\n }\n}\n\nfunction getScrollPosition () {\n var key = getStateKey();\n if (key) {\n return positionStore[key]\n }\n}\n\nfunction getElementPosition (el, offset) {\n var docEl = document.documentElement;\n var docRect = docEl.getBoundingClientRect();\n var elRect = el.getBoundingClientRect();\n return {\n x: elRect.left - docRect.left - offset.x,\n y: elRect.top - docRect.top - offset.y\n }\n}\n\nfunction isValidPosition (obj) {\n return isNumber(obj.x) || isNumber(obj.y)\n}\n\nfunction normalizePosition (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : window.pageXOffset,\n y: isNumber(obj.y) ? obj.y : window.pageYOffset\n }\n}\n\nfunction normalizeOffset (obj) {\n return {\n x: isNumber(obj.x) ? obj.x : 0,\n y: isNumber(obj.y) ? obj.y : 0\n }\n}\n\nfunction isNumber (v) {\n return typeof v === 'number'\n}\n\nvar hashStartsWithNumberRE = /^#\\d/;\n\nfunction scrollToPosition (shouldScroll, position) {\n var isObject = typeof shouldScroll === 'object';\n if (isObject && typeof shouldScroll.selector === 'string') {\n // getElementById would still fail if the selector contains a more complicated query like #main[data-attr]\n // but at the same time, it doesn't make much sense to select an element with an id and an extra selector\n var el = hashStartsWithNumberRE.test(shouldScroll.selector) // $flow-disable-line\n ? document.getElementById(shouldScroll.selector.slice(1)) // $flow-disable-line\n : document.querySelector(shouldScroll.selector);\n\n if (el) {\n var offset =\n shouldScroll.offset && typeof shouldScroll.offset === 'object'\n ? shouldScroll.offset\n : {};\n offset = normalizeOffset(offset);\n position = getElementPosition(el, offset);\n } else if (isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n } else if (isObject && isValidPosition(shouldScroll)) {\n position = normalizePosition(shouldScroll);\n }\n\n if (position) {\n // $flow-disable-line\n if ('scrollBehavior' in document.documentElement.style) {\n window.scrollTo({\n left: position.x,\n top: position.y,\n // $flow-disable-line\n behavior: shouldScroll.behavior\n });\n } else {\n window.scrollTo(position.x, position.y);\n }\n }\n}\n\n/* */\n\nvar supportsPushState =\n inBrowser &&\n (function () {\n var ua = window.navigator.userAgent;\n\n if (\n (ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&\n ua.indexOf('Mobile Safari') !== -1 &&\n ua.indexOf('Chrome') === -1 &&\n ua.indexOf('Windows Phone') === -1\n ) {\n return false\n }\n\n return window.history && typeof window.history.pushState === 'function'\n })();\n\nfunction pushState (url, replace) {\n saveScrollPosition();\n // try...catch the pushState call to get around Safari\n // DOM Exception 18 where it limits to 100 pushState calls\n var history = window.history;\n try {\n if (replace) {\n // preserve existing history state as it could be overriden by the user\n var stateCopy = extend({}, history.state);\n stateCopy.key = getStateKey();\n history.replaceState(stateCopy, '', url);\n } else {\n history.pushState({ key: setStateKey(genStateKey()) }, '', url);\n }\n } catch (e) {\n window.location[replace ? 'replace' : 'assign'](url);\n }\n}\n\nfunction replaceState (url) {\n pushState(url, true);\n}\n\n// When changing thing, also edit router.d.ts\nvar NavigationFailureType = {\n redirected: 2,\n aborted: 4,\n cancelled: 8,\n duplicated: 16\n};\n\nfunction createNavigationRedirectedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.redirected,\n (\"Redirected when going from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (stringifyRoute(\n to\n )) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createNavigationDuplicatedError (from, to) {\n var error = createRouterError(\n from,\n to,\n NavigationFailureType.duplicated,\n (\"Avoided redundant navigation to current location: \\\"\" + (from.fullPath) + \"\\\".\")\n );\n // backwards compatible with the first introduction of Errors\n error.name = 'NavigationDuplicated';\n return error\n}\n\nfunction createNavigationCancelledError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.cancelled,\n (\"Navigation cancelled from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" with a new navigation.\")\n )\n}\n\nfunction createNavigationAbortedError (from, to) {\n return createRouterError(\n from,\n to,\n NavigationFailureType.aborted,\n (\"Navigation aborted from \\\"\" + (from.fullPath) + \"\\\" to \\\"\" + (to.fullPath) + \"\\\" via a navigation guard.\")\n )\n}\n\nfunction createRouterError (from, to, type, message) {\n var error = new Error(message);\n error._isRouter = true;\n error.from = from;\n error.to = to;\n error.type = type;\n\n return error\n}\n\nvar propertiesToLog = ['params', 'query', 'hash'];\n\nfunction stringifyRoute (to) {\n if (typeof to === 'string') { return to }\n if ('path' in to) { return to.path }\n var location = {};\n propertiesToLog.forEach(function (key) {\n if (key in to) { location[key] = to[key]; }\n });\n return JSON.stringify(location, null, 2)\n}\n\nfunction isError (err) {\n return Object.prototype.toString.call(err).indexOf('Error') > -1\n}\n\nfunction isNavigationFailure (err, errorType) {\n return (\n isError(err) &&\n err._isRouter &&\n (errorType == null || err.type === errorType)\n )\n}\n\n/* */\n\nfunction runQueue (queue, fn, cb) {\n var step = function (index) {\n if (index >= queue.length) {\n cb();\n } else {\n if (queue[index]) {\n fn(queue[index], function () {\n step(index + 1);\n });\n } else {\n step(index + 1);\n }\n }\n };\n step(0);\n}\n\n/* */\n\nfunction resolveAsyncComponents (matched) {\n return function (to, from, next) {\n var hasAsync = false;\n var pending = 0;\n var error = null;\n\n flatMapComponents(matched, function (def, _, match, key) {\n // if it's a function and doesn't have cid attached,\n // assume it's an async component resolve function.\n // we are not using Vue's default async resolving mechanism because\n // we want to halt the navigation until the incoming component has been\n // resolved.\n if (typeof def === 'function' && def.cid === undefined) {\n hasAsync = true;\n pending++;\n\n var resolve = once(function (resolvedDef) {\n if (isESModule(resolvedDef)) {\n resolvedDef = resolvedDef.default;\n }\n // save resolved on async factory in case it's used elsewhere\n def.resolved = typeof resolvedDef === 'function'\n ? resolvedDef\n : _Vue.extend(resolvedDef);\n match.components[key] = resolvedDef;\n pending--;\n if (pending <= 0) {\n next();\n }\n });\n\n var reject = once(function (reason) {\n var msg = \"Failed to resolve async component \" + key + \": \" + reason;\n process.env.NODE_ENV !== 'production' && warn(false, msg);\n if (!error) {\n error = isError(reason)\n ? reason\n : new Error(msg);\n next(error);\n }\n });\n\n var res;\n try {\n res = def(resolve, reject);\n } catch (e) {\n reject(e);\n }\n if (res) {\n if (typeof res.then === 'function') {\n res.then(resolve, reject);\n } else {\n // new syntax in Vue 2.3\n var comp = res.component;\n if (comp && typeof comp.then === 'function') {\n comp.then(resolve, reject);\n }\n }\n }\n }\n });\n\n if (!hasAsync) { next(); }\n }\n}\n\nfunction flatMapComponents (\n matched,\n fn\n) {\n return flatten(matched.map(function (m) {\n return Object.keys(m.components).map(function (key) { return fn(\n m.components[key],\n m.instances[key],\n m, key\n ); })\n }))\n}\n\nfunction flatten (arr) {\n return Array.prototype.concat.apply([], arr)\n}\n\nvar hasSymbol =\n typeof Symbol === 'function' &&\n typeof Symbol.toStringTag === 'symbol';\n\nfunction isESModule (obj) {\n return obj.__esModule || (hasSymbol && obj[Symbol.toStringTag] === 'Module')\n}\n\n// in Webpack 2, require.ensure now also returns a Promise\n// so the resolve/reject functions may get called an extra time\n// if the user uses an arrow function shorthand that happens to\n// return that Promise.\nfunction once (fn) {\n var called = false;\n return function () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n if (called) { return }\n called = true;\n return fn.apply(this, args)\n }\n}\n\n/* */\n\nvar History = function History (router, base) {\n this.router = router;\n this.base = normalizeBase(base);\n // start with a route object that stands for \"nowhere\"\n this.current = START;\n this.pending = null;\n this.ready = false;\n this.readyCbs = [];\n this.readyErrorCbs = [];\n this.errorCbs = [];\n this.listeners = [];\n};\n\nHistory.prototype.listen = function listen (cb) {\n this.cb = cb;\n};\n\nHistory.prototype.onReady = function onReady (cb, errorCb) {\n if (this.ready) {\n cb();\n } else {\n this.readyCbs.push(cb);\n if (errorCb) {\n this.readyErrorCbs.push(errorCb);\n }\n }\n};\n\nHistory.prototype.onError = function onError (errorCb) {\n this.errorCbs.push(errorCb);\n};\n\nHistory.prototype.transitionTo = function transitionTo (\n location,\n onComplete,\n onAbort\n) {\n var this$1$1 = this;\n\n var route;\n // catch redirect option https://github.com/vuejs/vue-router/issues/3201\n try {\n route = this.router.match(location, this.current);\n } catch (e) {\n this.errorCbs.forEach(function (cb) {\n cb(e);\n });\n // Exception should still be thrown\n throw e\n }\n var prev = this.current;\n this.confirmTransition(\n route,\n function () {\n this$1$1.updateRoute(route);\n onComplete && onComplete(route);\n this$1$1.ensureURL();\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n\n // fire ready cbs once\n if (!this$1$1.ready) {\n this$1$1.ready = true;\n this$1$1.readyCbs.forEach(function (cb) {\n cb(route);\n });\n }\n },\n function (err) {\n if (onAbort) {\n onAbort(err);\n }\n if (err && !this$1$1.ready) {\n // Initial redirection should not mark the history as ready yet\n // because it's triggered by the redirection instead\n // https://github.com/vuejs/vue-router/issues/3225\n // https://github.com/vuejs/vue-router/issues/3331\n if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {\n this$1$1.ready = true;\n this$1$1.readyErrorCbs.forEach(function (cb) {\n cb(err);\n });\n }\n }\n }\n );\n};\n\nHistory.prototype.confirmTransition = function confirmTransition (route, onComplete, onAbort) {\n var this$1$1 = this;\n\n var current = this.current;\n this.pending = route;\n var abort = function (err) {\n // changed after adding errors with\n // https://github.com/vuejs/vue-router/pull/3047 before that change,\n // redirect and aborted navigation would produce an err == null\n if (!isNavigationFailure(err) && isError(err)) {\n if (this$1$1.errorCbs.length) {\n this$1$1.errorCbs.forEach(function (cb) {\n cb(err);\n });\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'uncaught error during route navigation:');\n }\n console.error(err);\n }\n }\n onAbort && onAbort(err);\n };\n var lastRouteIndex = route.matched.length - 1;\n var lastCurrentIndex = current.matched.length - 1;\n if (\n isSameRoute(route, current) &&\n // in the case the route map has been dynamically appended to\n lastRouteIndex === lastCurrentIndex &&\n route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]\n ) {\n this.ensureURL();\n if (route.hash) {\n handleScroll(this.router, current, route, false);\n }\n return abort(createNavigationDuplicatedError(current, route))\n }\n\n var ref = resolveQueue(\n this.current.matched,\n route.matched\n );\n var updated = ref.updated;\n var deactivated = ref.deactivated;\n var activated = ref.activated;\n\n var queue = [].concat(\n // in-component leave guards\n extractLeaveGuards(deactivated),\n // global before hooks\n this.router.beforeHooks,\n // in-component update hooks\n extractUpdateHooks(updated),\n // in-config enter guards\n activated.map(function (m) { return m.beforeEnter; }),\n // async components\n resolveAsyncComponents(activated)\n );\n\n var iterator = function (hook, next) {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n try {\n hook(route, current, function (to) {\n if (to === false) {\n // next(false) -> abort navigation, ensure current URL\n this$1$1.ensureURL(true);\n abort(createNavigationAbortedError(current, route));\n } else if (isError(to)) {\n this$1$1.ensureURL(true);\n abort(to);\n } else if (\n typeof to === 'string' ||\n (typeof to === 'object' &&\n (typeof to.path === 'string' || typeof to.name === 'string'))\n ) {\n // next('/') or next({ path: '/' }) -> redirect\n abort(createNavigationRedirectedError(current, route));\n if (typeof to === 'object' && to.replace) {\n this$1$1.replace(to);\n } else {\n this$1$1.push(to);\n }\n } else {\n // confirm transition and pass on the value\n next(to);\n }\n });\n } catch (e) {\n abort(e);\n }\n };\n\n runQueue(queue, iterator, function () {\n // wait until async components are resolved before\n // extracting in-component enter guards\n var enterGuards = extractEnterGuards(activated);\n var queue = enterGuards.concat(this$1$1.router.resolveHooks);\n runQueue(queue, iterator, function () {\n if (this$1$1.pending !== route) {\n return abort(createNavigationCancelledError(current, route))\n }\n this$1$1.pending = null;\n onComplete(route);\n if (this$1$1.router.app) {\n this$1$1.router.app.$nextTick(function () {\n handleRouteEntered(route);\n });\n }\n });\n });\n};\n\nHistory.prototype.updateRoute = function updateRoute (route) {\n this.current = route;\n this.cb && this.cb(route);\n};\n\nHistory.prototype.setupListeners = function setupListeners () {\n // Default implementation is empty\n};\n\nHistory.prototype.teardown = function teardown () {\n // clean up event listeners\n // https://github.com/vuejs/vue-router/issues/2341\n this.listeners.forEach(function (cleanupListener) {\n cleanupListener();\n });\n this.listeners = [];\n\n // reset current history route\n // https://github.com/vuejs/vue-router/issues/3294\n this.current = START;\n this.pending = null;\n};\n\nfunction normalizeBase (base) {\n if (!base) {\n if (inBrowser) {\n // respect tag\n var baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^https?:\\/\\/[^\\/]+/, '');\n } else {\n base = '/';\n }\n }\n // make sure there's the starting slash\n if (base.charAt(0) !== '/') {\n base = '/' + base;\n }\n // remove trailing slash\n return base.replace(/\\/$/, '')\n}\n\nfunction resolveQueue (\n current,\n next\n) {\n var i;\n var max = Math.max(current.length, next.length);\n for (i = 0; i < max; i++) {\n if (current[i] !== next[i]) {\n break\n }\n }\n return {\n updated: next.slice(0, i),\n activated: next.slice(i),\n deactivated: current.slice(i)\n }\n}\n\nfunction extractGuards (\n records,\n name,\n bind,\n reverse\n) {\n var guards = flatMapComponents(records, function (def, instance, match, key) {\n var guard = extractGuard(def, name);\n if (guard) {\n return Array.isArray(guard)\n ? guard.map(function (guard) { return bind(guard, instance, match, key); })\n : bind(guard, instance, match, key)\n }\n });\n return flatten(reverse ? guards.reverse() : guards)\n}\n\nfunction extractGuard (\n def,\n key\n) {\n if (typeof def !== 'function') {\n // extend now so that global mixins are applied.\n def = _Vue.extend(def);\n }\n return def.options[key]\n}\n\nfunction extractLeaveGuards (deactivated) {\n return extractGuards(deactivated, 'beforeRouteLeave', bindGuard, true)\n}\n\nfunction extractUpdateHooks (updated) {\n return extractGuards(updated, 'beforeRouteUpdate', bindGuard)\n}\n\nfunction bindGuard (guard, instance) {\n if (instance) {\n return function boundRouteGuard () {\n return guard.apply(instance, arguments)\n }\n }\n}\n\nfunction extractEnterGuards (\n activated\n) {\n return extractGuards(\n activated,\n 'beforeRouteEnter',\n function (guard, _, match, key) {\n return bindEnterGuard(guard, match, key)\n }\n )\n}\n\nfunction bindEnterGuard (\n guard,\n match,\n key\n) {\n return function routeEnterGuard (to, from, next) {\n return guard(to, from, function (cb) {\n if (typeof cb === 'function') {\n if (!match.enteredCbs[key]) {\n match.enteredCbs[key] = [];\n }\n match.enteredCbs[key].push(cb);\n }\n next(cb);\n })\n }\n}\n\n/* */\n\nvar HTML5History = /*@__PURE__*/(function (History) {\n function HTML5History (router, base) {\n History.call(this, router, base);\n\n this._startLocation = getLocation(this.base);\n }\n\n if ( History ) HTML5History.__proto__ = History;\n HTML5History.prototype = Object.create( History && History.prototype );\n HTML5History.prototype.constructor = HTML5History;\n\n HTML5History.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n\n // Avoiding first `popstate` event dispatched in some browsers but first\n // history route not updated since async guard at the same time.\n var location = getLocation(this$1$1.base);\n if (this$1$1.current === START && location === this$1$1._startLocation) {\n return\n }\n\n this$1$1.transitionTo(location, function (route) {\n if (supportsScroll) {\n handleScroll(router, route, current, true);\n }\n });\n };\n window.addEventListener('popstate', handleRoutingEvent);\n this.listeners.push(function () {\n window.removeEventListener('popstate', handleRoutingEvent);\n });\n };\n\n HTML5History.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HTML5History.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n pushState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(location, function (route) {\n replaceState(cleanPath(this$1$1.base + route.fullPath));\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n }, onAbort);\n };\n\n HTML5History.prototype.ensureURL = function ensureURL (push) {\n if (getLocation(this.base) !== this.current.fullPath) {\n var current = cleanPath(this.base + this.current.fullPath);\n push ? pushState(current) : replaceState(current);\n }\n };\n\n HTML5History.prototype.getCurrentLocation = function getCurrentLocation () {\n return getLocation(this.base)\n };\n\n return HTML5History;\n}(History));\n\nfunction getLocation (base) {\n var path = window.location.pathname;\n var pathLowerCase = path.toLowerCase();\n var baseLowerCase = base.toLowerCase();\n // base=\"/a\" shouldn't turn path=\"/app\" into \"/a/pp\"\n // https://github.com/vuejs/vue-router/issues/3555\n // so we ensure the trailing slash in the base\n if (base && ((pathLowerCase === baseLowerCase) ||\n (pathLowerCase.indexOf(cleanPath(baseLowerCase + '/')) === 0))) {\n path = path.slice(base.length);\n }\n return (path || '/') + window.location.search + window.location.hash\n}\n\n/* */\n\nvar HashHistory = /*@__PURE__*/(function (History) {\n function HashHistory (router, base, fallback) {\n History.call(this, router, base);\n // check history fallback deeplinking\n if (fallback && checkFallback(this.base)) {\n return\n }\n ensureSlash();\n }\n\n if ( History ) HashHistory.__proto__ = History;\n HashHistory.prototype = Object.create( History && History.prototype );\n HashHistory.prototype.constructor = HashHistory;\n\n // this is delayed until the app mounts\n // to avoid the hashchange listener being fired too early\n HashHistory.prototype.setupListeners = function setupListeners () {\n var this$1$1 = this;\n\n if (this.listeners.length > 0) {\n return\n }\n\n var router = this.router;\n var expectScroll = router.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll) {\n this.listeners.push(setupScroll());\n }\n\n var handleRoutingEvent = function () {\n var current = this$1$1.current;\n if (!ensureSlash()) {\n return\n }\n this$1$1.transitionTo(getHash(), function (route) {\n if (supportsScroll) {\n handleScroll(this$1$1.router, route, current, true);\n }\n if (!supportsPushState) {\n replaceHash(route.fullPath);\n }\n });\n };\n var eventType = supportsPushState ? 'popstate' : 'hashchange';\n window.addEventListener(\n eventType,\n handleRoutingEvent\n );\n this.listeners.push(function () {\n window.removeEventListener(eventType, handleRoutingEvent);\n });\n };\n\n HashHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n pushHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n var ref = this;\n var fromRoute = ref.current;\n this.transitionTo(\n location,\n function (route) {\n replaceHash(route.fullPath);\n handleScroll(this$1$1.router, route, fromRoute, false);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n HashHistory.prototype.go = function go (n) {\n window.history.go(n);\n };\n\n HashHistory.prototype.ensureURL = function ensureURL (push) {\n var current = this.current.fullPath;\n if (getHash() !== current) {\n push ? pushHash(current) : replaceHash(current);\n }\n };\n\n HashHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n return getHash()\n };\n\n return HashHistory;\n}(History));\n\nfunction checkFallback (base) {\n var location = getLocation(base);\n if (!/^\\/#/.test(location)) {\n window.location.replace(cleanPath(base + '/#' + location));\n return true\n }\n}\n\nfunction ensureSlash () {\n var path = getHash();\n if (path.charAt(0) === '/') {\n return true\n }\n replaceHash('/' + path);\n return false\n}\n\nfunction getHash () {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var index = href.indexOf('#');\n // empty path\n if (index < 0) { return '' }\n\n href = href.slice(index + 1);\n\n return href\n}\n\nfunction getUrl (path) {\n var href = window.location.href;\n var i = href.indexOf('#');\n var base = i >= 0 ? href.slice(0, i) : href;\n return (base + \"#\" + path)\n}\n\nfunction pushHash (path) {\n if (supportsPushState) {\n pushState(getUrl(path));\n } else {\n window.location.hash = path;\n }\n}\n\nfunction replaceHash (path) {\n if (supportsPushState) {\n replaceState(getUrl(path));\n } else {\n window.location.replace(getUrl(path));\n }\n}\n\n/* */\n\nvar AbstractHistory = /*@__PURE__*/(function (History) {\n function AbstractHistory (router, base) {\n History.call(this, router, base);\n this.stack = [];\n this.index = -1;\n }\n\n if ( History ) AbstractHistory.__proto__ = History;\n AbstractHistory.prototype = Object.create( History && History.prototype );\n AbstractHistory.prototype.constructor = AbstractHistory;\n\n AbstractHistory.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);\n this$1$1.index++;\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n this.transitionTo(\n location,\n function (route) {\n this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);\n onComplete && onComplete(route);\n },\n onAbort\n );\n };\n\n AbstractHistory.prototype.go = function go (n) {\n var this$1$1 = this;\n\n var targetIndex = this.index + n;\n if (targetIndex < 0 || targetIndex >= this.stack.length) {\n return\n }\n var route = this.stack[targetIndex];\n this.confirmTransition(\n route,\n function () {\n var prev = this$1$1.current;\n this$1$1.index = targetIndex;\n this$1$1.updateRoute(route);\n this$1$1.router.afterHooks.forEach(function (hook) {\n hook && hook(route, prev);\n });\n },\n function (err) {\n if (isNavigationFailure(err, NavigationFailureType.duplicated)) {\n this$1$1.index = targetIndex;\n }\n }\n );\n };\n\n AbstractHistory.prototype.getCurrentLocation = function getCurrentLocation () {\n var current = this.stack[this.stack.length - 1];\n return current ? current.fullPath : '/'\n };\n\n AbstractHistory.prototype.ensureURL = function ensureURL () {\n // noop\n };\n\n return AbstractHistory;\n}(History));\n\n/* */\n\n\n\nvar VueRouter = function VueRouter (options) {\n if ( options === void 0 ) options = {};\n\n if (process.env.NODE_ENV !== 'production') {\n warn(this instanceof VueRouter, \"Router must be called with the new operator.\");\n }\n this.app = null;\n this.apps = [];\n this.options = options;\n this.beforeHooks = [];\n this.resolveHooks = [];\n this.afterHooks = [];\n this.matcher = createMatcher(options.routes || [], this);\n\n var mode = options.mode || 'hash';\n this.fallback =\n mode === 'history' && !supportsPushState && options.fallback !== false;\n if (this.fallback) {\n mode = 'hash';\n }\n if (!inBrowser) {\n mode = 'abstract';\n }\n this.mode = mode;\n\n switch (mode) {\n case 'history':\n this.history = new HTML5History(this, options.base);\n break\n case 'hash':\n this.history = new HashHistory(this, options.base, this.fallback);\n break\n case 'abstract':\n this.history = new AbstractHistory(this, options.base);\n break\n default:\n if (process.env.NODE_ENV !== 'production') {\n assert(false, (\"invalid mode: \" + mode));\n }\n }\n};\n\nvar prototypeAccessors = { currentRoute: { configurable: true } };\n\nVueRouter.prototype.match = function match (raw, current, redirectedFrom) {\n return this.matcher.match(raw, current, redirectedFrom)\n};\n\nprototypeAccessors.currentRoute.get = function () {\n return this.history && this.history.current\n};\n\nVueRouter.prototype.init = function init (app /* Vue component instance */) {\n var this$1$1 = this;\n\n process.env.NODE_ENV !== 'production' &&\n assert(\n install.installed,\n \"not installed. Make sure to call `Vue.use(VueRouter)` \" +\n \"before creating root instance.\"\n );\n\n this.apps.push(app);\n\n // set up app destroyed handler\n // https://github.com/vuejs/vue-router/issues/2639\n app.$once('hook:destroyed', function () {\n // clean out app from this.apps array once destroyed\n var index = this$1$1.apps.indexOf(app);\n if (index > -1) { this$1$1.apps.splice(index, 1); }\n // ensure we still have a main app or null if no apps\n // we do not release the router so it can be reused\n if (this$1$1.app === app) { this$1$1.app = this$1$1.apps[0] || null; }\n\n if (!this$1$1.app) { this$1$1.history.teardown(); }\n });\n\n // main app previously initialized\n // return as we don't need to set up new history listener\n if (this.app) {\n return\n }\n\n this.app = app;\n\n var history = this.history;\n\n if (history instanceof HTML5History || history instanceof HashHistory) {\n var handleInitialScroll = function (routeOrError) {\n var from = history.current;\n var expectScroll = this$1$1.options.scrollBehavior;\n var supportsScroll = supportsPushState && expectScroll;\n\n if (supportsScroll && 'fullPath' in routeOrError) {\n handleScroll(this$1$1, routeOrError, from, false);\n }\n };\n var setupListeners = function (routeOrError) {\n history.setupListeners();\n handleInitialScroll(routeOrError);\n };\n history.transitionTo(\n history.getCurrentLocation(),\n setupListeners,\n setupListeners\n );\n }\n\n history.listen(function (route) {\n this$1$1.apps.forEach(function (app) {\n app._route = route;\n });\n });\n};\n\nVueRouter.prototype.beforeEach = function beforeEach (fn) {\n return registerHook(this.beforeHooks, fn)\n};\n\nVueRouter.prototype.beforeResolve = function beforeResolve (fn) {\n return registerHook(this.resolveHooks, fn)\n};\n\nVueRouter.prototype.afterEach = function afterEach (fn) {\n return registerHook(this.afterHooks, fn)\n};\n\nVueRouter.prototype.onReady = function onReady (cb, errorCb) {\n this.history.onReady(cb, errorCb);\n};\n\nVueRouter.prototype.onError = function onError (errorCb) {\n this.history.onError(errorCb);\n};\n\nVueRouter.prototype.push = function push (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.push(location, resolve, reject);\n })\n } else {\n this.history.push(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.replace = function replace (location, onComplete, onAbort) {\n var this$1$1 = this;\n\n // $flow-disable-line\n if (!onComplete && !onAbort && typeof Promise !== 'undefined') {\n return new Promise(function (resolve, reject) {\n this$1$1.history.replace(location, resolve, reject);\n })\n } else {\n this.history.replace(location, onComplete, onAbort);\n }\n};\n\nVueRouter.prototype.go = function go (n) {\n this.history.go(n);\n};\n\nVueRouter.prototype.back = function back () {\n this.go(-1);\n};\n\nVueRouter.prototype.forward = function forward () {\n this.go(1);\n};\n\nVueRouter.prototype.getMatchedComponents = function getMatchedComponents (to) {\n var route = to\n ? to.matched\n ? to\n : this.resolve(to).route\n : this.currentRoute;\n if (!route) {\n return []\n }\n return [].concat.apply(\n [],\n route.matched.map(function (m) {\n return Object.keys(m.components).map(function (key) {\n return m.components[key]\n })\n })\n )\n};\n\nVueRouter.prototype.resolve = function resolve (\n to,\n current,\n append\n) {\n current = current || this.history.current;\n var location = normalizeLocation(to, current, append, this);\n var route = this.match(location, current);\n var fullPath = route.redirectedFrom || route.fullPath;\n var base = this.history.base;\n var href = createHref(base, fullPath, this.mode);\n return {\n location: location,\n route: route,\n href: href,\n // for backwards compat\n normalizedTo: location,\n resolved: route\n }\n};\n\nVueRouter.prototype.getRoutes = function getRoutes () {\n return this.matcher.getRoutes()\n};\n\nVueRouter.prototype.addRoute = function addRoute (parentOrRoute, route) {\n this.matcher.addRoute(parentOrRoute, route);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nVueRouter.prototype.addRoutes = function addRoutes (routes) {\n if (process.env.NODE_ENV !== 'production') {\n warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.');\n }\n this.matcher.addRoutes(routes);\n if (this.history.current !== START) {\n this.history.transitionTo(this.history.getCurrentLocation());\n }\n};\n\nObject.defineProperties( VueRouter.prototype, prototypeAccessors );\n\nvar VueRouter$1 = VueRouter;\n\nfunction registerHook (list, fn) {\n list.push(fn);\n return function () {\n var i = list.indexOf(fn);\n if (i > -1) { list.splice(i, 1); }\n }\n}\n\nfunction createHref (base, fullPath, mode) {\n var path = mode === 'hash' ? '#' + fullPath : fullPath;\n return base ? cleanPath(base + '/' + path) : path\n}\n\n// We cannot remove this as it would be a breaking change\nVueRouter.install = install;\nVueRouter.version = '3.6.5';\nVueRouter.isNavigationFailure = isNavigationFailure;\nVueRouter.NavigationFailureType = NavigationFailureType;\nVueRouter.START_LOCATION = START;\n\nif (inBrowser && window.Vue) {\n window.Vue.use(VueRouter);\n}\n\nvar version = '3.6.5';\n\nexport { NavigationFailureType, Link as RouterLink, View as RouterView, START as START_LOCATION, VueRouter$1 as default, isNavigationFailure, version };\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n * @author Sujith Haridasan \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport axios from '@nextcloud/axios'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nconst sanitize = function(url) {\n\treturn url.replace(/\\/$/, '') // Remove last url slash\n}\n\nexport default {\n\n\t/**\n\t * This Promise is used to chain a request that require an admin password confirmation\n\t * Since chaining Promise have a very precise behavior concerning catch and then,\n\t * you'll need to be careful when using it.\n\t * e.g\n\t * // store\n\t * action(context) {\n\t * return api.requireAdmin().then((response) => {\n\t * return api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {API failure});\n\t * }).catch((error) => {requireAdmin failure});\n\t * }\n\t * // vue\n\t * this.$store.dispatch('action').then(() => {always executed})\n\t *\n\t * Since Promise.then().catch().then() will always execute the last then\n\t * this.$store.dispatch('action').then will always be executed\n\t *\n\t * If you want requireAdmin failure to also catch the API request failure\n\t * you will need to throw a new error in the api.get.catch()\n\t *\n\t * e.g\n\t * api.requireAdmin().then((response) => {\n\t * api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {throw error;});\n\t * }).catch((error) => {requireAdmin OR API failure});\n\t *\n\t * @return {Promise}\n\t */\n\trequireAdmin() {\n\t\treturn confirmPassword()\n\t},\n\tget(url, options) {\n\t\treturn axios.get(sanitize(url), options)\n\t},\n\tpost(url, data) {\n\t\treturn axios.post(sanitize(url), data)\n\t},\n\tpatch(url, data) {\n\t\treturn axios.patch(sanitize(url), data)\n\t},\n\tput(url, data) {\n\t\treturn axios.put(sanitize(url), data)\n\t},\n\tdelete(url, data) {\n\t\treturn axios.delete(sanitize(url), { params: data })\n\t},\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author Arthur Schiwon \n * @author Christoph Wurst \n * @author Daniel Calviño Sánchez \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n * @author Vincent Petry \n * @author Stephan Orbaugh \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport logger from '../logger.js'\nimport { parseFileSize } from \"@nextcloud/files\"\n\nconst orderGroups = function(groups, orderBy) {\n\t/* const SORT_USERCOUNT = 1;\n\t * const SORT_GROUPNAME = 2;\n\t * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n\t */\n\tif (orderBy === 1) {\n\t\treturn groups.sort((a, b) => a.usercount - a.disabled < b.usercount - b.disabled)\n\t} else {\n\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t}\n}\n\nconst defaults = {\n\tgroup: {\n\t\tid: '',\n\t\tname: '',\n\t\tusercount: 0,\n\t\tdisabled: 0,\n\t\tcanAdd: true,\n\t\tcanRemove: true,\n\t},\n}\n\nconst state = {\n\tusers: [],\n\tgroups: [],\n\torderBy: 1,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tdisabledUsersOffset: 0,\n\tdisabledUsersLimit: 25,\n\tuserCount: 0,\n\tshowConfig: {\n\t\tshowStoragePath: false,\n\t\tshowUserBackend: false,\n\t\tshowLastLogin: false,\n\t\tshowNewUserForm: false,\n\t\tshowLanguages: false,\n\t},\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\tconst existingUsers = state.users.map(({ id }) => id)\n\t\tconst newUsers = Object.values(usersObj)\n\t\t\t.filter(({ id }) => !existingUsers.includes(id))\n\n\t\tconst users = state.users.concat(newUsers)\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\n\t},\n\tupdateDisabledUsers(state, _usersObj) {\n\t\tstate.disabledUsersOffset += state.disabledUsersLimit\n\t},\n\tsetPasswordPolicyMinLength(state, length) {\n\t\tstate.minPasswordLength = length !== '' ? length : 0\n\t},\n\tinitGroups(state, { groups, orderBy, userCount }) {\n\t\tstate.groups = groups.map(group => Object.assign({}, defaults.group, group))\n\t\tstate.orderBy = orderBy\n\t\tstate.userCount = userCount\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\n\t},\n\taddGroup(state, { gid, displayName }) {\n\t\ttry {\n\t\t\tif (typeof state.groups.find((group) => group.id === gid) !== 'undefined') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// extend group to default values\n\t\t\tconst group = Object.assign({}, defaults.group, {\n\t\t\t\tid: gid,\n\t\t\t\tname: displayName,\n\t\t\t})\n\t\t\tstate.groups.unshift(group)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t\t} catch (e) {\n\t\t\tconsole.error('Can\\'t create group', e)\n\t\t}\n\t},\n\trenameGroup(state, { gid, displayName }) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tconst updatedGroup = state.groups[groupIndex]\n\t\t\tupdatedGroup.name = displayName\n\t\t\tstate.groups.splice(groupIndex, 1, updatedGroup)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t\t}\n\t},\n\tremoveGroup(state, gid) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tstate.groups.splice(groupIndex, 1)\n\t\t}\n\t},\n\taddUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// increase count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount++\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.push(gid)\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t},\n\tremoveUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// lower count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount--\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t\tstate.groups = orderGroups(state.groups, state.orderBy)\n\t},\n\taddUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.push(gid)\n\t},\n\tremoveUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\tdeleteUser(state, userid) {\n\t\tconst userIndex = state.users.findIndex(user => user.id === userid)\n\t\tthis.commit('updateUserCounts', { user: state.users[userIndex], actionType: 'remove' })\n\t\tstate.users.splice(userIndex, 1)\n\t},\n\taddUserData(state, response) {\n\t\tconst user = response.data.ocs.data\n\t\tstate.users.unshift(user)\n\t\tthis.commit('updateUserCounts', { user, actionType: 'create' })\n\t},\n\tenableDisableUser(state, { userid, enabled }) {\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\tuser.enabled = enabled\n\t\tthis.commit('updateUserCounts', { user, actionType: enabled ? 'enable' : 'disable' })\n\t},\n\t// update active/disabled counts, groups counts\n\tupdateUserCounts(state, { user, actionType }) {\n\t\t// 0 is a special value\n\t\tif (state.userCount === 0) {\n\t\t\treturn\n\t\t}\n\n\t\tconst disabledGroup = state.groups.find(group => group.id === 'disabled')\n\t\tswitch (actionType) {\n\t\tcase 'enable':\n\t\tcase 'disable':\n\t\t\tdisabledGroup.usercount += user.enabled ? -1 : 1 // update Disabled Users count\n\t\t\tstate.userCount += user.enabled ? 1 : -1 // update Active Users count\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\tgroup.disabled += user.enabled ? -1 : 1 // update group disabled count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'create':\n\t\t\tstate.userCount++ // increment Active Users count\n\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tstate.groups\n\t\t\t\t\t.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t .usercount++ // increment group total count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'remove':\n\t\t\tif (user.enabled) {\n\t\t\t\tstate.userCount-- // decrement Active Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tif (!group) {\n\t\t\t\t\t\tconsole.warn('User group ' + userGroup + ' does not exist during user removal')\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tgroup.usercount-- // decrement group total count\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdisabledGroup.usercount-- // decrement Disabled Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tgroup.disabled-- // decrement group disabled count\n\t\t\t\t})\n\t\t\t}\n\t\t\tbreak\n\t\tdefault:\n\t\t\tlogger.error(`Unknown action type in updateUserCounts: '${actionType}'`)\n\t\t\t// not throwing error to interrupt execution as this is not fatal\n\t\t}\n\t},\n\tsetUserData(state, { userid, key, value }) {\n\t\tif (key === 'quota') {\n\t\t\tconst humanValue = parseFileSize(value, true)\n\t\t\tstate.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value\n\t\t} else {\n\t\t\tstate.users.find(user => user.id === userid)[key] = value\n\t\t}\n\t},\n\n\t/**\n\t * Reset users list\n\t *\n\t * @param {object} state the store state\n\t */\n\tresetUsers(state) {\n\t\tstate.users = []\n\t\tstate.usersOffset = 0\n\t\tstate.disabledUsersOffset = 0\n\t},\n\n\tsetShowConfig(state, { key, value }) {\n\t\tstate.showConfig[key] = value\n\t},\n}\n\nconst getters = {\n\tgetUsers(state) {\n\t\treturn state.users\n\t},\n\tgetGroups(state) {\n\t\treturn state.groups\n\t},\n\tgetSubadminGroups(state) {\n\t\t// Can't be subadmin of admin or disabled\n\t\treturn state.groups.filter(group => group.id !== 'admin' && group.id !== 'disabled')\n\t},\n\tgetPasswordPolicyMinLength(state) {\n\t\treturn state.minPasswordLength\n\t},\n\tgetUsersOffset(state) {\n\t\treturn state.usersOffset\n\t},\n\tgetUsersLimit(state) {\n\t\treturn state.usersLimit\n\t},\n\tgetDisabledUsersOffset(state) {\n\t\treturn state.disabledUsersOffset\n\t},\n\tgetDisabledUsersLimit(state) {\n\t\treturn state.disabledUsersLimit\n\t},\n\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n\tgetShowConfig(state) {\n\t\treturn state.showConfig\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\n\n\t/**\n\t * search users\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @return {Promise}\n\t */\n\tsearchUsers(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search })).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get user details\n\t *\n\t * @param {object} context store context\n\t * @param {string} userId user id\n\t * @return {Promise}\n\t */\n\tgetUser(context, userId) {\n\t\treturn api.get(generateOcsUrl(`cloud/users/${userId}`)).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @param {string} options.group Get users from group\n\t * @return {Promise}\n\t */\n\tgetUsers(context, { offset, limit, search, group }) {\n\t\tif (searchRequestCancelSource) {\n\t\t\tsearchRequestCancelSource.cancel('Operation canceled by another search request.')\n\t\t}\n\t\tsearchRequestCancelSource = CancelToken.source()\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\t/**\n\t\t * Adding filters in the search bar such as in:files, in:users, etc.\n\t\t * collides with this particular search, so we need to remove them\n\t\t * here and leave only the original search query\n\t\t */\n\t\tsearch = search.replace(/in:[^\\s]+/g, '').trim()\n\n\t\tgroup = typeof group === 'string' ? group : ''\n\t\tif (group !== '') {\n\t\t\treturn api.get(generateOcsUrl('cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}', { group: encodeURIComponent(group), offset, limit, search }), {\n\t\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\t}\n\t\t\t\t\treturn usersCount\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }), {\n\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t}\n\t\t\t\treturn usersCount\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t}\n\t\t\t})\n\t},\n\n\t/**\n\t * Get disabled users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @return {Promise}\n\t */\n\tasync getDisabledUsers(context, { offset, limit, search }) {\n\t\tconst url = generateOcsUrl('cloud/users/disabled?offset={offset}&limit={limit}&search={search}', { offset, limit, search })\n\t\ttry {\n\t\t\tconst response = await api.get(url)\n\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\tif (usersCount > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\tcontext.commit('updateDisabledUsers', response.data.ocs.data.users)\n\t\t\t}\n\t\t\treturn usersCount\n\t\t} catch (error) {\n\t\t\tcontext.commit('API_FAILURE', error)\n\t\t}\n\t},\n\n\tgetGroups(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\tconst limitParam = limit === -1 ? '' : `&limit=${limit}`\n\t\treturn api.get(generateOcsUrl('cloud/groups?offset={offset}&search={search}', { offset, search }) + limitParam)\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tresponse.data.ocs.data.groups.forEach(function(group) {\n\t\t\t\t\t\tcontext.commit('addGroup', { gid: group, displayName: group })\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search -\n\t * @return {Promise}\n\t */\n\tgetUsersFromList(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }))\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details from a groupid\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.groupid -\n\t * @return {Promise}\n\t */\n\tgetUsersFromGroup(context, { groupid, offset, limit }) {\n\t\treturn api.get(generateOcsUrl('cloud/users/{groupId}/details?offset={offset}&limit={limit}', { groupId: encodeURIComponent(groupid), offset, limit }))\n\t\t\t.then((response) => context.commit('getUsersFromList', response.data.ocs.data.users))\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tgetPasswordPolicyMinLength(context) {\n\t\tif (getCapabilities().password_policy && getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', getCapabilities().password_policy.minLength)\n\t\t\treturn getCapabilities().password_policy.minLength\n\t\t}\n\t\treturn false\n\t},\n\n\t/**\n\t * Add group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\taddGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/groups'), { groupid: gid })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('addGroup', { gid, displayName: gid })\n\t\t\t\t\treturn { gid, displayName: gid }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { gid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from adding the user to a group that doesn't exists\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Rename group\n\t *\n\t * @param {object} context store context\n\t * @param {string} groupid Group id\n\t * @param {string} displayName Group display name\n\t * @return {Promise}\n\t */\n\trenameGroup(context, { groupid, displayName }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(groupid) }), { key: 'displayname', value: displayName })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('renameGroup', { gid: groupid, displayName })\n\t\t\t\t\treturn { groupid, displayName }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { groupid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from renaming the group\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Remove group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\tremoveGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(gid) }))\n\t\t\t\t.then((response) => context.commit('removeGroup', gid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { gid, error }))\n\t},\n\n\t/**\n\t * Add user to group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { userid, error })\n\t\t\t// let's throw one more time to prevent\n\t\t\t// the view from removing the user row on failure\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Add user to group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Mark all user devices for remote wipe\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\twipeUserDevices(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/wipe', { userid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Delete a user\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tdeleteUser(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('deleteUser', userid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Add a user\n\t *\n\t * @param {object} context store context\n\t * @param {Function} context.commit -\n\t * @param {Function} context.dispatch -\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.password User password\n\t * @param {string} options.displayName User display name\n\t * @param {string} options.email User email\n\t * @param {string} options.groups User groups\n\t * @param {string} options.subadmin User subadmin groups\n\t * @param {string} options.quota User email\n\t * @param {string} options.language User language\n\t * @param {string} options.manager User manager\n\t * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language, manager }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language, manager })\n\t\t\t\t.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcommit('API_FAILURE', { userid, error })\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Get user data and commit addition\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\taddUserData(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.get(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('addUserData', response))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Enable or disable user\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {boolean} options.enabled User enablement status\n\t * @return {Promise}\n\t */\n\tenableDisableUser(context, { userid, enabled = true }) {\n\t\tconst userStatus = enabled ? 'enable' : 'disable'\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}/{userStatus}', { userid, userStatus }))\n\t\t\t\t.then((response) => context.commit('enableDisableUser', { userid, enabled }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Edit user data\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.key User field to edit\n\t * @param {string} options.value Value of the change\n\t * @return {Promise}\n\t */\n\tsetUserData(context, { userid, key, value }) {\n\t\tconst allowedEmpty = ['email', 'displayname', 'manager']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password', 'manager'].indexOf(key) !== -1) {\n\t\t\t// We allow empty email or displayname\n\t\t\tif (typeof value === 'string'\n\t\t\t\t&& (\n\t\t\t\t\t(allowedEmpty.indexOf(key) === -1 && value.length > 0)\n\t\t\t\t\t|| allowedEmpty.indexOf(key) !== -1\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn api.requireAdmin().then((response) => {\n\t\t\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}', { userid }), { key, value })\n\t\t\t\t\t\t.then((response) => context.commit('setUserData', { userid, key, value }))\n\t\t\t\t\t\t.catch((error) => { throw error })\n\t\t\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t\t\t}\n\t\t}\n\t\treturn Promise.reject(new Error('Invalid request data'))\n\t},\n\n\t/**\n\t * Send welcome mail\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tsendWelcomeMail(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/welcome', { userid }))\n\t\t\t\t.then(response => true)\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 Julius Härtl \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport Vue from 'vue'\nimport axios from '@nextcloud/axios'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\n\nconst state = {\n\tapps: [],\n\tcategories: [],\n\tupdateCount: 0,\n\tloading: {},\n\tloadingList: false,\n\tgettingCategoriesPromise: null,\n}\n\nconst mutations = {\n\n\tAPPS_API_FAILURE(state, error) {\n\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '
' + error.error.response.data.data.message, { isHTML: true })\n\t\tconsole.error(state, error)\n\t},\n\n\tinitCategories(state, { categories, updateCount }) {\n\t\tstate.categories = categories\n\t\tstate.updateCount = updateCount\n\t},\n\n\tupdateCategories(state, categoriesPromise) {\n\t\tstate.gettingCategoriesPromise = categoriesPromise\n\t},\n\n\tsetUpdateCount(state, updateCount) {\n\t\tstate.updateCount = updateCount\n\t},\n\n\taddCategory(state, category) {\n\t\tstate.categories.push(category)\n\t},\n\n\tappendCategories(state, categoriesArray) {\n\t\t// convert obj to array\n\t\tstate.categories = categoriesArray\n\t},\n\n\tsetAllApps(state, apps) {\n\t\tstate.apps = apps\n\t},\n\n\tsetError(state, { appId, error }) {\n\t\tif (!Array.isArray(appId)) {\n\t\t\tappId = [appId]\n\t\t}\n\t\tappId.forEach((_id) => {\n\t\t\tconst app = state.apps.find(app => app.id === _id)\n\t\t\tapp.error = error\n\t\t})\n\t},\n\n\tclearError(state, { appId, error }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.error = null\n\t},\n\n\tenableApp(state, { appId, groups }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = true\n\t\tapp.groups = groups\n\t},\n\n\tdisableApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = false\n\t\tapp.groups = []\n\t\tif (app.removable) {\n\t\t\tapp.canUnInstall = true\n\t\t}\n\t},\n\n\tuninstallApp(state, appId) {\n\t\tstate.apps.find(app => app.id === appId).active = false\n\t\tstate.apps.find(app => app.id === appId).groups = []\n\t\tstate.apps.find(app => app.id === appId).needsDownload = true\n\t\tstate.apps.find(app => app.id === appId).installed = false\n\t\tstate.apps.find(app => app.id === appId).canUnInstall = false\n\t\tstate.apps.find(app => app.id === appId).canInstall = true\n\t},\n\n\tupdateApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tconst version = app.update\n\t\tapp.update = null\n\t\tapp.version = version\n\t\tstate.updateCount--\n\n\t},\n\n\tresetApps(state) {\n\t\tstate.apps = []\n\t},\n\treset(state) {\n\t\tstate.apps = []\n\t\tstate.categories = []\n\t\tstate.updateCount = 0\n\t},\n\tstartLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, true)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, true)\n\t\t}\n\t},\n\tstopLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, false)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, false)\n\t\t}\n\t},\n}\n\nconst getters = {\n\tloading(state) {\n\t\treturn function(id) {\n\t\t\treturn state.loading[id]\n\t\t}\n\t},\n\tgetCategories(state) {\n\t\treturn state.categories\n\t},\n\tgetAllApps(state) {\n\t\treturn state.apps\n\t},\n\tgetUpdateCount(state) {\n\t\treturn state.updateCount\n\t},\n\tgetCategoryById: (state) => (selectedCategoryId) => {\n\t\treturn state.categories.find((category) => category.id === selectedCategoryId)\n\t},\n}\n\nconst actions = {\n\n\tenableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/enable'), { appIds: apps, groups })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('enableApp', { appId: _appId, groups })\n\t\t\t\t\t})\n\n\t\t\t\t\t// check for server health\n\t\t\t\t\treturn axios.get(generateUrl('apps/files/'))\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tif (response.data.update_required) {\n\t\t\t\t\t\t\t\tshowInfo(\n\t\t\t\t\t\t\t\t\tt(\n\t\t\t\t\t\t\t\t\t\t'settings',\n\t\t\t\t\t\t\t\t\t\t'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.',\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tonClick: () => window.location.reload(),\n\t\t\t\t\t\t\t\t\t\tclose: false,\n\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, 5000)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\tif (!Array.isArray(appId)) {\n\t\t\t\t\t\t\t\tshowError(t('settings', 'Error: This app cannot be enabled because it makes the server unstable'))\n\t\t\t\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\t\t\t\terror: t('settings', 'Error: This app cannot be enabled because it makes the server unstable'),\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tcontext.dispatch('disableApp', { appId })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tforceEnableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then(() => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/force'), { appId })\n\t\t\t\t.then((response) => {\n\t\t\t\t\t// TODO: find a cleaner solution\n\t\t\t\t\tlocation.reload()\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tdisableApp(context, { appId }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\treturn api.post(generateUrl('settings/apps/disable'), { appIds: apps })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('disableApp', _appId)\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tuninstallApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\treturn api.get(generateUrl(`settings/apps/uninstall/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('uninstallApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tupdateApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.get(generateUrl(`settings/apps/update/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('updateApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tgetAllApps(context) {\n\t\tcontext.commit('startLoading', 'list')\n\t\treturn api.get(generateUrl('settings/apps/list'))\n\t\t\t.then((response) => {\n\t\t\t\tcontext.commit('setAllApps', response.data.apps)\n\t\t\t\tcontext.commit('stopLoading', 'list')\n\t\t\t\treturn true\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tasync getCategories(context, { shouldRefetchCategories = false } = {}) {\n\t\tif (shouldRefetchCategories || !context.state.gettingCategoriesPromise) {\n\t\t\tcontext.commit('startLoading', 'categories')\n\t\t\ttry {\n\t\t\t\tconst categoriesPromise = api.get(generateUrl('settings/apps/categories'))\n\t\t\t\tcontext.commit('updateCategories', categoriesPromise)\n\t\t\t\tconst categoriesPromiseResponse = await categoriesPromise\n\t\t\t\tif (categoriesPromiseResponse.data.length > 0) {\n\t\t\t\t\tcontext.commit('appendCategories', categoriesPromiseResponse.data)\n\t\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\treturn false\n\t\t\t} catch (error) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t}\n\t\treturn context.state.gettingCategoriesPromise\n\t},\n\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\n\nconst state = {\n\tserverData: {},\n}\nconst mutations = {\n\tsetServerData(state, data) {\n\t\tstate.serverData = data\n\t},\n}\nconst getters = {\n\tgetServerData(state) {\n\t\treturn state.serverData\n\t},\n}\nconst actions = {}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api.js'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst state = {}\nconst mutations = {}\nconst getters = {}\nconst actions = {\n\t/**\n\t * Set application config in database\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.app Application name\n\t * @param {boolean} options.key Config key\n\t * @param {boolean} options.value Value to set\n\t * @return {Promise}\n\t */\n\tsetAppConfig(context, { app, key, value }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('apps/provisioning_api/api/v1/config/apps/{app}/{key}', { app, key }), { value })\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { app, key, value, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users.js'\nimport apps from './apps.js'\nimport settings from './settings.js'\nimport oc from './oc.js'\nimport { showError } from '@nextcloud/dialogs'\n\nVue.use(Vuex)\n\nconst debug = process.env.NODE_ENV !== 'production'\n\nconst mutations = {\n\tAPI_FAILURE(state, error) {\n\t\ttry {\n\t\t\tconst message = error.error.response.data.ocs.meta.message\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '
' + message, { isHTML: true })\n\t\t} catch (e) {\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.'))\n\t\t}\n\t\tconsole.error(state, error)\n\t},\n}\n\nexport default new Store({\n\tmodules: {\n\t\tusers,\n\t\tapps,\n\t\tsettings,\n\t\toc,\n\t},\n\tstrict: debug,\n\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2022 Joas Schilling \n *\n * @author Joas Schilling \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\n/**\n * Set the page heading\n *\n * @param {string} heading page title from the history api\n * @since 27.0.0\n */\nexport function setPageHeading(heading) {\n\tconst headingEl = document.getElementById('page-heading-level-1')\n\tif (headingEl) {\n\t\theadingEl.textContent = heading\n\t}\n}\nexport default {\n\t/**\n\t * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered\n\t */\n\tdisableKeyboardShortcuts() {\n\t\treturn loadState('theming', 'shortcutsDisabled', false)\n\t},\n\tsetPageHeading,\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { APPS_SECTION_ENUM } from './constants/AppsConstants.js'\nimport store from './store/index.js'\nimport { setPageHeading } from '../../../core/src/OCP/accessibility.js'\n\n// Dynamic loading\nconst Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users.vue')\nconst Apps = () => import(/* webpackChunkName: 'settings-apps-view' */'./views/Apps.vue')\n\nVue.use(Router)\n\n/*\n * This is the list of routes where the vuejs app will\n * take over php to provide data\n * You need to forward the php routing (routes.php) to\n * the settings-vue template, where the vue-router will\n * ensure the proper route.\n * ⚠️ Routes needs to match the php routes.\n */\nconst baseTitle = document.title\nconst router = new Router({\n\tmode: 'history',\n\t// if index.php is in the url AND we got this far, then it's working:\n\t// let's keep using index.php in the url\n\tbase: generateUrl(''),\n\tlinkActiveClass: 'active',\n\troutes: [\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/users',\n\t\t\tcomponent: Users,\n\t\t\tprops: true,\n\t\t\tname: 'users',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Active users')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':selectedGroup',\n\t\t\t\t\tname: 'group',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: (to) => {\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'admin') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Admins')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'disabled') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Disabled users')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn decodeURIComponent(to.params.selectedGroup)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Users,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/apps',\n\t\t\tcomponent: Apps,\n\t\t\tprops: true,\n\t\t\tname: 'apps',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':category',\n\t\t\t\t\tname: 'apps-category',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: async (to) => {\n\t\t\t\t\t\t\tif (to.name === 'apps') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (APPS_SECTION_ENUM[to.params.category]) {\n\t\t\t\t\t\t\t\treturn APPS_SECTION_ENUM[to.params.category]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait store.dispatch('getCategories')\n\t\t\t\t\t\t\tconst category = store.getters.getCategoryById(to.params.category)\n\t\t\t\t\t\t\tif (category.displayName) {\n\t\t\t\t\t\t\t\treturn category.displayName\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: ':id',\n\t\t\t\t\t\t\tname: 'apps-details',\n\t\t\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n})\n\nrouter.afterEach(async (to) => {\n\tconst metaTitle = await to.meta.title?.(to)\n\tif (metaTitle) {\n\t\tdocument.title = `${metaTitle} - ${baseTitle}`\n\t\tsetPageHeading(metaTitle)\n\t} else {\n\t\tdocument.title = baseTitle\n\t}\n})\n\nexport default router\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author rakekniven \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport VTooltip from 'v-tooltip'\nimport { sync } from 'vuex-router-sync'\n\nimport App from './App.vue'\nimport router from './router.js'\nimport store from './store/index.js'\n\nVue.use(VTooltip, { defaultHtml: false })\n\nsync(store, router)\n\n// CSP config for webpack dynamic chunk loading\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\n// bind to window\nVue.prototype.t = t\nVue.prototype.n = n\nVue.prototype.OC = OC\nVue.prototype.OCA = OCA\n// eslint-disable-next-line camelcase\nVue.prototype.oc_userconfig = oc_userconfig\n\nconst app = new Vue({\n\trouter,\n\tstore,\n\trender: h => h(App),\n}).$mount('#content')\n\nexport { app, router, store }\n","exports.sync = function (store, router, options) {\n var moduleName = (options || {}).moduleName || 'route'\n\n store.registerModule(moduleName, {\n namespaced: true,\n state: cloneRoute(router.currentRoute),\n mutations: {\n 'ROUTE_CHANGED': function ROUTE_CHANGED (state, transition) {\n store.state[moduleName] = cloneRoute(transition.to, transition.from)\n }\n }\n })\n\n var isTimeTraveling = false\n var currentPath\n\n // sync router on store change\n var storeUnwatch = store.watch(\n function (state) { return state[moduleName]; },\n function (route) {\n var fullPath = route.fullPath;\n if (fullPath === currentPath) {\n return\n }\n if (currentPath != null) {\n isTimeTraveling = true\n router.push(route)\n }\n currentPath = fullPath\n },\n { sync: true }\n )\n\n // sync store on router navigation\n var afterEachUnHook = router.afterEach(function (to, from) {\n if (isTimeTraveling) {\n isTimeTraveling = false\n return\n }\n currentPath = to.fullPath\n store.commit(moduleName + '/ROUTE_CHANGED', { to: to, from: from })\n })\n\n return function unsync () {\n // On unsync, remove router hook\n if (afterEachUnHook != null) {\n afterEachUnHook()\n }\n\n // On unsync, remove store watch\n if (storeUnwatch != null) {\n storeUnwatch()\n }\n\n // On unsync, unregister Module with store\n store.unregisterModule(moduleName)\n }\n}\n\nfunction cloneRoute (to, from) {\n var clone = {\n name: to.name,\n path: to.path,\n hash: to.hash,\n query: to.query,\n params: to.params,\n fullPath: to.fullPath,\n meta: to.meta\n }\n if (from) {\n clone.from = cloneRoute(from)\n }\n return Object.freeze(clone)\n}\n\n","import { getCurrentUser, onRequestTokenUpdate, getRequestToken } from \"@nextcloud/auth\";\nimport { getLoggerBuilder } from \"@nextcloud/logger\";\nimport { join, basename, extname, dirname } from \"path\";\nimport { encodePath } from \"@nextcloud/paths\";\nimport { generateRemoteUrl } from \"@nextcloud/router\";\nimport { createClient, getPatcher } from \"webdav\";\nimport { CancelablePromise } from \"cancelable-promise\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n *\n * @license AGPL-3.0-or-later\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 */\nconst getLogger = (user) => {\n if (user === null) {\n return getLoggerBuilder().setApp(\"files\").build();\n }\n return getLoggerBuilder().setApp(\"files\").setUid(user.uid).build();\n};\nconst logger = getLogger(getCurrentUser());\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar Permission = /* @__PURE__ */ ((Permission2) => {\n Permission2[Permission2[\"NONE\"] = 0] = \"NONE\";\n Permission2[Permission2[\"CREATE\"] = 4] = \"CREATE\";\n Permission2[Permission2[\"READ\"] = 1] = \"READ\";\n Permission2[Permission2[\"UPDATE\"] = 2] = \"UPDATE\";\n Permission2[Permission2[\"DELETE\"] = 8] = \"DELETE\";\n Permission2[Permission2[\"SHARE\"] = 16] = \"SHARE\";\n Permission2[Permission2[\"ALL\"] = 31] = \"ALL\";\n return Permission2;\n})(Permission || {});\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst defaultDavProperties = [\n \"d:getcontentlength\",\n \"d:getcontenttype\",\n \"d:getetag\",\n \"d:getlastmodified\",\n \"d:quota-available-bytes\",\n \"d:resourcetype\",\n \"nc:has-preview\",\n \"nc:is-encrypted\",\n \"nc:mount-type\",\n \"oc:comments-unread\",\n \"oc:favorite\",\n \"oc:fileid\",\n \"oc:owner-display-name\",\n \"oc:owner-id\",\n \"oc:permissions\",\n \"oc:size\"\n];\nconst defaultDavNamespaces = {\n d: \"DAV:\",\n nc: \"http://nextcloud.org/ns\",\n oc: \"http://owncloud.org/ns\",\n ocs: \"http://open-collaboration-services.org/ns\"\n};\nconst registerDavProperty = function(prop, namespace = { nc: \"http://nextcloud.org/ns\" }) {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n const namespaces = { ...window._nc_dav_namespaces, ...namespace };\n if (window._nc_dav_properties.find((search) => search === prop)) {\n logger.warn(`${prop} already registered`, { prop });\n return false;\n }\n if (prop.startsWith(\"<\") || prop.split(\":\").length !== 2) {\n logger.error(`${prop} is not valid. See example: 'oc:fileid'`, { prop });\n return false;\n }\n const ns = prop.split(\":\")[0];\n if (!namespaces[ns]) {\n logger.error(`${prop} namespace unknown`, { prop, namespaces });\n return false;\n }\n window._nc_dav_properties.push(prop);\n window._nc_dav_namespaces = namespaces;\n return true;\n};\nconst getDavProperties = function() {\n if (typeof window._nc_dav_properties === \"undefined\") {\n window._nc_dav_properties = [...defaultDavProperties];\n }\n return window._nc_dav_properties.map((prop) => `<${prop} />`).join(\" \");\n};\nconst getDavNameSpaces = function() {\n if (typeof window._nc_dav_namespaces === \"undefined\") {\n window._nc_dav_namespaces = { ...defaultDavNamespaces };\n }\n return Object.keys(window._nc_dav_namespaces).map((ns) => `xmlns:${ns}=\"${window._nc_dav_namespaces?.[ns]}\"`).join(\" \");\n};\nconst davGetDefaultPropfind = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t`;\n};\nconst davGetFavoritesReport = function() {\n return `\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\t\n\t\t\t\t1\n\t\t\t\n\t\t`;\n};\nconst davGetRecentSearch = function(lastModified) {\n return `\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t${getDavProperties()}\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t/files/${getCurrentUser()?.uid}/\n\t\t\t\tinfinity\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\thttpd/unix-directory\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t0\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t${lastModified}\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t100\n\t\t\t0\n\t\t\n\t\n`;\n};\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst davParsePermissions = function(permString = \"\") {\n let permissions = Permission.NONE;\n if (!permString) {\n return permissions;\n }\n if (permString.includes(\"C\") || permString.includes(\"K\")) {\n permissions |= Permission.CREATE;\n }\n if (permString.includes(\"G\")) {\n permissions |= Permission.READ;\n }\n if (permString.includes(\"W\") || permString.includes(\"N\") || permString.includes(\"V\")) {\n permissions |= Permission.UPDATE;\n }\n if (permString.includes(\"D\")) {\n permissions |= Permission.DELETE;\n }\n if (permString.includes(\"R\")) {\n permissions |= Permission.SHARE;\n }\n return permissions;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar FileType = /* @__PURE__ */ ((FileType2) => {\n FileType2[\"Folder\"] = \"folder\";\n FileType2[\"File\"] = \"file\";\n return FileType2;\n})(FileType || {});\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst isDavRessource = function(source, davService) {\n return source.match(davService) !== null;\n};\nconst validateData = (data, davService) => {\n if (data.id && typeof data.id !== \"number\") {\n throw new Error(\"Invalid id type of value\");\n }\n if (!data.source) {\n throw new Error(\"Missing mandatory source\");\n }\n try {\n new URL(data.source);\n } catch (e) {\n throw new Error(\"Invalid source format, source must be a valid URL\");\n }\n if (!data.source.startsWith(\"http\")) {\n throw new Error(\"Invalid source format, only http(s) is supported\");\n }\n if (data.mtime && !(data.mtime instanceof Date)) {\n throw new Error(\"Invalid mtime type\");\n }\n if (data.crtime && !(data.crtime instanceof Date)) {\n throw new Error(\"Invalid crtime type\");\n }\n if (!data.mime || typeof data.mime !== \"string\" || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n throw new Error(\"Missing or invalid mandatory mime\");\n }\n if (\"size\" in data && typeof data.size !== \"number\" && data.size !== void 0) {\n throw new Error(\"Invalid size type\");\n }\n if (\"permissions\" in data && data.permissions !== void 0 && !(typeof data.permissions === \"number\" && data.permissions >= Permission.NONE && data.permissions <= Permission.ALL)) {\n throw new Error(\"Invalid permissions\");\n }\n if (data.owner && data.owner !== null && typeof data.owner !== \"string\") {\n throw new Error(\"Invalid owner type\");\n }\n if (data.attributes && typeof data.attributes !== \"object\") {\n throw new Error(\"Invalid attributes type\");\n }\n if (data.root && typeof data.root !== \"string\") {\n throw new Error(\"Invalid root type\");\n }\n if (data.root && !data.root.startsWith(\"/\")) {\n throw new Error(\"Root must start with a leading slash\");\n }\n if (data.root && !data.source.includes(data.root)) {\n throw new Error(\"Root must be part of the source\");\n }\n if (data.root && isDavRessource(data.source, davService)) {\n const service = data.source.match(davService)[0];\n if (!data.source.includes(join(service, data.root))) {\n throw new Error(\"The root must be relative to the service. e.g /files/emma\");\n }\n }\n if (data.status && !Object.values(NodeStatus).includes(data.status)) {\n throw new Error(\"Status must be a valid NodeStatus\");\n }\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nvar NodeStatus = /* @__PURE__ */ ((NodeStatus2) => {\n NodeStatus2[\"NEW\"] = \"new\";\n NodeStatus2[\"FAILED\"] = \"failed\";\n NodeStatus2[\"LOADING\"] = \"loading\";\n NodeStatus2[\"LOCKED\"] = \"locked\";\n return NodeStatus2;\n})(NodeStatus || {});\nclass Node {\n _data;\n _attributes;\n _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n readonlyAttributes = Object.entries(Object.getOwnPropertyDescriptors(Node.prototype)).filter((e) => typeof e[1].get === \"function\" && e[0] !== \"__proto__\").map((e) => e[0]);\n handler = {\n set: (target, prop, value) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.set(target, prop, value);\n },\n deleteProperty: (target, prop) => {\n if (this.readonlyAttributes.includes(prop)) {\n return false;\n }\n return Reflect.deleteProperty(target, prop);\n },\n // TODO: This is deprecated and only needed for files v3\n get: (target, prop, receiver) => {\n if (this.readonlyAttributes.includes(prop)) {\n logger.warn(`Accessing \"Node.attributes.${prop}\" is deprecated, access it directly on the Node instance.`);\n return Reflect.get(this, prop);\n }\n return Reflect.get(target, prop, receiver);\n }\n };\n constructor(data, davService) {\n validateData(data, davService || this._knownDavService);\n this._data = { ...data, attributes: {} };\n this._attributes = new Proxy(this._data.attributes, this.handler);\n this.update(data.attributes ?? {});\n if (davService) {\n this._knownDavService = davService;\n }\n }\n /**\n * Get the source url to this object\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get source() {\n return this._data.source.replace(/\\/$/i, \"\");\n }\n /**\n * Get the encoded source url to this object for requests purposes\n */\n get encodedSource() {\n const { origin } = new URL(this.source);\n return origin + encodePath(this.source.slice(origin.length));\n }\n /**\n * Get this object name\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get basename() {\n return basename(this.source);\n }\n /**\n * Get this object's extension\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get extension() {\n return extname(this.source);\n }\n /**\n * Get the directory path leading to this object\n * Will use the relative path to root if available\n *\n * There is no setter as the source is not meant to be changed manually.\n * You can use the rename or move method to change the source.\n */\n get dirname() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return dirname(source.slice(firstMatch + root.length) || \"/\");\n }\n const url = new URL(this.source);\n return dirname(url.pathname);\n }\n /**\n * Get the file mime\n * There is no setter as the mime is not meant to be changed\n */\n get mime() {\n return this._data.mime;\n }\n /**\n * Get the file modification time\n */\n get mtime() {\n return this._data.mtime;\n }\n /**\n * Set the file modification time\n */\n set mtime(mtime) {\n this._data.mtime = mtime;\n }\n /**\n * Get the file creation time\n * There is no setter as the creation time is not meant to be changed\n */\n get crtime() {\n return this._data.crtime;\n }\n /**\n * Get the file size\n */\n get size() {\n return this._data.size;\n }\n /**\n * Set the file size\n */\n set size(size) {\n this.updateMtime();\n this._data.size = size;\n }\n /**\n * Get the file attribute\n * This contains all additional attributes not provided by the Node class\n */\n get attributes() {\n return this._attributes;\n }\n /**\n * Get the file permissions\n */\n get permissions() {\n if (this.owner === null && !this.isDavRessource) {\n return Permission.READ;\n }\n return this._data.permissions !== void 0 ? this._data.permissions : Permission.NONE;\n }\n /**\n * Set the file permissions\n */\n set permissions(permissions) {\n this.updateMtime();\n this._data.permissions = permissions;\n }\n /**\n * Get the file owner\n * There is no setter as the owner is not meant to be changed\n */\n get owner() {\n if (!this.isDavRessource) {\n return null;\n }\n return this._data.owner;\n }\n /**\n * Is this a dav-related ressource ?\n */\n get isDavRessource() {\n return isDavRessource(this.source, this._knownDavService);\n }\n /**\n * Get the dav root of this object\n * There is no setter as the root is not meant to be changed\n */\n get root() {\n if (this._data.root) {\n return this._data.root.replace(/^(.+)\\/$/, \"$1\");\n }\n if (this.isDavRessource) {\n const root = dirname(this.source);\n return root.split(this._knownDavService).pop() || null;\n }\n return null;\n }\n /**\n * Get the absolute path of this object relative to the root\n */\n get path() {\n if (this.root) {\n let source = this.source;\n if (this.isDavRessource) {\n source = source.split(this._knownDavService).pop();\n }\n const firstMatch = source.indexOf(this.root);\n const root = this.root.replace(/\\/$/, \"\");\n return source.slice(firstMatch + root.length) || \"/\";\n }\n return (this.dirname + \"/\" + this.basename).replace(/\\/\\//g, \"/\");\n }\n /**\n * Get the node id if defined.\n * There is no setter as the fileid is not meant to be changed\n */\n get fileid() {\n return this._data?.id;\n }\n /**\n * Get the node status.\n */\n get status() {\n return this._data?.status;\n }\n /**\n * Set the node status.\n */\n set status(status) {\n this._data.status = status;\n }\n /**\n * Move the node to a new destination\n *\n * @param {string} destination the new source.\n * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n */\n move(destination) {\n validateData({ ...this._data, source: destination }, this._knownDavService);\n this._data.source = destination;\n this.updateMtime();\n }\n /**\n * Rename the node\n * This aliases the move method for easier usage\n *\n * @param basename The new name of the node\n */\n rename(basename2) {\n if (basename2.includes(\"/\")) {\n throw new Error(\"Invalid basename\");\n }\n this.move(dirname(this.source) + \"/\" + basename2);\n }\n /**\n * Update the mtime if exists\n */\n updateMtime() {\n if (this._data.mtime) {\n this._data.mtime = /* @__PURE__ */ new Date();\n }\n }\n /**\n * Update the attributes of the node\n * Warning, updating attributes will NOT automatically update the mtime.\n *\n * @param attributes The new attributes to update on the Node attributes\n */\n update(attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n try {\n if (value === void 0) {\n delete this.attributes[name];\n } else {\n this.attributes[name] = value;\n }\n } catch (e) {\n if (e instanceof TypeError) {\n continue;\n }\n throw e;\n }\n }\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass File extends Node {\n get type() {\n return FileType.File;\n }\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Folder extends Node {\n constructor(data) {\n super({\n ...data,\n mime: \"httpd/unix-directory\"\n });\n }\n get type() {\n return FileType.Folder;\n }\n get extension() {\n return null;\n }\n get mime() {\n return \"httpd/unix-directory\";\n }\n}\n/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Ferdinand Thiessen \n *\n * @license AGPL-3.0-or-later\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 */\nconst davRootPath = `/files/${getCurrentUser()?.uid}`;\nconst davRemoteURL = generateRemoteUrl(\"dav\");\nconst davGetClient = function(remoteURL = davRemoteURL, headers = {}) {\n const client = createClient(remoteURL, { headers });\n function setHeaders(token) {\n client.setHeaders({\n ...headers,\n // Add this so the server knows it is an request from the browser\n \"X-Requested-With\": \"XMLHttpRequest\",\n // Inject user auth\n requesttoken: token ?? \"\"\n });\n }\n onRequestTokenUpdate(setHeaders);\n setHeaders(getRequestToken());\n const patcher = getPatcher();\n patcher.patch(\"fetch\", (url, options) => {\n const headers2 = options.headers;\n if (headers2?.method) {\n options.method = headers2.method;\n delete headers2.method;\n }\n return fetch(url, options);\n });\n return client;\n};\nconst getFavoriteNodes = (davClient, path = \"/\", davRoot = davRootPath) => {\n const controller = new AbortController();\n return new CancelablePromise(async (resolve, reject, onCancel) => {\n onCancel(() => controller.abort());\n try {\n const contentsResponse = await davClient.getDirectoryContents(`${davRoot}${path}`, {\n signal: controller.signal,\n details: true,\n data: davGetFavoritesReport(),\n headers: {\n // see davGetClient for patched webdav client\n method: \"REPORT\"\n },\n includeSelf: true\n });\n const nodes = contentsResponse.data.filter((node) => node.filename !== path).map((result) => davResultToNode(result, davRoot));\n resolve(nodes);\n } catch (error) {\n reject(error);\n }\n });\n};\nconst davResultToNode = function(node, filesRoot = davRootPath, remoteURL = davRemoteURL) {\n let userId = getCurrentUser()?.uid;\n const isPublic = document.querySelector(\"input#isPublic\")?.value;\n if (isPublic) {\n userId = userId ?? document.querySelector(\"input#sharingUserId\")?.value;\n userId = userId ?? \"anonymous\";\n } else if (!userId) {\n throw new Error(\"No user id found\");\n }\n const props = node.props;\n const permissions = davParsePermissions(props?.permissions);\n const owner = String(props?.[\"owner-id\"] || userId);\n const nodeData = {\n id: props?.fileid || 0,\n source: `${remoteURL}${node.filename}`,\n mtime: new Date(Date.parse(node.lastmod)),\n mime: node.mime || \"application/octet-stream\",\n size: props?.size || Number.parseInt(props.getcontentlength || \"0\"),\n permissions,\n owner,\n root: filesRoot,\n attributes: {\n ...node,\n ...props,\n hasPreview: props?.[\"has-preview\"]\n }\n };\n delete nodeData.attributes?.props;\n return node.type === \"file\" ? new File(nodeData) : new Folder(nodeData);\n};\nconst forbiddenCharacters = window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\nconst forbiddenFilenameRegex = window._oc_config?.blacklist_files_regex ? new RegExp(window._oc_config.blacklist_files_regex) : null;\nfunction isFilenameValid(filename) {\n if (forbiddenCharacters.some((character) => filename.includes(character))) {\n return false;\n }\n if (forbiddenFilenameRegex !== null && filename.match(forbiddenFilenameRegex)) {\n return false;\n }\n return true;\n}\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers, orders) {\n identifiers = identifiers ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a, b) => {\n for (const [index, identifier] of identifiers.entries()) {\n const value = collator.compare(stringify(identifier(a)), stringify(identifier(b)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const identifiers = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use displayName too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use displayName if available, fallback to name\n (v) => v.attributes?.displayName || v.basename,\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers, orders);\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Navigation {\n _views = [];\n _currentView = null;\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n }\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n }\n }\n get views() {\n return this._views;\n }\n setActive(view) {\n this._currentView = view;\n }\n get active() {\n return this._currentView;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n if (arrayMode === \"strict\") {\n target[keys[i]] = [a[keys[i]]];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i = 0; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && xmlData[i + 1] === \"?\") {\n i += 2;\n i = readPI(xmlData, i);\n if (i.err)\n return i;\n } else if (xmlData[i] === \"<\") {\n let tagStartPos = i;\n i++;\n if (xmlData[i] === \"!\") {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === \"/\") {\n closingTag = true;\n i++;\n }\n let tagName = \"\";\n for (; i < xmlData.length && xmlData[i] !== \">\" && xmlData[i] !== \" \" && xmlData[i] !== \"\t\" && xmlData[i] !== \"\\n\" && xmlData[i] !== \"\\r\"; i++) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i));\n }\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i));\n } else if (options.unpairedTags.indexOf(tagName) !== -1)\n ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"!\") {\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i + 1] === \"?\") {\n i = readPI(xmlData, ++i);\n if (i.err)\n return i;\n } else {\n break;\n }\n } else if (xmlData[i] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n }\n if (xmlData[i] === \"<\") {\n i--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i] + \"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == \"?\" || xmlData[i] == \" \") {\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == \"?\" && xmlData[i + 1] == \">\") {\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \"-\") {\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === \"-\" && xmlData[i + 1] === \"-\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n } else if (xmlData.length > i + 8 && xmlData[i + 1] === \"D\" && xmlData[i + 2] === \"O\" && xmlData[i + 3] === \"C\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"Y\" && xmlData[i + 6] === \"P\" && xmlData[i + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i + 9 && xmlData[i + 1] === \"[\" && xmlData[i + 2] === \"C\" && xmlData[i + 3] === \"D\" && xmlData[i + 4] === \"A\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"A\" && xmlData[i + 7] === \"[\") {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === \"]\" && xmlData[i + 1] === \"]\" && xmlData[i + 2] === \">\") {\n i += 2;\n break;\n }\n }\n }\n return i;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i])\n ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] !== void 0 && matches[i][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i][2] + \"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i][2] + \"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === \"x\") {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \";\")\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i) {\n i++;\n if (xmlData[i] === \";\")\n return -1;\n if (xmlData[i] === \"#\") {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === \";\")\n break;\n return -1;\n }\n return i;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\")\n key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\")\n node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i) {\n const entities = {};\n if (xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"C\" && xmlData[i + 5] === \"T\" && xmlData[i + 6] === \"Y\" && xmlData[i + 7] === \"P\" && xmlData[i + 8] === \"E\") {\n i = i + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i)) {\n i += 7;\n [entityName, val, i] = readEntityExp(xmlData, i + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i))\n i += 8;\n else if (hasBody && isAttlist(xmlData, i))\n i += 8;\n else if (hasBody && isNotation(xmlData, i))\n i += 9;\n else if (isComment)\n comment = true;\n else\n throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i] === \">\") {\n if (comment) {\n if (xmlData[i - 1] === \"-\" && xmlData[i - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i };\n}\nfunction readEntityExp(xmlData, i) {\n let entityName2 = \"\";\n for (; i < xmlData.length && (xmlData[i] !== \"'\" && xmlData[i] !== '\"'); i++) {\n entityName2 += xmlData[i];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1)\n throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i++];\n let val2 = \"\";\n for (; i < xmlData.length && xmlData[i] !== startChar; i++) {\n val2 += xmlData[i];\n }\n return [entityName2, val2, i];\n}\nfunction isComment(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"-\" && xmlData[i + 3] === \"-\")\n return true;\n return false;\n}\nfunction isEntity(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"N\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"I\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"Y\")\n return true;\n return false;\n}\nfunction isElement(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"E\" && xmlData[i + 3] === \"L\" && xmlData[i + 4] === \"E\" && xmlData[i + 5] === \"M\" && xmlData[i + 6] === \"E\" && xmlData[i + 7] === \"N\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isAttlist(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"A\" && xmlData[i + 3] === \"T\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"L\" && xmlData[i + 6] === \"I\" && xmlData[i + 7] === \"S\" && xmlData[i + 8] === \"T\")\n return true;\n return false;\n}\nfunction isNotation(xmlData, i) {\n if (xmlData[i + 1] === \"!\" && xmlData[i + 2] === \"N\" && xmlData[i + 3] === \"O\" && xmlData[i + 4] === \"T\" && xmlData[i + 5] === \"A\" && xmlData[i + 6] === \"T\" && xmlData[i + 7] === \"I\" && xmlData[i + 8] === \"O\" && xmlData[i + 9] === \"N\")\n return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\")\n return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr))\n return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\")\n return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\")\n return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (eNotation) {\n if (options.eNotation)\n return num;\n else\n return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\")\n return num;\n else if (numStr === numTrimmedByZeros)\n return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros)\n return num;\n else\n return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr)\n return num;\n else if (sign + numTrimmedByZeros === numStr)\n return num;\n else\n return str;\n }\n if (trimmedStr === numStr)\n return num;\n else if (trimmedStr === sign + numStr)\n return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\")\n numStr = \"0\";\n else if (numStr[0] === \".\")\n numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\")\n numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i = 0; i < entKeys.length; i++) {\n const ent = entKeys[i];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities)\n val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (!this.options.ignoreAttributes && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = this.resolveNameSpace(matches[i][1]);\n let oldVal = matches[i][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\")\n aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i = 0; i < xmlData.length; i++) {\n const ch = xmlData[i];\n if (ch === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i, false, \"?>\");\n if (!tagData)\n throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags)\n ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i = tagData.closeIndex + 1;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i = endIndex;\n } else if (xmlData.substr(i + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i);\n this.docTypeEntities = result.entities;\n i = result.i;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0)\n val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2)\n throw new Error(`Unexpected end of ${rawTagName}`);\n i = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }\n } else {\n textData += xmlData[i];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false)\n ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0)\n isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp)\n return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary)\n attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i, errMsg) {\n const closingIndex = xmlData.indexOf(str, i);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);\n if (!result)\n return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i) {\n const startIndex = i;\n let openTagCount = 1;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === \"<\") {\n if (xmlData[i + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i),\n i: closeIndex\n };\n }\n }\n i = closeIndex;\n } else if (xmlData[i + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i + 1, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i + 3, \"StopNode is not closed.\");\n i = closeIndex;\n } else if (xmlData.substr(i + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"StopNode is not closed.\") - 2;\n i = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\")\n return true;\n else if (newval === \"false\")\n return false;\n else\n return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0)\n newJpath = property;\n else\n newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0)\n text = tagObj[property];\n else\n text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode)\n val2[options.textNodeName] = \"\";\n else\n val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0)\n compressedObj[options.textNodeName] = text;\n } else if (text !== void 0)\n compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (key !== \":@\")\n return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i = 0; i < len; i++) {\n const atrrName = keys[i];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\")\n ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true)\n validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0)\n return orderedResult;\n else\n return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === void 0)\n continue;\n let newJPath = \"\";\n if (jPath.length === 0)\n newJPath = tagName;\n else\n newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode)\n xmlStr += tagStart + \">\";\n else\n xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!obj.hasOwnProperty(key))\n continue;\n if (key !== \":@\")\n return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr))\n continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName)\n return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = \"\";\n let val2 = \"\";\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key))\n continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === \"undefined\")\n ;\n else if (item === null) {\n if (key[0] === \"?\")\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n listTagVal += this.j2x(item, level + 1).val;\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level);\n }\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, \"\", level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], \"\" + jObj[key][Ks[j]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else\n return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\")\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode)\n closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \" 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (view.columns && view.columns.length > 0 && (!view.caption || typeof view.caption !== \"string\")) {\n throw new Error(\"View caption is required for top-level views and must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (!(\"order\" in view) || typeof view.order !== \"number\") {\n throw new Error(\"View order is required and must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n return true;\n};\n/**\n * @copyright 2019 Christoph Wurst \n *\n * @author Christoph Wurst \n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\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 */\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a, b) => {\n if (a.order !== void 0 && b.order !== void 0 && a.order !== b.order) {\n return a.order - b.order;\n }\n return a.displayName.localeCompare(b.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n File,\n FileAction,\n FileType,\n FilesSortingMode,\n Folder,\n Header,\n Navigation,\n NewMenuEntryCategory,\n Node,\n NodeStatus,\n Permission,\n View,\n addNewFileMenuEntry,\n davGetClient,\n davGetDefaultPropfind,\n davGetFavoritesReport,\n davGetRecentSearch,\n davParsePermissions,\n davRemoteURL,\n davResultToNode,\n davRootPath,\n defaultDavNamespaces,\n defaultDavProperties,\n formatFileSize,\n getDavNameSpaces,\n getDavProperties,\n getFavoriteNodes,\n getFileActions,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n isFilenameValid,\n orderBy,\n parseFileSize,\n registerDavProperty,\n registerFileAction,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"3239\":\"settings-users\",\"4529\":\"settings-apps-view\"}[chunkId] || chunkId) + \"-\" + chunkId + \".js?v=\" + {\"1110\":\"2909496e7e35d6258214\",\"3239\":\"840dea09a2ae7fa5cda6\",\"4529\":\"1c12345652ab9d108a9c\",\"8902\":\"bb051769bbf8ba8e1826\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 2689;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t2689: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(32843)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","APPS_SECTION_ENUM","Object","freeze","installed","t","enabled","disabled","updates","featured","supported","getLoggerBuilder","setApp","detectUser","build","name","beforeMount","document","getElementById","$store","commit","JSON","parse","dataset","server","_c","this","_self","extend","a","b","key","encodeReserveRE","encodeReserveReplacer","c","charCodeAt","toString","commaRE","encode","str","encodeURIComponent","replace","decode","decodeURIComponent","err","castQueryParamValue","value","String","parseQuery","query","res","trim","split","forEach","param","parts","shift","val","length","join","undefined","Array","isArray","push","stringifyQuery","obj","keys","map","result","val2","filter","x","trailingSlashRE","createRoute","record","location","redirectedFrom","router","options","clone","e","route","meta","path","hash","params","fullPath","getFullPath","matched","formatMatch","START","unshift","parent","ref","_stringifyQuery","isSameRoute","onlyPath","isObjectEqual","aKeys","sort","bKeys","every","i","aVal","bVal","handleRouteEntered","instances","instance","cbs","enteredCbs","i$1","_isBeingDestroyed","View","functional","props","type","default","render","_","children","data","routerView","h","$createElement","$route","cache","_routerViewCache","depth","inactive","_routerRoot","vnodeData","$vnode","keepAlive","_directInactive","_inactive","$parent","routerViewDepth","cachedData","cachedComponent","component","configProps","fillPropsinData","components","registerRouteInstance","vm","current","hook","prepatch","vnode","componentInstance","init","propsToPass","config","resolveProps","attrs","resolvePath","relative","base","append","firstChar","charAt","stack","pop","segments","segment","cleanPath","isarray","arr","prototype","call","pathToRegexp_1","pathToRegexp","RegExp","groups","source","match","prefix","delimiter","optional","repeat","partial","asterisk","pattern","attachKeys","regexpToRegexp","flags","arrayToRegexp","tokensToRegExp","stringToRegexp","parse_1","tokensToFunction_1","tokensToFunction","tokensToRegExp_1","PATH_REGEXP","tokens","index","defaultDelimiter","exec","m","escaped","offset","slice","next","capture","group","modifier","escapeGroup","escapeString","substr","encodeURIComponentPretty","encodeURI","toUpperCase","matches","opts","pretty","token","TypeError","stringify","j","test","re","sensitive","strict","end","endsWithDelimiter","compile","regexpCompileCache","create","fillParams","routeMsg","filler","pathMatch","normalizeLocation","raw","_normalized","params$1","rawPath","parsedPath","hashIndex","indexOf","queryIndex","parsePath","basePath","extraQuery","_parseQuery","parsedQuery","resolveQuery","_Vue","noop","Link","to","required","tag","custom","Boolean","exact","exactPath","activeClass","exactActiveClass","ariaCurrentValue","event","this$1$1","$router","resolve","href","classes","globalActiveClass","linkActiveClass","globalExactActiveClass","linkExactActiveClass","activeClassFallback","exactActiveClassFallback","compareTarget","target","queryIncludes","isIncludedRoute","handler","guardEvent","on","click","class","scopedSlot","$scopedSlots","$hasNormal","navigate","isActive","isExactActive","findAnchor","$slots","isStatic","aData","handler$1","event$1","aAttrs","metaKey","altKey","ctrlKey","shiftKey","defaultPrevented","button","currentTarget","getAttribute","preventDefault","child","inBrowser","window","createRouteMap","routes","oldPathList","oldPathMap","oldNameMap","parentRoute","pathList","pathMap","nameMap","addRouteRecord","l","splice","matchAs","pathToRegexpOptions","normalizedPath","normalizePath","caseSensitive","regex","compileRouteRegex","alias","redirect","beforeEnter","childMatchAs","aliases","aliasRoute","createMatcher","currentRoute","_createRoute","paramNames","record$1","matchRoute","originalRedirect","hasOwnProperty","resolveRecordPath","aliasedMatch","aliasedRecord","addRoute","parentOrRoute","getRoutes","addRoutes","len","Time","performance","now","Date","genStateKey","toFixed","_key","getStateKey","setStateKey","positionStore","setupScroll","history","scrollRestoration","protocolAndPath","protocol","host","absolutePath","stateCopy","state","replaceState","addEventListener","handlePopState","removeEventListener","handleScroll","from","isPop","app","behavior","scrollBehavior","$nextTick","position","getScrollPosition","shouldScroll","then","scrollToPosition","catch","saveScrollPosition","pageXOffset","y","pageYOffset","isValidPosition","isNumber","normalizePosition","v","hashStartsWithNumberRE","isObject","selector","el","querySelector","docRect","documentElement","getBoundingClientRect","elRect","left","top","getElementPosition","style","scrollTo","ua","supportsPushState","navigator","userAgent","pushState","url","NavigationFailureType","redirected","aborted","cancelled","duplicated","createNavigationCancelledError","createRouterError","message","error","Error","_isRouter","propertiesToLog","isError","isNavigationFailure","errorType","runQueue","queue","fn","cb","step","flatMapComponents","flatten","concat","apply","hasSymbol","Symbol","toStringTag","once","called","args","arguments","History","baseEl","normalizeBase","pending","ready","readyCbs","readyErrorCbs","errorCbs","listeners","extractGuards","records","bind","reverse","guards","def","guard","extractGuard","bindGuard","listen","onReady","errorCb","onError","transitionTo","onComplete","onAbort","prev","confirmTransition","updateRoute","ensureURL","afterHooks","abort","console","lastRouteIndex","lastCurrentIndex","max","Math","updated","activated","deactivated","resolveQueue","extractLeaveGuards","beforeHooks","extractUpdateHooks","hasAsync","cid","resolvedDef","__esModule","resolved","reject","reason","msg","comp","iterator","createNavigationAbortedError","createNavigationRedirectedError","enterGuards","bindEnterGuard","extractEnterGuards","resolveHooks","setupListeners","teardown","cleanupListener","HTML5History","_startLocation","getLocation","__proto__","constructor","expectScroll","supportsScroll","handleRoutingEvent","go","n","fromRoute","getCurrentLocation","pathname","pathLowerCase","toLowerCase","baseLowerCase","search","HashHistory","fallback","checkFallback","ensureSlash","getHash","replaceHash","eventType","pushHash","getUrl","AbstractHistory","targetIndex","VueRouter","apps","matcher","mode","prototypeAccessors","configurable","get","$once","routeOrError","handleInitialScroll","_route","beforeEach","registerHook","beforeResolve","afterEach","Promise","back","forward","getMatchedComponents","createHref","normalizedTo","defineProperties","VueRouter$1","list","install","Vue","isDef","registerInstance","callVal","$options","_parentVnode","mixin","beforeCreate","_router","util","defineReactive","destroyed","defineProperty","strats","optionMergeStrategies","beforeRouteEnter","beforeRouteLeave","beforeRouteUpdate","created","version","START_LOCATION","use","sanitize","requireAdmin","confirmPassword","axios","post","put","delete","orderGroups","orderBy","usercount","localeCompare","defaults","id","canAdd","canRemove","mutations","appendUsers","usersObj","existingUsers","users","_ref","newUsers","values","_ref2","includes","usersOffset","usersLimit","updateDisabledUsers","_usersObj","disabledUsersOffset","disabledUsersLimit","setPasswordPolicyMinLength","minPasswordLength","initGroups","_ref3","userCount","assign","addGroup","_ref4","gid","displayName","find","renameGroup","_ref5","groupIndex","findIndex","groupSearch","updatedGroup","removeGroup","addUserGroup","_ref6","userid","user","removeUserGroup","_ref7","addUserSubAdmin","_ref8","subadmin","removeUserSubAdmin","_ref9","deleteUser","userIndex","actionType","addUserData","response","ocs","enableDisableUser","_ref10","updateUserCounts","_ref11","disabledGroup","userGroup","warn","logger","setUserData","_ref12","humanValue","parseFileSize","resetUsers","setShowConfig","_ref13","showConfig","CancelToken","searchRequestCancelSource","showStoragePath","showUserBackend","showLastLogin","showNewUserForm","showLanguages","getters","getUsers","getGroups","getSubadminGroups","getPasswordPolicyMinLength","getUsersOffset","getUsersLimit","getDisabledUsersOffset","getDisabledUsersLimit","getUserCount","getShowConfig","actions","searchUsers","context","_ref14","limit","api","generateOcsUrl","isCancel","getUser","userId","_ref15","cancel","cancelToken","usersCount","getDisabledUsers","_ref16","_ref17","limitParam","getUsersFromList","_ref18","getUsersFromGroup","_ref19","groupid","groupId","getCapabilities","password_policy","minLength","_ref20","_ref21","_ref22","_ref23","_ref24","wipeUserDevices","addUser","_ref25","_ref26","dispatch","password","email","quota","language","manager","_ref27","userStatus","_ref28","allowedEmpty","sendWelcomeMail","APPS_API_FAILURE","showError","isHTML","initCategories","categories","updateCount","updateCategories","categoriesPromise","gettingCategoriesPromise","setUpdateCount","addCategory","category","appendCategories","categoriesArray","setAllApps","setError","appId","_id","clearError","enableApp","active","disableApp","removable","canUnInstall","uninstallApp","needsDownload","canInstall","updateApp","update","resetApps","reset","startLoading","loading","stopLoading","generateUrl","appIds","_appId","update_required","showInfo","onClick","reload","close","setTimeout","forceEnableApp","getAllApps","getCategories","shouldRefetchCategories","categoriesPromiseResponse","loadingList","getUpdateCount","getCategoryById","selectedCategoryId","serverData","setServerData","getServerData","setAppConfig","Vuex","API_FAILURE","Store","modules","settings","oc","process","Users","Apps","Router","baseTitle","title","selectedGroup","async","store","_to$meta$title","_to$meta","metaTitle","heading","headingEl","textContent","setPageHeading","VTooltip","defaultHtml","sync","__webpack_nonce__","btoa","OC","requestToken","OCA","oc_userconfig","App","$mount","cloneRoute","exports","moduleName","registerModule","namespaced","transition","currentPath","isTimeTraveling","storeUnwatch","watch","afterEachUnHook","unregisterModule","setUid","uid","Permission","Permission2","defaultDavProperties","defaultDavNamespaces","d","nc","getDavProperties","_nc_dav_properties","prop","getDavNameSpaces","_nc_dav_namespaces","ns","davGetDefaultPropfind","davGetRecentSearch","lastModified","FileType","FileType2","isDavRessource","davService","validateData","URL","startsWith","mtime","crtime","mime","size","permissions","NONE","ALL","owner","attributes","root","service","status","NodeStatus","NodeStatus2","Node","_data","_attributes","_knownDavService","readonlyAttributes","entries","getOwnPropertyDescriptors","set","Reflect","deleteProperty","receiver","Proxy","encodedSource","origin","basename","extension","extname","dirname","firstMatch","updateMtime","READ","fileid","move","destination","rename","basename2","File","Folder","super","davRootPath","davRemoteURL","davGetClient","remoteURL","headers","client","setHeaders","requesttoken","patch","headers2","method","fetch","getFavoriteNodes","davClient","davRoot","controller","AbortController","CancelablePromise","onCancel","getDirectoryContents","signal","details","includeSelf","node","filename","davResultToNode","filesRoot","isPublic","permString","CREATE","UPDATE","DELETE","SHARE","davParsePermissions","nodeData","lastmod","Number","parseInt","getcontentlength","hasPreview","_oc_config","blacklist_files_regex","humanList","humanListBinary","formatFileSize","skipSmallSizes","binaryPrefixes","base1000","order","floor","log","min","readableFormat","relativeSize","pow","parseFloat","toLocaleString","forceBinary","toLocaleLowerCase","replaceAll","decimalString","round","k","g","p","util$3","nameStartChar","nameRegexp","regexName","isExist","isEmptyObject","merge","arrayMode","getValue","isName","string","getAllMatches","allmatches","startIndex","lastIndex","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","allowBooleanAttributes","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","hex","leadingZeros","eNotation","tagValueProcessor","tagName","attributeValueProcessor","attrName","stopNodes","alwaysCreateTextNode","commentPropName","unpairedTags","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","updateTag","jPath","buildOptions","defaultOptions","node2json","compress","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","replaceEntitiesValue","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attrStr","attr","attrVal","suppressBooleanAttributes","lastIndexOf","textValue","entities","entity","buildFromOrderedJs","jArray","format","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","j2x","buildTextValNode","buildObjectNode","jObj","arrayNodeName","buildAttrPairStr","newval","arrLen","listTagVal","item","Ks","L","closeTag","tagEndExp","piClosingChar","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","module","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","r","getter","definition","o","enumerable","f","chunkId","all","reduce","promises","u","globalThis","Function","done","script","needAttach","scripts","getElementsByTagName","s","createElement","charset","timeout","setAttribute","src","onScriptComplete","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","nmd","paths","scriptUrl","importScripts","currentScript","baseURI","self","installedChunks","installedChunkData","promise","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file