1 (window
.webpackJsonp
=window
.webpackJsonp
||[]).push([["chunk-0537"],{"26YS":function(e
,t
,a
){"use strict";a
.r(t
);var o
=a("o0o1"),s
=a
.n(o
),i
=a("yXPU"),c
=a
.n(i
),n
=a("cDf5"),l
=a
.n(n
),r
=a("QILm"),m
=a
.n(r
),p
=a("mm8V"),u
={props:{host:{type:String
,required:!0},packName:{type:String
,required:!0},shortcode:{type:String
,required:!0},file:{type:String
,required:!0},isLocal:{type:Boolean
,required:!0}},data:function(){return{newShortcode:null,newFile:null,copyToLocalPackName:null,copyPopoverVisible:!1,copyToShortcode:"",copyToFilename:""}},computed:{emojiName:{get:function(){return null!==this.newShortcode
?this.newShortcode:this.shortcode
},set:function(e
){this.newShortcode
=e
}},emojiFile:{get:function(){return null!==this.newFile
?this.newFile:this.file
},set:function(e
){this.newFile
=e
}},isDesktop:function(){return"desktop"===this.$store
.state
.app
.device
},isMobile:function(){return"mobile"===this.$store
.state
.app
.device
},localPacks:function(){return this.$store
.state
.emojiPacks
.localPacks
},remoteInstance:function(){return this.$store
.state
.emojiPacks
.remoteInstance
}},methods:{update:function(){var e
=this;return c()(s
.a
.mark(function t(){return s
.a
.wrap(function(t
){for(;;)switch(t
.prev
=t
.next
){case 0:t
.prev
=0,e
.$store
.dispatch("UpdateEmojiFile",{packName:e
.packName
,shortcode:e
.shortcode
,newShortcode:e
.emojiName
,newFilename:e
.emojiFile
,force:!0}),t
.next
=7;break;case 4:return t
.prev
=4,t
.t0
=t
.catch(0),t
.abrupt("return");case 7:e
.newShortcode
=null,e
.newFile
=null,e
.$store
.dispatch("ReloadEmoji");case 10:case"end":return t
.stop()}},t
,null,[[0,4]])}))()},remove:function(){var e
=this;this.$confirm("This will delete the emoji, are you sure?","Warning",{confirmButtonText:"Yes, delete the emoji",cancelButtonText:"No, leave it be",type:"warning"}).then(function(){e
.$store
.dispatch("DeleteEmojiFile",{packName:e
.packName
,shortcode:e
.shortcode
}).then(function(){e
.newShortcode
=null,e
.newFile
=null,e
.$store
.dispatch("ReloadEmoji")})})},copyToLocal:function(){try{this.$store
.dispatch("AddNewEmojiFile",{packName:this.copyToLocalPackName
,file:this.addressOfEmojiInPack(this.remoteInstance
,this.packName
,this.file
),shortcode:""!==this.copyToShortcode
.trim()?this.copyToShortcode
.trim():this.shortcode
,filename:""!==this.copyToFilename
.trim()?this.copyToFilename
.trim():this.file
})}catch(e
){return}this.copyToLocalPackName
=null,this.copyToLocalVisible
=!1,this.copyToShortcode
="",this.copyToFilename
="",this.$store
.dispatch("ReloadEmoji")},addressOfEmojiInPack:p
.b
}},d
=(a("4ySm"),a("KHd+")),h
=Object(d
.a
)(u
,function(){var e
=this,t
=e
.$createElement
,a
=e
._self
._c
||t
;return a("div",[e
.isLocal
?a("div",{class:e
.isMobile
?"emoji-container-flex":"emoji-container-grid"},[a("img",{staticClass:"emoji-preview-img",attrs:{src:e
.addressOfEmojiInPack(e
.host
,e
.packName
,e
.file
)}}),e
._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{placeholder:e
.$t("emoji.shortcode")},model:{value:e
.emojiName
,callback:function(t
){e
.emojiName
=t
},expression:"emojiName"}}),e
._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{placeholder:e
.$t("emoji.file")},model:{value:e
.emojiFile
,callback:function(t
){e
.emojiFile
=t
},expression:"emojiFile"}}),e
._v(" "),a("div",{staticClass:"emoji-buttons"},[a("el-button",{attrs:{type:"primary"},on:{click:e
.update
}},[e
._v(e
._s(e
.$t("emoji.update")))]),e
._v(" "),a("el-button",{staticClass:"remove-emoji-button",on:{click:e
.remove
}},[e
._v(e
._s(e
.$t("emoji.remove")))])],1)],1):e
._e(),e
._v(" "),e
.isLocal
?e
._e():a("div",{class:e
.isMobile
?"emoji-container-flex":"remote-emoji-container-grid"},[a("img",{staticClass:"emoji-preview-img",attrs:{src:e
.addressOfEmojiInPack(e
.remoteInstance
,e
.packName
,e
.file
)}}),e
._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{value:e
.emojiName
,placeholder:e
.$t("emoji.shortcode")}}),e
._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{value:e
.emojiFile
,placeholder:e
.$t("emoji.file")}}),e
._v(" "),a("el-popover",{staticClass:"copy-pack-container",attrs:{placement:"left-start","popper-class":"copy-popover"},model:{value:e
.copyPopoverVisible
,callback:function(t
){e
.copyPopoverVisible
=t
},expression:"copyPopoverVisible"}},[a("p",[e
._v(e
._s(e
.$t("emoji.selectLocalPack")))]),e
._v(" "),a("el-select",{staticClass:"copy-pack-select",attrs:{placeholder:e
.$t("emoji.localPack")},model:{value:e
.copyToLocalPackName
,callback:function(t
){e
.copyToLocalPackName
=t
},expression:"copyToLocalPackName"}},e
._l(e
.localPacks
,function(e
,t
){return a("el-option",{key:t
,attrs:{label:t
,value:t
}})}),1),e
._v(" "),a("p",[e
._v(e
._s(e
.$t("emoji.specifyShortcode")))]),e
._v(" "),a("el-input",{attrs:{placeholder:e
.$t("emoji.leaveEmptyShortcode")},model:{value:e
.copyToShortcode
,callback:function(t
){e
.copyToShortcode
=t
},expression:"copyToShortcode"}}),e
._v(" "),a("p",[e
._v(e
._s(e
.$t("emoji.specifyFilename")))]),e
._v(" "),a("el-input",{attrs:{placeholder:e
.$t("emoji.leaveEmptyFilename")},model:{value:e
.copyToFilename
,callback:function(t
){e
.copyToFilename
=t
},expression:"copyToFilename"}}),e
._v(" "),a("el-button",{staticClass:"copy-to-local-pack-button",attrs:{disabled:!e
.copyToLocalPackName
,type:"primary"},on:{click:e
.copyToLocal
}},[e
._v(e
._s(e
.$t("emoji.copy")))]),e
._v(" "),a("el-button",{staticClass:"emoji-button",attrs:{slot:"reference",type:"primary"},slot:"reference"},[e
._v(e
._s(e
.$t("emoji.copyToLocalPack")))])],1)],1)])},[],!1,null,null,null);h
.options
.__file
="SingleEmojiEditor.vue";var k
=h
.exports
,f
={props:{packName:{type:String
,required:!0}},data:function(){return{shortcode:"",imageUploadURL:"",customFileName:""}},computed:{isDesktop:function(){return"desktop"===this.$store
.state
.app
.device
},isMobile:function(){return"mobile"===this.$store
.state
.app
.device
}},methods:{uploadEmoji:function(e
){var t
=this;return c()(s
.a
.mark(function a(){var o
;return s
.a
.wrap(function(a
){for(;;)switch(a
.prev
=a
.next
){case 0:o
=e
.file
,a
.prev
=1,t
.$store
.dispatch("AddNewEmojiFile",{packName:t
.packName
,file:o
||t
.imageUploadURL
,shortcode:t
.shortcode
,filename:t
.customFileName
}),a
.next
=8;break;case 5:return a
.prev
=5,a
.t0
=a
.catch(1),a
.abrupt("return");case 8:t
.shortcode
="",t
.imageUploadURL
="",t
.customFileName
="",t
.$store
.dispatch("ReloadEmoji");case 12:case"end":return a
.stop()}},a
,null,[[1,5]])}))()}}},v
=(a("IVv3"),Object(d
.a
)(f
,function(){var e
=this,t
=e
.$createElement
,a
=e
._self
._c
||t
;return a("el-form",{staticClass:"new-emoji-uploader-form",attrs:{"label-position":e
.isMobile
?"top":"left","label-width":"130px",size:"small"}},[a("el-form-item",{attrs:{label:e
.$t("emoji.shortcode")}},[a("el-input",{attrs:{placeholder:e
.$t("emoji.optional")},model:{value:e
.shortcode
,callback:function(t
){e
.shortcode
=t
},expression:"shortcode"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.customFilename")}},[a("el-input",{attrs:{placeholder:e
.$t("emoji.optional")},model:{value:e
.customFileName
,callback:function(t
){e
.customFileName
=t
},expression:"customFileName"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.uploadFile")}},[a("div",{staticClass:"upload-file-url"},[a("el-input",{attrs:{placeholder:e
.$t("emoji.url")},model:{value:e
.imageUploadURL
,callback:function(t
){e
.imageUploadURL
=t
},expression:"imageUploadURL"}}),e
._v(" "),a("el-button",{staticClass:"upload-button",attrs:{type:"primary"},on:{click:e
.uploadEmoji
}},[e
._v(e
._s(e
.$t("emoji.upload")))])],1),e
._v(" "),a("div",{staticClass:"upload-container"},[a("p",{staticClass:"text"},[e
._v("or")]),e
._v(" "),a("el-upload",{attrs:{"http-request":e
.uploadEmoji
,multiple:!1,"show-file-list":!1,action:"add"}},[a("el-button",{attrs:{type:"primary"}},[e
._v(e
._s(e
.$t("emoji.clickToUpload")))])],1)],1)])],1)},[],!1,null,null,null));function j(e
){var t=function(e
,t
){if("object"!==l()(e
)||null===e
)return e
;var a
=e
[Symbol
.toPrimitive
];if(void 0!==a
){var o
=a
.call(e
,t
||"default");if("object"!==l()(o
))return o
;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t
?String:Number
)(e
)}(e
,"string");return"symbol"===l()(t
)?t:String(t
)}v
.options
.__file
="NewEmojiUploader.vue";var b
={components:{SingleEmojiEditor:k
,NewEmojiUploader:v
.exports
},props:{name:{type:String
,required:!0},pack:{type:Object
,required:!0},host:{type:String
,required:!0},isLocal:{type:Boolean
,required:!0}},data:function(){return{showPackContent:[]}},computed:{currentFilesPage:function(){return this.$store
.state
.emojiPacks
.currentLocalFilesPage
},currentLocalPacksPage:function(){return this.$store
.state
.emojiPacks
.currentLocalPacksPage
},isMobile:function(){return"mobile"===this.$store
.state
.app
.device
},isTablet:function(){return"tablet"===this.$store
.state
.app
.device
},labelWidth:function(){return this.isMobile
?"90px":(this.isTablet
,"155px")},localPackFilesCount:function(){return this.$store
.state
.emojiPacks
.localPackFilesCount
},pageSize:function(){return this.$store
.state
.emojiPacks
.filesPageSize
},share:{get:function(){return this.pack
.pack
["share-files"]},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"share-files",value:e
})}},homepage:{get:function(){return this.pack
.pack
.homepage
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"homepage",value:e
})}},description:{get:function(){return this.pack
.pack
.description
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"description",value:e
})}},license:{get:function(){return this.pack
.pack
.license
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"license",value:e
})}},fallbackSrc:{get:function(){return this.pack
.pack
["fallback-src"]},set:function(e
){""!==e
.trim()?this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src",value:e
}):(this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src",value:null}),this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src-sha256",value:null}))}}},methods:{collapse:function(){this.showPackContent
=[]},deletePack:function(){var e
=this;this.$confirm("This will delete the pack, are you sure?","Warning",{confirmButtonText:"Yes, delete the pack",cancelButtonText:"No, leave it be",type:"warning"}).then(function(){e
.$store
.dispatch("DeletePack",{name:e
.name
}).then(function(){return e
.$store
.dispatch("ReloadEmoji")}).then(function(){var t
=e
.$store
.state
.emojiPacks
.localPacks
,a
=e
.name
,o
=(t
[a
],m()(t
,[a
].map(j
)));0===Object
.keys(o
).length
&&e
.currentLocalPacksPage
>1?e
.$store
.dispatch("FetchLocalEmojiPacks",e
.currentLocalPacksPage
-1):e
.$store
.dispatch("FetchLocalEmojiPacks",e
.currentLocalPacksPage
)})}).catch(function(){})},handleChange:function(e
,t
){e
.includes("manageEmoji")&&this.$store
.dispatch("FetchLocalSinglePack",{name:t
,page:1})},handleFilesPageChange:function(e
){this.$store
.dispatch("FetchLocalSinglePack",{name:this.name
,page:e
})},savePackMetadata:function(){this.$store
.dispatch("SavePackMetadata",{packName:this.name
})}}},P
=(a("LE4i"),Object(d
.a
)(b
,function(){var e
=this,t
=e
.$createElement
,a
=e
._self
._c
||t
;return a("el-collapse-item",{staticClass:"has-background",attrs:{title:e
.name
,name:e
.name
}},[a("el-form",{staticClass:"emoji-pack-metadata",attrs:{"label-width":e
.labelWidth
,"label-position":"left",size:"small"}},[a("el-form-item",{attrs:{label:e
.$t("emoji.sharePack")}},[a("el-switch",{model:{value:e
.share
,callback:function(t
){e
.share
=t
},expression:"share"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.homepage")}},[a("el-input",{model:{value:e
.homepage
,callback:function(t
){e
.homepage
=t
},expression:"homepage"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.description")}},[a("el-input",{attrs:{type:"textarea"},model:{value:e
.description
,callback:function(t
){e
.description
=t
},expression:"description"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.license")}},[a("el-input",{model:{value:e
.license
,callback:function(t
){e
.license
=t
},expression:"license"}})],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.fallbackSrc")}},[a("el-input",{model:{value:e
.fallbackSrc
,callback:function(t
){e
.fallbackSrc
=t
},expression:"fallbackSrc"}})],1),e
._v(" "),e
.fallbackSrc
&&""!==e
.fallbackSrc
.trim()?a("el-form-item",{attrs:{label:e
.$t("emoji.fallbackSrcSha")}},[e
._v("\n "+e
._s(e
.pack
.pack
["fallback-src-sha256"])+"\n ")]):e
._e()],1),e
._v(" "),a("div",{staticClass:"pack-button-container"},[a("div",{staticClass:"save-pack-button-container"},[a("el-button",{staticClass:"save-pack-button",attrs:{type:"primary"},on:{click:e
.savePackMetadata
}},[e
._v(e
._s(e
.$t("emoji.saveMetadata")))]),e
._v(" "),a("el-button",{staticClass:"delete-pack-button",on:{click:e
.deletePack
}},[e
._v(e
._s(e
.$t("emoji.deletePack")))])],1),e
._v(" "),a("div",{staticClass:"download-pack-button-container"},[e
.pack
.pack
["can-download"]?a("el-link",{attrs:{href:"//"+e
.host
+"//api/pleroma/emoji/packs/archive?name="+e
.name
,underline:!1,type:"primary",target:"_blank"}},[a("el-button",{staticClass:"download-archive"},[e
._v(e
._s(e
.$t("emoji.downloadPackArchive")))])],1):e
._e()],1)]),e
._v(" "),a("el-collapse",{staticClass:"contents-collapse",on:{change:function(t
){return e
.handleChange(t
,e
.name
)}},model:{value:e
.showPackContent
,callback:function(t
){e
.showPackContent
=t
},expression:"showPackContent"}},[e
.isLocal
?a("el-collapse-item",{staticClass:"no-background",attrs:{title:e
.$t("emoji.addNewEmoji"),name:"addEmoji"}},[a("new-emoji-uploader",{attrs:{"pack-name":e
.name
}})],1):e
._e(),e
._v(" "),a("el-collapse-item",{staticClass:"no-background",attrs:{title:e
.$t("emoji.manageEmoji"),name:"manageEmoji"}},[e
.pack
.files
&&Object
.keys(e
.pack
.files
).length
>0?a("div",[a("div",{class:e
.isMobile
?"emoji-container-flex":"emoji-container-grid"},[a("span",{staticClass:"emoji-preview-img emoji-table-head"},[e
._v(e
._s(e
.$t("emoji.image")))]),e
._v(" "),a("span",{staticClass:"emoji-table-head"},[e
._v(e
._s(e
.$t("emoji.shortcode")))]),e
._v(" "),a("span",{staticClass:"emoji-table-head"},[e
._v(e
._s(e
.$t("emoji.file")))])]),e
._v(" "),e
._l(e
.pack
.files
,function(t
,o
){return a("single-emoji-editor",{key:o
,attrs:{host:e
.host
,"pack-name":e
.name
,shortcode:o
,file:t
,"is-local":e
.isLocal
}})})],2):a("span",{staticClass:"expl"},[e
._v(e
._s(e
.$t("emoji.emptyPack")))]),e
._v(" "),a("div",{staticClass:"files-pagination"},[a("el-pagination",{attrs:{total:e
.localPackFilesCount
,"current-page":e
.currentFilesPage
,"page-size":e
.pageSize
,"hide-on-single-page":"",layout:"prev, pager, next"},on:{"current-change":e
.handleFilesPageChange
}})],1)])],1)],1)},[],!1,null,null,null));P
.options
.__file
="LocalEmojiPack.vue";var g
=P
.exports
,_
={components:{SingleEmojiEditor:k
},props:{activeTab:{type:String
,required:!0},name:{type:String
,required:!0},pack:{type:Object
,required:!0},host:{type:String
,required:!0},isLocal:{type:Boolean
,required:!0}},data:function(){return{showPackContent:[],downloadSharedAs:""}},computed:{currentFilesPage:function(){return this.$store
.state
.emojiPacks
.currentRemoteFilesPage
},currentRemotePacksPage:function(){return this.$store
.state
.emojiPacks
.currentRemotePacksPage
},isDesktop:function(){return"desktop"===this.$store
.state
.app
.device
},isMobile:function(){return"mobile"===this.$store
.state
.app
.device
},isTablet:function(){return"tablet"===this.$store
.state
.app
.device
},labelWidth:function(){return this.isMobile
?"90px":(this.isTablet
,"120px")},loadRemotePack:function(){return this.activeTab
===this.name
},pageSize:function(){return this.$store
.state
.emojiPacks
.filesPageSize
},remoteInstanceAddress:function(){return this.$store
.state
.emojiPacks
.remoteInstance
},remotePackFilesCount:function(){return this.$store
.state
.emojiPacks
.remotePackFilesCount
},share:{get:function(){return this.pack
.pack
["share-files"]},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"share-files",value:e
})}},homepage:{get:function(){return this.pack
.pack
.homepage
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"homepage",value:e
})}},description:{get:function(){return this.pack
.pack
.description
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"description",value:e
})}},license:{get:function(){return this.pack
.pack
.license
},set:function(e
){this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"license",value:e
})}},fallbackSrc:{get:function(){return this.pack
.pack
["fallback-src"]},set:function(e
){""!==e
.trim()?this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src",value:e
}):(this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src",value:null}),this.$store
.dispatch("UpdateLocalPackVal",{name:this.name
,key:"fallback-src-sha256",value:null}))}}},methods:{collapse:function(){this.showPackContent
=[]},downloadFromInstance:function(){var e
=this;this.$store
.dispatch("DownloadFrom",{instanceAddress:this.remoteInstanceAddress
,packName:this.name
,as:this.downloadSharedAs
}).then(function(){return e
.$store
.dispatch("ReloadEmoji")}).then(function(){return e
.$store
.dispatch("FetchLocalEmojiPacks",e
.currentPage
)})},handleChange:function(e
,t
){e
.includes("manageEmoji")&&this.$store
.dispatch("FetchRemoteSinglePack",{name:t
,page:1})},handleFilesPageChange:function(e
){this.$store
.dispatch("FetchRemoteSinglePack",{name:this.name
,page:e
})}}},$=(a("Zd0x"),Object(d
.a
)(_
,function(){var e
=this,t
=e
.$createElement
,a
=e
._self
._c
||t
;return a("el-collapse-item",{staticClass:"has-background",attrs:{title:e
.name
,name:e
.name
}},[e
.loadRemotePack
?a("div",[a("el-form",{staticClass:"emoji-pack-metadata remote-pack-metadata",attrs:{"label-width":e
.labelWidth
,"label-position":"left",size:"small"}},[a("el-form-item",{attrs:{label:e
.$t("emoji.sharePack")}},[a("el-switch",{attrs:{disabled:""},model:{value:e
.share
,callback:function(t
){e
.share
=t
},expression:"share"}})],1),e
._v(" "),e
.homepage
?a("el-form-item",{attrs:{label:e
.$t("emoji.homepage")}},[a("span",[e
._v(e
._s(e
.homepage
))])]):e
._e(),e
._v(" "),e
.description
?a("el-form-item",{attrs:{label:e
.$t("emoji.description")}},[a("span",[e
._v(e
._s(e
.description
))])]):e
._e(),e
._v(" "),e
.license
?a("el-form-item",{attrs:{label:e
.$t("emoji.license")}},[a("span",[e
._v(e
._s(e
.license
))])]):e
._e(),e
._v(" "),e
.fallbackSrc
?a("el-form-item",{attrs:{label:e
.$t("emoji.fallbackSrc")}},[a("span",[e
._v(e
._s(e
.fallbackSrc
))])]):e
._e(),e
._v(" "),e
.fallbackSrc
&&""!==e
.fallbackSrc
.trim()?a("el-form-item",{attrs:{label:e
.$t("emoji.fallbackSrcSha")}},[e
._v("\n "+e
._s(e
.pack
.pack
["fallback-src-sha256"])+"\n ")]):e
._e(),e
._v(" "),a("el-form-item",[e
.pack
.pack
["can-download"]&&e
.pack
.pack
["fallback-src"]?a("el-link",{attrs:{href:e
.pack
.pack
["fallback-src"],underline:!1,type:"primary",target:"_blank"}},[a("el-button",{staticClass:"download-archive"},[e
._v(e
._s(e
.$t("emoji.downloadPackArchive")))])],1):e
._e()],1)],1),e
._v(" "),a("el-collapse",{staticClass:"contents-collapse",on:{change:function(t
){return e
.handleChange(t
,e
.name
)}},model:{value:e
.showPackContent
,callback:function(t
){e
.showPackContent
=t
},expression:"showPackContent"}},[a("el-collapse-item",{staticClass:"no-background",attrs:{title:e
.$t("emoji.manageEmoji"),name:"manageEmoji"}},[e
.pack
.files
&&Object
.keys(e
.pack
.files
).length
>0?a("div",e
._l(e
.pack
.files
,function(t
,o
){return a("single-emoji-editor",{key:o
,attrs:{host:e
.host
,"pack-name":e
.name
,shortcode:o
,file:t
,"is-local":e
.isLocal
}})}),1):a("span",{staticClass:"expl"},[e
._v(e
._s(e
.$t("emoji.emptyPack")))]),e
._v(" "),a("div",{staticClass:"files-pagination"},[a("el-pagination",{attrs:{total:e
.remotePackFilesCount
,"current-page":e
.currentFilesPage
,"page-size":e
.pageSize
,"hide-on-single-page":"",layout:"prev, pager, next"},on:{"current-change":e
.handleFilesPageChange
}})],1)]),e
._v(" "),a("el-collapse-item",{staticClass:"no-background",attrs:{title:e
.$t("emoji.downloadPack"),name:"downloadPack"}},[a("p",[e
._v("\n "+e
._s(e
.$t("emoji.thisWillDownload"))+' "'+e
._s(e
.name
)+'" '+e
._s(e
.$t("emoji.downloadToCurrentInstance"))+'\n "'+e
._s(""===e
.downloadSharedAs
.trim()?e
.name:e
.downloadSharedAs
)+'" ('+e
._s(e
.$t("emoji.canBeChanged"))+").\n "+e
._s(e
.$t("emoji.willBeUsable"))+".\n ")]),e
._v(" "),a("div",{staticClass:"download-shared-pack"},[a("el-input",{attrs:{placeholder:e
.$t("emoji.downloadAsOptional")},model:{value:e
.downloadSharedAs
,callback:function(t
){e
.downloadSharedAs
=t
},expression:"downloadSharedAs"}}),e
._v(" "),a("el-button",{staticClass:"download-shared-pack-button",attrs:{type:"primary"},on:{click:e
.downloadFromInstance
}},[e
._v("\n "+e
._s(e
.isDesktop
?e
.$t("emoji.downloadSharedPack"):e
.$t("emoji.downloadSharedPackMobile"))+"\n ")])],1)])],1)],1):e
._e()])},[],!1,null,null,null));$.options
.__file
="RemoteEmojiPack.vue";var y
=$.exports
,w
=a("mSNy"),C
={components:{LocalEmojiPack:g
,RebootButton:a("rIUS").a
,RemoteEmojiPack:y
},data:function(){return{activeTab:"local",newPackName:"",activeLocalPack:"",activeRemotePack:"",fullscreenLoading:!1}},computed:{currentLocalPacksPage:function(){return this.$store
.state
.emojiPacks
.currentLocalPacksPage
},currentRemotePacksPage:function(){return this.$store
.state
.emojiPacks
.currentRemotePacksPage
},isMobile:function(){return"mobile"===this.$store
.state
.app
.device
},isTablet:function(){return"tablet"===this.$store
.state
.app
.device
},labelWidth:function(){return this.isMobile
?"105px":this.isTablet
?"180px":"200px"},localPacks:function(){return this.$store
.state
.emojiPacks
.localPacks
},localPacksCount:function(){return this.$store
.state
.emojiPacks
.localPacksCount
},pageSize:function(){return this.$store
.state
.emojiPacks
.pageSize
},remoteInstanceAddress:{get:function(){return this.$store
.state
.emojiPacks
.remoteInstance
},set:function(e
){this.$store
.dispatch("SetRemoteInstance",e
)}},remotePacks:function(){return this.$store
.state
.emojiPacks
.remotePacks
},remotePacksCount:function(){return this.$store
.state
.emojiPacks
.remotePacksCount
}},mounted:function(){this.$store
.dispatch("GetNodeInfo"),this.$store
.dispatch("NeedReboot"),this.refreshLocalPacks()},methods:{closeLocalTabs:function(){this.collapseExistingEmojis(),this.activeLocalPack
=""},closeRemoteTabs:function(){this.collapseExistingEmojis(),this.activeRemotePack
=""},collapseExistingEmojis:function(){this.$refs
.localEmojiPack
&&this.$refs
.localEmojiPack
.length
>0&&this.$refs
.localEmojiPack
.forEach(function(e
){return e
.collapse()}),this.$refs
.remoteEmojiPack
&&this.$refs
.remoteEmojiPack
.length
>0&&this.$refs
.remoteEmojiPack
.forEach(function(e
){return e
.collapse()})},createLocalPack:function(){var e
=this;this.$store
.dispatch("CreatePack",{name:this.newPackName
}).then(function(){e
.newPackName
="",e
.$store
.dispatch("FetchLocalEmojiPacks",e
.currentLocalPacksPage
),e
.$store
.dispatch("ReloadEmoji")})},handleLocalPageChange:function(e
){this.$store
.dispatch("FetchLocalEmojiPacks",e
)},handleRemotePageChange:function(e
){this.$store
.dispatch("SetRemoteEmojiPacks",{page:e
,remoteInstance:this.remoteInstanceAddress
})},importFromFS:function(){var e
=this;this.$store
.dispatch("ImportFromFS").then(function(){e
.$store
.dispatch("FetchLocalEmojiPacks",e
.currentLocalPacksPage
),e
.$store
.dispatch("ReloadEmoji")})},refreshLocalPacks:function(){try{this.$store
.dispatch("FetchLocalEmojiPacks",this.currentLocalPacksPage
)}catch(e
){return}this.$message({type:"success",message:w
.a
.t("emoji.refreshed")})},refreshRemotePacks:function(){var e
=this;return c()(s
.a
.mark(function t(){return s
.a
.wrap(function(t
){for(;;)switch(t
.prev
=t
.next
){case 0:return e
.fullscreenLoading
=!0,t
.next
=3,e
.$store
.dispatch("SetRemoteEmojiPacks",{page:1,remoteInstance:e
.remoteInstanceAddress
});case 3:e
.fullscreenLoading
=!1;case 4:case"end":return t
.stop()}},t
)}))()},reloadEmoji:function(){var e
=this;return c()(s
.a
.mark(function t(){return s
.a
.wrap(function(t
){for(;;)switch(t
.prev
=t
.next
){case 0:t
.prev
=0,e
.$store
.dispatch("ReloadEmoji"),t
.next
=7;break;case 4:return t
.prev
=4,t
.t0
=t
.catch(0),t
.abrupt("return");case 7:e
.$message({type:"success",message:w
.a
.t("emoji.reloaded")});case 8:case"end":return t
.stop()}},t
,null,[[0,4]])}))()}}},L
=(a("smuD"),Object(d
.a
)(C
,function(){var e
=this,t
=e
.$createElement
,a
=e
._self
._c
||t
;return a("div",{staticClass:"emoji-packs"},[a("div",{staticClass:"emoji-packs-header"},[a("h1",[e
._v(e
._s(e
.$t("emoji.emojiPacks")))]),e
._v(" "),a("reboot-button")],1),e
._v(" "),a("div",{staticClass:"emoji-header-container"},[a("div",{staticClass:"emoji-packs-header-button-container"},[a("el-button",{staticClass:"reload-emoji-button",on:{click:e
.reloadEmoji
}},[e
._v(e
._s(e
.$t("emoji.reloadEmoji")))]),e
._v(" "),a("el-tooltip",{attrs:{content:e
.$t("emoji.importEmojiTooltip"),effects:"dark",placement:"bottom","popper-class":"import-pack-button"}},[a("el-button",{on:{click:e
.importFromFS
}},[e
._v("\n "+e
._s(e
.$t("emoji.importPacks"))+"\n ")])],1)],1)]),e
._v(" "),a("el-tabs",{staticClass:"emoji-packs-tabs",attrs:{type:"card"},model:{value:e
.activeTab
,callback:function(t
){e
.activeTab
=t
},expression:"activeTab"}},[a("el-tab-pane",{attrs:{label:e
.$t("emoji.localPacks"),name:"local"}},[a("el-form",{staticClass:"emoji-packs-form",attrs:{"label-width":e
.labelWidth
}},[a("el-form-item",{attrs:{label:e
.$t("emoji.localPacks")}},[a("el-button",{on:{click:e
.refreshLocalPacks
}},[e
._v(e
._s(e
.$t("emoji.refreshLocalPacks")))])],1),e
._v(" "),a("el-form-item",{attrs:{label:e
.$t("emoji.createLocalPack")}},[a("div",{staticClass:"create-pack"},[a("el-input",{attrs:{placeholder:e
.$t("users.name")},model:{value:e
.newPackName
,callback:function(t
){e
.newPackName
=t
},expression:"newPackName"}}),e
._v(" "),a("el-button",{staticClass:"create-pack-button",attrs:{disabled:""===e
.newPackName
.trim()},on:{click:e
.createLocalPack
}},[e
._v("\n "+e
._s(e
.$t("users.create"))+"\n ")])],1),e
._v(" "),a("span",{staticClass:"emoji-name-warning"},[e
._v(e
._s(e
.$t("emoji.emojiWarning")))])]),e
._v(" "),Object
.keys(e
.localPacks
).length
>0?a("el-form-item",{attrs:{label:e
.$t("emoji.packs")}},e
._l(e
.localPacks
,function(t
,o
){return a("el-collapse",{key:o
,attrs:{accordion:""},on:{change:e
.closeRemoteTabs
},model:{value:e
.activeLocalPack
,callback:function(t
){e
.activeLocalPack
=t
},expression:"activeLocalPack"}},[a("local-emoji-pack",{ref:"localEmojiPack",refInFor:!0,attrs:{name:o
,pack:t
,host:e
.$store
.getters
.authHost
,"is-local":!0}})],1)}),1):e
._e()],1),e
._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{total:e
.localPacksCount
,"current-page":e
.currentLocalPacksPage
,"page-size":e
.pageSize
,"hide-on-single-page":"",layout:"prev, pager, next"},on:{"current-change":e
.handleLocalPageChange
}})],1)],1),e
._v(" "),a("el-tab-pane",{attrs:{label:e
.$t("emoji.remotePacks"),name:"remote"}},[a("el-form",{staticClass:"emoji-packs-form",attrs:{"label-width":e
.labelWidth
}},[a("el-form-item",{attrs:{label:e
.$t("emoji.remotePacks")}},[a("div",{staticClass:"create-pack"},[a("el-input",{attrs:{placeholder:e
.$t("emoji.remoteInstanceAddress")},model:{value:e
.remoteInstanceAddress
,callback:function(t
){e
.remoteInstanceAddress
=t
},expression:"remoteInstanceAddress"}}),e
._v(" "),a("el-button",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:e
.fullscreenLoading
,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],staticClass:"create-pack-button",attrs:{disabled:""===e
.remoteInstanceAddress
.trim()},on:{click:e
.refreshRemotePacks
}},[e
._v("\n "+e
._s(e
.$t("emoji.refreshRemote"))+"\n ")])],1)]),e
._v(" "),Object
.keys(e
.remotePacks
).length
>0?a("el-form-item",{attrs:{label:e
.$t("emoji.packs")}},e
._l(e
.remotePacks
,function(t
,o
){return a("el-collapse",{key:o
,attrs:{accordion:""},on:{change:e
.closeLocalTabs
},model:{value:e
.activeRemotePack
,callback:function(t
){e
.activeRemotePack
=t
},expression:"activeRemotePack"}},[a("remote-emoji-pack",{ref:"remoteEmojiPack",refInFor:!0,attrs:{"active-tab":e
.activeRemotePack
,name:o
,pack:t
,host:e
.$store
.getters
.authHost
,"is-local":!1}})],1)}),1):e
._e()],1),e
._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{total:e
.remotePacksCount
,"current-page":e
.currentRemotePacksPage
,"page-size":e
.pageSize
,"hide-on-single-page":"",layout:"prev, pager, next"},on:{"current-change":e
.handleRemotePageChange
}})],1)],1)],1)],1)},[],!1,null,null,null));L
.options
.__file
="index.vue";t
.default=L
.exports
},"4ySm":function(e
,t
,a
){"use strict";var o
=a("n6gr");a
.n(o
).a
},"6lYW":function(e
,t
,a
){},HBNe:function(e
,t
,a
){},IVv3:function(e
,t
,a
){"use strict";var o
=a("6lYW");a
.n(o
).a
},LE4i:function(e
,t
,a
){"use strict";var o
=a("HBNe");a
.n(o
).a
},QZC8:function(e
,t
,a
){},Zd0x:function(e
,t
,a
){"use strict";var o
=a("eDOw");a
.n(o
).a
},eDOw:function(e
,t
,a
){},n6gr:function(e
,t
,a
){},smuD:function(e
,t
,a
){"use strict";var o
=a("QZC8");a
.n(o
).a
}}]);
2 //# sourceMappingURL=chunk-0537.d0eef370.js.map