mirror of
https://github.com/nextcloud/server.git
synced 2025-01-30 22:37:01 +00:00
f8de5a73a7
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2 lines
No EOL
86 KiB
JavaScript
2 lines
No EOL
86 KiB
JavaScript
(()=>{"use strict";var e,n,r,o={68587:(e,n,r)=>{var o=r(21777),a=r(85471);async function i(){const t=[...document.head.querySelectorAll("link.theme")].map((t=>new Promise((e=>{const n=new URL(t.href);n.searchParams.set("v",Date.now());const r=t.cloneNode();r.href=n.toString(),r.onload=()=>{t.remove(),e()},document.head.append(r)}))));await Promise.allSettled(t)}var l=r(63814),s=r(32981),c=r(65043),d=r(32073),u=r(88837),p=r(85168),h=r(17334),g=r.n(h),m=r(56798),f=r(54373);const v={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var A=r(14486);const b=(0,A.A)(v,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-edit-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M21 5C21 3.9 20.1 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H11V19.1L12.1 18H5L8.5 13.5L11 16.5L14.5 12L16.1 14.1L21 9.1V5Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,C={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},y=(0,A.A)(C,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon palette-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,_=(0,s.C)("theming","shippedBackgrounds"),w=(0,s.C)("theming","userBackgroundImage"),{backgroundImage:k,backgroundMime:x,defaultShippedBackground:S}=(0,s.C)("theming","themingDefaults"),D=t=>(0,l.fg)("theming","","img/background/")+t,E={name:"BackgroundSettings",components:{Check:f.A,ColorPalette:y,ImageEdit:b,NcColorPicker:m.A},data:()=>({loading:!1,Theming:(0,s.C)("theming","data",{}),backgroundImage:w}),computed:{shippedBackgrounds(){return Object.keys(_).filter((t=>t!==S||!this.isGlobalBackgroundDefault)).map((t=>({name:t,url:D(t),preview:D("preview/"+t),details:_[t]})))},isGlobalBackgroundDefault:()=>""===x,isGlobalBackgroundDeleted:()=>"backgroundColor"===x,cssDefaultBackgroundImage:()=>`url('${k}')`},methods:{invertTextColor(t){return this.calculateLuma(t)>.6},calculateLuma(t){const[e,n,r]=this.hexToRGB(t);return(.2126*e+.7152*n+.0722*r)/255},hexToRGB(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null},async update(t){this.backgroundImage=t.backgroundImage,this.Theming.backgroundColor=t.backgroundColor,this.$emit("update:background"),this.loading=!1},async setDefault(){this.loading="default";const t=await c.Ay.post((0,l.Jv)("/apps/theming/background/default"));this.update(t.data)},async setShipped(t){this.loading=t;const e=await c.Ay.post((0,l.Jv)("/apps/theming/background/shipped"),{value:t});this.update(e.data)},async setFile(t){this.loading="custom";const e=await c.Ay.post((0,l.Jv)("/apps/theming/background/custom"),{value:t});this.update(e.data)},async removeBackground(){this.loading="remove";const t=await c.Ay.delete((0,l.Jv)("/apps/theming/background/custom"));this.update(t.data)},async pickColor(t){this.loading="color";const{data:e}=await c.Ay.post((0,l.Jv)("/apps/theming/background/color"),{color:t||"#0082c9"});this.update(e)},debouncePickColor:g()((function(){this.pickColor(...arguments)}),200),pickFile(){(0,p.a1)(t("theming","Select a background from your files")).allowDirectories(!1).setMimeTypeFilter(["image/png","image/gif","image/jpeg","image/svg+xml","image/svg"]).setMultiSelect(!1).addButton({id:"select",label:t("theming","Select background"),callback:t=>{this.applyFile(t[0]?.path)},type:"primary"}).build().pick()},async applyFile(e){if(!e||"string"!=typeof e||0===e.trim().length||"/"===e)return console.error("No valid background have been selected",{path:e}),void(0,p.Qg)(t("theming","No background has been selected"));this.loading="custom",this.setFile(e)}}},T=()=>{(0,a.$9)(((t,e)=>({"05e06a8e":t.cssDefaultBackgroundImage})))},I=E.setup;E.setup=I?(t,e)=>(T(),I(t,e)):T;const N=E;var B=r(85072),O=r.n(B),P=r(97825),M=r.n(P),L=r(77659),F=r.n(L),R=r(55056),U=r.n(R),Y=r(10540),j=r.n(Y),z=r(41113),H=r.n(z),$=r(6091),G={};G.styleTagTransform=H(),G.setAttributes=U(),G.insert=F().bind(null,"head"),G.domAPI=M(),G.insertStyleElement=j(),O()($.A,G),$.A&&$.A.locals&&$.A.locals;const X=(0,A.A)(N,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[e("button",{class:{"icon-loading":"custom"===t.loading,"background background__filepicker":!0,"background--active":"custom"===t.backgroundImage},attrs:{"aria-pressed":"custom"===t.backgroundImage,"data-user-theming-background-custom":"",tabindex:"0"},on:{click:t.pickFile}},[t._v("\n\t\t"+t._s(t.t("theming","Custom background"))+"\n\t\t"),"custom"!==t.backgroundImage?e("ImageEdit",{attrs:{size:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1),t._v(" "),e("NcColorPicker",{on:{"update:value":t.debouncePickColor},model:{value:t.Theming.backgroundColor,callback:function(e){t.$set(t.Theming,"backgroundColor",e)},expression:"Theming.backgroundColor"}},[e("button",{class:{"icon-loading":"color"===t.loading,"background background__color":!0,"background--active":"color"===t.backgroundImage},style:{backgroundColor:t.Theming.backgroundColor,"--border-color":t.Theming.backgroundColor},attrs:{"aria-pressed":"color"===t.backgroundImage,"data-color":t.Theming.backgroundColor,"data-color-bright":t.invertTextColor(t.Theming.backgroundColor),"data-user-theming-background-color":"",tabindex:"0"},on:{click:function(e){"color"!==t.backgroundImage&&t.debouncePickColor(t.Theming.backgroundColor)}}},[t._v("\n\t\t\t"+t._s(t.t("theming","Plain background"))+"\n\t\t\t"),"color"!==t.backgroundImage?e("ColorPalette",{attrs:{size:20}}):t._e(),t._v(" "),e("Check",{attrs:{size:44}})],1)]),t._v(" "),e("button",{class:{"icon-loading":"default"===t.loading,"background background__default":!0,"background--active":"default"===t.backgroundImage},style:{"--border-color":t.Theming.defaultBackgroundColor},attrs:{"aria-pressed":"default"===t.backgroundImage,"data-color-bright":t.invertTextColor(t.Theming.defaultBackgroundColor),"data-user-theming-background-default":"",tabindex:"0"},on:{click:t.setDefault}},[t._v("\n\t\t"+t._s(t.t("theming","Default background"))+"\n\t\t"),e("Check",{attrs:{size:44}})],1),t._v(" "),t._l(t.shippedBackgrounds,(function(n){return e("button",{key:n.name,class:{"background background__shipped":!0,"icon-loading":t.loading===n.name,"background--active":t.backgroundImage===n.name},style:{backgroundImage:"url("+n.preview+")","--border-color":n.details.primary_color},attrs:{title:n.details.attribution,"aria-label":n.details.description,"aria-pressed":t.backgroundImage===n.name,"data-color-bright":t.invertTextColor(n.details.background_color),"data-user-theming-background-shipped":n.name,tabindex:"0"},on:{click:function(e){return t.setShipped(n.name)}}},[e("Check",{attrs:{size:44}})],1)}))],2)}),[],!1,null,"7cc51a4f",null).exports,W={name:"ItemPreview",components:{NcCheckboxRadioSwitch:d.A},props:{enforced:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},theme:{type:Object,required:!0},type:{type:String,default:""},unique:{type:Boolean,default:!1}},computed:{switchType(){return this.unique?"switch":"radio"},name(){return this.unique?null:this.type},img(){return(0,l.fg)("theming","img",this.theme.id+".jpg")},checked:{get(){return this.selected},set(t){this.enforced||(console.debug("Changed theme",this.theme.id,t),this.unique?this.$emit("change",{enabled:!0===t,id:this.theme.id}):this.$emit("change",{enabled:!0,id:this.theme.id}))}}},methods:{onToggle(){this.enforced||("radio"!==this.switchType?this.checked=!this.checked:this.checked=!0)}}};var q=r(37499),K={};K.styleTagTransform=H(),K.setAttributes=U(),K.insert=F().bind(null,"head"),K.domAPI=M(),K.insertStyleElement=j(),O()(q.A,K),q.A&&q.A.locals&&q.A.locals;const V=(0,A.A)(W,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"theming__preview",class:"theming__preview--"+t.theme.id},[e("div",{staticClass:"theming__preview-image",style:{backgroundImage:"url("+t.img+")"},on:{click:t.onToggle}}),t._v(" "),e("div",{staticClass:"theming__preview-description"},[e("h3",[t._v(t._s(t.theme.title))]),t._v(" "),e("p",{staticClass:"theming__preview-explanation"},[t._v("\n\t\t\t"+t._s(t.theme.description)+"\n\t\t")]),t._v(" "),t.enforced?e("span",{staticClass:"theming__preview-warning",attrs:{role:"note"}},[t._v("\n\t\t\t"+t._s(t.t("theming","Theme selection is enforced"))+"\n\t\t")]):t._e(),t._v(" "),e("NcCheckboxRadioSwitch",{directives:[{name:"show",rawName:"v-show",value:!t.enforced,expression:"!enforced"}],staticClass:"theming__preview-toggle",attrs:{checked:t.checked,disabled:t.enforced,name:t.name,type:t.switchType},on:{"update:checked":function(e){t.checked=e}}},[t._v("\n\t\t\t"+t._s(t.theme.enableLabel)+"\n\t\t")])],1)])}),[],!1,null,"fcbd7e50",null).exports;var Q=r(53334),J=r(13073),Z=r(59271);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(){return nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},nt.apply(this,arguments)}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){et(t,e,n[e])}))}return t}function ot(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var at=ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),it=ot(/Edge/i),lt=ot(/firefox/i),st=ot(/safari/i)&&!ot(/chrome/i)&&!ot(/android/i),ct=ot(/iP(ad|od|hone)/i),dt=ot(/chrome/i)&&ot(/android/i),ut={capture:!1,passive:!1};function pt(t,e,n){t.addEventListener(e,n,!at&&ut)}function ht(t,e,n){t.removeEventListener(e,n,!at&&ut)}function gt(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function mt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ft(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&>(t,e):gt(t,e))||r&&t===n)return t;if(t===n)break}while(t=mt(t))}return null}var vt,At=/\s+/g;function bt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(At," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(At," ")}}function Ct(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function yt(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Ct(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function _t(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function wt(){return document.scrollingElement||document.documentElement}function kt(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var a,i,l,s,c,d,u;if(t!==window&&t!==wt()?(i=(a=t.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,d=a.height,u=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!at))do{if(o&&o.getBoundingClientRect&&("none"!==Ct(o,"transform")||n&&"static"!==Ct(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(Ct(o,"border-top-width")),l-=p.left+parseInt(Ct(o,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(o=o.parentNode);if(r&&t!==window){var h=yt(o||t),g=h&&h.a,m=h&&h.d;h&&(s=(i/=m)+(d/=m),c=(l/=g)+(u/=g))}return{top:i,left:l,bottom:s,right:c,width:u,height:d}}}function xt(t,e,n){for(var r=It(t,!0),o=kt(t)[e];r;){var a=kt(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===wt())break;r=It(r,!1)}return!1}function St(t,e,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Ne.ghost&&a[o]!==Ne.dragged&&ft(a[o],n.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function Dt(t,e){for(var n=t.lastElementChild;n&&(n===Ne.ghost||"none"===Ct(n,"display")||e&&!gt(n,e));)n=n.previousElementSibling;return n||null}function Et(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ne.clone||e&&!gt(t,e)||n++;return n}function Tt(t){var e=0,n=0,r=wt();if(t)do{var o=yt(t),a=o.a,i=o.d;e+=t.scrollLeft*a,n+=t.scrollTop*i}while(t!==r&&(t=t.parentNode));return[e,n]}function It(t,e){if(!t||!t.getBoundingClientRect)return wt();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Ct(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return wt();if(r||e)return n;r=!0}}}while(n=n.parentNode);return wt()}function Nt(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function Bt(t,e){return function(){if(!vt){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),vt=setTimeout((function(){vt=void 0}),e)}}}function Ot(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Pt(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var Mt="Sortable"+(new Date).getTime();var Lt=[],Ft={initializeByDefault:!0},Rt={mount:function(t){for(var e in Ft)Ft.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ft[e]);Lt.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";Lt.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](rt({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](rt({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in Lt.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var a=new r(t,e,t.options);a.sortable=t,a.options=t.options,t[o]=a,nt(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);void 0!==a&&(t.options[o]=a)}},getEventProperties:function(t,e){var n={};return Lt.forEach((function(r){"function"==typeof r.eventProperties&&nt(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Lt.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var Ut=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(n,["evt"]);Rt.pluginEvent.bind(Ne)(t,e,rt({dragEl:jt,parentEl:zt,ghostEl:Ht,rootEl:$t,nextEl:Gt,lastDownEl:Xt,cloneEl:Wt,cloneHidden:qt,dragStarted:le,putSortable:te,activeSortable:Ne.active,originalEvent:r,oldIndex:Kt,oldDraggableIndex:Qt,newIndex:Vt,newDraggableIndex:Jt,hideGhostForTarget:De,unhideGhostForTarget:Ee,cloneNowHidden:function(){qt=!0},cloneNowShown:function(){qt=!1},dispatchSortableEvent:function(t){Yt({sortable:e,name:t,originalEvent:r})}},o))};function Yt(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,a=t.cloneEl,i=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,u=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[Mt]){var m,f=e.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||at||it?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=i||n,m.from=l||n,m.item=o||n,m.clone=a,m.oldIndex=s,m.newIndex=c,m.oldDraggableIndex=d,m.newDraggableIndex=u,m.originalEvent=p,m.pullMode=h?h.lastPutMode:void 0;var A=rt({},g,Rt.getEventProperties(r,e));for(var b in A)m[b]=A[b];n&&n.dispatchEvent(m),f[v]&&f[v].call(e,m)}}(rt({putSortable:te,cloneEl:Wt,targetEl:jt,rootEl:$t,oldIndex:Kt,oldDraggableIndex:Qt,newIndex:Vt,newDraggableIndex:Jt},t))}var jt,zt,Ht,$t,Gt,Xt,Wt,qt,Kt,Vt,Qt,Jt,Zt,te,ee,ne,re,oe,ae,ie,le,se,ce,de,ue,pe=!1,he=!1,ge=[],me=!1,fe=!1,ve=[],Ae=!1,be=[],Ce="undefined"!=typeof document,ye=ct,_e=it||at?"cssFloat":"float",we=Ce&&!dt&&!ct&&"draggable"in document.createElement("div"),ke=function(){if(Ce){if(at)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),xe=function(t,e){var n=Ct(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=St(t,0,e),a=St(t,1,e),i=o&&Ct(o),l=a&&Ct(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+kt(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+kt(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===n[_e]||a&&"none"===n[_e]&&s+c>r)?"vertical":"horizontal"},Se=function(t){function e(t,n){return function(r,o,a,i){var l=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,a,i),n)(r,o,a,i);var s=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},r=t.group;r&&"object"==tt(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},De=function(){!ke&&Ht&&Ct(Ht,"display","none")},Ee=function(){!ke&&Ht&&Ct(Ht,"display","")};Ce&&document.addEventListener("click",(function(t){if(he)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),he=!1,!1}),!0);var Te=function(t){if(jt){var e=function(t,e){var n;return ge.some((function(r){if(!Dt(r)){var o=kt(r),a=r[Mt].options.emptyInsertThreshold,i=t>=o.left-a&&t<=o.right+a,l=e>=o.top-a&&e<=o.bottom+a;return a&&i&&l?n=r:void 0}})),n}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Mt]._onDragOver(n)}}},Ie=function(t){jt&&jt.parentNode[Mt]._isOutsideThisEl(t.target)};function Ne(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=nt({},e),t[Mt]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return xe(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in Rt.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var i in Se(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&we,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?pt(t,"pointerdown",this._onTapStart):(pt(t,"mousedown",this._onTapStart),pt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(pt(t,"dragover",this),pt(t,"dragenter",this)),ge.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),nt(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Ct(t,"display")&&t!==Ne.ghost){r.push({target:t,rect:kt(t)});var e=rt({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=yt(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}}))},addAnimationState:function(t){r.push(t)},removeAnimationState:function(t){r.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(r,{target:t}),1)},animateAll:function(t){var e=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof t&&t());var o=!1,a=0;r.forEach((function(t){var n=0,r=t.target,i=r.fromRect,l=kt(r),s=r.prevFromRect,c=r.prevToRect,d=t.rect,u=yt(r,!0);u&&(l.top-=u.f,l.left-=u.e),r.toRect=l,r.thisAnimationDuration&&Nt(s,l)&&!Nt(i,l)&&(d.top-l.top)/(d.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(d,s,c,e.options)),Nt(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=e.options.animation),e.animate(r,d,l,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),o?n=setTimeout((function(){"function"==typeof t&&t()}),a):"function"==typeof t&&t(),r=[]},animate:function(t,e,n,r){if(r){Ct(t,"transition",""),Ct(t,"transform","");var o=yt(this.el),a=o&&o.a,i=o&&o.d,l=(e.left-n.left)/(a||1),s=(e.top-n.top)/(i||1);t.animatingX=!!l,t.animatingY=!!s,Ct(t,"transform","translate3d("+l+"px,"+s+"px,0)"),function(t){t.offsetWidth}(t),Ct(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Ct(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Ct(t,"transition",""),Ct(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}))}function Be(t,e,n,r,o,a,i,l){var s,c,d=t[Mt],u=d.options.onMove;return!window.CustomEvent||at||it?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=r,s.related=o||e,s.relatedRect=a||kt(e),s.willInsertAfter=l,s.originalEvent=i,t.dispatchEvent(s),u&&(c=u.call(d,s,i)),c}function Oe(t){t.draggable=!1}function Pe(){Ae=!1}function Me(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Le(t){return setTimeout(t,0)}function Fe(t){return clearTimeout(t)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(se=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,jt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,a=t.type,i=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(i||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=r.filter;if(function(t){be.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&be.push(r)}}(n),!jt&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||r.disabled||s.isContentEditable||(l=ft(l,r.draggable,n,!1))&&l.animated||Xt===l)){if(Kt=Et(l),Qt=Et(l,r.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Yt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ut("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=ft(s,r.trim(),n,!1))return Yt({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ut("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!ft(s,r.handle,n,!1)||this._prepareDragStart(t,i,l)}}},_prepareDragStart:function(t,e,n){var r,o=this,a=o.el,i=o.options,l=a.ownerDocument;if(n&&!jt&&n.parentNode===a){var s=kt(n);if($t=a,zt=(jt=n).parentNode,Gt=jt.nextSibling,Xt=n,Zt=i.group,Ne.dragged=jt,ee={target:jt,clientX:(e||t).clientX,clientY:(e||t).clientY},ae=ee.clientX-s.left,ie=ee.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,jt.style["will-change"]="all",r=function(){Ut("delayEnded",o,{evt:t}),Ne.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!lt&&o.nativeDraggable&&(jt.draggable=!0),o._triggerDragStart(t,e),Yt({sortable:o,name:"choose",originalEvent:t}),bt(jt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){_t(jt,t.trim(),Oe)})),pt(l,"dragover",Te),pt(l,"mousemove",Te),pt(l,"touchmove",Te),pt(l,"mouseup",o._onDrop),pt(l,"touchend",o._onDrop),pt(l,"touchcancel",o._onDrop),lt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,jt.draggable=!0),Ut("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(it||at))r();else{if(Ne.eventCanceled)return void this._onDrop();pt(l,"mouseup",o._disableDelayedDrag),pt(l,"touchend",o._disableDelayedDrag),pt(l,"touchcancel",o._disableDelayedDrag),pt(l,"mousemove",o._delayedDragTouchMoveHandler),pt(l,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&pt(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){jt&&Oe(jt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ht(t,"mouseup",this._disableDelayedDrag),ht(t,"touchend",this._disableDelayedDrag),ht(t,"touchcancel",this._disableDelayedDrag),ht(t,"mousemove",this._delayedDragTouchMoveHandler),ht(t,"touchmove",this._delayedDragTouchMoveHandler),ht(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?pt(document,"pointermove",this._onTouchMove):pt(document,e?"touchmove":"mousemove",this._onTouchMove):(pt(jt,"dragend",this),pt($t,"dragstart",this._onDragStart));try{document.selection?Le((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(pe=!1,$t&&jt){Ut("dragStarted",this,{evt:e}),this.nativeDraggable&&pt(document,"dragover",Ie);var n=this.options;!t&&bt(jt,n.dragClass,!1),bt(jt,n.ghostClass,!0),Ne.active=this,t&&this._appendGhost(),Yt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ne){this._lastX=ne.clientX,this._lastY=ne.clientY,De();for(var t=document.elementFromPoint(ne.clientX,ne.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ne.clientX,ne.clientY))!==e;)e=t;if(jt.parentNode[Mt]._isOutsideThisEl(t),e)do{if(e[Mt]&&e[Mt]._onDragOver({clientX:ne.clientX,clientY:ne.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Ee()}},_onTouchMove:function(t){if(ee){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=Ht&&yt(Ht,!0),i=Ht&&a&&a.a,l=Ht&&a&&a.d,s=ye&&ue&&Tt(ue),c=(o.clientX-ee.clientX+r.x)/(i||1)+(s?s[0]-ve[0]:0)/(i||1),d=(o.clientY-ee.clientY+r.y)/(l||1)+(s?s[1]-ve[1]:0)/(l||1);if(!Ne.active&&!pe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Ht){a?(a.e+=c-(re||0),a.f+=d-(oe||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");Ct(Ht,"webkitTransform",u),Ct(Ht,"mozTransform",u),Ct(Ht,"msTransform",u),Ct(Ht,"transform",u),re=c,oe=d,ne=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Ht){var t=this.options.fallbackOnBody?document.body:$t,e=kt(jt,!0,ye,!0,t),n=this.options;if(ye){for(ue=t;"static"===Ct(ue,"position")&&"none"===Ct(ue,"transform")&&ue!==document;)ue=ue.parentNode;ue!==document.body&&ue!==document.documentElement?(ue===document&&(ue=wt()),e.top+=ue.scrollTop,e.left+=ue.scrollLeft):ue=wt(),ve=Tt(ue)}bt(Ht=jt.cloneNode(!0),n.ghostClass,!1),bt(Ht,n.fallbackClass,!0),bt(Ht,n.dragClass,!0),Ct(Ht,"transition",""),Ct(Ht,"transform",""),Ct(Ht,"box-sizing","border-box"),Ct(Ht,"margin",0),Ct(Ht,"top",e.top),Ct(Ht,"left",e.left),Ct(Ht,"width",e.width),Ct(Ht,"height",e.height),Ct(Ht,"opacity","0.8"),Ct(Ht,"position",ye?"absolute":"fixed"),Ct(Ht,"zIndex","100000"),Ct(Ht,"pointerEvents","none"),Ne.ghost=Ht,t.appendChild(Ht),Ct(Ht,"transform-origin",ae/parseInt(Ht.style.width)*100+"% "+ie/parseInt(Ht.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;Ut("dragStart",this,{evt:t}),Ne.eventCanceled?this._onDrop():(Ut("setupClone",this),Ne.eventCanceled||((Wt=Pt(jt)).draggable=!1,Wt.style["will-change"]="",this._hideClone(),bt(Wt,this.options.chosenClass,!1),Ne.clone=Wt),n.cloneId=Le((function(){Ut("clone",n),Ne.eventCanceled||(n.options.removeCloneOnHide||$t.insertBefore(Wt,jt),n._hideClone(),Yt({sortable:n,name:"clone"}))})),!e&&bt(jt,o.dragClass,!0),e?(he=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ht(document,"mouseup",n._onDrop),ht(document,"touchend",n._onDrop),ht(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,jt)),pt(document,"drop",n),Ct(jt,"transform","translateZ(0)")),pe=!0,n._dragStartId=Le(n._dragStarted.bind(n,e,t)),pt(document,"selectstart",n),le=!0,st&&Ct(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,a=this.el,i=t.target,l=this.options,s=l.group,c=Ne.active,d=Zt===s,u=l.sort,p=te||c,h=this,g=!1;if(!Ae){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),i=ft(i,l.draggable,a,!0),E("dragOver"),Ne.eventCanceled)return g;if(jt.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return I(!1);if(he=!1,c&&!l.disabled&&(d?u||(r=!$t.contains(jt)):te===this||(this.lastPutMode=Zt.checkPull(this,c,jt,t))&&s.checkPut(this,c,jt,t))){if(o="vertical"===this._getDirection(t,i),e=kt(jt),E("dragOverValid"),Ne.eventCanceled)return g;if(r)return zt=$t,T(),this._hideClone(),E("revert"),Ne.eventCanceled||(Gt?$t.insertBefore(jt,Gt):$t.appendChild(jt)),I(!0);var m=Dt(a,l.draggable);if(!m||function(t,e,n){var r=kt(Dt(n.el,n.options.draggable));return e?t.clientX>r.right+10||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+10}(t,o,this)&&!m.animated){if(m===jt)return I(!1);if(m&&a===t.target&&(i=m),i&&(n=kt(i)),!1!==Be($t,a,jt,e,i,n,t,!!i))return T(),a.appendChild(jt),zt=a,N(),I(!0)}else if(i.parentNode===a){n=kt(i);var f,v,A,b=jt.parentNode!==a,C=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,a=n?t.width:t.height,i=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return r===i||o===l||r+a/2===i+s/2}(jt.animated&&jt.toRect||e,i.animated&&i.toRect||n,o),y=o?"top":"left",_=xt(i,"top","top")||xt(jt,"top","top"),w=_?_.scrollTop:void 0;if(se!==i&&(v=n[y],me=!1,fe=!C&&l.invertSwap||b),f=function(t,e,n,r,o,a,i,l){var s=r?t.clientY:t.clientX,c=r?n.height:n.width,d=r?n.top:n.left,u=r?n.bottom:n.right,p=!1;if(!i)if(l&&de<c*o){if(!me&&(1===ce?s>d+c*a/2:s<u-c*a/2)&&(me=!0),me)p=!0;else if(1===ce?s<d+de:s>u-de)return-ce}else if(s>d+c*(1-o)/2&&s<u-c*(1-o)/2)return function(t){return Et(jt)<Et(t)?1:-1}(e);return(p=p||i)&&(s<d+c*a/2||s>u-c*a/2)?s>d+c/2?1:-1:0}(t,i,n,o,C?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,fe,se===i),0!==f){var k=Et(jt);do{k-=f,A=zt.children[k]}while(A&&("none"===Ct(A,"display")||A===Ht))}if(0===f||A===i)return I(!1);se=i,ce=f;var x=i.nextElementSibling,S=!1,D=Be($t,a,jt,e,i,n,t,S=1===f);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),Ae=!0,setTimeout(Pe,30),T(),S&&!x?a.appendChild(jt):i.parentNode.insertBefore(jt,S?x:i),_&&Ot(_,0,w-_.scrollTop),zt=jt.parentNode,void 0===v||fe||(de=Math.abs(v-kt(i)[y])),N(),I(!0)}if(a.contains(jt))return I(!1)}return!1}function E(l,s){Ut(l,h,rt({evt:t,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:u,fromSortable:p,target:i,completed:I,onMove:function(n,r){return Be($t,a,jt,e,n,kt(n),t,r)},changed:N},s))}function T(){E("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function I(e){return E("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(h),h!==p&&(bt(jt,te?te.options.ghostClass:c.options.ghostClass,!1),bt(jt,l.ghostClass,!0)),te!==h&&h!==Ne.active?te=h:h===Ne.active&&te&&(te=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){E("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===jt&&!jt.animated||i===a&&!i.animated)&&(se=null),l.dragoverBubble||t.rootEl||i===document||(jt.parentNode[Mt]._isOutsideThisEl(t.target),!e&&Te(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function N(){Vt=Et(jt),Jt=Et(jt,l.draggable),Yt({sortable:h,name:"change",toEl:a,newIndex:Vt,newDraggableIndex:Jt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ht(document,"mousemove",this._onTouchMove),ht(document,"touchmove",this._onTouchMove),ht(document,"pointermove",this._onTouchMove),ht(document,"dragover",Te),ht(document,"mousemove",Te),ht(document,"touchmove",Te)},_offUpEvents:function(){var t=this.el.ownerDocument;ht(t,"mouseup",this._onDrop),ht(t,"touchend",this._onDrop),ht(t,"pointerup",this._onDrop),ht(t,"touchcancel",this._onDrop),ht(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Vt=Et(jt),Jt=Et(jt,n.draggable),Ut("drop",this,{evt:t}),zt=jt&&jt.parentNode,Vt=Et(jt),Jt=Et(jt,n.draggable),Ne.eventCanceled||(pe=!1,fe=!1,me=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Fe(this.cloneId),Fe(this._dragStartId),this.nativeDraggable&&(ht(document,"drop",this),ht(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),st&&Ct(document.body,"user-select",""),Ct(jt,"transform",""),t&&(le&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Ht&&Ht.parentNode&&Ht.parentNode.removeChild(Ht),($t===zt||te&&"clone"!==te.lastPutMode)&&Wt&&Wt.parentNode&&Wt.parentNode.removeChild(Wt),jt&&(this.nativeDraggable&&ht(jt,"dragend",this),Oe(jt),jt.style["will-change"]="",le&&!pe&&bt(jt,te?te.options.ghostClass:this.options.ghostClass,!1),bt(jt,this.options.chosenClass,!1),Yt({sortable:this,name:"unchoose",toEl:zt,newIndex:null,newDraggableIndex:null,originalEvent:t}),$t!==zt?(Vt>=0&&(Yt({rootEl:zt,name:"add",toEl:zt,fromEl:$t,originalEvent:t}),Yt({sortable:this,name:"remove",toEl:zt,originalEvent:t}),Yt({rootEl:zt,name:"sort",toEl:zt,fromEl:$t,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:zt,originalEvent:t})),te&&te.save()):Vt!==Kt&&Vt>=0&&(Yt({sortable:this,name:"update",toEl:zt,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:zt,originalEvent:t})),Ne.active&&(null!=Vt&&-1!==Vt||(Vt=Kt,Jt=Qt),Yt({sortable:this,name:"end",toEl:zt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ut("nulling",this),$t=jt=zt=Ht=Gt=Wt=Xt=qt=ee=ne=le=Vt=Jt=Kt=Qt=se=ce=te=Zt=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,be.forEach((function(t){t.checked=!0})),be.length=re=oe=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":jt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)ft(t=n[r],a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||Me(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];ft(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ft(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=Rt.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&Se(n)},destroy:function(){Ut("destroy",this);var t=this.el;t[Mt]=null,ht(t,"mousedown",this._onTapStart),ht(t,"touchstart",this._onTapStart),ht(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ht(t,"dragover",this),ht(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ge.splice(ge.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!qt){if(Ut("hideClone",this),Ne.eventCanceled)return;Ct(Wt,"display","none"),this.options.removeCloneOnHide&&Wt.parentNode&&Wt.parentNode.removeChild(Wt),qt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(qt){if(Ut("showClone",this),Ne.eventCanceled)return;$t.contains(jt)&&!this.options.group.revertClone?$t.insertBefore(Wt,jt):Gt?$t.insertBefore(Wt,Gt):$t.appendChild(Wt),this.options.group.revertClone&&this.animate(jt,Wt),Ct(Wt,"display",""),qt=!1}}else this._hideClone()}},Ce&&pt(document,"touchmove",(function(t){(Ne.active||pe)&&t.cancelable&&t.preventDefault()})),Ne.utils={on:pt,off:ht,css:Ct,find:_t,is:function(t,e){return!!ft(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:Bt,closest:ft,toggleClass:bt,clone:Pt,index:Et,nextTick:Le,cancelNextTick:Fe,detectDirection:xe,getChild:St},Ne.get=function(t){return t[Mt]},Ne.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ne.utils=rt({},Ne.utils,t.utils)),Rt.mount(t)}))},Ne.create=function(t,e){return new Ne(t,e)},Ne.version="1.10.2";var Re,Ue,Ye,je,ze,He,$e=[],Ge=!1;function Xe(){$e.forEach((function(t){clearInterval(t.pid)})),$e=[]}function We(){clearInterval(He)}var qe=Bt((function(t,e,n,r){if(e.scroll){var o,a=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,c=wt(),d=!1;Ue!==n&&(Ue=n,Xe(),Re=e.scroll,o=e.scrollFn,!0===Re&&(Re=It(n,!0)));var u=0,p=Re;do{var h=p,g=kt(h),m=g.top,f=g.bottom,v=g.left,A=g.right,b=g.width,C=g.height,y=void 0,_=void 0,w=h.scrollWidth,k=h.scrollHeight,x=Ct(h),S=h.scrollLeft,D=h.scrollTop;h===c?(y=b<w&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),_=C<k&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(y=b<w&&("auto"===x.overflowX||"scroll"===x.overflowX),_=C<k&&("auto"===x.overflowY||"scroll"===x.overflowY));var E=y&&(Math.abs(A-a)<=l&&S+b<w)-(Math.abs(v-a)<=l&&!!S),T=_&&(Math.abs(f-i)<=l&&D+C<k)-(Math.abs(m-i)<=l&&!!D);if(!$e[u])for(var I=0;I<=u;I++)$e[I]||($e[I]={});$e[u].vx==E&&$e[u].vy==T&&$e[u].el===h||($e[u].el=h,$e[u].vx=E,$e[u].vy=T,clearInterval($e[u].pid),0==E&&0==T||(d=!0,$e[u].pid=setInterval(function(){r&&0===this.layer&&Ne.active._onTouchMove(ze);var e=$e[this.layer].vy?$e[this.layer].vy*s:0,n=$e[this.layer].vx?$e[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Ne.dragged.parentNode[Mt],n,e,t,ze,$e[this.layer].el)||Ot($e[this.layer].el,n,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&p!==c&&(p=It(p,!1)));Ge=d}}),30),Ke=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,i=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||o;i();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Ve(){}function Qe(){}Ve.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=St(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Ke},nt(Ve,{pluginName:"revertOnSpill"}),Qe.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ke},nt(Qe,{pluginName:"removeOnSpill"}),Ne.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?pt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?pt(document,"pointermove",this._handleFallbackAutoScroll):e.touches?pt(document,"touchmove",this._handleFallbackAutoScroll):pt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?ht(document,"dragover",this._handleAutoScroll):(ht(document,"pointermove",this._handleFallbackAutoScroll),ht(document,"touchmove",this._handleFallbackAutoScroll),ht(document,"mousemove",this._handleFallbackAutoScroll)),We(),Xe(),clearTimeout(vt),vt=void 0},nulling:function(){ze=Ue=Re=Ge=He=Ye=je=null,$e.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(r,o);if(ze=t,e||it||at||st){qe(t,this.options,a,e);var i=It(a,!0);!Ge||He&&r===Ye&&o===je||(He&&We(),He=setInterval((function(){var a=It(document.elementFromPoint(r,o),!0);a!==i&&(i=a,Xe()),qe(t,n.options,a,e)}),10),Ye=r,je=o)}else{if(!this.options.bubbleScroll||It(a,!0)===wt())return void Xe();qe(t,this.options,It(a,!1),!1)}}},nt(t,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(Qe,Ve);const Je=Ne;a.Ay.util.warn;var Ze=r(54914),tn=r(39017),en=r(68560),nn=r(70995);const rn=(0,a.pM)({name:"AppOrderSelectorElement",components:{IconArrowDown:tn.A,IconArrowUp:en.A,NcButton:nn.A},props:{ariaDescribedby:{type:String,default:null},ariaDetails:{type:String,default:null},app:{type:Object,required:!0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1}},emits:{"move:up":()=>!0,"move:down":()=>!0,"update:focus":()=>!0},setup(t,e){let{emit:n}=e;const r=(0,a.KR)(),o=(0,a.KR)();let i=0;return{buttonUp:r,buttonDown:o,moveUp:()=>{n("move:up"),i=1},moveDown:()=>{n("move:down"),i=-1},keepFocus:()=>{0!==i&&(1!==i&&!t.isLast||t.isFirst?(0,a.dY)((()=>o.value.$el.focus())):(0,a.dY)((()=>r.value.$el.focus()))),i=0},t:Q.Tl}}});var on=r(56725),an={};an.styleTagTransform=H(),an.setAttributes=U(),an.insert=F().bind(null,"head"),an.domAPI=M(),an.insertStyleElement=j(),O()(on.A,an),on.A&&on.A.locals&&on.A.locals;const ln=(0,A.A)(rn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("li",{class:{"order-selector-element":!0,"order-selector-element--disabled":t.app.default},attrs:{"data-cy-app-order-element":t.app.id},on:{focusin:function(e){return t.$emit("update:focus")}}},[e("svg",{attrs:{width:"20",height:"20",viewBox:"0 0 20 20",role:"presentation"}},[e("image",{staticClass:"order-selector-element__icon",attrs:{preserveAspectRatio:"xMinYMin meet",x:"0",y:"0",width:"20",height:"20","xlink:href":t.app.icon}})]),t._v(" "),e("div",{staticClass:"order-selector-element__label"},[t._v("\n\t\t"+t._s(t.app.label??t.app.id)+"\n\t")]),t._v(" "),e("div",{staticClass:"order-selector-element__actions"},[e("NcButton",{directives:[{name:"show",rawName:"v-show",value:!t.isFirst&&!t.app.default,expression:"!isFirst && !app.default"}],ref:"buttonUp",attrs:{"aria-label":t.t("settings","Move up"),"aria-describedby":t.ariaDescribedby,"aria-details":t.ariaDetails,"data-cy-app-order-button":"up",type:"tertiary-no-background"},on:{click:t.moveUp},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconArrowUp",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isFirst||!!t.app.default,expression:"isFirst || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}}),t._v(" "),e("NcButton",{directives:[{name:"show",rawName:"v-show",value:!t.isLast&&!t.app.default,expression:"!isLast && !app.default"}],ref:"buttonDown",attrs:{"aria-label":t.t("settings","Move down"),"aria-describedby":t.ariaDescribedby,"aria-details":t.ariaDetails,"data-cy-app-order-button":"down",type:"tertiary-no-background"},on:{click:t.moveDown},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconArrowDown",{attrs:{size:20}})]},proxy:!0}])}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isLast||!!t.app.default,expression:"isLast || !!app.default"}],staticClass:"order-selector-element__placeholder",attrs:{"aria-hidden":"true"}})],1)])}),[],!1,null,"e25020e8",null).exports,sn=(0,a.pM)({name:"AppOrderSelector",components:{AppOrderSelectorElement:ln,Fragment:Ze.F},props:{ariaDetails:{type:String,default:null},value:{type:Array,required:!0}},emits:{"update:value":t=>Array.isArray(t)},setup(t,e){let{emit:n}=e;const r=(0,a.KR)(null),o=(0,a.EW)({get:()=>t.value,set:e=>{const r=[...e].sort(((t,n)=>(n.default?1:0)-(t.default?1:0)||e.indexOf(t)-e.indexOf(n)));r.some(((e,n)=>{let{id:r}=e;return r!==t.value[n].id}))?n("update:value",r):i.value+=1}}),i=(0,a.KR)(0);!function(t,e,n={}){let r;const{document:o=J.PWG,...i}=n,l={onUpdate:t=>{!function(t,e,n){const r=(0,a.i9)(t),o=r?[...(0,Z.BA)(t)]:(0,Z.BA)(t);if(n>=0&&n<o.length){const i=o.splice(e,1)[0];(0,a.dY)((()=>{o.splice(n,0,i),r&&(t.value=o)}))}}(e,t.oldIndex,t.newIndex)}},s=()=>{const e="string"==typeof t?null==o?void 0:o.querySelector(t):(0,J.F4c)(t);e&&void 0===r&&(r=new Je(e,{...l,...i}))},c=()=>{null==r||r.destroy(),r=void 0};(0,Z.rd)(s),(0,Z.Uo)(c)}(r,o,{filter:".order-selector-element--disabled"});const l=(0,a.KR)([]);(0,a.$u)((()=>{l.value.forEach((t=>t.keepFocus()))}));const s=(0,a.KR)("");return{appList:o,listElement:r,moveDown:e=>{const r=e>0?t.value.slice(0,e):[];r.push(t.value[e+1]);const o=e<t.value.length-2?t.value.slice(e+2):[];n("update:value",[...r,t.value[e],...o])},moveUp:e=>{const r=e>1?t.value.slice(0,e-1):[];if(t.value[e-1]?.default)return;const o=[t.value[e-1]];e<t.value.length-1&&o.push(...t.value.slice(e+1)),n("update:value",[...r,t.value[e],...o])},statusInfoId:`sorting-status-info-${(Math.random()+1).toString(36).substring(7)}`,statusInfo:s,updateStatusInfo:e=>{s.value=(0,Q.Tl)("theming","Current selected app: {app}, position {position} of {total}",{app:t.value[e].label,position:e+1,total:t.value.length})},renderCount:i,selectorElements:l}}}),cn=sn;var dn=r(42797),un={};un.styleTagTransform=H(),un.setAttributes=U(),un.insert=F().bind(null,"head"),un.domAPI=M(),un.insertStyleElement=j(),O()(dn.A,un),dn.A&&dn.A.locals&&dn.A.locals;var pn=(0,A.A)(cn,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("Fragment",[e("div",{staticClass:"hidden-visually",attrs:{id:t.statusInfoId,"aria-live":"polite",role:"status"}},[t._v("\n\t\t"+t._s(t.statusInfo)+"\n\t")]),t._v(" "),e("ol",{ref:"listElement",staticClass:"order-selector",attrs:{"data-cy-app-order":""}},t._l(t.appList,(function(n,r){return e("AppOrderSelectorElement",t._g({key:`${n.id}${t.renderCount}`,ref:"selectorElements",refInFor:!0,attrs:{app:n,"aria-details":t.ariaDetails,"aria-describedby":t.statusInfoId,"is-first":0===r||!!t.appList[r-1].default,"is-last":r===t.value.length-1}},n.default?{}:{"move:up":()=>t.moveUp(r),"move:down":()=>t.moveDown(r),"update:focus":()=>t.updateStatusInfo(r)}))})),1)])}),[],!1,null,"3c4840b5",null);const hn=pn.exports,gn={name:"UndoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},mn=(0,A.A)(gn,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var fn=r(40083);const vn=(0,a.pM)({name:"UserAppMenuSection",components:{AppOrderSelector:hn,IconUndo:mn,NcButton:nn.A,NcNoteCard:fn.A,NcSettingsSection:u.A},setup(){const{userAppOrder:t,enforcedDefaultApp:e}=(0,s.C)("theming","navigationBar"),n=(0,s.C)("core","apps").filter((t=>{let{type:e}=t;return"link"===e})).map((t=>({...t,label:t.name,default:t.default&&t.id===e}))),r=(0,a.KR)(!Array.isArray(t)||Object.values(t).length>0),o=(0,a.EW)((()=>n.some(((t,e)=>{let{id:n}=t;return n!==h.value[e].id})))),i="theming-apporder-changed-infocard",d="theming-apporder-changed-infocard",u=(0,a.EW)((()=>(o.value?`${i} `:"")+(e?d:""))),h=(0,a.KR)([...n]),g=async(t,e)=>{const n=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:t});return await c.Ay.post(n,{configValue:JSON.stringify(e)})};return{appOrder:h,updateAppOrder:t=>{const e={};t.forEach(((t,n)=>{let{app:r,id:o}=t;e[o]={order:n,app:r}})),g("apporder",e).then((()=>{h.value=t,r.value=!0})).catch((t=>{console.warn("Could not set the app order",t),(0,p.Qg)((0,Q.Tl)("theming","Could not set the app order"))}))},resetAppOrder:async()=>{try{await g("apporder",[]),r.value=!1;const{data:t}=await c.Ay.get((0,l.KT)("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});h.value=t.ocs.data.map((t=>({...t,label:t.name,default:t.default&&t.app===e})))}catch(t){console.warn(t),(0,p.Qg)((0,Q.Tl)("theming","Could not reset the app order"))}},enforcedDefaultApp:e,hasAppOrderChanged:o,hasCustomAppOrder:r,ariaDetailsAppOrder:u,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:d,t:Q.Tl}}}),An=vn;var bn=r(66167),Cn={};Cn.styleTagTransform=H(),Cn.setAttributes=U(),Cn.insert=F().bind(null,"head"),Cn.domAPI=M(),Cn.insertStyleElement=j(),O()(bn.A,Cn),bn.A&&bn.A.locals&&bn.A.locals;const yn=(0,A.A)(An,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("NcSettingsSection",{attrs:{name:t.t("theming","Navigation bar settings")}},[e("p",[t._v("\n\t\t"+t._s(t.t("theming","You can configure the app order used for the navigation bar. The first entry will be the default app, opened after login or when clicking on the logo."))+"\n\t")]),t._v(" "),t.enforcedDefaultApp?e("NcNoteCard",{attrs:{id:t.elementIdEnforcedDefaultApp,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The default app can not be changed because it was configured by the administrator."))+"\n\t")]):t._e(),t._v(" "),t.hasAppOrderChanged?e("NcNoteCard",{attrs:{id:t.elementIdAppOrderChanged,type:"info"}},[t._v("\n\t\t"+t._s(t.t("theming","The app order was changed, to see it in action you have to reload the page."))+"\n\t")]):t._e(),t._v(" "),e("AppOrderSelector",{staticClass:"user-app-menu-order",attrs:{"aria-details":t.ariaDetailsAppOrder,value:t.appOrder},on:{"update:value":t.updateAppOrder}}),t._v(" "),e("NcButton",{attrs:{"data-test-id":"btn-apporder-reset",disabled:!t.hasCustomAppOrder,type:"tertiary"},on:{click:t.resetAppOrder},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset default app order"))+"\n\t")])],1)}),[],!1,null,"08dfaa90",null).exports;var _n={grad:.9,turn:360,rad:360/(2*Math.PI)},wn=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},kn=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},xn=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),t>n?n:t>e?t:e},Sn=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Dn=function(t){return{r:xn(t.r,0,255),g:xn(t.g,0,255),b:xn(t.b,0,255),a:xn(t.a)}},En=function(t){return{r:kn(t.r),g:kn(t.g),b:kn(t.b),a:kn(t.a,3)}},Tn=/^#([0-9a-f]{3,8})$/i,In=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Nn=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,a=Math.max(e,n,r),i=a-Math.min(e,n,r),l=i?a===e?(n-r)/i:a===n?2+(r-e)/i:4+(e-n)/i:0;return{h:60*(l<0?l+6:l),s:a?i/a*100:0,v:a/255*100,a:o}},Bn=function(t){var e=t.h,n=t.s,r=t.v,o=t.a;e=e/360*6,n/=100,r/=100;var a=Math.floor(e),i=r*(1-n),l=r*(1-(e-a)*n),s=r*(1-(1-e+a)*n),c=a%6;return{r:255*[r,l,i,i,s,r][c],g:255*[s,r,r,l,i,i][c],b:255*[i,i,s,r,r,l][c],a:o}},On=function(t){return{h:Sn(t.h),s:xn(t.s,0,100),l:xn(t.l,0,100),a:xn(t.a)}},Pn=function(t){return{h:kn(t.h),s:kn(t.s),l:kn(t.l),a:kn(t.a,3)}},Mn=function(t){return Bn((n=(e=t).s,{h:e.h,s:(n*=((r=e.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:e.a}));var e,n,r},Ln=function(t){return{h:(e=Nn(t)).h,s:(o=(200-(n=e.s))*(r=e.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,n,r,o},Fn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Rn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Un=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jn={string:[[function(t){var e=Tn.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?kn(parseInt(t[3]+t[3],16)/255,2):1}:6===t.length||8===t.length?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:8===t.length?kn(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=Un.exec(t)||Yn.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Dn({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=Fn.exec(t)||Rn.exec(t);if(!e)return null;var n,r,o=On({h:(n=e[1],r=e[2],void 0===r&&(r="deg"),Number(n)*(_n[r]||1)),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)});return Mn(o)},"hsl"]],object:[[function(t){var e=t.r,n=t.g,r=t.b,o=t.a,a=void 0===o?1:o;return wn(e)&&wn(n)&&wn(r)?Dn({r:Number(e),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(t){var e=t.h,n=t.s,r=t.l,o=t.a,a=void 0===o?1:o;if(!wn(e)||!wn(n)||!wn(r))return null;var i=On({h:Number(e),s:Number(n),l:Number(r),a:Number(a)});return Mn(i)},"hsl"],[function(t){var e=t.h,n=t.s,r=t.v,o=t.a,a=void 0===o?1:o;if(!wn(e)||!wn(n)||!wn(r))return null;var i=function(t){return{h:Sn(t.h),s:xn(t.s,0,100),v:xn(t.v,0,100),a:xn(t.a)}}({h:Number(e),s:Number(n),v:Number(r),a:Number(a)});return Bn(i)},"hsv"]]},zn=function(t,e){for(var n=0;n<e.length;n++){var r=e[n][0](t);if(r)return[r,e[n][1]]}return[null,void 0]},Hn=function(t,e){var n=Ln(t);return{h:n.h,s:xn(n.s+100*e,0,100),l:n.l,a:n.a}},$n=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Gn=function(t,e){var n=Ln(t);return{h:n.h,s:n.s,l:xn(n.l+100*e,0,100),a:n.a}},Xn=function(){function t(t){this.parsed=function(t){return"string"==typeof t?zn(t.trim(),jn.string):"object"==typeof t&&null!==t?zn(t,jn.object):[null,void 0]}(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return null!==this.parsed},t.prototype.brightness=function(){return kn($n(this.rgba),2)},t.prototype.isDark=function(){return $n(this.rgba)<.5},t.prototype.isLight=function(){return $n(this.rgba)>=.5},t.prototype.toHex=function(){return e=(t=En(this.rgba)).r,n=t.g,r=t.b,a=(o=t.a)<1?In(kn(255*o)):"","#"+In(e)+In(n)+In(r)+a;var t,e,n,r,o,a},t.prototype.toRgb=function(){return En(this.rgba)},t.prototype.toRgbString=function(){return e=(t=En(this.rgba)).r,n=t.g,r=t.b,(o=t.a)<1?"rgba("+e+", "+n+", "+r+", "+o+")":"rgb("+e+", "+n+", "+r+")";var t,e,n,r,o},t.prototype.toHsl=function(){return Pn(Ln(this.rgba))},t.prototype.toHslString=function(){return e=(t=Pn(Ln(this.rgba))).h,n=t.s,r=t.l,(o=t.a)<1?"hsla("+e+", "+n+"%, "+r+"%, "+o+")":"hsl("+e+", "+n+"%, "+r+"%)";var t,e,n,r,o},t.prototype.toHsv=function(){return t=Nn(this.rgba),{h:kn(t.h),s:kn(t.s),v:kn(t.v),a:kn(t.a,3)};var t},t.prototype.invert=function(){return Wn({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},t.prototype.saturate=function(t){return void 0===t&&(t=.1),Wn(Hn(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),Wn(Hn(this.rgba,-t))},t.prototype.grayscale=function(){return Wn(Hn(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),Wn(Gn(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),Wn(Gn(this.rgba,-t))},t.prototype.rotate=function(t){return void 0===t&&(t=15),this.hue(this.hue()+t)},t.prototype.alpha=function(t){return"number"==typeof t?Wn({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):kn(this.rgba.a,3);var e},t.prototype.hue=function(t){var e=Ln(this.rgba);return"number"==typeof t?Wn({h:t,s:e.s,l:e.l,a:e.a}):kn(e.h)},t.prototype.isEqual=function(t){return this.toHex()===Wn(t).toHex()},t}(),Wn=function(t){return t instanceof Xn?t:new Xn(t)},qn=r(59892);const Kn={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vn=(0,A.A)(Kn,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports,{primaryColor:Qn,defaultPrimaryColor:Jn}=(0,s.C)("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),Zn=(0,a.pM)({name:"UserPrimaryColor",components:{IconColorPalette:y,IconUndo:Vn,NcButton:nn.A,NcColorPicker:m.A,NcLoadingIcon:qn.A},emits:["refresh-styles"],data:()=>({primaryColor:Qn,loading:!1}),computed:{isdefaultPrimaryColor(){return Wn(this.primaryColor).isEqual(Wn(Jn))},debouncedOnUpdate(){return g()(this.onUpdate,500)}},methods:{t:Q.Tl,reload(){const t=this.$refs.trigger,e=window.getComputedStyle(t).backgroundColor;e.toLowerCase()!==this.primaryColor&&(this.primaryColor=e)},onReset(){this.primaryColor=Jn,this.onUpdate(null)},async onUpdate(t){this.loading=!0;const e=(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"primary_color"});try{t?await c.Ay.post(e,{configValue:t}):await c.Ay.delete(e),this.$emit("refresh-styles")}catch(t){console.error("Could not update primary color",t),(0,p.Qg)((0,Q.Tl)("theming","Could not set primary color"))}this.loading=!1}}}),tr=Zn;var er=r(79799),nr={};nr.styleTagTransform=H(),nr.setAttributes=U(),nr.insert=F().bind(null,"head"),nr.domAPI=M(),nr.insertStyleElement=j(),O()(er.A,nr),er.A&&er.A.locals&&er.A.locals;const rr=(0,A.A)(tr,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("div",{staticClass:"primary-color__wrapper"},[e("NcColorPicker",{attrs:{"data-user-theming-primary-color":""},on:{"update:value":t.debouncedOnUpdate},model:{value:t.primaryColor,callback:function(e){t.primaryColor=e},expression:"primaryColor"}},[e("button",{ref:"trigger",staticClass:"color-container primary-color__trigger",style:{"background-color":t.primaryColor},attrs:{"data-user-theming-primary-color-trigger":""}},[t._v("\n\t\t\t"+t._s(t.t("theming","Primary color"))+"\n\t\t\t"),t.loading?e("NcLoadingIcon"):e("IconColorPalette",{attrs:{size:20}})],1)]),t._v(" "),e("NcButton",{attrs:{type:"tertiary",disabled:t.isdefaultPrimaryColor},on:{click:t.onReset},scopedSlots:t._u([{key:"icon",fn:function(){return[e("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[t._v("\n\t\t"+t._s(t.t("theming","Reset primary color"))+"\n\t")])],1)}),[],!1,null,"c7fa82d2",null).exports,or=(0,s.C)("theming","themes",[]),ar=(0,s.C)("theming","enforceTheme",""),ir=(0,s.C)("theming","shortcutsDisabled",!1),lr=(0,s.C)("theming","enableBlurFilter",""),sr=(0,s.C)("theming","isUserThemingDisabled"),cr={name:"UserTheming",components:{ItemPreview:V,NcCheckboxRadioSwitch:d.A,NcSettingsSection:u.A,BackgroundSettings:X,UserAppMenuSection:yn,UserPrimaryColor:rr},data:()=>({availableThemes:or,enforceTheme:ar,shortcutsDisabled:ir,isUserThemingDisabled:sr,enableBlurFilter:lr}),computed:{themes(){return this.availableThemes.filter((t=>1===t.type))},fonts(){return this.availableThemes.filter((t=>2===t.type))},selectedTheme(){return this.themes.find((t=>!0===t.enabled))||this.themes[0]},description(){return t("theming","Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.").replace("{guidelines}",this.guidelinesLink).replace("{linkend}","</a>")},guidelinesLink:()=>'<a target="_blank" href="https://www.w3.org/WAI/standards-guidelines/wcag/" rel="noreferrer nofollow">',descriptionDetail(){return t("theming","If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!").replace("{issuetracker}",this.issuetrackerLink).replace("{designteam}",this.designteamLink).replace(/\{linkend\}/g,"</a>")},issuetrackerLink:()=>'<a target="_blank" href="https://github.com/nextcloud/server/issues/" rel="noreferrer nofollow">',designteamLink:()=>'<a target="_blank" href="https://nextcloud.com/design" rel="noreferrer nofollow">'},watch:{shortcutsDisabled(t){this.changeShortcutsDisabled(t)}},methods:{async refreshGlobalStyles(){await i(),this.$nextTick((()=>this.$refs.primaryColor.reload()))},changeTheme(t){let{enabled:e,id:n}=t;this.themes.forEach((t=>{t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},changeFont(t){let{enabled:e,id:n}=t;this.fonts.forEach((t=>{t.id===n&&e?t.enabled=!0:t.enabled=!1})),this.updateBodyAttributes(),this.selectItem(e,n)},async changeShortcutsDisabled(t){t?await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"}):await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"})},async changeEnableBlurFilter(){this.enableBlurFilter="no"===this.enableBlurFilter?"yes":"no",await(0,c.Ay)({url:(0,l.KT)("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"force_enable_blur_filter"}),data:{configValue:this.enableBlurFilter},method:"POST"}),this.$emit("update:background")},updateBodyAttributes(){const t=this.themes.filter((t=>!0===t.enabled)).map((t=>t.id)),e=this.fonts.filter((t=>!0===t.enabled)).map((t=>t.id));this.themes.forEach((t=>{document.body.toggleAttribute(`data-theme-${t.id}`,t.enabled)})),this.fonts.forEach((t=>{document.body.toggleAttribute(`data-theme-${t.id}`,t.enabled)})),document.body.setAttribute("data-themes",[...t,...e].join(","))},async selectItem(e,n){try{e?await(0,c.Ay)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}/enable",{themeId:n}),method:"PUT"}):await(0,c.Ay)({url:(0,l.KT)("apps/theming/api/v1/theme/{themeId}",{themeId:n}),method:"DELETE"})}catch(e){console.error(e,e.response),OC.Notification.showTemporary(t("theming",e.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var dr=r(18755),ur={};ur.styleTagTransform=H(),ur.setAttributes=U(),ur.insert=F().bind(null,"head"),ur.domAPI=M(),ur.insertStyleElement=j(),O()(dr.A,ur),dr.A&&dr.A.locals&&dr.A.locals;const pr=(0,A.A)(cr,(function(){var t=this,e=t._self._c;return e("section",[e("NcSettingsSection",{staticClass:"theming",attrs:{name:t.t("theming","Appearance and accessibility settings")}},[e("p",{domProps:{innerHTML:t._s(t.description)}}),t._v(" "),e("p",{domProps:{innerHTML:t._s(t.descriptionDetail)}}),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.themes,(function(n){return e("ItemPreview",{key:n.id,attrs:{enforced:n.id===t.enforceTheme,selected:t.selectedTheme.id===n.id,theme:n,unique:1===t.themes.length,type:"theme"},on:{change:t.changeTheme}})})),1),t._v(" "),e("div",{staticClass:"theming__preview-list"},t._l(t.fonts,(function(n){return e("ItemPreview",{key:n.id,attrs:{selected:n.enabled,theme:n,unique:1===t.fonts.length,type:"font"},on:{change:t.changeFont}})})),1),t._v(" "),e("h3",[t._v(t._s(t.t("theming","Misc accessibility options")))]),t._v(" "),e("NcCheckboxRadioSwitch",{attrs:{type:"checkbox",checked:"yes"===t.enableBlurFilter,indeterminate:""===t.enableBlurFilter},on:{"update:checked":t.changeEnableBlurFilter}},[t._v("\n\t\t\t"+t._s(t.t("theming","Enable blur background filter (may increase GPU load)"))+"\n\t\t")])],1),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Primary color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","Set a primary color to highlight important elements. The color used for elements such as primary buttons might differ a bit as it gets adjusted to fulfill accessibility requirements.")}},[t.isUserThemingDisabled?t._e():e("UserPrimaryColor",{ref:"primaryColor",on:{"refresh-styles":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{staticClass:"background",attrs:{name:t.t("theming","Background and color"),description:t.isUserThemingDisabled?t.t("theming","Customization has been disabled by your administrator"):t.t("theming","The background can be set to an image from the default set, a custom uploaded image, or a plain color.")}},[t.isUserThemingDisabled?t._e():e("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":t.refreshGlobalStyles}})],1),t._v(" "),e("NcSettingsSection",{attrs:{name:t.t("theming","Keyboard shortcuts"),description:t.t("theming","In some cases keyboard shortcuts can interfere with accessibility tools. In order to allow focusing on your tool correctly you can disable all keyboard shortcuts here. This will also disable all available shortcuts in apps.")}},[e("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:t.shortcutsDisabled,type:"switch"},on:{"update:checked":function(e){t.shortcutsDisabled=e},change:t.changeShortcutsDisabled}},[t._v("\n\t\t\t"+t._s(t.t("theming","Disable all keyboard shortcuts"))+"\n\t\t")])],1),t._v(" "),e("UserAppMenuSection")],1)}),[],!1,null,"3082a53a",null).exports;r.nc=(0,o.aV)(),a.Ay.prototype.OC=OC,a.Ay.prototype.t=t;const hr=new(a.Ay.extend(pr));hr.$mount("#theming"),hr.$on("update:background",i)},18755:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".theming p[data-v-3082a53a]{max-width:800px}.theming[data-v-3082a53a] a{font-weight:bold}.theming[data-v-3082a53a] a:hover,.theming[data-v-3082a53a] a:focus{text-decoration:underline}.theming__preview-list[data-v-3082a53a]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap)}.background__grid[data-v-3082a53a]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-3082a53a]{display:flex;flex-direction:column}}","",{version:3,sources:["webpack://./apps/theming/src/UserTheming.vue"],names:[],mappings:"AAGC,4BACC,eAAA,CAID,4BACC,gBAAA,CAEA,oEAEC,yBAAA,CAIF,wCACC,WAAA,CACA,YAAA,CACA,qBAAA,CACA,qBAAA,CACA,kBAAA,CAKD,mCACC,eAAA,CAIF,0BACC,wCACC,YAAA,CACA,qBAAA,CAAA",sourcesContent:["\n.theming {\n\t// Limit width of settings sections for readability\n\tp {\n\t\tmax-width: 800px;\n\t}\n\n\t// Proper highlight for links and focus feedback\n\t:deep(a) {\n\t\tfont-weight: bold;\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t}\n\n\t&__preview-list {\n\t\t--gap: 30px;\n\t\tdisplay: grid;\n\t\tmargin-top: var(--gap);\n\t\tcolumn-gap: var(--gap);\n\t\trow-gap: var(--gap);\n\t}\n}\n\n.background {\n\t&__grid {\n\t\tmargin-top: 30px;\n\t}\n}\n\n@media (max-width: 1440px) {\n\t.theming__preview-list {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n"],sourceRoot:""}]);const l=i},42797:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".order-selector[data-v-3c4840b5]{width:max-content;min-width:260px}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelector.vue"],names:[],mappings:"AACA,iCACC,iBAAA,CACA,eAAA",sourcesContent:["\n.order-selector {\n\twidth: max-content;\n\tmin-width: 260px; // align with NcSelect\n}\n"],sourceRoot:""}]);const l=i},56725:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".order-selector-element[data-v-e25020e8]{list-style:none;display:flex;flex-direction:row;align-items:center;gap:12px;padding-inline:12px}.order-selector-element[data-v-e25020e8]:hover{background-color:var(--color-background-hover);border-radius:var(--border-radius-large)}.order-selector-element--disabled[data-v-e25020e8]{border-color:var(--color-text-maxcontrast);color:var(--color-text-maxcontrast)}.order-selector-element--disabled .order-selector-element__icon[data-v-e25020e8]{opacity:75%}.order-selector-element__actions[data-v-e25020e8]{flex:0 0;display:flex;flex-direction:row;gap:6px}.order-selector-element__label[data-v-e25020e8]{flex:1 1;text-overflow:ellipsis;overflow:hidden}.order-selector-element__placeholder[data-v-e25020e8]{height:44px;width:44px}.order-selector-element__icon[data-v-e25020e8]{filter:var(--background-invert-if-bright)}","",{version:3,sources:["webpack://./apps/theming/src/components/AppOrderSelectorElement.vue"],names:[],mappings:"AACA,yCAEC,eAAA,CAEA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,QAAA,CACA,mBAAA,CAEA,+CACC,8CAAA,CACA,wCAAA,CAGD,mDACC,0CAAA,CACA,mCAAA,CAEA,iFACC,WAAA,CAIF,kDACC,QAAA,CACA,YAAA,CACA,kBAAA,CACA,OAAA,CAGD,gDACC,QAAA,CACA,sBAAA,CACA,eAAA,CAGD,sDACC,WAAA,CACA,UAAA,CAGD,+CACC,yCAAA",sourcesContent:["\n.order-selector-element {\n\t// hide default styling\n\tlist-style: none;\n\t// Align children\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\t// Spacing\n\tgap: 12px;\n\tpadding-inline: 12px;\n\n\t&:hover {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\n\t&--disabled {\n\t\tborder-color: var(--color-text-maxcontrast);\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t.order-selector-element__icon {\n\t\t\topacity: 75%;\n\t\t}\n\t}\n\n\t&__actions {\n\t\tflex: 0 0;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tgap: 6px;\n\t}\n\n\t&__label {\n\t\tflex: 1 1;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t}\n\n\t&__placeholder {\n\t\theight: 44px;\n\t\twidth: 44px;\n\t}\n\n\t&__icon {\n\t\tfilter: var(--background-invert-if-bright);\n\t}\n}\n"],sourceRoot:""}]);const l=i},6091:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".background-selector[data-v-7cc51a4f]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background-color[data-v-7cc51a4f]{display:flex;justify-content:center;align-items:center;width:176px;height:96px;margin:8px;border-radius:var(--border-radius-large);background-color:var(--color-primary)}.background-selector .background[data-v-7cc51a4f]{overflow:hidden;width:176px;height:96px;margin:8px;text-align:center;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large);background-position:center center;background-size:cover}.background-selector .background__filepicker[data-v-7cc51a4f]{background-color:var(--color-background-dark)}.background-selector .background__filepicker.background--active[data-v-7cc51a4f]{color:var(--color-background-plain-text);background-image:var(--image-background)}.background-selector .background__default[data-v-7cc51a4f]{background-color:var(--color-background-plain);background-image:linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)),var(--05e06a8e)}.background-selector .background__filepicker[data-v-7cc51a4f],.background-selector .background__default[data-v-7cc51a4f],.background-selector .background__color[data-v-7cc51a4f]{border-color:var(--color-border)}.background-selector .background__default[data-v-7cc51a4f],.background-selector .background__shipped[data-v-7cc51a4f]{color:#fff}.background-selector .background[data-color-bright][data-v-7cc51a4f]{color:#000}.background-selector .background--active[data-v-7cc51a4f],.background-selector .background[data-v-7cc51a4f]:hover,.background-selector .background[data-v-7cc51a4f]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-7cc51a4f]{margin:4px}.background-selector .background .check-icon[data-v-7cc51a4f]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-7cc51a4f]{display:block !important}","",{version:3,sources:["webpack://./apps/theming/src/components/BackgroundSettings.vue"],names:[],mappings:"AACA,sCACC,YAAA,CACA,cAAA,CACA,sBAAA,CAEA,wDACC,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,wCAAA,CACA,qCAAA,CAGD,kDACC,eAAA,CACA,WAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CACA,YAAA,CACA,6CAAA,CACA,wCAAA,CACA,iCAAA,CACA,qBAAA,CAEA,8DACC,6CAAA,CAEA,iFACC,wCAAA,CACA,wCAAA,CAIF,2DACC,8CAAA,CACA,yGAAA,CAGD,kLACC,gCAAA,CAID,sHAEC,UAAA,CAID,qEACC,UAAA,CAGD,0KAGC,mDAAA,CACA,oDAAA,CAID,uDACC,UAAA,CAGD,8DACC,YAAA,CAIA,yFAEC,wBAAA",sourcesContent:["\n.background-selector {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: center;\n\n\t.background-color {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-color: var(--color-primary);\n\t}\n\n\t.background {\n\t\toverflow: hidden;\n\t\twidth: 176px;\n\t\theight: 96px;\n\t\tmargin: 8px;\n\t\ttext-align: center;\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\t\tbackground-position: center center;\n\t\tbackground-size: cover;\n\n\t\t&__filepicker {\n\t\t\tbackground-color: var(--color-background-dark);\n\n\t\t\t&.background--active {\n\t\t\t\tcolor: var(--color-background-plain-text);\n\t\t\t\tbackground-image: var(--image-background);\n\t\t\t}\n\t\t}\n\n\t\t&__default {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\tbackground-image: linear-gradient(to bottom, rgba(23, 23, 23, 0.5), rgba(23, 23, 23, 0.5)), v-bind(cssDefaultBackgroundImage);\n\t\t}\n\n\t\t&__filepicker, &__default, &__color {\n\t\t\tborder-color: var(--color-border);\n\t\t}\n\n\t\t// Over a background image\n\t\t&__default,\n\t\t&__shipped {\n\t\t\tcolor: white;\n\t\t}\n\n\t\t// Text and svg icon dark on bright background\n\t\t&[data-color-bright] {\n\t\t\tcolor: black;\n\t\t}\n\n\t\t&--active,\n\t\t&:hover,\n\t\t&:focus {\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t}\n\n\t\t// Icon\n\t\tspan {\n\t\t\tmargin: 4px;\n\t\t}\n\n\t\t.check-icon {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&--active:not(.icon-loading) {\n\t\t\t.check-icon {\n\t\t\t\t// Show checkmark\n\t\t\t\tdisplay: block !important;\n\t\t\t}\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const l=i},37499:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".theming__preview[data-v-fcbd7e50]{--ratio: 16;position:relative;display:flex;justify-content:flex-start}.theming__preview[data-v-fcbd7e50],.theming__preview *[data-v-fcbd7e50]{user-select:none}.theming__preview-image[data-v-fcbd7e50]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-inline-end:var(--gap);cursor:pointer;border-radius:var(--border-radius);background-repeat:no-repeat;background-position:top left;background-size:cover}.theming__preview-explanation[data-v-fcbd7e50]{margin-bottom:10px}.theming__preview-description[data-v-fcbd7e50]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-fcbd7e50]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-fcbd7e50]{padding:12px 0}.theming__preview-warning[data-v-fcbd7e50]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-fcbd7e50]{flex-direction:column}.theming__preview-image[data-v-fcbd7e50]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CACA,iBAAA,CACA,YAAA,CACA,0BAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,4BAAA,CACA,cAAA,CACA,kCAAA,CACA,2BAAA,CACA,4BAAA,CACA,qBAAA,CAGD,+CACC,kBAAA,CAGD,+CACC,YAAA,CACA,qBAAA,CAEA,kDACC,gBAAA,CACA,eAAA,CAGD,qDACC,cAAA,CAIF,2CACC,0BAAA,CAIF,oCACC,mCACC,qBAAA,CAEA,yCACC,QAAA,CAAA",sourcesContent:["\n@use 'sass:math';\n\n.theming__preview {\n\t// We make previews on 16/10 screens\n\t--ratio: 16;\n\tposition: relative;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\n\t&,\n\t* {\n\t\tuser-select: none;\n\t}\n\n\t&-image {\n\t\tflex-basis: calc(16px * var(--ratio));\n\t\tflex-shrink: 0;\n\t\theight: calc(10px * var(--ratio));\n\t\tmargin-inline-end: var(--gap);\n\t\tcursor: pointer;\n\t\tborder-radius: var(--border-radius);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tbackground-size: cover;\n\t}\n\n\t&-explanation {\n\t\tmargin-bottom: 10px;\n\t}\n\n\t&-description {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3 {\n\t\t\tfont-weight: bold;\n\t\t\tmargin-bottom: 0;\n\t\t}\n\n\t\tlabel {\n\t\t\tpadding: 12px 0;\n\t\t}\n\t}\n\n\t&-warning {\n\t\tcolor: var(--color-warning);\n\t}\n}\n\n@media (max-width: math.div(1024px, 1.5)) {\n\t.theming__preview {\n\t\tflex-direction: column;\n\n\t\t&-image {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n}\n\n"],sourceRoot:""}]);const l=i},66167:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".user-app-menu-order[data-v-08dfaa90]{margin-block:12px}","",{version:3,sources:["webpack://./apps/theming/src/components/UserAppMenuSection.vue"],names:[],mappings:"AACA,sCACC,iBAAA",sourcesContent:["\n.user-app-menu-order {\n\tmargin-block: 12px;\n}\n"],sourceRoot:""}]);const l=i},79799:(t,e,n)=>{n.d(e,{A:()=>l});var r=n(71354),o=n.n(r),a=n(76314),i=n.n(a)()(o());i.push([t.id,".primary-color__wrapper[data-v-c7fa82d2]{display:flex;flex-direction:row;flex-wrap:wrap;gap:12px}.primary-color__trigger[data-v-c7fa82d2]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background-color:var(--color-primary);color:var(--color-primary-text);width:350px;max-width:100vw;height:96px;word-wrap:break-word;hyphens:auto;border:2px solid var(--color-main-background);border-radius:var(--border-radius-large)}.primary-color__trigger[data-v-c7fa82d2]:active{background-color:var(--color-primary-hover) !important}.primary-color__trigger[data-v-c7fa82d2]:hover,.primary-color__trigger[data-v-c7fa82d2]:focus,.primary-color__trigger[data-v-c7fa82d2]:focus-visible{border-color:var(--color-main-background) !important;outline:2px solid var(--color-main-text) !important}","",{version:3,sources:["webpack://./apps/theming/src/components/UserPrimaryColor.vue"],names:[],mappings:"AAEC,yCACC,YAAA,CACA,kBAAA,CACA,cAAA,CACA,QAAA,CAGD,yCACC,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,OAAA,CAEA,qCAAA,CACA,+BAAA,CACA,WAAA,CACA,eAAA,CACA,WAAA,CAEA,oBAAA,CACA,YAAA,CAEA,6CAAA,CACA,wCAAA,CAEA,gDACC,sDAAA,CAGD,qJAGC,oDAAA,CACA,mDAAA",sourcesContent:["\n.primary-color {\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t}\n\n\t&__trigger {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tgap: 8px;\n\n\t\tbackground-color: var(--color-primary);\n\t\tcolor: var(--color-primary-text);\n\t\twidth: 350px;\n\t\tmax-width: 100vw;\n\t\theight: 96px;\n\n\t\tword-wrap: break-word;\n\t\thyphens: auto;\n\n\t\tborder: 2px solid var(--color-main-background);\n\t\tborder-radius: var(--border-radius-large);\n\n\t\t&:active {\n\t\t\tbackground-color: var(--color-primary-hover) !important;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:focus-visible {\n\t\t\tborder-color: var(--color-main-background) !important;\n\t\t\toutline: 2px solid var(--color-main-text) !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const l=i}},a={};function i(t){var e=a[t];if(void 0!==e)return e.exports;var n=a[t]={id:t,loaded:!1,exports:{}};return o[t].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){n=e[d][0],r=e[d][1],o=e[d][2];for(var l=!0,s=0;s<n.length;s++)(!1&o||a>=o)&&Object.keys(i.O).every((t=>i.O[t](n[s])))?n.splice(s--,1):(l=!1,o<a&&(a=o));if(l){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce(((e,n)=>(i.f[n](t,e),e)),[])),i.u=t=>t+"-"+t+".js?v="+{2441:"fc741cf57e9647f370a3",5862:"7b9b02dc0a1b898066ef",7874:"5d0f14697282cbdd7841"}[t],i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n={},r="nextcloud:",i.l=(t,e,o,a)=>{if(n[t])n[t].push(e);else{var l,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==r+o){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",r+o),l.src=t),n[t]=[e];var p=(e,r)=>{l.onerror=l.onload=null,clearTimeout(h);var o=n[t];if(delete n[t],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((t=>t(r))),e)return e(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),i.j=6673,(()=>{var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t})(),(()=>{i.b=document.baseURI||self.location.href;var t={6673:0};i.f.j=(e,n)=>{var r=i.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(e),l=new Error;i.l(a,(n=>{if(i.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,r[1](l)}}),"chunk-"+e,e)}},i.O.j=e=>0===t[e];var e=(e,n)=>{var r,o,a=n[0],l=n[1],s=n[2],c=0;if(a.some((e=>0!==t[e]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);if(s)var d=s(i)}for(e&&e(n);c<a.length;c++)o=a[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(d)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),i.nc=void 0;var l=i.O(void 0,[4208],(()=>i(68587)));l=i.O(l)})();
|
|
//# sourceMappingURL=theming-personal-theming.js.map?v=779056f273779f1318b6
|