/*! third party licenses: dist/vendor.LICENSE.txt */ import{c6 as A,bV as ee,ca as De,b_ as Y,I as re,bR as q,bZ as pt,c1 as Pe,bW as Me,d7 as oe,bG as Ue,G as ne,a_ as ae,F as ie,a7 as Re,ai as se,bu as Rt,aX as Et,bS as ft,b$ as it,a4 as Ee,aV as Tt}from"./core-common.mjs";import{A as Fe,w as Ft,r as ue}from"./chunks/index-CG7xFxrZ.mjs";import{R as Ne}from"./chunks/index-D0hy_tCT.mjs";import{J as Ve,f as qe,l as Be}from"./chunks/_overRest-DjFtaWRq.mjs";import{_ as ze}from"./chunks/_baseEach-BuCj9lAy.mjs";import{a as He,h as Ge}from"./chunks/_baseIteratee-CdKuEoft.mjs";import{d as $e,a as Ke}from"./chunks/index-DCgLaXhm.mjs";import{a as We,b as Qe}from"./chunks/_isIterateeCall-CX-rKv74.mjs";import{e as Xe}from"./chunks/_setToArray-V03nfpyh.mjs";import{ac as Ye,b1 as le,bv as Ze,n as gt,bw as Je,b0 as tr}from"./chunks/icons-TElqpmA8.mjs";import{z as wt}from"./chunks/_plugin-vue2_normalizer-VrK6B12S-BQkexw0P.mjs";import"./chunks/index-PaKKd09k.mjs";import"./chunks/sortable.esm-D5slCXxa.mjs";import"./chunks/preload-helper-BG02UnR2.mjs";import"./chunks/isSymbol-CFNg2trq.mjs";var ht={},mt={};(function(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;function o(){var u,h,d=new Promise(function(v,g){u=v,h=g});return{resolve:u,reject:h,promise:d}}e.defer=o;function r(u){var h=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(u);return h===null?null:[h[1],h[2],h[3]].map(function(d){return parseInt(d,16)})}e.hexToRgb=r;function n(u,h,d){return"#"+((1<<24)+(u<<16)+(h<<8)+d).toString(16).slice(1,7)}e.rgbToHex=n;function a(u,h,d){u/=255,h/=255,d/=255;var v=Math.max(u,h,d),g=Math.min(u,h,d),_,C,T=(v+g)/2;if(v===g)_=C=0;else{var I=v-g;switch(C=T>.5?I/(2-v-g):I/(v+g),v){case u:_=(h-d)/I+(h1&&(O-=1),O<1/6?D+(x-D)*6*O:O<1/2?x:O<2/3?D+(x-D)*(2/3-O)*6:D}if(h===0)v=g=_=d;else{var T=d<.5?d*(1+h):d+h-d*h,I=2*d-T;v=C(I,T,u+1/3),g=C(I,T,u),_=C(I,T,u-1/3)}return[v*255,g*255,_*255]}e.hslToRgb=i;function s(u,h,d){u/=255,h/=255,d/=255,u=u>.04045?Math.pow((u+.005)/1.055,2.4):u/12.92,h=h>.04045?Math.pow((h+.005)/1.055,2.4):h/12.92,d=d>.04045?Math.pow((d+.005)/1.055,2.4):d/12.92,u*=100,h*=100,d*=100;var v=u*.4124+h*.3576+d*.1805,g=u*.2126+h*.7152+d*.0722,_=u*.0193+h*.1192+d*.9505;return[v,g,_]}e.rgbToXyz=s;function l(u,h,d){var v=95.047,g=100,_=108.883;u/=v,h/=g,d/=_,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,h=h>.008856?Math.pow(h,1/3):7.787*h+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116;var C=116*h-16,T=500*(u-h),I=200*(h-d);return[C,T,I]}e.xyzToCIELab=l;function f(u,h,d){var v=s(u,h,d),g=v[0],_=v[1],C=v[2];return l(g,_,C)}e.rgbToCIELab=f;function m(u,h){var d=1,v=1,g=1,_=u[0],C=u[1],T=u[2],I=h[0],D=h[1],x=h[2],O=_-I,M=C-D,$=T-x,K=Math.sqrt(C*C+T*T),z=Math.sqrt(D*D+x*x),U=I-_,E=z-K,L=Math.sqrt(O*O+M*M+$*$),W=Math.sqrt(L)>Math.sqrt(Math.abs(U))+Math.sqrt(Math.abs(E))?Math.sqrt(L*L-U*U-E*E):0,st=1+.045*K,ut=1+.015*K;return U/=d,E/=v*st,W/=g*ut,Math.sqrt(U*U+E*E+W*W)}e.deltaE94=m;function b(u,h){var d=f.apply(void 0,u),v=f.apply(void 0,h);return m(d,v)}e.rgbDiff=b;function w(u,h){var d=r(u),v=r(h);return b(d,v)}e.hexDiff=w;function c(u){return u0&&this._opts.filters.splice(s),this},a.prototype.clearFilters=function(){return this._opts.filters=[],this},a.prototype.quality=function(i){return this._opts.quality=i,this},a.prototype.useImageClass=function(i){return this._opts.ImageClass=i,this},a.prototype.useGenerator=function(i){return this._opts.generator=i,this},a.prototype.useQuantizer=function(i){return this._opts.quantizer=i,this},a.prototype.build=function(){return new o.default(this._src,this._opts)},a.prototype.getPalette=function(i){return this.build().getPalette(i)},a.prototype.getSwatches=function(i){return this.build().getPalette(i)},a}();return yt.default=n,yt}var ce={},It={},Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});var V=mt,dr=function(){function e(o,r,n,a,i,s,l){this._volume=-1,this._count=-1,this.dimension={r1:o,r2:r,g1:n,g2:a,b1:i,b2:s},this.hist=l}return e.build=function(o,r){var n=1<<3*V.SIGBITS,a=new Uint32Array(n),i,s,l,f,m,b,w,c,p,u;i=l=m=0,s=f=b=Number.MAX_VALUE;for(var h=o.length/4,d=0;d>V.RSHIFT,c=c>>V.RSHIFT,p=p>>V.RSHIFT;var g=V.getColorIndex(w,c,p);a[g]+=1,w>i&&(i=w),wl&&(l=c),cm&&(m=p),p>=V.RSHIFT,n>>=V.RSHIFT,a>>=V.RSHIFT,r>=s&&r<=l&&n>=f&&n<=m&&a>=b&&a<=w},e.prototype.split=function(){var o=this.hist,r=this.dimension,n=r.r1,a=r.r2,i=r.g1,s=r.g2,l=r.b1,f=r.b2,m=this.count();if(!m)return[];if(m===1)return[this.clone()];var b=a-n+1,w=s-i+1,c=f-l+1,p=Math.max(b,w,c),u=null,h,d;h=d=0;var v=null;if(p===b){v="r",u=new Uint32Array(a+1);for(var g=n;g<=a;g++){h=0;for(var _=i;_<=s;_++)for(var C=l;C<=f;C++){var T=V.getColorIndex(g,_,C);h+=o[T]}d+=h,u[g]=d}}else if(p===w){v="g",u=new Uint32Array(s+1);for(var _=i;_<=s;_++){h=0;for(var g=n;g<=a;g++)for(var C=l;C<=f;C++){var T=V.getColorIndex(g,_,C);h+=o[T]}d+=h,u[_]=d}}else{v="b",u=new Uint32Array(f+1);for(var C=l;C<=f;C++){h=0;for(var g=n;g<=a;g++)for(var _=i;_<=s;_++){var T=V.getColorIndex(g,_,C);h+=o[T]}d+=h,u[C]=d}}for(var I=-1,D=new Uint32Array(u.length),x=0;xd/2&&(I=x),D[x]=d-O}var M=this;function $(K){var z=K+"1",U=K+"2",E=M.dimension[z],L=M.dimension[U],W=M.clone(),st=M.clone(),ut=I-E,y=L-I;for(ut<=y?(L=Math.min(L-1,~~(I+y/2)),L=Math.max(0,L)):(L=Math.max(E,~~(I-1-ut/2)),L=Math.min(M.dimension[U],L));!u[L];)L++;for(var k=D[L];!k&&u[L-1];)k=D[--L];return W.dimension[U]=L,st.dimension[z]=L+1,[W,st]}return $(v)},e}();Dt.default=dr;var Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});var fr=function(){function e(o){this._comparator=o,this.contents=[],this._sorted=!1}return e.prototype._sort=function(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)},e.prototype.push=function(o){this.contents.push(o),this._sorted=!1},e.prototype.peek=function(o){return this._sort(),o=typeof o=="number"?o:this.contents.length-1,this.contents[o]},e.prototype.pop=function(){return this._sort(),this.contents.pop()},e.prototype.size=function(){return this.contents.length},e.prototype.map=function(o){return this._sort(),this.contents.map(o)},e}();Pt.default=fr;var he=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(It,"__esModule",{value:!0});var gr=ht,mr=he(Dt),qt=he(Pt),br=.75;function Bt(e,o){for(var r=e.size();e.size()0){var a=n.split(),i=a[0],s=a[1];if(e.push(i),s&&s.count()>0&&e.push(s),e.size()===r)break;r=e.size()}else break}}var vr=function(e,o){if(e.length===0||o.colorCount<2||o.colorCount>256)throw new Error("Wrong MMCQ parameters");var r=mr.default.build(e),n=r.hist;Object.keys(n).length;var a=new qt.default(function(s,l){return s.count()-l.count()});a.push(r),Bt(a,br*o.colorCount);var i=new qt.default(function(s,l){return s.count()*s.volume()-l.count()*l.volume()});return i.contents=a.contents,Bt(i,o.colorCount-i.size()),yr(i)};function yr(e){for(var o=[];e.size();){var r=e.pop(),n=r.avg();n[0],n[1],n[2],o.push(new gr.Swatch(n,r.count()))}return o}It.default=vr,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorker=void 0;var o=It;Object.defineProperty(e,"MMCQ",{enumerable:!0,get:function(){return o.default}}),e.WebWorker=null}(ce);var pe={},St={},_r=We,wr=Xe,kr=Qe,Cr=Be,de=Object.prototype,Tr=de.hasOwnProperty,Ir=_r(function(e,o){e=Object(e);var r=-1,n=o.length,a=n>2?o[2]:void 0;for(a&&kr(o[0],o[1],a)&&(n=1);++r=l&&u<=f&&h>=a&&h<=i&&!Lr(e,c)){var d=Ar(u,s,h,n,c.getPopulation(),r,m);(b===null||d>w)&&(b=c,w=d)}}),b}function jr(e,o,r){var n={};return n.Vibrant=lt(n,e,o,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.LightVibrant=lt(n,e,o,r.targetLightLuma,r.minLightLuma,1,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.DarkVibrant=lt(n,e,o,r.targetDarkLuma,0,r.maxDarkLuma,r.targetVibrantSaturation,r.minVibrantSaturation,1,r),n.Muted=lt(n,e,o,r.targetNormalLuma,r.minNormalLuma,r.maxNormalLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.LightMuted=lt(n,e,o,r.targetLightLuma,r.minLightLuma,1,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n.DarkMuted=lt(n,e,o,r.targetDarkLuma,0,r.maxDarkLuma,r.targetMutesSaturation,0,r.maxMutesSaturation,r),n}function Dr(e,o,r){if(e.Vibrant===null&&e.DarkVibrant===null&&e.LightVibrant===null){if(e.DarkVibrant===null&&e.DarkMuted!==null){var n=e.DarkMuted.getHsl(),a=n[0],i=n[1],s=n[2];s=r.targetDarkLuma,e.DarkVibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.LightVibrant===null&&e.LightMuted!==null){var l=e.LightMuted.getHsl(),a=l[0],i=l[1],s=l[2];s=r.targetDarkLuma,e.DarkVibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}}if(e.Vibrant===null&&e.DarkVibrant!==null){var f=e.DarkVibrant.getHsl(),a=f[0],i=f[1],s=f[2];s=r.targetNormalLuma,e.Vibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}else if(e.Vibrant===null&&e.LightVibrant!==null){var m=e.LightVibrant.getHsl(),a=m[0],i=m[1],s=m[2];s=r.targetNormalLuma,e.Vibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.DarkVibrant===null&&e.Vibrant!==null){var b=e.Vibrant.getHsl(),a=b[0],i=b[1],s=b[2];s=r.targetDarkLuma,e.DarkVibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.LightVibrant===null&&e.Vibrant!==null){var w=e.Vibrant.getHsl(),a=w[0],i=w[1],s=w[2];s=r.targetLightLuma,e.LightVibrant=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.Muted===null&&e.Vibrant!==null){var c=e.Vibrant.getHsl(),a=c[0],i=c[1],s=c[2];s=r.targetMutesSaturation,e.Muted=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.DarkMuted===null&&e.DarkVibrant!==null){var p=e.DarkVibrant.getHsl(),a=p[0],i=p[1],s=p[2];s=r.targetMutesSaturation,e.DarkMuted=new et.Swatch(rt.hslToRgb(a,i,s),0)}if(e.LightMuted===null&&e.LightVibrant!==null){var u=e.LightVibrant.getHsl(),a=u[0],i=u[1],s=u[2];s=r.targetMutesSaturation,e.LightMuted=new et.Swatch(rt.hslToRgb(a,i,s),0)}}var Pr=function(e,o){o=Sr({},o,xr);var r=Or(e),n=jr(e,r,o);return Dr(n,r,o),n};St.default=Pr,function(e){Object.defineProperty(e,"__esModule",{value:!0});var o=St;Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return o.default}})}(pe);var ge={},xt={};Object.defineProperty(xt,"__esModule",{value:!0});function Mr(e,o,r,n){return n>=125&&!(e>250&&o>250&&r>250)}xt.default=Mr,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.combineFilters=void 0;var o=xt;Object.defineProperty(e,"Default",{enumerable:!0,get:function(){return o.default}});function r(n){return!Array.isArray(n)||n.length===0?null:function(a,i,s,l){if(l===0)return!1;for(var f=0;f0){var i=Math.max(r,n);i>o.maxDimension&&(a=o.maxDimension/i)}else a=1/o.quality;a<1&&this.resize(r*a,n*a,a)},e.prototype.applyFilter=function(o){var r=this.getImageData();if(typeof o=="function")for(var n=r.data,a=n.length/4,i=void 0,s=void 0,l=void 0,f=void 0,m=void 0,b=0;b= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=f-m,T=Math.floor,I=String.fromCharCode,D;function x(y){throw new RangeError(_[y])}function O(y,k){for(var S=y.length,j=[];S--;)j[S]=k(y[S]);return j}function M(y,k){var S=y.split("@"),j="";S.length>1&&(j=S[0]+"@",y=S[1]),y=y.replace(g,".");var P=y.split("."),N=O(P,k).join(".");return j+N}function $(y){for(var k=[],S=0,j=y.length,P,N;S=55296&&P<=56319&&S65535&&(k-=65536,S+=I(k>>>10&1023|55296),k=56320|k&1023),S+=I(k),S}).join("")}function z(y){return y-48<10?y-22:y-65<26?y-65:y-97<26?y-97:f}function U(y,k){return y+22+75*(y<26)-((k!=0)<<5)}function E(y,k,S){var j=0;for(y=S?T(y/c):y>>1,y+=T(y/k);y>C*b>>1;j+=f)y=T(y/C);return T(j+(C+1)*y/(y+w))}function L(y){var k=[],S=y.length,j,P=0,N=u,R=p,B,Q,Z,tt,F,H,X,ot,at;for(B=y.lastIndexOf(h),B<0&&(B=0),Q=0;Q=128&&x("not-basic"),k.push(y.charCodeAt(Q));for(Z=B>0?B+1:0;Z=S&&x("invalid-input"),X=z(y.charCodeAt(Z++)),(X>=f||X>T((l-P)/F))&&x("overflow"),P+=X*F,ot=H<=R?m:H>=R+b?b:H-R,!(XT(l/at)&&x("overflow"),F*=at;j=k.length+1,R=E(P-tt,j,tt==0),T(P/j)>l-N&&x("overflow"),N+=T(P/j),P%=j,k.splice(P++,0,N)}return K(k)}function W(y){var k,S,j,P,N,R,B,Q,Z,tt,F,H=[],X,ot,at,Ct;for(y=$(y),X=y.length,k=u,S=0,N=p,R=0;R=k&&FT((l-S)/ot)&&x("overflow"),S+=(B-k)*ot,k=B,R=0;Rl&&x("overflow"),F==k){for(Q=S,Z=f;tt=Z<=N?m:Z>=N+b?b:Z-N,!(Q0&&l>s&&(l=s);for(var f=0;f=0?(w=m.substr(0,b),c=m.substr(b+1)):(w=m,c=""),p=decodeURIComponent(w),u=decodeURIComponent(c),Fr(a,p)?Vr(a[p])?a[p].push(u):a[p]=[a[p],u]:a[p]=u}return a},Vr=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},dt=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},qr=function(e,o,r,n){return o=o||"&",r=r||"=",e===null&&(e=void 0),typeof e=="object"?Ht(zr(e),function(a){var i=encodeURIComponent(dt(a))+r;return Br(e[a])?Ht(e[a],function(s){return i+encodeURIComponent(dt(s))}).join(o):i+encodeURIComponent(dt(e[a]))}).join(o):n?encodeURIComponent(dt(n))+r+encodeURIComponent(dt(e)):""},Br=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function Ht(e,o){if(e.map)return e.map(o);for(var r=[],n=0;n",'"',"`"," ","\r","\n"," "],ao=["{","}","|","\\","^","`"].concat(no),Ot=["'"].concat(ao),Gt=["%","/","?",";","#"].concat(Ot),$t=["/","?","#"],io=255,Kt=/^[+a-z0-9A-Z_-]{0,63}$/,so=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,uo={javascript:!0,"javascript:":!0},Lt={javascript:!0,"javascript:":!0},ct={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},At=Wr;function bt(e,o,r){if(e&&J.isObject(e)&&e instanceof G)return e;var n=new G;return n.parse(e,o,r),n}G.prototype.parse=function(e,o,r){if(!J.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),a=n!==-1&&n127?T+="x":T+=C[I];if(!T.match(Kt)){var x=g.slice(0,p),O=g.slice(p+1),M=C.match(so);M&&(x.push(M[1]),O.unshift(M[2])),O.length&&(l="/"+O.join(".")+l),this.hostname=x.join(".");break}}}this.hostname.length>io?this.hostname="":this.hostname=this.hostname.toLowerCase(),v||(this.hostname=Xr.toASCII(this.hostname));var $=this.port?":"+this.port:"",K=this.hostname||"";this.host=K+$,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!uo[b])for(var p=0,_=Ot.length;p<_;p++){var z=Ot[p];if(l.indexOf(z)!==-1){var U=encodeURIComponent(z);U===z&&(U=escape(z)),l=l.split(z).join(U)}}var E=l.indexOf("#");E!==-1&&(this.hash=l.substr(E),l=l.slice(0,E));var L=l.indexOf("?");if(L!==-1?(this.search=l.substr(L),this.query=l.substr(L+1),o&&(this.query=At.parse(this.query)),l=l.slice(0,L)):o&&(this.search="",this.query={}),l&&(this.pathname=l),ct[b]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",W=this.search||"";this.path=$+W}return this.href=this.format(),this};function lo(e){return J.isString(e)&&(e=bt(e)),e instanceof G?e.format():G.prototype.format.call(e)}G.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var o=this.protocol||"",r=this.pathname||"",n=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&J.isObject(this.query)&&Object.keys(this.query).length&&(i=At.stringify(this.query));var s=this.search||i&&"?"+i||"";return o&&o.substr(-1)!==":"&&(o+=":"),this.slashes||(!o||ct[o])&&a!==!1?(a="//"+(a||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):a||(a=""),n&&n.charAt(0)!=="#"&&(n="#"+n),s&&s.charAt(0)!=="?"&&(s="?"+s),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),s=s.replace("#","%23"),o+a+r+s+n};function co(e,o){return bt(e,!1,!0).resolve(o)}G.prototype.resolve=function(e){return this.resolveObject(bt(e,!1,!0)).format()};function ho(e,o){return e?bt(e,!1,!0).resolveObject(o):o}G.prototype.resolveObject=function(e){if(J.isString(e)){var o=new G;o.parse(e,!1,!0),e=o}for(var r=new G,n=Object.keys(this),a=0;a0?r.host.split("@"):!1;T&&(r.auth=T.shift(),r.host=r.hostname=T.shift())}return r.search=e.search,r.query=e.query,(!J.isNull(r.pathname)||!J.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!g.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=g.slice(-1)[0],D=(r.host||e.host||g.length>1)&&(I==="."||I==="..")||I==="",x=0,O=g.length;O>=0;O--)I=g[O],I==="."?g.splice(O,1):I===".."?(g.splice(O,1),x++):x&&(g.splice(O,1),x--);if(!d&&!v)for(;x--;x)g.unshift("..");d&&g[0]!==""&&(!g[0]||g[0].charAt(0)!=="/")&&g.unshift(""),D&&g.join("/").substr(-1)!=="/"&&g.push("");var M=g[0]===""||g[0]&&g[0].charAt(0)==="/";if(C){r.hostname=r.host=M?"":g.length?g.shift():"";var T=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;T&&(r.auth=T.shift(),r.host=r.hostname=T.shift())}return d=d||r.host&&g.length,d&&!M&&g.unshift(""),g.length?r.pathname=g.join("/"):(r.pathname=null,r.path=null),(!J.isNull(r.pathname)||!J.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},G.prototype.parseHost=function(){var e=this.host,o=ro.exec(e);o&&(o=o[0],o!==":"&&(this.port=o.substr(1)),e=e.substr(0,e.length-o.length)),e&&(this.hostname=e)};function po(e,o){for(var r=0,n=e.length-1;n>=0;n--){var a=e[n];a==="."?e.splice(n,1):a===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(o)for(;r--;r)e.unshift("..");return e}function fo(){for(var e="",o=!1,r=arguments.length-1;r>=-1&&!o;r--){var n=r>=0?arguments[r]:"/";if(typeof n!="string")throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,o=n.charAt(0)==="/")}return e=po(go(e.split("/"),function(a){return!!a}),!o).join("/"),(o?"/":"")+e||"."}function go(e,o){if(e.filter)return e.filter(o);for(var r=[],n=0;n"u")throw new TypeError('The "domain" argument must be specified');return new nt("http://"+e).hostname},Se=function(e){if(typeof e>"u")throw new TypeError('The "domain" argument must be specified');return new nt("http://"+e).hostname},xe=function(e){var o=new nt("file://"),r=fo(e),n=e.charCodeAt(e.length-1);return n===ko&&r[r.length-1]!=="/"&&(r+="/"),o.pathname=Io(r),o},Oe=function(e){if(!Co(e)&&typeof e!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+" ("+e+")");var o=new nt(e);if(o.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return To(o)},Le=function(e,o){var r,n,a;if(o===void 0&&(o={}),!(e instanceof nt))return mo(e);if(typeof o!="object"||o===null)throw new TypeError('The "options" argument must be of type object.');var i=(r=o.auth)!=null?r:!0,s=(n=o.fragment)!=null?n:!0,l=(a=o.search)!=null?a:!0,f=new nt(e.toString());return i||(f.username="",f.password=""),s||(f.hash=""),l||(f.search=""),f.toString()},So={format:Le,parse:we,resolve:ke,resolveObject:ye,Url:Ce,URL:nt,URLSearchParams:Te,domainToASCII:Ie,domainToUnicode:Se,pathToFileURL:xe,fileURLToPath:Oe};const xo=Object.freeze(Object.defineProperty({__proto__:null,URL:nt,URLSearchParams:Te,Url:Ce,default:So,domainToASCII:Ie,domainToUnicode:Se,fileURLToPath:Oe,format:Le,parse:we,pathToFileURL:xe,resolve:ke,resolveObject:ye},Symbol.toStringTag,{value:"Module"})),Oo=De(xo);var Lo=A&&A.__extends||function(){var e=function(o,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)a.hasOwnProperty(i)&&(n[i]=a[i])},e(o,r)};return function(o,r){e(o,r);function n(){this.constructor=o}o.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ao=A&&A.__createBinding||(Object.create?function(e,o,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return o[r]}})}:function(e,o,r,n){n===void 0&&(n=r),e[n]=o[r]}),jo=A&&A.__setModuleDefault||(Object.create?function(e,o){Object.defineProperty(e,"default",{enumerable:!0,value:o})}:function(e,o){e.default=o}),Do=A&&A.__importStar||function(e){if(e&&e.__esModule)return e;var o={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ao(o,e,r);return jo(o,e),o};Object.defineProperty(Mt,"__esModule",{value:!0});var Po=kt,jt=Do(Oo);function Mo(e){var o=jt.parse(e);return o.protocol===null&&o.host===null&&o.port===null}function Uo(e,o){var r=jt.parse(e),n=jt.parse(o);return r.protocol===n.protocol&&r.hostname===n.hostname&&r.port===n.port}var Ro=function(e){Lo(o,e);function o(){return e!==null&&e.apply(this,arguments)||this}return o.prototype._initCanvas=function(){var r=this.image,n=this._canvas=document.createElement("canvas"),a=this._context=n.getContext("2d");n.className="vibrant-canvas",n.style.display="none",this._width=n.width=r.width,this._height=n.height=r.height,a.drawImage(r,0,0),document.body.appendChild(n)},o.prototype.load=function(r){var n=this,a=null,i=null;if(typeof r=="string")a=document.createElement("img"),!Mo(r)&&!Uo(window.location.href,r)&&(a.crossOrigin="anonymous"),i=a.src=r;else if(r instanceof HTMLImageElement)a=r,i=r.src;else return Promise.reject(new Error("Cannot load buffer as an image in browser"));return this.image=a,new Promise(function(s,l){var f=function(){n._initCanvas(),s(n)};a.complete?f():(a.onload=f,a.onerror=function(m){return l(new Error("Fail to load image: "+i))})})},o.prototype.clear=function(){this._context.clearRect(0,0,this._width,this._height)},o.prototype.update=function(r){this._context.putImageData(r,0,0)},o.prototype.getWidth=function(){return this._width},o.prototype.getHeight=function(){return this._height},o.prototype.resize=function(r,n,a){var i=this,s=i._canvas,l=i._context,f=i.image;this._width=s.width=r,this._height=s.height=n,l.scale(a,a),l.drawImage(f,0,0)},o.prototype.getPixelCount=function(){return this._width*this._height},o.prototype.getImageData=function(){return this._context.getImageData(0,0,this._width,this._height)},o.prototype.remove=function(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)},o}(Po.ImageBase);Mt.default=Ro;var Ae=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},je=Ae(me()),Eo=Ae(Mt);je.default.DefaultOpts.ImageClass=Eo.default;var Fo=je.default;const No=ee(Fo),Wt=Y("theming","shippedBackgrounds"),Vo=Y("theming","userBackgroundImage"),{backgroundImage:qo,backgroundColor:Rn,backgroundMime:Qt,defaultShippedBackground:Bo}=Y("theming","themingDefaults"),Xt=e=>oe("theming","","img/background/")+e,Ut={name:"BackgroundSettings",components:{Check:Ye,ColorPalette:le,ImageEdit:Ze,NcColorPicker:re},data(){return{loading:!1,Theming:Y("theming","data",{}),backgroundImage:Vo}},computed:{shippedBackgrounds(){return Object.keys(Wt).filter(e=>e!==Bo||!this.isGlobalBackgroundDefault).map(e=>({name:e,url:Xt(e),preview:Xt("preview/"+e),details:Wt[e]}))},isGlobalBackgroundDefault(){return Qt===""},isGlobalBackgroundDeleted(){return Qt==="backgroundColor"},cssDefaultBackgroundImage(){return"url('".concat(qo,"')")}},methods:{invertTextColor(e){return this.calculateLuma(e)>.6},calculateLuma(e){const[o,r,n]=this.hexToRGB(e);return(.2126*o+.7152*r+.0722*n)/255},hexToRGB(e){const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return o?[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]:null},async update(e){this.backgroundImage=e.backgroundImage,this.Theming.backgroundColor=e.backgroundColor,this.$emit("update:background"),this.loading=!1},async setDefault(){this.loading="default";const e=await q.post(pt("/apps/theming/background/default"));this.update(e.data)},async setShipped(e){this.loading=e;const o=await q.post(pt("/apps/theming/background/shipped"),{value:e});this.update(o.data)},async setFile(e,o=null){this.loading="custom";const r=await q.post(pt("/apps/theming/background/custom"),{value:e,color:o});this.update(r.data)},async removeBackground(){this.loading="remove";const e=await q.delete(pt("/apps/theming/background/custom"));this.update(e.data)},async pickColor(e){this.loading="color";const{data:o}=await q.post(pt("/apps/theming/background/color"),{color:e||"#0082c9"});this.update(o)},debouncePickColor:$e(function(...e){this.pickColor(...e)},200),pickFile(){Ne(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:e=>{var o;this.applyFile((o=e[0])==null?void 0:o.path)},type:"primary"}).build().pick()},async applyFile(e){var n;if(!e||typeof e!="string"||e.trim().length===0||e==="/"){console.error("No valid background have been selected",{path:e}),wt(t("theming","No background has been selected"));return}this.loading="custom";let o=null,r=null;try{const a=Pe("dav/files/"+Me().uid+e);o=await q.get(a,{responseType:"blob"});const i=URL.createObjectURL(o.data),s=await this.getColorPaletteFromBlob(i);r=(n=s==null?void 0:s.DarkVibrant)==null?void 0:n.hex,this.setFile(e,r),console.debug("Extracted colour",r,"from custom image",e,s)}catch(a){this.setFile(e),console.error("Unable to extract colour from custom image",{error:a,path:e,response:o,color:r})}},getColorPaletteFromBlob(e){return new Promise((o,r)=>{new No(e).getPalette((n,a)=>{n&&r(n),o(a)})})}}},Yt=()=>{Ue((e,o)=>({"0f638dec":e.cssDefaultBackgroundImage}))},Zt=Ut.setup;Ut.setup=Zt?(e,o)=>(Yt(),Zt(e,o)):Yt;const zo=Ut;var Ho=function(){var e=this,o=e._self._c;return o("div",{staticClass:"background-selector",attrs:{"data-user-theming-background-settings":""}},[o("button",{class:{"icon-loading":e.loading==="custom","background background__filepicker":!0,"background--active":e.backgroundImage==="custom"},attrs:{"aria-pressed":e.backgroundImage==="custom","data-user-theming-background-custom":"",tabindex:"0"},on:{click:e.pickFile}},[e._v(" "+e._s(e.t("theming","Custom background"))+" "),e.backgroundImage!=="custom"?o("ImageEdit",{attrs:{size:20}}):e._e(),o("Check",{attrs:{size:44}})],1),o("NcColorPicker",{on:{"update:value":e.debouncePickColor},model:{value:e.Theming.backgroundColor,callback:function(r){e.$set(e.Theming,"backgroundColor",r)},expression:"Theming.backgroundColor"}},[o("button",{class:{"icon-loading":e.loading==="color","background background__color":!0,"background--active":e.backgroundImage==="color"},style:{backgroundColor:e.Theming.backgroundColor,"--border-color":e.Theming.backgroundColor},attrs:{"aria-pressed":e.backgroundImage==="color","data-color":e.Theming.backgroundColor,"data-color-bright":e.invertTextColor(e.Theming.backgroundColor),"data-user-theming-background-color":"",tabindex:"0"},on:{click:function(r){e.backgroundImage!=="color"&&e.debouncePickColor(e.Theming.backgroundColor)}}},[e._v(" "+e._s(e.t("theming","Plain background"))+" "),e.backgroundImage!=="color"?o("ColorPalette",{attrs:{size:20}}):e._e(),o("Check",{attrs:{size:44}})],1)]),o("button",{class:{"icon-loading":e.loading==="default","background background__default":!0,"background--active":e.backgroundImage==="default"},style:{"--border-color":e.Theming.defaultBackgroundColor},attrs:{"aria-pressed":e.backgroundImage==="default","data-color-bright":e.invertTextColor(e.Theming.defaultBackgroundColor),"data-user-theming-background-default":"",tabindex:"0"},on:{click:e.setDefault}},[e._v(" "+e._s(e.t("theming","Default background"))+" "),o("Check",{attrs:{size:44}})],1),e._l(e.shippedBackgrounds,function(r){return o("button",{key:r.name,class:{"background background__shipped":!0,"icon-loading":e.loading===r.name,"background--active":e.backgroundImage===r.name},style:{backgroundImage:"url("+r.preview+")","--border-color":r.details.primary_color},attrs:{title:r.details.attribution,"aria-label":r.details.description,"aria-pressed":e.backgroundImage===r.name,"data-color-bright":e.invertTextColor(r.details.background_color),"data-user-theming-background-shipped":r.name,tabindex:"0"},on:{click:function(n){return e.setShipped(r.name)}}},[o("Check",{attrs:{size:44}})],1)})],2)},Go=[],$o=gt(zo,Ho,Go,!1,null,"32679e01");const Ko=$o.exports,Wo={name:"ItemPreview",components:{NcCheckboxRadioSwitch:ne},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 oe("theming","img",this.theme.id+".jpg")},checked:{get(){return this.selected},set(e){if(console.debug("Changed theme",this.theme.id,e),!this.unique){this.$emit("change",{enabled:!0,id:this.theme.id});return}this.$emit("change",{enabled:e===!0,id:this.theme.id})}}},methods:{onToggle(){if(this.switchType==="radio"){this.checked=!0;return}this.checked=!this.checked}}};var Qo=function(){var e=this,o=e._self._c;return o("div",{staticClass:"theming__preview",class:"theming__preview--"+e.theme.id},[o("div",{staticClass:"theming__preview-image",style:{backgroundImage:"url("+e.img+")"},on:{click:e.onToggle}}),o("div",{staticClass:"theming__preview-description"},[o("h3",[e._v(e._s(e.theme.title))]),o("p",{staticClass:"theming__preview-explanation"},[e._v(e._s(e.theme.description))]),e.enforced?o("span",{staticClass:"theming__preview-warning",attrs:{role:"note"}},[e._v(" "+e._s(e.t("theming","Theme selection is enforced"))+" ")]):e._e(),o("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:e.checked,disabled:e.enforced,name:e.name,type:e.switchType},on:{"update:checked":function(r){e.checked=r}}},[e._v(" "+e._s(e.theme.enableLabel)+" ")])],1)])},Xo=[],Yo=gt(Wo,Qo,Xo,!1,null,"131fb3f7");const Zo=Yo.exports,Jo=ae({name:"UserAppMenuSection",components:{AppOrderSelector:Fe,IconUndo:Je,NcButton:ie,NcNoteCard:Re,NcSettingsSection:se},setup(){const{userAppOrder:e,enforcedDefaultApp:o}=Y("theming","navigationBar"),r=Object.values(Y("core","apps")).filter(({type:c})=>c==="link").map(c=>({...c,label:c.name,default:c.default&&c.app===o})),n=Rt(!Array.isArray(e)||Object.values(e).length>0),a=Et(()=>r.some(({id:c},p)=>c!==f.value[p].id)),i="theming-apporder-changed-infocard",s="theming-apporder-changed-infocard",l=Et(()=>(a.value?"".concat(i," "):"")+(o?s:"")),f=Rt([...r]),m=c=>{const p={};c.forEach(({app:u,id:h},d)=>{p[h]={order:d,app:u}}),w("apporder",p).then(()=>{f.value=c,n.value=!0}).catch(u=>{console.warn("Could not set the app order",u),wt(ft("theming","Could not set the app order"))})},b=async()=>{try{await w("apporder",[]),n.value=!1;const{data:c}=await q.get(it("/core/navigation/apps"),{headers:{"OCS-APIRequest":"true"}});f.value=c.ocs.data.map(p=>({...p,label:p.name,default:p.default&&p.app===o}))}catch(c){console.warn(c),wt(ft("theming","Could not reset the app order"))}},w=async(c,p)=>{const u=it("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"core",configKey:c});return await q.post(u,{configValue:JSON.stringify(p)})};return{appOrder:f,updateAppOrder:m,resetAppOrder:b,enforcedDefaultApp:o,hasAppOrderChanged:a,hasCustomAppOrder:n,ariaDetailsAppOrder:l,elementIdAppOrderChanged:i,elementIdEnforcedDefaultApp:s,t:ft}}});var tn=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("NcSettingsSection",{attrs:{name:e.t("theming","Navigation bar settings")}},[o("p",[e._v(" "+e._s(e.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."))+" ")]),e.enforcedDefaultApp?o("NcNoteCard",{attrs:{id:e.elementIdEnforcedDefaultApp,type:"info"}},[e._v(" "+e._s(e.t("theming","The default app can not be changed because it was configured by the administrator."))+" ")]):e._e(),e.hasAppOrderChanged?o("NcNoteCard",{attrs:{id:e.elementIdAppOrderChanged,type:"info"}},[e._v(" "+e._s(e.t("theming","The app order was changed, to see it in action you have to reload the page."))+" ")]):e._e(),o("AppOrderSelector",{staticClass:"user-app-menu-order",attrs:{"aria-details":e.ariaDetailsAppOrder,value:e.appOrder},on:{"update:value":e.updateAppOrder}}),o("NcButton",{attrs:{"data-test-id":"btn-apporder-reset",disabled:!e.hasCustomAppOrder,type:"tertiary"},on:{click:e.resetAppOrder},scopedSlots:e._u([{key:"icon",fn:function(){return[o("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("theming","Reset default app order"))+" ")])],1)},en=[],rn=gt(Jo,tn,en,!1,null,"2995579c");const on=rn.exports,{primaryColor:nn,defaultPrimaryColor:Jt}=Y("theming","data",{primaryColor:"#0082c9",defaultPrimaryColor:"#0082c9"}),an=ae({name:"UserPrimaryColor",components:{IconColorPalette:le,IconUndo:tr,NcButton:ie,NcColorPicker:re,NcLoadingIcon:Ee},emits:["refresh-styles"],data(){return{primaryColor:nn,loading:!1}},computed:{isdefaultPrimaryColor(){return Ft(this.primaryColor).isEqual(Ft(Jt))},debouncedOnUpdate(){return Ke.debounce(this.onUpdate,500)}},methods:{t:ft,reload(){const e=this.$refs.trigger,o=window.getComputedStyle(e).backgroundColor;o.toLowerCase()!==this.primaryColor&&(this.primaryColor=o)},onReset(){this.primaryColor=Jt,this.onUpdate(null)},async onUpdate(e){this.loading=!0;const o=it("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"primary_color"});try{e?await q.post(o,{configValue:e}):await q.delete(o),this.$emit("refresh-styles")}catch(r){console.error("Could not update primary color",r),wt(ft("theming","Could not set primary color"))}this.loading=!1}}});var sn=function(){var e=this,o=e._self._c;return e._self._setupProxy,o("div",{staticClass:"primary-color__wrapper"},[o("NcColorPicker",{attrs:{"data-user-theming-primary-color":""},on:{"update:value":e.debouncedOnUpdate},model:{value:e.primaryColor,callback:function(r){e.primaryColor=r},expression:"primaryColor"}},[o("button",{ref:"trigger",staticClass:"color-container primary-color__trigger",style:{"background-color":e.primaryColor},attrs:{"data-user-theming-primary-color-trigger":""}},[e._v(" "+e._s(e.t("theming","Primary color"))+" "),e.loading?o("NcLoadingIcon"):o("IconColorPalette",{attrs:{size:20}})],1)]),o("NcButton",{attrs:{type:"tertiary",disabled:e.isdefaultPrimaryColor},on:{click:e.onReset},scopedSlots:e._u([{key:"icon",fn:function(){return[o("IconUndo",{attrs:{size:20}})]},proxy:!0}])},[e._v(" "+e._s(e.t("theming","Reset primary color"))+" ")])],1)},un=[],ln=gt(an,sn,un,!1,null,"7037bb4e");const cn=ln.exports,hn=Y("theming","themes",[]),pn=Y("theming","enforceTheme",""),dn=Y("theming","shortcutsDisabled",!1),fn=Y("theming","isUserThemingDisabled"),gn={name:"UserTheming",components:{ItemPreview:Zo,NcCheckboxRadioSwitch:ne,NcSettingsSection:se,BackgroundSettings:Ko,UserAppMenuSection:on,UserPrimaryColor:cn},data(){return{availableThemes:hn,enforceTheme:pn,shortcutsDisabled:dn,isUserThemingDisabled:fn}},computed:{themes(){return this.availableThemes.filter(e=>e.type===1)},fonts(){return this.availableThemes.filter(e=>e.type===2)},selectedTheme(){return this.themes.find(e=>e.enabled===!0)||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}","")},guidelinesLink(){return''},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,"")},issuetrackerLink(){return''},designteamLink(){return''}},watch:{shortcutsDisabled(e){this.changeShortcutsDisabled(e)}},methods:{async refreshGlobalStyles(){await ue(),this.$nextTick(()=>this.$refs.primaryColor.reload())},changeTheme({enabled:e,id:o}){this.themes.forEach(r=>{if(r.id===o&&e){r.enabled=!0;return}r.enabled=!1}),this.updateBodyAttributes(),this.selectItem(e,o)},changeFont({enabled:e,id:o}){this.fonts.forEach(r=>{if(r.id===o&&e){r.enabled=!0;return}r.enabled=!1}),this.updateBodyAttributes(),this.selectItem(e,o)},async changeShortcutsDisabled(e){e?await q({url:it("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),data:{configValue:"yes"},method:"POST"}):await q({url:it("apps/provisioning_api/api/v1/config/users/{appId}/{configKey}",{appId:"theming",configKey:"shortcuts_disabled"}),method:"DELETE"})},updateBodyAttributes(){const e=this.themes.filter(r=>r.enabled===!0).map(r=>r.id),o=this.fonts.filter(r=>r.enabled===!0).map(r=>r.id);this.themes.forEach(r=>{document.body.toggleAttribute("data-theme-".concat(r.id),r.enabled)}),this.fonts.forEach(r=>{document.body.toggleAttribute("data-theme-".concat(r.id),r.enabled)}),document.body.setAttribute("data-themes",[...e,...o].join(","))},async selectItem(e,o){try{e?await q({url:it("apps/theming/api/v1/theme/{themeId}/enable",{themeId:o}),method:"PUT"}):await q({url:it("apps/theming/api/v1/theme/{themeId}",{themeId:o}),method:"DELETE"})}catch(r){console.error(r,r.response),OC.Notification.showTemporary(t("theming",r.response.data.ocs.meta.message+". Unable to apply the setting."))}}}};var mn=function(){var e=this,o=e._self._c;return o("section",[o("NcSettingsSection",{staticClass:"theming",attrs:{name:e.t("theming","Appearance and accessibility settings"),"limit-width":!1}},[o("p",{domProps:{innerHTML:e._s(e.description)}}),o("p",{domProps:{innerHTML:e._s(e.descriptionDetail)}}),o("div",{staticClass:"theming__preview-list"},e._l(e.themes,function(r){return o("ItemPreview",{key:r.id,attrs:{enforced:r.id===e.enforceTheme,selected:e.selectedTheme.id===r.id,theme:r,unique:e.themes.length===1,type:"theme"},on:{change:e.changeTheme}})}),1),o("div",{staticClass:"theming__preview-list"},e._l(e.fonts,function(r){return o("ItemPreview",{key:r.id,attrs:{selected:r.enabled,theme:r,unique:e.fonts.length===1,type:"font"},on:{change:e.changeFont}})}),1)]),o("NcSettingsSection",{attrs:{name:e.t("theming","Primary color"),description:e.isUserThemingDisabled?e.t("theming","Customization has been disabled by your administrator"):e.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.")}},[e.isUserThemingDisabled?e._e():o("UserPrimaryColor",{ref:"primaryColor",on:{"refresh-styles":e.refreshGlobalStyles}})],1),o("NcSettingsSection",{staticClass:"background",attrs:{name:e.t("theming","Background and color"),description:e.isUserThemingDisabled?e.t("theming","Customization has been disabled by your administrator"):e.t("theming","The background can be set to an image from the default set, a custom uploaded image, or a plain color.")}},[e.isUserThemingDisabled?e._e():o("BackgroundSettings",{staticClass:"background__grid",on:{"update:background":e.refreshGlobalStyles}})],1),o("NcSettingsSection",{attrs:{name:e.t("theming","Keyboard shortcuts"),description:e.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.")}},[o("NcCheckboxRadioSwitch",{staticClass:"theming__preview-toggle",attrs:{checked:e.shortcutsDisabled,type:"switch"},on:{"update:checked":function(r){e.shortcutsDisabled=r},change:e.changeShortcutsDisabled}},[e._v(" "+e._s(e.t("theming","Disable all keyboard shortcuts"))+" ")])],1),o("UserAppMenuSection")],1)},bn=[],vn=gt(gn,mn,bn,!1,null,"71b62553");const yn=vn.exports;Tt.prototype.OC=OC,Tt.prototype.t=t;const _n=Tt.extend(yn),te=new _n;te.$mount("#theming"),te.$on("update:background",ue);