"+(1==n?"matches":"match")+" the search '"+e+"'. Click Confirm to add "+(1==n?"it":"them")+" to the takedown.";$("#takedown-add-posts-tags-warning").html(a).show(),$("#takedown-add-posts-tags").prop("disabled",!0),$("#takedown-add-posts-tags-preview").hide(),$("#takedown-add-posts-tags-confirm").show(),$("#takedown-add-posts-tags-cancel").show()})).fail((function(t){a.default.error(t.responseText)}))},add_posts_by_tags_cancel:function(){$("#takedown-add-posts-tags-warning").hide(),$("#takedown-add-posts-tags").val("").prop("disabled",!1),$("#takedown-add-posts-tags-preview").show().prop("disabled",!0),$("#takedown-add-posts-tags-confirm").hide(),$("#takedown-add-posts-tags-cancel").hide()},add_posts_by_tags:function(t){event.preventDefault();var e=$("#takedown-add-posts-tags").val();a.default.notice("Adding posts with tags '"+e+"' to takedown..."),$.ajax({url:"/takedowns/".concat(t,"/add_by_tags.json"),type:"POST",dataType:"json",headers:{accept:"text/javascript"},data:{id:t,post_tags:e}}).done((function(t){var n=t.added_post_ids,i=n.length;a.default.notice(i+" post"+(1==i?"":"s")+" with tags '"+e+"' added to takedown");for(var r=0;r
',1),v={class:"col2"},m={class:"flex-grid border-bottom"},_=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label",for:"post_sex_tags"},"Characters"),(0,a.Uk)(),(0,a._)("div",null,"\n Select (and write in) all that apply. Character sex is based only on what is visible in the\n image.\n "),(0,a.Uk)(),(0,a._)("div",null,[(0,a._)("a",{href:"/wiki_pages/tag_what_you_see"},"\n Outside information or other images should not be used when deciding what tags are used.\n ")])],-1),b={class:"col2"},w={class:"flex-wrap"},y=(0,a._)("hr",null,null,-1),k={class:"flex-wrap"},x=(0,a._)("hr",null,null,-1),j={class:"flex-wrap"},T={class:"flex-grid border-bottom"},S=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Body Types and Species"),(0,a.Uk)(),(0,a._)("div",null,"One listed body type per visible character, listed options are mutually exclusive.")],-1),D={class:"col2"},U={class:"flex-wrap"},z={class:"flex-grid border-bottom"},C=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Contentious Content"),(0,a.Uk)(),(0,a._)("div",null,"\n Fetishes or subjects that other users may find extreme or objectionable.\n These allow users to find or blacklist content with ease. Make sure that you are tagging\n these upon initial upload.\n ")],-1),E={class:"col2"},A={class:"flex-grid border-bottom"},P=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Rating"),(0,a.Uk)(),(0,a._)("div",null,[(0,a.Uk)("Explicit tags include sex, pussy, penis, masturbation, fellatio, etc.\n ("),(0,a._)("a",{href:"/help/ratings",target:"_blank"},"help"),(0,a.Uk)(")\n ")])],-1),O={class:"col2"},M={key:0,class:"box-section sect_red"},R={class:"flex-grid come-together-now"},I=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label",for:"post_tags"},"Other Tags"),(0,a.Uk)(),(0,a._)("div",null,[(0,a.Uk)("\n Separate tags with spaces. ("),(0,a._)("a",{href:"/help/tags",target:"_blank"},"help"),(0,a.Uk)(")\n ")]),(0,a.Uk)(),(0,a._)("div",null,[(0,a._)("a",{href:"/wiki_pages/tag_what_you_see"},"\n Outside information or other images should not be used when deciding what tags are used.\n ")])],-1),L={class:"col2"},F={class:"box-section sect_red"},q={class:"related-tag-functions"},V={class:"flex-grid border-bottom over-me"},B={class:"flex-grid border-bottom"},N=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Parent Post ID")],-1),W={class:"col2"},Y={key:1,class:"flex-grid border-bottom"},G=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Locked Tags")],-1),H={class:"col2"},X={key:2,class:"flex-grid border-bottom"},J=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Lock Rating")],-1),Z={class:"col2"},Q={class:"flex-grid border-bottom"},K=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label",for:"post_description"},"Description")],-1),tt={class:"col2"},et={class:"dtext-formatter","data-editing":"true","data-initialized":"false"},nt=(0,a._)("div",{class:"dtext-formatter-tabs"},[(0,a._)("a",{"data-action":"edit",role:"tab"},"Write"),(0,a.Uk)(),(0,a._)("a",{"data-action":"show",role:"tab"},"Preview")],-1),at=(0,a._)("div",{class:"dtext-formatter-buttons",role:"toolbar"},[(0,a._)("a",{title:"Bold","data-content":"[b]%selection%[/b]"},[(0,a._)("i",{class:"fa-solid fa-bold"})]),(0,a.Uk)(),(0,a._)("a",{title:"Italics","data-content":"[i]%selection%[/i]"},[(0,a._)("i",{class:"fa-solid fa-italic"})]),(0,a.Uk)(),(0,a._)("a",{title:"Strikethrough","data-content":"[s]%selection%[/s]"},[(0,a._)("i",{class:"fa-solid fa-strikethrough"})]),(0,a.Uk)(),(0,a._)("a",{title:"Underline","data-content":"[u]%selection%[/u]"},[(0,a._)("i",{class:"fa-solid fa-underline"})]),(0,a.Uk)(),(0,a._)("span",{class:"spacer"}),(0,a.Uk)(),(0,a._)("a",{title:"Header","data-content":"h2.%selection%"},[(0,a._)("i",{class:"fa-solid fa-heading"})]),(0,a.Uk)(),(0,a._)("a",{title:"Spoiler","data-content":"[spoiler]%selection%[/spoiler]"},[(0,a._)("i",{class:"fa-solid fa-eye-slash"})]),(0,a.Uk)(),(0,a._)("a",{title:"Code","data-content":"[code]%selection%[/code]"},[(0,a._)("i",{class:"fa-solid fa-code"})]),(0,a.Uk)(),(0,a._)("a",{title:"Quote","data-content":"[quote]%selection%[/quote]"},[(0,a._)("i",{class:"fa-solid fa-quote-right"})])],-1),ot=(0,a._)("div",{class:"dtext-formatter-preview dtext-container"},null,-1),it=(0,a._)("div",{class:"dtext-formatter-charcount","data-limit":"50000","data-count":"0"},null,-1),rt=(0,a._)("span",{class:"hint"},[(0,a.Uk)("All text is formatted using "),(0,a._)("a",{href:"/help/dtext",target:"_blank",rel:"noopener",tabindex:"-1"},"DText")],-1),st={key:3,class:"flex-grid border-bottom"},ct=(0,a._)("div",{class:"col"},[(0,a._)("label",{class:"section-label"},"Upload as Pending"),(0,a.Uk)(),(0,a._)("div",null,"If you aren't sure if this particular post is up to the standards, checking this box will put it into the moderation queue.")],-1),lt={class:"col2"},dt={class:"flex-grid"},ut=(0,a._)("div",{class:"col"},null,-1),pt={class:"col2"},ft={class:"box-section sect_red"},gt={class:"box-section sect_green"},ht={class:"box-section sect_red"},vt=["href"],mt=["disabled"],_t={id:"preview-sidebar",class:"col box-section",style:{"margin-left":"10px",padding:"10px"}};var bt=n(351);var wt={props:["check","checks"],computed:{value:{get:function(){return void 0!==this.checks[this.tagName]&&this.checks[this.tagName]},set:function(t){this.$emit("set",this.tagName,t)}},tagName:function(){return this.check.tag||this.check.name.toLowerCase().replace(/ /g,"_")}}},yt=n(5007);var kt=(0,yt.Z)(wt,[["render",function(t,e,n,o,r,s){return(0,a.wg)(),(0,a.iD)("button",{class:(0,i.C_)(["toggle-button",{active:s.value}]),onClick:e[0]||(e[0]=function(t){return s.value=!s.value})},(0,i.zw)(n.check.name),3)}]]),$t=n(8155),xt=n(3877),jt=n(5344),Tt=n(110);function St(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Dt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var a=0,o=function(){};return{s:o,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,r=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return r=t.done,t},e:function(t){s=!0,i=t},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw i}}}}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);ne.name?1:-1}function Pt(){if(!this.allowNavigate&&""!==this.uploadValue)return!0}var Ot={components:{sources:bt.Z,"image-checkbox":kt,"related-tags":$t.Z,"tag-preview":xt.Z,"file-preview":jt.Z,"file-input":Tt.Z},data:function(){var t={},e=function(e){"undefined"===typeof e.tag?t[e.name.toLowerCase().replace(" ","_")]=!0:t[e.tag]=!0};return Ut.forEach(e),zt.forEach(e),Ct.forEach(e),Et.forEach(e),{safe:window.uploaderSettings.safeSite,showErrors:!1,allowNavigate:!1,submitting:!1,previewData:{url:"",isVideo:!1},uploadValue:"",invalidUploadValue:!1,sourceWarning:!1,sources:[""],normalMode:!window.uploaderSettings.compactMode,checkboxes:{sex:Ut,pairing:zt,count:Ct,body:Et,selected:{},all:t},tagEntries:{character:"",sex:"",bodyType:"",theme:"",other:""},tagPreview:{loading:!1,show:!1,tags:[]},allowLockedTags:window.uploaderSettings.allowLockedTags,lockedTags:"",allowRatingLock:window.uploaderSettings.allowRatingLock,ratingLocked:!1,allowUploadAsPending:window.uploaderSettings.allowUploadAsPending,uploadAsPending:!1,relatedTags:[],lastRelatedCategoryId:void 0,loadingRelated:!1,parentID:"",description:"",rating:"",error:"",duplicateId:0}},mounted:function(){var t=this;window.onbeforeunload=Pt.bind(t);var e=new URLSearchParams(window.location.search),n=function(n,a){e.has(a)&&(t[n]=e.get(a))},a=function(n,a){e.has(a)&&(t[n]="true"===e.get(a))};n("parentID","parent"),n("description","description"),function(){if(e.has("tags")){var n,a=St(e.get("tags").split(" "));try{for(a.s();!(n=a.n()).done;){var o=n.value.trim();o&&t.pushTag(o,!0)}}catch(i){a.e(i)}finally{a.f()}}}(),e.has("sources")&&(t.sources=e.get("sources").split(",")),this.allowRatingLock&&a("ratingLocked","rating_locked"),this.allowLockedTags&&n("lockedTags","locked_tags"),this.allowUploadAsPending&&a("uploadAsPending","upload_as_pending")},methods:{setCheck:function(t,e){this.checkboxes.selected[t]=e},submit:function(){if(this.showErrors=!0,this.error="",!this.preventUpload&&!this.submitting){var t=this;this.submitting=!0;var e=new FormData;"string"===typeof this.uploadValue?e.append("upload[direct_url]",this.uploadValue):e.append("upload[file]",this.uploadValue),e.append("upload[tag_string]",this.tags),e.append("upload[rating]",this.rating),e.append("upload[source]",this.sources.join("\n")),e.append("upload[description]",this.description),e.append("upload[parent_id]",this.parentID),this.allowLockedTags&&e.append("upload[locked_tags]",this.lockedTags),this.allowRatingLock&&e.append("upload[locked_rating]",this.ratingLocked),this.allowUploadAsPending&&e.append("upload[as_pending]",this.uploadAsPending),jQuery.ajax("/uploads.json",{contentType:!1,processData:!1,method:"POST",type:"POST",data:e,success:function(e){t.submitting=!1,t.allowNavigate=!0,Danbooru.notice("Post uploaded successfully."),location.assign(e.location)},error:function(e){t.submitting=!1;var n=e.responseJSON;try{n&&"duplicate"===n.reason&&(t.duplicateId=n.post_id),n&&-1!==["duplicate","invalid"].indexOf(n.reason)?t.error=n.message:n&&n.message?t.error="Error: "+n.message:t.error="Error: "+n.reason}catch(a){t.error="Error: Unknown error! "+JSON.stringify(n)}}})}},pushTag:function(t,e){if(this.tagPreview.show=!1,"undefined"!==typeof this.checkboxes.all[t]&&this.normalMode)this.setCheck(t,e);else{var n=this.tagEntries.other?this.tagEntries.other.trim().split(" "):[],a=n.indexOf(t);if(e)-1===a&&n.push(t);else{if(-1===a)return;n.splice(a,1)}this.tagEntries.other=n.join(" ")+" "}},previewFinalTags:function(){if(!this.tagPreview.loading)if(this.tagPreview.show)this.tagPreview.show=!1;else{this.tagPreview.loading=!0,this.tagPreview.show=!0,this.tagPreview.tags=[];var t=this,e={tags:this.tags};jQuery.ajax("/tags/preview.json",{method:"POST",type:"POST",data:e,success:function(e){t.tagPreview.loading=!1,t.tagPreview.tags=e},error:function(e){t.tagPreview.loading=!1,t.tagPreview.tags=[],t.tagPreview.show=!1,Danbooru.error("Error loading tag preview "+e)}})}},findRelated:function(t){var e=this;if(!e.loadingRelated)if(e.relatedTags.length>0&&e.lastRelatedCategoryId===t)e.relatedTags=[];else{this.loadingRelated=!0,this.relatedTags=[];var n=function(){var t=e.$refs.otherTags;if(!t.hasOwnProperty("selectionStart"))return null;var n=t.selectionEnd-t.selectionStart;return n?t.value.substr(t.selectionStart,n):null}(),a=n?{query:n}:{query:this.tags};t&&(a.category_id=t),$.getJSON("/related_tag/bulk.json",a,(function(n){e.relatedTags=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&t[n].length&&e.push({title:"Related: "+n,tags:t[n].sort(At)});return e}(n),e.lastRelatedCategoryId=t})).always((function(){e.loadingRelated=!1}))}}},computed:{tags:function(){var t=this;return this.normalMode?Object.keys(this.checkboxes.selected).filter((function(e){return!0===t.checkboxes.selected[e]})).concat([this.tagEntries.other,this.tagEntries.sex,this.tagEntries.bodyType,this.tagEntries.theme,this.tagEntries.character]).join(" ").replace(","," ").trim().replace(/ +/g," "):this.tagEntries.other},tagsArray:function(){return this.tags.toLowerCase().split(" ")},tagCount:function(){return this.tags.split(" ").filter((function(t){return t})).length},notEnoughTags:function(){return this.tagCount<4},invalidRating:function(){return!this.rating},preventUpload:function(){return this.sourceWarning||this.notEnoughTags||this.invalidRating||this.invalidUploadValue},duplicatePath:function(){return"/posts/".concat(this.duplicateId)}}};const Mt=(0,yt.Z)(Ot,[["render",function(t,e,n,$,bt,wt){var yt=(0,a.up)("file-input"),kt=(0,a.up)("file-preview"),$t=(0,a.up)("sources"),xt=(0,a.up)("image-checkbox"),jt=(0,a.up)("tag-preview"),Tt=(0,a.up)("related-tags");return(0,a.wg)(),(0,a.iD)("div",r,[(0,a._)("div",s,[(0,a._)("div",c,[l,(0,a.Uk)(),(0,a._)("div",d,[(0,a.Wm)(yt,{onUploadValueChanged:e[0]||(e[0]=function(t){return bt.uploadValue=t}),onPreviewChanged:e[1]||(e[1]=function(t){return bt.previewData=t}),onInvalidUploadValueChanged:e[2]||(e[2]=function(t){return bt.invalidUploadValue=t})})])]),(0,a.Uk)(),(0,a.Wm)(kt,{classes:"box-section in-editor below-upload",data:bt.previewData},null,8,["data"]),(0,a.Uk)(),(0,a._)("div",u,[p,(0,a.Uk)(),(0,a._)("div",f,[(0,a.Wm)($t,{maxSources:10,showErrors:bt.showErrors,sources:bt.sources,"onUpdate:sources":e[3]||(e[3]=function(t){return bt.sources=t}),onSourceWarning:e[4]||(e[4]=function(t){return bt.sourceWarning=t})},null,8,["showErrors","sources"])])]),(0,a.Uk)(),bt.normalMode?((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[(0,a._)("div",g,[h,(0,a.Uk)(),(0,a._)("div",v,[(0,a._)("div",null,[(0,a.wy)((0,a._)("textarea",{class:"tag-textarea","onUpdate:modelValue":e[5]||(e[5]=function(t){return bt.tagEntries.character=t}),id:"post_characters",rows:"2",placeholder:"Ex: artist_name, unknown_artist, anonymous_artist etc.","data-autocomplete":"tag-edit"},null,512),[[o.nr,bt.tagEntries.character]])])])]),(0,a.Uk)(),(0,a._)("div",m,[_,(0,a.Uk)(),(0,a._)("div",b,[(0,a._)("div",w,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(bt.checkboxes.sex,(function(t){return(0,a.wg)(),(0,a.j4)(xt,{check:t,checks:bt.checkboxes.selected,onSet:wt.setCheck,key:t.name},null,8,["check","checks","onSet"])})),128))]),(0,a.Uk)(),y,(0,a.Uk)(),(0,a._)("div",k,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(bt.checkboxes.count,(function(t){return(0,a.wg)(),(0,a.j4)(xt,{check:t,checks:bt.checkboxes.selected,onSet:wt.setCheck,key:t.name},null,8,["check","checks","onSet"])})),128))]),(0,a.Uk)(),x,(0,a.Uk)(),(0,a._)("div",j,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(bt.checkboxes.pairing,(function(t){return(0,a.wg)(),(0,a.j4)(xt,{check:t,checks:bt.checkboxes.selected,onSet:wt.setCheck,key:t.name},null,8,["check","checks","onSet"])})),128))]),(0,a.Uk)(),(0,a.wy)((0,a._)("textarea",{class:"tag-textarea",rows:"2","onUpdate:modelValue":e[6]||(e[6]=function(t){return bt.tagEntries.sex=t}),id:"post_sexes",placeholder:"Ex: character_name solo_focus etc.","data-autocomplete":"tag-edit"},null,512),[[o.nr,bt.tagEntries.sex]])])]),(0,a.Uk)(),(0,a._)("div",T,[S,(0,a.Uk)(),(0,a._)("div",D,[(0,a._)("div",U,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(bt.checkboxes.body,(function(t){return(0,a.wg)(),(0,a.j4)(xt,{check:t,checks:bt.checkboxes.selected,onSet:wt.setCheck,key:t.name},null,8,["check","checks","onSet"])})),128))]),(0,a.Uk)(),(0,a.wy)((0,a._)("textarea",{class:"tag-textarea",rows:"2","onUpdate:modelValue":e[7]||(e[7]=function(t){return bt.tagEntries.bodyType=t}),id:"post_bodyTypes",placeholder:"Ex: bear dragon hyena rat newt etc.","data-autocomplete":"tag-edit"},null,512),[[o.nr,bt.tagEntries.bodyType]])])]),(0,a.Uk)(),(0,a._)("div",z,[C,(0,a.Uk)(),(0,a._)("div",E,[(0,a.wy)((0,a._)("textarea",{class:"tag-textarea","onUpdate:modelValue":e[8]||(e[8]=function(t){return bt.tagEntries.theme=t}),id:"post_themes",rows:"2","data-autocomplete":"tag-edit",placeholder:"Ex: young gore scat watersports diaper my_little_pony vore not_furry rape hyper etc."},null,512),[[o.nr,bt.tagEntries.theme]])])])],64)):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("div",A,[P,(0,a.Uk)(),(0,a._)("div",O,[bt.showErrors&&wt.invalidRating?((0,a.wg)(),(0,a.iD)("div",M,"\n You must select an appropriate rating for this image.\n ")):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("div",null,[bt.safe?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[(0,a._)("button",{class:(0,i.C_)(["toggle-button rating-e",{active:"e"===bt.rating}]),onClick:e[9]||(e[9]=function(t){return bt.rating="e"})},"\n Explicit\n ",2),(0,a.Uk)(),(0,a._)("button",{class:(0,i.C_)(["toggle-button rating-q",{active:"q"===bt.rating}]),onClick:e[10]||(e[10]=function(t){return bt.rating="q"})},"\n Questionable\n ",2)],64)),(0,a.Uk)(),(0,a._)("button",{class:(0,i.C_)(["toggle-button rating-s",{active:"s"===bt.rating}]),onClick:e[11]||(e[11]=function(t){return bt.rating="s"})},"Safe\n ",2)])])]),(0,a.Uk)(),(0,a._)("div",R,[I,(0,a.Uk)(),(0,a._)("div",L,[(0,a.Wm)(kt,{classes:"box-section in-editor",data:bt.previewData},null,8,["data"]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",F,[(0,a.Uk)("\n You must provide at least "),(0,a._)("b",null,(0,i.zw)(4-wt.tagCount),1),(0,a.Uk)(" more tags. Tags in other sections count\n towards this total.\n ")],512),[[o.F8,bt.showErrors&&wt.notEnoughTags]]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",null,[(0,a.wy)((0,a._)("textarea",{class:"tag-textarea",id:"post_tags","onUpdate:modelValue":e[12]||(e[12]=function(t){return bt.tagEntries.other=t}),rows:"5",ref:"otherTags","data-autocomplete":"tag-edit"},null,512),[[o.nr,bt.tagEntries.other]])],512),[[o.F8,!bt.tagPreview.show]]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",null,[(0,a.Wm)(jt,{tags:bt.tagPreview.tags,loading:bt.tagPreview.loading,onClose:wt.previewFinalTags},null,8,["tags","loading","onClose"])],512),[[o.F8,bt.tagPreview.show]]),(0,a.Uk)(),(0,a._)("div",q,[(0,a.Uk)("\n Related:\n "),(0,a._)("a",{href:"#",onClick:e[13]||(e[13]=(0,o.iM)((function(t){return wt.findRelated()}),["prevent"]))},"Tags"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[14]||(e[14]=(0,o.iM)((function(t){return wt.findRelated(1)}),["prevent"]))},"Artists"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[15]||(e[15]=(0,o.iM)((function(t){return wt.findRelated(3)}),["prevent"]))},"Copyrights"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[16]||(e[16]=(0,o.iM)((function(t){return wt.findRelated(4)}),["prevent"]))},"Characters"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[17]||(e[17]=(0,o.iM)((function(t){return wt.findRelated(5)}),["prevent"]))},"Species"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[18]||(e[18]=(0,o.iM)((function(t){return wt.findRelated(7)}),["prevent"]))},"Metatags"),(0,a.Uk)(" |\n "),(0,a._)("a",{href:"#",onClick:e[19]||(e[19]=(0,o.iM)((function(){return wt.previewFinalTags&&wt.previewFinalTags.apply(wt,arguments)}),["prevent"]))},"Preview Final Tags")])])]),(0,a.Uk)(),(0,a._)("div",V,[bt.relatedTags.length?((0,a.wg)(),(0,a.j4)(Tt,{key:0,tags:wt.tagsArray,related:bt.relatedTags,loading:bt.loadingRelated,onTagActive:wt.pushTag},null,8,["tags","related","loading","onTagActive"])):(0,a.kq)("",!0)]),(0,a.Uk)(),(0,a._)("div",B,[N,(0,a.Uk)(),(0,a._)("div",W,[(0,a.wy)((0,a._)("input",{"onUpdate:modelValue":e[20]||(e[20]=function(t){return bt.parentID=t}),placeholder:"Ex. 12345"},null,512),[[o.nr,bt.parentID,void 0,{number:!0}]])])]),(0,a.Uk)(),bt.allowLockedTags?((0,a.wg)(),(0,a.iD)("div",Y,[G,(0,a.Uk)(),(0,a._)("div",H,[(0,a.wy)((0,a._)("input",{type:"text","onUpdate:modelValue":e[21]||(e[21]=function(t){return bt.lockedTags=t}),"data-autocomplete":"tag-query"},null,512),[[o.nr,bt.lockedTags]])])])):(0,a.kq)("",!0),(0,a.Uk)(),bt.allowRatingLock?((0,a.wg)(),(0,a.iD)("div",X,[J,(0,a.Uk)(),(0,a._)("div",Z,[(0,a._)("label",null,[(0,a.wy)((0,a._)("input",{type:"checkbox","onUpdate:modelValue":e[22]||(e[22]=function(t){return bt.ratingLocked=t})},null,512),[[o.e8,bt.ratingLocked]]),(0,a.Uk)(" Lock Rating")])])])):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("div",Q,[K,(0,a.Uk)(),(0,a._)("div",tt,[(0,a._)("div",et,[nt,(0,a.Uk)(),at,(0,a.Uk)(),(0,a.wy)((0,a._)("textarea",{class:"dtext-formatter-input tag-textarea dtext",id:"post_description",rows:"10","onUpdate:modelValue":e[23]||(e[23]=function(t){return bt.description=t})},null,512),[[o.nr,bt.description]]),(0,a.Uk)(),ot,(0,a.Uk)(),it]),(0,a.Uk)(),rt])]),(0,a.Uk)(),bt.allowUploadAsPending?((0,a.wg)(),(0,a.iD)("div",st,[ct,(0,a.Uk)(),(0,a._)("div",lt,[(0,a._)("label",null,[(0,a.wy)((0,a._)("input",{type:"checkbox","onUpdate:modelValue":e[24]||(e[24]=function(t){return bt.uploadAsPending=t})},null,512),[[o.e8,bt.uploadAsPending]]),(0,a.Uk)(" Upload as Pending")])])])):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("div",dt,[ut,(0,a.Uk)(),(0,a._)("div",pt,[(0,a.wy)((0,a._)("div",ft,"\n Unmet requirements above prevent the submission of the post.\n ",512),[[o.F8,wt.preventUpload&&bt.showErrors]]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",gt,"\n Submitting your post, please wait.\n ",512),[[o.F8,bt.submitting]]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",{class:"box-section sect_red"},(0,i.zw)(bt.error),513),[[o.F8,bt.error]]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",ht,[(0,a.Uk)("\n Post is a duplicate of "),(0,a._)("a",{href:wt.duplicatePath},"post #"+(0,i.zw)(bt.duplicateId)+".",9,vt)],512),[[o.F8,bt.duplicateId]]),(0,a.Uk)(),(0,a._)("button",{onClick:e[25]||(e[25]=function(){return wt.submit&&wt.submit.apply(wt,arguments)}),disabled:bt.showErrors&&wt.preventUpload||bt.submitting,accesskey:"s"},(0,i.zw)(bt.submitting?"Uploading...":"Upload"),9,mt)])])]),(0,a.Uk)(),(0,a._)("div",_t,[(0,a.Wm)(kt,{classes:"in-sidebar",data:bt.previewData},null,8,["data"])])])}]]);var Rt=Mt,It={init:function(){(0,o.ri)(Rt).mount("#uploader")}}},8555:function(t,e,n){"use strict";n.r(e);var a=n(5153),o=n(8261),i=n(9561),r=n(8162),s=n(3752);function c(t,e){for(var n=0;n0&&e.length>0;)t[0]e[0]||n.push(t.shift()),e.shift());return n},o.regexp_escape=function(t){return t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},$.fn.selectEnd=function(){return this.each((function(){this.focus(),this.setSelectionRange(this.value.length,this.value.length)}))},$((function(){$(window).on("danbooru:notice",(function(t,e){o.notice(e)})),$(window).on("danbooru:error",(function(t,e){o.error(e)}))})),e.default=o},9324:function(t,e,n){"use strict";n.r(e);var a=n(3752);function o(t,e){for(var n=0;ntbody>tr.selected").map((function(){return $(this).attr("id").substr(1)})).get()}},{key:"lockVotes",value:function(){var t=this,e=this.selectedVotes();e.length&&$.ajax({url:"/".concat(this._type,"_votes/lock.json"),method:"post",data:{ids:e.join(",")}}).done((function(){a.default.notice("".concat(t._type," votes locked."))}))}},{key:"deleteVotes",value:function(){var t=this,e=this.selectedVotes();e.length&&$.ajax({url:"/".concat(this._type,"_votes/delete.json"),method:"post",data:{ids:e.join(",")}}).done((function(){a.default.notice("".concat(t._type," votes deleted."))}))}}])&&o(e.prototype,n),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=r},5773:function(t,e,n){"use strict";n.r(e);var a=n(3752),o={METATAGS:["md5","order","limit","child","randseed","ratinglocked","notelocked","statuslocked","id","filetype","type","rating","description","parent","user","user_id","approver","flagger","deletedby","delreason","source","status","pool","set","fav","favoritedby","note","locked","upvote","votedup","downvote","voteddown","voted","width","height","mpixels","ratio","filesize","duration","score","favcount","date","age","change","tagcount","commenter","comm","noter","noteupdater","gentags","arttags","copytags","chartags","spectags","invtags","metatags","lortags","comment_count","hassource","hasdescription","isparent","ischild","inpool","pending_replacements"],TAG_CATEGORIES:{general:0,gen:0,artist:1,art:1,copyright:3,copy:3,co:3,character:4,char:4,ch:4,oc:4,species:5,spec:5,invalid:6,inv:6,meta:7,lore:8,lor:8},ORDER_METATAGS:["id","id_desc","score","score_asc","favcount","favcount_asc","created_at","created_at_asc","updated","updated_desc","updated_asc","comment","comment_asc","comment_bumped","comment_bumped_asc","note","note_asc","mpixels","mpixels_asc","portrait","landscape","filesize","filesize_asc","tagcount","tagcount_asc","change","change_desc","change_asc","duration","duration_desc","duration_asc","rank","random","comment_count","gentags","gentags_asc","arttags","arttags_asc","copytags","copytags_asc","chartags","chartags_asc","spectags","spectags_asc","invtags","invtags_asc","metatags","metatags_asc","lortags","lortags_asc"]};o.TAG_PREFIXES="-|~|"+Object.keys(o.TAG_CATEGORIES).map((function(t){return t+":"})).join("|"),o.TAG_PREFIXES_REGEX=new RegExp("^("+o.TAG_PREFIXES+")(.*)$","i"),o.METATAGS_REGEX=new RegExp("^("+o.METATAGS.join("|")+"):(.*)$","i"),o.initialize_all=function(){"true"===a.default.meta("enable-auto-complete")&&($.widget("ui.autocomplete",$.ui.autocomplete,{options:{delay:225,minLength:3,autoFocus:!1,focus:function(){return!1}},_create:function(){this.element.on("keydown.Autocomplete.tab",null,"tab",o.on_tab),this._super()},_renderItem:o.render_item}),this.initialize_tag_autocomplete(),this.initialize_artist_autocomplete($('[data-autocomplete="artist"]')),this.initialize_pool_autocomplete($('[data-autocomplete="pool"]')),this.initialize_user_autocomplete($('[data-autocomplete="user"]')),this.initialize_wiki_autocomplete($('[data-autocomplete="wiki-page"]')))},o.initialize_tag_autocomplete=function(){var t=$('[data-autocomplete="tag-query"], [data-autocomplete="tag-edit"]'),e=$('[data-autocomplete="tag"]');t.autocomplete({search:function(){$(this).data("ui-autocomplete")&&($(this).data("ui-autocomplete").menu.bindings=$())},select:function(t,e){return"Enter"===t.key&&t.stopImmediatePropagation(),o.insert_completion(this,e.item.value),!1},source:function(t,e){var n=o.parse_query(t.term,this.element.get(0).selectionStart),a=n.metatag,i=n.term;if(a||i)switch(a){case"md5":case"width":case"height":case"mpixels":case"ratio":case"score":case"duration":case"favcount":case"filesize":case"source":case"id":case"date":case"age":case"limit":case"tagcount":case"gentags":case"arttags":case"copytags":case"chartags":case"spectags":case"invtags":case"metatags":case"lortags":return void e([]);case"order":case"status":case"rating":case"locked":case"child":case"parent":case"filetype":case"type":case"disapproval":return void o.static_metatag_source(i,e,a);case"user":case"approver":case"commenter":case"comm":case"noter":case"noteupdater":case"fav":case"favoritedby":case"flagger":case"upvote":case"downvote":o.user_source(i,e,a+":");break;case"pool":o.pool_source(i,e,a);break;default:o.normal_source(i,e)}else this.close()}}),e.autocomplete({search:function(){$(this).data("ui-autocomplete").menu.bindings=$()},source:function(t,e){o.normal_source(t.term,e)}})},o.initialize_artist_autocomplete=function(t){t.autocomplete({search:function(){$(this).data("ui-autocomplete").menu.bindings=$()},source:function(t,e){o.artist_source(t.term,e)}})},o.initialize_pool_autocomplete=function(t){t.autocomplete({search:function(){$(this).data("ui-autocomplete").menu.bindings=$()},source:function(t,e){o.pool_source(t.term,e)}})},o.initialize_user_autocomplete=function(t){t.autocomplete({search:function(){$(this).data("ui-autocomplete").menu.bindings=$()},source:function(t,e){o.user_source(t.term,e,"")}})},o.initialize_wiki_autocomplete=function(t){t.autocomplete({search:function(){$(this).data("ui-autocomplete").menu.bindings=$()},source:function(t,e){o.wiki_source(t.term,e)}})},o.parse_query=function(t,e){var n="",a="",i=t.substring(0,e).match(/\S+$/g);return i?((i=(a=i[0]).match(o.TAG_PREFIXES_REGEX))&&(n=i[1].toLowerCase(),a=i[2]),(i=a.match(o.METATAGS_REGEX))&&(n=i[1].toLowerCase(),a=i[2]),{metatag:n,term:a}):{}},o.insert_completion=function(t,e){var n=t.value.substring(0,t.selectionStart).trim(),a=t.value.substring(t.selectionStart).trim(),i=new RegExp("("+o.TAG_PREFIXES+")?\\S+$","g");n=n.replace(i,"$1")+e,(0===a.length||0!==a.length&&!a.startsWith(" "))&&(n+=" "),t.value=n+a,t.selectionStart=n.length,t.selectionEnd=n.length;var r=new Event("input",{bubbles:!0});t.dispatchEvent(r)},o.on_tab=function(t){var e=$(this).autocomplete("instance"),n=e.menu.element;if(n.is(":visible")){if(0===n.has(".ui-state-active").length){var a=n.find(".ui-menu-item").first().data().uiAutocompleteItem.value;o.insert_completion(this,a),e.close()}t.preventDefault()}},o.render_item=function(t,e){var n=$("");if(n.text(e.label),n.attr("href",o.get_href(e)),n.on("click.danbooru",(function(t){t.preventDefault()})),e.antecedent){var i=e.antecedent.replace(/_/g," "),r=$("").text(" \u2192 ").addClass("autocomplete-arrow"),s=$("").text(i).addClass("autocomplete-antecedent");n.prepend([s,r])}if(void 0!==e.post_count){var c=e.post_count;c>=1e3&&(c=Math.floor(c/1e3)+"k");var l=$("").addClass("post-count").css("float","right").text(c);n.append(l)}if("tag"===e.type)n.addClass("tag-type-"+e.category);else if("user"===e.type){var d="user-"+e.level.replaceAll(" ","-").toLowerCase();n.addClass(d),"true"===a.default.meta("style-usernames")&&n.addClass("with-style")}else"pool"===e.type&&n.addClass("pool-category-"+e.category);var u=$("").append(n),p=$("").data("item.autocomplete",e).append(u);return["id","type","source","antecedent","value","category","post_count","weight"].forEach((function(t){p.attr("data-autocomplete-".concat(t.replace(/_/g,"-")),e[t])})),p.appendTo(t)},o.get_href=function(t){switch(t.type){case"user":return"/users/"+t.id;case"pool":return"/pools/"+t.id;case"artist":return"/artists/"+t.id;case"wiki_page":return"/wiki_pages/"+t.id;default:return"/posts?tags="+encodeURIComponent(t.value)}},o.normal_source=function(t,e){if(!(t.length<3))return $.ajax({url:"/tags/autocomplete.json",data:{"search[name_matches]":t,expiry:7},method:"get",success:function(t){var n=$.map(t,(function(t){return{id:t.id,type:"tag",label:t.name.replace(/_/g," "),antecedent:t.antecedent_name,value:t.name,category:t.category,source:t.source,weight:t.weight,post_count:t.post_count}}));e(n)}})},o.static_metatags={order:o.ORDER_METATAGS,status:["any","deleted","active","pending","flagged","modqueue"],rating:["safe","questionable","explicit"],locked:["rating","note","status"],child:["any","none"],parent:["any","none"],filetype:["jpg","png","gif","swf","webm","mp4"],type:["jpg","png","gif","swf","webm","mp4"]},o.static_metatag_source=function(t,e,n){var a=this.static_metatags[n].filter((function(e){return e.startsWith(t.toLowerCase())}));e(a=a.map((function(t){return"".concat(n,":").concat(t)})).sort().slice(0,10))},o.user_source=function(t,e,n){return $.ajax({url:"/users.json",data:{"search[order]":"post_upload_count","search[name_matches]":t+"*",limit:10},method:"get",success:function(t){e($.map(t,(function(t){return{id:t.id,type:"user",label:t.name.replace(/_/g," "),value:n+t.name,level:t.level_string}})))}})},o.pool_source=function(t,e,n){return $.ajax({url:"/pools.json",data:{"search[order]":"post_count","search[name_matches]":t,limit:10},method:"get",success:function(t){e($.map(t,(function(t){return{id:t.id,type:"pool",label:t.name.replace(/_/g," "),value:n?n+":"+t.name:t.name,post_count:t.post_count,category:t.category}})))}})},o.artist_source=function(t,e){return $.ajax({url:"/artists.json",data:{"search[name]":t.trim().replace(/\s+/g,"_")+"*","search[is_active]":!0,"search[order]":"post_count",limit:10,expiry:7},method:"get",success:function(t){e($.map(t,(function(t){return{id:t.id,type:"artist",label:t.name.replace(/_/g," "),value:t.name,category:o.TAG_CATEGORIES.artist}})))}})},o.wiki_source=function(t,e){return $.ajax({url:"/wiki_pages.json",data:{"search[title]":t+"*","search[hide_deleted]":"Yes","search[order]":"post_count",limit:10,expiry:7},method:"get",success:function(t){e($.map(t,(function(t){return{id:t.id,type:"wiki_page",label:t.title.replace(/_/g," "),value:t.title,category:t.category_id}})))}})},$(document).ready((function(){o.initialize_all()})),e.default=o},9769:function(t,e,n){"use strict";n.r(e)},110:function(t,e,n){"use strict";n.d(e,{Z:function(){return k}});var a=n(4346),o=n(9858),i=n(1871),r={key:0},s={key:0,class:"box-section sect_red"},c=(0,a._)("br",null,null,-1),l=(0,a._)("a",{href:"/help/supported_filetypes"},"the Supported Formats",-1),d=["disabled"],u={key:1},p={key:0,class:"box-section sect_red"},f=(0,a._)("br",null,null,-1),g=(0,a._)("a",{href:"/wiki_pages/howto:sites_and_sources"},"the sourcing guide",-1),h=["disabled"],v={key:0},m={key:1},_={key:0},b=(0,a._)("a",{href:"/upload_whitelists"},"View whitelisted domains",-1);var w={data:function(){return{whitelist:{visible:!1,allowed:!1,reason:"",domain:"",oldDomain:""},uploadURL:new URLSearchParams(window.location.search).get("upload_url")||"",fileTooLarge:!1,maxFileSize:window.uploaderSettings.maxFileSize,disableFileUpload:!1,disableURLUpload:!1}},computed:{directURLProblem:function(){return this.directURLCheck(this.uploadURL)},badDirectURL:function(){return!!this.directURLProblem},invalidUploadValue:function(){return this.badDirectURL||this.fileTooLarge}},watch:{uploadURL:{immediate:!0,handler:function(){this.fileTooLarge=!1,this.uploadValueChanged(this.uploadURL),this.updatePreviewURL()}},invalidUploadValue:function(){this.$emit("invalidUploadValueChanged",this.invalidUploadValue)}},methods:{whitelistWarning:function(t,e,n){this.whitelist.allowed=t,this.whitelist.domain=e,this.whitelist.reason=n,this.whitelist.visible=!0},clearWhitelistWarning:function(){this.whitelist.visible=!1,this.whitelist.domain=""},directURLCheck:function(t){for(var e=0,n=[{reason:"Thumbnail URL",test:/[at]\.(facdn|furaffinity)\.net/gi},{reason:"Sample URL",test:/pximg\.net.*\/img-master\//gi},{reason:"Sample URL",test:/d3gz42uwgl1r1y\.cloudfront\.net\/.*\/\d+x\d+\./gi},{reason:"Sample URL",test:/pbs\.twimg\.com\/media\/[\w\-_]+\.(jpg|png)(:large)?$/gi},{reason:"Sample URL",test:/pbs\.twimg\.com\/media\/[\w\-_]+\?format=(jpg|png)(?!&name=orig)/gi},{reason:"Sample URL",test:/derpicdn\.net\/.*\/large\./gi},{reason:"Sample URL",test:/metapix\.net\/files\/(preview|screen)\//gi},{reason:"Sample URL",test:/sofurryfiles\.com\/std\/preview/gi}];e").prop("href",this.uploadURL).prop("hostname");if(n&&n!==this.whitelist.oldDomain?$.getJSON("/upload_whitelists/is_allowed.json",{url:this.uploadURL},(function(t){t.domain&&(e.whitelistWarning(t.is_allowed,t.domain,t.reason),t.is_allowed||e.setEmptyThumb())})):n||(this.clearWhitelistWarning(),this.setEmptyThumb()),this.whitelist.oldDomain=n,/^(https?\:\/\/|www).*?$/.test(this.uploadURL)){var a=/^(https?\:\/\/|www).*?\.(webm)$/.test(this.uploadURL);this.previewChanged(this.uploadURL,a)}else this.setEmptyThumb()},updatePreviewFile:function(){var t=this.$refs.post_file.files[0];this.fileTooLarge=t.size>this.maxFileSize;var e=URL.createObjectURL(t);this.disableURLUpload=!0,this.uploadValueChanged(t),this.previewChanged(e,"video/webm"===t.type)},uploadValueChanged:function(t){this.$emit("uploadValueChanged",t)},setEmptyThumb:function(){this.previewChanged("",!1)},previewChanged:function(t,e){this.$emit("previewChanged",{url:t,isVideo:e})}}};const y=(0,n(5007).Z)(w,[["render",function(t,e,n,w,y,k){return(0,a.wg)(),(0,a.iD)("span",null,[y.disableFileUpload?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",r,[y.fileTooLarge?((0,a.wg)(),(0,a.iD)("div",s,[(0,a.Uk)("\n The file you are trying to upload is too large. Maximum allowed is "+(0,o.zw)(this.maxFileSize/1048576)+" MiB.",1),c,(0,a.Uk)("\n Check out "),l,(0,a.Uk)(" for more information.\n ")])):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("label",null,[(0,a.Uk)("File:\n "),(0,a._)("input",{type:"file",ref:"post_file",onChange:e[0]||(e[0]=function(){return k.updatePreviewFile&&k.updatePreviewFile.apply(k,arguments)}),accept:"image/png,image/apng,image/jpeg,image/gif,video/webm,.png,.apng,.jpg,.jpeg,.gif,.webm",disabled:y.disableFileUpload},null,40,d)]),(0,a.Uk)(),(0,a.wy)((0,a._)("button",{onClick:e[1]||(e[1]=(0,i.iM)((function(){return k.clearFileUpload&&k.clearFileUpload.apply(k,arguments)}),["prevent"]))},"Clear",512),[[i.F8,y.disableURLUpload]])])),(0,a.Uk)(),y.disableURLUpload?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",u,[k.badDirectURL?((0,a.wg)(),(0,a.iD)("div",p,[(0,a.Uk)("\n The direct URL entered has the following problem: "+(0,o.zw)(k.directURLProblem),1),f,(0,a.Uk)("\n You should review "),g,(0,a.Uk)(".\n ")])):(0,a.kq)("",!0),(0,a.Uk)(),(0,a._)("label",null,[(0,a.Uk)((0,o.zw)(y.disableFileUpload?"":"(or) ")+"URL:\n ",1),(0,a.wy)((0,a._)("input",{type:"text",size:"50","onUpdate:modelValue":e[2]||(e[2]=function(t){return y.uploadURL=t}),disabled:y.disableURLUpload},null,8,h),[[i.nr,y.uploadURL]])]),(0,a.Uk)(),(0,a.wy)((0,a._)("div",{id:"whitelist-warning",class:(0,o.C_)({"whitelist-warning-allowed":y.whitelist.allowed,"whitelist-warning-disallowed":!y.whitelist.allowed})},[y.whitelist.allowed?((0,a.wg)(),(0,a.iD)("span",v,[(0,a.Uk)("Uploads from "),(0,a._)("b",null,(0,o.zw)(y.whitelist.domain),1),(0,a.Uk)(" are permitted.")])):(0,a.kq)("",!0),(0,a.Uk)(),y.whitelist.allowed?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("span",m,[(0,a.Uk)("Uploads from "),(0,a._)("b",null,(0,o.zw)(y.whitelist.domain),1),(0,a.Uk)(" are not permitted.\n "),y.whitelist.reason?((0,a.wg)(),(0,a.iD)("span",_,"Reason given: "+(0,o.zw)(y.whitelist.reason),1)):(0,a.kq)("",!0),(0,a.Uk)("\n ("),b,(0,a.Uk)(")")]))],2),[[i.F8,y.whitelist.visible]])]))])}]]);var k=y},5344:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var a=n(4346),o=n(9858),i=n(1871),r={class:"box-section sect_red"},s={key:0},c={class:"upload_preview_dims"},l=["src"],d=["src"],u={key:1,class:"preview-fail box-section sect_yellow"},p=(0,a._)("p",null,"The preview for this file failed to load. Please, double check that the URL you provided is correct.",-1);var f={props:{classes:String,data:{validator:function(t){return"boolean"===typeof t.isVideo&&"string"===typeof t.url}}},data:function(){return{heigth:0,width:0,overDims:!1,failed:!1}},computed:{previewDimensions:function(){return this.width>1&&this.height>1?this.width+"\xd7"+this.height:""},finalPreviewUrl:function(){return""===this.data.url?"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==":this.data.url}},watch:{data:function(){this.resetFilePreview()}},methods:{updateDimensions:function(t){var e=t.target;this.height=e.naturalHeight||e.videoHeight,this.width=e.naturalWidth||e.videoWidth,this.overDims=this.height>15e3||this.width>15e3},resetFilePreview:function(){this.overDims=!1,this.width=0,this.height=0,this.failed=!1},previewFailed:function(){this.failed=!0}}};var g=(0,n(5007).Z)(f,[["render",function(t,e,n,f,g,h){return(0,a.wg)(),(0,a.iD)("div",{class:(0,o.C_)(["upload_preview_container",n.classes])},[(0,a.wy)((0,a._)("div",r,"\n One of the image dimensions is above the maximum allowed of 15,000px and will fail to upload.\n ",512),[[i.F8,g.overDims]]),(0,a.Uk)(),g.failed?((0,a.wg)(),(0,a.iD)("div",u,[p,(0,a.Uk)("\n Note that some sites intentionally prevent images they host from being displayed on other sites. The file can still be uploaded despite that.\n ")])):((0,a.wg)(),(0,a.iD)("div",s,[(0,a._)("div",c,(0,o.zw)(h.previewDimensions),1),(0,a.Uk)(),n.data.isVideo?((0,a.wg)(),(0,a.iD)("video",{key:0,class:"upload_preview_img",controls:"",src:h.finalPreviewUrl,onLoadeddata:e[0]||(e[0]=function(t){return h.updateDimensions(t)}),onError:e[1]||(e[1]=function(t){return h.previewFailed()})},null,40,l)):((0,a.wg)(),(0,a.iD)("img",{key:1,class:"upload_preview_img",src:h.finalPreviewUrl,referrerpolicy:"no-referrer",onLoad:e[2]||(e[2]=function(t){return h.updateDimensions(t)}),onError:e[3]||(e[3]=function(t){return h.previewFailed()})},null,40,d))]))],2)}]])},8155:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var a=n(4346),o=n(9858),i=n(1871),r={class:"related-tags flex-wrap"},s={key:0,class:"related-title"},c=["href","onClick"];function l(t,e){return t.name>e.name?1:-1}var d={props:["tags","related","loading"],data:function(){return{uploaded:window.uploaderSettings.uploadTags||[],recent:(window.uploaderSettings.recentTags||[]).sort(l)}},methods:{toggle:function(t){this.$emit("tag-active",t.name,!this.tagActive(t))},tagLink:function(t){return"/wiki_pages/show_or_new?title="+encodeURIComponent(t.name)},tagActive:function(t){return-1!==this.tags.indexOf(t.name)},tagClasses:function(t){var e={"tag-active":this.tagActive(t)};return e["tag-type-"+t.category_id]=!0,e},splitTags:function(t){return function(t,e){for(var n=[],a=0;a0})).length;return!this.noSource&&0===t}},watch:{sourceWarning:{immediate:!0,handler:function(){this.$emit("sourceWarning",this.sourceWarning)}}}};var f=(0,d.Z)(p,[["render",function(t,e,n,c,l,d){var u=(0,a.up)("file-source");return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a.wy)((0,a._)("div",i,"\n A source must be provided or you must select that there is no available source.\n ",512),[[o.F8,n.showErrors&&d.sourceWarning]]),(0,a.Uk)(),l.noSource?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",r,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.sources,(function(t,e){return(0,a.wg)(),(0,a.j4)(u,{maxSources:n.maxSources,last:e===n.sources.length-1,index:e,modelValue:n.sources[e],"onUpdate:modelValue":function(t){return n.sources[e]=t},onDelete:function(t){return d.removeSource(e)},onAdd:d.addSource,key:e},null,8,["maxSources","last","index","modelValue","onUpdate:modelValue","onDelete","onAdd"])})),128))])),(0,a.Uk)(),(0,a._)("div",null,[(0,a._)("label",s,[(0,a.wy)((0,a._)("input",{type:"checkbox",id:"no_source","onUpdate:modelValue":e[0]||(e[0]=function(t){return l.noSource=t})},null,512),[[o.e8,l.noSource]]),(0,a.Uk)("\n No available source.\n ")])])],64)}]])},3877:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var a=n(4346),o=n(1871),i={class:"related-tags flex-wrap"};var r={key:0,class:"tag-preview tag-preview-alias"},s={key:1,class:"tag-preview tag-preview-implication"},c={key:2,class:"tag-preview"};var l=n(9858),d=["href"];var u={props:["tagType","name"]},p=n(5007);var f={components:{"tag-link":(0,p.Z)(u,[["render",function(t,e,n,o,i,r){return(0,a.wg)(),(0,a.iD)("a",{class:(0,l.C_)("tag-type-"+n.tagType),href:"/wiki_pages/show_or_new?title="+n.name,target:"_blank"},(0,l.zw)(n.name),11,d)}]])},props:["tag"]};var g={props:["tags","loading"],components:{"tag-preview-tag":(0,p.Z)(f,[["render",function(t,e,n,o,i,l){var d=(0,a.up)("tag-link");return"alias"===n.tag.type?((0,a.wg)(),(0,a.iD)("span",r,[(0,a._)("del",null,[(0,a.Wm)(d,{name:n.tag.a,tagType:n.tag.tagTypeA},null,8,["name","tagType"])]),(0,a.Uk)("\n \u2192 "),(0,a.Wm)(d,{name:n.tag.b,tagType:n.tag.tagTypeB},null,8,["name","tagType"])])):"implication"===n.tag.type?((0,a.wg)(),(0,a.iD)("span",s,[(0,a.Wm)(d,{name:n.tag.a,tagType:n.tag.tagTypeA},null,8,["name","tagType"]),(0,a.Uk)("\n \u21d2 "),(0,a.Wm)(d,{name:n.tag.b,tagType:n.tag.tagTypeB},null,8,["name","tagType"])])):((0,a.wg)(),(0,a.iD)("span",c,[(0,a.Wm)(d,{name:n.tag.a,tagType:n.tag.tagTypeA},null,8,["name","tagType"])]))}]])},methods:{close:function(){this.$emit("close")}},computed:{splitTags:function(){var t=this.tags.concat([]);t.sort((function(t,e){return t.a===e.a?0:t.a=i)&&Object.keys(a.O).every((function(t){return a.O[t](n[c])}))?n.splice(c--,1):(s=!1,i0&&t[d-1][2]>i;d--)t[d]=t[d-1];t[d]=[n,o,i]},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var n in e)a.o(e,n)&&!a.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}(),a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.p="/packs/",function(){var t={34:0};a.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,i,r=n[0],s=n[1],c=n[2],l=0;if(r.some((function(e){return 0!==t[e]}))){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);if(c)var d=c(a)}for(e&&e(n);l