(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[2416],{32612:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>c});vars=i(17652),a=(i(70461),i(29655)),o=(i(67964),i(15235)),n=i(19755);functionl(t){returnfunction(t){if(Array.isArray(t))returnr(t)}(t)||function(t){if("undefined"!=typeofSymbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])returnArray.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeoft)returnr(t,e);vari=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)returnArray.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))returnr(t,e)}(t)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionr(t,e){(null==e||e>t.length)&&(e=t.length);for(vari=0,s=newArray(e);i<e;i++)s[i]=t[i];returns}constc={components:{VueCropper:s.default,Autocomplete:a.default,VueTribute:o.default},data:function(){return{config:window.App.config,pageLoading:!1,profile:window._sharedData.curUser,composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,mode:"photo",modes:["photo","video","plain"],page:1,composeState:"publish",visibility:"public",visibilityTag:"Public",place:!1,commentsDisabled:!1,optimizeMedia:!0,mediaCropped:!1,pageTitle:"",cropper:{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0},namedPages:["filteringMedia","cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp","textOptions","licensePicker"],cameraRollMedia:[],taggedUsernames:[],taggedPeopleSearch:null,textMode:!1,tributeSettings:{noMatchTemplate:function(){returnnull},collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){}))}}]},availableLicenses:[{id:1,name:"All Rights Reserved",title:""},{id:5,name:"Public Domain Work",title:""},{id:6,name:"Public Domain Dedication (CC0)",title:"CC0"},{id:11,name:"Attribution",title:"CC BY"},{id:12,name:"Attribution-ShareAlike",title:"CC BY-SA"},{id:13,name:"Attribution-NonCommercial",title:"CC BY-NC"},{id:14,name:"Attribution-NonCommercial-ShareAlike",title:"CC BY-NC-SA"},{id:15,name:"Attribution-NoDerivs",title:"CC BY-ND"},{id:16,name:"Attribution-NonCommercial-NoDerivs",title:"CC BY-NC-ND"}],licenseIndex:0,video:{title:"",description:""},composeSettings:{default_license:null,media_descriptions:!1},licenseId:1,licenseTitle:null,maxAltTextLength:140,pollOptionModel:null,pollOptions:[],pollExpiry:1440,postingPoll:!1,collections:[],collectionsSelected:[],collectionsLoaded:!1,collectionsPage:1,collectionsCanLoadMore:!1,spoilerText:void0,isFilteringMedia:!1,filteringMediaTimeout:void0,filteringRemainingCount:0,isPosting:!1}},computed:{spoilerTextLength:function(){returnthis.spoilerText?this.spoilerText.length:0}},beforeMount:function(){vart=this;this.filters=window.App.util.filters.sort(),axios.get("/api/compose/v0/settings").then((function(e){t.composeSettings=e.data,t.licenseId=t.composeSettings.default_license,t.maxAltTextLength=e.data.max_altext_length,t.licenseId>10&&(t.licenseTitle=t.availableLicenses.filter((function(e){returne.id==t.licenseId})).map((function(t){returnt.title}))[0]),t.fetchProfile()}))},mounted:function(){this.mediaWatcher()},methods:{timeAgo:function(t){returnApp.util.format.timeAgo(t)},fetchProfile:function(){vart=this,e={public:"Public",private:"Followers Only",unlisted:"Unlisted"};if(window._sharedData.curUser.id){if(this.profile=window._sharedData.curUser,this.composeSettings&&this.composeSettings.hasOwnProperty("default_scope")&&this.composeSettings.default_