aboutsummaryrefslogtreecommitdiffstats
path: root/dist/weather_status-weather-status.js
blob: 853a0aea7c321b3db5bfb8b1fbec2af5c9949197 (plain)
1pre { line-height: 125%; }
td.linenos .normal { color: inherit; b
(()=>{"use strict";var e,r,a,s={20994:(e,r,a)=>{var s=a(21777),n=a(85471),o=a(85168),i=a(19231),u=a(53334),h=a(63814),l=a(24764),d=a(89257),c=a(30567),p=a(44131),g=a(73267),w=a(80114),m=a(32831),v=a(84237),f=a(6695),_=a(65043);const y=async t=>{const e=(0,h.KT)("apps/weather_status/api/v1/favorites");return(await _.Ay.put(e,{favorites:t})).data.ocs.data};var A=a(11459);const x='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-star-outline" viewBox="0 0 24 24"><path d="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z" /></svg>',C={clearsky_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} clear sky later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} clear sky",{temperature:e,unit:r})}},clearsky_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} clear sky later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} clear sky",{temperature:e,unit:r})}},cloudy:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} cloudy later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} cloudy",{temperature:e,unit:r})}},snowandthunder:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow and thunder later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow and thunder",{temperature:e,unit:r})}},snowshowersandthunder_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers and thunder later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers and thunder",{temperature:e,unit:r})}},snowshowersandthunder_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers and thunder later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers and thunder",{temperature:e,unit:r})}},snowshowersandthunder_polartwilight:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers, thunder and polar twilight later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers, thunder and polar twilight",{temperature:e,unit:r})}},snowshowers_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers",{temperature:e,unit:r})}},snowshowers_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers",{temperature:e,unit:r})}},snowshowers_polartwilight:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow showers and polar twilight later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow showers and polar twilight",{temperature:e,unit:r})}},snow:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} snow later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} snow",{temperature:e,unit:r})}},fair_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} fair weather later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} fair weather",{temperature:e,unit:r})}},fair_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} fair weather later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} fair weather",{temperature:e,unit:r})}},partlycloudy_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} partly cloudy later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} partly cloudy",{temperature:e,unit:r})}},partlycloudy_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} partly cloudy later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} partly cloudy",{temperature:e,unit:r})}},fog:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} foggy later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} foggy",{temperature:e,unit:r})}},lightrain:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} light rainfall later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} light rainfall",{temperature:e,unit:r})}},rain:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} rainfall later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} rainfall",{temperature:e,unit:r})}},heavyrain:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} heavy rainfall later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} heavy rainfall",{temperature:e,unit:r})}},rainshowers_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} rainfall showers",{temperature:e,unit:r})}},rainshowers_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} rainfall showers",{temperature:e,unit:r})}},lightrainshowers_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} light rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} light rainfall showers",{temperature:e,unit:r})}},lightrainshowers_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} light rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} light rainfall showers",{temperature:e,unit:r})}},heavyrainshowers_day:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} heavy rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} heavy rainfall showers",{temperature:e,unit:r})}},heavyrainshowers_night:{text:function(e,r){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t("weather_status","{temperature} {unit} heavy rainfall showers later today",{temperature:e,unit:r}):t("weather_status","{temperature} {unit} heavy rainfall showers",{temperature:e,unit:r})}}},L={name:"App",components:{NcActions:l.A,NcActionButton:d.A,NcActionCaption:c.A,NcActionInput:p.A,NcActionLink:g.A,NcActionSeparator:w.A,NcActionText:m.A,NcLoadingIcon:v.A,NcIconSvgWrapper:f.A},data:()=>({crosshairsSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-crosshairs" viewBox="0 0 24 24"><path d="M3.05,13H1V11H3.05C3.5,6.83 6.83,3.5 11,3.05V1H13V3.05C17.17,3.5 20.5,6.83 20.95,11H23V13H20.95C20.5,17.17 17.17,20.5 13,20.95V23H11V20.95C6.83,20.5 3.5,17.17 3.05,13M12,5A7,7 0 0,0 5,12A7,7 0 0,0 12,19A7,7 0 0,0 19,12A7,7 0 0,0 12,5Z" /></svg>',mapMarkerSvg:'<svg xmlns="http://www.w3.org/2000/svg" id="mdi-map-marker" viewBox="0 0 24 24"><path d="M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z" /></svg>',starSvg:A,starOutlineSvg:x,locale:(0,u.JK)(),loading:!0,errorMessage:"",mode:1,address:null,lat:null,lon:null,offset:5,forecasts:[],loop:null,favorites:[]}),computed:{useFahrenheitLocale(){return["en_US","en_MH","en_FM","en_PW","en_KY","en_LR"].includes(this.locale)},temperatureUnit(){return this.useFahrenheitLocale?"°F":"°C"},locationText(){return t("weather_status","More weather for {adr}",{adr:this.address})},temperature(){return this.getTemperature(this.forecasts,0)},futureTemperature(){return this.getTemperature(this.forecasts,this.offset)},weatherCode(){return this.getWeatherCode(this.forecasts,0)},futureWeatherCode(){return this.getWeatherCode(this.forecasts,this.offset)},weatherIconUrl(){return this.getWeatherIconUrl(this.weatherCode)},futureWeatherIconUrl(){return this.getWeatherIconUrl(this.futureWeatherCode)},currentWeatherMessage(){return this.loading?t("weather_status","Loading weather"):this.errorMessage?this.errorMessage:this.gotWeather?this.getWeatherMessage(this.weatherCode,this.temperature):t("weather_status","Set location for weather")},forecastMessage(){return this.loading?t("weather_status","Loading weather"):this.gotWeather?this.getWeatherMessage(this.futureWeatherCode,this.futureTemperature,!0):t("weather_status","Set location for weather")},weatherLinkTarget(){return"https://www.windy.com/-Rain-thunder-rain?rain,"+this.lat+","+this.lon+",11"},gotWeather(){return this.address&&!this.errorMessage},addRemoveFavoriteSvg(){return this.currentAddressIsFavorite?A:x},addRemoveFavoriteText(){return this.currentAddressIsFavorite?t("weather_status","Remove from favorites"):t("weather_status","Add as favorite")},currentAddressIsFavorite(){return this.favorites.find((t=>t===this.address))}},mounted(){this.initWeatherStatus()},methods:{async initWeatherStatus(){try{const t=await(async()=>{const t=(0,h.KT)("apps/weather_status/api/v1/location");return(await _.Ay.get(t)).data.ocs.data})();this.lat=t.lat,this.lon=t.lon,this.address=t.address,this.mode=t.mode,1===this.mode?this.askBrowserLocation():2===this.mode&&this.startLoop();const e=await(async()=>{const t=(0,h.KT)("apps/weather_status/api/v1/favorites");return(await _.Ay.get(t)).data.ocs.data})();this.favorites=e}catch(e){if("ECONNABORTED"===e?.code)return void console.info("The weather status request was cancelled because the user navigates.");e.response&&401===e.response.status?(0,o.Qg)(t("weather_status","You are not logged in.")):(0,o.Qg)(t("weather_status","There was an error getting the weather status information.")),console.error(e)}},startLoop(){clearInterval(this.loop),this.lat&&this.lon?(this.loop=setInterval((()=>this.getForecast()),36e5),this.getForecast()):this.loading=!1},askBrowserLocation(){this.loading=!0,this.errorMessage="",navigator.geolocation&&window.isSecureContext?navigator.geolocation.getCurrentPosition((t=>{console.debug("browser location success"),this.lat=t.coords.latitude,this.lon=t.coords.longitude,this.saveMode(1),this.mode=1,this.saveLocation(this.lat,this.lon)}),(t=>{console.debug("location permission refused"),console.debug(t),this.saveMode(2),this.mode=2,this.lat&&this.lon?this.startLoop():this.usePersonalAddress()})):(console.debug("no secure context!"),this.saveMode(2),this.mode=2,this.startLoop())},async getForecast(){try{this.forecasts=await(async()=>{const t=(0,h.KT)("apps/weather_status/api/v1/forecast");return(await _.Ay.get(t)).data.ocs.data})()}catch(e){this.errorMessage=t("weather_status","No weather information found"),console.debug(e)}this.loading=!1},async setAddress(e){this.loading=!0,this.errorMessage="";try{const r=await(async t=>{const e=(0,h.KT)("apps/weather_status/api/v1/location");return(await _.Ay.put(e,{address:t,lat:null,lon:null})).data.ocs.data})(e);r.success?(this.lat=r.lat,this.lon=r.lon,this.address=r.address,this.mode=2,this.startLoop()):(this.errorMessage=t("weather_status","Location not found"),this.loading=!1)}catch(e){e.response&&401===e.response.status?(0,o.Qg)(t("weather_status","You are not logged in.")):(0,o.Qg)(t("weather_status","There was an error setting the location address.")),this.loading=!1}},async saveLocation(e,r){try{const t=await(async(t,e)=>{const r=(0,h.KT)("apps/weather_status/api/v1/location");return(await _.Ay.put(r,{address:"",lat:t,lon:e})).data.ocs.data})(e,r);this.address=t.address,this.startLoop()}catch(e){e.response&&401===e.response.status?(0,o.Qg)(t("weather_status","You are not logged in.")):(0,o.Qg)(t("weather_status","There was an error setting the location.")),console.debug(e)}},async saveMode(e){try{await(async t=>{const e=(0,h.KT)("apps/weather_status/api/v1/mode");return(await _.Ay.put(e,{mode:t})).data.ocs.data})(e)}catch(e){e.response&&401===e.response.status?(0,o.Qg)(t("weather_status","You are not logged in.")):(0,o.Qg)(t("weather_status","There was an error saving the mode.")),console.debug(e)}},onBrowserLocationClick(){this.askBrowserLocation()},async usePersonalAddress(){this.loading=!0;try{const t=await(async()=>{const t=(0,h.KT)("apps/weather_status/api/v1/use-personal");return(await _.Ay.put(t)).data.ocs.data})();this.lat=t.lat,this.lon=t.lon,this.address=t.address,this.mode=2,this.startLoop()}catch(e){e.response&&401===e.response.status?(0,o.Qg)(t("weather_status","You are not logged in.")):(0,o.Qg)(t("weather_status","There was an error using personal address.")),console.debug(e),this.loading=!1}},onAddressSubmit(){const t=this.$refs.addressInput.$el.querySelector('input[type="text"]').value;this.setAddress(t)},getLocalizedTemperature(t){return this.useFahrenheitLocale?1.8*t+32:t},onAddRemoveFavoriteClick(){const t=this.currentAddressIsFavorite;if(t){const e=this.favorites.indexOf(t);-1!==e&&this.favorites.splice(e,1)}else this.favorites.push(this.address);y(this.favorites)},onFavoriteClick(t,e){if(t.target.classList.contains("action-button__icon")){const t=this.favorites.indexOf(e);-1!==t&&this.favorites.splice(t,1),y(this.favorites)}else e!==this.address&&this.setAddress(e)},formatTime:t=>(0,i.A)(t).format("LT"),getTemperature(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.length>e?t[e].data.instant.details.air_temperature:""},getWeatherCode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.length>e?t[e].data.next_1_hours.summary.symbol_code:""},getWeatherIconUrl:t=>t&&t in C?(0,h.d0)("weather_status","met.no.icons/"+t+".svg"):(0,h.d0)("weather_status","met.no.icons/fair_day.svg"),getWeatherMessage(e,r){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&e in C?C[e].text(Math.round(this.getLocalizedTemperature(r)),this.temperatureUnit,a):t("weather_status","Unknown weather code")}}};var b=a(85072),k=a.n(b),S=a(97825),T=a.n(S),M=a(77659),I=a.n(M),N=a(55056),W=a.n(N),F=a(10540),O=a.n(F),P=a(41113),B=a.n(P),D=a(56641),E={};E.styleTagTransform=B(),E.setAttributes=W(),E.insert=I().bind(null,"head"),E.domAPI=T(),E.insertStyleElement=O(),k()(D.A,E),D.A&&D.A.locals&&D.A.locals;const j=(0,a(14486).A)(L,(function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"weather-status-menu-item"}},[e("NcActions",{staticClass:"weather-status-menu-item__subheader",attrs:{"aria-hidden":!0,"aria-label":t.currentWeatherMessage,"menu-name":t.currentWeatherMessage},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("img",{staticClass:"weather-image",attrs:{src:t.weatherIconUrl,alt:""}})]},proxy:!0}])},[t._v(" "),t.gotWeather?e("NcActionText",{attrs:{"aria-hidden":!0},scopedSlots:t._u([{key:"icon",fn:function(){return[t.loading?e("NcLoadingIcon"):e("div",{staticClass:"weather-action-image-container"},[e("img",{staticClass:"weather-image",attrs:{src:t.futureWeatherIconUrl,alt:""}})])]},proxy:!0}],null,!1,1876957744)},[t._v("\n\t\t\t"+t._s(t.forecastMessage)+"\n\t\t")]):t._e(),t._v(" "),t.gotWeather?e("NcActionLink",{attrs:{target:"_blank","aria-hidden":!0,href:t.weatherLinkTarget,"close-after-click":!0},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{name:"MapMarker",svg:t.mapMarkerSvg,size:20}})]},proxy:!0}],null,!1,2374361976)},[t._v("\n\t\t\t"+t._s(t.locationText)+"\n\t\t")]):t._e(),t._v(" "),t.gotWeather?e("NcActionButton",{attrs:{"aria-hidden":!0},on:{click:t.onAddRemoveFavoriteClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{staticClass:"favorite-color",attrs:{name:"Star",svg:t.addRemoveFavoriteSvg,size:20}})]},proxy:!0}],null,!1,2760308411)},[t._v("\n\t\t\t"+t._s(t.addRemoveFavoriteText)+"\n\t\t")]):t._e(),t._v(" "),t.address&&!t.errorMessage?e("NcActionSeparator"):t._e(),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0,"aria-hidden":!0},on:{click:t.onBrowserLocationClick},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{name:"Crosshairs",svg:t.crosshairsSvg,size:20}})]},proxy:!0}])},[t._v("\n\t\t\t"+t._s(t.t("weather_status","Detect location"))+"\n\t\t")]),t._v(" "),e("NcActionInput",{ref:"addressInput",attrs:{label:t.t("weather_status","Set custom address"),disabled:!1,icon:"icon-rename","aria-hidden":!0,type:"text",value:""},on:{submit:t.onAddressSubmit}}),t._v(" "),t.favorites.length>0?[e("NcActionCaption",{attrs:{name:t.t("weather_status","Favorites")}}),t._v(" "),t._l(t.favorites,(function(r){return e("NcActionButton",{key:r,attrs:{"aria-hidden":!0},on:{click:function(e){return t.onFavoriteClick(e,r)}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{class:{"favorite-color":t.address===r},attrs:{name:"Star",svg:t.starSvg,size:20}})]},proxy:!0}],null,!0)},[t._v("\n\t\t\t\t"+t._s(r)+"\n\t\t\t")])}))]:t._e()],2)],1)}),[],!1,null,null,null).exports;a.nc=(0,s.aV)(),n.Ay.prototype.t=t,document.addEventListener("DOMContentLoaded",(function(){OCA.Dashboard&&OCA.Dashboard.registerStatus("weather",(t=>(new(n.Ay.extend(j))).$mount(t)))}))},56641:(t,e,r)=>{r.d(e,{A:()=>i});var a=r(71354),s=r.n(a),n=r(76314),o=r.n(n)()(s());o.push([t.id,".weather-action-image-container{width:var(--default-clickable-area);height:var(--default-clickable-area);display:flex;align-items:center;justify-content:center}.weather-image{width:calc(var(--default-clickable-area) - 2*var(--default-grid-baseline))}.favorite-color{color:var(--color-favorite)}","",{version:3,sources:["webpack://./apps/weather_status/src/App.vue"],names:[],mappings:"AACA,gCACC,mCAAA,CACA,oCAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CAED,eACC,0EAAA,CAID,gBACC,2BAAA",sourceRoot:""}]);const i=o},27518:t=>{t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M15.4%2016.6L10.8%2012l4.6-4.6L14%206l-6%206%206%206%201.4-1.4z%27/%3e%3c/svg%3e"},27514:t=>{t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M18.4%207.4L17%206l-6%206%206%206%201.4-1.4-4.6-4.6%204.6-4.6m-6%200L11%206l-6%206%206%206%201.4-1.4L7.8%2012l4.6-4.6z%27/%3e%3c/svg%3e"},79722:t=>{t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M5.6%207.4L7%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6m6%200L13%206l6%206-6%206-1.4-1.4%204.6-4.6-4.6-4.6z%27/%3e%3c/svg%3e"},86886:t=>{t.exports="data:image/svg+xml,%3c%21--%20-%20SPDX-FileCopyrightText:%202020%20Google%20Inc.%20-%20SPDX-License-Identifier:%20Apache-2.0%20--%3e%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2724%27%20height=%2724%27%20fill=%27%23222%27%3e%3cpath%20d=%27M8.6%2016.6l4.6-4.6-4.6-4.6L10%206l6%206-6%206-1.4-1.4z%27/%3e%3c/svg%3e"}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={id:t,loaded:!1,exports:{}};return s[t].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}o.m=s,e=[],o.O=(t,r,a,s)=>{if(!r){var n=1/0;for(l=0;l<e.length;l++){r=e[l][0],a=e[l][1],s=e[l][2];for(var i=!0,u=0;u<r.length;u++)(!1&s||n>=s)&&Object.keys(o.O).every((t=>o.O[t](r[u])))?r.splice(u--,1):(i=!1,s<n&&(n=s));if(i){e.splice(l--,1);var h=a();void 0!==h&&(t=h)}}return t}s=s||0;for(var l=e.length;l>0&&e[l-1][2]>s;l--)e[l]=e[l-1];e[l]=[r,a,s]},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,r)=>(o.f[r](t,e),e)),[])),o.u=t=>t+"-"+t+".js?v="+{802:"c10e4e0c57e30824ef47",9291:"077955af818a227340aa"}[t],o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},a="nextcloud:",o.l=(t,e,s,n)=>{if(r[t])r[t].push(e);else{var i,u;if(void 0!==s)for(var h=document.getElementsByTagName("script"),l=0;l<h.length;l++){var d=h[l];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==a+s){i=d;break}}i||(u=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",a+s),i.src=t),r[t]=[e];var c=(e,a)=>{i.onerror=i.onload=null,clearTimeout(p);var s=r[t];if(delete r[t],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((t=>t(a))),e)return e(a)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=c.bind(null,i.onerror),i.onload=c.bind(null,i.onload),u&&document.head.appendChild(i)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),o.j=1848,(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&(!t||!/^http(s?):/.test(t));)t=r[a--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{o.b=document.baseURI||self.location.href;var t={1848:0};o.f.j=(e,r)=>{var a=o.o(t,e)?t[e]:void 0;if(0!==a)if(a)r.push(a[2]);else{var s=new Promise(((r,s)=>a=t[e]=[r,s]));r.push(a[2]=s);var n=o.p+o.u(e),i=new Error;o.l(n,(r=>{if(o.o(t,e)&&(0!==(a=t[e])&&(t[e]=void 0),a)){var s=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+s+": "+n+")",i.name="ChunkLoadError",i.type=s,i.request=n,a[1](i)}}),"chunk-"+e,e)}},o.O.j=e=>0===t[e];var e=(e,r)=>{var a,s,n=r[0],i=r[1],u=r[2],h=0;if(n.some((e=>0!==t[e]))){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);if(u)var l=u(o)}for(e&&e(r);h<n.length;h++)s=n[h],o.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return o.O(l)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),o.nc=void 0;var i=o.O(void 0,[4208],(()=>o(20994)));i=o.O(i)})();
//# sourceMappingURL=weather_status-weather-status.js.map?v=df588fb7b5981e56de87
class="nx">appApiStore:(0,u.a)(),mdiCogOutline:A.ED}),data:()=>({isSelected:!1,scrolled:!1,screenshotLoaded:!1}),computed:{hasRating(){return this.app.appstoreData&&this.app.appstoreData.ratingNumOverall>5},dataItemTag(){return this.listView?"td":"div"},withSidebar(){return!!this.$route.params.id},shouldDisplayDefaultIcon(){return this.listView&&!this.app.preview||!this.listView&&!this.screenshotLoaded}},watch:{"$route.params.id"(t){this.isSelected=this.app.id===t}},mounted(){if(this.isSelected=this.app.id===this.$route.params.id,this.app.releases&&this.app.screenshot){const t=new Image;t.onload=()=>{this.screenshotLoaded=!0},t.src=this.app.screenshot}},watchers:{},methods:{prefix:(t,e)=>t+"_"+e,getDataItemHeaders(t){return this.useBundleView?[this.headers,t].join(" "):null}}};var h=a(85072),v=a.n(h),m=a(97825),C=a.n(m),_=a(77659),b=a.n(_),f=a(55056),y=a.n(f),S=a(10540),x=a.n(S),w=a(41113),N=a.n(w),I=a(44005),D={};D.styleTagTransform=N(),D.setAttributes=y(),D.insert=b().bind(null,"head"),D.domAPI=C(),D.insertStyleElement=x(),v()(I.A,D),I.A&&I.A.locals&&I.A.locals;const T=(0,r.A)(g,(function(){var t=this,e=t._self._c;return e(t.listView?"tr":t.inline?"article":"li",{tag:"component",staticClass:"app-item",class:{"app-item--list-view":t.listView,"app-item--store-view":!t.listView,"app-item--selected":t.isSelected,"app-item--with-sidebar":t.withSidebar}},[e(t.dataItemTag,{tag:"component",staticClass:"app-image app-image-icon",attrs:{headers:t.getDataItemHeaders("app-table-col-icon")}},[!t.app?.app_api&&t.shouldDisplayDefaultIcon?e("div",{staticClass:"icon-settings-dark"}):t.app.app_api&&t.shouldDisplayDefaultIcon?e("NcIconSvgWrapper",{staticStyle:{"min-width":"auto","min-height":"auto",height:"100%"},attrs:{path:t.mdiCogOutline,size:t.listView?24:48}}):t.listView&&t.app.preview&&!t.app.app_api?e("svg",{attrs:{width:"32",height:"32",viewBox:"0 0 32 32"}},[e("image",{staticClass:"app-icon",attrs:{x:"0",y:"0",width:"32",height:"32",preserveAspectRatio:"xMinYMin meet","xlink:href":t.app.preview}})]):t._e(),t._v(" "),!t.listView&&t.app.screenshot&&t.screenshotLoaded?e("img",{attrs:{src:t.app.screenshot,alt:""}}):t._e()],1),t._v(" "),e(t.dataItemTag,{tag:"component",staticClass:"app-name",attrs:{headers:t.getDataItemHeaders("app-table-col-name")}},[e("router-link",{staticClass:"app-name--link",attrs:{to:{name:"apps-details",params:{category:t.category,id:t.app.id}},"aria-label":t.t("settings","Show details for {appName} app",{appName:t.app.name})}},[t._v("\n\t\t\t"+t._s(t.app.name)+"\n\t\t")])],1),t._v(" "),t.listView?t._e():e(t.dataItemTag,{tag:"component",staticClass:"app-summary",attrs:{headers:t.getDataItemHeaders("app-version")}},[t._v("\n\t\t"+t._s(t.app.summary)+"\n\t")]),t._v(" "),t.listView?e(t.dataItemTag,{tag:"component",staticClass:"app-version",attrs:{headers:t.getDataItemHeaders("app-table-col-version")}},[t.app.version?e("span",[t._v(t._s(t.app.version))]):t.app.appstoreData.releases[0].version?e("span",[t._v(t._s(t.app.appstoreData.releases[0].version))]):t._e()]):t._e(),t._v(" "),e(t.dataItemTag,{tag:"component",staticClass:"app-level",attrs:{headers:t.getDataItemHeaders("app-table-col-level")}},[e("AppLevelBadge",{attrs:{level:t.app.level}}),t._v(" "),t.hasRating&&!t.listView?e("AppScore",{attrs:{score:t.app.score}}):t._e()],1),t._v(" "),t.inline?t._e():e(t.dataItemTag,{tag:"component",staticClass:"app-actions",attrs:{headers:t.getDataItemHeaders("app-table-col-actions")}},[t.app.error?e("div",{staticClass:"warning"},[t._v("\n\t\t\t"+t._s(t.app.error)+"\n\t\t")]):t._e(),t._v(" "),t.isLoading||t.isInitializing?e("div",{staticClass:"icon icon-loading-small"}):t._e(),t._v(" "),t.app.update?e("NcButton",{attrs:{type:"primary",disabled:t.installing||t.isLoading||!t.defaultDeployDaemonAccessible||t.isManualInstall,title:t.updateButtonText},on:{click:function(e){return e.stopPropagation(),t.update(t.app.id)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Update to {update}",{update:t.app.update}))+"\n\t\t")]):t._e(),t._v(" "),t.app.canUnInstall?e("NcButton",{staticClass:"uninstall",attrs:{type:"tertiary",disabled:t.installing||t.isLoading},on:{click:function(e){return e.stopPropagation(),t.remove(t.app.id)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Remove"))+"\n\t\t")]):t._e(),t._v(" "),t.app.active?e("NcButton",{attrs:{disabled:t.installing||t.isLoading||t.isInitializing||t.isDeploying},on:{click:function(e){return e.stopPropagation(),t.disable(t.app.id)}}},[t._v("\n\t\t\t"+t._s(t.disableButtonText)+"\n\t\t")]):t._e(),t._v(" "),t.app.active||!t.app.canInstall&&!t.app.isCompatible?t.app.active?t._e():e("NcButton",{attrs:{title:t.forceEnableButtonTooltip,"aria-label":t.forceEnableButtonTooltip,type:"secondary",disabled:t.installing||t.isLoading||!t.defaultDeployDaemonAccessible},on:{click:function(e){return e.stopPropagation(),t.forceEnable(t.app.id)}}},[t._v("\n\t\t\t"+t._s(t.forceEnableButtonText)+"\n\t\t")]):e("NcButton",{attrs:{title:t.enableButtonTooltip,"aria-label":t.enableButtonTooltip,type:"primary",disabled:!t.app.canInstall||t.installing||t.isLoading||!t.defaultDeployDaemonAccessible||t.isInitializing||t.isDeploying},on:{click:function(e){return e.stopPropagation(),t.enable(t.app.id)}}},[t._v("\n\t\t\t"+t._s(t.enableButtonText)+"\n\t\t")])],1)],1)}),[],!1,null,"77df2b64",null).exports},11516:(t,e,a)=>{a.d(e,{A:()=>y});var s=a(85471),n=a(6695),i=a(9165),p=a(53334);const o=(0,s.pM)({__name:"AppLevelBadge",props:{level:null},setup(t){const e=t,a=(0,s.EW)((()=>300===e.level)),o=(0,s.EW)((()=>200===e.level)),r=(0,s.EW)((()=>a.value?i.Yk:i.Tfj)),l=(0,s.EW)((()=>a.value?(0,p.Tl)("settings","Supported"):(0,p.Tl)("settings","Featured"))),c=(0,s.EW)((()=>a.value?(0,p.Tl)("settings","This app is supported via your current Nextcloud subscription."):(0,p.Tl)("settings","Featured apps are developed by and within the community. They offer central functionality and are ready for production use.")));return{__sfc:!0,props:e,isSupported:a,isFeatured:o,badgeIcon:r,badgeText:l,badgeTitle:c,NcIconSvgWrapper:n.A}}});var r=a(85072),l=a.n(r),c=a(97825),d=a.n(c),A=a(77659),u=a.n(A),g=a(55056),h=a.n(g),v=a(10540),m=a.n(v),C=a(41113),_=a.n(C),b=a(13331),f={};f.styleTagTransform=_(),f.setAttributes=h(),f.insert=u().bind(null,"head"),f.domAPI=d(),f.insertStyleElement=m(),l()(b.A,f),b.A&&b.A.locals&&b.A.locals;const y=(0,a(14486).A)(o,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return a.isSupported||a.isFeatured?e("span",{staticClass:"app-level-badge",class:{"app-level-badge--supported":a.isSupported},attrs:{title:a.badgeTitle}},[e(a.NcIconSvgWrapper,{attrs:{path:a.badgeIcon,size:20,inline:""}}),t._v("\n\t"+t._s(a.badgeText)+"\n")],1):t._e()}),[],!1,null,"5ee601b2",null).exports},18881:(t,e,a)=>{a.d(e,{A:()=>f});var s=a(6695),n=a(9165),i=a(53334);const p=(0,a(85471).pM)({name:"AppScore",components:{NcIconSvgWrapper:s.A},props:{score:{type:Number,required:!0}},setup:()=>({mdiStar:n.ZL5,mdiStarHalfFull:n.tdF,mdiStarOutline:n.dF}),computed:{title(){const t=(5*this.score).toFixed(1);return(0,i.Tl)("settings","Community rating: {score}/5",{score:t})},fullStars(){return Math.floor(5*this.score+.25)},emptyStars(){return Math.min(Math.floor(5*(1-this.score)+.25),5-this.fullStars)},hasHalfStar(){return this.fullStars+this.emptyStars<5}}});var o=a(85072),r=a.n(o),l=a(97825),c=a.n(l),d=a(77659),A=a.n(d),u=a(55056),g=a.n(u),h=a(10540),v=a.n(h),m=a(41113),C=a.n(m),_=a(96285),b={};b.styleTagTransform=C(),b.setAttributes=g(),b.insert=A().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=v(),r()(_.A,b),_.A&&_.A.locals&&_.A.locals;const f=(0,a(14486).A)(p,(function(){var t=this,e=t._self._c;return t._self._setupProxy,e("span",{staticClass:"app-score__wrapper",attrs:{role:"img","aria-label":t.title,title:t.title}},[t._l(t.fullStars,(function(a){return e("NcIconSvgWrapper",{key:`full-star-${a}`,attrs:{path:t.mdiStar,inline:""}})})),t._v(" "),t.hasHalfStar?e("NcIconSvgWrapper",{attrs:{path:t.mdiStarHalfFull,inline:""}}):t._e(),t._v(" "),t._l(t.emptyStars,(function(a){return e("NcIconSvgWrapper",{key:`empty-star-${a}`,attrs:{path:t.mdiStarOutline,inline:""}})}))],2)}),[],!1,null,"2193f4e0",null).exports},73978:(e,a,s)=>{s.r(a),s.d(a,{default:()=>pt});var n=s(85471),i=s(53334),p=s(24387),o=s(846),r=s(92973),l=s(18195),c=s(34196),d=s(84237),A=s(61338),u=s(89046);function g(t,e,a){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,a)}function h(t,e,a){return t.set(m(t,e),a),a}function v(t,e){return t.get(m(t,e))}function m(t,e,a){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:a;throw new TypeError("Private element is not present on this object")}function C(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class _{constructor(t){C(this,"value",void 0),C(this,"next",void 0),this.value=t}}var b=new WeakMap,f=new WeakMap,y=new WeakMap;class S{constructor(){g(this,b,void 0),g(this,f,void 0),g(this,y,void 0),this.clear()}enqueue(t){var e;const a=new _(t);v(b,this)?(v(f,this).next=a,h(f,this,a)):(h(b,this,a),h(f,this,a)),h(y,this,(e=v(y,this),++e))}dequeue(){var t;const e=v(b,this);if(e)return h(b,this,v(b,this).next),h(y,this,(t=v(y,this),--t)),e.value}peek(){if(v(b,this))return v(b,this).value}clear(){h(b,this,void 0),h(f,this,void 0),h(y,this,0)}get size(){return v(y,this)}*[Symbol.iterator](){let t=v(b,this);for(;t;)yield t.value,t=t.next}}function x(t){w(t);const e=new S;let a=0;const s=()=>{a<t&&e.size>0&&(e.dequeue()(),a++)},n=async(t,e,n)=>{const i=(async()=>t(...n))();e(i);try{await i}catch{}a--,s()},i=function(i){for(var p=arguments.length,o=new Array(p>1?p-1:0),r=1;r<p;r++)o[r-1]=arguments[r];return new Promise((p=>{((i,p,o)=>{new Promise((t=>{e.enqueue(t)})).then(n.bind(void 0,i,p,o)),(async()=>{await Promise.resolve(),a<t&&s()})()})(i,p,o)}))};return Object.defineProperties(i,{activeCount:{get:()=>a},pendingCount:{get:()=>e.size},clearQueue:{value(){e.clear()}},concurrency:{get:()=>t,set(n){w(n),t=n,queueMicrotask((()=>{for(;a<t&&e.size>0;)s()}))}}}),i}function w(t){if(!Number.isInteger(t)&&t!==Number.POSITIVE_INFINITY||!(t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var N=s(18740),I=s(62938);const D={name:"AppList",components:{AppItem:u.A,NcButton:N.A},props:{category:{type:String,required:!0}},setup:()=>({appApiStore:(0,I.a)()}),data:()=>({search:""}),computed:{counter(){return this.apps.filter((t=>t.update)).length},loading(){return this.$store.getters["appApiApps/isAppApiEnabled"]?this.$store.getters.loading("list")||this.appApiStore.getLoading("list"):this.$store.getters.loading("list")},hasPendingUpdate(){return this.apps.filter((t=>t.update)).length>0},showUpdateAll(){return this.hasPendingUpdate&&this.useListView},apps(){const t=this.$store.getters.isAppApiEnabled?this.appApiStore.getAllApps:[],e=[...this.$store.getters.getAllApps,...t].filter((t=>-1!==t.name.toLowerCase().search(this.search.toLowerCase()))).sort((function(t,e){const a=""+(t.active?0:1)+(t.update?0:1)+t.name,s=""+(e.active?0:1)+(e.update?0:1)+e.name;return OC.Util.naturalSortCompare(a,s)}));return"installed"===this.category?e.filter((t=>t.installed)):"enabled"===this.category?e.filter((t=>t.active&&t.installed)):"disabled"===this.category?e.filter((t=>!t.active&&t.installed)):"app-bundles"===this.category?e.filter((t=>t.bundles)):"updates"===this.category?e.filter((t=>t.update)):"supported"===this.category?e.filter((t=>300===t.level)):"featured"===this.category?e.filter((t=>200===t.level)):e.filter((t=>t.appstore&&void 0!==t.category&&(t.category===this.category||t.category.indexOf(this.category)>-1)))},bundles(){return this.$store.getters.getAppBundles.filter((t=>this.bundleApps(t.id).length>0))},bundleApps:()=>function(t){return this.$store.getters.getAllApps.filter((e=>void 0!==e.bundleIds&&e.bundleIds.includes(t)))},searchApps(){return""===this.search?[]:this.$store.getters.getAllApps.filter((t=>-1!==t.name.toLowerCase().search(this.search.toLowerCase())&&!this.apps.find((e=>e.id===t.id))))},useAppStoreView(){return!this.useListView&&!this.useBundleView},useListView(){return"installed"===this.category||"enabled"===this.category||"disabled"===this.category||"updates"===this.category||"featured"===this.category||"supported"===this.category},useBundleView(){return"app-bundles"===this.category},allBundlesEnabled(){return t=>0===this.bundleApps(t).filter((t=>!t.active)).length},bundleToggleText(){return e=>this.allBundlesEnabled(e)?t("settings","Disable all"):t("settings","Download and enable all")}},beforeDestroy(){(0,A.al)("nextcloud:unified-search.search",this.setSearch),(0,A.al)("nextcloud:unified-search.reset",this.resetSearch)},mounted(){(0,A.B1)("nextcloud:unified-search.search",this.setSearch),(0,A.B1)("nextcloud:unified-search.reset",this.resetSearch)},methods:{setSearch(t){let{query:e}=t;this.search=e},resetSearch(){this.search=""},toggleBundle(t){return this.allBundlesEnabled(t)?this.disableBundle(t):this.enableBundle(t)},enableBundle(t){const e=this.bundleApps(t).map((t=>t.id));this.$store.dispatch("enableApp",{appId:e,groups:[]}).catch((t=>{console.error(t),OC.Notification.show(t)}))},disableBundle(t){const e=this.bundleApps(t).map((t=>t.id));this.$store.dispatch("disableApp",{appId:e,groups:[]}).catch((t=>{OC.Notification.show(t)}))},updateAll(){const t=x(1);this.apps.filter((t=>t.update)).map((e=>t((()=>{this.update(e.id)}))))}}};var T=s(85072),E=s.n(T),k=s(97825),B=s.n(k),L=s(77659),P=s.n(L),O=s(55056),R=s.n(O),U=s(10540),W=s.n(U),G=s(41113),M=s.n(G),$=s(59117),F={};F.styleTagTransform=M(),F.setAttributes=R(),F.insert=P().bind(null,"head"),F.domAPI=B(),F.insertStyleElement=W(),E()($.A,F),$.A&&$.A.locals&&$.A.locals;var Y=s(14486);const z=(0,Y.A)(D,(function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"app-content-inner"}},[e("div",{staticClass:"apps-list",class:{"apps-list--list-view":t.useBundleView||t.useListView,"apps-list--store-view":t.useAppStoreView},attrs:{id:"apps-list"}},[t.useListView?[t.showUpdateAll?e("div",{staticClass:"apps-list__toolbar"},[t._v("\n\t\t\t\t"+t._s(t.n("settings","%n app has an update available","%n apps have an update available",t.counter))+"\n\t\t\t\t"),t.showUpdateAll?e("NcButton",{attrs:{id:"app-list-update-all",type:"primary"},on:{click:t.updateAll}},[t._v("\n\t\t\t\t\t"+t._s(t.n("settings","Update","Update all",t.counter))+"\n\t\t\t\t")]):t._e()],1):t._e(),t._v(" "),t.showUpdateAll?t._e():e("div",{staticClass:"apps-list__toolbar"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","All apps are up-to-date."))+"\n\t\t\t")]),t._v(" "),e("TransitionGroup",{staticClass:"apps-list__list-container",attrs:{name:"apps-list",tag:"table"}},[e("tr",{key:"app-list-view-header"},[e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Icon")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Name")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Version")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Level")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Actions")))])])]),t._v(" "),t._l(t.apps,(function(a){return e("AppItem",{key:a.id,attrs:{app:a,category:t.category}})}))],2)]:t._e(),t._v(" "),t.useBundleView?e("table",{staticClass:"apps-list__list-container"},[e("tr",{key:"app-list-view-header"},[e("th",{attrs:{id:"app-table-col-icon"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Icon")))])]),t._v(" "),e("th",{attrs:{id:"app-table-col-name"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Name")))])]),t._v(" "),e("th",{attrs:{id:"app-table-col-version"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Version")))])]),t._v(" "),e("th",{attrs:{id:"app-table-col-level"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Level")))])]),t._v(" "),e("th",{attrs:{id:"app-table-col-actions"}},[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Actions")))])])]),t._v(" "),t._l(t.bundles,(function(a){return[e("tr",{key:a.id},[e("th",{attrs:{id:`app-table-rowgroup-${a.id}`,colspan:"5",scope:"rowgroup"}},[e("div",{staticClass:"apps-list__bundle-heading"},[e("span",{staticClass:"apps-list__bundle-header"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(a.name)+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("NcButton",{attrs:{type:"secondary"},on:{click:function(e){return t.toggleBundle(a.id)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.t("settings",t.bundleToggleText(a.id)))+"\n\t\t\t\t\t\t\t")])],1)])]),t._v(" "),t._l(t.bundleApps(a.id),(function(s){return e("AppItem",{key:a.id+s.id,attrs:{"use-bundle-view":!0,headers:`app-table-rowgroup-${a.id}`,app:s,category:t.category}})}))]}))],2):t._e(),t._v(" "),t.useAppStoreView?e("ul",{staticClass:"apps-list__store-container"},t._l(t.apps,(function(a){return e("AppItem",{key:a.id,attrs:{app:a,category:t.category,"list-view":!1}})})),1):t._e()],2),t._v(" "),e("div",{staticClass:"apps-list apps-list--list-view",attrs:{id:"apps-list-search"}},[e("div",{staticClass:"apps-list__list-container"},[""!==t.search&&t.searchApps.length>0?e("table",{staticClass:"apps-list__list-container"},[e("caption",{staticClass:"apps-list__bundle-header"},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Results from other categories"))+"\n\t\t\t\t")]),t._v(" "),e("tr",{key:"app-list-view-header"},[e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Icon")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Name")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Version")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Level")))])]),t._v(" "),e("th",[e("span",{staticClass:"hidden-visually"},[t._v(t._s(t.t("settings","Actions")))])])]),t._v(" "),t._l(t.searchApps,(function(a){return e("AppItem",{key:a.id,attrs:{app:a,category:t.category}})}))],2):t._e()])]),t._v(" "),""===t.search||t.loading||0!==t.searchApps.length||0!==t.apps.length?t._e():e("div",{staticClass:"emptycontent emptycontent-search",attrs:{id:"apps-list-empty"}},[e("div",{staticClass:"icon-settings-dark",attrs:{id:"app-list-empty-icon"}}),t._v(" "),e("h2",[t._v(t._s(t.t("settings","No apps found for your version")))])])])}),[],!1,null,"4998c07c",null).exports;var V=s(9165),q=s(85168),j=s(63814),H=s(65043),Q=s(6695),K=s(36620);const J=t=>{const e={...t};if(e.date&&(e.date=Date.parse(e.date)),e.expiryDate&&(e.expiryDate=Date.parse(e.expiryDate)),"post"===e.type)return e;if("showcase"===e.type)return e;if("carousel"===e.type)return e;throw new Error(`Invalid argument, app discover element with type ${t.type??"unknown"} is unknown`)},X=t=>{const e=Date.now();return!(t.date&&t.date>e||t.expiryDate&&t.expiryDate<e)},Z=(0,n.pM)({__name:"AppStoreDiscoverSection",setup(t){const e=(0,n.$V)((()=>s.e(3303).then(s.bind(s,63303)))),a=(0,n.$V)((()=>s.e(9972).then(s.bind(s,79972)))),p=(0,n.$V)((()=>s.e(8737).then(s.bind(s,98737)))),o=(0,n.KR)(!1),r=(0,n.KR)([]),l=t=>{for(let e=t.length-1;e>0;e--){const a=Math.floor(Math.random()*(e+1));[t[e],t[a]]=[t[a],t[e]]}return t};return(0,n.KC)((async()=>{try{const{data:t}=await H.Ay.get((0,j.Jv)("/settings/api/apps/discover"));if(0===t.length)return K.A.info("No app discover elements available (empty response)"),void(o.value=!0);const e=t.map(J).filter(X),a=l(e);a.sort(((t,e)=>(t.order??1/0)<(e.order??1/0)?-1:1)),r.value=a}catch(t){o.value=!0,K.A.error(t),(0,q.Qg)((0,i.Tl)("settings","Could not load app discover section"))}})),{__sfc:!0,PostType:e,CarouselType:a,ShowcaseType:p,hasError:o,elements:r,shuffleArray:l,getComponent:t=>"post"===t?e:"carousel"===t?a:"showcase"===t?p:(0,n.pM)({mounted:()=>K.A.error("Unknown component requested ",t),render:t=>t("div",(0,i.Tl)("settings","Could not render element"))}),mdiEyeOff:V.Bk0,t:i.Tl,NcEmptyContent:c.A,NcIconSvgWrapper:Q.A,NcLoadingIcon:d.A}}});var tt=s(63021),et={};et.styleTagTransform=M(),et.setAttributes=R(),et.insert=P().bind(null,"head"),et.domAPI=B(),et.insertStyleElement=W(),E()(tt.A,et),tt.A&&tt.A.locals&&tt.A.locals;const at=(0,Y.A)(Z,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e("div",{staticClass:"app-discover"},[a.hasError?e(a.NcEmptyContent,{attrs:{name:a.t("settings","Nothing to show"),description:a.t("settings","Could not load section content from app store.")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.mdiEyeOff,size:64}})]},proxy:!0}],null,!1,638098482)}):0===a.elements.length?e(a.NcEmptyContent,{attrs:{name:a.t("settings","Loading"),description:a.t("settings","Fetching the latest news…")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcLoadingIcon,{attrs:{size:64}})]},proxy:!0}])}):t._l(a.elements,(function(s,n){return e(a.getComponent(s.type),t._b({key:s.id??n,tag:"component"},"component",s,!1))}))],2)}),[],!1,null,"bb597eea",null).exports,st=(0,n.pM)({__name:"AppStore",setup(t){const e=(0,p.lq)(),a=(0,o.T)(),s=(0,I.a)(),A=(0,n.EW)((()=>e.params?.category??"discover")),u=(0,i.Tl)("settings","App Store"),g=(0,n.EW)((()=>r.l[A.value]??a.getCategoryById(A.value)?.displayName??u));(0,n.nT)((()=>{window.document.title=`${g.value} - ${u} - Nextcloud`}));const h=(0,n.nI)(),v=(0,n.EW)((()=>(h?.proxy).$store.getters.loading("list")));return(0,n.KC)((()=>{(h?.proxy).$store.dispatch("getCategories",{shouldRefetchCategories:!0}),(h?.proxy).$store.dispatch("getAllApps"),(h?.proxy).$store.getters.isAppApiEnabled&&(s.fetchAllApps(),s.updateAppsStatus())})),(0,n.xo)((()=>{clearInterval(s.getStatusUpdater)})),{__sfc:!0,route:e,store:a,appApiStore:s,currentCategory:A,appStoreLabel:u,viewLabel:g,instance:h,isLoading:v,t:i.Tl,NcAppContent:l.A,NcEmptyContent:c.A,NcLoadingIcon:d.A,AppList:z,AppStoreDiscoverSection:at}}});var nt=s(47321),it={};it.styleTagTransform=M(),it.setAttributes=R(),it.insert=P().bind(null,"head"),it.domAPI=B(),it.insertStyleElement=W(),E()(nt.A,it),nt.A&&nt.A.locals&&nt.A.locals;const pt=(0,Y.A)(st,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e(a.NcAppContent,{staticClass:"app-settings-content",attrs:{"page-heading":a.appStoreLabel}},[e("h2",{staticClass:"app-settings-content__label",domProps:{textContent:t._s(a.viewLabel)}}),t._v(" "),"discover"===a.currentCategory?e(a.AppStoreDiscoverSection):a.isLoading?e(a.NcEmptyContent,{staticClass:"empty-content__loading",attrs:{name:a.t("settings","Loading app list")},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcLoadingIcon,{attrs:{size:64}})]},proxy:!0}])}):e(a.AppList,{attrs:{category:a.currentCategory}})],1)}),[],!1,null,"6235de08",null).exports},28372:(t,e,a)=>{a.r(e),a.d(e,{default:()=>E});var s=a(85471),n=a(32981),i=a(53334),p=a(92973),o=a(846),r=a(42530),l=a(52439),c=a(66687),d=a(85947),A=a(6695),u=a(84237),g=a(86438);const h=(0,s.pM)({__name:"AppStoreNavigation",setup(t){const e=(0,n.C)("settings","appstoreEnabled",!0),a=(0,n.C)("settings","appstoreDeveloperDocs",""),h=(0,o.T)(),v=(0,s.EW)((()=>h.categories)),m=(0,s.EW)((()=>h.loading.categories)),C=(0,s.EW)((()=>void 0!==h.apps.find((t=>{let{level:e}=t;return 300===e}))));return(0,s.KC)((()=>{h.loadCategories(),h.loadApps()})),{__sfc:!0,appstoreEnabled:e,developerDocsUrl:a,store:h,categories:v,categoriesLoading:m,isSubscribed:C,t:i.Tl,APPS_SECTION_ENUM:p.l,NcAppNavigation:r.A,NcAppNavigationItem:l.A,NcAppNavigationSpacer:c.A,NcCounterBubble:d.A,NcIconSvgWrapper:A.A,NcLoadingIcon:u.A,APPSTORE_CATEGORY_ICONS:g.A}}});var v=a(85072),m=a.n(v),C=a(97825),_=a.n(C),b=a(77659),f=a.n(b),y=a(55056),S=a.n(y),x=a(10540),w=a.n(x),N=a(41113),I=a.n(N),D=a(88956),T={};T.styleTagTransform=I(),T.setAttributes=S(),T.insert=f().bind(null,"head"),T.domAPI=_(),T.insertStyleElement=w(),m()(D.A,T),D.A&&D.A.locals&&D.A.locals;const E=(0,a(14486).A)(h,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e(a.NcAppNavigation,{attrs:{"aria-label":a.t("settings","Apps")},scopedSlots:t._u([{key:"list",fn:function(){return[a.appstoreEnabled?e(a.NcAppNavigationItem,{attrs:{id:"app-category-discover",to:{name:"apps-category",params:{category:"discover"}},name:a.APPS_SECTION_ENUM.discover},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.discover}})]},proxy:!0}],null,!1,1397544286)}):t._e(),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-category-installed",to:{name:"apps-category",params:{category:"installed"}},name:a.APPS_SECTION_ENUM.installed},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.installed}})]},proxy:!0}])}),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-category-enabled",to:{name:"apps-category",params:{category:"enabled"}},name:a.APPS_SECTION_ENUM.enabled},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.enabled}})]},proxy:!0}])}),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-category-disabled",to:{name:"apps-category",params:{category:"disabled"}},name:a.APPS_SECTION_ENUM.disabled},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.disabled}})]},proxy:!0}])}),t._v(" "),a.store.updateCount>0?e(a.NcAppNavigationItem,{attrs:{id:"app-category-updates",to:{name:"apps-category",params:{category:"updates"}},name:a.APPS_SECTION_ENUM.updates},scopedSlots:t._u([{key:"counter",fn:function(){return[e(a.NcCounterBubble,[t._v(t._s(a.store.updateCount))])]},proxy:!0},{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.updates}})]},proxy:!0}],null,!1,3001044337)}):t._e(),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-category-your-bundles",to:{name:"apps-category",params:{category:"app-bundles"}},name:a.APPS_SECTION_ENUM["app-bundles"]},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.bundles}})]},proxy:!0}])}),t._v(" "),e(a.NcAppNavigationSpacer),t._v(" "),a.appstoreEnabled&&a.categoriesLoading?e("li",{staticClass:"categories--loading"},[e(a.NcLoadingIcon,{attrs:{size:20,"aria-label":a.t("settings","Loading categories")}})],1):a.appstoreEnabled&&!a.categoriesLoading?[a.isSubscribed?e(a.NcAppNavigationItem,{attrs:{id:"app-category-supported",to:{name:"apps-category",params:{category:"supported"}},name:a.APPS_SECTION_ENUM.supported},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.supported}})]},proxy:!0}],null,!1,613663011)}):t._e(),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-category-featured",to:{name:"apps-category",params:{category:"featured"}},name:a.APPS_SECTION_ENUM.featured},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.APPSTORE_CATEGORY_ICONS.featured}})]},proxy:!0}])}),t._v(" "),t._l(a.categories,(function(s){return e(a.NcAppNavigationItem,{key:s.id,attrs:{id:`app-category-${s.id}`,name:s.displayName,to:{name:"apps-category",params:{category:s.id}}},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:s.icon}})]},proxy:!0}],null,!0)})}))]:t._e(),t._v(" "),e(a.NcAppNavigationItem,{attrs:{id:"app-developer-docs",name:a.t("settings","Developer documentation ↗"),href:a.developerDocsUrl}})]},proxy:!0}])})}),[],!1,null,"4b956a9f",null).exports},7896:(e,a,s)=>{s.r(a),s.d(a,{default:()=>At});var n=s(85471),i=s(53334),p=s(24387),o=s(846),r=s(35190),l=s(6695),c=s(18881),d=s(9165),A=s(46503),u=s(60023),g=s(42838),h=s.n(g);const v={name:"Markdown",props:{text:{type:String,default:""},minHeading:{type:Number,default:1}},computed:{renderMarkdown(){const t=new u.xI.Renderer;return t.link=function(t){let e,{href:a,title:s,text:n}=t;try{e=decodeURIComponent(unescape(a)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0!==e.indexOf("http:")&&0!==e.indexOf("https:"))return"";let i='<a href="'+a+'" rel="noreferrer noopener"';return s&&(i+=' title="'+s+'"'),i+=">"+n+"</a>",i},t.heading=t=>{let{text:e,depth:a}=t;return a=Math.min(6,a+(this.minHeading-1)),`<h${a}>${e}</h${a}>`},t.image=t=>{let{title:e,text:a}=t;return a||e},t.blockquote=t=>{let{text:e}=t;return`<blockquote>${e}</blockquote>`},h().sanitize((0,u.xI)(this.text.trim(),{renderer:t,gfm:!1,highlight:!1,tables:!1,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1}),{SAFE_FOR_JQUERY:!0,ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","strong","p","a","ul","ol","li","em","del","blockquote"]})}}};var m=s(85072),C=s.n(m),_=s(97825),b=s.n(_),f=s(77659),y=s.n(f),S=s(55056),x=s.n(S),w=s(10540),N=s.n(w),I=s(41113),D=s.n(I),T=s(53689),E={};E.styleTagTransform=D(),E.setAttributes=x(),E.insert=y().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=N(),C()(T.A,E),T.A&&T.A.locals&&T.A.locals;var k=s(14486);const B=(0,k.A)(v,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"settings-markdown",domProps:{innerHTML:t._s(t.renderMarkdown)}})}),[],!1,null,"5184f8c2",null).exports,L=(0,n.pM)({__name:"AppDescriptionTab",props:{app:null},setup:t=>({__sfc:!0,mdiTextShort:d.azb,t:i.Tl,NcAppSidebarTab:A.A,NcIconSvgWrapper:l.A,Markdown:B})});var P=s(3007),O={};O.styleTagTransform=D(),O.setAttributes=x(),O.insert=y().bind(null,"head"),O.domAPI=b(),O.insertStyleElement=N(),C()(P.A,O),P.A&&P.A.locals&&P.A.locals;const R=(0,k.A)(L,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e(a.NcAppSidebarTab,{attrs:{id:"desc",name:a.t("settings","Description"),order:0},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.mdiTextShort}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-description"},[e(a.Markdown,{attrs:{text:t.app.description,"min-heading":4}})],1)])}),[],!1,null,"cf0a1ae6",null).exports;var U=s(18740),W=s(4604),G=s(67607),M=s(32073),$=s(45834),F=s(62938);const Y={name:"AppDetailsTab",components:{NcAppSidebarTab:A.A,NcButton:U.A,NcDateTime:W.A,NcIconSvgWrapper:l.A,NcSelect:G.A,NcCheckboxRadioSwitch:M.A},mixins:[$.A],props:{app:{type:Object,required:!0}},setup:()=>({store:(0,o.T)(),appApiStore:(0,F.a)(),mdiBug:d.xhV,mdiFeatureSearch:d.NZe,mdiStar:d.ZL5,mdiTextBox:d.n1r,mdiTooltipQuestion:d.iNF}),data:()=>({groupCheckedAppsData:!1,removeData:!1}),computed:{lastModified(){return(this.app.appstoreData?.releases??[]).map((t=>{let{lastModified:e}=t;return Date.parse(e)})).sort().at(0)??null},appAuthors(){if(console.warn(this.app),!this.app)return"";const t=t=>t["@value"]?t["@value"]:t;return(Array.isArray(this.app.author)?this.app.author.map(t):[t(this.app.author)]).sort(((t,e)=>t.split(" ").at(-1).localeCompare(e.split(" ").at(-1)))).join(", ")},appstoreUrl(){return`https://apps.nextcloud.com/apps/${this.app.id}`},externalResources(){const e=[];return this.app.internal||e.push({id:"appstore",href:this.appstoreUrl,label:t("settings","View in store")}),this.app.website&&e.push({id:"website",href:this.app.website,label:t("settings","Visit website")}),this.app.documentation&&(this.app.documentation.user&&e.push({id:"doc-user",href:this.app.documentation.user,label:t("settings","Usage documentation")}),this.app.documentation.admin&&e.push({id:"doc-admin",href:this.app.documentation.admin,label:t("settings","Admin documentation")}),this.app.documentation.developer&&e.push({id:"doc-developer",href:this.app.documentation.developer,label:t("settings","Developer documentation")})),e},appCategories(){return[this.app.category].flat().map((t=>this.store.getCategoryById(t)?.displayName??t)).join(", ")},rateAppUrl(){return`${this.appstoreUrl}#comments`},appGroups(){return this.app.groups.map((t=>({id:t,name:t})))},groups(){return this.$store.getters.getGroups.filter((t=>"disabled"!==t.id)).sort(((t,e)=>t.name.localeCompare(e.name)))}},mounted(){this.app.groups.length>0&&(this.groupCheckedAppsData=!0)},watch:{"app.id"(){this.removeData=!1}},methods:{toggleRemoveData(){this.removeData=!this.removeData}}};var z=s(9753),V={};V.styleTagTransform=D(),V.setAttributes=x(),V.insert=y().bind(null,"head"),V.domAPI=b(),V.insertStyleElement=N(),C()(z.A,V),z.A&&z.A.locals&&z.A.locals;const q=(0,k.A)(Y,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{attrs:{id:"details",name:t.t("settings","Details"),order:1},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiTextBox}})]},proxy:!0}])},[t._v(" "),e("div",{staticClass:"app-details"},[e("div",{staticClass:"app-details__actions"},[t.app.active&&t.canLimitToGroups(t.app)?e("div",{staticClass:"app-details__actions-groups"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.groupCheckedAppsData,expression:"groupCheckedAppsData"}],staticClass:"groups-enable__checkbox checkbox",attrs:{id:`groups_enable_${t.app.id}`,type:"checkbox"},domProps:{value:t.app.id,checked:Array.isArray(t.groupCheckedAppsData)?t._i(t.groupCheckedAppsData,t.app.id)>-1:t.groupCheckedAppsData},on:{change:[function(e){var a=t.groupCheckedAppsData,s=e.target,n=!!s.checked;if(Array.isArray(a)){var i=t.app.id,p=t._i(a,i);s.checked?p<0&&(t.groupCheckedAppsData=a.concat([i])):p>-1&&(t.groupCheckedAppsData=a.slice(0,p).concat(a.slice(p+1)))}else t.groupCheckedAppsData=n},t.setGroupLimit]}}),t._v(" "),e("label",{attrs:{for:`groups_enable_${t.app.id}`}},[t._v(t._s(t.t("settings","Limit to groups")))]),t._v(" "),e("input",{staticClass:"group_select",attrs:{type:"hidden",title:t.t("settings","All"),value:""}}),t._v(" "),e("br"),t._v(" "),e("label",{attrs:{for:"limitToGroups"}},[e("span",[t._v(t._s(t.t("settings","Limit app usage to groups")))])]),t._v(" "),t.isLimitedToGroups(t.app)?e("NcSelect",{attrs:{"input-id":"limitToGroups",options:t.groups,value:t.appGroups,limit:5,label:"name",multiple:!0,"close-on-select":!1},on:{"option:selected":t.addGroupLimitation,"option:deselected":t.removeGroupLimitation,search:t.asyncFindGroup}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])]):t._e()],1):t._e(),t._v(" "),e("div",{staticClass:"app-details__actions-manage"},[t.app.update?e("input",{staticClass:"update primary",attrs:{type:"button",value:t.t("settings","Update to {version}",{version:t.app.update}),disabled:t.installing||t.isLoading||t.isManualInstall},on:{click:function(e){return t.update(t.app.id)}}}):t._e(),t._v(" "),t.app.canUnInstall?e("input",{staticClass:"uninstall",attrs:{type:"button",value:t.t("settings","Remove"),disabled:t.installing||t.isLoading},on:{click:function(e){return t.remove(t.app.id,t.removeData)}}}):t._e(),t._v(" "),t.app.active?e("input",{staticClass:"enable",attrs:{type:"button",value:t.disableButtonText,disabled:t.installing||t.isLoading||t.isInitializing||t.isDeploying},on:{click:function(e){return t.disable(t.app.id)}}}):t._e(),t._v(" "),t.app.active||!t.app.canInstall&&!t.app.isCompatible?t.app.active||t.app.canInstall?t._e():e("input",{staticClass:"enable force",attrs:{title:t.forceEnableButtonTooltip,"aria-label":t.forceEnableButtonTooltip,type:"button",value:t.forceEnableButtonText,disabled:t.installing||t.isLoading},on:{click:function(e){return t.forceEnable(t.app.id)}}}):e("input",{staticClass:"enable primary",attrs:{title:t.enableButtonTooltip,"aria-label":t.enableButtonTooltip,type:"button",value:t.enableButtonText,disabled:!t.app.canInstall||t.installing||t.isLoading||!t.defaultDeployDaemonAccessible||t.isInitializing||t.isDeploying},on:{click:function(e){return t.enable(t.app.id)}}})]),t._v(" "),t.defaultDeployDaemonAccessible?t._e():e("p",{staticClass:"warning"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Default Deploy daemon is not accessible"))+"\n\t\t\t")]),t._v(" "),t.app.canUnInstall?e("NcCheckboxRadioSwitch",{attrs:{checked:t.removeData,disabled:t.installing||t.isLoading||!t.defaultDeployDaemonAccessible},on:{"update:checked":t.toggleRemoveData}},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Delete data on remove"))+"\n\t\t\t")]):t._e()],1),t._v(" "),e("ul",{staticClass:"app-details__dependencies"},[t.app.missingMinOwnCloudVersion?e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app has no minimum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t\t")]):t._e(),t._v(" "),t.app.missingMaxOwnCloudVersion?e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app has no maximum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t\t")]):t._e(),t._v(" "),t.app.canInstall?t._e():e("li",[t._v("\n\t\t\t\t"+t._s(t.t("settings","This app cannot be installed because the following dependencies are not fulfilled:"))+"\n\t\t\t\t"),e("ul",{staticClass:"missing-dependencies"},t._l(t.app.missingDependencies,(function(a,s){return e("li",{key:s},[t._v("\n\t\t\t\t\t\t"+t._s(a)+"\n\t\t\t\t\t")])})),0)])]),t._v(" "),t.lastModified&&!t.app.shipped?e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Latest updated"))+"\n\t\t\t")]),t._v(" "),e("NcDateTime",{attrs:{timestamp:t.lastModified}})],1):t._e(),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Author"))+"\n\t\t\t")]),t._v(" "),e("p",{staticClass:"app-details__authors"},[t._v("\n\t\t\t\t"+t._s(t.appAuthors)+"\n\t\t\t")])]),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v("\n\t\t\t\t"+t._s(t.t("settings","Categories"))+"\n\t\t\t")]),t._v(" "),e("p",[t._v("\n\t\t\t\t"+t._s(t.appCategories)+"\n\t\t\t")])]),t._v(" "),t.externalResources.length>0?e("div",{staticClass:"app-details__section"},[e("h4",[t._v(t._s(t.t("settings","Resources")))]),t._v(" "),e("ul",{staticClass:"app-details__documentation",attrs:{"aria-label":t.t("settings","Documentation")}},t._l(t.externalResources,(function(a){return e("li",{key:a.id},[e("a",{staticClass:"appslink",attrs:{href:a.href,target:"_blank",rel:"noreferrer noopener"}},[t._v("\n\t\t\t\t\t\t"+t._s(a.label)+" ↗\n\t\t\t\t\t")])])})),0)]):t._e(),t._v(" "),e("div",{staticClass:"app-details__section"},[e("h4",[t._v(t._s(t.t("settings","Interact")))]),t._v(" "),e("div",{staticClass:"app-details__interact"},[e("NcButton",{attrs:{disabled:!t.app.bugs,href:t.app.bugs??"#","aria-label":t.t("settings","Report a bug"),title:t.t("settings","Report a bug")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiBug}})]},proxy:!0}])}),t._v(" "),e("NcButton",{attrs:{disabled:!t.app.bugs,href:t.app.bugs??"#","aria-label":t.t("settings","Request feature"),title:t.t("settings","Request feature")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiFeatureSearch}})]},proxy:!0}])}),t._v(" "),t.app.appstoreData?.discussion?e("NcButton",{attrs:{href:t.app.appstoreData.discussion,"aria-label":t.t("settings","Ask questions or discuss"),title:t.t("settings","Ask questions or discuss")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiTooltipQuestion}})]},proxy:!0}],null,!1,1288192462)}):t._e(),t._v(" "),t.app.internal?t._e():e("NcButton",{attrs:{href:t.rateAppUrl,"aria-label":t.t("settings","Rate the app"),title:t.t("settings","Rate")},scopedSlots:t._u([{key:"icon",fn:function(){return[e("NcIconSvgWrapper",{attrs:{path:t.mdiStar}})]},proxy:!0}],null,!1,422450625)})],1)])])])}),[],!1,null,"12264396",null).exports,j=(0,n.pM)({__name:"AppReleasesTab",props:{app:null},setup(t){const e=t,a=(0,n.EW)((()=>Object.values(e.app.releases?.[0]?.translations??{}).some((t=>{let{changelog:e}=t;return!!e}))));return{__sfc:!0,props:e,hasChangelog:a,createChangelogFromRelease:t=>t.translations?.[(0,i.Z0)()]?.changelog??t.translations?.en?.changelog??"",mdiClockFast:d.NWU,t:i.Tl,NcAppSidebarTab:A.A,NcIconSvgWrapper:l.A,Markdown:B}}});var H=s(37925),Q={};Q.styleTagTransform=D(),Q.setAttributes=x(),Q.insert=y().bind(null,"head"),Q.domAPI=b(),Q.insertStyleElement=N(),C()(H.A,Q),H.A&&H.A.locals&&H.A.locals;const K=(0,k.A)(j,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return a.hasChangelog?e(a.NcAppSidebarTab,{attrs:{id:"changelog",name:a.t("settings","Changelog"),order:2},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.mdiClockFast,size:24}})]},proxy:!0}],null,!1,1849836872)},[t._v(" "),t._l(t.app.releases,(function(s){return e("div",{key:s.version,staticClass:"app-sidebar-tabs__release"},[e("h2",[t._v(t._s(s.version))]),t._v(" "),e(a.Markdown,{staticClass:"app-sidebar-tabs__release-text",attrs:{text:a.createChangelogFromRelease(s)}})],1)}))],2):t._e()}),[],!1,null,"9c32407e",null).exports,J=(0,n.pM)({__name:"AppDeployDaemonTab",props:{app:null},setup(t){const e=t;return{__sfc:!0,props:e,gpuSupport:(0,n.KR)("cpu"!==e.app?.daemon?.deploy_config?.computeDevice?.id||!1),NcAppSidebarTab:A.A,NcIconSvgWrapper:l.A,mdiFileChart:d.pTY}}});var X=s(17971),Z={};Z.styleTagTransform=D(),Z.setAttributes=x(),Z.insert=y().bind(null,"head"),Z.domAPI=b(),Z.insertStyleElement=N(),C()(X.A,Z),X.A&&X.A.locals&&X.A.locals;const tt=(0,k.A)(J,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return t.app?.daemon?e(a.NcAppSidebarTab,{attrs:{id:"daemon",name:t.t("settings","Daemon"),order:3},scopedSlots:t._u([{key:"icon",fn:function(){return[e(a.NcIconSvgWrapper,{attrs:{path:a.mdiFileChart,size:24}})]},proxy:!0}],null,!1,1746493066)},[t._v(" "),e("div",{staticClass:"daemon"},[e("h4",[t._v(t._s(t.t("settings","Deploy Daemon")))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Type")))]),t._v(": "+t._s(t.app?.daemon.accepts_deploy_id))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Name")))]),t._v(": "+t._s(t.app?.daemon.name))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Display Name")))]),t._v(": "+t._s(t.app?.daemon.display_name))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","GPUs support")))]),t._v(": "+t._s(a.gpuSupport))]),t._v(" "),e("p",[e("b",[t._v(t._s(t.t("settings","Compute device")))]),t._v(": "+t._s(t.app?.daemon?.deploy_config?.computeDevice?.label))])])]):t._e()}),[],!1,null,"10be429c",null).exports;var et=s(11516);const at=(0,n.pM)({__name:"AppDaemonBadge",props:{daemon:null},setup:t=>({__sfc:!0,mdiFileChart:d.pTY,NcIconSvgWrapper:l.A})});var st=s(45520),nt={};nt.styleTagTransform=D(),nt.setAttributes=x(),nt.insert=y().bind(null,"head"),nt.domAPI=b(),nt.insertStyleElement=N(),C()(st.A,nt),st.A&&st.A.locals&&st.A.locals;const it=(0,k.A)(at,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return t.daemon?e("span",{staticClass:"app-daemon-badge",attrs:{title:t.daemon.name}},[e(a.NcIconSvgWrapper,{attrs:{path:a.mdiFileChart,size:20,inline:""}}),t._v("\n\t"+t._s(t.daemon.display_name)+"\n")],1):t._e()}),[],!1,null,"4e5b1dd0",null).exports;var pt=s(86438),ot=s(36620),rt=s(8265);const lt=(0,n.pM)({__name:"AppStoreSidebar",setup(t){const e=(0,p.lq)(),a=(0,p.rd)(),s=(0,o.T)(),A=(0,F.a)(),u=(0,rt.P)(),g=(0,n.EW)((()=>e.params.id??"")),h=(0,n.EW)((()=>{if(u.getters.isAppApiEnabled){const t=A.getAllApps.find((t=>t.id===g.value))??null;if(t)return t}return s.getAppById(g.value)})),v=(0,n.EW)((()=>h.value.appstoreData?.ratingNumOverall>5)),m=(0,n.EW)((()=>h.value.appstoreData?.ratingNumRecent>5?h.value.appstoreData.ratingRecent:h.value.appstoreData?.ratingOverall??.5)),C=(0,n.EW)((()=>null!==h.value)),{appIcon:_}=function(t){const e=(0,n.KR)(null),a=(0,n.EW)((()=>{let e;return e=t.value?.app_api?d.ED:[t.value?.category??[]].flat().map((t=>pt.A[t])).filter((t=>!!t)).at(0)??(t.value?.app_api?d.ED:d.CZ3),e?`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="${e}" /></svg>`:null}));return(0,n.nT)((async()=>{if(t.value?.preview){e.value=null;try{const a=await window.fetch(t.value.preview),s=await a.blob(),n=await s.text();e.value=n.replaceAll(/fill="#(fff|ffffff)([a-z0-9]{1,2})?"/gi,'fill="currentColor"')}catch(t){e.value=a.value,ot.A.error("Could not load app icon",{error:t})}}else e.value=a.value})),{appIcon:e}}(h),b=(0,n.EW)((()=>h.value?""!==h.value.license?(0,i.Tl)("settings","Version {version}, {license}-licensed",{version:h.value.version,license:h.value.licence.toString().toUpperCase()}):(0,i.Tl)("settings","Version {version}",{version:h.value.version}):"")),f=(0,n.KR)("details");(0,n.wB)([h],(()=>{f.value="details"}));const y=(0,n.KR)(!1),S=(0,n.EW)((()=>h.value?.screenshot&&y.value)),x=()=>{if(h.value?.releases&&h.value?.screenshot){const t=new Image;t.onload=()=>{y.value=!0},t.src=h.value.screenshot}};return(0,n.wB)([h],x),(0,n.sV)(x),{__sfc:!0,route:e,router:a,store:s,appApiStore:A,legacyStore:u,appId:g,app:h,hasRating:v,rating:m,showSidebar:C,appIcon:_,licenseText:b,activeTab:f,hideAppDetails:()=>{a.push({name:"apps-category",params:{category:e.params.category}})},screenshotLoaded:y,hasScreenshot:S,loadScreenshot:x,NcAppSidebar:r.N,NcIconSvgWrapper:l.A,AppScore:c.A,AppDescriptionTab:R,AppDetailsTab:q,AppReleasesTab:K,AppDeployDaemonTab:tt,AppLevelBadge:et.A,AppDaemonBadge:it}}});var ct=s(37205),dt={};dt.styleTagTransform=D(),dt.setAttributes=x(),dt.insert=y().bind(null,"head"),dt.domAPI=b(),dt.insertStyleElement=N(),C()(ct.A,dt),ct.A&&ct.A.locals&&ct.A.locals;const At=(0,k.A)(lt,(function(){var t=this,e=t._self._c,a=t._self._setupProxy;return a.showSidebar?e(a.NcAppSidebar,{staticClass:"app-sidebar",class:{"app-sidebar--with-screenshot":a.hasScreenshot},attrs:{active:a.activeTab,background:a.hasScreenshot?a.app.screenshot:void 0,compact:!a.hasScreenshot,name:a.app.name,title:a.app.name,subname:a.licenseText,subtitle:a.licenseText},on:{"update:active":function(t){a.activeTab=t},close:a.hideAppDetails},scopedSlots:t._u([a.hasScreenshot?null:{key:"header",fn:function(){return[e(a.NcIconSvgWrapper,{staticClass:"app-sidebar__fallback-icon",attrs:{svg:a.appIcon??"",size:64}})]},proxy:!0},{key:"description",fn:function(){return[e("div",{staticClass:"app-sidebar__badges"},[e(a.AppLevelBadge,{attrs:{level:a.app.level}}),t._v(" "),a.app.app_api&&a.app.daemon?e(a.AppDaemonBadge,{attrs:{daemon:a.app.daemon}}):t._e(),t._v(" "),a.hasRating?e(a.AppScore,{attrs:{score:a.rating}}):t._e()],1)]},proxy:!0}],null,!0)},[t._v(" "),t._v(" "),e(a.AppDescriptionTab,{attrs:{app:a.app}}),t._v(" "),e(a.AppDetailsTab,{attrs:{app:a.app}}),t._v(" "),e(a.AppReleasesTab,{attrs:{app:a.app}}),t._v(" "),e(a.AppDeployDaemonTab,{attrs:{app:a.app}})],1):t._e()}),[],!1,null,"70317c96",null).exports}}]); //# sourceMappingURL=settings-apps-view-4529.js.map?v=e1c2e4fde3110bf91aa1