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AAM,0B,gBAENoC,EAAAA,EAAAA,IASMI,EAAAA,GAAA,MAAAC,EAAAA,EAAAA,IARcE,EAAYvC,KAAKC,UAAQ,SAApCW,G,kBADToB,EAAAA,EAAAA,IASM,OAPHQ,IAAK5B,EACNhB,MAAM,UACLgD,SAAKC,EAAAA,EAAAA,KAAA,SAAAC,GAAA,OAAeR,EAAA3B,KAAK4B,EAAYrC,KAAOU,EAAS2B,EAAYvC,KAAKyC,MAAK,wB,EAE5EM,EAAAA,EAAAA,GAEC,OADEC,IAAKT,EAAYrC,KAAOU,G","sources":["webpack://pleroma_fe/./src/components/sticker_picker/sticker_picker.vue","webpack://pleroma_fe/./src/components/sticker_picker/sticker_picker.js","webpack://pleroma_fe/./src/components/sticker_picker/sticker_picker.vue?a437"],"sourcesContent":["<template>\n <div\n class=\"sticker-picker\"\n >\n <tab-switcher\n class=\"tab-switcher\"\n :render-only-focused=\"true\"\n scrollable-tabs\n >\n <div\n v-for=\"stickerpack in pack\"\n :key=\"stickerpack.path\"\n :image-tooltip=\"stickerpack.meta.title\"\n :image=\"stickerpack.path + stickerpack.meta.tabIcon\"\n class=\"sticker-picker-content\"\n >\n <div\n v-for=\"sticker in stickerpack.meta.stickers\"\n :key=\"sticker\"\n class=\"sticker\"\n @click.stop.prevent=\"pick(stickerpack.path + sticker, stickerpack.meta.title)\"\n >\n <img\n :src=\"stickerpack.path + sticker\"\n >\n </div>\n </div>\n </tab-switcher>\n </div>\n</template>\n\n<script src=\"./sticker_picker.js\"></script>\n\n<style lang=\"scss\">\n@import \"../../variables\";\n\n.sticker-picker {\n width: 100%;\n\n .contents {\n min-height: 250px;\n\n .sticker-picker-content {\n display: flex;\n flex-wrap: wrap;\n padding: 0 4px;\n\n .sticker {\n display: flex;\n flex: 1 1 auto;\n margin: 4px;\n width: 56px;\n height: 56px;\n\n img {\n height: 100%;\n\n &:hover {\n filter: drop-shadow(0 0 5px var(--accent, $fallback--link));\n }\n }\n }\n }\n }\n}\n\n</style>\n","/* eslint-env browser */\nimport statusPosterService from '../../services/status_poster/status_poster.service.js'\nimport TabSwitcher from '../tab_switcher/tab_switcher.jsx'\n\nconst StickerPicker = {\n components: {\n TabSwitcher\n },\n data () {\n return {\n meta: {\n stickers: []\n },\n path: ''\n }\n },\n computed: {\n pack () {\n return this.$store.state.instance.stickers || []\n }\n },\n methods: {\n clear () {\n this.meta = {\n stickers: []\n }\n },\n pick (sticker, name) {\n const store = this.$store\n // TODO remove this workaround by finding a way to bypass reuploads\n fetch(sticker)\n .then((res) => {\n res.blob().then((blob) => {\n const file = new File([blob], name, { mimetype: 'image/png' })\n const formData = new FormData()\n formData.append('file', file)\n statusPosterService.uploadMedia({ store, formData })\n .then((fileData) => {\n this.$emit('uploaded', fileData)\n this.clear()\n }, (error) => {\n console.warn(\"Can't attach sticker\")\n console.warn(error)\n this.$emit('upload-failed', 'default')\n })\n })\n })\n }\n }\n}\n\nexport default StickerPicker\n","import { render } from \"./sticker_picker.vue?vue&type=template&id=9bba01dc\"\nimport script from \"./sticker_picker.js?vue&type=script&lang=js\"\nexport * from \"./sticker_picker.js?vue&type=script&lang=js\"\n\nimport \"./sticker_picker.vue?vue&type=style&index=0&id=9bba01dc&lang=scss\"\n\nimport exportComponent from \"/opt/pleroma/anni_config/pleroma-fe/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["class","components","TabSwitcher","data","meta","stickers","path","computed","pack","this","$store","state","instance","methods","clear","pick","sticker","name","_this","store","fetch","then","res","blob","file","File","mimetype","formData","FormData","append","statusPosterService","fileData","$emit","error","console","warn","_createElementBlock","_hoisted_1","_createVNode","_component_tab_switcher","_Fragment","_renderList","_ctx","stickerpack","key","title","image","tabIcon","onClick","_withModifiers","$event","_createElementVNode","src"],"sourceRoot":""}