!function(){"use strict";varn,e={87661:function(n,e,r){vara=r(20144),o=r(79753),i=r(16453),c=r(4820),s=r(20571),u=r.n(s),l=r(13299),d=r.n(l),g=function(n){return(0,o.generateFilePath)("theming","","img/background/")+n},h=function(n){vare,t,r=arguments.length>1&&void0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void0!==arguments[2]?arguments[2]:"",i=(null===(e=window.OCA)||void0===e||null===(t=e.Theming)||void0===t?void0:t.enabledThemes)||[],c=0===i.length||"default"===i[0]?window.matchMedia("(prefers-color-scheme: dark)").matches:-1!==i.join("").indexOf("dark");return"default"===n?a&&"backgroundColor"!==a?(0,o.generateUrl)("/apps/theming/image/background")+"?v="+window.OCA.Theming.cacheBuster:g(c?"eduardo-neves-pedra-azul.jpg":"kamil-porembinski-clouds.jpg"):"custom"===n?(0,o.generateUrl)("/apps/theming/background")+"?v="+r:g(n)},p=r(20296),m=r.n(p),f=r(69867),A=r.n(f),v=r(15168),b=r.n(v);functionk(n,e,t,r,a,o,i){try{varc=n[o](i),s=c.value}catch(n){returnvoidt(n)}c.done?e(s):Promise.resolve(s).then(r,a)}functionC(n){returnfunction(){vare=this,t=arguments;returnnewPromise((function(r,a){varo=n.apply(e,t);functioni(n){k(o,r,a,i,c,"next",n)}functionc(n){k(o,r,a,i,c,"throw",n)}i(void0)}))}}functiony(n,e){(null==e||e>n.length)&&(e=n.length);for(vart=0,r=newArray(e);t<e;t++)r[t]=n[t];returnr}varw=(0,i.loadState)("theming","shippedBackgrounds"),x={name:"BackgroundSettings",directives:{Tooltip:b()},components:{NcColorPicker:A()},props:{background:{type:String,default:"default"},themingDefaultBackground:{type:String,default:""}},data:function(){return{backgroundImage:(0,o.generateUrl)("/apps/theming/background")+"?v="+Date.now(),loading:!1,Theming:(0,i.loadState)("theming","data",{})}},computed:{shippedBackgrounds:function(){returnObject.keys(w).map((function(n){return{name:n,url:g(n),preview:g("preview/"+n),details:w[n]}}))}},methods:{invertTextColor:function(n){returnthis.calculateLuma(n)>.6},calculateLuma:function(n){vare,t,r=(e=this.hexToRGB(n),t=3,function(n){if(Array.isArray(n))returnn}(e)||function(n,e){vart=null==n?null:"undefined"!=typeofSymbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){varr,a,o=[],i=!0,c=!1;try{for(t=t.call(n);!(i=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);i=!0);}catch(n){c=!0,a=n}finally{try{i||null==t.return||t.return()}finally{if(c)throwa}}returno}}(e,t)||function(n,e){if(n){if("string"==typeofn)returny(n,e);vart=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(n,e):void0}}(e,t)||function(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return(.2126*r[0]+.7152*r[1]+.0722*r[2])/255},hexToRGB:function(n){vare=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);returne?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null},update:function(n){vare=this;returnC(regeneratorRuntime.mark((functiont(){varr,a;returnregeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case0:if(r="custom"===n.type||"default"===n.type?n.type:n.value,e.backgroundImage=h(r,n.version,e.themingDefaultBackground),"color"!==n.type&&("default"!==n.type||"backgroundColor"!==e.themingDefaultBackground)){t.next=6;break}returne.$emit("update:background",n),e.loading=!1,t.abrupt("return");case6:(a=newImage).onload=function(){e.$emit("update:background",n),e.loading=!1},a.src=e.backgroundImage;case9:case"end":returnt.stop()}}),t)})))()},setDefault:function(){varn=this;returnC(regeneratorRuntime.mark((functione(){vart;returnregeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case0:returnn.loading="default",e.next=3,c.default.post((0,o.generateUrl)("/apps/theming/background/default"));case3:t=e.sent,n.update(t.data);case5:case"end":returne.stop()}}),e)})))()},setShipped:function(n){vare=this;returnC(regeneratorRuntime.mark((functiont(){varr;return