{"version":3,"sources":["webpack:///./src/components/Account/components/ChangeProfilePicture/Index.vue?473a","webpack:///./src/components/Account/components/ChangeProfilePicture/attrs/computed.js","webpack:///./src/components/Account/components/ChangeProfilePicture/attrs/data.js","webpack:///./src/components/Account/components/ChangeProfilePicture/attrs/methods.js","webpack:///./src/components/Account/components/ChangeProfilePicture/attrs/props.js","webpack:///./src/components/Account/components/ChangeProfilePicture/index.js","webpack:///./src/components/Account/components/ChangeProfilePicture","webpack:///./src/components/Account/components/ChangeProfilePicture/Index.vue","webpack:///../../../src/components/VDivider/VDivider.ts","webpack:///./src/components/Register/components/ProfessionalRegister/Header.vue?0bae","webpack:///src/components/Register/components/ProfessionalRegister/Header.vue","webpack:///./src/components/Register/components/ProfessionalRegister/Header.vue?b190","webpack:///./src/components/Register/components/ProfessionalRegister/Header.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","includes","$vuetify","breakpoint","name","$route","hidden","attrs","view","on","selectProfilePicture","user","photo","match","style","_e","currentPicture","_v","ref","$event","startImageCropping","model","value","callback","$$v","showCropper","expression","croppingImage","aspectRatio","width","preventDefault","setPhoto","showErrorDialog","domProps","_s","error","staticRenderFns","$store","state","session","photo_images","user_default","$refs","click","event","self","input","target","files","reader","FileReader","onload","e","totalMb","total","result","openCropper","readAsDataURL","api","getApiClient","userId","id","photoCropper","getResult","canvas","toDataURL","patch","headers","then","commit","data","catch","console","log","String","type","Boolean","default","computed","methods","props","components","Cropper","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCol","VDialog","VDivider","VIcon","VSpacer","inset","vertical","$attrs","role","orientation","h","themeClasses","$listeners","meta","slimHeader","ChangeProfilePicture","VRow"],"mappings":"qJAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACE,YAAY,mCAAmCC,MAAM,CAC3J,sBAAuB,CAAC,KAAM,KAAM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,EAAY,eACd,EACA3F,EACA4C,GACA,EACA,KACA,KACA,MAIa,aAAA+C,EAAiB,QAKhC,IAAkBA,EAAW,CAACsB,OAAA","file":"js/ProfessionalRegisterHeader.03eb9c00.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-col',{staticClass:\"change-profile-picture-container\",class:{\n 'no-vertical-padding': ['xs', 'sm', 'md'].includes(_vm.$vuetify.breakpoint.name),\n 'right-fix': ['ProfessionalRegister', 'ContractorRegister'].includes(_vm.$route.name),\n 'hidden': _vm.hidden\n },attrs:{\"cols\":\"7\"}},[_c('div',{staticClass:\"box box__secondary box__slimmest box__square box__input media-input\",class:{\n 'box__light': _vm.view === 'professional',\n 'box__dark': _vm.view === 'contractor'\n },on:{\"click\":_vm.selectProfilePicture}},[(_vm.user.photo && _vm.user.photo.match(/base64/g))?_c('div',{staticClass:\"media-preview\",style:((\"background-image: url('\" + (_vm.user.photo) + \"')\"))},[_c('v-icon',{staticClass:\"castfy-icon castfy-icon__edit\"})],1):_vm._e(),(_vm.currentPicture)?_c('div',{staticClass:\"media-preview\",style:((\"background-image: url('\" + _vm.currentPicture + \"')\"))},[_c('v-icon',{staticClass:\"castfy-icon castfy-icon__edit\",attrs:{\"color\":\"white\"}})],1):_vm._e(),_c('h2',[_vm._v(\"Insira uma foto de perfil\")]),_c('input',{ref:\"profilePicture\",attrs:{\"type\":\"file\",\"accept\":\"image/*\"},on:{\"change\":function($event){return _vm.startImageCropping($event)}}})]),(_vm.croppingImage)?_c('v-dialog',{attrs:{\"width\":\"500\"},model:{value:(_vm.showCropper),callback:function ($$v) {_vm.showCropper=$$v},expression:\"showCropper\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline grey lighten-2\",attrs:{\"primary-title\":\"\"}},[_vm._v(\" Cortar imagem \")]),_c('v-card-text',[_c('cropper',{ref:\"photoCropper\",attrs:{\"src\":_vm.croppingImage,\"stencil-props\":{\n aspectRatio: 3/4,\n width: 800\n }}})],1),_c('v-divider'),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"primary\",\"text\":\"\"},on:{\"click\":function($event){$event.preventDefault();return _vm.setPhoto(_vm.croppingImage)}}},[_vm._v(\" Atualizar foto \")])],1)],1)],1):_vm._e(),_c('v-dialog',{attrs:{\"max-width\":['xs', 'sm'].includes(_vm.$vuetify.breakpoint.name) ? '100%' : '50%'},model:{value:(_vm.showErrorDialog),callback:function ($$v) {_vm.showErrorDialog=$$v},expression:\"showErrorDialog\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline\"},[_vm._v(\"Erro\")]),_c('v-card-text',{attrs:{\"align\":\"center\"},domProps:{\"innerHTML\":_vm._s(_vm.error)}}),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{attrs:{\"color\":\"blue darken-1\",\"text\":\"\"},on:{\"click\":function($event){_vm.showErrorDialog = false}}},[_vm._v(\"OK\")])],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export default {\n currentPicture() {\n return this.$store?.state?.session?.user?.photo_images?.user_default\n }\n}\n","export default function() {\n return {\n croppingImage: {},\n showCropper: false,\n user: {\n photo: null,\n photo_images: []\n },\n error: null,\n showErrorDialog: false,\n }\n}\n","import getApiClient from '@/plugins/api-client'\n\nexport default {\n selectProfilePicture: function() {\n this.$refs['profilePicture'].click()\n },\n\n startImageCropping: function(event) {\n const self = this\n\n let input = event.target;\n if (input.files && input.files[0]) {\n let reader = new FileReader();\n reader.onload = (e) => {\n let totalMb = e.total / 1000000\n if (totalMb > 10) {\n self.error = 'A nova imagem de perfil não pode ter mais de 10MB. Escolha uma imagem menor.'\n self.showErrorDialog = true\n return\n }\n self.user.photo = e.target.result\n self.openCropper(self.user.photo)\n };\n reader.readAsDataURL(input.files[0]);\n }\n },\n\n openCropper: function (photo) {\n const self = this\n\n self.showCropper = true\n self.croppingImage = photo\n },\n\n setPhoto: function() {\n const self = this,\n api = getApiClient(self.$store),\n userId = self.$store.state.session.user.id\n\n self.showCropper = false\n const { canvas } = self.$refs.photoCropper.getResult();\n self.user.photo = canvas.toDataURL('image/jpeg', 70)\n\n api.patch(`profile_picture/${userId}`, self.user, {\n headers: {\n 'Content-Type': 'application/merge-patch+json'\n }\n })\n .then(result => {\n self.$store.commit('updateUserProfilePicture', result?.data?.photo_images)\n self.user.photo_images = result?.data?.photo_images\n })\n .catch(error => {\n console.log(error)\n })\n }\n}\n","export default {\n view: String,\n hidden: {\n type: Boolean,\n default: false\n }\n}\n","import computed from './attrs/computed'\nimport data from './attrs/data'\nimport methods from './attrs/methods'\nimport props from './attrs/props'\n\nimport { Cropper } from 'vue-advanced-cropper'\n\nexport default {\n name: 'ChangeProfilePicture',\n computed,\n data,\n methods,\n props,\n components: {\n Cropper\n }\n}\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/eslint-loader/index.js??ref--13-0!./index.js?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/eslint-loader/index.js??ref--13-0!./index.js?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Index.vue?vue&type=template&id=3fb15879&\"\nimport script from \"./index.js?vue&type=script&lang=js&\"\nexport * from \"./index.js?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VDialog,VDivider,VIcon,VSpacer})\n","// Styles\nimport './VDivider.sass'\n\n// Types\nimport { VNode } from 'vue'\n\n// Mixins\nimport Themeable from '../../mixins/themeable'\n\nexport default Themeable.extend({\n name: 'v-divider',\n\n props: {\n inset: Boolean,\n vertical: Boolean,\n },\n\n render (h): VNode {\n // WAI-ARIA attributes\n let orientation\n if (!this.$attrs.role || this.$attrs.role === 'separator') {\n orientation = this.vertical ? 'vertical' : 'horizontal'\n }\n return h('hr', {\n class: {\n 'v-divider': true,\n 'v-divider--inset': this.inset,\n 'v-divider--vertical': this.vertical,\n ...this.themeClasses,\n },\n attrs: {\n role: 'separator',\n 'aria-orientation': orientation,\n ...this.$attrs,\n },\n on: this.$listeners,\n })\n },\n})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:{\n 'row-header': ['xs', 'sm', 'md'].includes(_vm.$vuetify.breakpoint.name)\n}},[_c('div',{staticClass:\"box box__primary box__dark text-center box__header-title\",class:{'box__header-title-slim': _vm.$route.meta.slimHeader}},[_c('h2',[_vm._v(\"Trabalhar\")])]),_c('v-row',{class:{'justify-end align-content-end': ! ['xs', 'sm', 'md'].includes(_vm.$vuetify.breakpoint.name)}},[_c('ChangeProfilePicture',{attrs:{\"view\":\"professional\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Header.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Header.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Header.vue?vue&type=template&id=177fde75&\"\nimport script from \"./Header.vue?vue&type=script&lang=js&\"\nexport * from \"./Header.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VRow})\n"],"sourceRoot":""}