1"use strict";(self["webpackChunkaura_admin"]=self["webpackChunkaura_admin"]||[]).push([[7974],{7974:function(a,e,i){i.r(e),i.d(e,{default:function(){return d}});var t=function(){var a=this,e=a._self._c;return a.userId&&a.userId.length>0?e("v-dialog",{attrs:{persistent:"","max-width":"400"},scopedSlots:a._u([{key:"activator",fn:function(i){var t=i.on;return[e("v-btn",a._g({staticClass:"mt-2",attrs:{color:"primary",depressed:"",loading:a.imageUploading,dark:""}},t),[a._v(a._s(a.buttonName||"or Upload")+" ")])]}}],null,!1,3921014922),model:{value:a.imageDialog,callback:function(e){a.imageDialog=e},expression:"imageDialog"}},[e("v-card",[e("v-card-title",{staticClass:"google-font"},[a._v("Upload "+a._s(a.userId)+"'s Image")]),e("v-card-text",[e("v-img",{staticClass:"mb-6",attrs:{src:a.imagePre}}),e("v-file-input",{attrs:{accept:"image/*",label:"Select Image","prepend-icon":"mdi-image","show-size":"",outlined:""},on:{change:a.onFileChange},model:{value:a.imageUpload,callback:function(e){a.imageUpload=e},expression:"imageUpload"}}),e("p",{staticClass:"google-font my-0",staticStyle:{color:"red"}},[a._v(" *Image should be in jpeg/jpg/png/webp/ico/svg only ")])],1),e("v-card-actions",[e("v-spacer"),e("v-btn",{attrs:{color:"green darken-1",text:""},on:{click:function(e){a.imageDialog=!1}}},[a._v("Discard")]),e("v-btn",{attrs:{color:"green darken-1",text:"",loading:a.imageUploading},on:{click:a.uploadImage}},[a._v("Upload Image")])],1)],1)],1):a._e()},o=[],n=(i(8706),i(2010),i(806)),s={name:"ImageUpload",props:["type","userId","buttonName"],data:function(){return{imageDialog:!1,imageUploading:!1,imagePre:"",imageUpload:[]}},methods:{onFileChange:function(){var a=this;if(this.imagePre="",this.imageUpload&&void 0!=this.imageUpload){var e=new FileReader;e.readAsDataURL(this.imageUpload),e.onload=function(){a.imagePre=e.result}}},uploadImage:function(){var a=this;if(!this.userId||this.userId.length<1)return this.$emit("message","Id is Empty"),this.imageUploading=!1,void(this.imageDialog=!1);this.imageUploading=!0;var e=this.imageUpload.name.split(".").pop();if("jpeg"!=e&&"jpg"!=e&&"png"!=e&&"webp"!=e&&"JFIF"!=e&&"ico"!=e&&"svg"!=e)return this.$emit("message","Please choose image format in jpeg/jpg/png/webp/JFIF/ico/svg"),void(this.imageUploading=!1);var i="".concat(this.type,"/").concat(this.userId,".").concat(e),t=n.A.storage.ref(i);t.put(this.imageUpload).then((function(e){t.getDownloadURL().then((function(e){a.$emit("message","Image Uploaded kindly Save the Data"),a.$emit("uploadedImage",e),a.imageUploading=!1,a.imageDialog=!1})).catch((function(e){a.imageUploading=!1,a.$emit("message",e)}))})).catch((function(e){a.imageUploading=!1,a.$emit("emptyUserId",e)}))}}},g=s,l=i(1656),r=(0,l.A)(g,t,o,!1,null,null,null),d=r.exports}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.