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AQzE,EACrBuE,EAAOxB,GAAO0B,EAElB,OAAOF,CAAM,C,wDCTV,MAAMlG,EAAiB,CAC5B2B,MAAO,CACL0E,aAAc,CACZvF,KAAMe,OACNI,QAAS,IAEXjB,WAAY,CACVF,KAAMe,OACNI,QAAS,IAEXL,sBAAuB,CACrBd,KAAMe,OACNC,UAAU,GAEZwE,QAAS,CACPxF,KAAMe,OACNI,QAAS,eAIbsE,MAAO,CAAC,UAERjE,IAAAA,GACE,MAAO,CACL3B,QAAS,8BACTE,MAAO2B,KAAK6D,aAEhB,EAEA5D,SAAU,CACRtB,eAAAA,GACE,YAAmCK,IAA/BgB,KAAKZ,sBACAY,KAAKZ,sBAELY,KAAKY,KAAKC,EAAE,mCAEvB,GAGFC,QAAS,CACP/C,MAAAA,GACEiC,KAAKgE,MAAM,SAAUhE,KAAK3B,MAC5B,G","sources":["webpack://agra/./app/javascript/local/search-bar.vue","webpack://agra/./app/javascript/local/search-bar.vue?ac78","webpack://agra/./app/javascript/location-search/location-search-mixin.js","webpack://agra/./app/javascript/location-search/geoip-country-mixin.js","webpack://agra/./app/javascript/components/inputs/locations/location-search.vue","webpack://agra/./app/javascript/components/inputs/locations/location-search.vue?a578","webpack://agra/./node_modules/vue-loader/dist/exportHelper.js","webpack://agra/./app/javascript/location-search/search-bar-mixin.js"],"sourcesContent":["\n\n\n\n\n","import { render } from \"./search-bar.vue?vue&type=template&id=33abc7c2&scoped=true\"\nimport script from \"./search-bar.vue?vue&type=script&lang=js\"\nexport * from \"./search-bar.vue?vue&type=script&lang=js\"\n\nimport \"./search-bar.vue?vue&type=style&index=0&id=33abc7c2&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-33abc7c2\"]])\n\nexport default __exports__","import GeoipCountryMixin from '@/location-search/geoip-country-mixin'\nimport { nextTick } from 'vue'\n\nexport const locationSearchMixin = {\n mixins: [ GeoipCountryMixin ],\n\n props: {\n customPlaceholderText: {\n type: String,\n required: false\n },\n customSearchButtonText: {\n type: String,\n required: false\n },\n distanceHint: {\n type: String,\n required: false,\n default: ''\n },\n extraParameters: {\n type: Object,\n required: false,\n default: () => ({})\n },\n initialLocationQuery: {\n type: String,\n required: false,\n default: ''\n },\n lookupUrl: {\n type: String,\n required: true\n }\n },\n\n data() {\n return {\n searchQuery: this.initialLocationQuery\n }\n },\n\n computed: {\n extraParameterPairs() {\n return Object.entries(this.extraParameters).map(e => ({name: e[0], value: e[1]}))\n },\n\n searchBiasCountry() {\n return this.agraConfiguration.locationSearchBias.country\n },\n\n searchButtonText() {\n if (this.customSearchButtonText !== undefined) {\n return this.customSearchButtonText\n } else {\n return this.i18n.t('buttons.lookup')\n }\n }\n },\n\n methods: {\n search(query) {\n this.searchQuery = query\n nextTick(() => {\n this.$refs.form.submit()\n })\n }\n }\n}\n","export default {\n computed: {\n geoipEnabled() {\n return !!this.geoipHostname\n },\n\n geoipHostname() {\n return this.agraConfiguration.geoipHostname\n }\n },\n\n created() {\n // Kick off the geoip call that will set agraConfiguration.locationSearchBias.country, which\n // we'll want to pass along with location search requests.\n // Q: What happens if this isn't done by the time the user makes a search request?\n // A: That's fine, it's not a big deal, their search just won't have the country biasing on it.\n if (this.geoipEnabled) {\n this.setLocationSearchBiasCountryFromGeoip()\n }\n },\n\n methods: {\n fetchGeoipInformation() {\n return new Promise((resolve) => {\n // Q: Why not use our ajax helper?\n // A: It runs into a CORS issue trying to make this external request\n fetch(`https://${this.geoipHostname}/geoip`).then((resp) => {\n resp.json().then((jsonResponse) => {\n resolve(jsonResponse)\n })\n })\n })\n },\n\n setLocationSearchBiasCountryFromGeoip() {\n if (!this.agraConfiguration.locationSearchBias.country) {\n this.fetchGeoipInformation().then((jsonResponse) => {\n const countryCode = jsonResponse.country_code.toUpperCase()\n this.agraConfiguration.locationSearchBias.country = countryCode\n })\n }\n }\n }\n}\n","\n\n\n\n\n","import { render } from \"./location-search.vue?vue&type=template&id=3af2ee0f&scoped=true\"\nimport script from \"./location-search.vue?vue&type=script&lang=js\"\nexport * from \"./location-search.vue?vue&type=script&lang=js\"\n\nimport \"./location-search.vue?vue&type=style&index=0&id=3af2ee0f&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-3af2ee0f\"]])\n\nexport default __exports__","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\n","export const searchBarMixin = {\n props: {\n initialQuery: {\n type: String,\n default: ''\n },\n inputClass: {\n type: String,\n default: ''\n },\n customPlaceholderText: {\n type: String,\n required: false\n },\n variant: {\n type: String,\n default: 'inputGroup'\n }\n },\n\n emits: ['search'],\n\n data() {\n return {\n inputId: 'location-search-query-input',\n query: this.initialQuery\n }\n },\n\n computed: {\n placeholderText() {\n if (this.customPlaceholderText !== undefined) {\n return this.customPlaceholderText\n } else {\n return this.i18n.t('public.local_search.search_label')\n }\n }\n },\n\n methods: {\n search() {\n this.$emit('search', this.query)\n }\n }\n}\n"],"names":["class","mixins","searchBarMixin","_createElementBlock","onSubmit","_cache","_withModifiers","args","_ctx","search","_createElementVNode","_hoisted_1","id","inputId","$event","query","type","_normalizeClass","inputClass","name","placeholder","placeholderText","_hoisted_2","_createTextVNode","_renderSlot","$slots","undefined","locationSearchMixin","GeoipCountryMixin","props","customPlaceholderText","String","required","customSearchButtonText","distanceHint","default","extraParameters","Object","initialLocationQuery","lookupUrl","data","searchQuery","this","computed","extraParameterPairs","entries","map","e","value","searchBiasCountry","agraConfiguration","locationSearchBias","country","searchButtonText","i18n","t","methods","nextTick","$refs","form","submit","geoipEnabled","geoipHostname","created","setLocationSearchBiasCountryFromGeoip","fetchGeoipInformation","Promise","resolve","fetch","then","resp","json","jsonResponse","countryCode","country_code","toUpperCase","key","components","SearchBar","ref","action","method","_Fragment","_renderList","extraParam","_hoisted_3","_hoisted_4","_createCommentVNode","_createVNode","_component_search_bar","onSearch","_withCtx","title","_hoisted_5","_","_hoisted_6","_hoisted_7","_toDisplayString","exports","sfc","target","__vccOpts","val","initialQuery","variant","emits","$emit"],"sourceRoot":""}