1
0

theming-personal-theming.js 108 KB

12
  1. (()=>{var e,n,r,o={57915:(e,n,r)=>{"use strict";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),u=r(32073),d=r(88837),p=r(85168),h=(r(93525),r(17334)),g=r.n(h),f=r(63536),m=r(64866),v=r.n(m),b=r(85338);const A={name:"ImageEditIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var y=r(14486);const C=(0,y.A)(A,(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,"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,_={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},w=(0,y.A)(_,(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,"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;var k=r(96763);const x=(0,s.C)("theming","shippedBackgrounds"),S=(0,s.C)("theming","userBackgroundImage"),{backgroundImage:D,backgroundMime:T,defaultShippedBackground:E}=(0,s.C)("theming","themingDefaults"),I=t=>(0,l.fg)("theming","","img/background/")+t,M={name:"BackgroundSettings",components:{Check:b.A,ColorPalette:w,ImageEdit:C,NcColorPicker:f.N},data:()=>({loading:!1,Theming:(0,s.C)("theming","data",{}),backgroundImage:S}),computed:{shippedBackgrounds(){return Object.keys(x).filter((t=>t!==E||!this.isGlobalBackgroundDefault)).map((t=>({name:t,url:I(t),preview:I("preview/"+t),details:x[t]})))},isGlobalBackgroundDefault:()=>""===T,isGlobalBackgroundDeleted:()=>"backgroundColor"===T,cssDefaultBackgroundImage:()=>`url('${D}')`},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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.loading="custom";const n=await c.Ay.post((0,l.Jv)("/apps/theming/background/custom"),{value:t,color:e});this.update(n.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 k.error("No valid background have been selected",{path:e}),void(0,p.Qg)(t("theming","No background has been selected"));this.loading="custom";let n=null,r=null;try{const t=(0,l.dC)("dav/files/"+(0,o.HW)().uid+e);n=await c.Ay.get(t,{responseType:"blob"});const a=URL.createObjectURL(n.data),i=await this.getColorPaletteFromBlob(a);r=i?.DarkVibrant?.hex,this.setFile(e,r),k.debug("Extracted colour",r,"from custom image",e,i)}catch(t){this.setFile(e),k.error("Unable to extract colour from custom image",{error:t,path:e,response:n,color:r})}},getColorPaletteFromBlob:t=>new Promise(((e,n)=>{new(v())(t).getPalette(((t,r)=>{t&&n(t),e(r)}))}))}},O=()=>{(0,a.$9)(((t,e)=>({d4172c58:t.cssDefaultBackgroundImage})))},P=M.setup;M.setup=P?(t,e)=>(O(),P(t,e)):O;const N=M;var L=r(85072),B=r.n(L),F=r(97825),R=r.n(F),j=r(77659),H=r.n(j),U=r(55056),V=r.n(U),z=r(10540),Y=r.n(z),q=r(41113),G=r.n(q),W=r(19454),$={};$.styleTagTransform=G(),$.setAttributes=V(),$.insert=H().bind(null,"head"),$.domAPI=R(),$.insertStyleElement=Y(),B()(W.A,$),W.A&&W.A.locals&&W.A.locals;const X=(0,y.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,"5e1df51d",null).exports;var K=r(96763);const Q={name:"ItemPreview",components:{NcCheckboxRadioSwitch:u.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||(K.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 J=r(4374),Z={};Z.styleTagTransform=G(),Z.setAttributes=V(),Z.insert=H().bind(null,"head"),Z.domAPI=R(),Z.insertStyleElement=Y(),B()(J.A,Z),J.A&&J.A.locals&&J.A.locals;const tt=(0,y.A)(Q,(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,"414f94fa",null).exports;var et=r(53334),nt=r(59271);a.Ay.util.warn,r(96763),nt.oc&&window;const rt=nt.oc?window.document:void 0;nt.oc&&window.navigator,nt.oc&&window.location,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,Number.POSITIVE_INFINITY;function ot(t){return ot="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},ot(t)}function at(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function it(){return it=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},it.apply(this,arguments)}function lt(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){at(t,e,n[e])}))}return t}function st(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}nt.D_;var ct=st(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ut=st(/Edge/i),dt=st(/firefox/i),pt=st(/safari/i)&&!st(/chrome/i)&&!st(/android/i),ht=st(/iP(ad|od|hone)/i),gt=st(/chrome/i)&&st(/android/i),ft={capture:!1,passive:!1};function mt(t,e,n){t.addEventListener(e,n,!ct&&ft)}function vt(t,e,n){t.removeEventListener(e,n,!ct&&ft)}function bt(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 At(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function yt(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&bt(t,e):bt(t,e))||r&&t===n)return t;if(t===n)break}while(t=At(t))}return null}var Ct,_t=/\s+/g;function wt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(_t," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(_t," ")}}function kt(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 xt(t,e){var n="";if("string"==typeof t)n=t;else do{var r=kt(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 St(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 Dt(){return document.scrollingElement||document.documentElement}function Tt(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var a,i,l,s,c,u,d;if(t!==window&&t!==Dt()?(i=(a=t.getBoundingClientRect()).top,l=a.left,s=a.bottom,c=a.right,u=a.height,d=a.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!ct))do{if(o&&o.getBoundingClientRect&&("none"!==kt(o,"transform")||n&&"static"!==kt(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(kt(o,"border-top-width")),l-=p.left+parseInt(kt(o,"border-left-width")),s=i+a.height,c=l+a.width;break}}while(o=o.parentNode);if(r&&t!==window){var h=xt(o||t),g=h&&h.a,f=h&&h.d;h&&(s=(i/=f)+(u/=f),c=(l/=g)+(d/=g))}return{top:i,left:l,bottom:s,right:c,width:d,height:u}}}function Et(t,e,n){for(var r=Nt(t,!0),o=Tt(t)[e];r;){var a=Tt(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===Dt())break;r=Nt(r,!1)}return!1}function It(t,e,n){for(var r=0,o=0,a=t.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==Le.ghost&&a[o]!==Le.dragged&&yt(a[o],n.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function Mt(t,e){for(var n=t.lastElementChild;n&&(n===Le.ghost||"none"===kt(n,"display")||e&&!bt(n,e));)n=n.previousElementSibling;return n||null}function Ot(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Le.clone||e&&!bt(t,e)||n++;return n}function Pt(t){var e=0,n=0,r=Dt();if(t)do{var o=xt(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 Nt(t,e){if(!t||!t.getBoundingClientRect)return Dt();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=kt(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 Dt();if(r||e)return n;r=!0}}}while(n=n.parentNode);return Dt()}function Lt(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(!Ct){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),Ct=setTimeout((function(){Ct=void 0}),e)}}}function Ft(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Rt(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 jt="Sortable"+(new Date).getTime();var Ht=[],Ut={initializeByDefault:!0},Vt={mount:function(t){for(var e in Ut)Ut.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ut[e]);Ht.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";Ht.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](lt({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](lt({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in Ht.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,it(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 Ht.forEach((function(r){"function"==typeof r.eventProperties&&it(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Ht.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var zt=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"]);Vt.pluginEvent.bind(Le)(t,e,lt({dragEl:qt,parentEl:Gt,ghostEl:Wt,rootEl:$t,nextEl:Xt,lastDownEl:Kt,cloneEl:Qt,cloneHidden:Jt,dragStarted:de,putSortable:oe,activeSortable:Le.active,originalEvent:r,oldIndex:Zt,oldDraggableIndex:ee,newIndex:te,newDraggableIndex:ne,hideGhostForTarget:Me,unhideGhostForTarget:Oe,cloneNowHidden:function(){Jt=!0},cloneNowShown:function(){Jt=!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,u=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[jt]){var f,m=e.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||ct||ut?(f=document.createEvent("Event")).initEvent(r,!0,!0):f=new CustomEvent(r,{bubbles:!0,cancelable:!0}),f.to=i||n,f.from=l||n,f.item=o||n,f.clone=a,f.oldIndex=s,f.newIndex=c,f.oldDraggableIndex=u,f.newDraggableIndex=d,f.originalEvent=p,f.pullMode=h?h.lastPutMode:void 0;var b=lt({},g,Vt.getEventProperties(r,e));for(var A in b)f[A]=b[A];n&&n.dispatchEvent(f),m[v]&&m[v].call(e,f)}}(lt({putSortable:oe,cloneEl:Qt,targetEl:qt,rootEl:$t,oldIndex:Zt,oldDraggableIndex:ee,newIndex:te,newDraggableIndex:ne},t))}var qt,Gt,Wt,$t,Xt,Kt,Qt,Jt,Zt,te,ee,ne,re,oe,ae,ie,le,se,ce,ue,de,pe,he,ge,fe,me=!1,ve=!1,be=[],Ae=!1,ye=!1,Ce=[],_e=!1,we=[],ke="undefined"!=typeof document,xe=ht,Se=ut||ct?"cssFloat":"float",De=ke&&!gt&&!ht&&"draggable"in document.createElement("div"),Te=function(){if(ke){if(ct)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ee=function(t,e){var n=kt(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=It(t,0,e),a=It(t,1,e),i=o&&kt(o),l=a&&kt(a),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+Tt(o).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Tt(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 u="left"===i.float?"left":"right";return!a||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=r&&"none"===n[Se]||a&&"none"===n[Se]&&s+c>r)?"vertical":"horizontal"},Ie=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"==ot(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},Me=function(){!Te&&Wt&&kt(Wt,"display","none")},Oe=function(){!Te&&Wt&&kt(Wt,"display","")};ke&&document.addEventListener("click",(function(t){if(ve)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ve=!1,!1}),!0);var Pe=function(t){if(qt){var e=function(t,e){var n;return be.some((function(r){if(!Mt(r)){var o=Tt(r),a=r[jt].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[jt]._onDragOver(n)}}},Ne=function(t){qt&&qt.parentNode[jt]._isOutsideThisEl(t.target)};function Le(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=it({},e),t[jt]=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 Ee(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!==Le.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var a in Vt.initializePlugins(this,t,o),o)!(a in e)&&(e[a]=o[a]);for(var i in Ie(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&De,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?mt(t,"pointerdown",this._onTapStart):(mt(t,"mousedown",this._onTapStart),mt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(mt(t,"dragover",this),mt(t,"dragenter",this)),be.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),it(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(t){if("none"!==kt(t,"display")&&t!==Le.ghost){r.push({target:t,rect:Tt(t)});var e=lt({},r[r.length-1].rect);if(t.thisAnimationDuration){var n=xt(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=Tt(r),s=r.prevFromRect,c=r.prevToRect,u=t.rect,d=xt(r,!0);d&&(l.top-=d.f,l.left-=d.e),r.toRect=l,r.thisAnimationDuration&&Lt(s,l)&&!Lt(i,l)&&(u.top-l.top)/(u.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}(u,s,c,e.options)),Lt(l,i)||(r.prevFromRect=i,r.prevToRect=l,n||(n=e.options.animation),e.animate(r,u,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){kt(t,"transition",""),kt(t,"transform","");var o=xt(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,kt(t,"transform","translate3d("+l+"px,"+s+"px,0)"),function(t){t.offsetWidth}(t),kt(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),kt(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){kt(t,"transition",""),kt(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,u=t[jt],d=u.options.onMove;return!window.CustomEvent||ct||ut?(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||Tt(e),s.willInsertAfter=l,s.originalEvent=i,t.dispatchEvent(s),d&&(c=d.call(u,s,i)),c}function Fe(t){t.draggable=!1}function Re(){_e=!1}function je(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 He(t){return setTimeout(t,0)}function Ue(t){return clearTimeout(t)}Le.prototype={constructor:Le,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(pe=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,qt):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){we.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&we.push(r)}}(n),!qt&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||r.disabled||s.isContentEditable||(l=yt(l,r.draggable,n,!1))&&l.animated||Kt===l)){if(Zt=Ot(l),ee=Ot(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}),zt("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=yt(s,r.trim(),n,!1))return Yt({sortable:e,rootEl:r,name:"filter",targetEl:l,fromEl:n,toEl:n}),zt("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!yt(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&&!qt&&n.parentNode===a){var s=Tt(n);if($t=a,Gt=(qt=n).parentNode,Xt=qt.nextSibling,Kt=n,re=i.group,Le.dragged=qt,ae={target:qt,clientX:(e||t).clientX,clientY:(e||t).clientY},ce=ae.clientX-s.left,ue=ae.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,qt.style["will-change"]="all",r=function(){zt("delayEnded",o,{evt:t}),Le.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!dt&&o.nativeDraggable&&(qt.draggable=!0),o._triggerDragStart(t,e),Yt({sortable:o,name:"choose",originalEvent:t}),wt(qt,i.chosenClass,!0))},i.ignore.split(",").forEach((function(t){St(qt,t.trim(),Fe)})),mt(l,"dragover",Pe),mt(l,"mousemove",Pe),mt(l,"touchmove",Pe),mt(l,"mouseup",o._onDrop),mt(l,"touchend",o._onDrop),mt(l,"touchcancel",o._onDrop),dt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,qt.draggable=!0),zt("delayStart",this,{evt:t}),!i.delay||i.delayOnTouchOnly&&!e||this.nativeDraggable&&(ut||ct))r();else{if(Le.eventCanceled)return void this._onDrop();mt(l,"mouseup",o._disableDelayedDrag),mt(l,"touchend",o._disableDelayedDrag),mt(l,"touchcancel",o._disableDelayedDrag),mt(l,"mousemove",o._delayedDragTouchMoveHandler),mt(l,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&mt(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(){qt&&Fe(qt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;vt(t,"mouseup",this._disableDelayedDrag),vt(t,"touchend",this._disableDelayedDrag),vt(t,"touchcancel",this._disableDelayedDrag),vt(t,"mousemove",this._delayedDragTouchMoveHandler),vt(t,"touchmove",this._delayedDragTouchMoveHandler),vt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?mt(document,"pointermove",this._onTouchMove):mt(document,e?"touchmove":"mousemove",this._onTouchMove):(mt(qt,"dragend",this),mt($t,"dragstart",this._onDragStart));try{document.selection?He((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(me=!1,$t&&qt){zt("dragStarted",this,{evt:e}),this.nativeDraggable&&mt(document,"dragover",Ne);var n=this.options;!t&&wt(qt,n.dragClass,!1),wt(qt,n.ghostClass,!0),Le.active=this,t&&this._appendGhost(),Yt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ie){this._lastX=ie.clientX,this._lastY=ie.clientY,Me();for(var t=document.elementFromPoint(ie.clientX,ie.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ie.clientX,ie.clientY))!==e;)e=t;if(qt.parentNode[jt]._isOutsideThisEl(t),e)do{if(e[jt]&&e[jt]._onDragOver({clientX:ie.clientX,clientY:ie.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break;t=e}while(e=e.parentNode);Oe()}},_onTouchMove:function(t){if(ae){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=Wt&&xt(Wt,!0),i=Wt&&a&&a.a,l=Wt&&a&&a.d,s=xe&&fe&&Pt(fe),c=(o.clientX-ae.clientX+r.x)/(i||1)+(s?s[0]-Ce[0]:0)/(i||1),u=(o.clientY-ae.clientY+r.y)/(l||1)+(s?s[1]-Ce[1]:0)/(l||1);if(!Le.active&&!me){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Wt){a?(a.e+=c-(le||0),a.f+=u-(se||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");kt(Wt,"webkitTransform",d),kt(Wt,"mozTransform",d),kt(Wt,"msTransform",d),kt(Wt,"transform",d),le=c,se=u,ie=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Wt){var t=this.options.fallbackOnBody?document.body:$t,e=Tt(qt,!0,xe,!0,t),n=this.options;if(xe){for(fe=t;"static"===kt(fe,"position")&&"none"===kt(fe,"transform")&&fe!==document;)fe=fe.parentNode;fe!==document.body&&fe!==document.documentElement?(fe===document&&(fe=Dt()),e.top+=fe.scrollTop,e.left+=fe.scrollLeft):fe=Dt(),Ce=Pt(fe)}wt(Wt=qt.cloneNode(!0),n.ghostClass,!1),wt(Wt,n.fallbackClass,!0),wt(Wt,n.dragClass,!0),kt(Wt,"transition",""),kt(Wt,"transform",""),kt(Wt,"box-sizing","border-box"),kt(Wt,"margin",0),kt(Wt,"top",e.top),kt(Wt,"left",e.left),kt(Wt,"width",e.width),kt(Wt,"height",e.height),kt(Wt,"opacity","0.8"),kt(Wt,"position",xe?"absolute":"fixed"),kt(Wt,"zIndex","100000"),kt(Wt,"pointerEvents","none"),Le.ghost=Wt,t.appendChild(Wt),kt(Wt,"transform-origin",ce/parseInt(Wt.style.width)*100+"% "+ue/parseInt(Wt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;zt("dragStart",this,{evt:t}),Le.eventCanceled?this._onDrop():(zt("setupClone",this),Le.eventCanceled||((Qt=Rt(qt)).draggable=!1,Qt.style["will-change"]="",this._hideClone(),wt(Qt,this.options.chosenClass,!1),Le.clone=Qt),n.cloneId=He((function(){zt("clone",n),Le.eventCanceled||(n.options.removeCloneOnHide||$t.insertBefore(Qt,qt),n._hideClone(),Yt({sortable:n,name:"clone"}))})),!e&&wt(qt,o.dragClass,!0),e?(ve=!0,n._loopId=setInterval(n._emulateDragOver,50)):(vt(document,"mouseup",n._onDrop),vt(document,"touchend",n._onDrop),vt(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,qt)),mt(document,"drop",n),kt(qt,"transform","translateZ(0)")),me=!0,n._dragStartId=He(n._dragStarted.bind(n,e,t)),mt(document,"selectstart",n),de=!0,pt&&kt(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=Le.active,u=re===s,d=l.sort,p=oe||c,h=this,g=!1;if(!_e){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),i=yt(i,l.draggable,a,!0),T("dragOver"),Le.eventCanceled)return g;if(qt.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||h._ignoreWhileAnimating===i)return I(!1);if(ve=!1,c&&!l.disabled&&(u?d||(r=!$t.contains(qt)):oe===this||(this.lastPutMode=re.checkPull(this,c,qt,t))&&s.checkPut(this,c,qt,t))){if(o="vertical"===this._getDirection(t,i),e=Tt(qt),T("dragOverValid"),Le.eventCanceled)return g;if(r)return Gt=$t,E(),this._hideClone(),T("revert"),Le.eventCanceled||(Xt?$t.insertBefore(qt,Xt):$t.appendChild(qt)),I(!0);var f=Mt(a,l.draggable);if(!f||function(t,e,n){var r=Tt(Mt(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)&&!f.animated){if(f===qt)return I(!1);if(f&&a===t.target&&(i=f),i&&(n=Tt(i)),!1!==Be($t,a,qt,e,i,n,t,!!i))return E(),a.appendChild(qt),Gt=a,M(),I(!0)}else if(i.parentNode===a){n=Tt(i);var m,v,b,A=qt.parentNode!==a,y=!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}(qt.animated&&qt.toRect||e,i.animated&&i.toRect||n,o),C=o?"top":"left",_=Et(i,"top","top")||Et(qt,"top","top"),w=_?_.scrollTop:void 0;if(pe!==i&&(v=n[C],Ae=!1,ye=!y&&l.invertSwap||A),m=function(t,e,n,r,o,a,i,l){var s=r?t.clientY:t.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,p=!1;if(!i)if(l&&ge<c*o){if(!Ae&&(1===he?s>u+c*a/2:s<d-c*a/2)&&(Ae=!0),Ae)p=!0;else if(1===he?s<u+ge:s>d-ge)return-he}else if(s>u+c*(1-o)/2&&s<d-c*(1-o)/2)return function(t){return Ot(qt)<Ot(t)?1:-1}(e);return(p=p||i)&&(s<u+c*a/2||s>d-c*a/2)?s>u+c/2?1:-1:0}(t,i,n,o,y?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ye,pe===i),0!==m){var k=Ot(qt);do{k-=m,b=Gt.children[k]}while(b&&("none"===kt(b,"display")||b===Wt))}if(0===m||b===i)return I(!1);pe=i,he=m;var x=i.nextElementSibling,S=!1,D=Be($t,a,qt,e,i,n,t,S=1===m);if(!1!==D)return 1!==D&&-1!==D||(S=1===D),_e=!0,setTimeout(Re,30),E(),S&&!x?a.appendChild(qt):i.parentNode.insertBefore(qt,S?x:i),_&&Ft(_,0,w-_.scrollTop),Gt=qt.parentNode,void 0===v||ye||(ge=Math.abs(v-Tt(i)[C])),M(),I(!0)}if(a.contains(qt))return I(!1)}return!1}function T(l,s){zt(l,h,lt({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:p,target:i,completed:I,onMove:function(n,r){return Be($t,a,qt,e,n,Tt(n),t,r)},changed:M},s))}function E(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function I(e){return T("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(h),h!==p&&(wt(qt,oe?oe.options.ghostClass:c.options.ghostClass,!1),wt(qt,l.ghostClass,!0)),oe!==h&&h!==Le.active?oe=h:h===Le.active&&oe&&(oe=null),p===h&&(h._ignoreWhileAnimating=i),h.animateAll((function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===qt&&!qt.animated||i===a&&!i.animated)&&(pe=null),l.dragoverBubble||t.rootEl||i===document||(qt.parentNode[jt]._isOutsideThisEl(t.target),!e&&Pe(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function M(){te=Ot(qt),ne=Ot(qt,l.draggable),Yt({sortable:h,name:"change",toEl:a,newIndex:te,newDraggableIndex:ne,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){vt(document,"mousemove",this._onTouchMove),vt(document,"touchmove",this._onTouchMove),vt(document,"pointermove",this._onTouchMove),vt(document,"dragover",Pe),vt(document,"mousemove",Pe),vt(document,"touchmove",Pe)},_offUpEvents:function(){var t=this.el.ownerDocument;vt(t,"mouseup",this._onDrop),vt(t,"touchend",this._onDrop),vt(t,"pointerup",this._onDrop),vt(t,"touchcancel",this._onDrop),vt(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;te=Ot(qt),ne=Ot(qt,n.draggable),zt("drop",this,{evt:t}),Gt=qt&&qt.parentNode,te=Ot(qt),ne=Ot(qt,n.draggable),Le.eventCanceled||(me=!1,ye=!1,Ae=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ue(this.cloneId),Ue(this._dragStartId),this.nativeDraggable&&(vt(document,"drop",this),vt(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),pt&&kt(document.body,"user-select",""),kt(qt,"transform",""),t&&(de&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Wt&&Wt.parentNode&&Wt.parentNode.removeChild(Wt),($t===Gt||oe&&"clone"!==oe.lastPutMode)&&Qt&&Qt.parentNode&&Qt.parentNode.removeChild(Qt),qt&&(this.nativeDraggable&&vt(qt,"dragend",this),Fe(qt),qt.style["will-change"]="",de&&!me&&wt(qt,oe?oe.options.ghostClass:this.options.ghostClass,!1),wt(qt,this.options.chosenClass,!1),Yt({sortable:this,name:"unchoose",toEl:Gt,newIndex:null,newDraggableIndex:null,originalEvent:t}),$t!==Gt?(te>=0&&(Yt({rootEl:Gt,name:"add",toEl:Gt,fromEl:$t,originalEvent:t}),Yt({sortable:this,name:"remove",toEl:Gt,originalEvent:t}),Yt({rootEl:Gt,name:"sort",toEl:Gt,fromEl:$t,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:Gt,originalEvent:t})),oe&&oe.save()):te!==Zt&&te>=0&&(Yt({sortable:this,name:"update",toEl:Gt,originalEvent:t}),Yt({sortable:this,name:"sort",toEl:Gt,originalEvent:t})),Le.active&&(null!=te&&-1!==te||(te=Zt,ne=ee),Yt({sortable:this,name:"end",toEl:Gt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){zt("nulling",this),$t=qt=Gt=Wt=Xt=Qt=Kt=Jt=ae=ie=de=te=ne=Zt=ee=pe=he=oe=re=Le.dragged=Le.ghost=Le.clone=Le.active=null,we.forEach((function(t){t.checked=!0})),we.length=le=se=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":qt&&(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++)yt(t=n[r],a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||je(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];yt(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 yt(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=Vt.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&Ie(n)},destroy:function(){zt("destroy",this);var t=this.el;t[jt]=null,vt(t,"mousedown",this._onTapStart),vt(t,"touchstart",this._onTapStart),vt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(vt(t,"dragover",this),vt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),be.splice(be.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Jt){if(zt("hideClone",this),Le.eventCanceled)return;kt(Qt,"display","none"),this.options.removeCloneOnHide&&Qt.parentNode&&Qt.parentNode.removeChild(Qt),Jt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Jt){if(zt("showClone",this),Le.eventCanceled)return;$t.contains(qt)&&!this.options.group.revertClone?$t.insertBefore(Qt,qt):Xt?$t.insertBefore(Qt,Xt):$t.appendChild(Qt),this.options.group.revertClone&&this.animate(qt,Qt),kt(Qt,"display",""),Jt=!1}}else this._hideClone()}},ke&&mt(document,"touchmove",(function(t){(Le.active||me)&&t.cancelable&&t.preventDefault()})),Le.utils={on:mt,off:vt,css:kt,find:St,is:function(t,e){return!!yt(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:yt,toggleClass:wt,clone:Rt,index:Ot,nextTick:He,cancelNextTick:Ue,detectDirection:Ee,getChild:It},Le.get=function(t){return t[jt]},Le.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&&(Le.utils=lt({},Le.utils,t.utils)),Vt.mount(t)}))},Le.create=function(t,e){return new Le(t,e)},Le.version="1.10.2";var Ve,ze,Ye,qe,Ge,We,$e=[],Xe=!1;function Ke(){$e.forEach((function(t){clearInterval(t.pid)})),$e=[]}function Qe(){clearInterval(We)}var Je=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=Dt(),u=!1;ze!==n&&(ze=n,Ke(),Ve=e.scroll,o=e.scrollFn,!0===Ve&&(Ve=Nt(n,!0)));var d=0,p=Ve;do{var h=p,g=Tt(h),f=g.top,m=g.bottom,v=g.left,b=g.right,A=g.width,y=g.height,C=void 0,_=void 0,w=h.scrollWidth,k=h.scrollHeight,x=kt(h),S=h.scrollLeft,D=h.scrollTop;h===c?(C=A<w&&("auto"===x.overflowX||"scroll"===x.overflowX||"visible"===x.overflowX),_=y<k&&("auto"===x.overflowY||"scroll"===x.overflowY||"visible"===x.overflowY)):(C=A<w&&("auto"===x.overflowX||"scroll"===x.overflowX),_=y<k&&("auto"===x.overflowY||"scroll"===x.overflowY));var T=C&&(Math.abs(b-a)<=l&&S+A<w)-(Math.abs(v-a)<=l&&!!S),E=_&&(Math.abs(m-i)<=l&&D+y<k)-(Math.abs(f-i)<=l&&!!D);if(!$e[d])for(var I=0;I<=d;I++)$e[I]||($e[I]={});$e[d].vx==T&&$e[d].vy==E&&$e[d].el===h||($e[d].el=h,$e[d].vx=T,$e[d].vy=E,clearInterval($e[d].pid),0==T&&0==E||(u=!0,$e[d].pid=setInterval(function(){r&&0===this.layer&&Le.active._onTouchMove(Ge);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(Le.dragged.parentNode[jt],n,e,t,Ge,$e[this.layer].el)||Ft($e[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&p!==c&&(p=Nt(p,!1)));Xe=u}}),30),Ze=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,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function tn(){}function en(){}tn.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=It(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:Ze},it(tn,{pluginName:"revertOnSpill"}),en.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Ze},it(en,{pluginName:"removeOnSpill"}),Le.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?mt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?mt(document,"pointermove",this._handleFallbackAutoScroll):e.touches?mt(document,"touchmove",this._handleFallbackAutoScroll):mt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?vt(document,"dragover",this._handleAutoScroll):(vt(document,"pointermove",this._handleFallbackAutoScroll),vt(document,"touchmove",this._handleFallbackAutoScroll),vt(document,"mousemove",this._handleFallbackAutoScroll)),Qe(),Ke(),clearTimeout(Ct),Ct=void 0},nulling:function(){Ge=ze=Ve=Xe=We=Ye=qe=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(Ge=t,e||ut||ct||pt){Je(t,this.options,a,e);var i=Nt(a,!0);!Xe||We&&r===Ye&&o===qe||(We&&Qe(),We=setInterval((function(){var a=Nt(document.elementFromPoint(r,o),!0);a!==i&&(i=a,Ke()),Je(t,n.options,a,e)}),10),Ye=r,qe=o)}else{if(!this.options.bubbleScroll||Nt(a,!0)===Dt())return void Ke();Je(t,this.options,Nt(a,!1),!1)}}},it(t,{pluginName:"scroll",initializeByDefault:!0})}),Le.mount(en,tn);const nn=Le;function rn(t,e,n={}){let r;const{document:o=rt,...i}=n,l={onUpdate:t=>{!function(t,e,n){const r=(0,a.i9)(t),o=r?[...(0,nt.BA)(t)]:(0,nt.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):function(t){var e;const n=(0,nt.BA)(t);return null!=(e=null==n?void 0:n.$el)?e:n}(t);e&&void 0===r&&(r=new nn(e,{...l,...i}))},c=()=>{null==r||r.destroy(),r=void 0};return(0,nt.rd)(s),(0,nt.Uo)(c),{stop:c,start:s,option:(t,e)=>{if(void 0===e)return null==r?void 0:r.option(t);null==r||r.option(t,e)}}}var on=r(54914),an=r(10620),ln=r(41645),sn=r(18740);const cn=(0,a.pM)({name:"AppOrderSelectorElement",components:{IconArrowDown:an.A,IconArrowUp:ln.A,NcButton:sn.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:et.Tl}}});var un=r(56725),dn={};dn.styleTagTransform=G(),dn.setAttributes=V(),dn.insert=H().bind(null,"head"),dn.domAPI=R(),dn.insertStyleElement=Y(),B()(un.A,dn),un.A&&un.A.locals&&un.A.locals;const pn=(0,y.A)(cn,(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,hn=(0,a.pM)({name:"AppOrderSelector",components:{AppOrderSelectorElement:pn,Fragment:on.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);rn(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,et.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}}}),gn=hn;var fn=r(42797),mn={};mn.styleTagTransform=G(),mn.setAttributes=V(),mn.insert=H().bind(null,"head"),mn.domAPI=R(),mn.insertStyleElement=Y(),B()(fn.A,mn),fn.A&&fn.A.locals&&fn.A.locals;var vn=(0,y.A)(gn,(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 bn=vn.exports,An={name:"UndoIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},yn=(0,y.A)(An,(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,"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 Cn=r(80910),_n=r(96763);const wn=(0,a.pM)({name:"UserAppMenuSection",components:{AppOrderSelector:bn,IconUndo:yn,NcButton:sn.A,NcNoteCard:Cn.A,NcSettingsSection:d.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.app===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",u="theming-apporder-changed-infocard",d=(0,a.EW)((()=>(o.value?`${i} `:"")+(e?u:""))),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=>{_n.warn("Could not set the app order",t),(0,p.Qg)((0,et.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){_n.warn(t),(0,p.Qg)((0,et.Tl)("theming","Could not reset the app order"))}},enforcedDefaultApp:e,hasAppOrderChanged:o,hasCustomAppOrder:r,ariaDetailsAppOrder:d,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:u,t:et.Tl}}}),kn=wn;var xn=r(19150),Sn={};Sn.styleTagTransform=G(),Sn.setAttributes=V(),Sn.insert=H().bind(null,"head"),Sn.domAPI=R(),Sn.insertStyleElement=Y(),B()(xn.A,Sn),xn.A&&xn.A.locals&&xn.A.locals;const Dn=(0,y.A)(kn,(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,"8377958c",null).exports;var Tn={grad:.9,turn:360,rad:360/(2*Math.PI)},En=function(t){return"string"==typeof t?t.length>0:"number"==typeof t},In=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},Mn=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),t>n?n:t>e?t:e},On=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},Pn=function(t){return{r:Mn(t.r,0,255),g:Mn(t.g,0,255),b:Mn(t.b,0,255),a:Mn(t.a)}},Nn=function(t){return{r:In(t.r),g:In(t.g),b:In(t.b),a:In(t.a,3)}},Ln=/^#([0-9a-f]{3,8})$/i,Bn=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Fn=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}},Rn=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}},jn=function(t){return{h:On(t.h),s:Mn(t.s,0,100),l:Mn(t.l,0,100),a:Mn(t.a)}},Hn=function(t){return{h:In(t.h),s:In(t.s),l:In(t.l),a:In(t.a,3)}},Un=function(t){return Rn((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},Vn=function(t){return{h:(e=Fn(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},zn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gn=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wn={string:[[function(t){var e=Ln.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?In(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?In(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=qn.exec(t)||Gn.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:Pn({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=zn.exec(t)||Yn.exec(t);if(!e)return null;var n,r,o=jn({h:(n=e[1],r=e[2],void 0===r&&(r="deg"),Number(n)*(Tn[r]||1)),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)});return Un(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 En(e)&&En(n)&&En(r)?Pn({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(!En(e)||!En(n)||!En(r))return null;var i=jn({h:Number(e),s:Number(n),l:Number(r),a:Number(a)});return Un(i)},"hsl"],[function(t){var e=t.h,n=t.s,r=t.v,o=t.a,a=void 0===o?1:o;if(!En(e)||!En(n)||!En(r))return null;var i=function(t){return{h:On(t.h),s:Mn(t.s,0,100),v:Mn(t.v,0,100),a:Mn(t.a)}}({h:Number(e),s:Number(n),v:Number(r),a:Number(a)});return Rn(i)},"hsv"]]},$n=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]},Xn=function(t,e){var n=Vn(t);return{h:n.h,s:Mn(n.s+100*e,0,100),l:n.l,a:n.a}},Kn=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},Qn=function(t,e){var n=Vn(t);return{h:n.h,s:n.s,l:Mn(n.l+100*e,0,100),a:n.a}},Jn=function(){function t(t){this.parsed=function(t){return"string"==typeof t?$n(t.trim(),Wn.string):"object"==typeof t&&null!==t?$n(t,Wn.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 In(Kn(this.rgba),2)},t.prototype.isDark=function(){return Kn(this.rgba)<.5},t.prototype.isLight=function(){return Kn(this.rgba)>=.5},t.prototype.toHex=function(){return e=(t=Nn(this.rgba)).r,n=t.g,r=t.b,a=(o=t.a)<1?Bn(In(255*o)):"","#"+Bn(e)+Bn(n)+Bn(r)+a;var t,e,n,r,o,a},t.prototype.toRgb=function(){return Nn(this.rgba)},t.prototype.toRgbString=function(){return e=(t=Nn(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 Hn(Vn(this.rgba))},t.prototype.toHslString=function(){return e=(t=Hn(Vn(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=Fn(this.rgba),{h:In(t.h),s:In(t.s),v:In(t.v),a:In(t.a,3)};var t},t.prototype.invert=function(){return Zn({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),Zn(Xn(this.rgba,t))},t.prototype.desaturate=function(t){return void 0===t&&(t=.1),Zn(Xn(this.rgba,-t))},t.prototype.grayscale=function(){return Zn(Xn(this.rgba,-1))},t.prototype.lighten=function(t){return void 0===t&&(t=.1),Zn(Qn(this.rgba,t))},t.prototype.darken=function(t){return void 0===t&&(t=.1),Zn(Qn(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?Zn({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):In(this.rgba.a,3);var e},t.prototype.hue=function(t){var e=Vn(this.rgba);return"number"==typeof t?Zn({h:t,s:e.s,l:e.l,a:e.a}):In(e.h)},t.prototype.isEqual=function(t){return this.toHex()===Zn(t).toHex()},t}(),Zn=function(t){return t instanceof Jn?t:new Jn(t)},tr=r(84237);const er={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},nr=(0,y.A)(er,(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,"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;var rr=r(96763);const{primaryColor:or,defaultPrimaryColor:ar}=(0,s.C)("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),ir=(0,a.pM)({name:"UserPrimaryColor",components:{IconColorPalette:w,IconUndo:nr,NcButton:sn.A,NcColorPicker:f.N,NcLoadingIcon:tr.A},emits:["refresh-styles"],data:()=>({primaryColor:or,loading:!1}),computed:{isdefaultPrimaryColor(){return Zn(this.primaryColor).isEqual(Zn(ar))},debouncedOnUpdate(){return g()(this.onUpdate,500)}},methods:{t:et.Tl,reload(){const t=this.$refs.trigger,e=window.getComputedStyle(t).backgroundColor;e.toLowerCase()!==this.primaryColor&&(this.primaryColor=e)},onReset(){this.primaryColor=ar,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){rr.error("Could not update primary color",t),(0,p.Qg)((0,et.Tl)("theming","Could not set primary color"))}this.loading=!1}}}),lr=ir;var sr=r(79799),cr={};cr.styleTagTransform=G(),cr.setAttributes=V(),cr.insert=H().bind(null,"head"),cr.domAPI=R(),cr.insertStyleElement=Y(),B()(sr.A,cr),sr.A&&sr.A.locals&&sr.A.locals;const ur=(0,y.A)(lr,(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;var dr=r(96763);const pr=(0,s.C)("theming","themes",[]),hr=(0,s.C)("theming","enforceTheme",""),gr=(0,s.C)("theming","shortcutsDisabled",!1),fr=(0,s.C)("theming","enableBlurFilter",""),mr=(0,s.C)("theming","isUserThemingDisabled"),vr={name:"UserTheming",components:{ItemPreview:tt,NcCheckboxRadioSwitch:u.A,NcSettingsSection:d.A,BackgroundSettings:X,UserAppMenuSection:Dn,UserPrimaryColor:ur},data:()=>({availableThemes:pr,enforceTheme:hr,shortcutsDisabled:gr,isUserThemingDisabled:mr,enableBlurFilter:fr}),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){dr.error(e,e.response),OC.Notification.showTemporary(t("theming",e.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var br=r(75237),Ar={};Ar.styleTagTransform=G(),Ar.setAttributes=V(),Ar.insert=H().bind(null,"head"),Ar.domAPI=R(),Ar.insertStyleElement=Y(),B()(br.A,Ar),br.A&&br.A.locals&&br.A.locals;const yr=(0,y.A)(vr,(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,"085d6e4c",null).exports;r.nc=(0,o.aV)(),a.Ay.prototype.OC=OC,a.Ay.prototype.t=t;const Cr=new(a.Ay.extend(yr));Cr.$mount("#theming"),Cr.$on("update:background",i)},75237:(t,e,n)=>{"use strict";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-085d6e4c]{max-width:800px}.theming[data-v-085d6e4c] a{font-weight:bold}.theming[data-v-085d6e4c] a:hover,.theming[data-v-085d6e4c] a:focus{text-decoration:underline}.theming__preview-list[data-v-085d6e4c]{--gap: 30px;display:grid;margin-top:var(--gap);column-gap:var(--gap);row-gap:var(--gap)}.background__grid[data-v-085d6e4c]{margin-top:30px}@media(max-width: 1440px){.theming__preview-list[data-v-085d6e4c]{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,CAEA,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&::v-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\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)=>{"use strict";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)=>{"use strict";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},19454:(t,e,n)=>{"use strict";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-5e1df51d]{display:flex;flex-wrap:wrap;justify-content:center}.background-selector .background-color[data-v-5e1df51d]{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-5e1df51d]{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-5e1df51d]{background-color:var(--color-main-text);background-color:var(--color-background-dark)}.background-selector .background__filepicker.background--active[data-v-5e1df51d]{color:var(--color-background-plain-text);background-image:var(--image-background)}.background-selector .background__default[data-v-5e1df51d]{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(--d4172c58)}.background-selector .background__filepicker[data-v-5e1df51d],.background-selector .background__default[data-v-5e1df51d],.background-selector .background__color[data-v-5e1df51d]{border-color:var(--color-border)}.background-selector .background__default[data-v-5e1df51d],.background-selector .background__shipped[data-v-5e1df51d]{color:#fff}.background-selector .background[data-color-bright][data-v-5e1df51d]{color:#000}.background-selector .background--active[data-v-5e1df51d],.background-selector .background[data-v-5e1df51d]:hover,.background-selector .background[data-v-5e1df51d]:focus{outline:2px solid var(--color-main-text) !important;border-color:var(--color-main-background) !important}.background-selector .background span[data-v-5e1df51d]{margin:4px}.background-selector .background .check-icon[data-v-5e1df51d]{display:none}.background-selector .background--active:not(.icon-loading) .check-icon[data-v-5e1df51d]{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,uCAAA,CACA,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-main-text);\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},4374:(t,e,n)=>{"use strict";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-414f94fa]{--ratio: 16;position:relative;display:flex;justify-content:flex-start}.theming__preview[data-v-414f94fa],.theming__preview *[data-v-414f94fa]{user-select:none}.theming__preview-image[data-v-414f94fa]{flex-basis:calc(16px*var(--ratio));flex-shrink:0;height:calc(10px*var(--ratio));margin-right: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-414f94fa]{margin-bottom:10px}.theming__preview-description[data-v-414f94fa]{display:flex;flex-direction:column}.theming__preview-description h3[data-v-414f94fa]{font-weight:bold;margin-bottom:0}.theming__preview-description label[data-v-414f94fa]{padding:12px 0}.theming__preview-warning[data-v-414f94fa]{color:var(--color-warning)}@media(max-width: 682.6666666667px){.theming__preview[data-v-414f94fa]{flex-direction:column}.theming__preview-image[data-v-414f94fa]{margin:0}}","",{version:3,sources:["webpack://./apps/theming/src/components/ItemPreview.vue"],names:[],mappings:"AAGA,mCAEC,WAAA,CAEA,iBAAA,CACA,YAAA,CACA,0BAAA,CAEA,wEAEC,gBAAA,CAGD,yCACC,kCAAA,CACA,aAAA,CACA,8BAAA,CACA,uBAAA,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\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-right: 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},19150:(t,e,n)=>{"use strict";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-8377958c]{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)=>{"use strict";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},80909:(t,e,n)=>{var r=n(30641),o=n(38329)(r);t.exports=o},16574:(t,e,n)=>{var r=n(80909);t.exports=function(t,e){var n=[];return r(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}},30641:(t,e,n)=>{var r=n(86649),o=n(95950);t.exports=function(t,e){return t&&r(t,e,o)}},38329:(t,e,n)=>{var r=n(64894);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var a=n.length,i=e?a:-1,l=Object(n);(e?i--:++i<a)&&!1!==o(l[i],i,l););return n}}},84684:(t,e,n)=>{var r=n(69302),o=n(75288),a=n(36800),i=n(37241),l=Object.prototype,s=l.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&a(e[0],e[1],c)&&(r=1);++n<r;)for(var u=e[n],d=i(u),p=-1,h=d.length;++p<h;){var g=d[p],f=t[g];(void 0===f||o(f,l[g])&&!s.call(t,g))&&(t[g]=u[g])}return t}));t.exports=c},87612:(t,e,n)=>{var r=n(79770),o=n(16574),a=n(15389),i=n(56449);t.exports=function(t,e){return(i(t)?r:o)(t,a(e,3))}},64866:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=r(n(3772)),a=r(n(5820));o.default.DefaultOpts.ImageClass=a.default,t.exports=o.default},38445:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(n(3772)),a=n(32629),i=function(){function t(t,e){void 0===e&&(e={}),this._src=t,this._opts=e,this._opts.filters=a(o.default.DefaultOpts.filters)}return t.prototype.maxColorCount=function(t){return this._opts.colorCount=t,this},t.prototype.maxDimension=function(t){return this._opts.maxDimension=t,this},t.prototype.addFilter=function(t){return this._opts.filters.push(t),this},t.prototype.removeFilter=function(t){var e=this._opts.filters.indexOf(t);return e>0&&this._opts.filters.splice(e),this},t.prototype.clearFilters=function(){return this._opts.filters=[],this},t.prototype.quality=function(t){return this._opts.quality=t,this},t.prototype.useImageClass=function(t){return this._opts.ImageClass=t,this},t.prototype.useGenerator=function(t){return this._opts.generator=t,this},t.prototype.useQuantizer=function(t){return this._opts.quantizer=t,this},t.prototype.build=function(){return new o.default(this._src,this._opts)},t.prototype.getPalette=function(t){return this.build().getPalette(t)},t.prototype.getSwatches=function(t){return this.build().getPalette(t)},t}();e.default=i},93525:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var r=n(17388),o=n(87612),a=function(){function t(t,e){this._rgb=t,this._population=e}return t.applyFilter=function(t,e){return"function"==typeof e?o(t,(function(t){var n=t.r,r=t.g,o=t.b;return e(n,r,o,255)})):t},Object.defineProperty(t.prototype,"r",{get:function(){return this._rgb[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._rgb[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._rgb[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._rgb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hsl",{get:function(){if(!this._hsl){var t=this._rgb,e=t[0],n=t[1],o=t[2];this._hsl=r.rgbToHsl(e,n,o)}return this._hsl},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hex",{get:function(){if(!this._hex){var t=this._rgb,e=t[0],n=t[1],o=t[2];this._hex=r.rgbToHex(e,n,o)}return this._hex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"population",{get:function(){return this._population},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return{rgb:this.rgb,population:this.population}},t.prototype.getRgb=function(){return this._rgb},t.prototype.getHsl=function(){return this.hsl},t.prototype.getPopulation=function(){return this._population},t.prototype.getHex=function(){return this.hex},t.prototype.getYiq=function(){if(!this._yiq){var t=this._rgb;this._yiq=(299*t[0]+587*t[1]+114*t[2])/1e3}return this._yiq},Object.defineProperty(t.prototype,"titleTextColor",{get:function(){return this._titleTextColor||(this._titleTextColor=this.getYiq()<200?"#fff":"#000"),this._titleTextColor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bodyTextColor",{get:function(){return this._bodyTextColor||(this._bodyTextColor=this.getYiq()<150?"#fff":"#000"),this._bodyTextColor},enumerable:!1,configurable:!0}),t.prototype.getTitleTextColor=function(){return this.titleTextColor},t.prototype.getBodyTextColor=function(){return this.bodyTextColor},t}();e.Swatch=a},54824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,r){return r>=125&&!(t>250&&e>250&&n>250)}},53565:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var r=n(54824);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}}),e.combineFilters=function(t){return Array.isArray(t)&&0!==t.length?function(e,n,r,o){if(0===o)return!1;for(var a=0;a<t.length;a++)if(!t[a](e,n,r,o))return!1;return!0}:null}},71593:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93525),o=n(17388),a=n(84684),i={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function l(t,e,n,r,o,a,i,l,s,c){var u=null,d=0;return e.forEach((function(e){var p=e.getHsl(),h=p[1],g=p[2];if(h>=l&&h<=s&&g>=o&&g<=a&&!function(t,e){return t.Vibrant===e||t.DarkVibrant===e||t.LightVibrant===e||t.Muted===e||t.DarkMuted===e||t.LightMuted===e}(t,e)){var f=function(t,e,n,r,o,a,i){function l(t,e){return 1-Math.abs(t-e)}return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=0,o=0;o<t.length;o+=2){var a=t[o],i=t[o+1];n+=a*i,r+=i}return n/r}(l(t,e),i.weightSaturation,l(n,r),i.weightLuma,o/a,i.weightPopulation)}(h,i,g,r,e.getPopulation(),n,c);(null===u||f>d)&&(u=e,d=f)}})),u}e.default=function(t,e){e=a({},e,i);var n=function(t){var e=0;return t.forEach((function(t){e=Math.max(e,t.getPopulation())})),e}(t),s=function(t,e,n){var r={};return r.Vibrant=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.LightVibrant=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.DarkVibrant=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetVibrantSaturation,n.minVibrantSaturation,1,n),r.Muted=l(r,t,e,n.targetNormalLuma,n.minNormalLuma,n.maxNormalLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.LightMuted=l(r,t,e,n.targetLightLuma,n.minLightLuma,1,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r.DarkMuted=l(r,t,e,n.targetDarkLuma,0,n.maxDarkLuma,n.targetMutesSaturation,0,n.maxMutesSaturation,n),r}(t,n,e);return function(t,e,n){if(null===t.Vibrant&&null===t.DarkVibrant&&null===t.LightVibrant){if(null===t.DarkVibrant&&null!==t.DarkMuted){var a=t.DarkMuted.getHsl(),i=a[0],l=a[1],s=a[2];s=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightVibrant&&null!==t.LightMuted){var c=t.LightMuted.getHsl();i=c[0],l=c[1],s=c[2],s=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}}if(null===t.Vibrant&&null!==t.DarkVibrant){var u=t.DarkVibrant.getHsl();i=u[0],l=u[1],s=u[2],s=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}else if(null===t.Vibrant&&null!==t.LightVibrant){var d=t.LightVibrant.getHsl();i=d[0],l=d[1],s=d[2],s=n.targetNormalLuma,t.Vibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.DarkVibrant&&null!==t.Vibrant){var p=t.Vibrant.getHsl();i=p[0],l=p[1],s=p[2],s=n.targetDarkLuma,t.DarkVibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightVibrant&&null!==t.Vibrant){var h=t.Vibrant.getHsl();i=h[0],l=h[1],s=h[2],s=n.targetLightLuma,t.LightVibrant=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.Muted&&null!==t.Vibrant){var g=t.Vibrant.getHsl();i=g[0],l=g[1],s=g[2],s=n.targetMutesSaturation,t.Muted=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.DarkMuted&&null!==t.DarkVibrant){var f=t.DarkVibrant.getHsl();i=f[0],l=f[1],s=f[2],s=n.targetMutesSaturation,t.DarkMuted=new r.Swatch(o.hslToRgb(i,l,s),0)}if(null===t.LightMuted&&null!==t.LightVibrant){var m=t.LightVibrant.getHsl();i=m[0],l=m[1],s=m[2],s=n.targetMutesSaturation,t.LightMuted=new r.Swatch(o.hslToRgb(i,l,s),0)}}(s,0,e),s}},3528:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(71593);Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return r.default}})},59327:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImageBase=void 0;var n=function(){function t(){}return t.prototype.scaleDown=function(t){var e=this.getWidth(),n=this.getHeight(),r=1;if(t.maxDimension>0){var o=Math.max(e,n);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,n*r,r)},t.prototype.applyFilter=function(t){var e=this.getImageData();if("function"==typeof t)for(var n=e.data,r=n.length/4,o=void 0,a=0;a<r;a++)t(n[0+(o=4*a)],n[o+1],n[o+2],n[o+3])||(n[o+3]=0);return Promise.resolve(e)},t}();e.ImageBase=n},5820:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),l=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&a(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var s=n(59327),c=l(n(88835)),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype._initCanvas=function(){var t=this.image,e=this._canvas=document.createElement("canvas"),n=this._context=e.getContext("2d");e.className="vibrant-canvas",e.style.display="none",this._width=e.width=t.width,this._height=e.height=t.height,n.drawImage(t,0,0),document.body.appendChild(e)},e.prototype.load=function(t){var e,n,r,o,a,i,l=this,s=null,u=null;if("string"==typeof t)s=document.createElement("img"),a=t,null===(i=c.parse(a)).protocol&&null===i.host&&null===i.port||(e=window.location.href,n=t,r=c.parse(e),o=c.parse(n),r.protocol===o.protocol&&r.hostname===o.hostname&&r.port===o.port)||(s.crossOrigin="anonymous"),u=s.src=t;else{if(!(t instanceof HTMLImageElement))return Promise.reject(new Error("Cannot load buffer as an image in browser"));s=t,u=t.src}return this.image=s,new Promise((function(t,e){var n=function(){l._initCanvas(),t(l)};s.complete?n():(s.onload=n,s.onerror=function(t){return e(new Error("Fail to load image: "+u))})}))},e.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},e.prototype.update=function(t){this._context.putImageData(t,0,0)},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.resize=function(t,e,n){var r=this,o=r._canvas,a=r._context,i=r.image;this._width=o.width=t,this._height=o.height=e,a.scale(n,n),a.drawImage(i,0,0)},e.prototype.getPixelCount=function(){return this._width*this._height},e.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},e.prototype.remove=function(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},e}(s.ImageBase);e.default=u},5182:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorker=void 0;var r=n(89950);Object.defineProperty(e,"MMCQ",{enumerable:!0,get:function(){return r.default}}),e.WebWorker=null},89950:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(93525),a=r(n(72747)),i=r(n(46839));function l(t,e){for(var n=t.size();t.size()<e;){var r=t.pop();if(!(r&&r.count()>0))break;var o=r.split(),a=o[0],i=o[1];if(t.push(a),i&&i.count()>0&&t.push(i),t.size()===n)break;n=t.size()}}e.default=function(t,e){if(0===t.length||e.colorCount<2||e.colorCount>256)throw new Error("Wrong MMCQ parameters");var n=a.default.build(t),r=n.hist,s=(Object.keys(r).length,new i.default((function(t,e){return t.count()-e.count()})));s.push(n),l(s,.75*e.colorCount);var c=new i.default((function(t,e){return t.count()*t.volume()-e.count()*e.volume()}));return c.contents=s.contents,l(c,e.colorCount-c.size()),function(t){for(var e=[];t.size();){var n=t.pop(),r=n.avg();r[0],r[1],r[2],e.push(new o.Swatch(r,n.count()))}return e}(c)}},46839:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this._comparator=t,this.contents=[],this._sorted=!1}return t.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},t.prototype.push=function(t){this.contents.push(t),this._sorted=!1},t.prototype.peek=function(t){return this._sort(),t="number"==typeof t?t:this.contents.length-1,this.contents[t]},t.prototype.pop=function(){return this._sort(),this.contents.pop()},t.prototype.size=function(){return this.contents.length},t.prototype.map=function(t){return this._sort(),this.contents.map(t)},t}();e.default=n},72747:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17388),o=function(){function t(t,e,n,r,o,a,i){this._volume=-1,this._count=-1,this.dimension={r1:t,r2:e,g1:n,g2:r,b1:o,b2:a},this.hist=i}return t.build=function(e,n){var o,a,i,l,s,c,u,d,p,h=1<<3*r.SIGBITS,g=new Uint32Array(h);o=i=s=0,a=l=c=Number.MAX_VALUE;for(var f=e.length/4,m=0;m<f;){var v=4*m;m++,u=e[v+0],d=e[v+1],p=e[v+2],0!==e[v+3]&&(u>>=r.RSHIFT,d>>=r.RSHIFT,p>>=r.RSHIFT,g[r.getColorIndex(u,d,p)]+=1,u>o&&(o=u),u<a&&(a=u),d>i&&(i=d),d<l&&(l=d),p>s&&(s=p),p<c&&(c=p))}return new t(a,o,l,i,c,s,g)},t.prototype.invalidate=function(){this._volume=this._count=-1,this._avg=null},t.prototype.volume=function(){if(this._volume<0){var t=this.dimension,e=t.r1,n=t.r2,r=t.g1,o=t.g2,a=t.b1,i=t.b2;this._volume=(n-e+1)*(o-r+1)*(i-a+1)}return this._volume},t.prototype.count=function(){if(this._count<0){for(var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=0,u=n;u<=o;u++)for(var d=a;d<=i;d++)for(var p=l;p<=s;p++)c+=t[r.getColorIndex(u,d,p)];this._count=c}return this._count},t.prototype.clone=function(){var e=this.hist,n=this.dimension;return new t(n.r1,n.r2,n.g1,n.g2,n.b1,n.b2,e)},t.prototype.avg=function(){if(!this._avg){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=0,u=1<<8-r.SIGBITS,d=void 0,p=void 0,h=void 0;d=p=h=0;for(var g=n;g<=o;g++)for(var f=a;f<=i;f++)for(var m=l;m<=s;m++){var v=t[r.getColorIndex(g,f,m)];c+=v,d+=v*(g+.5)*u,p+=v*(f+.5)*u,h+=v*(m+.5)*u}this._avg=c?[~~(d/c),~~(p/c),~~(h/c)]:[~~(u*(n+o+1)/2),~~(u*(a+i+1)/2),~~(u*(l+s+1)/2)]}return this._avg},t.prototype.contains=function(t){var e=t[0],n=t[1],o=t[2],a=this.dimension,i=a.r1,l=a.r2,s=a.g1,c=a.g2,u=a.b1,d=a.b2;return e>>=r.RSHIFT,n>>=r.RSHIFT,o>>=r.RSHIFT,e>=i&&e<=l&&n>=s&&n<=c&&o>=u&&o<=d},t.prototype.split=function(){var t=this.hist,e=this.dimension,n=e.r1,o=e.r2,a=e.g1,i=e.g2,l=e.b1,s=e.b2,c=this.count();if(!c)return[];if(1===c)return[this.clone()];var u,d,p=o-n+1,h=i-a+1,g=s-l+1,f=Math.max(p,h,g),m=null;u=d=0;var v=null;if(f===p){v="r",m=new Uint32Array(o+1);for(var b=n;b<=o;b++){u=0;for(var A=a;A<=i;A++)for(var y=l;y<=s;y++)u+=t[r.getColorIndex(b,A,y)];d+=u,m[b]=d}}else if(f===h)for(v="g",m=new Uint32Array(i+1),A=a;A<=i;A++){for(u=0,b=n;b<=o;b++)for(y=l;y<=s;y++)u+=t[r.getColorIndex(b,A,y)];d+=u,m[A]=d}else for(v="b",m=new Uint32Array(s+1),y=l;y<=s;y++){for(u=0,b=n;b<=o;b++)for(A=a;A<=i;A++)u+=t[r.getColorIndex(b,A,y)];d+=u,m[y]=d}for(var C=-1,_=new Uint32Array(m.length),w=0;w<m.length;w++){var k=m[w];C<0&&k>d/2&&(C=w),_[w]=d-k}var x=this;return function(t){var e=t+"1",n=t+"2",r=x.dimension[e],o=x.dimension[n],a=x.clone(),i=x.clone(),l=C-r,s=o-C;for(l<=s?(o=Math.min(o-1,~~(C+s/2)),o=Math.max(0,o)):(o=Math.max(r,~~(C-1-l/2)),o=Math.min(x.dimension[n],o));!m[o];)o++;for(var c=_[o];!c&&m[o-1];)c=_[--o];return a.dimension[n]=o,i.dimension[e]=o+1,[a,i]}(v)},t}();e.default=o},17388:(t,e)=>{"use strict";function n(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return null===e?null:[e[1],e[2],e[3]].map((function(t){return parseInt(t,16)}))}function r(t,e,n){return e/=255,n/=255,t=(t/=255)>.04045?Math.pow((t+.005)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.005)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.005)/1.055,2.4):n/12.92,[.4124*(t*=100)+.3576*(e*=100)+.1805*(n*=100),.2126*t+.7152*e+.0722*n,.0193*t+.1192*e+.9505*n]}function o(t,e,n){return e/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(e=e>.008856?Math.pow(e,1/3):7.787*e+16/116)-16,500*(t-e),200*(e-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function a(t,e,n){var a=r(t,e,n);return o(a[0],a[1],a[2])}function i(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],i=e[1],l=e[2],s=n-a,c=r-i,u=o-l,d=Math.sqrt(r*r+o*o),p=a-n,h=Math.sqrt(i*i+l*l)-d,g=Math.sqrt(s*s+c*c+u*u),f=Math.sqrt(g)>Math.sqrt(Math.abs(p))+Math.sqrt(Math.abs(h))?Math.sqrt(g*g-p*p-h*h):0;return p/=1,h/=1*(1+.045*d),f/=1*(1+.015*d),Math.sqrt(p*p+h*h+f*f)}function l(t,e){return i(a.apply(void 0,t),a.apply(void 0,e))}Object.defineProperty(e,"__esModule",{value:!0}),e.getColorIndex=e.getColorDiffStatus=e.hexDiff=e.rgbDiff=e.deltaE94=e.rgbToCIELab=e.xyzToCIELab=e.rgbToXyz=e.hslToRgb=e.rgbToHsl=e.rgbToHex=e.hexToRgb=e.defer=e.RSHIFT=e.SIGBITS=e.DELTAE94_DIFF_STATUS=void 0,e.DELTAE94_DIFF_STATUS={NA:0,PERFECT:1,CLOSE:2,GOOD:10,SIMILAR:50},e.SIGBITS=5,e.RSHIFT=8-e.SIGBITS,e.defer=function(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return{resolve:t,reject:e,promise:n}},e.hexToRgb=n,e.rgbToHex=function(t,e,n){return"#"+((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1,7)},e.rgbToHsl=function(t,e,n){t/=255,e/=255,n/=255;var r,o,a=Math.max(t,e,n),i=Math.min(t,e,n),l=(a+i)/2;if(a===i)r=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case t:r=(e-n)/s+(e<n?6:0);break;case e:r=(n-t)/s+2;break;case n:r=(t-e)/s+4}r/=6}return[r,o,l]},e.hslToRgb=function(t,e,n){var r,o,a;function i(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0===e)r=o=a=n;else{var l=n<.5?n*(1+e):n+e-n*e,s=2*n-l;r=i(s,l,t+1/3),o=i(s,l,t),a=i(s,l,t-1/3)}return[255*r,255*o,255*a]},e.rgbToXyz=r,e.xyzToCIELab=o,e.rgbToCIELab=a,e.deltaE94=i,e.rgbDiff=l,e.hexDiff=function(t,e){return l(n(t),n(e))},e.getColorDiffStatus=function(t){return t<e.DELTAE94_DIFF_STATUS.NA?"N/A":t<=e.DELTAE94_DIFF_STATUS.PERFECT?"Perfect":t<=e.DELTAE94_DIFF_STATUS.CLOSE?"Close":t<=e.DELTAE94_DIFF_STATUS.GOOD?"Good":t<e.DELTAE94_DIFF_STATUS.SIMILAR?"Similar":"Wrong"},e.getColorIndex=function(t,n,r){return(t<<2*e.SIGBITS)+(n<<e.SIGBITS)+r}},3772:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(93525),s=i(n(38445)),c=a(n(17388)),u=a(n(5182)),d=a(n(3528)),p=a(n(53565)),h=n(84684),g=function(){function t(e,n){this._src=e,this.opts=h({},n,t.DefaultOpts),this.opts.combinedFilter=p.combineFilters(this.opts.filters)}return t.from=function(t){return new s.default(t)},t.prototype._process=function(t,e){var n=e.quantizer,r=e.generator;return t.scaleDown(e),t.applyFilter(e.combinedFilter).then((function(t){return n(t.data,e)})).then((function(t){return l.Swatch.applyFilter(t,e.combinedFilter)})).then((function(t){return Promise.resolve(r(t))}))},t.prototype.palette=function(){return this.swatches()},t.prototype.swatches=function(){return this._palette},t.prototype.getPalette=function(t){var e=this,n=new this.opts.ImageClass,r=n.load(this._src).then((function(t){return e._process(t,e.opts)})).then((function(t){return e._palette=t,n.remove(),t}),(function(t){throw n.remove(),t}));return t&&r.then((function(e){return t(null,e)}),(function(e){return t(e)})),r},t.Builder=s.default,t.Quantizer=u,t.Generator=d,t.Filter=p,t.Util=c,t.Swatch=l.Swatch,t.DefaultOpts={colorCount:64,quality:5,generator:d.Default,ImageClass:null,quantizer:u.MMCQ,filters:[p.Default]},t}();e.default=g},42634:()=>{}},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(u=0;u<e.length;u++){n=e[u][0],r=e[u][1],o=e[u][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(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[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="+{5706:"3153330af47fc26a725a",6127:"374a617a5ed71ccd7362"}[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"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==r+o){l=d;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 u=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(u)},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(57915)));l=i.O(l)})();
  2. //# sourceMappingURL=theming-personal-theming.js.map?v=1b02334889d54f44fe7d