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AEZ8C,YAAa,CACXhD,KAAMC,OACNC,UAAU,GAEZ+C,sBAAuB,CACrBjD,KAAMC,OACNC,UAAU,GAEZ8B,MAAO,CACLhC,KAAMI,OACNF,UAAU,GAEZgB,aAAc,CACZlB,KAAMC,OACNC,UAAU,IAIdO,SAAU,CACRyC,UAAAA,GACE,OAAOvC,KAAK8B,KAAKC,EAAE,8BAA+B,CAACS,UAAWxC,KAAKoB,oBACrE,GAGFqB,OAAAA,GA1CsC,wBA4CjB,IAAIC,IAAIC,OAAOC,SAASC,MAC5BC,MACb9C,KAAK+C,0BAET,EAEAC,QAAS,CACPD,wBAAAA,GACM/C,KAAKmB,uBACPnB,KAAKiD,MAAMC,MAAMC,MAErB,IC7DJ,OAFiC,OAAgB,EAAQ,CAAC,CAAC,S,yHDNzDlD,EAAAA,EAAAA,IAOM,aANJmD,EAAAA,EAAAA,IAG8DC,EAAA,CAHnC,uBAAsB/C,EAAAc,mBAAqB,gBAAed,EAAAC,aAC1Dc,MAAOf,EAAAe,MAAQ,yBAAwBf,EAAAa,sBACxCjC,OAJ9BgB,EAAAA,EAAAA,IAAA,CAIoC,kBAAiB,CAAAoD,YAAuBhD,EAAAa,yBAC7CI,QAAOpB,EAAA4C,0BAAAA,KAAAA,EAAAA,CAAAA,uBAAAA,gBAAAA,QAAAA,yBAAAA,QAAAA,YAAAA,EAAAA,KAAAA,EAAAA,IALtCpC,EAAAA,EAAAA,OAMiCL,EAAAa,wBAAqB,WAAlDS,EAAAA,EAAAA,IACsG2B,EAAA,CAP1GtE,IAAA,EAMwDuE,IAAI,QAAS,cAAalD,EAAA8B,YAAc5C,MAAOW,EAAAoC,WAC3E,eAAcjC,EAAA+B,YAAc,0BAAyB/B,EAAAgC,uBAAAA,KAAAA,EAAAA,CAAAA,cAAAA,QAAAA,eAAAA,8BAPjFtB,EAAAA,EAAAA,IAAA,WCO4E,CAAC,YAAY,oB","sources":["webpack://agra/./app/javascript/components/members/profile-image.vue","webpack://agra/./app/javascript/components/members/profile-image.vue?ab36","webpack://agra/./app/javascript/phoenix/campaign-creator-profile.vue","webpack://agra/./app/javascript/phoenix/campaign-creator-profile.vue?c45c","webpack://agra/./app/javascript/phoenix/campaign-creator-block.vue","webpack://agra/./app/javascript/phoenix/campaign-creator-block.vue?82d6"],"sourcesContent":["<template>\n <div class=\"profile-image\" :class=\"sizeClass\">\n <img :src=\"user.profileImage.url\" :title=\"title\" :alt=\"title\">\n <div v-if=\"user.profileImage.isDefault && !suppressInitials\" class=\"initials\">\n {{ user.initials }}\n </div>\n </div>\n</template>\n\n<script>\n\nexport default {\n props: {\n user: {\n type: Object,\n required: true\n },\n title: {\n type: String,\n required: false,\n default: ''\n },\n size: {\n type: String,\n required: false,\n default: 'sm'\n },\n suppressInitials: {\n type: Boolean,\n required: false,\n default: false\n }\n },\n computed: {\n sizeClass() {\n switch (this.size) {\n case 'xs':\n case 'sm':\n case 'md':\n case 'lg':\n return `profile-image-${this.size}`\n default:\n return ''\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n .profile-image {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .initials {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: white;\n font-weight: bold;\n }\n\n .profile-image-xs {\n font-size: 8px;\n\n img {\n width: 20px;\n height: 20px;\n }\n }\n\n .profile-image-sm{\n font-size: 14px;\n\n img {\n width: 30px;\n height: 30px;\n }\n }\n\n .profile-image-md{\n font-size: 16px;\n\n img {\n width: 50px;\n height: 50px;\n }\n }\n\n .profile-image-lg {\n font-size: 20px;\n\n img {\n width: 70px;\n height: 70px;\n }\n }\n</style>\n","import { render } from \"./profile-image.vue?vue&type=template&id=21d986bf&scoped=true\"\nimport script from \"./profile-image.vue?vue&type=script&lang=js\"\nexport * from \"./profile-image.vue?vue&type=script&lang=js\"\n\nimport \"./profile-image.vue?vue&type=style&index=0&id=21d986bf&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-21d986bf\"]])\n\nexport default __exports__","<template>\n <div class=\"profile d-flex\" @click=\"$emit('click')\">\n <profile-image v-if=\"profileImage\" size=\"md\" :user=\"{profileImage, initials: profileImage.initials}\"\n :suppress-initials=\"profileImage.suppressInitials\" class=\"me-2\" />\n <div class=\"d-inline-block text-start\">\n <div class=\"small-text\">\n {{ label }}\n </div>\n\n <!-- Q: Why have a button here when the whole component is clickable?\n A: For accessibility to screenreader and keyboard navigation users -->\n <button v-if=\"campaignerContactable\" type=\"button\" :title=\"i18n.t('public.contact.contact_creator')\"\n class=\"btn btn-link unmarked-link p-0\" @click=\"$emit('click')\">\n {{ creatorDisplayName }}\n <i class=\"icon-mail\" />\n </button>\n <div v-else>\n {{ creatorDisplayName }}\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport ProfileImage from '@/components/members/profile-image'\n\nexport default {\n components: { ProfileImage },\n\n props: {\n campaignerContactable: {\n type: Boolean,\n required: true\n },\n creatorDisplayName: {\n type: String,\n required: true\n },\n label: {\n type: String,\n required: true\n },\n profileImage: {\n type: Object,\n required: false\n }\n },\n\n emits: ['click']\n}\n</script>\n","import { render } from \"./campaign-creator-profile.vue?vue&type=template&id=8a7b83ee\"\nimport script from \"./campaign-creator-profile.vue?vue&type=script&lang=js\"\nexport * from \"./campaign-creator-profile.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n <div>\n <campaign-creator-profile :creator-display-name=\"creatorDisplayName\" :profile-image=\"profileImage\"\n :label=\"label\" :campaigner-contactable=\"campaignerContactable\"\n class=\"creator-profile\" :class=\"{contactable: campaignerContactable}\"\n @click=\"openContactFormIfEnabled\" />\n <contact-message-modal v-if=\"campaignerContactable\" ref=\"modal\" :create-path=\"contactPath\" :title=\"modalTitle\"\n :current-user=\"currentUser\" :data-processing-consent=\"dataProcessingConsent\" />\n </div>\n</template>\n\n<script>\nimport CampaignCreatorProfile from './campaign-creator-profile'\nimport ContactMessageModal from '@/components/contact-message-modal'\n\nconst CONTACT_CAMPAIGNER_URL_FRAGMENT = '#contact-campaigner'\n\nexport default {\n components: { CampaignCreatorProfile, ContactMessageModal },\n\n props: {\n campaignerContactable: {\n type: Boolean,\n required: true\n },\n contactPath: {\n type: String,\n required: false\n },\n creatorDisplayName: {\n type: String,\n required: true\n },\n currentUser: {\n type: Object,\n required: false\n },\n dataProcessingConsent: {\n type: Object,\n required: true\n },\n label: {\n type: String,\n required: true\n },\n profileImage: {\n type: Object,\n required: false\n }\n },\n\n computed: {\n modalTitle() {\n return this.i18n.t('public.contact.contact_user', {user_name: this.creatorDisplayName})\n }\n },\n\n mounted() {\n // If the URL has #contact-campaigner, automatically open the contact form on page load\n const currentUrl = new URL(window.location.href)\n if (currentUrl.hash === CONTACT_CAMPAIGNER_URL_FRAGMENT) {\n this.openContactFormIfEnabled()\n }\n },\n\n methods: {\n openContactFormIfEnabled() {\n if (this.campaignerContactable) {\n this.$refs.modal.open()\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.creator-profile.contactable {\n cursor: pointer;\n\n &:hover {\n ::v-deep(.btn-link) {\n text-decoration: underline;\n }\n }\n}\n</style>\n","import { render } from \"./campaign-creator-block.vue?vue&type=template&id=3b84928a&scoped=true\"\nimport script from \"./campaign-creator-block.vue?vue&type=script&lang=js\"\nexport * from \"./campaign-creator-block.vue?vue&type=script&lang=js\"\n\nimport \"./campaign-creator-block.vue?vue&type=style&index=0&id=3b84928a&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3b84928a\"]])\n\nexport default __exports__"],"names":["key","class","props","user","type","Object","required","title","String","default","size","suppressInitials","Boolean","computed","sizeClass","this","_createElementBlock","_normalizeClass","$options","_createElementVNode","src","$props","profileImage","url","alt","_hoisted_1","_createTextVNode","isDefault","_hoisted_2","_toDisplayString","initials","_createCommentVNode","components","ProfileImage","campaignerContactable","creatorDisplayName","label","emits","onClick","_cache","$event","_ctx","$emit","_createBlock","_component_profile_image","i18n","t","_hoisted_3","_hoisted_4","CampaignCreatorProfile","ContactMessageModal","contactPath","currentUser","dataProcessingConsent","modalTitle","user_name","mounted","URL","window","location","href","hash","openContactFormIfEnabled","methods","$refs","modal","open","_createVNode","_component_campaign_creator_profile","contactable","_component_contact_message_modal","ref"],"sourceRoot":""}