{"version":3,"sources":["node_modules/@vendasta/multi-location/fesm2020/vendasta-multi-location.mjs","apps/business-center-client/src/app/reports/executive-report/interface.ts","apps/business-center-client/src/app/brands/brands.service.ts"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { Injectable, inject } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { map } from 'rxjs/operators';\nclass Access {\n static fromProto(proto) {\n let m = new Access();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.scope !== 'undefined') {\n toReturn['scope'] = this.scope;\n }\n if (typeof this.public !== 'undefined') {\n toReturn['public'] = this.public;\n }\n return toReturn;\n }\n}\nclass Brand {\n static fromProto(proto) {\n let m = new Brand();\n m = Object.assign(m, proto);\n if (proto.group) {\n m.group = Group.fromProto(proto.group);\n }\n if (proto.tabStatuses) {\n m.tabStatuses = TabStatuses.fromProto(proto.tabStatuses);\n }\n if (proto.featureStatuses) {\n m.featureStatuses = FeatureStatuses.fromProto(proto.featureStatuses);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brandPath !== 'undefined') {\n toReturn['brandPath'] = this.brandPath;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n if (typeof this.group !== 'undefined' && this.group !== null) {\n toReturn['group'] = 'toApiJson' in this.group ? this.group.toApiJson() : this.group;\n }\n if (typeof this.tabStatuses !== 'undefined' && this.tabStatuses !== null) {\n toReturn['tabStatuses'] = 'toApiJson' in this.tabStatuses ? this.tabStatuses.toApiJson() : this.tabStatuses;\n }\n if (typeof this.featureStatuses !== 'undefined' && this.featureStatuses !== null) {\n toReturn['featureStatuses'] = 'toApiJson' in this.featureStatuses ? this.featureStatuses.toApiJson() : this.featureStatuses;\n }\n if (typeof this.activatedVisibilitySources !== 'undefined') {\n toReturn['activatedVisibilitySources'] = this.activatedVisibilitySources;\n }\n return toReturn;\n }\n}\nclass BrandMetadata {\n static fromProto(proto) {\n let m = new BrandMetadata();\n m = Object.assign(m, proto);\n if (proto.created) {\n m.created = new Date(proto.created);\n }\n if (proto.updated) {\n m.updated = new Date(proto.updated);\n }\n if (proto.locations) {\n m.locations = parseInt(proto.locations, 10);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.created !== 'undefined' && this.created !== null) {\n toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;\n }\n if (typeof this.updated !== 'undefined' && this.updated !== null) {\n toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;\n }\n if (typeof this.locations !== 'undefined') {\n toReturn['locations'] = this.locations;\n }\n return toReturn;\n }\n}\nclass FeatureStatuses {\n static fromProto(proto) {\n let m = new FeatureStatuses();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.requestReviewPageEnabled !== 'undefined') {\n toReturn['requestReviewPageEnabled'] = this.requestReviewPageEnabled;\n }\n if (typeof this.requestReviewCardEnabled !== 'undefined') {\n toReturn['requestReviewCardEnabled'] = this.requestReviewCardEnabled;\n }\n if (typeof this.customerVoiceExecutiveReportEnabled !== 'undefined') {\n toReturn['customerVoiceExecutiveReportEnabled'] = this.customerVoiceExecutiveReportEnabled;\n }\n return toReturn;\n }\n}\nclass ForeignKeys {\n static fromProto(proto) {\n let m = new ForeignKeys();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.marketId !== 'undefined') {\n toReturn['marketId'] = this.marketId;\n }\n return toReturn;\n }\n}\nclass GetBrandRequest {\n static fromProto(proto) {\n let m = new GetBrandRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brandPath !== 'undefined') {\n toReturn['brandPath'] = this.brandPath;\n }\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n return toReturn;\n }\n}\nclass GetBrandResponse {\n static fromProto(proto) {\n let m = new GetBrandResponse();\n m = Object.assign(m, proto);\n if (proto.brand) {\n m.brand = Brand.fromProto(proto.brand);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brand !== 'undefined' && this.brand !== null) {\n toReturn['brand'] = 'toApiJson' in this.brand ? this.brand.toApiJson() : this.brand;\n }\n return toReturn;\n }\n}\nclass GetLocationsIdsRequest {\n static fromProto(proto) {\n let m = new GetLocationsIdsRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n return toReturn;\n }\n}\nclass GetLocationsIdsResponse {\n static fromProto(proto) {\n let m = new GetLocationsIdsResponse();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.locationIds !== 'undefined') {\n toReturn['locationIds'] = this.locationIds;\n }\n return toReturn;\n }\n}\nclass Group {\n static fromProto(proto) {\n let m = new Group();\n m = Object.assign(m, proto);\n if (proto.path) {\n m.path = Path.fromProto(proto.path);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n if (typeof this.path !== 'undefined' && this.path !== null) {\n toReturn['path'] = 'toApiJson' in this.path ? this.path.toApiJson() : this.path;\n }\n if (typeof this.name !== 'undefined') {\n toReturn['name'] = this.name;\n }\n if (typeof this.members !== 'undefined') {\n toReturn['members'] = this.members;\n }\n return toReturn;\n }\n}\nclass ListBrandsForBusinessRequest {\n static fromProto(proto) {\n let m = new ListBrandsForBusinessRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n if (typeof this.businessId !== 'undefined') {\n toReturn['businessId'] = this.businessId;\n }\n return toReturn;\n }\n}\nclass ListBrandsForBusinessResponse {\n static fromProto(proto) {\n let m = new ListBrandsForBusinessResponse();\n m = Object.assign(m, proto);\n if (proto.brands) {\n m.brands = proto.brands.map(BrandMetadata.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brands !== 'undefined' && this.brands !== null) {\n toReturn['brands'] = 'toApiJson' in this.brands ? this.brands.toApiJson() : this.brands;\n }\n return toReturn;\n }\n}\nclass ListBrandsMetadataRequest {\n static fromProto(proto) {\n let m = new ListBrandsMetadataRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.partnerId !== 'undefined') {\n toReturn['partnerId'] = this.partnerId;\n }\n return toReturn;\n }\n}\nclass ListBrandsMetadataResponse {\n static fromProto(proto) {\n let m = new ListBrandsMetadataResponse();\n m = Object.assign(m, proto);\n if (proto.brands) {\n m.brands = proto.brands.map(BrandMetadata.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brands !== 'undefined' && this.brands !== null) {\n toReturn['brands'] = 'toApiJson' in this.brands ? this.brands.toApiJson() : this.brands;\n }\n return toReturn;\n }\n}\nclass ListGroupsRequest {\n static fromProto(proto) {\n let m = new ListGroupsRequest();\n m = Object.assign(m, proto);\n if (proto.foreignKeys) {\n m.foreignKeys = ForeignKeys.fromProto(proto.foreignKeys);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groupId !== 'undefined') {\n toReturn['groupId'] = this.groupId;\n }\n if (typeof this.foreignKeys !== 'undefined' && this.foreignKeys !== null) {\n toReturn['foreignKeys'] = 'toApiJson' in this.foreignKeys ? this.foreignKeys.toApiJson() : this.foreignKeys;\n }\n return toReturn;\n }\n}\nclass ListGroupsResponse {\n static fromProto(proto) {\n let m = new ListGroupsResponse();\n m = Object.assign(m, proto);\n if (proto.groups) {\n m.groups = proto.groups.map(Group.fromProto);\n }\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.groups !== 'undefined' && this.groups !== null) {\n toReturn['groups'] = 'toApiJson' in this.groups ? this.groups.toApiJson() : this.groups;\n }\n return toReturn;\n }\n}\nclass Path {\n static fromProto(proto) {\n let m = new Path();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.nodes !== 'undefined') {\n toReturn['nodes'] = this.nodes;\n }\n return toReturn;\n }\n}\nclass SyncBrandRequest {\n static fromProto(proto) {\n let m = new SyncBrandRequest();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.brandPath !== 'undefined') {\n toReturn['brandPath'] = this.brandPath;\n }\n return toReturn;\n }\n}\nclass TabStatuses {\n static fromProto(proto) {\n let m = new TabStatuses();\n m = Object.assign(m, proto);\n return m;\n }\n constructor(kwargs) {\n if (!kwargs) {\n return;\n }\n Object.assign(this, kwargs);\n }\n toApiJson() {\n const toReturn = {};\n if (typeof this.reviewsTabEnabled !== 'undefined') {\n toReturn['reviewsTabEnabled'] = this.reviewsTabEnabled;\n }\n if (typeof this.listingsTabEnabled !== 'undefined') {\n toReturn['listingsTabEnabled'] = this.listingsTabEnabled;\n }\n if (typeof this.socialTabEnabled !== 'undefined') {\n toReturn['socialTabEnabled'] = this.socialTabEnabled;\n }\n if (typeof this.insightsTabEnabled !== 'undefined') {\n toReturn['insightsTabEnabled'] = this.insightsTabEnabled;\n }\n if (typeof this.mapTabEnabled !== 'undefined') {\n toReturn['mapTabEnabled'] = this.mapTabEnabled;\n }\n if (typeof this.advertisingTabEnabled !== 'undefined') {\n toReturn['advertisingTabEnabled'] = this.advertisingTabEnabled;\n }\n if (typeof this.reportTabEnabled !== 'undefined') {\n toReturn['reportTabEnabled'] = this.reportTabEnabled;\n }\n if (typeof this.dataExportTabEnabled !== 'undefined') {\n toReturn['dataExportTabEnabled'] = this.dataExportTabEnabled;\n }\n if (typeof this.websiteTabEnabled !== 'undefined') {\n toReturn['websiteTabEnabled'] = this.websiteTabEnabled;\n }\n if (typeof this.googleQAndATabEnabled !== 'undefined') {\n toReturn['googleQAndATabEnabled'] = this.googleQAndATabEnabled;\n }\n if (typeof this.keywordTrackingTabEnabled !== 'undefined') {\n toReturn['keywordTrackingTabEnabled'] = this.keywordTrackingTabEnabled;\n }\n return toReturn;\n }\n}\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// Objects Index.\n// *********************************\n\nconst environment = (window ? window['environment'] : 'prod') ?? 'prod';\nconst hostMap = {\n 'local': 'multi-location-api.vendasta-local.com',\n 'test': '',\n 'demo': 'multi-location-api-demo.apigateway.co',\n 'prod': 'multi-location-api-prod.apigateway.co',\n 'production': 'multi-location-api-prod.apigateway.co'\n};\nlet HostService = /*#__PURE__*/(() => {\n class HostService {\n get host() {\n return hostMap[environment.toLowerCase()];\n }\n get hostWithScheme() {\n return 'https://' + this.host;\n }\n }\n HostService.ɵfac = function HostService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || HostService)();\n };\n HostService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HostService,\n factory: HostService.ɵfac,\n providedIn: 'root'\n });\n return HostService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// *********************************\n// Code generated by sdkgen\n// DO NOT EDIT!.\n//\n// API Service.\n// *********************************\nlet MultiLocationApiService = /*#__PURE__*/(() => {\n class MultiLocationApiService {\n constructor() {\n this.hostService = inject(HostService);\n this.http = inject(HttpClient);\n this._host = this.hostService.hostWithScheme;\n }\n apiOptions() {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n withCredentials: true\n };\n }\n syncBrand(r) {\n const request = r.toApiJson ? r : new SyncBrandRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/SyncBrand\", request.toApiJson(), {\n ...this.apiOptions(),\n observe: 'response'\n });\n }\n listGroups(r) {\n const request = r.toApiJson ? r : new ListGroupsRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/ListGroups\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListGroupsResponse.fromProto(resp)));\n }\n getBrand(r) {\n const request = r.toApiJson ? r : new GetBrandRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/GetBrand\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetBrandResponse.fromProto(resp)));\n }\n getLocationIds(r) {\n const request = r.toApiJson ? r : new GetLocationsIdsRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/GetLocationIds\", request.toApiJson(), this.apiOptions()).pipe(map(resp => GetLocationsIdsResponse.fromProto(resp)));\n }\n listBrandsMetadata(r) {\n const request = r.toApiJson ? r : new ListBrandsMetadataRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/ListBrandsMetadata\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListBrandsMetadataResponse.fromProto(resp)));\n }\n listBrandsForBusiness(r) {\n const request = r.toApiJson ? r : new ListBrandsForBusinessRequest(r);\n return this.http.post(this._host + \"/multilocation.v1.MultiLocation/ListBrandsForBusiness\", request.toApiJson(), this.apiOptions()).pipe(map(resp => ListBrandsForBusinessResponse.fromProto(resp)));\n }\n }\n MultiLocationApiService.ɵfac = function MultiLocationApiService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MultiLocationApiService)();\n };\n MultiLocationApiService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MultiLocationApiService,\n factory: MultiLocationApiService.ɵfac,\n providedIn: 'root'\n });\n return MultiLocationApiService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MultiLocationService = /*#__PURE__*/(() => {\n class MultiLocationService {\n constructor(api) {\n this.api = api;\n }\n listGroups(groupId, partnerId, marketId = '') {\n const request = {\n groupId,\n foreignKeys: {\n partnerId,\n marketId\n }\n };\n return this.api.listGroups(request).pipe(map(resp => resp.groups));\n }\n getBrand(brandPath) {\n const request = {\n brandPath\n };\n return this.api.getBrand(request).pipe(map(resp => resp.brand));\n }\n getBrandByGroup(groupId) {\n const request = {\n groupId\n };\n return this.api.getBrand(request).pipe(map(resp => resp.brand));\n }\n listBrandsMetadata(partnerId) {\n return this.api.listBrandsMetadata({\n partnerId: partnerId\n }).pipe(map(resp => resp.brands));\n }\n listBrandsForBusiness(partnerId, businessId) {\n return this.api.listBrandsForBusiness({\n partnerId,\n businessId\n }).pipe(map(resp => resp.brands));\n }\n }\n MultiLocationService.ɵfac = function MultiLocationService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || MultiLocationService)(i0.ɵɵinject(MultiLocationApiService));\n };\n MultiLocationService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MultiLocationService,\n factory: MultiLocationService.ɵfac,\n providedIn: 'root'\n });\n return MultiLocationService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Access, Brand, BrandMetadata, FeatureStatuses, ForeignKeys, GetBrandRequest, GetBrandResponse, GetLocationsIdsRequest, GetLocationsIdsResponse, Group, ListBrandsForBusinessRequest, ListBrandsForBusinessResponse, ListBrandsMetadataRequest, ListBrandsMetadataResponse, ListGroupsRequest, ListGroupsResponse, MultiLocationService, Path, SyncBrandRequest, TabStatuses };\n","import { ExecutiveReportSectionInterface } from './report-section/interface';\n\n/**\n * ExecutiveReportSection\n * A enum containing each possible section that can appear in the list. This will need to be\n * kept in-sync with AvailableExecutiveReportSections\n */\nexport const ExecutiveReportSection = {\n CUSTOMER_RELATIONS: 'CUSTOMER_RELATIONS',\n OVERVIEW: 'OVERVIEW',\n GOOGLE_MY_BUSINESS: 'GOOGLE_MY_BUSINESS',\n LISTINGS: 'LISTINGS',\n REPUTATION: 'REPUTATION',\n SOCIAL: 'SOCIAL',\n ADVERTISING: 'ADVERTISING',\n WEBSITE: 'WEBSITE',\n FILES: 'FILES',\n SERVICES: 'SERVICES',\n SEO: 'SEO',\n ACCOUNTING: 'ACCOUNTING',\n} as const;\n\nexport type ExecutiveReportSection = (typeof ExecutiveReportSection)[keyof typeof ExecutiveReportSection];\n\n/**\n * AvailableExecutiveReportSections\n * A list of available sections that can be in the executive report. If you are adding a new section,\n * please add it to the ExecutiveReportSection enum above.\n */\nexport const AvailableExecutiveReportSections: Record = {\n OVERVIEW: {\n uniqueId: 'overview',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.OVERVIEW',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.OVERVIEW',\n iconName: 'timeline',\n hideTitle: true,\n },\n FILES: {\n uniqueId: 'files',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.FILES',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.FILES',\n sectionDescriptionKey: '',\n iconName: 'description',\n hideTitle: true,\n },\n CUSTOMER_RELATIONS: {\n uniqueId: 'customer_relations',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.CUSTOMER_RELATIONS',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.CUSTOMER_RELATIONS',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.CUSTOMER_RELATIONS',\n iconName: 'people',\n },\n GOOGLE_MY_BUSINESS: {\n uniqueId: 'gmb',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.GOOGLE_MY_BUSINESS',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.GOOGLE_MY_BUSINESS',\n iconUrl: 'google-logo-2.svg',\n },\n SEO: {\n uniqueId: 'seo',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SEO',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SEO',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.SEO',\n iconName: 'search',\n },\n LISTINGS: {\n uniqueId: 'listings',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.LISTINGS',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.LISTINGS',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.LISTINGS',\n iconName: 'place',\n },\n ADVERTISING: {\n uniqueId: 'advertising',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.ADVERTISING',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.ADVERTISING',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.ADVERTISING',\n iconName: 'public',\n },\n WEBSITE: {\n uniqueId: 'website',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.WEBSITE',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.WEBSITE',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.WEBSITE',\n iconName: 'web',\n },\n REPUTATION: {\n uniqueId: 'reputation',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.REPUTATION',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.REPUTATION',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.REPUTATION',\n iconName: 'star',\n },\n SOCIAL: {\n uniqueId: 'social',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SOCIAL',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SOCIAL',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.SOCIAL',\n iconName: 'chat_bubble',\n },\n SERVICES: {\n uniqueId: 'services',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SERVICES',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.SERVICES',\n sectionDescriptionKey: 'EXECUTIVE_REPORT.CATEGORY_QUESTION.SERVICES',\n iconName: 'check_circle',\n },\n ACCOUNTING: {\n uniqueId: 'accounting',\n sectionId: 'EXECUTIVE_REPORT.CATEGORY_TITLE.ACCOUNTING',\n sectionTitleKey: 'EXECUTIVE_REPORT.CATEGORY_TITLE.ACCOUNTING',\n iconName: 'local_atm',\n },\n};\n","import { Injectable } from '@angular/core';\nimport { Brand as MultiLocationBrand, MultiLocationService } from '@vendasta/multi-location';\nimport {\n filter,\n tap,\n distinctUntilChanged,\n combineLatest,\n switchMap,\n startWith,\n catchError,\n Observable,\n ReplaySubject,\n of,\n map,\n shareReplay,\n} from 'rxjs';\nimport { partnerId } from '../../globals';\nimport { LocationsService, isBrand } from '../locations';\nimport { ExecutiveReportSection } from '../reports/executive-report/interface';\nimport { BrandsApiService, Group } from './brands.api.service';\nimport { Brand } from './brand';\n\n@Injectable({ providedIn: 'root' })\nexport class BrandsService {\n public currentBrand$ = this.locationsService.currentLocation$.pipe(\n filter(isBrand),\n tap(() => this.setPath(null)),\n shareReplay(1),\n );\n\n private path$$ = new ReplaySubject(1);\n public path$ = combineLatest([this.currentBrand$, this.path$$]).pipe(\n map(([brand, path]) => (path ? path : brand.groupNodes)),\n distinctUntilChanged((a, b) => a.join('|') === b.join('|')),\n shareReplay(1),\n );\n\n public allGroups$ = this.path$.pipe(\n switchMap((path) => {\n return this.brandsApiService.listChildGroups(partnerId, path.join('|')).pipe(startWith(null as Group[]));\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n public childGroups$ = this.path$.pipe(\n switchMap((path) => {\n return this.brandsApiService.listChildGroups(partnerId, path.join('|')).pipe(startWith(null as Group[]));\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n public hasChildGroups$ = this.childGroups$.pipe(\n map((childGroups) => {\n if (!childGroups) {\n return undefined;\n } else {\n return childGroups.length > 0;\n }\n }),\n shareReplay({ refCount: true, bufferSize: 1 }),\n );\n\n disabledExecutiveReportSections$ = this.currentBrand$.pipe(\n map((brand) => {\n const disabledSections: ExecutiveReportSection[] = [];\n // Check Google My Business Insights\n if (!brand.insightsTabVisible) {\n disabledSections.push(ExecutiveReportSection.GOOGLE_MY_BUSINESS);\n }\n // Check Listings tab\n if (!brand.listingsTabVisible) {\n disabledSections.push(ExecutiveReportSection.LISTINGS);\n }\n // Check Social tab\n if (!brand.socialTabVisible) {\n disabledSections.push(ExecutiveReportSection.SOCIAL);\n }\n // Check Advertising tab\n if (!brand.advertisingTabVisible) {\n disabledSections.push(ExecutiveReportSection.ADVERTISING);\n }\n // Check Website tab\n if (!brand.websiteTabVisible) {\n disabledSections.push(ExecutiveReportSection.WEBSITE);\n }\n // Check Reviews tab\n if (!brand.reviewsTabVisible) {\n disabledSections.push(ExecutiveReportSection.REPUTATION);\n }\n return disabledSections;\n }),\n );\n\n constructor(\n private locationsService: LocationsService,\n private brandsApiService: BrandsApiService,\n private multiLocationService: MultiLocationService,\n ) {}\n\n public setPath(path: string[]): void {\n this.path$$.next(path);\n }\n\n public clearPath(): void {\n this.path$$.next(null);\n }\n\n getBrand(path: string = null): Observable {\n return of(path).pipe(\n switchMap((path) => {\n //path could be either a brand path or a group id.\n if (path.startsWith(`G-`)) {\n return this.multiLocationService.getBrandByGroup(path).pipe(\n //A brand name could potentially start with `G-` so on 404s we can fallback to the brand path\n catchError((err) => {\n if (err?.status == 404) {\n return this.multiLocationService.getBrand(`${partnerId}|${path}`);\n }\n throw err;\n }),\n );\n } else if (path.startsWith(`${partnerId}|`)) {\n return this.multiLocationService.getBrand(path);\n } else {\n return this.multiLocationService.getBrand(`${partnerId}|${path}`);\n }\n }),\n map((brand: MultiLocationBrand) => new Brand(brand)),\n );\n }\n}\n"],"mappings":"sZAAA,IA2BMA,EA4CAC,EAyCAC,EA0BAC,EAuBAC,EAuBAC,EAuBAC,EAoBAC,EAoBAC,EAgCAC,EAuBAC,EAuBAC,EAoBAC,EAuBAC,EA0BAC,EAuBAC,EAoBAC,EAoBAC,EA0DAC,GACAC,GAOFC,GA6BAC,GAwDAC,EAhmBJC,EAAAC,EAAA,KAAAC,IACAA,IACAC,KACAC,KAwBM3B,EAAN,MAAM4B,CAAM,CACV,OAAO,UAAUC,EAAO,CACtB,IAAIC,EAAI,IAA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d,CACT,CAAC,CAAC,CAOD,CAEI1B,QAAQQ,EAAc,CAC3B,KAAKN,OAAOuC,KAAKjC,CAAI,CACvB,CAEOkC,WAAS,CACd,KAAKxC,OAAOuC,KAAK,IAAI,CACvB,CAEAE,SAASnC,EAAe,KAAI,CAC1B,OAAOoC,EAAGpC,CAAI,EAAEZ,KACdmB,EAAWP,GAELA,EAAKqC,WAAW,IAAI,EACf,KAAKpD,qBAAqBqD,gBAAgBtC,CAAI,EAAEZ,KAErDmD,EAAYC,GAAO,CACjB,GAAIA,GAAKC,QAAU,IACjB,OAAO,KAAKxD,qBAAqBkD,SAAS,GAAG1B,CAAS,IAAIT,CAAI,EAAE,EAElE,MAAMwC,CACR,CAAC,CAAC,EAEKxC,EAAKqC,WAAW,GAAG5B,CAAS,GAAG,EACjC,KAAKxB,qBAAqBkD,SAASnC,CAAI,EAEvC,KAAKf,qBAAqBkD,SAAS,GAAG1B,CAAS,IAAIT,CAAI,EAAE,CAEnE,EACDF,EAAKC,GAA8B,IAAI2C,EAAM3C,CAAK,CAAC,CAAC,CAExD,iDA1GWzB,GAAaqE,EAAAC,CAAA,EAAAD,EAAAE,CAAA,EAAAF,EAAAG,CAAA,CAAA,CAAA,CAAA,iCAAbxE,EAAayE,QAAbzE,EAAa0E,UAAAC,WADA,MAAM,CAAA,CAAA,SACnB3E,CAAa,GAAA","names":["Brand","BrandMetadata","FeatureStatuses","ForeignKeys","GetBrandRequest","GetBrandResponse","GetLocationsIdsRequest","GetLocationsIdsResponse","Group","ListBrandsForBusinessRequest","ListBrandsForBusinessResponse","ListBrandsMetadataRequest","ListBrandsMetadataResponse","ListGroupsRequest","ListGroupsResponse","Path","SyncBrandRequest","TabStatuses","environment","hostMap","HostService","MultiLocationApiService","MultiLocationService","init_vendasta_multi_location","__esmMin","init_core","init_http","init_operators","_Brand","proto","m","kwargs","toReturn","_BrandMetadata","_FeatureStatuses","_ForeignKeys","_GetBrandRequest","_GetBrandResponse","_GetLocationsIdsRequest","_GetLocationsIdsResponse","_Group","_ListBrandsForBusinessRequest","_ListBrandsForBusinessResponse","_ListBrandsMetadataRequest","_ListBrandsMetadataResponse","_ListGroupsRequest","_ListGroupsResponse","_Path","_SyncBrandRequest","_TabStatuses","__ngFactoryType__","ɵɵdefineInjectable","inject","HttpClient","HttpHeaders","r","request","__spreadProps","__spreadValues","map","resp","api","groupId","partnerId","marketId","brandPath","businessId","ɵɵinject","ExecutiveReportSection","AvailableExecutiveReportSections","init_interface","__esmMin","CUSTOMER_RELATIONS","OVERVIEW","GOOGLE_MY_BUSINESS","LISTINGS","REPUTATION","SOCIAL","ADVERTISING","WEBSITE","FILES","SERVICES","SEO","ACCOUNTING","uniqueId","sectionId","sectionTitleKey","iconName","hideTitle","sectionDescriptionKey","iconUrl","BrandsService","init_brands_service","__esmMin","init_esm","init_globals","init_locations","init_interface","init_brand","constructor","locationsService","brandsApiService","multiLocationService","currentBrand$","currentLocation$","pipe","filter","isBrand","tap","setPath","shareReplay","path$$","ReplaySubject","path$","combineLatest","map","brand","path","groupNodes","distinctUntilChanged","a","b","join","allGroups$","switchMap","listChildGroups","partnerId","startWith","refCount","bufferSize","childGroups$","hasChildGroups$","childGroups","length","disabledExecutiveReportSections$","disabledSections","insightsTabVisible","push","ExecutiveReportSection","GOOGLE_MY_BUSINESS","listingsTabVisible","LISTINGS","socialTabVisible","SOCIAL","advertisingTabVisible","ADVERTISING","websiteTabVisible","WEBSITE","reviewsTabVisible","REPUTATION","next","clearPath","getBrand","of","startsWith","getBrandByGroup","catchError","err","status","Brand","ɵɵinject","LocationsService","BrandsApiService","MultiLocationService","factory","ɵfac","providedIn"],"x_google_ignoreList":[0]}