You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/apps/files/js/dist/templates.js

274 lines
665 KiB
JavaScript

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(r,s,function(t){return e[t]}.bind(null,s));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/js/",n(n.s=338)}([function(e,t,n){var r=n(3),s=n(45),o=n(5),a=n(46),i=n(63),l=n(100),c=s("wks"),u=r.Symbol,m=l?u:u&&u.withoutSetter||a;e.exports=function(e){return o(c,e)&&(i||"string"==typeof c[e])||(i&&o(u,e)?c[e]=u[e]:c[e]=m("Symbol."+e)),c[e]}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(3),s=n(28).f,o=n(13),a=n(10),i=n(58),l=n(95),c=n(52);e.exports=function(e,t){var n,u,m,p,d,f=e.target,g=e.global,A=e.stat;if(n=g?r:A?r[f]||i(f,{}):(r[f]||{}).prototype)for(u in t){if(p=t[u],m=e.noTargetGet?(d=s(n,u))&&d.value:n[u],!c(g?u:f+(A?".":"#")+u,e.forced)&&void 0!==m){if(typeof p==typeof m)continue;l(p,m)}(e.sham||m&&m.sham)&&o(p,"sham",!0),a(n,u,p,e)}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(11))},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(8),s=n(94),o=n(4),a=n(30),i=Object.defineProperty;t.f=r?i:function(e,t,n){if(o(e),t=a(t,!0),o(n),s)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=n(103),s=Object.prototype.toString;function o(e){return"[object Array]"===s.call(e)}function a(e){return void 0===e}function i(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==s.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===s.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===s.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:i,isPlainObject:l,isUndefined:a,isDate:function(e){return"[object Date]"===s.call(e)},isFile:function(e){return"[object File]"===s.call(e)},isBlob:function(e){return"[object Blob]"===s.call(e)},isFunction:c,isStream:function(e){return i(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchPar
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
var r=Object.freeze({});function s(e){return null==e}function o(e){return null!=e}function a(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function u(e){return"[object Object]"===c.call(e)}function m(e){return"[object RegExp]"===c.call(e)}function p(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function f(e){return null==e?"":Array.isArray(e)||u(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function g(e){var t=parseFloat(e);return isNaN(t)?e:t}function A(e,t){for(var n=Object.create(null),r=e.split(","),s=0;s<r.length;s++)n[r[s]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}A("slot,component",!0);var h=A("key,ref,slot,slot-scope,is");function v(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(e,t){return y.call(e,t)}function C(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,x=C((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),T=C((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),E=/\B([A-Z])/g,k=C((function(e){return e.replace(E,"-$1").toLowerCase()}));var S=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function M(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function j(e,t){for(var n in t)e[n]=t[n];return e}function P(e){for(var t={},n=0;n<e.length;n++)e[n]&&j(t,e[n]);return t}function _(e,t,n){}var B=function(e,t,n){return!1},N=function(e){return e};function I(e,t){if(e===t)return!0;var n=l(e),r=l(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var s=Array.isArray(e),o=Array.isArray(t);if(s&&o)return e.length===t.length&&e.every((function(e,n){return I(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(s||o)return!1;var a=Object.keys(e),i=Object.keys(t);return a.length===i.length&&a.every((function(n){return I(e[n],t[n])}))}catch(e){return!1}}function L(e,t){for(var n=0;n<e.length;n++)if(I(e[n],t))return n;return-1}function F(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var O=["component","directive","filter"],D=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],U={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:B,isReservedAttr:B,isUnknownElement:B,getTagNamespace:_,parsePlatformTagName:N,mustUseProp:B,async:!0,_lifecycleHooks:D},z=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var $=new RegExp("[^"+z.source+".$_\\d]");var G,Q="__proto__"in{},Y="undefined"!=typeof window,H="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,W=H&&WXEnvironment.platform.toLowerCase(),V=Y&&window.navigator.userAgent.toLowerCase(),Z=V&&/msie|trident/.test(V),J=V&&V.indexOf("msie 9.0")>0,X=V&&V.indexOf("edge/")>0,q=(V&&V.indexOf("android"),V&&/iphone|ipad|ipod|ios/.test(V)||"ios"===W),K=(V&&/chrome\/\d+/.test(V),V&&/phantomjs/.test(V),V&&V.match(/firefox\/(\d+)/)),ee={}.watch,te=!1;if(Y)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){te=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var re=function(){return void 0===G&&(G=!Y&&!H&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),G},se=Y&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function oe(e){return"function"==t
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var s=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function i(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,s=t.overflowY;return/(auto|scroll|overlay)/.test(n+s+r)?e:l(i(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=n&&!(!window.MSInputMethodContext||!document.documentMode),m=n&&/MSIE 10/.test(navigator.userAgent);function p(e){return 11===e?u:10===e?m:u||m}function d(e){if(!e)return document.documentElement;for(var t=p(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function f(e){return null!==e.parentNode?f(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,s=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(s,0);var a,i,l=o.commonAncestorContainer;if(e!==l&&t!==l||r.contains(s))return"BODY"===(i=(a=l).nodeName)||"HTML"!==i&&d(a.firstElementChild)!==a?d(l):l;var c=f(e);return c.host?g(c.host,t):g(e,f(t).host)}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var s=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||s;return o[n]}return e[n]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=A(t,"top"),s=A(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=s*o,e.right+=s*o,e}function v(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function y(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],p(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function b(e){var t=e.body,n=e.documentElement,r=p(10)&&getComputedStyle(n);return{height:y("Height",t,n,r),width:y("Width",t,n,r)}}var C=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),x=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function E(e){return T({},e,{right:e.left+e.width,bottom:e.top+e.height})}function k(e){var t={};try{if(p(10)){t=e.getBoundingClientRect();var n=A(e,"top"),r=A(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var s={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?b(e.ownerDocument):{},i=o.width||e.clientWidth||s.width,l=o.height||e.clientHeight||s.height,c=e.offsetWidth-i,u=e.offsetHeight-l;if(c||u){var m=a(e);c-=v(m,"x"),u-
/**
* @copyright Copyright (c) 2020 Greta Doci <gretadoci@gmail.com>
*
* @author 2020 Greta Doci <gretadoci@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},2:function(e,t,n){"use strict";var r,s=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function a(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function i(e,t){for(var n={},r=[],s=0;s<e.length;s++){var i=e[s],l=t.base?i[0]+t.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var m=a(u),p={css:i[1],media:i[2],sourceMap:i[3]};-1!==m?(o[m].references++,o[m].updater(p)):o.push({identifier:u,updater:g(p,t),references:1}),r.push(u)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function m(e,t,n,r){var s=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(t,s);else{var o=document.createTextNode(s),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,s=n.media,o=n.sourceMap;if(s?e.setAttribute("media",s):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d=null,f=0;function g(e,t){var n,r,s;if(t.singleton){var o=f++;n=d||(d=l(t)),r=m.bind(null,n,o,!1),s=m.bind(null,n,o,!0)}else n=l(t),r=p.bind(null,n,t),s=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else s()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=i(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var s=a(n[r]);o[s].references--}for(var l=i(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}n=l}}}},3:function(e,t,n){"use strict";function r(e,t,n,r,s,o,a,i){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):s&&(l=i?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var m=c.beforeCreate;c.beforeCreate=m?[].concat(m,l):[l]}return{exports:e,options:c}}n.d(t,"a",(function(){return r}))}})},function(e,t,n){var r=n(19),s=n(38),o=n(62),a=n(4);e.exports=r("Reflect","ownKeys")||function(e){var t=s.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r=n(2),s=n(40).map;r({target:"Array",proto:!0,forced:!n(34)("map")},{map:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribe=function(e,t){o.subscribe(e,t)},t.unsubscribe=function(e,t){o.unsubscribe(e,t)},t.emit=function(e,t){o.emit(e,t)};var r=n(172),s=n(177);var o=(void 0!==window.OC&&window.OC._eventBus&&void 0===window._nc_event_bus&&(console.warn("found old e
/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
r.VTooltip.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data-v-'.concat("e08a231",'><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'),r.VTooltip.options.defaultHtml=!1,t.default=r.VTooltip},function(e,t,n){"use strict";var r=n(0),s=n.n(r),o=n(1),a=n.n(o)()(s.a);a.push([e.i,".vue-tooltip[data-v-e08a231]{position:absolute;z-index:100000;right:auto;left:auto;display:block;margin:0;margin-top:-3px;padding:10px 0;text-align:left;text-align:start;opacity:0;line-height:1.6;line-break:auto;filter:drop-shadow(0 1px 10px var(--color-box-shadow))}.vue-tooltip[data-v-e08a231][x-placement^='top'] .tooltip-arrow{bottom:0;margin-top:0;margin-bottom:0;border-width:10px 10px 0 10px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='bottom'] .tooltip-arrow{top:0;margin-top:0;margin-bottom:0;border-width:0 10px 10px 10px;border-top-color:transparent;border-right-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='right'] .tooltip-arrow{right:100%;margin-right:0;margin-left:0;border-width:10px 10px 10px 0;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e08a231][x-placement^='left'] .tooltip-arrow{left:100%;margin-right:0;margin-left:0;border-width:10px 0 10px 10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.vue-tooltip[data-v-e08a231][aria-hidden='true']{visibility:hidden;transition:opacity .15s, visibility .15s;opacity:0}.vue-tooltip[data-v-e08a231][aria-hidden='false']{visibility:visible;transition:opacity .15s;opacity:1}.vue-tooltip[data-v-e08a231] .tooltip-inner{max-width:350px;padding:5px 8px;text-align:center;color:var(--color-main-text);border-radius:var(--border-radius);background-color:var(--color-main-background)}.vue-tooltip[data-v-e08a231] .tooltip-arrow{position:absolute;z-index:1;width:0;height:0;margin:0;border-style:solid;border-color:var(--color-main-background)}\n","",{version:3,sources:["webpack://./index.scss"],names:[],mappings:"AAeA,6BACC,iBAAkB,CAClB,cAAe,CACf,UAAW,CACX,SAAU,CACV,aAAc,CACd,QAAS,CAET,eAAgB,CAChB,cAAe,CACf,eAAgB,CAChB,gBAAiB,CACjB,SAAU,CACV,eAAgB,CAEhB,eAAgB,CAChB,sDAAuD,CAhBxD,gEAqBG,QAAS,CACT,YAAa,CACb,eAAgB,CAChB,6BA1Be,CA2Bf,8BAA+B,CAC/B,+BAAgC,CAChC,6BAA8B,CA3BjC,mEAkCG,KAAM,CACN,YAAa,CACb,eAAgB,CAChB,6BAvCe,CAwCf,4BAA6B,CAC7B,8BAA+B,CAC/B,6BAA8B,CAxCjC,kEA+CG,UAAW,CACX,cAAe,CACf,aAAc,CACd,6BAAsD,CACtD,4BAA6B,CAC7B,+BAAgC,CAChC,6BAA8B,CArDjC,iEA4DG,SAAU,CACV,cAAe,CACf,aAAc,CACd,6BAjEe,CAkEf,4BAA6B,CAC7B,8BAA+B,CAC/B,+BAAgC,CAlEnC,iDAwEE,iBAAkB,CAClB,wCAAyC,CACzC,SAAU,CA1EZ,kDA6EE,kBAAmB,CACnB,uBAAwB,CACxB,SAAU,CA/EZ,4CAoFE,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,4BAA6B,CAC7B,kCAAmC,CACnC,6CAA8C,CAzFhD,4CA8FE,iBAAkB,CAClB,SAAU,CACV,OAAQ,CACR,QAAS,CACT,QAAS,CACT,kBAAmB,CACnB,yCAA0C",sourcesContent:["$scope_version:\"e08a231\"; @import 'variables';\n/**\n* @copyright Copyright (c) 2016, John Molakvoæ <skjnldsv@protonmail.com>\n* @copyright Copyright (c) 2016, Robin Appelman <robin@icewind.nl>\n* @copyright Copyright (c) 2016, Jan-Christoph Borchardt <hey@jancborchardt.net>\n* @copyright Copyright (c) 2016, Erik Pellikka <erik@pellikka.org>\n* @copyright Copyright (c) 2015, Vincent Petry <pvince81@owncloud.com>\n*\n* Bootstrap v3.3.5 (http://getbootstrap.com)\n* Copyright 2011-2015 Twitter, Inc.\n* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n*/\n\n$arrow-width: 10px;\n\n.vue-tooltip[data-v-#{$scope_version}] {\n\tposition: absolute;\n\tz-index: 100000;\n\tright: auto;\n\tleft: auto;\n\tdisplay: block;\n\tmargin: 0;\n\t/* default to top */\n\tmargin-top: -3px;\n\tpadding: 10px 0;\n\ttext-align: left;\n\ttext-align: start;\n\topacity: 0;\n\tline-height: 1.6;\n\n\tline-break: auto;\n\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t// TOP\n\t&[x-placement^='top'] {\n\t\t.tooltip-arrow {\n\t\t\tbottom: 0;\n\t\t\tmargin-top: 0;\n\t\t\tmargin-bottom: 0;\n\t\t\tborder-width: $arrow-width $
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.a={before:function(){this.$slots.default&&""!==this.text.trim()||(s.a.util.warn("".concat(this.$options.name," cannot be empty and requires a meaningful text content"),this),this.$destroy(),this.$el.remove())},beforeUpdate:function(){this.text=this.getText()},data:function(){return{text:this.getText()}},computed:{isLongText:function(){return this.text&&this.text.trim().length>20}},methods:{getText:function(){return this.$slots.default?this.$slots.default[0].text.trim():""}}}},function(e,t){e.exports=n(201)},function(e,t){e.exports=n(195)},,function(e,t,n){"use strict";var r=n(12);t.a={methods:{n:r.a,t:r.b}}},,,,function(e,t){e.exports=n(196)},function(e,t,n){"use strict";n.r(t);var r=n(26);
/**
* @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>
*
* @author Marco Ambrosini <marcoambrosini@pm.me>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},,function(e,t,n){"use strict";n(39),n(6),n(17),n(18),n(19);var r=n(38),s=(n(15),function(e,t){for(var n=e.$parent;n;){if(n.$options.name===t)return n;n=n.$parent}});t.a={mixins:[r.a],props:{icon:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:""}},computed:{isIconUrl:function(){try{return new URL(this.icon)}catch(e){return!1}}},methods:{onClick:function(e){if(this.$emit("click",e),this.closeAfterClick){var t=s(this,"Actions");t&&t.closeMenu&&t.closeMenu()}}}}},function(e,t,n){"use strict";n(30),n(15),n(98);var r=n(5),s=n.n(r);t.a=function(e,t,n){if(void 0!==e)for(var r=e.length-1;r>=0;r--){var o=e[r],a=!o.componentOptions&&o.tag&&-1===t.indexOf(o.tag),i=!!o.componentOptions&&"string"==typeof o.componentOptions.tag,l=i&&-1===t.indexOf(o.componentOptions.tag);(a||!i||l)&&((a||l)&&s.a.util.warn("".concat(a?o.tag:o.componentOptions.tag," is not allowed inside the ").concat(n.$options.name," component"),n),e.splice(r,1))}}},function(e,t){e.exports=n(86)},function(e,t){e.exports=n(199)},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),s=n.n(r),o=n(1),a=n.n(o),i=n(4),l=n.n(i),c=n(8),u=n(9),m=n(10),p=n(11),d=a()(s.a),f=l()(c.a),g=l()(u.a),A=l()(m.a),h=l()(p.a);d.push([e.i,'@font-face{font-family:"iconfont-vue-e08a231";src:url('+f+");src:url("+f+') format("embedded-opentype"),url('+g+') format("woff"),url('+A+') format("truetype"),url('+h+') format("svg")}.icon[data-v-1b33c33b]{font-style:normal;font-weight:400}.icon.arrow-left-double[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-left[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right-double[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.breadcrumb[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.checkmark[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.close[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.confirm[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.info[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.menu[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.more[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.pause[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.play[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.triangle-s[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-away[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-dnd[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-invisible[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-online[data-v-1b33c33b]:before{font-family:"iconfont-vue-e08a231";content:""}.action-item[data-v-1b33c33b]{position:relative;display:inline-block}.action-item--single[data-v-1b33c33b]:hover,.action-item--single[data-v-1b33c33b]:focus,.action-item--single[data-v-1b33c33b]:active,.action-item__menutoggle[data-v-1b33c33b]:hover,.action-item__menutoggle[data-v-1b33c33b]:focus,.action-item__menutoggle[data-v-1b33c33b]:active{opacity:1;background-color:rgba(127,127,127,0.25)}.action-item__menutoggle[data-v-1b33c33b]:disabled,.action-item--single[data-v-1b33c33b]:disabled{opacity:.3 !important}.action-item.action-item--open .action-item__menutoggle[data-v-1b33c33b]{opacity:1;background-color:rgba(127,127,127,0.25)}.action-item--single[data-v-1b33c33b],.action-item__menutoggle[data-v-1b33c33b]{box-sizing:border-box;width:auto;min-width:44px;height:44px;margin:0;padding:14px;cursor:pointer;border:none;border-radius:22px;background-color:transparent}.action-item__menutoggle[data-v-1b33c33b]{display:flex;align-
/**
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},,,,,,,,,,function(e,t,n){"use strict";
/**
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.a=function(e){e.mounted?Array.isArray(e.mounted)||(e.mounted=[e.mounted]):e.mounted=[],e.mounted.push((function(){this.$el.setAttribute("data-v-".concat("e08a231"),"")}))}},,function(e,t,n){"use strict";n(30),n(51),n(31),n(37),n(6),n(46),n(17),n(18),n(19),n(52),n(40),n(15);var r=n(22),s=n(33),o=n(50),a=n(12),i=n(47);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=["ActionButton","ActionCheckbox","ActionInput","ActionLink","ActionRadio","ActionRouter","ActionSeparator","ActionText","ActionTextEditable"],u={name:"Actions",directives:{tooltip:r.default},components:{Popover:i.default,VNodes:{functional:!0,render:function(e,t){return t.props.vnodes}}},props:{open:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},menuTitle:{type:String,default:null},primary:{type:Boolean,default:!1},defaultIcon:{type:String,default:"action-item__menutoggle--default-icon"},ariaLabel:{type:String,default:Object(a.b)("Actions")},placement:{type:String,default:"bottom"},boundariesElement:{type:Element,default:function(){return document.querySelector("body")}},container:{type:String,default:"body"},disabled:{type:Boolean,default:!1}},data:function(){return{actions:[],opened:this.open,focusIndex:0,randomId:"menu-"+Object(s.a)(),children:this.$children}},computed:{hasMultipleActions:function(){return this.actions.length>1},isValidSingleAction:function(){return 1===this.actions.length&&null!==this.firstActionElement},firstActionVNode:function(){return this.actions[0]},firstAction:function(){return this.children[0]?this.children[0]:{}},firstActionBinding:function(){if(this.firstActionVNode&&this.firstActionVNode.componentOptions){var e=this.firstActionVNode.componentOptions.tag;if("ActionLink"===e)return{is:"a",href:this.firstAction.href,target:this.firstAction.target,"aria-label":this.firstAction.ariaLabel};if("ActionRouter"===e)return{is:"router-link",to:this.firstAction.to,exact:this.firstAction.exact,"aria-label":this.firstAction.ariaLabel};if("ActionButton"===e)return{is:"button","aria-label":this.firstAction.ariaLabel}}return null},firstActionEvent:function(){var e,t,n;return null===(e=this.firstActionVNode)||void 0===e||null===(t=e.componentOptions)||void 0===t||null===(n=t.listeners)||void 0===n?void 0:n.click},firstActionEventBinding:function(){return this.firstActionEvent?"click":null},firstActionIconSlot:function(){var e,t;return null===(e=this.firstAction)||void 0===e||null===(t=e.$slots)||void 0===t?void 0:t.icon},firstActionClass:function(){var e=this.firstActionVNode&&this.firstActionVNode.data.staticClass,t=this.firstActionVNode&&this.firstActionVNode.data.class;return"".concat(e," ").concat(t)},iconSlotIsPopulated:function(){return!!this.$slots.icon}},watch:{open:function(e){e!==this.opened&&(this.opened=e)}},beforeMount:function(){this.initActions(),Object(o.a)(this.$slots.default,c,this)},beforeUpdate:function(){this.initActions(),Object(o.a)(this.$slots.default,c,this)},methods:{openMenu:function(e){this.opened||(this.opened=!0,this.$emit("update:open",!0),this.$emit("open"),this.onOpen(e))},closeMenu:function(e){this.opened&&(this.opened=!1,this.$emit("update:open",!1),this.$emit("close"),this.opened=!1,this.focusIndex=0,this.$refs.menuButton.focus())},onOpen:function(e){var t=this;this.$nextTick((function(){t.focusFirstAction(e)}))},onMouseFocusAction:function(e){if(document.activeElement!==e.target){var t=e.target.closest("li");if(t){var n=t.querySelector(".focusable");if(n){var r=function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/t.default=r.a},,,,,,,,,function(e,t,n){"use strict";var r=n(0),s=n.n(r),o=n(1),a=n.n(o),i=n(4),l=n.n(i),c=n(8),u=n(9),m=n(10),p=n(11),d=a()(s.a),f=l()(c.a),g=l()(u.a),A=l()(m.a),h=l()(p.a);d.push([e.i,'@font-face{font-family:"iconfont-vue-e08a231";src:url('+f+");src:url("+f+') format("embedded-opentype"),url('+g+') format("woff"),url('+A+') format("truetype"),url('+h+') format("svg")}.icon[data-v-3e0b109b]{font-style:normal;font-weight:400}.icon.arrow-left-double[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-left[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right-double[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.arrow-right[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.breadcrumb[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.checkmark[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.close[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.confirm[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.info[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.menu[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.more[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.pause[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.play[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.triangle-s[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-away[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-dnd[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-invisible[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.icon.user-status-online[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";content:""}.modal-mask[data-v-3e0b109b]{position:fixed;z-index:9998;top:0;left:0;display:block;width:100%;height:100%;background-color:rgba(0,0,0,0.5)}.modal-mask--dark[data-v-3e0b109b]{background-color:rgba(0,0,0,0.92)}.modal-header[data-v-3e0b109b]{position:absolute;z-index:10001;top:0;right:0;left:0;display:flex !important;align-items:center;justify-content:center;width:100%;height:50px;transition:opacity 250ms, visibility 250ms}.modal-header.invisible[style*=\'display:none\'][data-v-3e0b109b],.modal-header.invisible[style*=\'display: none\'][data-v-3e0b109b]{visibility:hidden}.modal-header .modal-title[data-v-3e0b109b]{overflow-x:hidden;box-sizing:border-box;width:100%;padding:0 132px 0 12px;transition:padding ease 100ms;white-space:nowrap;text-overflow:ellipsis;color:#fff;font-size:14px}@media only screen and (min-width: 512px){.modal-header .modal-title[data-v-3e0b109b]{text-align:center;padding-left:132px}}.modal-header .icons-menu[data-v-3e0b109b]{position:absolute;right:0;display:flex;align-items:center;justify-content:flex-end}.modal-header .icons-menu .icon-close[data-v-3e0b109b]{box-sizing:border-box;margin:3px;padding:10px 11px;color:#fff;background-image:none;font-size:23px}.modal-header .icons-menu .icon-close[data-v-3e0b109b]:before{font-family:"iconfont-vue-e08a231";font-style:normal;font-weight:400;content:""}.modal-header .icons-menu .play-pause[data-v-3e0b109b]{position:relative;width:50px;height:50px;margin:0;padding:0;cursor:pointer;color:white;border:none;background-color:transparent;font-size:22px}.modal-header .icons-menu .play-pause:hover .icon-play[data-v-3e0b109b],.modal-header .icons-menu .play-pause:hover .icon-pause[data-v-3e0b109b],.modal-header .icons-menu .play-pause:focus .icon-play[data-v-3e0b109b],.modal-header .icons-menu .play-pause:focus .icon-pause[data-v-3e0b109b]{opacity:1;border-radius:22px;background-color:rgba(127,127,127,0.25)}.modal-header .icons-menu .play-pause .icon-play[data-v-3e0b109b],.modal-header .icons-menu .play-pause .icon-pause[data-v
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/function m(e,t){var n,r,s,o=t;this.start=function(){s=!0,r=new Date,n=setTimeout(e,o)},this.pause=function(){s=!1,clearTimeout(n),o-=new Date-r},this.clear=function(){s=!1,clearTimeout(n),o=0},this.getTimeLeft=function(){return s&&(this.pause(),this.start()),o},this.getStateRunning=function(){return s},this.start()}var p={name:"Modal",components:{Actions:a.default,ActionButton:i.default},directives:{tooltip:u.default},mixins:[l.a],props:{title:{type:String,default:""},hasPrevious:{type:Boolean,default:!1},hasNext:{type:Boolean,default:!1},outTransition:{type:Boolean,default:!1},enableSlideshow:{type:Boolean,default:!1},clearViewDelay:{type:Number,default:5e3},slideshowDelay:{type:Number,default:3e3},slideshowPaused:{type:Boolean,default:!1},enableSwipe:{type:Boolean,default:!0},spreadNavigation:{type:Boolean,default:!1},size:{type:String,default:"normal",validator:function(e){return-1!==["normal","large","full"].indexOf(e)}},canClose:{type:Boolean,default:!0},dark:{type:Boolean,default:!1},container:{type:String,default:"body"}},data:function(){return{mc:null,showModal:!1,clearView:!1,clearViewTimeout:null,playing:!1,slideshowTimeout:null}},computed:{modalTransitionName:function(){return"modal-".concat(this.outTransition?"out":"in")},playPauseTitle:function(){return this.playing?Object(c.b)("Pause slideshow"):Object(c.b)("Start slideshow")}},watch:{slideshowPaused:function(e){this.slideshowTimeout&&(e?this.slideshowTimeout.pause():this.slideshowTimeout.start())}},beforeMount:function(){window.addEventListener("keydown",this.handleKeydown)},beforeDestroy:function(){window.removeEventListener("keydown",this.handleKeydown),this.mc.off("swipeleft swiperight"),this.mc.destroy()},mounted:function(){var e=this;this.showModal=!0,this.handleMouseMove(),this.mc=new o.a(this.$refs.mask),this.mc.on("swipeleft swiperight",(function(t){e.handleSwipe(t)})),"body"===this.container?document.body.insertBefore(this.$el,document.body.lastChild):document.querySelector(this.container).appendChild(this.$el)},destroyed:function(){this.$el.remove()},methods:{previous:function(e){this.hasPrevious&&(e&&this.resetSlideshow(),this.$emit("previous",e))},next:function(e){this.hasNext&&(e&&this.resetSlideshow(),this.$emit("next",e))},close:function(e){var t=this;this.canClose&&(this.showModal=!1,setTimeout((function(){t.$emit("close",e)}),300))},handleKeydown:function(e){switch(e.keyCode){case 37:this.previous(e);break;case 13:case 39:this.next(e);break;case 27:this.close(e)}},handleSwipe:function(e){this.enableSwipe&&("swipeleft"===e.type?this.next(e):"swiperight"===e.type&&this.previous(e))},handleMouseMove:function(){var e=this;this.clearViewDelay>0&&(this.clearView=!1,clearTimeout(this.clearViewTimeout),this.clearViewTimeout=setTimeout((function(){e.clearView=!0}),this.clearViewDelay))},togglePlayPause:function(){this.playing=!this.playing,this.playing?this.handleSlideshow():this.clearSlideshowTimeout()},resetSlideshow:function(){this.playing=!this.playing,this.clearSlideshowTimeout(),this.$nextTick((function(){this.togglePlayPause()}))},handleSlideshow:function(){var e=this;this.playing=!0,this.hasNext?this.slideshowTimeout=new m((function(){e.next(),e.handleSlideshow()}),this.slideshowDelay):(this.playing=!1,this.clearSlideshowTimeout())},clearSlideshowTimeout:function(){this.slideshowTimeout&&this.slideshowTimeout.clear()}}},d=n(2),f=n.n(d),g=n(119),A=(f()(g.a,{insert:"head",singleton:!1}),g.a.locals,n(3)),h=n(120),v=n.n(h),y=Object(A.a)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"fade"}},[n("div",{ref:"mask",staticClass:"modal-mask",class:{"modal-mask--dark":e.dark},on:{click:e.handleMouseMove,mousemove:e.handleMouseMove,touchmove:e.handleMouseMove}},[n("transition",{attrs:{name:"fade-visibility"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:!e.clearView,expression:"!clearView"}],staticClass:"modal-header",class:{invisible:e.clearView}},[""!==e.title.trim()?n("div",{staticClass:"modal-title"},[e._v("\n\t\t\t\t\t"+e._s(e.title)+"\n\t\t\t\t")]):e._e(),e._v(" "),n("div",{staticC
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/Object(r.a)(b),t.default=b}])},,,,function(e,t,n){var r;
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */!function(s,o,a,i){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),m=Math.round,p=Math.abs,d=Date.now;function f(e,t,n){return setTimeout(C(e,n),t)}function g(e,t,n){return!!Array.isArray(e)&&(A(e,n[t],n),!0)}function A(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function h(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=s.console&&(s.console.warn||s.console.log);return o&&o.call(s.console,r,n),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var s in r)r.hasOwnProperty(s)&&(t[s]=r[s])}return t}:Object.assign;var v=h((function(e,t,n){for(var r=Object.keys(t),s=0;s<r.length;)(!n||n&&void 0===e[r[s]])&&(e[r[s]]=t[r[s]]),s++;return e}),"extend","Use `assign`."),y=h((function(e,t){return v(e,t,!0)}),"merge","Use `assign`.");function b(e,t,n){var r,s=t.prototype;(r=e.prototype=Object.create(s)).constructor=e,r._super=s,n&&l(r,n)}function C(e,t){return function(){return e.apply(t,arguments)}}function w(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function x(e,t){return void 0===e?t:e}function T(e,t,n){A(M(t),(function(t){e.addEventListener(t,n,!1)}))}function E(e,t,n){A(M(t),(function(t){e.removeEventListener(t,n,!1)}))}function k(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function M(e){return e.trim().split(/\s+/g)}function j(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function P(e){return Array.prototype.slice.call(e,0)}function _(e,t,n){for(var r=[],s=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];j(s,a)<0&&r.push(e[o]),s[o]=a,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function B(e,t){for(var n,r,s=t[0].toUpperCase()+t.slice(1),o=0;o<c.length;){if((r=(n=c[o])?n+s:t)in e)return r;o++}}var N=1;function I(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||s}var L="ontouchstart"in s,F=void 0!==B(s,"PointerEvent"),O=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),D=["x","y"],U=["clientX","clientY"];function z(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){w(e.options.enable,[e])&&n.handler(t)},this.init()}function R(e,t,n){var r=n.pointers.length,s=n.changedPointers.length,o=1&t&&r-s==0,a=12&t&&r-s==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,s=r.length;n.firstInput||(n.firstInput=$(t));s>1&&!n.firstMultiple?n.firstMultiple=$(t):1===s&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,i=a?a.center:o.center,l=t.center=G(r);t.timeStamp=d(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=W(i,l),t.distance=H(i,l),function(e,t){var n=t.center,r=e.offsetDelta||{},s=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(s=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=s.x+(n.x-r.x),t.deltaY=s.y+(n.y-r.y)}(n,t),t.offsetDirection=Y(t.deltaX,t.deltaY);var c=Q(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=p(c.x)>p(c.y)?c.x:c.y,t.scale=a?(u=a.pointers,m=r,H(m[0],m[1],U)/H(u[0],u[1],U)):1,t.rotation=a?function(e,t){return W(t[1],t[0],U)+W(e[1],e[0],U)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,s,o,a=e.lastInterval||t,i=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(i>25||void 0===a.velocity)){var l
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
const c=function(){var e,t,n,r;const s=(null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.App)||void 0===n||null===(r=n.currentFileList)||void 0===r?void 0:r.dirInfo)||{path:"/",name:""};return"".concat(s.path,"/").concat(s.name).replace(/\/\//gi,"/")};var u=r(36),m=r.n(u),p=r(21),d=r(132),f=r(140),g=r.n(f),A=r(276),h=r.n(A);var v={name:"TemplatePreview",inheritAttrs:!1,props:{basename:{type:String,required:!0},checked:{type:Boolean,default:!1},fileid:{type:[String,Number],required:!0},filename:{type:String,required:!0},previewUrl:{type:String,default:null},hasPreview:{type:Boolean,default:!0},mime:{type:String,required:!0},ratio:{type:Number,default:null}},data:()=>({failedPreview:!1}),computed:{nameWithoutExt(){return this.basename.indexOf(".")>-1?this.basename.split(".").slice(0,-1).join("."):this.basename},id(){return"template-picker-".concat(this.fileid)},realPreviewUrl(){return this.failedPreview&&this.mimeIcon?this.mimeIcon:this.previewUrl?this.previewUrl:Object(l.getCurrentUser)()?Object(i.generateUrl)("/core/preview?fileId=".concat(this.fileid,"&x=").concat(256,"&y=").concat(256,"&a=1")):Object(i.generateUrl)("/apps/files_sharing/publicpreview/".concat(document.getElementById("sharingToken")&&document.getElementById("sharingToken").value,"?fileId=").concat(this.fileid,"&file=").concat(function(e){const t=(e.startsWith("/")?e:"/".concat(e)).split("/");let n="";return t.forEach(e=>{""!==e&&(n+="/"+encodeURIComponent(e))}),n}(this.filename),"&x=").concat(256,"&y=").concat(256,"&a=1"))},mimeIcon(){return OC.MimeType.getIconUrl(this.mime)}},methods:{onCheck(){this.$emit("check",this.fileid)},onFailure(){this.failedPreview=!0}}},y=r(78),b=r.n(y),C=r(241),w={insert:"head",singleton:!1},x=(b()(C.a,w),C.a.locals,r(22)),T=Object(x.a)(v,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("li",{staticClass:"template-picker__item"},[n("input",{staticClass:"radio",attrs:{id:e.id,type:"radio",name:"template-picker"},domProps:{checked:e.checked},on:{change:e.onCheck}}),e._v(" "),n("label",{staticClass:"template-picker__label",attrs:{for:e.id}},[n("div",{staticClass:"template-picker__preview",class:e.failedPreview?"template-picker__preview--failed":""},[n("img",{staticClass:"template-picker__image",attrs:{src:e.realPreviewUrl,alt:"",draggable:"false"},on:{error:e.onFailure}})]),e._v(" "),n("span",{staticClass:"template-picker__title"},[e._v("\n\t\t\t"+e._s(e.nameWithoutExt)+"\n\t\t")])])])}),[],!1,null,"5a6ba030",null).exports;var E={name:"TemplatePicker",components:{EmptyContent:g.a,Modal:h.a,TemplatePreview:T},props:{logger:{type:Object,required:!0}},data:()=>({checked:-1,loading:!1,name:null,opened:!1,provider:null}),computed:{nameWithoutExt(){return this.name.indexOf(".")>-1?this.name.split(".").slice(0,-1).join("."):this.name},emptyTemplate(){var e,n;return{basename:t("files","Blank"),fileid:-1,filename:this.t("files","Blank"),hasPreview:!1,mime:(null===(e=this.provider)||void 0===e?void 0:e.mimetypes[0])||(null===(n=this.provider)||void 0===n?void 0:n.mimetypes)}},selectedTemplate(){return this.provider.templates.find(e=>e.fileid===this.checked)},style(){return{"--margin":"8px","--width":"160px","--border":"2px","--fullwidth":"180px","--height":this.provider.ratio?Math.round(160/this.provider.ratio)+"px":null}}},methods:{async open(e,t){this.checked=this.emptyTemplate.fileid,this.name=e,this.provider=t;const n=(await async function(){return(await m.a.get(Object(i.generateOcsUrl)("apps/files/api/v1",2)+"templates")).data.ocs.data}()).find(e=>e.app===t.app&&e.label===t.label);if(null===n)throw new Error("Failed to match provider in results");this.provider=n,0!==n.templates.length?this.opened=!0:this.onSubmit()},close(){this.checked=this.emptyTemplate.fileid,this.loading=!1,this.name=null,this.opened=!1,this.provider=null},onCheck(e){this.checked=e},async onSubmit(){var e,t,n;this.loading=!0;const r=c(),s=null===(e=OCA)||void 0===e||null===(t=e.Files)||void 0===t||null===(n=t.App)||void 0===n?void 0:n.currentFileList;try{var o,a;const e=(await m.a.post(Object(i.generateOcsUrl)("apps/files
/**
* @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
const j=Object(s.getLoggerBuilder)().setApp("files").detectUser().build();p.default.mixin({methods:{t:a.translate,n:a.translatePlural}});const P=document.createElement("div");P.id="template-picker",document.body.appendChild(P);let _=Object(o.loadState)("files","templates",[]),B=Object(o.loadState)("files","templates_path",!1);j.debug("Templates providers",_),j.debug("Templates folder",{templatesPath:B});const N=new(p.default.extend(M))({name:"TemplatePicker",propsData:{logger:j}});N.$mount("#template-picker"),window.addEventListener("DOMContentLoaded",(function(){if(!B){j.debug("Templates folder not initialized");const e={attach(e){e.addMenuEntry({id:"template-init",displayName:Object(a.translate)("files","Set up templates folder"),templateName:Object(a.translate)("files","Templates"),iconClass:"icon-template-add",fileType:"file",actionHandler(t){I(t),e.removeMenuEntry("template-init")}})}};OC.Plugins.register("OCA.Files.NewFileMenu",e)}})),_.forEach((e,t)=>{const n={attach(n){const r=n.fileList;"files"!==r.id&&"files.public"!==r.id||n.addMenuEntry({id:"template-new-".concat(e.app,"-").concat(t),displayName:e.label,templateName:e.label+e.extension,iconClass:e.iconClass||"icon-file",fileType:"file",actionHandler(t){N.open(t,e)}})}};OC.Plugins.register("OCA.Files.NewFileMenu",n)});const I=async function(e){const t=(c()+"/".concat(e)).replace("//","/");try{j.debug("Initializing the templates directory",{templatePath:t});const e=await m.a.post(Object(i.generateOcsUrl)("apps/files/api/v1/templates",2)+"path",{templatePath:t,copySystemTemplates:!0});OCA.Files.App.currentFileList.changeDirectory(t,!0,!0),_=e.data.ocs.data.templates,B=e.data.ocs.data.template_path}catch(e){j.error("Unable to initialize the templates directory"),Object(d.b)(Object(a.translate)("files","Unable to initialize the templates directory"))}}}]);
//# sourceMappingURL=templates.js.map