Nothing much just a build up of things
[anni] / priv / static / static / js / 9114.e761a1c6846fea99aaf1.js
1 "use strict";(self.webpackChunkpleroma_fe=self.webpackChunkpleroma_fe||[]).push([[9114],{9114:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ti});var l=n(66252),a=["label"],o=["label"],s=["label"],r=["label"],i=["label"],u=["label"],c=["label"],d=["label"],p=["label"],m=n(79354),f=n(3577),h=["label"],g={class:"setting-item"},b={class:"setting-item"},w={class:"setting-item"},_={class:"setting-item"},k={class:"setting-item"},v={class:"setting-item"},y={class:"setting-item"},$=(0,l._)("th",null,null,-1),C={class:"actions"},V=["href"],T={key:1},U={key:2},x={key:3},L={key:0,class:"alert error"},O=["title"],W={key:1},z={key:2},S=n(4942),P={class:"importer"},D={key:2},I={key:3},j=n(9382),B=n(84131);j.vI.add(B.IJ7,B.NBC);const A={props:{submitHandler:{type:Function,required:!0},submitButtonLabel:{type:String},successMessage:{type:String},errorMessage:{type:String}},data:function(){return{file:null,error:!1,success:!1,submitting:!1}},methods:{change:function(){this.file=this.$refs.input.files[0]},submit:function(){var e=this;this.dismiss(),this.submitting=!0,this.submitHandler(this.file).then((function(){e.success=!0})).catch((function(){e.error=!0})).finally((function(){e.submitting=!1}))},dismiss:function(){this.success=!1,this.error=!1}}};var E=n(83744);const F=(0,E.Z)(A,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",P,[(0,l._)("form",null,[(0,l._)("input",{ref:"input",type:"file",onChange:t[0]||(t[0]=function(){return e.change&&e.change.apply(e,arguments)})},null,544)]),e.submitting?((0,l.wg)(),(0,l.j4)(r,{key:0,class:"importer-uploading",spin:"",icon:"circle-notch"})):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.submit&&e.submit.apply(e,arguments)})},(0,f.zw)(e.submitButtonLabel||e.$t("importer.submit")),1)),e.success?((0,l.wg)(),(0,l.iD)("div",D,[(0,l._)("button",{class:"button-unstyled",onClick:t[2]||(t[2]=function(){return e.dismiss&&e.dismiss.apply(e,arguments)})},[(0,l.Wm)(r,{icon:"times"})]),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l._)("span",null,(0,f.zw)(e.successMessage||e.$t("importer.success")),1)])):e.error?((0,l.wg)(),(0,l.iD)("div",I,[(0,l._)("button",{class:"button-unstyled",onClick:t[3]||(t[3]=function(){return e.dismiss&&e.dismiss.apply(e,arguments)})},[(0,l.Wm)(r,{icon:"times"})]),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l._)("span",null,(0,f.zw)(e.errorMessage||e.$t("importer.error")),1)])):(0,l.kq)("",!0)])}]]);var q={class:"exporter"},Z={key:0};j.vI.add(B.IJ7);const M={props:{getContent:{type:Function,required:!0},filename:{type:String,default:"export.csv"},exportButtonLabel:{type:String},processingMessage:{type:String}},data:function(){return{processing:!1}},methods:{process:function(){var e=this;this.processing=!0,this.getContent().then((function(t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e.filename),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((function(){e.processing=!1}),2e3)}))}}},R=(0,E.Z)(M,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",q,[e.processing?((0,l.wg)(),(0,l.iD)("div",Z,[(0,l.Wm)(r,{icon:"circle-notch",size:"lg",spin:""}),(0,l._)("span",null,(0,f.zw)(e.processingMessage||e.$t("exporter.processing")),1)])):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.process&&e.process.apply(e,arguments)})},(0,f.zw)(e.exportButtonLabel||e.$t("exporter.export")),1))])}]]);var N=n(90350),H=n(989);function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const K={data:function(){return{activeTab:"profile",newDomainToMute:"",listBackupsError:!1,addBackupError:!1,addedBackup:!1,backups:[]}},created:function(){this.$store.dispatch("fetchTokens"),this.fetchBackups()},components:{Importer:F,Exporter:R,Checkbox:N.Z},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,H.rn)({backendInteractor:function(e){return e.api.backendInteractor},user:function(e){return e.users.currentUser}})),methods:{getFollowsContent:function(){return this.backendInteractor.exportFriends({id:this.user.id}).then(this.generateExportableUsersContent)},getBlocksContent:function(){return this.backendInteractor.fetchBlocks().then(this.generateExportableUsersContent)},getMutesContent:function(){return this.backendInteractor.fetchMutes().then(this.generateExportableUsersContent)},importFollows:function(e){return this.backendInteractor.importFollows({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importBlocks:function(e){return this.backendInteractor.importBlocks({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importMutes:function(e){return this.backendInteractor.importMutes({file:e}).then((function(e){if(!e)throw new Error("failed")}))},generateExportableUsersContent:function(e){return e.map((function(e){return e&&e.is_local?e.screen_name+"@"+location.hostname:e.screen_name})).join("\n")},addBackup:function(){var e=this;this.$store.state.api.backendInteractor.addBackup().then((function(t){e.addedBackup=!0,e.addBackupError=!1})).catch((function(t){e.addedBackup=!1,e.addBackupError=t})).then((function(){return e.fetchBackups()}))},fetchBackups:function(){var e=this;this.$store.state.api.backendInteractor.listBackups().then((function(t){e.backups=t,e.listBackupsError=!1})).catch((function(t){e.listBackupsError=t.error}))}}},G=(0,E.Z)(K,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Importer"),i=(0,l.up)("Exporter"),u=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.data_import_export_tab")},[(0,l._)("div",g,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.follow_import")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.import_followers_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importFollows,"success-message":e.$t("settings.follows_imported"),"error-message":e.$t("settings.follow_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",b,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.follow_export")),1),(0,l.Wm)(i,{"get-content":e.getFollowsContent,filename:"friends.csv","export-button-label":e.$t("settings.follow_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",w,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.block_import")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.import_blocks_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importBlocks,"success-message":e.$t("settings.blocks_imported"),"error-message":e.$t("settings.block_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",_,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.block_export")),1),(0,l.Wm)(i,{"get-content":e.getBlocksContent,filename:"blocks.csv","export-button-label":e.$t("settings.block_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",k,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.mute_import")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.import_mutes_from_a_csv_file")),1),(0,l.Wm)(r,{"submit-handler":e.importMutes,"success-message":e.$t("settings.mutes_imported"),"error-message":e.$t("settings.mute_import_error")},null,8,["submit-handler","success-message","error-message"])]),(0,l._)("div",v,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.mute_export")),1),(0,l.Wm)(i,{"get-content":e.getMutesContent,filename:"mutes.csv","export-button-label":e.$t("settings.mute_export_button")},null,8,["get-content","export-button-label"])]),(0,l._)("div",y,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.account_backup")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.account_backup_description")),1),(0,l._)("table",null,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,f.zw)(e.$t("settings.account_backup_table_head")),1),$])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.backups,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t.id},[(0,l._)("td",null,(0,f.zw)(t.inserted_at),1),(0,l._)("td",C,[t.processed?((0,l.wg)(),(0,l.iD)("a",{key:0,target:"_blank",href:t.url},(0,f.zw)(e.$t("settings.download_backup")),9,V)):"running"===t.state?((0,l.wg)(),(0,l.iD)("span",T,(0,f.zw)(e.$tc("settings.backup_running",t.processed_number,{number:t.processed_number})),1)):"failed"===t.state?((0,l.wg)(),(0,l.iD)("span",U,(0,f.zw)(e.$t("settings.backup_failed")),1)):((0,l.wg)(),(0,l.iD)("span",x,(0,f.zw)(e.$t("settings.backup_not_ready")),1))])])})),128))])]),e.listBackupsError?((0,l.wg)(),(0,l.iD)("div",L,[(0,l.Uk)((0,f.zw)(e.$t("settings.list_backups_error",{error:e.error}))+" ",1),(0,l._)("button",{title:e.$t("settings.hide_list_backups_error_action"),onClick:t[0]||(t[0]=function(t){return e.listBackupsError=!1})},[(0,l.Wm)(u,{class:"fa-scale-110 fa-old-padding",icon:"times"})],8,O)])):(0,l.kq)("",!0),(0,l._)("button",{class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.addBackup&&e.addBackup.apply(e,arguments)})},(0,f.zw)(e.$t("settings.add_backup")),1),e.addedBackup?((0,l.wg)(),(0,l.iD)("p",W,(0,f.zw)(e.$t("settings.added_backup")),1)):(0,l.kq)("",!0),!1!==e.addBackupError?((0,l.wg)(),(0,l.iD)("p",z,(0,f.zw)(e.$t("settings.add_backup_error",{error:e.addBackupError})),1)):(0,l.kq)("",!0)])],8,h)}]]);var J=["label"],Q={class:"usersearch-wrapper"},X={class:"bulk-actions"},ee=["label"],te=["label"],ne={class:"usersearch-wrapper"},le={class:"bulk-actions"},ae=["label"],oe={class:"domain-mute-form"},se={class:"bulk-actions"},re=n(27361),ie=n.n(re),ue=n(35161),ce=n.n(ue),de=n(43063),pe=n.n(de),me=n(49963),fe={class:"autosuggest"},he=["placeholder"],ge={key:0,class:"autosuggest-results"};const be={props:{query:{type:Function,required:!0},filter:{type:Function},placeholder:{type:String,default:"Search..."}},data:function(){return{term:"",timeout:null,results:[],resultsVisible:!1}},computed:{filtered:function(){return this.filter?this.filter(this.results):this.results}},watch:{term:function(e){this.fetchResults(e)}},methods:{fetchResults:function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t.results=[],e&&t.query(e).then((function(e){t.results=e}))}),500)},onInputClick:function(){this.resultsVisible=!0},onClickOutside:function(){this.resultsVisible=!1}}},we=(0,E.Z)(be,[["render",function(e,t,n,a,o,s){var r=(0,l.Q2)("click-outside");return(0,l.wy)(((0,l.wg)(),(0,l.iD)("div",fe,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.term=t}),placeholder:e.placeholder,class:"autosuggest-input",onClick:t[1]||(t[1]=function(){return e.onInputClick&&e.onInputClick.apply(e,arguments)})},null,8,he),[[me.nr,e.term]]),e.resultsVisible&&e.filtered.length>0?((0,l.wg)(),(0,l.iD)("div",ge,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.filtered,(function(t){return(0,l.WI)(e.$slots,"default",{item:t})})),256))])):(0,l.kq)("",!0)])),[[r,e.onClickOutside]])}]]);var _e={class:"block-card-content-container"},ke=["disabled"],ve=["disabled"],ye=n(29076);const $e={props:["userId"],data:function(){return{progress:!1}},computed:{user:function(){return this.$store.getters.findUser(this.userId)},relationship:function(){return this.$store.getters.relationship(this.userId)},blocked:function(){return this.relationship.blocking}},components:{BasicUserCard:ye.Z},methods:{unblockUser:function(){var e=this;this.progress=!0,this.$store.dispatch("unblockUser",this.user.id).then((function(){e.progress=!1}))},blockUser:function(){var e=this;this.progress=!0,this.$store.dispatch("blockUser",this.user.id).then((function(){e.progress=!1}))}}},Ce=(0,E.Z)($e,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("basic-user-card");return(0,l.wg)(),(0,l.j4)(r,{user:e.user},{default:(0,l.w5)((function(){return[(0,l._)("div",_e,[e.blocked?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",disabled:e.progress,onClick:t[0]||(t[0]=function(){return e.unblockUser&&e.unblockUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,f.zw)(e.$t("user_card.unblock_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,f.zw)(e.$t("user_card.unblock")),1)],64))],8,ke)):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.progress,onClick:t[1]||(t[1]=function(){return e.blockUser&&e.blockUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,f.zw)(e.$t("user_card.block_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,f.zw)(e.$t("user_card.block")),1)],64))],8,ve))])]})),_:1},8,["user"])}]]);var Ve={class:"mute-card-content-container"},Te=["disabled"],Ue=["disabled"];const xe={props:["userId"],data:function(){return{progress:!1}},computed:{user:function(){return this.$store.getters.findUser(this.userId)},relationship:function(){return this.$store.getters.relationship(this.userId)},muted:function(){return this.relationship.muting}},components:{BasicUserCard:ye.Z},methods:{unmuteUser:function(){var e=this;this.progress=!0,this.$store.dispatch("unmuteUser",this.userId).then((function(){e.progress=!1}))},muteUser:function(){var e=this;this.progress=!0,this.$store.dispatch("muteUser",this.userId).then((function(){e.progress=!1}))}}},Le=(0,E.Z)(xe,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("basic-user-card");return(0,l.wg)(),(0,l.j4)(r,{user:e.user},{default:(0,l.w5)((function(){return[(0,l._)("div",Ve,[e.muted?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",disabled:e.progress,onClick:t[0]||(t[0]=function(){return e.unmuteUser&&e.unmuteUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,f.zw)(e.$t("user_card.unmute_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,f.zw)(e.$t("user_card.unmute")),1)],64))],8,Te)):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.progress,onClick:t[1]||(t[1]=function(){return e.muteUser&&e.muteUser.apply(e,arguments)})},[e.progress?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,f.zw)(e.$t("user_card.mute_progress")),1)],64)):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,f.zw)(e.$t("user_card.mute")),1)],64))],8,Ue))])]})),_:1},8,["user"])}]]);var Oe={class:"domain-mute-card"},We={class:"domain-mute-card-domain"},ze=n(99507);const Se={props:["domain"],components:{ProgressButton:ze.Z},computed:{user:function(){return this.$store.state.users.currentUser},muted:function(){return this.user.domainMutes.includes(this.domain)}},methods:{unmuteDomain:function(){return this.$store.dispatch("unmuteDomain",this.domain)},muteDomain:function(){return this.$store.dispatch("muteDomain",this.domain)}}},Pe=(0,E.Z)(Se,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ProgressButton");return(0,l.wg)(),(0,l.iD)("div",Oe,[(0,l._)("div",We,(0,f.zw)(e.domain),1),e.muted?((0,l.wg)(),(0,l.j4)(r,{key:0,click:e.unmuteDomain,class:"btn button-default"},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.unmute"))+" ",1)]})),_:1},8,["click"])):((0,l.wg)(),(0,l.j4)(r,{key:1,click:e.muteDomain,class:"btn button-default"},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.mute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.mute"))+" ",1)]})),_:1},8,["click"]))])}]]);var De={class:"selectable-list"},Ie={key:0,class:"selectable-list-header"},je={class:"selectable-list-checkbox-wrapper"},Be={class:"selectable-list-header-actions"},Ae={class:"selectable-list-checkbox-wrapper"};const Ee={components:{List:n(56773).Z,Checkbox:N.Z},props:{items:{type:Array,default:function(){return[]}},getKey:{type:Function,default:function(e){return e.id}}},data:function(){return{selected:[]}},computed:{allKeys:function(){return this.items.map(this.getKey)},filteredSelected:function(){var e=this;return this.allKeys.filter((function(t){return-1!==e.selected.indexOf(t)}))},allSelected:function(){return this.filteredSelected.length===this.items.length},noneSelected:function(){return 0===this.filteredSelected.length},someSelected:function(){return!this.allSelected&&!this.noneSelected}},methods:{isSelected:function(e){return-1!==this.filteredSelected.indexOf(this.getKey(e))},toggle:function(e,t){var n=this.getKey(t);e!==this.isSelected(n)&&(e?this.selected.push(n):this.selected.splice(this.selected.indexOf(n),1))},toggleAll:function(e){this.selected=e?this.allKeys.slice(0):[]}}},Fe=(0,E.Z)(Ee,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox"),i=(0,l.up)("List");return(0,l.wg)(),(0,l.iD)("div",De,[e.items.length>0?((0,l.wg)(),(0,l.iD)("div",Ie,[(0,l._)("div",je,[(0,l.Wm)(r,{"model-value":e.allSelected,indeterminate:e.someSelected,"onUpdate:modelValue":e.toggleAll},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("selectable_list.select_all")),1)]})),_:1},8,["model-value","indeterminate","onUpdate:modelValue"])]),(0,l._)("div",Be,[(0,l.WI)(e.$slots,"header",{selected:e.filteredSelected})])])):(0,l.kq)("",!0),(0,l.Wm)(i,{items:e.items,"get-key":e.getKey},{item:(0,l.w5)((function(t){var n=t.item;return[(0,l._)("div",{class:(0,f.C_)(["selectable-list-item-inner",{"selectable-list-item-selected-inner":e.isSelected(n)}])},[(0,l._)("div",Ae,[(0,l.Wm)(r,{"model-value":e.isSelected(n),"onUpdate:modelValue":function(t){return e.toggle(t,n)}},null,8,["model-value","onUpdate:modelValue"])]),(0,l.WI)(e.$slots,"item",{item:n})],2)]})),empty:(0,l.w5)((function(){return[(0,l.WI)(e.$slots,"empty")]})),_:3},8,["items","get-key"])])}]]);var qe=n(93433),Ze=n(41609),Me=n.n(Ze),Re=n(13562),Ne=n(57810);function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j.vI.add(B.IJ7);const Ke=function(e){var t=e.fetch,n=e.select,a=e.childPropName,o=void 0===a?"content":a,s=e.additionalPropNames,r=void 0===s?[]:s;return function(e){var a=Object.keys((0,Re.g)(e)).filter((function(e){return e!==o})).concat(r);return{props:[].concat((0,qe.Z)(a),["refresh"]),data:function(){return{loading:!1,error:!1}},computed:{fetchedData:function(){return n(this.$props,this.$store)}},created:function(){(this.refresh||Me()(this.fetchedData))&&this.fetchData()},methods:{fetchData:function(){var e=this;this.loading||(this.loading=!0,this.error=!1,t(this.$props,this.$store).then((function(){e.loading=!1})).catch((function(){e.error=!0,e.loading=!1})))}},render:function(){if(this.error||this.loading)return(0,l.Wm)("div",{class:"with-subscription-loading"},[this.error?(0,l.Wm)("a",{onClick:this.fetchData,class:"alert error"},[this.$t("general.generic_error")]):(0,l.Wm)(Ne.GN,{spin:!0,icon:"circle-notch"},null)]);var t,n=Ye(Ye({},this.$props),{},(0,S.Z)({},o,this.fetchedData)),a=this.$slots;return(0,l.Wm)("div",{class:"with-subscription"},[(0,l.Wm)(e,n,(t=a,"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!(0,l.lA)(t)?a:{default:function(){return[a]}}))])}}}};var Ge=Ke({fetch:function(e,t){return t.dispatch("fetchBlocks")},select:function(e,t){return ie()(t.state.users.currentUser,"blockIds",[])},childPropName:"items"})(Fe),Je=Ke({fetch:function(e,t){return t.dispatch("fetchMutes")},select:function(e,t){return ie()(t.state.users.currentUser,"muteIds",[])},childPropName:"items"})(Fe),Qe=Ke({fetch:function(e,t){return t.dispatch("fetchDomainMutes")},select:function(e,t){return ie()(t.state.users.currentUser,"domainMutes",[])},childPropName:"items"})(Fe);const Xe={data:function(){return{activeTab:"profile"}},created:function(){this.$store.dispatch("fetchTokens"),this.$store.dispatch("getKnownDomains")},components:{TabSwitcher:m.Z,BlockList:Ge,MuteList:Je,DomainMuteList:Qe,BlockCard:Ce,MuteCard:Le,DomainMuteCard:Pe,ProgressButton:ze.Z,Autosuggest:we,Checkbox:N.Z},computed:{knownDomains:function(){return this.$store.state.instance.knownDomains},user:function(){return this.$store.state.users.currentUser}},methods:{importFollows:function(e){return this.$store.state.api.backendInteractor.importFollows({file:e}).then((function(e){if(!e)throw new Error("failed")}))},importBlocks:function(e){return this.$store.state.api.backendInteractor.importBlocks({file:e}).then((function(e){if(!e)throw new Error("failed")}))},generateExportableUsersContent:function(e){return e.map((function(e){return e&&e.is_local?e.screen_name+"@"+location.hostname:e.screen_name})).join("\n")},activateTab:function(e){this.activeTab=e},filterUnblockedUsers:function(e){var t=this;return pe()(e,(function(e){return t.$store.getters.relationship(t.userId).blocking||e===t.user.id}))},filterUnMutedUsers:function(e){var t=this;return pe()(e,(function(e){return t.$store.getters.relationship(t.userId).muting||e===t.user.id}))},queryUserIds:function(e){return this.$store.dispatch("searchUsers",{query:e}).then((function(e){return ce()(e,"id")}))},blockUsers:function(e){return this.$store.dispatch("blockUsers",e)},unblockUsers:function(e){return this.$store.dispatch("unblockUsers",e)},muteUsers:function(e){return this.$store.dispatch("muteUsers",e)},unmuteUsers:function(e){return this.$store.dispatch("unmuteUsers",e)},filterUnMutedDomains:function(e){var t=this;return e.filter((function(e){return!t.user.domainMutes.includes(e)}))},queryKnownDomains:function(e){var t=this;return new Promise((function(n,l){n(t.knownDomains.filter((function(t){return t.toLowerCase().includes(e)})))}))},unmuteDomains:function(e){return this.$store.dispatch("unmuteDomains",e)}}},et=(0,E.Z)(Xe,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BlockCard"),i=(0,l.up)("Autosuggest"),u=(0,l.up)("ProgressButton"),c=(0,l.up)("BlockList"),d=(0,l.up)("MuteCard"),p=(0,l.up)("MuteList"),m=(0,l.up)("DomainMuteCard"),h=(0,l.up)("DomainMuteList"),g=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.j4)(g,{"scrollable-tabs":!0,class:"mutes-and-blocks-tab"},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.blocks_tab")},[(0,l._)("div",Q,[(0,l.Wm)(i,{filter:e.filterUnblockedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_block")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(r,{"user-id":e.item},null,8,["user-id"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(c,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",X,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default bulk-action-button",click:function(){return e.blockUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.block_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.block"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0),n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"btn button-default",click:function(){return e.unblockUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.unblock_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.unblock"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(r,{"user-id":t},null,8,["user-id"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.no_blocks")),1)]})),_:1},8,["get-key"])],8,J),(0,l._)("div",{label:e.$t("settings.mutes_tab")},[(0,l.Wm)(g,null,{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.user_mutes")},[(0,l._)("div",ne,[(0,l.Wm)(i,{filter:e.filterUnMutedUsers,query:e.queryUserIds,placeholder:e.$t("settings.search_user_to_mute")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(d,{"user-id":e.item},null,8,["user-id"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(p,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",le,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default",click:function(){return e.muteUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.mute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.mute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0),n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"btn button-default",click:function(){return e.unmuteUsers(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("user_card.unmute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(d,{"user-id":t},null,8,["user-id"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.no_mutes")),1)]})),_:1},8,["get-key"])],8,te),(0,l._)("div",{label:e.$t("settings.domain_mutes")},[(0,l._)("div",oe,[(0,l.Wm)(i,{filter:e.filterUnMutedDomains,query:e.queryKnownDomains,placeholder:e.$t("settings.type_domains_to_mute")},{default:(0,l.w5)((function(e){return[(0,l.Wm)(m,{domain:e.item},null,8,["domain"])]})),_:1},8,["filter","query","placeholder"])]),(0,l.Wm)(h,{refresh:!0,"get-key":function(e){return e}},{header:(0,l.w5)((function(t){var n=t.selected;return[(0,l._)("div",se,[n.length>0?((0,l.wg)(),(0,l.j4)(u,{key:0,class:"btn button-default",click:function(){return e.unmuteDomains(n)}},{progress:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.unmute_progress")),1)]})),default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("domain_mute_card.unmute"))+" ",1)]})),_:2},1032,["click"])):(0,l.kq)("",!0)])]})),item:(0,l.w5)((function(e){var t=e.item;return[(0,l.Wm)(m,{domain:t},null,8,["domain"])]})),empty:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.no_mutes")),1)]})),_:1},8,["get-key"])],8,ae)]})),_:1})],8,ee)]})),_:1})}]]);var tt=["label"],nt={class:"setting-item"},lt={class:"setting-list"},at={class:"select-multiple"},ot={class:"label"},st={class:"option-list"},rt={key:0,class:"setting-item"},it={class:"setting-list"},ut={class:"setting-item"},ct={key:0,class:"BooleanSetting"},dt={key:0,class:"label"},pt=n(84506),mt=n(36968),ft=n.n(mt),ht={key:0,class:"ModifiedIndicator"},gt={class:"modified-tooltip"},bt=n(91447);j.vI.add(B.klh);const wt={components:{Popover:bt.default},props:["changed"]},_t=(0,E.Z)(wt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon"),i=(0,l.up)("Popover");return n.changed?((0,l.wg)(),(0,l.iD)("span",ht,[(0,l.Wm)(i,{trigger:"hover","trigger-attrs":{"aria-label":e.$t("settings.setting_changed")}},{trigger:(0,l.w5)((function(){return[(0,l.Uk)("   "),(0,l.Wm)(r,{icon:"wrench"})]})),content:(0,l.w5)((function(){return[(0,l._)("div",gt,(0,f.zw)(e.$t("settings.setting_changed")),1)]})),_:1},8,["trigger-attrs"])])):(0,l.kq)("",!0)}]]);var kt={key:0,class:"ServerSideIndicator"},vt={class:"serverside-tooltip"};j.vI.add(B.xf3);const yt={components:{Popover:bt.default},props:["serverSide"]},$t=(0,E.Z)(yt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon"),i=(0,l.up)("Popover");return n.serverSide?((0,l.wg)(),(0,l.iD)("span",kt,[(0,l.Wm)(i,{trigger:"hover"},{trigger:(0,l.w5)((function(){return[(0,l.Uk)("   "),(0,l.Wm)(r,{icon:"server","aria-label":e.$t("settings.setting_server_side")},null,8,["aria-label"])]})),content:(0,l.w5)((function(){return[(0,l._)("div",vt,(0,f.zw)(e.$t("settings.setting_server_side")),1)]})),_:1})])):(0,l.kq)("",!0)}]]);function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const Vt={components:{Checkbox:N.Z,ModifiedIndicator:_t,ServerSideIndicator:$t},props:["path","disabled","expert"],computed:{pathDefault:function(){var e=this.path.split("."),t=(0,pt.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,qe.Z)(l)).join(".")},state:function(){var e=ie()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return ie()(this.$parent,this.pathDefault)},isServerSide:function(){return this.path.startsWith("serverSide_")},isChanged:function(){return!this.path.startsWith("serverSide_")&&this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){var t=this.path.split("."),n=(0,pt.Z)(t),l=n[0],a=n.slice(1);ft()(this.$parent,this.path,e),a.length>0&&ft()(this.$parent,l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},ie()(this.$parent,l)))},reset:function(){ft()(this.$parent,this.path,this.defaultState)}}},Tt=(0,E.Z)(Vt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ModifiedIndicator"),i=(0,l.up)("ServerSideIndicator"),u=(0,l.up)("Checkbox");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("label",ct,[(0,l.Wm)(u,{"model-value":e.state,disabled:e.disabled,"onUpdate:modelValue":e.update},{default:(0,l.w5)((function(){return[e.$slots.default?((0,l.wg)(),(0,l.iD)("span",dt,[(0,l.WI)(e.$slots,"default")])):(0,l.kq)("",!0),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.Wm)(r,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"]),(0,l.Wm)(i,{"server-side":e.isServerSide},null,8,["server-side"])]})),_:3},8,["model-value","disabled","onUpdate:modelValue"])])):(0,l.kq)("",!0)}]]);var Ut=n(29439),xt=n(85565),Lt=n(65405);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const zt=function(){return Wt(Wt(Wt(Wt({user:function(){return this.$store.state.users.currentUser}},Object.keys(xt.W2).map((function(e){return[e+"DefaultValue",function(){return this.$store.getters.defaultConfig[e]}]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return Wt(Wt({},e),{},(0,S.Z)({},l,a))}),{})),Object.keys(xt.W2).map((function(e){return[e,{get:function(){return this.$store.getters.mergedConfig[e]},set:function(t){this.$store.dispatch("setOption",{name:e,value:t})}}]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return Wt(Wt({},e),{},(0,S.Z)({},l,a))}),{})),Object.keys(Lt.W2).map((function(e){return["serverSide_"+e,{get:function(){return this.$store.state.serverSideConfig[e]},set:function(t){this.$store.dispatch("setServerSideOption",{name:e,value:t})}}]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return Wt(Wt({},e),{},(0,S.Z)({},l,a))}),{})),{},{useStreamingApi:{get:function(){return this.$store.getters.mergedConfig.useStreamingApi},set:function(e){var t=this;(e?this.$store.dispatch("enableMastoSockets"):this.$store.dispatch("disableMastoSockets")).then((function(){t.$store.dispatch("setOption",{name:"useStreamingApi",value:e})})).catch((function(e){console.error("Failed starting MastoAPI Streaming socket",e),t.$store.dispatch("disableMastoSockets"),t.$store.dispatch("setOption",{name:"useStreamingApi",value:!1})}))}}})};function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const Pt={data:function(){return{activeTab:"profile",notificationSettings:this.$store.state.users.currentUser.notification_settings,newDomainToMute:""}},components:{BooleanSetting:Tt},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?St(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({user:function(){return this.$store.state.users.currentUser}},zt()),methods:{updateNotificationSettings:function(){this.$store.state.api.backendInteractor.updateNotificationSettings({settings:this.notificationSettings})}}},Dt=(0,E.Z)(Pt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BooleanSetting");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.notifications")},[(0,l._)("div",nt,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.notification_setting_filters")),1),(0,l._)("ul",lt,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"serverSide_blockNotificationsFromStrangers"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_setting_block_from_strangers")),1)]})),_:1})]),(0,l._)("li",at,[(0,l._)("span",ot,(0,f.zw)(e.$t("settings.notification_visibility")),1),(0,l._)("ul",st,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.likes"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_likes")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.repeats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_repeats")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.follows"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_follows")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.mentions"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_mentions")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.moves"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_moves")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.emojiReactions"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_emoji_reactions")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"notificationVisibility.polls"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_visibility_polls")),1)]})),_:1})])])])])]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("div",rt,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.notification_setting_privacy")),1),(0,l._)("ul",it,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"webPushNotifications",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.enable_web_push_notifications")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"serverSide_webPushHideContents",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.notification_setting_hide_notification_contents")),1)]})),_:1})])])])):(0,l.kq)("",!0),(0,l._)("div",ut,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.notification_mutes")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.notification_blocks")),1)])],8,tt)}]]);var It=["label"],jt={class:"setting-item"},Bt={class:"setting-list"},At={key:0,class:"setting-item"},Et={class:"setting-list"},Ft=n(23279),qt=n.n(Ft),Zt=n(92742),Mt=n.n(Zt),Rt=n(63105),Nt=n.n(Rt),Ht={key:0,class:"ChoiceSetting"},Yt=["value"],Kt=n(76990);const Gt={components:{Select:Kt.Z,ModifiedIndicator:_t,ServerSideIndicator:$t},props:["path","disabled","options","expert"],computed:{pathDefault:function(){var e=this.path.split("."),t=(0,pt.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,qe.Z)(l)).join(".")},state:function(){var e=ie()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return ie()(this.$parent,this.pathDefault)},isServerSide:function(){return this.path.startsWith("serverSide_")},isChanged:function(){return!this.path.startsWith("serverSide_")&&this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){ft()(this.$parent,this.path,e)},reset:function(){ft()(this.$parent,this.path,this.defaultState)}}},Jt=(0,E.Z)(Gt,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("ModifiedIndicator"),u=(0,l.up)("ServerSideIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("label",Ht,[(0,l.WI)(e.$slots,"default"),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.Wm)(r,{"model-value":e.state,disabled:e.disabled,"onUpdate:modelValue":e.update},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.options,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t.key,value:t.value},(0,f.zw)(t.label)+" "+(0,f.zw)(t.value===e.defaultState?e.$t("settings.instance_default_simple"):""),9,Yt)})),128))]})),_:1},8,["model-value","disabled","onUpdate:modelValue"]),(0,l.Wm)(i,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"]),(0,l.Wm)(u,{"server-side":e.isServerSide},null,8,["server-side"])])):(0,l.kq)("",!0)}]]);var Qt={key:0,class:"IntegerSetting"},Xt=["for"],en=["id","disabled","min","value"];const tn={components:{ModifiedIndicator:_t},props:{path:String,disabled:Boolean,min:Number,expert:[Number,String]},computed:{pathDefault:function(){var e=this.path.split("."),t=(0,pt.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,qe.Z)(l)).join(".")},state:function(){var e=ie()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return ie()(this.$parent,this.pathDefault)},isChanged:function(){return this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){ft()(this.$parent,this.path,parseInt(e.target.value))},reset:function(){ft()(this.$parent,this.path,this.defaultState)}}},nn=(0,E.Z)(tn,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("ModifiedIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("span",Qt,[(0,l._)("label",{for:e.path},[(0,l.WI)(e.$slots,"default")],8,Xt),(0,l._)("input",{id:e.path,class:"number-input",type:"number",step:"1",disabled:e.disabled,min:e.min||0,value:e.state,onChange:t[0]||(t[0]=function(){return e.update&&e.update.apply(e,arguments)})},null,40,en),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.Wm)(r,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"])])):(0,l.kq)("",!0)}]]);function ln(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const on={data:function(){var e=this;return{muteWordsStringLocal:this.$store.getters.mergedConfig.muteWords.join("\n"),replyVisibilityOptions:["all","following","self"].map((function(t){return{key:t,value:t,label:e.$t("settings.reply_visibility_".concat(t))}}))}},components:{BooleanSetting:Tt,ChoiceSetting:Jt,IntegerSetting:nn},computed:an(an({},zt()),{},{muteWordsString:{get:function(){return this.muteWordsStringLocal},set:function(e){this.muteWordsStringLocal=e,this.debouncedSetMuteWords(e)}},debouncedSetMuteWords:function(){var e=this;return qt()((function(t){e.$store.dispatch("setOption",{name:"muteWords",value:Nt()(t.split("\n"),(function(e){return Mt()(e).length>0}))})}),1e3)}}),watch:{replyVisibility:function(){this.$store.dispatch("queueFlushAll")}}},sn=(0,E.Z)(on,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("BooleanSetting"),i=(0,l.up)("ChoiceSetting"),u=(0,l.up)("IntegerSetting");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.filtering")},[(0,l._)("div",jt,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.posts")),1),(0,l._)("ul",Bt,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideFilteredStatuses"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_filtered_statuses")),1)]})),_:1}),(0,l._)("ul",{class:(0,f.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(r,{disabled:e.hideFilteredStatuses,path:"hideWordFilteredPosts"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_wordfiltered_statuses")),1)]})),_:1},8,["disabled"])]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.hideFilteredStatuses,path:"hideMutedThreads"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_muted_threads")),1)]})),_:1},8,["disabled"])):(0,l.kq)("",!0)]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.hideFilteredStatuses,path:"hideMutedPosts"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_muted_posts")),1)]})),_:1},8,["disabled"])):(0,l.kq)("",!0)])],2)]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"muteBotStatuses"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mute_bot_posts")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hidePostStats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_post_stats")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideBotIndication"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_bot_indication")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.j4)(i,{key:0,id:"replyVisibility",path:"replyVisibility",options:e.replyVisibilityOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.replies_in_timeline")),1)]})),_:1},8,["options"])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l._)("h3",null,(0,f.zw)(e.$t("settings.wordfilter")),1),(0,l.wy)((0,l._)("textarea",{id:"muteWords","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.muteWordsString=t}),class:"resize-height"},null,512),[[me.nr,e.muteWordsString]]),(0,l._)("div",null,(0,f.zw)(e.$t("settings.filtering_explanation")),1)]),(0,l._)("h3",null,(0,f.zw)(e.$t("settings.attachments")),1),(0,l._)("li",null,[(0,l.Wm)(u,{path:"maxThumbnails",expert:"1",min:0},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.max_thumbnails")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideAttachments"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_attachments_in_tl")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideAttachmentsInConv"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_attachments_in_convo")),1)]})),_:1})])])]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("div",At,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.user_profiles")),1),(0,l._)("ul",Et,[(0,l._)("li",null,[(0,l.Wm)(r,{path:"hideUserStats"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_user_stats")),1)]})),_:1})])])])):(0,l.kq)("",!0)],8,It)}]]);var rn=["label"],un={class:"setting-item"},cn={key:0},dn={class:"setting-item"},pn={key:0},mn={key:1},fn={key:2},hn={class:"setting-item"},gn={class:"oauth-tokens"},bn=(0,l._)("th",null,null,-1),wn={class:"actions"},_n=["onClick"],kn={class:"setting-item"},vn=(0,l._)("th",null,null,-1),yn={class:"actions"},$n=["onClick"],Cn={key:0,class:"alert error"},Vn=(0,l._)("code",{place:"example"}," foo@example.org ",-1),Tn={key:1},Un={key:2},xn={class:"setting-item"},Ln=(0,l._)("code",{place:"example"}," foo@example.org ",-1),On={key:0},Wn={key:1},zn={class:"setting-item"},Sn={key:0},Pn={key:1},Dn={key:2},In={key:3},jn={key:0,class:"setting-item mfa-settings"},Bn={class:"mfa-heading"},An={key:0,class:"setting-item"},En=(0,l._)("br",null,null,-1),Fn={key:0},qn={key:2},Zn={class:"warning"},Mn={key:1},Rn={key:0},Nn={key:1},Hn={class:"setup-otp"},Yn={class:"qr-code"},Kn={class:"verify"},Gn={class:"confirm-otp-actions"},Jn={key:0,class:"alert error"},Qn=n(15861),Xn=n(64687),el=n.n(Xn),tl={class:"mfa-backup-codes"},nl={key:0},ll={key:1},al={class:"alert warning"},ol={class:"backup-codes"};const sl={props:{backupCodes:{type:Object,default:function(){return{inProgress:!1,codes:[]}}}},data:function(){return{}},computed:{inProgress:function(){return this.backupCodes.inProgress},ready:function(){return this.backupCodes.codes.length>0},displayTitle:function(){return this.inProgress||this.ready}}},rl=(0,E.Z)(sl,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",tl,[e.displayTitle?((0,l.wg)(),(0,l.iD)("h4",nl,(0,f.zw)(e.$t("settings.mfa.recovery_codes")),1)):(0,l.kq)("",!0),e.inProgress?((0,l.wg)(),(0,l.iD)("i",ll,(0,f.zw)(e.$t("settings.mfa.waiting_a_recovery_codes")),1)):(0,l.kq)("",!0),e.ready?((0,l.wg)(),(0,l.iD)(l.HY,{key:2},[(0,l._)("p",al,(0,f.zw)(e.$t("settings.mfa.recovery_codes_warning")),1),(0,l._)("ul",ol,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.backupCodes.codes,(function(e){return(0,l.wg)(),(0,l.iD)("li",{key:e},(0,f.zw)(e),1)})),128))])],64)):(0,l.kq)("",!0)])}]]);var il={class:"method-item"},ul=["disabled"],cl={key:1,class:"alert error"},dl=["disabled"],pl=["disabled"];const ml={props:["disabled"],data:function(){return{}},methods:{confirm:function(){this.$emit("confirm")},cancel:function(){this.$emit("cancel")}}},fl=(0,E.Z)(ml,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",null,[(0,l.WI)(e.$slots,"default"),(0,l._)("button",{class:"btn button-default",disabled:e.disabled,onClick:t[0]||(t[0]=function(){return e.confirm&&e.confirm.apply(e,arguments)})},(0,f.zw)(e.$t("general.confirm")),9,dl),(0,l._)("button",{class:"btn button-default",disabled:e.disabled,onClick:t[1]||(t[1]=function(){return e.cancel&&e.cancel.apply(e,arguments)})},(0,f.zw)(e.$t("general.cancel")),9,pl)])}]]);function hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const gl={props:["settings"],data:function(){return{error:!1,currentPassword:"",deactivate:!1,inProgress:!1}},components:{confirm:fl},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hl(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isActivated:function(){return this.settings.totp}},(0,H.rn)({backendInteractor:function(e){return e.api.backendInteractor}})),methods:{doActivate:function(){this.$emit("activate")},cancelDeactivate:function(){this.deactivate=!1},doDeactivate:function(){this.error=null,this.deactivate=!0},confirmDeactivate:function(){var e=this;this.error=null,this.inProgress=!0,this.backendInteractor.mfaDisableOTP({password:this.currentPassword}).then((function(t){e.inProgress=!1,t.error?e.error=t.error:(e.deactivate=!1,e.$emit("deactivate"))}))}}};function bl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}const wl={data:function(){return{settings:{available:!1,enabled:!1,totp:!1},setupState:{state:"",setupOTPState:""},backupCodes:{getNewCodes:!1,inProgress:!1,codes:[]},otpSettings:{provisioning_uri:"",key:""},currentPassword:null,otpConfirmToken:null,error:null,readyInit:!1}},components:{"recovery-codes":rl,"totp-item":(0,E.Z)(gl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("confirm");return(0,l.wg)(),(0,l.iD)("div",null,[(0,l._)("div",il,[(0,l._)("strong",null,(0,f.zw)(e.$t("settings.mfa.otp")),1),e.isActivated?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.doActivate&&e.doActivate.apply(e,arguments)})},(0,f.zw)(e.$t("general.enable")),1)),e.isActivated?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",disabled:e.deactivate,onClick:t[1]||(t[1]=function(){return e.doDeactivate&&e.doDeactivate.apply(e,arguments)})},(0,f.zw)(e.$t("general.disable")),9,ul)):(0,l.kq)("",!0)]),e.deactivate?((0,l.wg)(),(0,l.j4)(r,{key:0,disabled:e.inProgress,onConfirm:e.confirmDeactivate,onCancel:e.cancelDeactivate},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.enter_current_password_to_confirm"))+": ",1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.currentPassword=t}),type:"password"},null,512),[[me.nr,e.currentPassword]])]})),_:1},8,["disabled","onConfirm","onCancel"])):(0,l.kq)("",!0),e.error?((0,l.wg)(),(0,l.iD)("div",cl,(0,f.zw)(e.error),1)):(0,l.kq)("",!0)])}]]),qrcode:n(99990).Z,confirm:fl},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bl(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({canSetupOTP:function(){return(this.setupInProgress&&this.backupCodesPrepared||this.settings.enabled)&&!this.settings.totp&&!this.setupOTPInProgress},setupInProgress:function(){return""!==this.setupState.state&&"complete"!==this.setupState.state},setupOTPInProgress:function(){return"setupOTP"===this.setupState.state&&!this.completedOTP},prepareOTP:function(){return"prepare"===this.setupState.setupOTPState},confirmOTP:function(){return"confirm"===this.setupState.setupOTPState},completedOTP:function(){return"completed"===this.setupState.setupOTPState},backupCodesPrepared:function(){return!this.backupCodes.inProgress&&this.backupCodes.codes.length>0},confirmNewBackupCodes:function(){return this.backupCodes.getNewCodes}},(0,H.rn)({backendInteractor:function(e){return e.api.backendInteractor}})),methods:{activateOTP:function(){this.settings.enabled||(this.setupState.state="getBackupcodes",this.fetchBackupCodes())},fetchBackupCodes:function(){var e=this;return this.backupCodes.inProgress=!0,this.backupCodes.codes=[],this.backendInteractor.generateMfaBackupCodes().then((function(t){e.backupCodes.codes=t.codes,e.backupCodes.inProgress=!1}))},getBackupCodes:function(){this.backupCodes.getNewCodes=!0},confirmBackupCodes:function(){var e=this;this.fetchBackupCodes().then((function(t){e.backupCodes.getNewCodes=!1}))},cancelBackupCodes:function(){this.backupCodes.getNewCodes=!1},setupOTP:function(){var e=this;this.setupState.state="setupOTP",this.setupState.setupOTPState="prepare",this.backendInteractor.mfaSetupOTP().then((function(t){e.otpSettings=t,e.setupState.setupOTPState="confirm"}))},doConfirmOTP:function(){var e=this;this.error=null,this.backendInteractor.mfaConfirmOTP({token:this.otpConfirmToken,password:this.currentPassword}).then((function(t){t.error?e.error=t.error:e.completeSetup()}))},completeSetup:function(){this.setupState.setupOTPState="complete",this.setupState.state="complete",this.currentPassword=null,this.error=null,this.fetchSettings()},cancelSetup:function(){this.setupState.setupOTPState="",this.setupState.state="",this.currentPassword=null,this.error=null},fetchSettings:function(){var e=this;return(0,Qn.Z)(el().mark((function t(){var n;return el().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.backendInteractor.settingsMFA();case 2:if(!(n=t.sent).error){t.next=5;break}return t.abrupt("return");case 5:return e.settings=n.settings,e.settings.available=!0,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;this.fetchSettings().then((function(){e.readyInit=!0}))}},_l=(0,E.Z)(wl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("totp-item"),i=(0,l.up)("recovery-codes"),u=(0,l.up)("confirm"),c=(0,l.up)("qrcode");return e.readyInit&&e.settings.available?((0,l.wg)(),(0,l.iD)("div",jn,[(0,l._)("div",Bn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.mfa.title")),1)]),(0,l._)("div",null,[e.setupInProgress?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",An,[(0,l._)("h3",null,(0,f.zw)(e.$t("settings.mfa.authentication_methods")),1),(0,l.Wm)(r,{settings:e.settings,onDeactivate:e.fetchSettings,onActivate:e.activateOTP},null,8,["settings","onDeactivate","onActivate"]),En,e.settings.enabled?((0,l.wg)(),(0,l.iD)("div",Fn,[e.confirmNewBackupCodes?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(i,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.confirmNewBackupCodes?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.getBackupCodes&&e.getBackupCodes.apply(e,arguments)})},(0,f.zw)(e.$t("settings.mfa.generate_new_recovery_codes")),1)),e.confirmNewBackupCodes?((0,l.wg)(),(0,l.iD)("div",qn,[(0,l.Wm)(u,{disabled:e.backupCodes.inProgress,onConfirm:e.confirmBackupCodes,onCancel:e.cancelBackupCodes},{default:(0,l.w5)((function(){return[(0,l._)("p",Zn,(0,f.zw)(e.$t("settings.mfa.warning_of_generate_new_codes")),1)]})),_:1},8,["disabled","onConfirm","onCancel"])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])),e.setupInProgress?((0,l.wg)(),(0,l.iD)("div",Mn,[(0,l._)("h3",null,(0,f.zw)(e.$t("settings.mfa.setup_otp")),1),e.setupOTPInProgress?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(i,{key:0,"backup-codes":e.backupCodes},null,8,["backup-codes"])),e.canSetupOTP?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.cancelSetup&&e.cancelSetup.apply(e,arguments)})},(0,f.zw)(e.$t("general.cancel")),1)):(0,l.kq)("",!0),e.canSetupOTP?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.setupOTP&&e.setupOTP.apply(e,arguments)})},(0,f.zw)(e.$t("settings.mfa.setup_otp")),1)):(0,l.kq)("",!0),e.setupOTPInProgress?((0,l.wg)(),(0,l.iD)(l.HY,{key:3},[e.prepareOTP?((0,l.wg)(),(0,l.iD)("i",Rn,(0,f.zw)(e.$t("settings.mfa.wait_pre_setup_otp")),1)):(0,l.kq)("",!0),e.confirmOTP?((0,l.wg)(),(0,l.iD)("div",Nn,[(0,l._)("div",Hn,[(0,l._)("div",Yn,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.mfa.scan.title")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.mfa.scan.desc")),1),(0,l.Wm)(c,{value:e.otpSettings.provisioning_uri,options:{width:200}},null,8,["value"]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.mfa.scan.secret_code"))+": "+(0,f.zw)(e.otpSettings.key),1)]),(0,l._)("div",Kn,[(0,l._)("h4",null,(0,f.zw)(e.$t("general.verify")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.mfa.verify.desc")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.otpConfirmToken=t}),type:"text"},null,512),[[me.nr,e.otpConfirmToken]]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.enter_current_password_to_confirm"))+":",1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.currentPassword=t}),type:"password"},null,512),[[me.nr,e.currentPassword]]),(0,l._)("div",Gn,[(0,l._)("button",{class:"btn button-default",onClick:t[5]||(t[5]=function(){return e.doConfirmOTP&&e.doConfirmOTP.apply(e,arguments)})},(0,f.zw)(e.$t("settings.mfa.confirm_and_enable")),1),(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.cancelSetup&&e.cancelSetup.apply(e,arguments)})},(0,f.zw)(e.$t("general.cancel")),1)]),e.error?((0,l.wg)(),(0,l.iD)("div",Jn,(0,f.zw)(e.error),1)):(0,l.kq)("",!0)])])])):(0,l.kq)("",!0)],64)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0)}]]);var kl=n(39776);const vl={data:function(){return{newEmail:"",changeEmailError:!1,changeEmailPassword:"",changedEmail:!1,deletingAccount:!1,deleteAccountConfirmPasswordInput:"",deleteAccountError:!1,changePasswordInputs:["","",""],changedPassword:!1,changePasswordError:!1,moveAccountTarget:"",moveAccountPassword:"",movedAccount:!1,moveAccountError:!1,aliases:[],listAliasesError:!1,addAliasTarget:"",addedAlias:!1,addAliasError:!1}},created:function(){this.$store.dispatch("fetchTokens"),this.fetchAliases()},components:{ProgressButton:ze.Z,Mfa:_l,Checkbox:N.Z},computed:{user:function(){return this.$store.state.users.currentUser},pleromaBackend:function(){return this.$store.state.instance.pleromaBackend},oauthTokens:function(){var e=this;return this.$store.state.oauthTokens.tokens.map((function(t){return{id:t.id,appName:t.app_name,validUntil:new Date(t.valid_until).toLocaleDateString(kl.Z.internalToBrowserLocale(e.$i18n.locale))}}))}},methods:{confirmDelete:function(){this.deletingAccount=!0},deleteAccount:function(){var e=this;this.$store.state.api.backendInteractor.deleteAccount({password:this.deleteAccountConfirmPasswordInput}).then((function(t){"success"===t.status?(e.$store.dispatch("logout"),e.$router.push({name:"root"})):e.deleteAccountError=t.error}))},changePassword:function(){var e=this,t={password:this.changePasswordInputs[0],newPassword:this.changePasswordInputs[1],newPasswordConfirmation:this.changePasswordInputs[2]};this.$store.state.api.backendInteractor.changePassword(t).then((function(t){"success"===t.status?(e.changedPassword=!0,e.changePasswordError=!1,e.logout()):(e.changedPassword=!1,e.changePasswordError=t.error)}))},changeEmail:function(){var e=this,t={email:this.newEmail,password:this.changeEmailPassword};this.$store.state.api.backendInteractor.changeEmail(t).then((function(t){"success"===t.status?(e.changedEmail=!0,e.changeEmailError=!1):(e.changedEmail=!1,e.changeEmailError=t.error)}))},moveAccount:function(){var e=this,t={targetAccount:this.moveAccountTarget,password:this.moveAccountPassword};this.$store.state.api.backendInteractor.moveAccount(t).then((function(t){"success"===t.status?(e.movedAccount=!0,e.moveAccountError=!1):(e.movedAccount=!1,e.moveAccountError=t.error)}))},removeAlias:function(e){var t=this;this.$store.state.api.backendInteractor.deleteAlias({alias:e}).then((function(){return t.fetchAliases()}))},addAlias:function(){var e=this;this.$store.state.api.backendInteractor.addAlias({alias:this.addAliasTarget}).then((function(t){e.addedAlias=!0,e.addAliasError=!1,e.addAliasTarget=""})).catch((function(t){e.addedAlias=!1,e.addAliasError=t})).then((function(){return e.fetchAliases()}))},fetchAliases:function(){var e=this;this.$store.state.api.backendInteractor.listAliases().then((function(t){e.aliases=t.aliases,e.listAliasesError=!1})).catch((function(t){e.listAliasesError=t.error}))},logout:function(){this.$store.dispatch("logout"),this.$router.replace("/")},revokeToken:function(e){window.confirm("".concat(this.$i18n.t("settings.revoke_token"),"?"))&&this.$store.dispatch("revokeToken",e)}}},yl=(0,E.Z)(vl,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("mfa"),i=(0,l.up)("FAIcon"),u=(0,l.up)("i18n");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.security_tab")},[(0,l._)("div",un,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.change_email")),1),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.new_email")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newEmail=t}),type:"email",autocomplete:"email"},null,512),[[me.nr,e.newEmail]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.changeEmailPassword=t}),type:"password",autocomplete:"current-password"},null,512),[[me.nr,e.changeEmailPassword]])]),(0,l._)("button",{class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.changeEmail&&e.changeEmail.apply(e,arguments)})},(0,f.zw)(e.$t("settings.save")),1),e.changedEmail?((0,l.wg)(),(0,l.iD)("p",cn,(0,f.zw)(e.$t("settings.changed_email")),1)):(0,l.kq)("",!0),!1!==e.changeEmailError?((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l._)("p",null,(0,f.zw)(e.$t("settings.change_email_error")),1),(0,l._)("p",null,(0,f.zw)(e.changeEmailError),1)],64)):(0,l.kq)("",!0)]),(0,l._)("div",dn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.change_password")),1),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.changePasswordInputs[0]=t}),type:"password"},null,512),[[me.nr,e.changePasswordInputs[0]]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.new_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.changePasswordInputs[1]=t}),type:"password"},null,512),[[me.nr,e.changePasswordInputs[1]]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.confirm_new_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.changePasswordInputs[2]=t}),type:"password"},null,512),[[me.nr,e.changePasswordInputs[2]]])]),(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.changePassword&&e.changePassword.apply(e,arguments)})},(0,f.zw)(e.$t("settings.save")),1),e.changedPassword?((0,l.wg)(),(0,l.iD)("p",pn,(0,f.zw)(e.$t("settings.changed_password")),1)):!1!==e.changePasswordError?((0,l.wg)(),(0,l.iD)("p",mn,(0,f.zw)(e.$t("settings.change_password_error")),1)):(0,l.kq)("",!0),e.changePasswordError?((0,l.wg)(),(0,l.iD)("p",fn,(0,f.zw)(e.changePasswordError),1)):(0,l.kq)("",!0)]),(0,l._)("div",hn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.oauth_tokens")),1),(0,l._)("table",gn,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,f.zw)(e.$t("settings.app_name")),1),(0,l._)("th",null,(0,f.zw)(e.$t("settings.valid_until")),1),bn])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.oauthTokens,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t.id},[(0,l._)("td",null,(0,f.zw)(t.appName),1),(0,l._)("td",null,(0,f.zw)(t.validUntil),1),(0,l._)("td",wn,[(0,l._)("button",{class:"btn button-default",onClick:function(n){return e.revokeToken(t.id)}},(0,f.zw)(e.$t("settings.revoke_token")),9,_n)])])})),128))])])]),(0,l.Wm)(r),(0,l._)("div",kn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.account_alias")),1),(0,l._)("table",null,[(0,l._)("thead",null,[(0,l._)("tr",null,[(0,l._)("th",null,(0,f.zw)(e.$t("settings.account_alias_table_head")),1),vn])]),(0,l._)("tbody",null,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.aliases,(function(t){return(0,l.wg)(),(0,l.iD)("tr",{key:t},[(0,l._)("td",null,(0,f.zw)(t),1),(0,l._)("td",yn,[(0,l._)("button",{class:"btn button-default",onClick:function(n){return e.removeAlias(t)}},(0,f.zw)(e.$t("settings.remove_alias")),9,$n)])])})),128))])]),e.listAliasesError?((0,l.wg)(),(0,l.iD)("div",Cn,[(0,l.Uk)((0,f.zw)(e.$t("settings.list_aliases_error",{error:e.error}))+" ",1),(0,l.Wm)(i,{class:"fa-scale-110 fa-old-padding",icon:"times",title:e.$t("settings.hide_list_aliases_error_action"),onClick:t[7]||(t[7]=function(t){return e.listAliasesError=!1})},null,8,["title"])])):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l.Wm)(u,{path:"settings.new_alias_target",tag:"p"},{default:(0,l.w5)((function(){return[Vn]})),_:1}),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.addAliasTarget=t})},null,512),[[me.nr,e.addAliasTarget]])]),(0,l._)("button",{class:"btn button-default",onClick:t[9]||(t[9]=function(){return e.addAlias&&e.addAlias.apply(e,arguments)})},(0,f.zw)(e.$t("settings.save")),1),e.addedAlias?((0,l.wg)(),(0,l.iD)("p",Tn,(0,f.zw)(e.$t("settings.added_alias")),1)):(0,l.kq)("",!0),!1!==e.addAliasError?((0,l.wg)(),(0,l.iD)("p",Un,(0,f.zw)(e.$t("settings.add_alias_error",{error:e.addAliasError})),1)):(0,l.kq)("",!0)]),(0,l._)("div",xn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.move_account")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.move_account_notes")),1),(0,l._)("div",null,[(0,l.Wm)(u,{path:"settings.move_account_target",tag:"p"},{default:(0,l.w5)((function(){return[Ln]})),_:1}),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.moveAccountTarget=t})},null,512),[[me.nr,e.moveAccountTarget]])]),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.current_password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.moveAccountPassword=t}),type:"password",autocomplete:"current-password"},null,512),[[me.nr,e.moveAccountPassword]])]),(0,l._)("button",{class:"btn button-default",onClick:t[12]||(t[12]=function(){return e.moveAccount&&e.moveAccount.apply(e,arguments)})},(0,f.zw)(e.$t("settings.save")),1),e.movedAccount?((0,l.wg)(),(0,l.iD)("p",On,(0,f.zw)(e.$t("settings.moved_account")),1)):(0,l.kq)("",!0),!1!==e.moveAccountError?((0,l.wg)(),(0,l.iD)("p",Wn,(0,f.zw)(e.$t("settings.move_account_error",{error:e.moveAccountError})),1)):(0,l.kq)("",!0)]),(0,l._)("div",zn,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.delete_account")),1),e.deletingAccount?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("p",Sn,(0,f.zw)(e.$t("settings.delete_account_description")),1)),e.deletingAccount?((0,l.wg)(),(0,l.iD)("div",Pn,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.delete_account_instructions")),1),(0,l._)("p",null,(0,f.zw)(e.$t("login.password")),1),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[13]||(t[13]=function(t){return e.deleteAccountConfirmPasswordInput=t}),type:"password"},null,512),[[me.nr,e.deleteAccountConfirmPasswordInput]]),(0,l._)("button",{class:"btn button-default",onClick:t[14]||(t[14]=function(){return e.deleteAccount&&e.deleteAccount.apply(e,arguments)})},(0,f.zw)(e.$t("settings.delete_account")),1)])):(0,l.kq)("",!0),!1!==e.deleteAccountError?((0,l.wg)(),(0,l.iD)("p",Dn,(0,f.zw)(e.$t("settings.delete_account_error")),1)):(0,l.kq)("",!0),e.deleteAccountError?((0,l.wg)(),(0,l.iD)("p",In,(0,f.zw)(e.deleteAccountError),1)):(0,l.kq)("",!0),e.deletingAccount?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:4,class:"btn button-default",onClick:t[15]||(t[15]=function(){return e.confirmDelete&&e.confirmDelete.apply(e,arguments)})},(0,f.zw)(e.$t("settings.delete_account")),1))])],8,rn)}]]);var $l={class:"profile-tab"},Cl={class:"setting-item"},Vl={key:0},Tl={key:1},Ul=["onUpdate:modelValue","placeholder"],xl=["onUpdate:modelValue","placeholder"],Ll=["onClick"],Ol=["disabled"],Wl={class:"setting-item"},zl={class:"visibility-notice"},Sl={class:"current-avatar-container"},Pl=["src"],Dl=["title"],Il={class:"setting-item"},jl={class:"banner-background-preview"},Bl=["src"],Al=["title"],El=["src"],Fl={class:"setting-item"},ql={class:"banner-background-preview"},Zl=["src"],Ml=["title"],Rl=["src"],Nl={class:"setting-item"},Hl={class:"setting-list"},Yl=n(27955),Kl=n.n(Yl),Gl=n(82492),Jl=n.n(Gl),Ql={class:"image-cropper"},Xl={key:0},ea={class:"image-cropper-image-container"},ta=["src"],na={class:"image-cropper-buttons-wrapper"},la=["disabled","textContent"],aa=["disabled","textContent"],oa=["disabled","textContent"],sa=["accept"],ra=n(71002),ia=n(33129),ua=n.n(ia);j.vI.add(B.IJ7);const ca={props:{trigger:{type:[String,window.Element],required:!0},submitHandler:{type:Function,required:!0},cropperOptions:{type:Object,default:function(){return{aspectRatio:1,autoCropArea:1,viewMode:1,movable:!1,zoomable:!1,guides:!1}}},mimes:{type:String,default:"image/png, image/gif, image/jpeg, image/bmp, image/x-icon"},saveButtonLabel:{type:String},saveWithoutCroppingButtonlabel:{type:String},cancelButtonLabel:{type:String}},data:function(){return{cropper:void 0,dataUrl:void 0,filename:void 0,submitting:!1}},computed:{saveText:function(){return this.saveButtonLabel||this.$t("image_cropper.save")},saveWithoutCroppingText:function(){return this.saveWithoutCroppingButtonlabel||this.$t("image_cropper.save_without_cropping")},cancelText:function(){return this.cancelButtonLabel||this.$t("image_cropper.cancel")}},methods:{destroy:function(){this.cropper&&this.cropper.destroy(),this.$refs.input.value="",this.dataUrl=void 0,this.$emit("close")},submit:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.submitting=!0,this.submitHandler(t&&this.cropper,this.file).then((function(){return e.destroy()})).finally((function(){e.submitting=!1}))},pickImage:function(){this.$refs.input.click()},createCropper:function(){this.cropper=new(ua())(this.$refs.img,this.cropperOptions)},getTriggerDOM:function(){return"object"===(0,ra.Z)(this.trigger)?this.trigger:document.querySelector(this.trigger)},readFile:function(){var e=this,t=this.$refs.input;if(null!=t.files&&null!=t.files[0]){this.file=t.files[0];var n=new window.FileReader;n.onload=function(t){e.dataUrl=t.target.result,e.$emit("open")},n.readAsDataURL(this.file),this.$emit("changed",this.file,n)}}},mounted:function(){var e=this.getTriggerDOM();e?e.addEventListener("click",this.pickImage):this.$emit("error","No image make trigger found.","user"),this.$refs.input.addEventListener("change",this.readFile)},beforeUnmount:function(){var e=this.getTriggerDOM();e&&e.removeEventListener("click",this.pickImage),this.$refs.input.removeEventListener("change",this.readFile)}},da=(0,E.Z)(ca,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",Ql,[e.dataUrl?((0,l.wg)(),(0,l.iD)("div",Xl,[(0,l._)("div",ea,[(0,l._)("img",{ref:"img",src:e.dataUrl,alt:"",onLoad:t[0]||(t[0]=(0,me.iM)((function(){return e.createCropper&&e.createCropper.apply(e,arguments)}),["stop"]))},null,40,ta)]),(0,l._)("div",na,[(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[1]||(t[1]=function(t){return e.submit()}),textContent:(0,f.zw)(e.saveText)},null,8,la),(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[2]||(t[2]=function(){return e.destroy&&e.destroy.apply(e,arguments)}),textContent:(0,f.zw)(e.cancelText)},null,8,aa),(0,l._)("button",{class:"button-default btn",type:"button",disabled:e.submitting,onClick:t[3]||(t[3]=function(t){return e.submit(!1)}),textContent:(0,f.zw)(e.saveWithoutCroppingText)},null,8,oa),e.submitting?((0,l.wg)(),(0,l.j4)(r,{key:0,spin:"",icon:"circle-notch"})):(0,l.kq)("",!0)])])):(0,l.kq)("",!0),(0,l._)("input",{ref:"input",type:"file",class:"image-cropper-img-input",accept:e.mimes},null,8,sa)])}]]);var pa=n(54110),ma=n(65079),fa=n(86319),ha=n(19003),ga=n(73414),ba=n(37230);function wa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function _a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wa(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j.vI.add(B.NBC,B.r8p,B.IJ7);var ka={data:function(){return{newName:this.$store.state.users.currentUser.name_unescaped,newBio:Kl()(this.$store.state.users.currentUser.description),newLocked:this.$store.state.users.currentUser.locked,newBirthday:this.$store.state.users.currentUser.birthday,showBirthday:this.$store.state.users.currentUser.show_birthday,newFields:this.$store.state.users.currentUser.fields.map((function(e){return{name:e.name,value:e.value}})),showRole:this.$store.state.users.currentUser.show_role,role:this.$store.state.users.currentUser.role,bot:this.$store.state.users.currentUser.bot,pickAvatarBtnVisible:!0,bannerUploading:!1,backgroundUploading:!1,banner:null,bannerPreview:null,background:null,backgroundPreview:null,emailLanguage:this.$store.state.users.currentUser.language||[""]}},components:{ScopeSelector:pa.Z,ImageCropper:da,EmojiInput:fa.Z,Autosuggest:we,ProgressButton:ze.Z,Checkbox:N.Z,BooleanSetting:Tt,InterfaceLanguageSwitcher:ga.Z},computed:_a(_a({user:function(){return this.$store.state.users.currentUser}},zt()),{},{emojiUserSuggestor:function(){return(0,ha.ZP)({emoji:[].concat((0,qe.Z)(this.$store.getters.standardEmojiList),(0,qe.Z)(this.$store.state.instance.customEmoji)),store:this.$store})},emojiSuggestor:function(){return(0,ha.ZP)({emoji:[].concat((0,qe.Z)(this.$store.getters.standardEmojiList),(0,qe.Z)(this.$store.state.instance.customEmoji))})},userSuggestor:function(){return(0,ha.ZP)({store:this.$store})},fieldsLimits:function(){return this.$store.state.instance.fieldsLimits},maxFields:function(){return this.fieldsLimits?this.fieldsLimits.maxFields:0},defaultAvatar:function(){return this.$store.state.instance.server+this.$store.state.instance.defaultAvatar},defaultBanner:function(){return this.$store.state.instance.server+this.$store.state.instance.defaultBanner},isDefaultAvatar:function(){var e=this.$store.state.instance.defaultAvatar;return!this.$store.state.users.currentUser.profile_image_url||this.$store.state.users.currentUser.profile_image_url.includes(e)},isDefaultBanner:function(){var e=this.$store.state.instance.defaultBanner;return!this.$store.state.users.currentUser.cover_photo||this.$store.state.users.currentUser.cover_photo.includes(e)},isDefaultBackground:function(){return!this.$store.state.users.currentUser.background_image},avatarImgSrc:function(){return this.$store.state.users.currentUser.profile_image_url_original||this.defaultAvatar},bannerImgSrc:function(){return this.$store.state.users.currentUser.cover_photo||this.defaultBanner}}),methods:{updateProfile:function(){var e=this,t={note:this.newBio,locked:this.newLocked,display_name:this.newName,fields_attributes:this.newFields.filter((function(e){return null!=e})),bot:this.bot,show_role:this.showRole,birthday:this.newBirthday||"",show_birthday:this.showBirthday};this.emailLanguage&&(t.language=kl.Z.internalToBackendLocaleMulti(this.emailLanguage)),this.$store.state.api.backendInteractor.updateProfile({params:t}).then((function(t){e.newFields.splice(t.fields.length),Jl()(e.newFields,t.fields),e.$store.commit("addNewUsers",[t]),e.$store.commit("setCurrentUser",t)}))},changeVis:function(e){this.newDefaultScope=e},addField:function(){return this.newFields.length<this.maxFields&&(this.newFields.push({name:"",value:""}),!0)},deleteField:function(e,t){this.newFields.splice(e,1)},uploadFile:function(e,t){var n=this,l=t.target.files[0];if(l)if(l.size>this.$store.state.instance[e+"limit"]){var a=ma.Z.fileSizeFormat(l.size),o=ma.Z.fileSizeFormat(this.$store.state.instance[e+"limit"]);this.$store.dispatch("pushGlobalNotice",{messageKey:"upload.error.message",messageArgs:[this.$t("upload.error.file_too_big",{filesize:a.num,filesizeunit:a.unit,allowedsize:o.num,allowedsizeunit:o.unit})],level:"error"})}else{var s=new FileReader;s.onload=function(t){var a=t.target.result;n[e+"Preview"]=a,n[e]=l},s.readAsDataURL(l)}},resetAvatar:function(){window.confirm(this.$t("settings.reset_avatar_confirm"))&&this.submitAvatar(void 0,"")},resetBanner:function(){window.confirm(this.$t("settings.reset_banner_confirm"))&&this.submitBanner("")},resetBackground:function(){window.confirm(this.$t("settings.reset_background_confirm"))&&this.submitBackground("")},submitAvatar:function(e,t){var n=this;return new Promise((function(l,a){function o(e,t){n.$store.state.api.backendInteractor.updateProfileImages({avatar:e,avatarName:t}).then((function(e){n.$store.commit("addNewUsers",[e]),n.$store.commit("setCurrentUser",e),l()})).catch((function(e){n.displayUploadError(e),a(e)}))}e?e.getCroppedCanvas().toBlob((function(e){return o(e,t.name)}),t.type):o(t,t.name)}))},submitBanner:function(e){var t=this;(this.bannerPreview||""===e)&&(this.bannerUploading=!0,this.$store.state.api.backendInteractor.updateProfileImages({banner:e}).then((function(e){t.$store.commit("addNewUsers",[e]),t.$store.commit("setCurrentUser",e),t.bannerPreview=null})).catch(this.displayUploadError).finally((function(){t.bannerUploading=!1})))},submitBackground:function(e){var t=this;(this.backgroundPreview||""===e)&&(this.backgroundUploading=!0,this.$store.state.api.backendInteractor.updateProfileImages({background:e}).then((function(e){t.$store.commit("addNewUsers",[e]),t.$store.commit("setCurrentUser",e),t.backgroundPreview=null})).catch(this.displayUploadError).finally((function(){t.backgroundUploading=!1})))},displayUploadError:function(e){this.$store.dispatch("pushGlobalNotice",{messageKey:"upload.error.message",messageArgs:[e.message],level:"error"})},propsToNative:function(e){return(0,ba.X)(e)}}};const va=ka,ya=(0,E.Z)(va,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("EmojiInput"),i=(0,l.up)("Checkbox"),u=(0,l.up)("FAIcon"),c=(0,l.up)("interface-language-switcher"),d=(0,l.up)("image-cropper"),p=(0,l.up)("BooleanSetting");return(0,l.wg)(),(0,l.iD)("div",$l,[(0,l._)("div",Cl,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.name_bio")),1),(0,l._)("p",null,(0,f.zw)(e.$t("settings.name")),1),(0,l.Wm)(r,{modelValue:e.newName,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.newName=t}),"enable-emoji-picker":"",suggest:e.emojiSuggestor},{default:(0,l.w5)((function(n){return[(0,l.wy)((0,l._)("input",(0,l.dG)({id:"username","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newName=t}),class:"name-changer"},e.propsToNative(n)),null,16),[[me.YZ,e.newName]])]})),_:1},8,["modelValue","suggest"]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.bio")),1),(0,l.Wm)(r,{modelValue:e.newBio,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.newBio=t}),"enable-emoji-picker":"",suggest:e.emojiUserSuggestor},{default:(0,l.w5)((function(n){return[(0,l.wy)((0,l._)("textarea",(0,l.dG)({"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.newBio=t}),class:"bio resize-height"},e.propsToNative(n)),null,16),[[me.nr,e.newBio]])]})),_:1},8,["modelValue","suggest"]),"admin"===e.role||"moderator"===e.role?((0,l.wg)(),(0,l.iD)("p",Vl,[(0,l.Wm)(i,{modelValue:e.showRole,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.showRole=t})},{default:(0,l.w5)((function(){return["admin"===e.role?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l.Uk)((0,f.zw)(e.$t("settings.show_admin_badge")),1)],64)):(0,l.kq)("",!0),"moderator"===e.role?((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Uk)((0,f.zw)(e.$t("settings.show_moderator_badge")),1)],64)):(0,l.kq)("",!0)]})),_:1},8,["modelValue"])])):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.birthday.label")),1),(0,l.wy)((0,l._)("input",{id:"birthday","onUpdate:modelValue":t[5]||(t[5]=function(t){return e.newBirthday=t}),type:"date",class:"birthday-input"},null,512),[[me.nr,e.newBirthday]]),(0,l.Wm)(i,{modelValue:e.showBirthday,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.showBirthday=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.birthday.show_birthday")),1)]})),_:1},8,["modelValue"])]),e.maxFields>0?((0,l.wg)(),(0,l.iD)("div",Tl,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.profile_fields.label")),1),((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.newFields,(function(t,n){return(0,l.wg)(),(0,l.iD)("div",{key:n,class:"profile-fields"},[(0,l.Wm)(r,{modelValue:e.newFields[n].name,"onUpdate:modelValue":function(t){return e.newFields[n].name=t},"enable-emoji-picker":"","hide-emoji-button":"",suggest:e.userSuggestor},{default:(0,l.w5)((function(t){return[(0,l.wy)((0,l._)("input",(0,l.dG)({"onUpdate:modelValue":function(t){return e.newFields[n].name=t},placeholder:e.$t("settings.profile_fields.name")},e.propsToNative(t)),null,16,Ul),[[me.YZ,e.newFields[n].name]])]})),_:2},1032,["modelValue","onUpdate:modelValue","suggest"]),(0,l.Wm)(r,{modelValue:e.newFields[n].value,"onUpdate:modelValue":function(t){return e.newFields[n].value=t},"enable-emoji-picker":"","hide-emoji-button":"",suggest:e.userSuggestor},{default:(0,l.w5)((function(t){return[(0,l.wy)((0,l._)("input",(0,l.dG)({"onUpdate:modelValue":function(t){return e.newFields[n].value=t},placeholder:e.$t("settings.profile_fields.value")},e.propsToNative(t)),null,16,xl),[[me.YZ,e.newFields[n].value]])]})),_:2},1032,["modelValue","onUpdate:modelValue","suggest"]),(0,l._)("button",{class:"delete-field button-unstyled -hover-highlight",onClick:function(t){return e.deleteField(n)}},[e.newFields.length>1?((0,l.wg)(),(0,l.j4)(u,{key:0,icon:"times"})):(0,l.kq)("",!0)],8,Ll)])})),128)),e.newFields.length<e.maxFields?((0,l.wg)(),(0,l.iD)("button",{key:0,class:"add-field faint button-unstyled -hover-highlight",onClick:t[7]||(t[7]=function(){return e.addField&&e.addField.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"plus"}),(0,l.Uk)(" "+(0,f.zw)(e.$t("settings.profile_fields.add_field")),1)])):(0,l.kq)("",!0)])):(0,l.kq)("",!0),(0,l._)("p",null,[(0,l.Wm)(i,{modelValue:e.bot,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.bot=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.bot")),1)]})),_:1},8,["modelValue"])]),(0,l._)("p",null,[(0,l.Wm)(c,{"prompt-text":e.$t("settings.email_language"),language:e.emailLanguage,"set-language":function(t){return e.emailLanguage=t}},null,8,["prompt-text","language","set-language"])]),(0,l._)("button",{disabled:e.newName&&0===e.newName.length,class:"btn button-default",onClick:t[9]||(t[9]=function(){return e.updateProfile&&e.updateProfile.apply(e,arguments)})},(0,f.zw)(e.$t("settings.save")),9,Ol)]),(0,l._)("div",Wl,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.avatar")),1),(0,l._)("p",zl,(0,f.zw)(e.$t("settings.avatar_size_instruction")),1),(0,l._)("div",Sl,[(0,l._)("img",{src:e.user.profile_image_url_original,class:"current-avatar"},null,8,Pl),!e.isDefaultAvatar&&e.pickAvatarBtnVisible?((0,l.wg)(),(0,l.iD)("button",{key:0,title:e.$t("settings.reset_avatar"),class:"button-unstyled reset-button",onClick:t[10]||(t[10]=function(){return e.resetAvatar&&e.resetAvatar.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,Dl)):(0,l.kq)("",!0)]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.set_new_avatar")),1),(0,l.wy)((0,l._)("button",{id:"pick-avatar",class:"button-default btn",type:"button"},(0,f.zw)(e.$t("settings.upload_a_photo")),513),[[me.F8,e.pickAvatarBtnVisible]]),(0,l.Wm)(d,{trigger:"#pick-avatar","submit-handler":e.submitAvatar,onOpen:t[11]||(t[11]=function(t){return e.pickAvatarBtnVisible=!1}),onClose:t[12]||(t[12]=function(t){return e.pickAvatarBtnVisible=!0})},null,8,["submit-handler"])]),(0,l._)("div",Il,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.profile_banner")),1),(0,l._)("div",jl,[(0,l._)("img",{src:e.user.cover_photo},null,8,Bl),e.isDefaultBanner?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"button-unstyled reset-button",title:e.$t("settings.reset_profile_banner"),onClick:t[13]||(t[13]=function(){return e.resetBanner&&e.resetBanner.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,Al))]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.set_new_profile_banner")),1),e.bannerPreview?((0,l.wg)(),(0,l.iD)("img",{key:0,class:"banner-background-preview",src:e.bannerPreview},null,8,El)):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("input",{type:"file",onChange:t[14]||(t[14]=function(t){return e.uploadFile("banner",t)})},null,32)]),e.bannerUploading?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"uploading",spin:"",icon:"circle-notch"})):e.bannerPreview?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[15]||(t[15]=function(t){return e.submitBanner(e.banner)})},(0,f.zw)(e.$t("settings.save")),1)):(0,l.kq)("",!0)]),(0,l._)("div",Fl,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.profile_background")),1),(0,l._)("div",ql,[(0,l._)("img",{src:e.user.background_image},null,8,Zl),e.isDefaultBackground?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("button",{key:0,class:"button-unstyled reset-button",title:e.$t("settings.reset_profile_background"),onClick:t[16]||(t[16]=function(){return e.resetBackground&&e.resetBackground.apply(e,arguments)})},[(0,l.Wm)(u,{icon:"times",type:"button"})],8,Ml))]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.set_new_profile_background")),1),e.backgroundPreview?((0,l.wg)(),(0,l.iD)("img",{key:0,class:"banner-background-preview",src:e.backgroundPreview},null,8,Rl)):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("input",{type:"file",onChange:t[17]||(t[17]=function(t){return e.uploadFile("background",t)})},null,32)]),e.backgroundUploading?((0,l.wg)(),(0,l.j4)(u,{key:1,class:"uploading",spin:"",icon:"circle-notch"})):e.backgroundPreview?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"btn button-default",onClick:t[18]||(t[18]=function(t){return e.submitBackground(e.background)})},(0,f.zw)(e.$t("settings.save")),1)):(0,l.kq)("",!0)]),(0,l._)("div",Nl,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.account_privacy")),1),(0,l._)("ul",Hl,[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_locked"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.lock_account_description")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_discoverable"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.discoverable")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_allowFollowingMove"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.allow_following_move")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFavorites"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_favorites_description")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowers"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_followers_description")),1)]})),_:1}),(0,l._)("ul",{class:(0,f.C_)(["setting-list suboptions",[{disabled:!e.serverSide_hideFollowers}]])},[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowersCount",disabled:!e.serverSide_hideFollowers},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_followers_count_description")),1)]})),_:1},8,["disabled"])])],2)]),(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollows"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_follows_description")),1)]})),_:1}),(0,l._)("ul",{class:(0,f.C_)(["setting-list suboptions",[{disabled:!e.serverSide_hideFollows}]])},[(0,l._)("li",null,[(0,l.Wm)(p,{path:"serverSide_hideFollowsCount",disabled:!e.serverSide_hideFollows},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_follows_count_description")),1)]})),_:1},8,["disabled"])])],2)])])])])}]]);var $a=["label"],Ca={class:"setting-item"},Va={class:"setting-list"},Ta={key:0},Ua={key:1},xa={key:2},La={key:3},Oa={class:"column-settings"},Wa={class:"select-multiple"},za={class:"label"},Sa={class:"option-list"},Pa={class:"setting-item"},Da={class:"setting-list"},Ia={key:0,class:"setting-list suboptions"},ja={class:"setting-list suboptions"},Ba={key:0,class:"unavailable"},Aa={key:1},Ea={key:2},Fa={key:3},qa={key:0,class:"setting-item"},Za={class:"setting-list"},Ma={for:"default-vis"},Ra={key:0},Na={key:0,class:"SizeSetting"},Ha=["for"],Ya=["id","disabled","min","value"],Ka=["value"],Ga=["cm","mm","in","px","pt","pc","em","ex","ch","rem","vw","vh","vmin","vmax","%"],Ja=["px","rem","vw"];const Qa={components:{ModifiedIndicator:_t,Select:Kt.Z},props:{path:String,disabled:Boolean,min:Number,units:{type:[String],default:function(){return Ga}},expert:[Number,String]},computed:{pathDefault:function(){var e=this.path.split("."),t=(0,pt.Z)(e),n=t[0],l=t.slice(1);return[n+"DefaultValue"].concat((0,qe.Z)(l)).join(".")},stateUnit:function(){return(this.state||"").replace(/\d+/,"")},stateValue:function(){return(this.state||"").replace(/\D+/,"")},state:function(){var e=ie()(this.$parent,this.path);return void 0===e?this.defaultState:e},defaultState:function(){return ie()(this.$parent,this.pathDefault)},isChanged:function(){return this.state!==this.defaultState},matchesExpertLevel:function(){return(this.expert||0)<=this.$parent.expertLevel}},methods:{update:function(e){ft()(this.$parent,this.path,e)},reset:function(){ft()(this.$parent,this.path,this.defaultState)},updateValue:function(e){ft()(this.$parent,this.path,parseInt(e.target.value)+this.stateUnit)},updateUnit:function(e){ft()(this.$parent,this.path,this.stateValue+e.target.value)}}},Xa=(0,E.Z)(Qa,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("ModifiedIndicator");return e.matchesExpertLevel?((0,l.wg)(),(0,l.iD)("span",Na,[(0,l._)("label",{for:e.path,class:"size-label"},[(0,l.WI)(e.$slots,"default")],8,Ha),(0,l._)("input",{id:e.path,class:"number-input",type:"number",step:"1",disabled:e.disabled,min:e.min||0,value:e.stateValue,onChange:t[0]||(t[0]=function(){return e.updateValue&&e.updateValue.apply(e,arguments)})},null,40,Ya),(0,l.Wm)(r,{id:e.path,"model-value":e.stateUnit,disabled:e.disabled,class:"css-unit-input",onChange:e.updateUnit},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.units,(function(e){return(0,l.wg)(),(0,l.iD)("option",{key:e,value:e},(0,f.zw)(e),9,Ka)})),128))]})),_:1},8,["id","model-value","disabled","onChange"]),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.Wm)(i,{changed:e.isChanged,onclick:e.reset},null,8,["changed","onclick"])])):(0,l.kq)("",!0)}]]);function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}j.vI.add(B.g4A);const to={data:function(){var e=this;return{subjectLineOptions:["email","noop","masto"].map((function(t){return{key:t,value:t,label:e.$t("settings.subject_line_".concat("masto"===t?"mastodon":t))}})),conversationDisplayOptions:["tree","linear"].map((function(t){return{key:t,value:t,label:e.$t("settings.conversation_display_".concat(t))}})),conversationOtherRepliesButtonOptions:["below","inside"].map((function(t){return{key:t,value:t,label:e.$t("settings.conversation_other_replies_button_".concat(t))}})),mentionLinkDisplayOptions:["short","full_for_remote","full"].map((function(t){return{key:t,value:t,label:e.$t("settings.mention_link_display_".concat(t))}})),thirdColumnModeOptions:["none","notifications","postform"].map((function(t){return{key:t,value:t,label:e.$t("settings.third_column_mode_".concat(t))}})),userPopoverAvatarActionOptions:["close","zoom","open"].map((function(t){return{key:t,value:t,label:e.$t("settings.user_popover_avatar_action_".concat(t))}})),loopSilentAvailable:Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype,"mozHasAudio")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"webkitAudioDecodedByteCount")||Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"audioTracks")}},components:{BooleanSetting:Tt,ChoiceSetting:Jt,IntegerSetting:nn,SizeSetting:Xa,InterfaceLanguageSwitcher:ga.Z,ScopeSelector:pa.Z,ServerSideIndicator:$t},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({horizontalUnits:function(){return Ja},postFormats:function(){return this.$store.state.instance.postFormats||[]},postContentOptions:function(){var e=this;return this.postFormats.map((function(t){return{key:t,value:t,label:e.$t('post_status.content_type["'.concat(t,'"]'))}}))},columns:function(){var e=this.$store.getters.mergedConfig.thirdColumnMode,t="none"===e?[]:["notifs"];return this.$store.getters.mergedConfig.sidebarRight||"postform"===e?[].concat(t,["content","sidebar"]):["sidebar","content"].concat(t)},instanceSpecificPanelPresent:function(){return this.$store.state.instance.showInstanceSpecificPanel},instanceWallpaperUsed:function(){return this.$store.state.instance.background&&!this.$store.state.users.currentUser.background_image},instanceShoutboxPresent:function(){return this.$store.state.instance.shoutAvailable},language:{get:function(){return this.$store.getters.mergedConfig.interfaceLanguage},set:function(e){this.$store.dispatch("setOption",{name:"interfaceLanguage",value:e})}}},zt()),methods:{changeDefaultScope:function(e){this.$store.dispatch("setServerSideOption",{name:"defaultScope",value:e})}}},no=(0,E.Z)(to,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("interface-language-switcher"),i=(0,l.up)("BooleanSetting"),u=(0,l.up)("ChoiceSetting"),c=(0,l.up)("SizeSetting"),d=(0,l.up)("IntegerSetting"),p=(0,l.up)("FAIcon"),m=(0,l.up)("ServerSideIndicator"),h=(0,l.up)("ScopeSelector");return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.general")},[(0,l._)("div",Ca,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.interface")),1),(0,l._)("ul",Va,[(0,l._)("li",null,[(0,l.Wm)(r,{"prompt-text":e.$t("settings.interfaceLanguage"),language:e.language,"set-language":function(t){return e.language=t}},null,8,["prompt-text","language","set-language"])]),e.instanceSpecificPanelPresent?((0,l.wg)(),(0,l.iD)("li",Ta,[(0,l.Wm)(i,{path:"hideISP"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_isp")),1)]})),_:1})])):(0,l.kq)("",!0),e.instanceWallpaperUsed?((0,l.wg)(),(0,l.iD)("li",Ua,[(0,l.Wm)(i,{path:"hideInstanceWallpaper"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_wallpaper")),1)]})),_:1})])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"stopGifs"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.stop_gifs")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"streaming"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.streaming")),1)]})),_:1}),(0,l._)("ul",{class:(0,f.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(i,{path:"pauseOnUnfocused",disabled:!e.streaming},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.pause_on_unfocused")),1)]})),_:1},8,["disabled"])])],2)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useStreamingApi",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.useStreamingApi")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"virtualScrolling",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.virtual_scrolling")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"userPopoverAvatarAction",path:"userPopoverAvatarAction",options:e.userPopoverAvatarActionOptions,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.user_popover_avatar_action")),1)]})),_:1},8,["options"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"userPopoverOverlay",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.user_popover_avatar_overlay")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowNewPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.always_show_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"autohideFloatingPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.autohide_floating_post_button")),1)]})),_:1})]),e.instanceShoutboxPresent?((0,l.wg)(),(0,l.iD)("li",xa,[(0,l.Wm)(i,{path:"hideShoutbox",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.hide_shoutbox")),1)]})),_:1})])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l._)("h3",null,(0,f.zw)(e.$t("settings.columns")),1)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"disableStickyHeaders"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.disable_sticky_headers")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"showScrollbars"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.show_scrollbars")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"sidebarRight"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.right_sidebar")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"navbarColumnStretch"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.navbar_column_stretch")),1)]})),_:1})]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(u,{key:0,id:"thirdColumnMode",path:"thirdColumnMode",options:e.thirdColumnModeOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.third_column_mode")),1)]})),_:1},8,["options"])):(0,l.kq)("",!0)]),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("li",La,[(0,l.Uk)((0,f.zw)(e.$t("settings.column_sizes"))+" ",1),(0,l._)("div",Oa,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.columns,(function(t){return(0,l.wg)(),(0,l.j4)(c,{key:t,path:t+"ColumnWidth",units:e.horizontalUnits,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.column_sizes_"+t)),1)]})),_:2},1032,["path","units"])})),128))])])):(0,l.kq)("",!0),(0,l._)("li",Wa,[(0,l._)("span",za,(0,f.zw)(e.$t("settings.confirm_dialogs")),1),(0,l._)("ul",Sa,[(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnRepeat"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_repeat")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnUnfollow"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_unfollow")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnBlock"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_block")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnMute"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_mute")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnDelete"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_delete")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnLogout"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_logout")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnApproveFollow"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_approve_follow")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnDenyFollow"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_deny_follow")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"modalOnRemoveUserFromFollowers"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.confirm_dialogs_remove_follower")),1)]})),_:1})])])])])]),(0,l._)("div",Pa,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.post_look_feel")),1),(0,l._)("ul",Da,[(0,l._)("li",null,[(0,l.Wm)(u,{id:"conversationDisplay",path:"conversationDisplay",options:e.conversationDisplayOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.conversation_display")),1)]})),_:1},8,["options"])]),"linear"!==e.conversationDisplay?((0,l.wg)(),(0,l.iD)("ul",Ia,[(0,l._)("li",null,[(0,l.Wm)(i,{path:"conversationTreeAdvanced"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.tree_advanced")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"conversationTreeFadeAncestors",expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.tree_fade_ancestors")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(d,{path:"maxDepthInThread",min:3,expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.max_depth_in_thread")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"conversationOtherRepliesButton",path:"conversationOtherRepliesButton",options:e.conversationOtherRepliesButtonOptions,expert:1},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.conversation_other_replies_button")),1)]})),_:1},8,["options"])])])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"collapseMessageWithSubject"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.collapse_subject")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"emojiReactionsOnTimeline",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.emoji_reactions_on_timeline")),1)]})),_:1})]),(0,l._)("li",null,[e.user?((0,l.wg)(),(0,l.j4)(i,{key:0,path:"serverSide_stripRichContent",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.no_rich_text_description")),1)]})),_:1})):(0,l.kq)("",!0)]),(0,l._)("h3",null,(0,f.zw)(e.$t("settings.attachments")),1),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useContainFit",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.use_contain_fit")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"hideNsfw"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.nsfw_clickthrough")),1)]})),_:1})]),(0,l._)("ul",ja,[(0,l._)("li",null,[(0,l.Wm)(i,{path:"preloadImage",expert:"1",disabled:!e.hideNsfw},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.preload_images")),1)]})),_:1},8,["disabled"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useOneClickNsfw",expert:"1",disabled:!e.hideNsfw},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.use_one_click_nsfw")),1)]})),_:1},8,["disabled"])])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"loopVideo",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.loop_video")),1)]})),_:1}),(0,l._)("ul",{class:(0,f.C_)(["setting-list suboptions",[{disabled:!e.streaming}]])},[(0,l._)("li",null,[(0,l.Wm)(i,{path:"loopVideoSilentOnly",expert:"1",disabled:!e.loopVideo||!e.loopSilentAvailable},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.loop_video_silent_only")),1)]})),_:1},8,["disabled"]),e.loopSilentAvailable?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",Ba,[(0,l.Wm)(p,{icon:"globe"}),(0,l.Uk)("! "+(0,f.zw)(e.$t("settings.limited_availability")),1)]))])],2)]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"playVideosInModal",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.play_videos_in_modal")),1)]})),_:1})]),(0,l._)("h3",null,(0,f.zw)(e.$t("settings.mention_links")),1),(0,l._)("li",null,[(0,l.Wm)(u,{id:"mentionLinkDisplay",path:"mentionLinkDisplay",options:e.mentionLinkDisplayOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mention_link_display")),1)]})),_:1},8,["options"])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkShowTooltip",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mention_link_use_tooltip")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"useAtIcon",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.use_at_icon")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkShowAvatar"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mention_link_show_avatar")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"mentionLinkFadeDomain",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mention_link_fade_domain")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.iD)("li",Aa,[(0,l.Wm)(i,{path:"mentionLinkBoldenYou",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.mention_link_bolden_you")),1)]})),_:1})])):(0,l.kq)("",!0),e.expertLevel>0?((0,l.wg)(),(0,l.iD)("h3",Ea,(0,f.zw)(e.$t("settings.fun")),1)):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"greentext",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.greentext")),1)]})),_:1})]),e.user?((0,l.wg)(),(0,l.iD)("li",Fa,[(0,l.Wm)(i,{path:"mentionLinkShowYous",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.show_yous")),1)]})),_:1})])):(0,l.kq)("",!0)])]),e.user?((0,l.wg)(),(0,l.iD)("div",qa,[(0,l._)("h2",null,(0,f.zw)(e.$t("settings.composing")),1),(0,l._)("ul",Za,[(0,l._)("li",null,[(0,l._)("label",Ma,[(0,l.Uk)((0,f.zw)(e.$t("settings.default_vis"))+" ",1),(0,l.Wm)(m,{"server-side":!0}),(0,l.Wm)(h,{class:"scope-selector","show-all":!0,"user-default":e.serverSide_defaultScope,"initial-scope":e.serverSide_defaultScope,"on-scope-change":e.changeDefaultScope},null,8,["user-default","initial-scope","on-scope-change"])])]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"sensitiveByDefault"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.sensitive_by_default")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"scopeCopy",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.scope_copy")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowSubjectInput",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.subject_input_always_show")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(u,{id:"subjectLineBehavior",path:"subjectLineBehavior",options:e.subjectLineOptions,expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.subject_line_behavior")),1)]})),_:1},8,["options"])]),e.postFormats.length>0?((0,l.wg)(),(0,l.iD)("li",Ra,[(0,l.Wm)(u,{id:"postContentType",path:"postContentType",options:e.postContentOptions},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.post_status_content_type")),1)]})),_:1},8,["options"])])):(0,l.kq)("",!0),(0,l._)("li",null,[(0,l.Wm)(i,{path:"minimalScopesMode",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.minimal_scopes_mode")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"alwaysShowNewPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.always_show_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"autohideFloatingPostButton",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.autohide_floating_post_button")),1)]})),_:1})]),(0,l._)("li",null,[(0,l.Wm)(i,{path:"padEmoji",expert:"1"},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.pad_emoji")),1)]})),_:1})])])])):(0,l.kq)("",!0)],8,$a)}]]);var lo=["label"],ao={class:"setting-item"},oo={class:"setting-list"},so={class:"option-list"},ro=["href"],io={class:"option-list"},uo=["href"];const co={data:function(){var e=this.$store.state.instance;return{backendVersion:e.backendVersion,frontendVersion:e.frontendVersion}},computed:{frontendVersionLink:function(){return"https://git.pleroma.social/pleroma/pleroma-fe/commit/"+this.frontendVersion},backendVersionLink:function(){return"https://git.pleroma.social/pleroma/pleroma/commit/"+((e=this.backendVersion.match(/-g(\w+)/i))?e[1]:"");var e}}},po=(0,E.Z)(co,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",{label:e.$t("settings.version.title")},[(0,l._)("div",ao,[(0,l._)("ul",oo,[(0,l._)("li",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.version.backend_version")),1),(0,l._)("ul",so,[(0,l._)("li",null,[(0,l._)("a",{href:e.backendVersionLink,target:"_blank"},(0,f.zw)(e.backendVersion),9,ro)])])]),(0,l._)("li",null,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.version.frontend_version")),1),(0,l._)("ul",io,[(0,l._)("li",null,[(0,l._)("a",{href:e.frontendVersionLink,target:"_blank"},(0,f.zw)(e.frontendVersion),9,uo)])])])])])],8,lo)}]]);var mo={class:"theme-tab"},fo={class:"presets-container"},ho={class:"save-load"},go={key:0,class:"theme-warning"},bo={class:"alert warning"},wo={class:"buttons"},_o={class:"top"},ko={class:"presets"},vo={for:"preset-switcher",class:"select"},yo=["value"],$o={class:"export-import"},Co={class:"save-load-options"},Vo={class:"keep-option"},To={class:"keep-option"},Uo={class:"keep-option"},xo={class:"keep-option"},Lo={class:"keep-option"},Oo=["label"],Wo={class:"tab-header"},zo={class:"tab-header-buttons"},So={class:"color-item"},Po={class:"color-item"},Do={class:"color-item"},Io={class:"color-item"},jo=["label"],Bo={class:"tab-header"},Ao={class:"color-item"},Eo={class:"color-item"},Fo={class:"color-item"},qo={class:"color-item"},Zo={class:"color-item"},Mo={class:"color-item"},Ro={class:"color-item"},No={class:"color-item"},Ho={class:"color-item"},Yo={class:"color-item"},Ko={class:"color-item"},Go={class:"color-item"},Jo={class:"color-item"},Qo={class:"color-item"},Xo={class:"color-item"},es={class:"color-item"},ts={class:"color-item"},ns={class:"color-item"},ls=["label"],as={class:"tab-header"},os=["label"],ss={class:"tab-header shadow-selector"},rs={class:"select-container"},is=["value"],us={class:"override"},cs={for:"override",class:"label"},ds=(0,l._)("label",{class:"checkbox-label",for:"override"},null,-1),ps={key:0},ms=(0,l._)("code",null,"filter: drop-shadow()",-1),fs=(0,l._)("code",null,"drop-shadow",-1),hs=(0,l._)("code",null,"spread-radius",-1),gs=(0,l._)("code",null,"inset",-1),bs=(0,l._)("code",null,"box-shadow",-1),ws=["label"],_s={class:"tab-header"},ks={class:"apply-container"},vs=["disabled"],ys=n(21865),$s=n(77394),Cs=n(25771),Vs=n(44551),Ts=n(40454),Us=["for"],xs={class:"input color-input-field"},Ls=["id","value","disabled"],Os=["id","value","disabled"],Ws={key:1,class:"transparentIndicator"};const zs={components:{Checkbox:N.Z},props:{name:{required:!0,type:String},label:{required:!0,type:String},modelValue:{required:!1,type:String,default:void 0},fallback:{required:!1,type:String,default:void 0},disabled:{required:!1,type:Boolean,default:!1},showOptionalTickbox:{required:!1,type:Boolean,default:!0}},emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue},validColor:function(){return(0,ys.wK)(this.modelValue||this.fallback)},transparentColor:function(){return"transparent"===this.modelValue},computedColor:function(){return this.modelValue&&this.modelValue.startsWith("--")}}},Ss=(0,E.Z)(zs,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox");return(0,l.wg)(),(0,l.iD)("div",{class:(0,f.C_)(["color-input style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,f.zw)(n.label),9,Us),void 0!==n.fallback&&n.showOptionalTickbox?((0,l.wg)(),(0,l.j4)(r,{key:0,"model-value":s.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",void 0===n.modelValue?n.fallback:void 0)})},null,8,["model-value","disabled"])):(0,l.kq)("",!0),(0,l._)("div",xs,[(0,l._)("input",{id:n.name+"-t",class:"textColor unstyled",type:"text",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Ls),s.validColor?((0,l.wg)(),(0,l.iD)("input",{key:0,id:n.name,class:"nativeColor unstyled",type:"color",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,onInput:t[2]||(t[2]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Os)):(0,l.kq)("",!0),s.transparentColor?((0,l.wg)(),(0,l.iD)("div",Ws)):(0,l.kq)("",!0),s.computedColor?((0,l.wg)(),(0,l.iD)("div",{key:2,class:"computedIndicator",style:(0,f.j5)({backgroundColor:n.fallback})},null,4)):(0,l.kq)("",!0)])],2)}]]);var Ps=["for"],Ds=["id","checked"],Is=["for"],js=["id","value","disabled","max","min","step"],Bs=["id","value","disabled","max","min","step"];const As={props:["name","modelValue","fallback","disabled","label","max","min","step","hardMin","hardMax"],emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue}}},Es=(0,E.Z)(As,[["render",function(e,t,n,a,o,s){return(0,l.wg)(),(0,l.iD)("div",{class:(0,f.C_)(["range-control style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,f.zw)(n.label),9,Ps),void 0!==n.fallback?((0,l.wg)(),(0,l.iD)("input",{key:0,id:n.name+"-o",class:"opt",type:"checkbox",checked:s.present,onChange:t[0]||(t[0]=function(t){return e.$emit("update:modelValue",s.present?void 0:n.fallback)})},null,40,Ds)):(0,l.kq)("",!0),void 0!==n.fallback?((0,l.wg)(),(0,l.iD)("label",{key:1,class:"opt-l",for:n.name+"-o"},null,8,Is)):(0,l.kq)("",!0),(0,l._)("input",{id:n.name,class:"input-number",type:"range",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:n.max||n.hardMax||100,min:n.min||n.hardMin||0,step:n.step||1,onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,js),(0,l._)("input",{id:n.name,class:"input-number",type:"number",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:n.hardMax,min:n.hardMin,step:n.step||1,onInput:t[2]||(t[2]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,Bs)],2)}]]);var Fs=["for"],qs=["id","value","disabled"];const Zs={components:{Checkbox:N.Z},props:["name","modelValue","fallback","disabled"],emits:["update:modelValue"],computed:{present:function(){return void 0!==this.modelValue}}},Ms=(0,E.Z)(Zs,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Checkbox");return(0,l.wg)(),(0,l.iD)("div",{class:(0,f.C_)(["opacity-control style-control",{disabled:!s.present||n.disabled}])},[(0,l._)("label",{for:n.name,class:"label"},(0,f.zw)(e.$t("settings.style.common.opacity")),9,Fs),void 0!==n.fallback?((0,l.wg)(),(0,l.j4)(r,{key:0,"model-value":s.present,disabled:n.disabled,class:"opt","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.$emit("update:modelValue",s.present?void 0:n.fallback)})},null,8,["model-value","disabled"])):(0,l.kq)("",!0),(0,l._)("input",{id:n.name,class:"input-number",type:"number",value:n.modelValue||n.fallback,disabled:!s.present||n.disabled,max:"1",min:"0",step:".05",onInput:t[1]||(t[1]=function(t){return e.$emit("update:modelValue",t.target.value)})},null,40,qs)],2)}]]);var Rs={class:"shadow-preview-container"},Ns=["disabled"],Hs=["disabled"],Ys={class:"wrap"},Ks=["disabled"],Gs={class:"preview-window"},Js=["disabled"],Qs=["disabled"],Xs={class:"wrap"},er=["disabled"],tr={class:"shadow-tweak"},nr=["disabled"],lr=["value"],ar=["disabled"],or=["disabled"],sr=["disabled"],rr=["disabled"],ir=["disabled"],ur={for:"inset",class:"label"},cr=["disabled"],dr=(0,l._)("label",{class:"checkbox-label",for:"inset"},null,-1),pr=["disabled"],mr={for:"spread",class:"label"},fr=["disabled"],hr=["disabled"],gr=["disabled"],br={for:"spread",class:"label"},wr=["disabled"],_r=["disabled"],kr=(0,l._)("code",null,"--variable,mod",-1);function vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j.vI.add(B.ptq,B.mTx,B.NBC,B.r8p);var $r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yr({x:0,y:0,blur:0,spread:0,inset:!1,color:"#000000",alpha:1},e)};const Cr={props:["modelValue","fallback","ready"],emits:["update:modelValue"],data:function(){return{selectedId:0,cValue:(this.modelValue||this.fallback||[]).map($r)}},components:{ColorInput:Ss,OpacityInput:Ms,Select:Kt.Z},methods:{add:function(){this.cValue.push($r(this.selected)),this.selectedId=this.cValue.length-1},del:function(){this.cValue.splice(this.selectedId,1),this.selectedId=0===this.cValue.length?void 0:Math.max(this.selectedId-1,0)},moveUp:function(){var e=this.cValue.splice(this.selectedId,1)[0];this.cValue.splice(this.selectedId-1,0,e),this.selectedId-=1},moveDn:function(){var e=this.cValue.splice(this.selectedId,1)[0];this.cValue.splice(this.selectedId+1,0,e),this.selectedId+=1}},beforeUpdate:function(){this.cValue=this.modelValue||this.fallback},computed:{anyShadows:function(){return this.cValue.length>0},anyShadowsFallback:function(){return this.fallback.length>0},selected:function(){return this.ready&&this.anyShadows?this.cValue[this.selectedId]:$r({})},currentFallback:function(){return this.ready&&this.anyShadowsFallback?this.fallback[this.selectedId]:$r({})},moveUpValid:function(){return this.ready&&this.selectedId>0},moveDnValid:function(){return this.ready&&this.selectedId<this.cValue.length-1},present:function(){return this.ready&&void 0!==this.cValue[this.selectedId]&&!this.usingFallback},usingFallback:function(){return void 0===this.modelValue},rgb:function(){return(0,ys.wK)(this.selected.color)},style:function(){return this.ready?{boxShadow:(0,$s.Ot)(this.fallback)}:{}}}},Vr=(0,E.Z)(Cr,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("FAIcon"),u=(0,l.up)("ColorInput"),c=(0,l.up)("OpacityInput"),d=(0,l.up)("i18n-t");return(0,l.wg)(),(0,l.iD)("div",{class:(0,f.C_)(["shadow-control",{disabled:!e.present}])},[(0,l._)("div",Rs,[(0,l._)("div",{disabled:!e.present,class:"y-shift-control"},[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.selected.y=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,Hs),[[me.nr,e.selected.y]]),(0,l._)("div",Ys,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.selected.y=t}),disabled:!e.present,class:"input-range",type:"range",max:"20",min:"-20"},null,8,Ks),[[me.nr,e.selected.y]])])],8,Ns),(0,l._)("div",Gs,[(0,l._)("div",{class:"preview-block",style:(0,f.j5)(e.style)},null,4)]),(0,l._)("div",{disabled:!e.present,class:"x-shift-control"},[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.selected.x=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,Qs),[[me.nr,e.selected.x]]),(0,l._)("div",Xs,[(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.selected.x=t}),disabled:!e.present,class:"input-range",type:"range",max:"20",min:"-20"},null,8,er),[[me.nr,e.selected.x]])])],8,Js)]),(0,l._)("div",tr,[(0,l._)("div",{disabled:e.usingFallback,class:"id-control style-control"},[(0,l.Wm)(r,{id:"shadow-switcher",modelValue:e.selectedId,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.selectedId=t}),class:"shadow-switcher",disabled:!e.ready||e.usingFallback},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.cValue,(function(t,n){return(0,l.wg)(),(0,l.iD)("option",{key:n,value:n},(0,f.zw)(e.$t("settings.style.shadows.shadow_id",{value:n})),9,lr)})),128))]})),_:1},8,["modelValue","disabled"]),(0,l._)("button",{class:"btn button-default",disabled:!e.ready||!e.present,onClick:t[5]||(t[5]=function(){return e.del&&e.del.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"times"})],8,ar),(0,l._)("button",{class:"btn button-default",disabled:!e.moveUpValid,onClick:t[6]||(t[6]=function(){return e.moveUp&&e.moveUp.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"chevron-up"})],8,or),(0,l._)("button",{class:"btn button-default",disabled:!e.moveDnValid,onClick:t[7]||(t[7]=function(){return e.moveDn&&e.moveDn.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"chevron-down"})],8,sr),(0,l._)("button",{class:"btn button-default",disabled:e.usingFallback,onClick:t[8]||(t[8]=function(){return e.add&&e.add.apply(e,arguments)})},[(0,l.Wm)(i,{"fixed-width":"",icon:"plus"})],8,rr)],8,nr),(0,l._)("div",{disabled:!e.present,class:"inset-control style-control"},[(0,l._)("label",ur,(0,f.zw)(e.$t("settings.style.shadows.inset")),1),(0,l.wy)((0,l._)("input",{id:"inset","onUpdate:modelValue":t[9]||(t[9]=function(t){return e.selected.inset=t}),disabled:!e.present,name:"inset",class:"input-inset",type:"checkbox"},null,8,cr),[[me.e8,e.selected.inset]]),dr],8,ir),(0,l._)("div",{disabled:!e.present,class:"blur-control style-control"},[(0,l._)("label",mr,(0,f.zw)(e.$t("settings.style.shadows.blur")),1),(0,l.wy)((0,l._)("input",{id:"blur","onUpdate:modelValue":t[10]||(t[10]=function(t){return e.selected.blur=t}),disabled:!e.present,name:"blur",class:"input-range",type:"range",max:"20",min:"0"},null,8,fr),[[me.nr,e.selected.blur]]),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.selected.blur=t}),disabled:!e.present,class:"input-number",type:"number",min:"0"},null,8,hr),[[me.nr,e.selected.blur]])],8,pr),(0,l._)("div",{disabled:!e.present,class:"spread-control style-control"},[(0,l._)("label",br,(0,f.zw)(e.$t("settings.style.shadows.spread")),1),(0,l.wy)((0,l._)("input",{id:"spread","onUpdate:modelValue":t[12]||(t[12]=function(t){return e.selected.spread=t}),disabled:!e.present,name:"spread",class:"input-range",type:"range",max:"20",min:"-20"},null,8,wr),[[me.nr,e.selected.spread]]),(0,l.wy)((0,l._)("input",{"onUpdate:modelValue":t[13]||(t[13]=function(t){return e.selected.spread=t}),disabled:!e.present,class:"input-number",type:"number"},null,8,_r),[[me.nr,e.selected.spread]])],8,gr),(0,l.Wm)(u,{modelValue:e.selected.color,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.selected.color=t}),disabled:!e.present,label:e.$t("settings.style.common.color"),fallback:e.currentFallback.color,"show-optional-tickbox":!1,name:"shadow"},null,8,["modelValue","disabled","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selected.alpha,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.selected.alpha=t}),disabled:!e.present},null,8,["modelValue","disabled"]),(0,l.Wm)(d,{scope:"global",keypath:"settings.style.shadows.hintV3",tag:"p"},{default:(0,l.w5)((function(){return[kr]})),_:1})])],2)}]]);var Tr=["for"],Ur=["id","checked"],xr=["for"],Lr=["value"],Or=["id"];const Wr={components:{Select:Kt.Z},props:["name","label","modelValue","fallback","options","no-inherit"],emits:["update:modelValue"],data:function(){return{lValue:this.modelValue,availableOptions:[this.noInherit?"":"inherit","custom"].concat((0,qe.Z)(this.options||[]),["serif","monospace","sans-serif"]).filter((function(e){return e}))}},beforeUpdate:function(){this.lValue=this.modelValue},computed:{present:function(){return void 0!==this.lValue},dValue:function(){return this.lValue||this.fallback||{}},family:{get:function(){return this.dValue.family},set:function(e){ft()(this.lValue,"family",e),this.$emit("update:modelValue",this.lValue)}},isCustom:function(){return"custom"===this.preset},preset:{get:function(){return"serif"===this.family||"sans-serif"===this.family||"monospace"===this.family||"inherit"===this.family?this.family:"custom"},set:function(e){this.family="custom"===e?"":e}}}},zr=(0,E.Z)(Wr,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select");return(0,l.wg)(),(0,l.iD)("div",{class:(0,f.C_)(["font-control style-control",{custom:e.isCustom}])},[(0,l._)("label",{for:"custom"===e.preset?e.name:e.name+"-font-switcher",class:"label"},(0,f.zw)(e.label),9,Tr),void 0!==e.fallback?((0,l.wg)(),(0,l.iD)("input",{key:0,id:e.name+"-o",class:"opt exlcude-disabled",type:"checkbox",checked:e.present,onChange:t[0]||(t[0]=function(t){return e.$emit("update:modelValue",void 0===e.modelValue?e.fallback:void 0)})},null,40,Ur)):(0,l.kq)("",!0),void 0!==e.fallback?((0,l.wg)(),(0,l.iD)("label",{key:1,class:"opt-l",for:e.name+"-o"},null,8,xr)):(0,l.kq)("",!0),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.Wm)(r,{id:e.name+"-font-switcher",modelValue:e.preset,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.preset=t}),disabled:!e.present,class:"font-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.availableOptions,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t,value:t},(0,f.zw)("custom"===t?e.$t("settings.style.fonts.custom"):t),9,Lr)})),128))]})),_:1},8,["id","modelValue","disabled"]),e.isCustom?(0,l.wy)(((0,l.wg)(),(0,l.iD)("input",{key:2,id:e.name,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.family=t}),class:"custom-font",type:"text"},null,8,Or)),[[me.nr,e.family]]):(0,l.kq)("",!0)],2)}]]);var Sr={key:0,class:"contrast-ratio"},Pr=["title"],Dr={key:0},Ir={key:1},jr={key:2},Br=["title"],Ar={key:0},Er={key:1},Fr={key:2};j.vI.add(B.OwZ,B.eHv,B.u8Q);const qr={props:{large:{required:!1,type:Boolean,default:!1},contrast:{required:!1,type:Object,default:function(){return{}}}},computed:{hint:function(){var e=this.contrast.aaa?"aaa":this.contrast.aa?"aa":"bad",t=this.$t("settings.style.common.contrast.level.".concat(e)),n=this.$t("settings.style.common.contrast.context.text"),l=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:l})},hint_18pt:function(){var e=this.contrast.laaa?"aaa":this.contrast.laa?"aa":"bad",t=this.$t("settings.style.common.contrast.level.".concat(e)),n=this.$t("settings.style.common.contrast.context.18pt"),l=this.contrast.text;return this.$t("settings.style.common.contrast.hint",{level:t,context:n,ratio:l})}}},Zr=(0,E.Z)(qr,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("FAIcon");return n.contrast?((0,l.wg)(),(0,l.iD)("span",Sr,[(0,l._)("span",{title:s.hint,class:"rating"},[n.contrast.aaa?((0,l.wg)(),(0,l.iD)("span",Dr,[(0,l.Wm)(r,{icon:"thumbs-up"})])):(0,l.kq)("",!0),!n.contrast.aaa&&n.contrast.aa?((0,l.wg)(),(0,l.iD)("span",Ir,[(0,l.Wm)(r,{icon:"adjust"})])):(0,l.kq)("",!0),n.contrast.aaa||n.contrast.aa?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("span",jr,[(0,l.Wm)(r,{icon:"exclamation-triangle"})]))],8,Pr),n.contrast&&n.large?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"rating",title:s.hint_18pt},[n.contrast.laaa?((0,l.wg)(),(0,l.iD)("span",Ar,[(0,l.Wm)(r,{icon:"thumbs-up"})])):(0,l.kq)("",!0),!n.contrast.laaa&&n.contrast.laa?((0,l.wg)(),(0,l.iD)("span",Er,[(0,l.Wm)(r,{icon:"adjust"})])):(0,l.kq)("",!0),n.contrast.laaa||n.contrast.laa?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("span",Fr,[(0,l.Wm)(r,{icon:"exclamation-triangle"})]))],8,Br)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)}]]);var Mr={class:"preview-container"},Rr=(0,l._)("div",{class:"underlay underlay-preview"},null,-1),Nr={class:"panel dummy"},Hr={class:"panel-heading"},Yr={class:"title"},Kr=(0,l._)("span",{class:"badge badge-notification"}," 99 ",-1),Gr={class:"faint"},Jr={class:"alert error"},Qr={class:"btn button-default"},Xr={class:"panel-body theme-preview-content"},ei={class:"post"},ti=(0,l._)("div",{class:"avatar still-image"}," ( ͡° ͜ʖ ͡°) ",-1),ni={class:"content"},li={style:{"font-family":"var(--postCodeFont)"}},ai={style:{color:"var(--link)"}},oi={class:"icons"},si={class:"after-post"},ri=(0,l._)("div",{class:"avatar-alt"}," :^) ",-1),ii={class:"content"},ui={style:{color:"var(--faintLink)"}},ci=(0,l._)("div",{class:"separator"},null,-1),di={class:"alert error"},pi=["value"],mi={class:"actions"},fi={class:"checkbox"},hi=(0,l._)("input",{id:"preview_checkbox",checked:"very yes",type:"checkbox"},null,-1),gi={for:"preview_checkbox"},bi={class:"btn button-default"};j.vI.add(B.NBC,B.Tab,B.x5v,B.Lh7);const wi={},_i=(0,E.Z)(wi,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("i18n-t"),i=(0,l.up)("FAIcon");return(0,l.wg)(),(0,l.iD)("div",Mr,[Rr,(0,l._)("div",Nr,[(0,l._)("div",Hr,[(0,l._)("div",Yr,[(0,l.Uk)((0,f.zw)(e.$t("settings.style.preview.header"))+" ",1),Kr]),(0,l._)("span",Gr,(0,f.zw)(e.$t("settings.style.preview.header_faint")),1),(0,l._)("span",Jr,(0,f.zw)(e.$t("settings.style.preview.error")),1),(0,l._)("button",Qr,(0,f.zw)(e.$t("settings.style.preview.button")),1)]),(0,l._)("div",Xr,[(0,l._)("div",ei,[ti,(0,l._)("div",ni,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.preview.content")),1),(0,l.Wm)(r,{scope:"global",keypath:"settings.style.preview.text"},{default:(0,l.w5)((function(){return[(0,l._)("code",li,(0,f.zw)(e.$t("settings.style.preview.mono")),1),(0,l._)("a",ai,(0,f.zw)(e.$t("settings.style.preview.link")),1)]})),_:1}),(0,l._)("div",oi,[(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cBlue)"},class:"fa-scale-110 fa-old-padding",icon:"reply"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cGreen)"},class:"fa-scale-110 fa-old-padding",icon:"retweet"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cOrange)"},class:"fa-scale-110 fa-old-padding",icon:"star"}),(0,l.Wm)(i,{"fixed-width":"",style:{color:"var(--cRed)"},class:"fa-scale-110 fa-old-padding",icon:"times"})])])]),(0,l._)("div",si,[ri,(0,l._)("div",ii,[(0,l.Wm)(r,{keypath:"settings.style.preview.fine_print",tag:"span",class:"faint",scope:"global"},{default:(0,l.w5)((function(){return[(0,l._)("a",ui,(0,f.zw)(e.$t("settings.style.preview.faint_link")),1)]})),_:1})])]),ci,(0,l._)("span",di,(0,f.zw)(e.$t("settings.style.preview.error")),1),(0,l._)("input",{value:e.$t("settings.style.preview.input"),type:"text"},null,8,pi),(0,l._)("div",mi,[(0,l._)("span",fi,[hi,(0,l._)("label",gi,(0,f.zw)(e.$t("settings.style.preview.checkbox")),1)]),(0,l._)("button",bi,(0,f.zw)(e.$t("settings.style.preview.button")),1)])])])])}]]);function ki(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(n),!0).forEach((function(t){(0,S.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yi=["bg","fg","text","link","cRed","cGreen","cBlue","cOrange"].map((function(e){return e+"ColorLocal"}));const $i={data:function(){var e=this;return vi(vi(vi({themeImporter:(0,Cs.i)({validator:this.importValidator,onImport:this.onImport,onImportFailure:this.onImportFailure}),themeExporter:(0,Cs.M)({filename:"pleroma_theme",getExportedObject:function(){return e.exportedTheme}}),availableStyles:[],selected:"",selectedTheme:this.$store.getters.mergedConfig.theme,themeWarning:void 0,tempImportFile:void 0,engineVersion:0,previewShadows:{},previewColors:{},previewRadii:{},previewFonts:{},shadowsInvalid:!0,colorsInvalid:!0,radiiInvalid:!0,keepColor:!1,keepShadows:!1,keepOpacity:!1,keepRoundness:!1,keepFonts:!1},Object.keys(Vs.em).map((function(e){return[e,""]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return vi(vi({},e),{},(0,S.Z)({},l+"ColorLocal",a))}),{})),Object.keys(Ts.AQ).map((function(e){return[e,""]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return vi(vi({},e),{},(0,S.Z)({},l+"OpacityLocal",a))}),{})),{},{shadowSelected:void 0,shadowsLocal:{},fontsLocal:{},btnRadiusLocal:"",inputRadiusLocal:"",checkboxRadiusLocal:"",panelRadiusLocal:"",avatarRadiusLocal:"",avatarAltRadiusLocal:"",attachmentRadiusLocal:"",tooltipRadiusLocal:"",chatMessageRadiusLocal:""})},created:function(){var e=this;(0,$s.RC)().then((function(e){return Promise.all(Object.entries(e).map((function(e){var t=(0,Ut.Z)(e,2),n=t[0];return t[1].then((function(e){return[n,e]}))})))})).then((function(e){return e.reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return a?vi(vi({},e),{},(0,S.Z)({},l,a)):e}),{})})).then((function(t){e.availableStyles=t}))},mounted:function(){this.loadThemeFromLocalStorage(),void 0===this.shadowSelected&&(this.shadowSelected=this.shadowsAvailable[0])},computed:{themeWarningHelp:function(){if(this.themeWarning){var e=this.$t,t="settings.style.switcher.help.",n=this.themeWarning,l=n.origin,a=n.themeEngineVersion,o=n.type,s=n.noActionsPossible;if("file"===l){if(2===a&&"wrong_version"===o)return e(t+"v2_imported");if(a>Ts.we)return e(t+"future_version_imported")+" "+e(s?t+"snapshot_missing":t+"snapshot_present");if(a<Ts.we)return e(t+"future_version_imported")+" "+e(s?t+"snapshot_missing":t+"snapshot_present")}else if("localStorage"===l){if("snapshot_source_mismatch"===o)return e(t+"snapshot_source_mismatch");if(2===a)return e(t+"upgraded_from_v2");if(a>Ts.we)return e(t+"fe_downgraded")+" "+e(s?t+"migration_snapshot_ok":t+"migration_snapshot_gone");if(a<Ts.we)return e(t+"fe_upgraded")+" "+e(s?t+"migration_snapshot_ok":t+"migration_snapshot_gone")}}},selectedVersion:function(){return Array.isArray(this.selectedTheme)?1:2},currentColors:function(){var e=this;return Object.keys(Vs.em).map((function(t){return[t,e[t+"ColorLocal"]]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return vi(vi({},e),{},(0,S.Z)({},l,a))}),{})},currentOpacity:function(){var e=this;return Object.keys(Ts.AQ).map((function(t){return[t,e[t+"OpacityLocal"]]})).reduce((function(e,t){var n=(0,Ut.Z)(t,2),l=n[0],a=n[1];return vi(vi({},e),{},(0,S.Z)({},l,a))}),{})},currentRadii:function(){return{btn:this.btnRadiusLocal,input:this.inputRadiusLocal,checkbox:this.checkboxRadiusLocal,panel:this.panelRadiusLocal,avatar:this.avatarRadiusLocal,avatarAlt:this.avatarAltRadiusLocal,tooltip:this.tooltipRadiusLocal,attachment:this.attachmentRadiusLocal,chatMessage:this.chatMessageRadiusLocal}},preview:function(){return(0,$s.gm)(this.previewColors,this.previewRadii,this.previewShadows,this.previewFonts)},previewTheme:function(){return this.preview.theme.colors?this.preview.theme:{colors:{},opacity:{},radii:{},shadows:{},fonts:{}}},previewContrast:function(){try{if(!this.previewTheme.colors.bg)return{};var e=this.previewTheme.colors,t=this.previewTheme.opacity;if(!e.bg)return{};var n=Object.entries(e).reduce((function(e,t){var n,l=(0,Ut.Z)(t,2),a=l[0],o=l[1];return vi(vi({},e),{},(0,S.Z)({},a,(n=o).startsWith("--")||"transparent"===n?n:(0,ys.wK)(n)))}),{}),l=Object.entries(Vs.em).reduce((function(e,l){var a=(0,Ut.Z)(l,2),o=a[0],s=a[1],r="text"===o||"link"===o;if(!(r||"object"===(0,ra.Z)(s)&&null!==s&&s.textColor))return e;var i=r?{layer:"bg"}:s,u=i.layer,c=i.variant,d=c||u,p=(0,Ts.AV)(d),m=[o].concat((0,qe.Z)("bg"===d?["cRed","cGreen","cBlue","cOrange"]:[])),f=(0,Ts.xb)(u,c||u,p,n,t);return f.flat().some((function(e){return null==e}))?e:vi(vi({},e),m.reduce((function(e,t){var l=r?"bg"+t[0].toUpperCase()+t.slice(1):t;return vi(vi({},e),{},(0,S.Z)({},l,(0,ys.aj)(n[t],f,n[t])))}),{}))}),{});return Object.entries(l).reduce((function(e,t){var n,l=(0,Ut.Z)(t,2),a=l[0],o=l[1];return e[a]={text:(n=o).toPrecision(3)+":1",aa:n>=4.5,aaa:n>=7,laa:n>=3,laaa:n>=4.5},e}),{})}catch(e){return console.warn("Failure computing contrasts",e),{}}},previewRules:function(){return this.preview.rules?[].concat((0,qe.Z)(Object.values(this.preview.rules)),["color: var(--text)","font-family: var(--interfaceFont, sans-serif)"]).join(";"):""},shadowsAvailable:function(){return Object.keys($s.vp).sort()},currentShadowOverriden:{get:function(){return!!this.currentShadow},set:function(e){e?this.shadowsLocal[this.shadowSelected]=this.currentShadowFallback.map((function(e){return Object.assign({},e)})):delete this.shadowsLocal[this.shadowSelected]}},currentShadowFallback:function(){return(this.previewTheme.shadows||{})[this.shadowSelected]},currentShadow:{get:function(){return this.shadowsLocal[this.shadowSelected]},set:function(e){this.shadowsLocal[this.shadowSelected]=e}},themeValid:function(){return!this.shadowsInvalid&&!this.colorsInvalid&&!this.radiiInvalid},exportedTheme:function(){var e=!(this.keepFonts||this.keepShadows||this.keepOpacity||this.keepRoundness||this.keepColor),t={themeEngineVersion:Ts.we};return(this.keepFonts||e)&&(t.fonts=this.fontsLocal),(this.keepShadows||e)&&(t.shadows=this.shadowsLocal),(this.keepOpacity||e)&&(t.opacity=this.currentOpacity),(this.keepColor||e)&&(t.colors=this.currentColors),(this.keepRoundness||e)&&(t.radii=this.currentRadii),{_pleroma_theme_version:2,theme:vi({themeEngineVersion:Ts.we},this.previewTheme),source:t}},isActive:function(){var e=this.$parent;return!!e&&e.isActive("theme")}},components:{ColorInput:Ss,OpacityInput:Ms,RangeInput:Es,ContrastRatio:Zr,ShadowControl:Vr,FontControl:zr,TabSwitcher:m.Z,Preview:_i,Checkbox:N.Z,Select:Kt.Z},methods:{loadTheme:function(e,t){var n=e.theme,l=e.source,a=e._pleroma_theme_version,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.dismissWarning(),!l&&!n)throw new Error("Can't load theme: empty");var s="localStorage"!==t||n.colors?a:"l1",r=(n||{}).themeEngineVersion,i=(l||{}).themeEngineVersion||2,u=i===Ts.we,c=void 0!==n&&void 0!==l&&i!==r,d=l&&o||!n;u&&!c||d||"l1"===s||"defaults"===t||(c&&"localStorage"===t?this.themeWarning={origin:t,themeEngineVersion:i,type:"snapshot_source_mismatch"}:n?u||(this.themeWarning={origin:t,noActionsPossible:!l,themeEngineVersion:i,type:"wrong_version"}):this.themeWarning={origin:t,noActionsPossible:!0,themeEngineVersion:i,type:"no_snapshot_old_version"}),this.normalizeLocalState(n,s,l,d)},forceLoadLocalStorage:function(){this.loadThemeFromLocalStorage(!0)},dismissWarning:function(){this.themeWarning=void 0,this.tempImportFile=void 0},forceLoad:function(){switch(this.themeWarning.origin){case"localStorage":this.loadThemeFromLocalStorage(!0);break;case"file":this.onImport(this.tempImportFile,!0)}this.dismissWarning()},forceSnapshot:function(){switch(this.themeWarning.origin){case"localStorage":this.loadThemeFromLocalStorage(!1,!0);break;case"file":console.error("Forcing snapshot from file is not supported yet")}this.dismissWarning()},loadThemeFromLocalStorage:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.$store.getters.mergedConfig,l=n.customTheme,a=n.customThemeSource;l||a?this.loadTheme({theme:l,source:t?l:a},"localStorage",e):this.loadTheme(this.$store.state.instance.themeData,"defaults",e)},setCustomTheme:function(){this.$store.dispatch("setOption",{name:"customTheme",value:vi({themeEngineVersion:Ts.we},this.previewTheme)}),this.$store.dispatch("setOption",{name:"customThemeSource",value:{themeEngineVersion:Ts.we,shadows:this.shadowsLocal,fonts:this.fontsLocal,opacity:this.currentOpacity,colors:this.currentColors,radii:this.currentRadii}})},updatePreviewColorsAndShadows:function(){this.previewColors=(0,$s.LP)({opacity:this.currentOpacity,colors:this.currentColors}),this.previewShadows=(0,$s.H2)({shadows:this.shadowsLocal,opacity:this.previewTheme.opacity,themeEngineVersion:this.engineVersion},this.previewColors.theme.colors,this.previewColors.mod)},importTheme:function(){this.themeImporter.importData()},exportTheme:function(){this.themeExporter.exportData()},onImport:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.tempImportFile=e,this.loadTheme(e,"file",t)},onImportFailure:function(e){this.$store.dispatch("pushGlobalNotice",{messageKey:"settings.invalid_theme_imported",level:"error"})},importValidator:function(e){var t=e._pleroma_theme_version;return t>=1||t<=2},clearAll:function(){this.loadThemeFromLocalStorage()},clearV1:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("ColorLocal")||e.endsWith("OpacityLocal")})).filter((function(e){return!yi.includes(e)})).forEach((function(t){e.$data[t]=void 0}))},clearRoundness:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("RadiusLocal")})).forEach((function(t){e.$data[t]=void 0}))},clearOpacity:function(){var e=this;Object.keys(this.$data).filter((function(e){return e.endsWith("OpacityLocal")})).forEach((function(t){e.$data[t]=void 0}))},clearShadows:function(){this.shadowsLocal={}},clearFonts:function(){this.fontsLocal={}},normalizeLocalState:function(e){var t,n=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];void 0===a||!o&&a.themeEngineVersion!==Ts.we?t=e:(t=a,l=a.themeEngineVersion);var s=t.radii||t,r=t.opacity,i=t.shadows||{},u=t.fonts||{},c=t.themeEngineVersion?t.colors||t:(0,$s.dE)(t.colors||t);if(0===l&&(t.version&&(l=t.version),void 0===c.text&&void 0!==c.fg&&(l=1),void 0!==c.text&&void 0!==c.fg&&(l=2)),this.engineVersion=l,1===l&&(this.fgColorLocal=(0,ys.CO)(c.btn),this.textColorLocal=(0,ys.CO)(c.fg)),!this.keepColor){this.clearV1();var d=new Set(1!==l?Object.keys(Vs.em):[]);1!==l&&"l1"!==l||d.add("bg").add("link").add("cRed").add("cBlue").add("cGreen").add("cOrange"),d.forEach((function(e){var t=c[e],l=(0,ys.CO)(c[e]);n[e+"ColorLocal"]="#aN"===l?t:l}))}r&&!this.keepOpacity&&(this.clearOpacity(),Object.entries(r).forEach((function(e){var t=(0,Ut.Z)(e,2),l=t[0],a=t[1];null==a||Number.isNaN(a)||(n[l+"OpacityLocal"]=a)}))),this.keepRoundness||(this.clearRoundness(),Object.entries(s).forEach((function(e){var t=(0,Ut.Z)(e,2),l=t[0],a=t[1],o=l.endsWith("Radius")?l.split("Radius")[0]:l;n[o+"RadiusLocal"]=a}))),this.keepShadows||(this.clearShadows(),this.shadowsLocal=2===l?(0,$s.l9)(i,this.previewTheme.opacity):i,this.shadowSelected=this.shadowsAvailable[0]),this.keepFonts||(this.clearFonts(),this.fontsLocal=u)}},watch:{currentRadii:function(){try{this.previewRadii=(0,$s.lD)({radii:this.currentRadii}),this.radiiInvalid=!1}catch(e){this.radiiInvalid=!0,console.warn(e)}},shadowsLocal:{handler:function(){if(1!==Object.getOwnPropertyNames(this.previewColors).length)try{this.updatePreviewColorsAndShadows(),this.shadowsInvalid=!1}catch(e){this.shadowsInvalid=!0,console.warn(e)}},deep:!0},fontsLocal:{handler:function(){try{this.previewFonts=(0,$s.m)({fonts:this.fontsLocal}),this.fontsInvalid=!1}catch(e){this.fontsInvalid=!0,console.warn(e)}},deep:!0},currentColors:function(){try{this.updatePreviewColorsAndShadows(),this.colorsInvalid=!1,this.shadowsInvalid=!1}catch(e){this.colorsInvalid=!0,this.shadowsInvalid=!0,console.warn(e)}},currentOpacity:function(){try{this.updatePreviewColorsAndShadows()}catch(e){console.warn(e)}},selected:function(){var e=this;this.selectedTheme=Object.entries(this.availableStyles).find((function(t){var n=(0,Ut.Z)(t,2),l=(n[0],n[1]);return Array.isArray(l)?(console.log(l[0]===e.selected,e.selected),l[0]===e.selected):l.name===e.selected}))[1]},selectedTheme:function(){this.dismissWarning(),1===this.selectedVersion?(this.keepRoundness||this.clearRoundness(),this.keepShadows||this.clearShadows(),this.keepOpacity||this.clearOpacity(),this.keepColor||(this.clearV1(),this.bgColorLocal=this.selectedTheme[1],this.fgColorLocal=this.selectedTheme[2],this.textColorLocal=this.selectedTheme[3],this.linkColorLocal=this.selectedTheme[4],this.cRedColorLocal=this.selectedTheme[5],this.cGreenColorLocal=this.selectedTheme[6],this.cBlueColorLocal=this.selectedTheme[7],this.cOrangeColorLocal=this.selectedTheme[8])):this.selectedVersion>=2&&this.normalizeLocalState(this.selectedTheme.theme,2,this.selectedTheme.source)}}},Ci=(0,E.Z)($i,[["render",function(e,t,n,a,o,s){var r=(0,l.up)("Select"),i=(0,l.up)("Checkbox"),u=(0,l.up)("preview"),c=(0,l.up)("ColorInput"),d=(0,l.up)("OpacityInput"),p=(0,l.up)("ContrastRatio"),m=(0,l.up)("RangeInput"),h=(0,l.up)("ShadowControl"),g=(0,l.up)("i18n-t"),b=(0,l.up)("FontControl"),w=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.iD)("div",mo,[(0,l._)("div",fo,[(0,l._)("div",ho,[e.themeWarning?((0,l.wg)(),(0,l.iD)("div",go,[(0,l._)("div",bo,(0,f.zw)(e.themeWarningHelp),1),(0,l._)("div",wo,["snapshot_source_mismatch"===e.themeWarning.type?((0,l.wg)(),(0,l.iD)(l.HY,{key:0},[(0,l._)("button",{class:"btn button-default",onClick:t[0]||(t[0]=function(){return e.forceLoad&&e.forceLoad.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.use_source")),1),(0,l._)("button",{class:"btn button-default",onClick:t[1]||(t[1]=function(){return e.forceSnapshot&&e.forceSnapshot.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.use_snapshot")),1)],64)):e.themeWarning.noActionsPossible?((0,l.wg)(),(0,l.iD)("button",{key:1,class:"btn button-default",onClick:t[2]||(t[2]=function(){return e.dismissWarning&&e.dismissWarning.apply(e,arguments)})},(0,f.zw)(e.$t("general.dismiss")),1)):((0,l.wg)(),(0,l.iD)(l.HY,{key:2},[(0,l._)("button",{class:"btn button-default",onClick:t[3]||(t[3]=function(){return e.forceLoad&&e.forceLoad.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.load_theme")),1),(0,l._)("button",{class:"btn button-default",onClick:t[4]||(t[4]=function(){return e.dismissWarning&&e.dismissWarning.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.keep_as_is")),1)],64))])])):(0,l.kq)("",!0),(0,l._)("div",_o,[(0,l._)("div",ko,[(0,l.Uk)((0,f.zw)(e.$t("settings.presets"))+" ",1),(0,l._)("label",vo,[(0,l.Wm)(r,{id:"preset-switcher",modelValue:e.selected,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.selected=t}),class:"preset-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.availableStyles,(function(e){return(0,l.wg)(),(0,l.iD)("option",{key:e.name,value:e.name||e[0],style:(0,f.j5)({backgroundColor:e[1]||(e.theme||e.source).colors.bg,color:e[3]||(e.theme||e.source).colors.text})},(0,f.zw)(e[0]||e.name),13,yo)})),128))]})),_:1},8,["modelValue"])])]),(0,l._)("div",$o,[(0,l._)("button",{class:"btn button-default",onClick:t[6]||(t[6]=function(){return e.importTheme&&e.importTheme.apply(e,arguments)})},(0,f.zw)(e.$t("settings.import_theme")),1),(0,l._)("button",{class:"btn button-default",onClick:t[7]||(t[7]=function(){return e.exportTheme&&e.exportTheme.apply(e,arguments)})},(0,f.zw)(e.$t("settings.export_theme")),1)])])]),(0,l._)("div",Co,[(0,l._)("span",Vo,[(0,l.Wm)(i,{modelValue:e.keepColor,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.keepColor=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.style.switcher.keep_color")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",To,[(0,l.Wm)(i,{modelValue:e.keepShadows,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.keepShadows=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.style.switcher.keep_shadows")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",Uo,[(0,l.Wm)(i,{modelValue:e.keepOpacity,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.keepOpacity=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.style.switcher.keep_opacity")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",xo,[(0,l.Wm)(i,{modelValue:e.keepRoundness,"onUpdate:modelValue":t[11]||(t[11]=function(t){return e.keepRoundness=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.style.switcher.keep_roundness")),1)]})),_:1},8,["modelValue"])]),(0,l._)("span",Lo,[(0,l.Wm)(i,{modelValue:e.keepFonts,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.keepFonts=t})},{default:(0,l.w5)((function(){return[(0,l.Uk)((0,f.zw)(e.$t("settings.style.switcher.keep_fonts")),1)]})),_:1},8,["modelValue"])]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.style.switcher.save_load_hint")),1)])]),(0,l.Wm)(u,{style:(0,f.j5)(e.previewRules)},null,8,["style"]),((0,l.wg)(),(0,l.j4)(l.Ob,null,[(0,l.Wm)(w,{key:"style-tweak"},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.style.common_colors._tab_label"),class:"color-container"},[(0,l._)("div",Wo,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.theme_help")),1),(0,l._)("div",zo,[(0,l._)("button",{class:"btn button-default",onClick:t[13]||(t[13]=function(){return e.clearOpacity&&e.clearOpacity.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_opacity")),1),(0,l._)("button",{class:"btn button-default",onClick:t[14]||(t[14]=function(){return e.clearV1&&e.clearV1.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_all")),1)])]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.theme_help_v2_1")),1),(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.common_colors.main")),1),(0,l._)("div",So,[(0,l.Wm)(c,{modelValue:e.bgColorLocal,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.bgColorLocal=t}),name:"bgColor",label:e.$t("settings.background")},null,8,["modelValue","label"]),(0,l.Wm)(d,{modelValue:e.bgOpacityLocal,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.bgOpacityLocal=t}),name:"bgOpacity",fallback:e.previewTheme.opacity.bg},null,8,["modelValue","fallback"]),(0,l.Wm)(c,{modelValue:e.textColorLocal,"onUpdate:modelValue":t[17]||(t[17]=function(t){return e.textColorLocal=t}),name:"textColor",label:e.$t("settings.text")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.accentColorLocal,"onUpdate:modelValue":t[18]||(t[18]=function(t){return e.accentColorLocal=t}),name:"accentColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.accent"),"show-optional-tickbox":void 0!==e.linkColorLocal},null,8,["modelValue","fallback","label","show-optional-tickbox"]),(0,l.Wm)(c,{modelValue:e.linkColorLocal,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.linkColorLocal=t}),name:"linkColor",fallback:e.previewTheme.colors.accent,label:e.$t("settings.links"),"show-optional-tickbox":void 0!==e.accentColorLocal},null,8,["modelValue","fallback","label","show-optional-tickbox"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgLink},null,8,["contrast"])]),(0,l._)("div",Po,[(0,l.Wm)(c,{modelValue:e.fgColorLocal,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.fgColorLocal=t}),name:"fgColor",label:e.$t("settings.foreground")},null,8,["modelValue","label"]),(0,l.Wm)(c,{modelValue:e.fgTextColorLocal,"onUpdate:modelValue":t[21]||(t[21]=function(t){return e.fgTextColorLocal=t}),name:"fgTextColor",label:e.$t("settings.text"),fallback:e.previewTheme.colors.fgText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.fgLinkColorLocal,"onUpdate:modelValue":t[22]||(t[22]=function(t){return e.fgLinkColorLocal=t}),name:"fgLinkColor",label:e.$t("settings.links"),fallback:e.previewTheme.colors.fgLink},null,8,["modelValue","label","fallback"]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.style.common_colors.foreground_hint")),1)]),(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.common_colors.rgbo")),1),(0,l._)("div",Do,[(0,l.Wm)(c,{modelValue:e.cRedColorLocal,"onUpdate:modelValue":t[23]||(t[23]=function(t){return e.cRedColorLocal=t}),name:"cRedColor",label:e.$t("settings.cRed")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCRed},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.cBlueColorLocal,"onUpdate:modelValue":t[24]||(t[24]=function(t){return e.cBlueColorLocal=t}),name:"cBlueColor",label:e.$t("settings.cBlue")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCBlue},null,8,["contrast"])]),(0,l._)("div",Io,[(0,l.Wm)(c,{modelValue:e.cGreenColorLocal,"onUpdate:modelValue":t[25]||(t[25]=function(t){return e.cGreenColorLocal=t}),name:"cGreenColor",label:e.$t("settings.cGreen")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCGreen},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.cOrangeColorLocal,"onUpdate:modelValue":t[26]||(t[26]=function(t){return e.cOrangeColorLocal=t}),name:"cOrangeColor",label:e.$t("settings.cOrange")},null,8,["modelValue","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.bgCOrange},null,8,["contrast"])]),(0,l._)("p",null,(0,f.zw)(e.$t("settings.theme_help_v2_2")),1)],8,Oo),(0,l._)("div",{label:e.$t("settings.style.advanced_colors._tab_label"),class:"color-container"},[(0,l._)("div",Bo,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.theme_help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[27]||(t[27]=function(){return e.clearOpacity&&e.clearOpacity.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_opacity")),1),(0,l._)("button",{class:"btn button-default",onClick:t[28]||(t[28]=function(){return e.clearV1&&e.clearV1.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l._)("div",Ao,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.post")),1),(0,l.Wm)(c,{modelValue:e.postLinkColorLocal,"onUpdate:modelValue":t[29]||(t[29]=function(t){return e.postLinkColorLocal=t}),name:"postLinkColor",fallback:e.previewTheme.colors.accent,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.postLink},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.postGreentextColorLocal,"onUpdate:modelValue":t[30]||(t[30]=function(t){return e.postGreentextColorLocal=t}),name:"postGreentextColor",fallback:e.previewTheme.colors.cGreen,label:e.$t("settings.greentext")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.postGreentext},null,8,["contrast"]),(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.alert")),1),(0,l.Wm)(c,{modelValue:e.alertErrorColorLocal,"onUpdate:modelValue":t[31]||(t[31]=function(t){return e.alertErrorColorLocal=t}),name:"alertError",label:e.$t("settings.style.advanced_colors.alert_error"),fallback:e.previewTheme.colors.alertError},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertErrorTextColorLocal,"onUpdate:modelValue":t[32]||(t[32]=function(t){return e.alertErrorTextColorLocal=t}),name:"alertErrorText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertErrorText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertErrorText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.alertWarningColorLocal,"onUpdate:modelValue":t[33]||(t[33]=function(t){return e.alertWarningColorLocal=t}),name:"alertWarning",label:e.$t("settings.style.advanced_colors.alert_warning"),fallback:e.previewTheme.colors.alertWarning},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertWarningTextColorLocal,"onUpdate:modelValue":t[34]||(t[34]=function(t){return e.alertWarningTextColorLocal=t}),name:"alertWarningText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertWarningText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertWarningText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.alertNeutralColorLocal,"onUpdate:modelValue":t[35]||(t[35]=function(t){return e.alertNeutralColorLocal=t}),name:"alertNeutral",label:e.$t("settings.style.advanced_colors.alert_neutral"),fallback:e.previewTheme.colors.alertNeutral},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.alertNeutralTextColorLocal,"onUpdate:modelValue":t[36]||(t[36]=function(t){return e.alertNeutralTextColorLocal=t}),name:"alertNeutralText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.alertNeutralText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.alertNeutralText,large:""},null,8,["contrast"]),(0,l.Wm)(d,{modelValue:e.alertOpacityLocal,"onUpdate:modelValue":t[37]||(t[37]=function(t){return e.alertOpacityLocal=t}),name:"alertOpacity",fallback:e.previewTheme.opacity.alert},null,8,["modelValue","fallback"])]),(0,l._)("div",Eo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.badge")),1),(0,l.Wm)(c,{modelValue:e.badgeNotificationColorLocal,"onUpdate:modelValue":t[38]||(t[38]=function(t){return e.badgeNotificationColorLocal=t}),name:"badgeNotification",label:e.$t("settings.style.advanced_colors.badge_notification"),fallback:e.previewTheme.colors.badgeNotification},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.badgeNotificationTextColorLocal,"onUpdate:modelValue":t[39]||(t[39]=function(t){return e.badgeNotificationTextColorLocal=t}),name:"badgeNotificationText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.badgeNotificationText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.badgeNotificationText,large:""},null,8,["contrast"])]),(0,l._)("div",Fo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.panel_header")),1),(0,l.Wm)(c,{modelValue:e.panelColorLocal,"onUpdate:modelValue":t[40]||(t[40]=function(t){return e.panelColorLocal=t}),name:"panelColor",fallback:e.previewTheme.colors.panel,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.panelOpacityLocal,"onUpdate:modelValue":t[41]||(t[41]=function(t){return e.panelOpacityLocal=t}),name:"panelOpacity",fallback:e.previewTheme.opacity.panel,disabled:"transparent"===e.panelColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.panelTextColorLocal,"onUpdate:modelValue":t[42]||(t[42]=function(t){return e.panelTextColorLocal=t}),name:"panelTextColor",fallback:e.previewTheme.colors.panelText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.panelText,large:""},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.panelLinkColorLocal,"onUpdate:modelValue":t[43]||(t[43]=function(t){return e.panelLinkColorLocal=t}),name:"panelLinkColor",fallback:e.previewTheme.colors.panelLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.panelLink,large:""},null,8,["contrast"])]),(0,l._)("div",qo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.top_bar")),1),(0,l.Wm)(c,{modelValue:e.topBarColorLocal,"onUpdate:modelValue":t[44]||(t[44]=function(t){return e.topBarColorLocal=t}),name:"topBarColor",fallback:e.previewTheme.colors.topBar,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.topBarTextColorLocal,"onUpdate:modelValue":t[45]||(t[45]=function(t){return e.topBarTextColorLocal=t}),name:"topBarTextColor",fallback:e.previewTheme.colors.topBarText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.topBarText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.topBarLinkColorLocal,"onUpdate:modelValue":t[46]||(t[46]=function(t){return e.topBarLinkColorLocal=t}),name:"topBarLinkColor",fallback:e.previewTheme.colors.topBarLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.topBarLink},null,8,["contrast"])]),(0,l._)("div",Zo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.inputs")),1),(0,l.Wm)(c,{modelValue:e.inputColorLocal,"onUpdate:modelValue":t[47]||(t[47]=function(t){return e.inputColorLocal=t}),name:"inputColor",fallback:e.previewTheme.colors.input,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.inputOpacityLocal,"onUpdate:modelValue":t[48]||(t[48]=function(t){return e.inputOpacityLocal=t}),name:"inputOpacity",fallback:e.previewTheme.opacity.input,disabled:"transparent"===e.inputColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.inputTextColorLocal,"onUpdate:modelValue":t[49]||(t[49]=function(t){return e.inputTextColorLocal=t}),name:"inputTextColor",fallback:e.previewTheme.colors.inputText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.inputText},null,8,["contrast"])]),(0,l._)("div",Mo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.buttons")),1),(0,l.Wm)(c,{modelValue:e.btnColorLocal,"onUpdate:modelValue":t[50]||(t[50]=function(t){return e.btnColorLocal=t}),name:"btnColor",fallback:e.previewTheme.colors.btn,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.btnOpacityLocal,"onUpdate:modelValue":t[51]||(t[51]=function(t){return e.btnOpacityLocal=t}),name:"btnOpacity",fallback:e.previewTheme.opacity.btn,disabled:"transparent"===e.btnColorLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.btnTextColorLocal,"onUpdate:modelValue":t[52]||(t[52]=function(t){return e.btnTextColorLocal=t}),name:"btnTextColor",fallback:e.previewTheme.colors.btnText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPanelTextColorLocal,"onUpdate:modelValue":t[53]||(t[53]=function(t){return e.btnPanelTextColorLocal=t}),name:"btnPanelTextColor",fallback:e.previewTheme.colors.btnPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnTopBarTextColorLocal,"onUpdate:modelValue":t[54]||(t[54]=function(t){return e.btnTopBarTextColorLocal=t}),name:"btnTopBarTextColor",fallback:e.previewTheme.colors.btnTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnTopBarText},null,8,["contrast"]),(0,l._)("h5",null,(0,f.zw)(e.$t("settings.style.advanced_colors.pressed")),1),(0,l.Wm)(c,{modelValue:e.btnPressedColorLocal,"onUpdate:modelValue":t[55]||(t[55]=function(t){return e.btnPressedColorLocal=t}),name:"btnPressedColor",fallback:e.previewTheme.colors.btnPressed,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnPressedTextColorLocal,"onUpdate:modelValue":t[56]||(t[56]=function(t){return e.btnPressedTextColorLocal=t}),name:"btnPressedTextColor",fallback:e.previewTheme.colors.btnPressedText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPressedPanelTextColorLocal,"onUpdate:modelValue":t[57]||(t[57]=function(t){return e.btnPressedPanelTextColorLocal=t}),name:"btnPressedPanelTextColor",fallback:e.previewTheme.colors.btnPressedPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnPressedTopBarTextColorLocal,"onUpdate:modelValue":t[58]||(t[58]=function(t){return e.btnPressedTopBarTextColorLocal=t}),name:"btnPressedTopBarTextColor",fallback:e.previewTheme.colors.btnPressedTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnPressedTopBarText},null,8,["contrast"]),(0,l._)("h5",null,(0,f.zw)(e.$t("settings.style.advanced_colors.disabled")),1),(0,l.Wm)(c,{modelValue:e.btnDisabledColorLocal,"onUpdate:modelValue":t[59]||(t[59]=function(t){return e.btnDisabledColorLocal=t}),name:"btnDisabledColor",fallback:e.previewTheme.colors.btnDisabled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledTextColorLocal,"onUpdate:modelValue":t[60]||(t[60]=function(t){return e.btnDisabledTextColorLocal=t}),name:"btnDisabledTextColor",fallback:e.previewTheme.colors.btnDisabledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledPanelTextColorLocal,"onUpdate:modelValue":t[61]||(t[61]=function(t){return e.btnDisabledPanelTextColorLocal=t}),name:"btnDisabledPanelTextColor",fallback:e.previewTheme.colors.btnDisabledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnDisabledTopBarTextColorLocal,"onUpdate:modelValue":t[62]||(t[62]=function(t){return e.btnDisabledTopBarTextColorLocal=t}),name:"btnDisabledTopBarTextColor",fallback:e.previewTheme.colors.btnDisabledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,f.zw)(e.$t("settings.style.advanced_colors.toggled")),1),(0,l.Wm)(c,{modelValue:e.btnToggledColorLocal,"onUpdate:modelValue":t[63]||(t[63]=function(t){return e.btnToggledColorLocal=t}),name:"btnToggledColor",fallback:e.previewTheme.colors.btnToggled,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.btnToggledTextColorLocal,"onUpdate:modelValue":t[64]||(t[64]=function(t){return e.btnToggledTextColorLocal=t}),name:"btnToggledTextColor",fallback:e.previewTheme.colors.btnToggledText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnToggledPanelTextColorLocal,"onUpdate:modelValue":t[65]||(t[65]=function(t){return e.btnToggledPanelTextColorLocal=t}),name:"btnToggledPanelTextColor",fallback:e.previewTheme.colors.btnToggledPanelText,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledPanelText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.btnToggledTopBarTextColorLocal,"onUpdate:modelValue":t[66]||(t[66]=function(t){return e.btnToggledTopBarTextColorLocal=t}),name:"btnToggledTopBarTextColor",fallback:e.previewTheme.colors.btnToggledTopBarText,label:e.$t("settings.style.advanced_colors.top_bar")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.btnToggledTopBarText},null,8,["contrast"])]),(0,l._)("div",Ro,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.tabs")),1),(0,l.Wm)(c,{modelValue:e.tabColorLocal,"onUpdate:modelValue":t[67]||(t[67]=function(t){return e.tabColorLocal=t}),name:"tabColor",fallback:e.previewTheme.colors.tab,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.tabTextColorLocal,"onUpdate:modelValue":t[68]||(t[68]=function(t){return e.tabTextColorLocal=t}),name:"tabTextColor",fallback:e.previewTheme.colors.tabText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.tabText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.tabActiveTextColorLocal,"onUpdate:modelValue":t[69]||(t[69]=function(t){return e.tabActiveTextColorLocal=t}),name:"tabActiveTextColor",fallback:e.previewTheme.colors.tabActiveText,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(p,{contrast:e.previewContrast.tabActiveText},null,8,["contrast"])]),(0,l._)("div",No,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.borders")),1),(0,l.Wm)(c,{modelValue:e.borderColorLocal,"onUpdate:modelValue":t[70]||(t[70]=function(t){return e.borderColorLocal=t}),name:"borderColor",fallback:e.previewTheme.colors.border,label:e.$t("settings.style.common.color")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.borderOpacityLocal,"onUpdate:modelValue":t[71]||(t[71]=function(t){return e.borderOpacityLocal=t}),name:"borderOpacity",fallback:e.previewTheme.opacity.border,disabled:"transparent"===e.borderColorLocal},null,8,["modelValue","fallback","disabled"])]),(0,l._)("div",Ho,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.faint_text")),1),(0,l.Wm)(c,{modelValue:e.faintColorLocal,"onUpdate:modelValue":t[72]||(t[72]=function(t){return e.faintColorLocal=t}),name:"faintColor",fallback:e.previewTheme.colors.faint,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.faintLinkColorLocal,"onUpdate:modelValue":t[73]||(t[73]=function(t){return e.faintLinkColorLocal=t}),name:"faintLinkColor",fallback:e.previewTheme.colors.faintLink,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.panelFaintColorLocal,"onUpdate:modelValue":t[74]||(t[74]=function(t){return e.panelFaintColorLocal=t}),name:"panelFaintColor",fallback:e.previewTheme.colors.panelFaint,label:e.$t("settings.style.advanced_colors.panel_header")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(d,{modelValue:e.faintOpacityLocal,"onUpdate:modelValue":t[75]||(t[75]=function(t){return e.faintOpacityLocal=t}),name:"faintOpacity",fallback:e.previewTheme.opacity.faint},null,8,["modelValue","fallback"])]),(0,l._)("div",Yo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.underlay")),1),(0,l.Wm)(c,{modelValue:e.underlayColorLocal,"onUpdate:modelValue":t[76]||(t[76]=function(t){return e.underlayColorLocal=t}),name:"underlay",label:e.$t("settings.style.advanced_colors.underlay"),fallback:e.previewTheme.colors.underlay},null,8,["modelValue","label","fallback"]),(0,l.Wm)(d,{modelValue:e.underlayOpacityLocal,"onUpdate:modelValue":t[77]||(t[77]=function(t){return e.underlayOpacityLocal=t}),name:"underlayOpacity",fallback:e.previewTheme.opacity.underlay,disabled:"transparent"===e.underlayOpacityLocal},null,8,["modelValue","fallback","disabled"])]),(0,l._)("div",Ko,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.wallpaper")),1),(0,l.Wm)(c,{modelValue:e.wallpaperColorLocal,"onUpdate:modelValue":t[78]||(t[78]=function(t){return e.wallpaperColorLocal=t}),name:"wallpaper",label:e.$t("settings.style.advanced_colors.wallpaper"),fallback:e.previewTheme.colors.wallpaper},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Go,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.poll")),1),(0,l.Wm)(c,{modelValue:e.pollColorLocal,"onUpdate:modelValue":t[79]||(t[79]=function(t){return e.pollColorLocal=t}),name:"poll",label:e.$t("settings.background"),fallback:e.previewTheme.colors.poll},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.pollTextColorLocal,"onUpdate:modelValue":t[80]||(t[80]=function(t){return e.pollTextColorLocal=t}),name:"pollText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.pollText},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Jo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.icons")),1),(0,l.Wm)(c,{modelValue:e.iconColorLocal,"onUpdate:modelValue":t[81]||(t[81]=function(t){return e.iconColorLocal=t}),name:"icon",label:e.$t("settings.style.advanced_colors.icons"),fallback:e.previewTheme.colors.icon},null,8,["modelValue","label","fallback"])]),(0,l._)("div",Qo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.highlight")),1),(0,l.Wm)(c,{modelValue:e.highlightColorLocal,"onUpdate:modelValue":t[82]||(t[82]=function(t){return e.highlightColorLocal=t}),name:"highlight",label:e.$t("settings.background"),fallback:e.previewTheme.colors.highlight},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.highlightTextColorLocal,"onUpdate:modelValue":t[83]||(t[83]=function(t){return e.highlightTextColorLocal=t}),name:"highlightText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.highlightText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.highlightText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.highlightLinkColorLocal,"onUpdate:modelValue":t[84]||(t[84]=function(t){return e.highlightLinkColorLocal=t}),name:"highlightLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.highlightLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.highlightLink},null,8,["contrast"])]),(0,l._)("div",Xo,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.popover")),1),(0,l.Wm)(c,{modelValue:e.popoverColorLocal,"onUpdate:modelValue":t[85]||(t[85]=function(t){return e.popoverColorLocal=t}),name:"popover",label:e.$t("settings.background"),fallback:e.previewTheme.colors.popover},null,8,["modelValue","label","fallback"]),(0,l.Wm)(d,{modelValue:e.popoverOpacityLocal,"onUpdate:modelValue":t[86]||(t[86]=function(t){return e.popoverOpacityLocal=t}),name:"popoverOpacity",fallback:e.previewTheme.opacity.popover,disabled:"transparent"===e.popoverOpacityLocal},null,8,["modelValue","fallback","disabled"]),(0,l.Wm)(c,{modelValue:e.popoverTextColorLocal,"onUpdate:modelValue":t[87]||(t[87]=function(t){return e.popoverTextColorLocal=t}),name:"popoverText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.popoverText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.popoverText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.popoverLinkColorLocal,"onUpdate:modelValue":t[88]||(t[88]=function(t){return e.popoverLinkColorLocal=t}),name:"popoverLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.popoverLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.popoverLink},null,8,["contrast"])]),(0,l._)("div",es,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.selectedPost")),1),(0,l.Wm)(c,{modelValue:e.selectedPostColorLocal,"onUpdate:modelValue":t[89]||(t[89]=function(t){return e.selectedPostColorLocal=t}),name:"selectedPost",label:e.$t("settings.background"),fallback:e.previewTheme.colors.selectedPost},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selectedPostTextColorLocal,"onUpdate:modelValue":t[90]||(t[90]=function(t){return e.selectedPostTextColorLocal=t}),name:"selectedPostText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.selectedPostText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedPostText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.selectedPostLinkColorLocal,"onUpdate:modelValue":t[91]||(t[91]=function(t){return e.selectedPostLinkColorLocal=t}),name:"selectedPostLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.selectedPostLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedPostLink},null,8,["contrast"])]),(0,l._)("div",ts,[(0,l._)("h4",null,(0,f.zw)(e.$t("settings.style.advanced_colors.selectedMenu")),1),(0,l.Wm)(c,{modelValue:e.selectedMenuColorLocal,"onUpdate:modelValue":t[92]||(t[92]=function(t){return e.selectedMenuColorLocal=t}),name:"selectedMenu",label:e.$t("settings.background"),fallback:e.previewTheme.colors.selectedMenu},null,8,["modelValue","label","fallback"]),(0,l.Wm)(c,{modelValue:e.selectedMenuTextColorLocal,"onUpdate:modelValue":t[93]||(t[93]=function(t){return e.selectedMenuTextColorLocal=t}),name:"selectedMenuText",label:e.$t("settings.text"),fallback:e.previewTheme.colors.selectedMenuText},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedMenuText},null,8,["contrast"]),(0,l.Wm)(c,{modelValue:e.selectedMenuLinkColorLocal,"onUpdate:modelValue":t[94]||(t[94]=function(t){return e.selectedMenuLinkColorLocal=t}),name:"selectedMenuLink",label:e.$t("settings.links"),fallback:e.previewTheme.colors.selectedMenuLink},null,8,["modelValue","label","fallback"]),(0,l.Wm)(p,{contrast:e.previewContrast.selectedMenuLink},null,8,["contrast"])]),(0,l._)("div",ns,[(0,l._)("h4",null,(0,f.zw)(e.$t("chats.chats")),1),(0,l.Wm)(c,{modelValue:e.chatBgColorLocal,"onUpdate:modelValue":t[95]||(t[95]=function(t){return e.chatBgColorLocal=t}),name:"chatBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,f.zw)(e.$t("settings.style.advanced_colors.chat.incoming")),1),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingBgColorLocal,"onUpdate:modelValue":t[96]||(t[96]=function(t){return e.chatMessageIncomingBgColorLocal=t}),name:"chatMessageIncomingBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingTextColorLocal,"onUpdate:modelValue":t[97]||(t[97]=function(t){return e.chatMessageIncomingTextColorLocal=t}),name:"chatMessageIncomingTextColor",fallback:e.previewTheme.colors.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingLinkColorLocal,"onUpdate:modelValue":t[98]||(t[98]=function(t){return e.chatMessageIncomingLinkColorLocal=t}),name:"chatMessageIncomingLinkColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageIncomingBorderColorLocal,"onUpdate:modelValue":t[99]||(t[99]=function(t){return e.chatMessageIncomingBorderColorLocal=t}),name:"chatMessageIncomingBorderLinkColor",fallback:e.previewTheme.colors.fg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"]),(0,l._)("h5",null,(0,f.zw)(e.$t("settings.style.advanced_colors.chat.outgoing")),1),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingBgColorLocal,"onUpdate:modelValue":t[100]||(t[100]=function(t){return e.chatMessageOutgoingBgColorLocal=t}),name:"chatMessageOutgoingBgColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.background")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingTextColorLocal,"onUpdate:modelValue":t[101]||(t[101]=function(t){return e.chatMessageOutgoingTextColorLocal=t}),name:"chatMessageOutgoingTextColor",fallback:e.previewTheme.colors.text,label:e.$t("settings.text")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingLinkColorLocal,"onUpdate:modelValue":t[102]||(t[102]=function(t){return e.chatMessageOutgoingLinkColorLocal=t}),name:"chatMessageOutgoingLinkColor",fallback:e.previewTheme.colors.link,label:e.$t("settings.links")},null,8,["modelValue","fallback","label"]),(0,l.Wm)(c,{modelValue:e.chatMessageOutgoingBorderColorLocal,"onUpdate:modelValue":t[103]||(t[103]=function(t){return e.chatMessageOutgoingBorderColorLocal=t}),name:"chatMessageOutgoingBorderLinkColor",fallback:e.previewTheme.colors.bg,label:e.$t("settings.style.advanced_colors.chat.border")},null,8,["modelValue","fallback","label"])])],8,jo),(0,l._)("div",{label:e.$t("settings.style.radii._tab_label"),class:"radius-container"},[(0,l._)("div",as,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.radii_help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[104]||(t[104]=function(){return e.clearRoundness&&e.clearRoundness.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(m,{modelValue:e.btnRadiusLocal,"onUpdate:modelValue":t[105]||(t[105]=function(t){return e.btnRadiusLocal=t}),name:"btnRadius",label:e.$t("settings.btnRadius"),fallback:e.previewTheme.radii.btn,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.inputRadiusLocal,"onUpdate:modelValue":t[106]||(t[106]=function(t){return e.inputRadiusLocal=t}),name:"inputRadius",label:e.$t("settings.inputRadius"),fallback:e.previewTheme.radii.input,max:"9","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.checkboxRadiusLocal,"onUpdate:modelValue":t[107]||(t[107]=function(t){return e.checkboxRadiusLocal=t}),name:"checkboxRadius",label:e.$t("settings.checkboxRadius"),fallback:e.previewTheme.radii.checkbox,max:"16","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.panelRadiusLocal,"onUpdate:modelValue":t[108]||(t[108]=function(t){return e.panelRadiusLocal=t}),name:"panelRadius",label:e.$t("settings.panelRadius"),fallback:e.previewTheme.radii.panel,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.avatarRadiusLocal,"onUpdate:modelValue":t[109]||(t[109]=function(t){return e.avatarRadiusLocal=t}),name:"avatarRadius",label:e.$t("settings.avatarRadius"),fallback:e.previewTheme.radii.avatar,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.avatarAltRadiusLocal,"onUpdate:modelValue":t[110]||(t[110]=function(t){return e.avatarAltRadiusLocal=t}),name:"avatarAltRadius",label:e.$t("settings.avatarAltRadius"),fallback:e.previewTheme.radii.avatarAlt,max:"28","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.attachmentRadiusLocal,"onUpdate:modelValue":t[111]||(t[111]=function(t){return e.attachmentRadiusLocal=t}),name:"attachmentRadius",label:e.$t("settings.attachmentRadius"),fallback:e.previewTheme.radii.attachment,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.tooltipRadiusLocal,"onUpdate:modelValue":t[112]||(t[112]=function(t){return e.tooltipRadiusLocal=t}),name:"tooltipRadius",label:e.$t("settings.tooltipRadius"),fallback:e.previewTheme.radii.tooltip,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(m,{modelValue:e.chatMessageRadiusLocal,"onUpdate:modelValue":t[113]||(t[113]=function(t){return e.chatMessageRadiusLocal=t}),name:"chatMessageRadius",label:e.$t("settings.chatMessageRadius"),fallback:e.previewTheme.radii.chatMessage||2,max:"50","hard-min":"0"},null,8,["modelValue","label","fallback"])],8,ls),(0,l._)("div",{label:e.$t("settings.style.shadows._tab_label"),class:"shadow-container"},[(0,l._)("div",ss,[(0,l._)("div",rs,[(0,l.Uk)((0,f.zw)(e.$t("settings.style.shadows.component"))+" "+(0,f.zw)(" ")+" ",1),(0,l.Wm)(r,{id:"shadow-switcher",modelValue:e.shadowSelected,"onUpdate:modelValue":t[114]||(t[114]=function(t){return e.shadowSelected=t}),class:"shadow-switcher"},{default:(0,l.w5)((function(){return[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.shadowsAvailable,(function(t){return(0,l.wg)(),(0,l.iD)("option",{key:t,value:t},(0,f.zw)(e.$t("settings.style.shadows.components."+t)),9,is)})),128))]})),_:1},8,["modelValue"])]),(0,l._)("div",us,[(0,l._)("label",cs,(0,f.zw)(e.$t("settings.style.shadows.override")),1),(0,l.Uk)(" "+(0,f.zw)(" ")+" "),(0,l.wy)((0,l._)("input",{id:"override","onUpdate:modelValue":t[115]||(t[115]=function(t){return e.currentShadowOverriden=t}),name:"override",class:"input-override",type:"checkbox"},null,512),[[me.e8,e.currentShadowOverriden]]),ds]),(0,l._)("button",{class:"btn button-default",onClick:t[116]||(t[116]=function(){return e.clearShadows&&e.clearShadows.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(h,{modelValue:e.currentShadow,"onUpdate:modelValue":t[117]||(t[117]=function(t){return e.currentShadow=t}),ready:!!e.currentShadowFallback,fallback:e.currentShadowFallback},null,8,["modelValue","ready","fallback"]),"avatar"===e.shadowSelected||"avatarStatus"===e.shadowSelected?((0,l.wg)(),(0,l.iD)("div",ps,[(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.always_drop_shadow",tag:"p"},{default:(0,l.w5)((function(){return[ms]})),_:1}),(0,l._)("p",null,(0,f.zw)(e.$t("settings.style.shadows.filter_hint.avatar_inset")),1),(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.drop_shadow_syntax",tag:"p"},{default:(0,l.w5)((function(){return[fs,hs,gs]})),_:1}),(0,l.Wm)(g,{scope:"global",keypath:"settings.style.shadows.filter_hint.inset_classic",tag:"p"},{default:(0,l.w5)((function(){return[bs]})),_:1}),(0,l._)("p",null,(0,f.zw)(e.$t("settings.style.shadows.filter_hint.spread_zero")),1)])):(0,l.kq)("",!0)],8,os),(0,l._)("div",{label:e.$t("settings.style.fonts._tab_label"),class:"fonts-container"},[(0,l._)("div",_s,[(0,l._)("p",null,(0,f.zw)(e.$t("settings.style.fonts.help")),1),(0,l._)("button",{class:"btn button-default",onClick:t[118]||(t[118]=function(){return e.clearFonts&&e.clearFonts.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.clear_all")),1)]),(0,l.Wm)(b,{modelValue:e.fontsLocal.interface,"onUpdate:modelValue":t[119]||(t[119]=function(t){return e.fontsLocal.interface=t}),name:"ui",label:e.$t("settings.style.fonts.components.interface"),fallback:e.previewTheme.fonts.interface,"no-inherit":"1"},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.input,"onUpdate:modelValue":t[120]||(t[120]=function(t){return e.fontsLocal.input=t}),name:"input",label:e.$t("settings.style.fonts.components.input"),fallback:e.previewTheme.fonts.input},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.post,"onUpdate:modelValue":t[121]||(t[121]=function(t){return e.fontsLocal.post=t}),name:"post",label:e.$t("settings.style.fonts.components.post"),fallback:e.previewTheme.fonts.post},null,8,["modelValue","label","fallback"]),(0,l.Wm)(b,{modelValue:e.fontsLocal.postCode,"onUpdate:modelValue":t[122]||(t[122]=function(t){return e.fontsLocal.postCode=t}),name:"postCode",label:e.$t("settings.style.fonts.components.postCode"),fallback:e.previewTheme.fonts.postCode},null,8,["modelValue","label","fallback"])],8,ws)]})),_:1})],1024)),e.isActive?((0,l.wg)(),(0,l.j4)(l.lR,{key:0,to:"#unscrolled-content"},[(0,l._)("div",ks,[(0,l._)("button",{class:"btn button-default submit",disabled:!e.themeValid,onClick:t[123]||(t[123]=function(){return e.setCustomTheme&&e.setCustomTheme.apply(e,arguments)})},(0,f.zw)(e.$t("general.apply")),9,vs),(0,l._)("button",{class:"btn button-default",onClick:t[124]||(t[124]=function(){return e.clearAll&&e.clearAll.apply(e,arguments)})},(0,f.zw)(e.$t("settings.style.switcher.reset")),1)])])):(0,l.kq)("",!0)])}]]);j.vI.add(B.klh,B.ILF,B.G_j,B.XsY,B.qmU,B.q7m,B.Aq,B.YHc);const Vi={components:{TabSwitcher:m.Z,DataImportExportTab:G,MutesAndBlocksTab:et,NotificationsTab:Dt,FilteringTab:sn,SecurityTab:yl,ProfileTab:ya,GeneralTab:no,VersionTab:po,ThemeTab:Ci},computed:{isLoggedIn:function(){return!!this.$store.state.users.currentUser},open:function(){return"hidden"!==this.$store.state.interface.settingsModalState},bodyLock:function(){return"visible"===this.$store.state.interface.settingsModalState}},methods:{onOpen:function(){var e=this.$store.state.interface.settingsModalTargetTab;if(e){var t=this.$refs.tabSwitcher.$slots.default().findIndex((function(t){return t.props&&t.props["data-tab-name"]===e}));t>=0&&this.$refs.tabSwitcher.setTab(t)}this.$store.dispatch("clearSettingsModalTargetTab")}},mounted:function(){this.onOpen()},watch:{open:function(e){e&&this.onOpen()}}},Ti=(0,E.Z)(Vi,[["render",function(e,t,n,m,f,h){var g=(0,l.up)("GeneralTab"),b=(0,l.up)("ProfileTab"),w=(0,l.up)("SecurityTab"),_=(0,l.up)("FilteringTab"),k=(0,l.up)("ThemeTab"),v=(0,l.up)("NotificationsTab"),y=(0,l.up)("DataImportExportTab"),$=(0,l.up)("MutesAndBlocksTab"),C=(0,l.up)("VersionTab"),V=(0,l.up)("tab-switcher");return(0,l.wg)(),(0,l.j4)(V,{ref:"tabSwitcher",class:"settings_tab-switcher","side-tab-bar":!0,"scrollable-tabs":!0,"body-scroll-lock":e.bodyLock},{default:(0,l.w5)((function(){return[(0,l._)("div",{label:e.$t("settings.general"),icon:"wrench","data-tab-name":"general"},[(0,l.Wm)(g)],8,a),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:0,label:e.$t("settings.profile_tab"),icon:"user","data-tab-name":"profile"},[(0,l.Wm)(b)],8,o)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:1,label:e.$t("settings.security_tab"),icon:"lock","data-tab-name":"security"},[(0,l.Wm)(w)],8,s)):(0,l.kq)("",!0),(0,l._)("div",{label:e.$t("settings.filtering"),icon:"filter","data-tab-name":"filtering"},[(0,l.Wm)(_)],8,r),(0,l._)("div",{label:e.$t("settings.theme"),icon:"paint-brush","data-tab-name":"theme"},[(0,l.Wm)(k)],8,i),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:2,label:e.$t("settings.notifications"),icon:"bell","data-tab-name":"notifications"},[(0,l.Wm)(v)],8,u)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:3,label:e.$t("settings.data_import_export_tab"),icon:"download","data-tab-name":"dataImportExport"},[(0,l.Wm)(y)],8,c)):(0,l.kq)("",!0),e.isLoggedIn?((0,l.wg)(),(0,l.iD)("div",{key:4,label:e.$t("settings.mutes_and_blocks"),fullHeight:!0,icon:"eye-slash","data-tab-name":"mutesAndBlocks"},[(0,l.Wm)($)],8,d)):(0,l.kq)("",!0),(0,l._)("div",{label:e.$t("settings.version.title"),icon:"info","data-tab-name":"version"},[(0,l.Wm)(C)],8,p)]})),_:1},8,["body-scroll-lock"])}]])}}]);
2 //# sourceMappingURL=9114.e761a1c6846fea99aaf1.js.map