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,oDAnBHX,GAAqBpC,gDAArBoC,EAAqBnC,QAArBmC,EAAqB,YAArBA,GAAb,GCFaY,EAAb,MAAM,QACJpJ,YAAoByI,oCAEpBE,QAAQC,EAA+BhC,GACrC,MAAMf,EAAW+C,EAAMnE,OAAOS,GAC9B,OAAIW,EACK5F,KAAKwI,0BAA0B7C,qBAAqBP,MACzDwD,OAAK7B,IACCA,EAAW3H,QAAU,GACvBY,KAAKwI,0BAA0BN,qBAAqBtC,MAGxDkD,aAGKI,MAAG,oDAfHC,GAA8BhD,qCAA9BgD,EAA8B/C,QAA9B+C,EAA8B,YAA9BA,GAAb","names":["dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","getRandomValues","rnds8","Uint8Array","crypto","bind","msCrypto","Error","g","uuid","REGEX","byteToHex","i","push","toString","substr","P","options","buf","offset","rnds","random","rng","arr","length","undefined","toLowerCase","validate","TypeError","stringify","Guid_regex","NewGuid","Empty_Guid","guid","test","constructor","this","search","locations","languages","onlyPublished","onlyPending","onlyWithAvailableSlot","pageIndex","pageSize","fromDate","dateFilter","format","duration","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","addMonths","dateWithDays","addDays","msToAdd","getTime","add","times","cities","capacity","sort","templateId","arranger","available","categories","onlyApprove","onlyFeatureCourse","DigitalCourseActions","FetchDigitalCourses","createAction","props","FetchDigitalCourse","SaveCourseReview","FetchCourseAdvantage","FetchCourseQuestion","AddDigitalCourses","AddDigitalCourse","AddSelectedDigitalCourse","AddSelectedCourse","AddCourseAdvantage","AddCourseQuestion","RemoveSelectedDigitalCourse","AddTotalCount","AddCourseReview","AddError","digitalCourseAdapter","createEntityAdapter","digitalCourseFeatureKey","DigitalCourseApiService","BaseApiService","http","configService","super","config","getCurrent","services","course","booking","getAllDigitalCourse","queryParams","filter","DigitalCourseFilter","params","HttpParams","append","name","pageOffset","String","getAllWithPagination","baseUrl","getDigitalCourse","id","Guid","get","pipe","map","response","getDigitalCourseReviews","sendCourseReview","review","post","getCourseAdvantage","courseId","getCourseFaq","checkPartnerIdentity","phone","userUrl","isUserReview","userId","i0","factory","selectAll","getDigitalCourseState","createFeatureSelector","getAllDigitalCourses","createSelector","getSelectedDigitalCourse","state","entities","selectedDigitalCourseId","getAdvantages","advantages","getQuestions","questions","error","totalCount","DigitalCourseStoreService","store","fetchAllDigitalCourses","dispatch","fromAction","fetchDigitalCourse","select","fromSelector","slug","find","courseSlug","addSelectedDigitalCourse","digitalCourseId","removeSelectedDigitalCourse","fetchCourseAdvantage","fetchCourseQuestion","getCourseQuestion","addError","submitCourseReview","DigitalCourseResolver","digitalCourseStoreService","metaService","resolve","route","tap","digitalCourseOGMetaTag","first","Boolean","Object","keys","of","DigitalCourseAdvantageResolver"],"sources":["./node_modules/date-fns/esm/addDays/index.js","./node_modules/uuid/dist/esm-browser/rng.js","./node_modules/uuid/dist/esm-browser/regex.js","./node_modules/uuid/dist/esm-browser/validate.js","./node_modules/uuid/dist/esm-browser/stringify.js","./node_modules/uuid/dist/esm-browser/v4.js","./src/app/modules/core/utils/guid.ts","./src/app/modules/course/classroom/models/course-filter.ts","./node_modules/date-fns/esm/add/index.js","./src/app/modules/course/digitalcourse/models/course-filter.ts","./src/app/modules/course/digitalcourse/store/digital-course.action.ts","./src/app/modules/course/digitalcourse/store/digital-course.entity.ts","./src/app/modules/course/digitalcourse/store/digital-course.state.ts","./src/app/modules/course/digitalcourse/store/services/digital-course.api.service.ts","./src/app/modules/course/digitalcourse/store/digital-course.selector.ts","./src/app/modules/course/digitalcourse/store/services/digital-course.store.service.ts","./src/app/modules/course/digitalcourse/store/services/digital-course.resolver.ts","./src/app/modules/course/digitalcourse/store/services/digital-course-advantage.resolver.ts"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  date.setDate(date.getDate() + amount);\n  return date;\n}","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n  // lazy load so that environments that need to polyfill have a chance to do so\n  if (!getRandomValues) {\n    // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n    // find the complete implementation of crypto (msCrypto) on IE11.\n    getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n    if (!getRandomValues) {\n      throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n    }\n  }\n\n  return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n  return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n  byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  // Note: Be careful editing this code!  It's been tuned for performance\n  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n  var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one\n  // of the following:\n  // - One or more input array values don't map to a hex octet (leading to\n  // \"undefined\" in the uuid)\n  // - Invalid input values for the RFC `version` or `variant` fields\n\n  if (!validate(uuid)) {\n    throw TypeError('Stringified UUID is invalid');\n  }\n\n  return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n  options = options || {};\n  var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n  rnds[6] = rnds[6] & 0x0f | 0x40;\n  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n  if (buf) {\n    offset = offset || 0;\n\n    for (var i = 0; i < 16; ++i) {\n      buf[offset + i] = rnds[i];\n    }\n\n    return buf;\n  }\n\n  return stringify(rnds);\n}\n\nexport default v4;","import * as uuid from 'uuid';\n\nconst Empty_Guid = '00000000-0000-0000-0000-000000000000';\nconst Guid_regex = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/;\n\nexport class Guid {\n  public static NewGuid(): string {\n    return uuid.v4();\n  }\n\n  public static EmptyGuid(): string {\n    return Empty_Guid;\n  }\n\n  public static IsGuid(guid: string): boolean {\n    if (!guid) {\n      return false;\n    } else {\n      return Guid_regex.test(guid);\n    }\n  }\n}\n","import { format, add } from 'date-fns';\nimport { TimeFilter } from '@shared/models/time-filter';\n\nexport class ClassroomCourseFilter {\n  constructor() {\n    this.search = '';\n    this.locations = [];\n    this.languages = [];\n    this.onlyPublished = true;\n    this.onlyPending = false;\n    this.onlyWithAvailableSlot = true;\n    this.pageIndex = 0;\n    this.pageSize = 10;\n    (this.fromDate = ''), (this.toDate = '');\n    this.dateFilter = format(add(new Date(), { days: 1 }), 'yyyy-MM-dd');\n    this.times = [];\n    this.cities = [];\n    this.capacity = null;\n    this.sort = 'random';\n    this.templateId = ''\n  }\n  search: string;\n  locations?: string[];\n  capacity?: number;\n  languages?: string[];\n  onlyPublished: boolean;\n  onlyPending: boolean;\n  onlyWithAvailableSlot: boolean;\n  pageIndex: number;\n  pageSize: number;\n  fromDate: string;\n  toDate: string;\n  dateFilter: string;\n  times?: TimeFilter[];\n  cities?: string[];\n  sort: string;\n  templateId?: string;\n  categories?: string;\n}\n","import addDays from \"../addDays/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n *\n * | Key            | Description                        |\n * |----------------|------------------------------------|\n * | years          | Amount of years to be added        |\n * | months         | Amount of months to be added       |\n * | weeks          | Amount of weeks to be added        |\n * | days           | Amount of days to be added         |\n * | hours          | Amount of hours to be added        |\n * | minutes        | Amount of minutes to be added      |\n * | seconds        | Amount of seconds to be added      |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport default function add(dirtyDate, duration) {\n  requiredArgs(2, arguments);\n  if (!duration || typeof duration !== 'object') return new Date(NaN);\n  var years = duration.years ? toInteger(duration.years) : 0;\n  var months = duration.months ? toInteger(duration.months) : 0;\n  var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n  var days = duration.days ? toInteger(duration.days) : 0;\n  var hours = duration.hours ? toInteger(duration.hours) : 0;\n  var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n  var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Add years and months\n\n  var date = toDate(dirtyDate);\n  var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date; // Add weeks and days\n\n  var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds\n\n  var minutesToAdd = minutes + hours * 60;\n  var secondsToAdd = seconds + minutesToAdd * 60;\n  var msToAdd = secondsToAdd * 1000;\n  var finalDate = new Date(dateWithDays.getTime() + msToAdd);\n  return finalDate;\n}","import { CategoryRef } from '@shared/models/category-ref';\n\nexport class DigitalCourseFilter {\n  constructor() {\n    this.arranger = '';\n    this.available = 0;\n    this.categories = '';\n    this.onlyApprove = false;\n    this.onlyFeatureCourse = false;\n    (this.fromDate = ''), (this.toDate = '');\n\n    this.search = '';\n    this.sort = '';\n    this.pageIndex = 0;\n    this.pageSize = 10;\n  }\n  arranger: string;\n  available: number;\n  categories?: string;\n  onlyApprove: boolean;\n  onlyFeatureCourse: boolean;\n  onlyPublished: boolean;\n  fromDate: string;\n  toDate: string;\n  search: string;\n  sort: string;\n  pageIndex: number;\n  pageSize: number;\n}\n","import { createAction, props } from '@ngrx/store';\n\nimport { Review } from '@shared/models/review';\nimport { Advantage, DigitalCourse, DigitalCourseFilter, DigitalCourseQueryParams, Question } from '../models';\n\nexport enum DigitalCourseActions {\n  FetchDigitalCourses = '[Api/Course] Fetch Digital Courses',\n  FetchDigitalCourse = '[Api/Course] Fetch Digital Course',\n  FetchCourseAdvantage = '[Api/Course] Fetch Course Advantage',\n  FetchCourseQuestion = '[Api/Course] Fetch Course Frequently Asked Questions',\n  SaveCourseReview = '\"[Api] Save Course Review\"',\n\n  AddDigitalCourses = '[DigitalCourse] Add Digital Courses',\n  AddDigitalCourse = '[DigitalCourse] Add Digital Course',\n  AddCourseAdvantage = '[DigitalCourse] Add Course Advantage',\n  AddCourseQuestion = '[DigitalCourse] Add Course Frequently Asked Questions',\n  AddSelectedCourse = '[DigitalCourse] Add Selected Digital Course Id',\n  RemoveSelectedDigitalCourse = '[DigitalCourse] Remove Selected Digital Course Id',\n  AddTotalCount = '[DigitalCourse] Add Digital Course Total Count',\n  AddCourseReview = '[DigitalCourse] Add Course review',\n  AddError = '[DigitalCourse] Add Digital Course Error',\n}\n\n// Effects Actions\nexport const FetchDigitalCourses = createAction(\n  DigitalCourseActions.FetchDigitalCourses,\n  props<{ queryParams: DigitalCourseQueryParams; filter?: DigitalCourseFilter }>()\n);\nexport const FetchDigitalCourse = createAction(DigitalCourseActions.FetchDigitalCourse, props<{ courseId: string }>());\nexport const SaveCourseReview = createAction(\n  DigitalCourseActions.SaveCourseReview,\n  props<{ courseId: string; review: Review }>()\n);\nexport const FetchCourseAdvantage = createAction(\n  DigitalCourseActions.FetchCourseAdvantage,\n  props<{ courseId: string }>()\n);\nexport const FetchCourseQuestion = createAction(\n  DigitalCourseActions.FetchCourseQuestion,\n  props<{ courseId: string }>()\n);\n\n// Store Actions\nexport const AddDigitalCourses = createAction(\n  DigitalCourseActions.AddDigitalCourses,\n  props<{ courses: DigitalCourse[] }>()\n);\nexport const AddDigitalCourse = createAction(DigitalCourseActions.AddDigitalCourse, props<{ course: DigitalCourse }>());\nexport const AddSelectedDigitalCourse = createAction(\n  DigitalCourseActions.AddSelectedCourse,\n  props<{ digitalCourseId: string }>()\n);\nexport const AddCourseAdvantage = createAction(\n  DigitalCourseActions.AddCourseAdvantage,\n  props<{ advantages: Advantage[] }>()\n);\nexport const AddCourseQuestion = createAction(\n  DigitalCourseActions.AddCourseQuestion,\n  props<{ questions: Question[] }>()\n);\nexport const RemoveSelectedDigitalCourse = createAction(DigitalCourseActions.RemoveSelectedDigitalCourse);\n\nexport const AddTotalCount = createAction(DigitalCourseActions.AddTotalCount, props<{ totalCount: number }>());\nexport const AddCourseReview = createAction(DigitalCourseActions.AddCourseReview, props<{ review: Review }>());\nexport const AddError = createAction(DigitalCourseActions.AddError, props<{ error: any }>());\n","import { EntityAdapter, createEntityAdapter } from '@ngrx/entity';\nimport { DigitalCourse } from '@modules/course/digitalcourse/models';\n\nexport const digitalCourseAdapter: EntityAdapter<DigitalCourse> = createEntityAdapter<DigitalCourse>();\n","import { EntityState } from '@ngrx/entity';\nimport { Advantage, DigitalCourse, DigitalCourseFilter, Question } from '@modules/course/digitalcourse/models';\n\nexport const digitalCourseFeatureKey = 'digitalcourse';\n\nexport interface DigitalCourseState extends EntityState<DigitalCourse> {\n  selectedDigitalCourseId: string;\n  error: any;\n  totalCount: number;\n  filter: DigitalCourseFilter;\n  advantages: Advantage[];\n  questions: Question[];\n}\n","import { HttpClient, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\nimport { Advantage, DigitalCourse, DigitalCourseFilter, DigitalCourseQueryParams } from '../../models';\nimport { Question } from '../../models/question';\nimport { BaseApiService } from '@core/http/base.api.service';\nimport { ConfigService } from '@core/services/config.service';\nimport { PageList } from '@core/models/page-list';\nimport { Guid } from '@core/utils/guid';\nimport { Review } from '@shared/models/review';\nimport { Participant } from '@modules/course/classroom/models/participant';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class DigitalCourseApiService extends BaseApiService {\n  constructor(public http: HttpClient, private configService: ConfigService) {\n    super(http);\n  }\n\n  get baseUrl(): string {\n    const config = this.configService.getCurrent();\n    return `${config.services.course}/api/course`;\n  }\n\n  get userUrl(): string {\n    const config = this.configService.getCurrent();\n    return `${config.services.booking}/api/user`;\n  }\n\n  getAllDigitalCourse(\n    queryParams: DigitalCourseQueryParams,\n    filter = new DigitalCourseFilter()\n  ):  Observable<PageList<DigitalCourse>> {\n    const params = new HttpParams()\n      .append('search', queryParams.name)\n      .append('sort', queryParams.sort || '')\n      .append('pageOffset', queryParams.pageOffset ? String(queryParams.pageOffset) : '0')\n      .append('pageSize', queryParams.pageSize ? String(queryParams.pageSize) : '10')\n      .append('categories', filter.categories)\n      .append('onlyApproved', filter.onlyApprove ? 'true' : 'false')\n      .append('onlyPublished', 'true')\n      .append('from', filter.fromDate)\n      .append('to', filter.toDate);\n\n    return super.getAllWithPagination<DigitalCourse>(this.baseUrl,  params );\n  }\n\n\n  getDigitalCourse(id: string): Observable<DigitalCourse> {\n    if (Guid.IsGuid(id)) {\n      return this.http.get<DigitalCourse>(`${this.baseUrl}/${id}`).pipe(map((response) => response));\n    } else {\n      return this.http.get<DigitalCourse>(`${this.baseUrl}/${id}/slug`).pipe(map((response) => response));\n    }\n  }\n\n  getDigitalCourseReviews(\n    id: string,\n    pageOffset: number = 0,\n    pageSize: number = 3,\n    sort: string = 'rating desc'\n  ): Observable<PageList<Review>> {\n    const params = new HttpParams()\n      .append('pageOffset', pageOffset.toString())\n      .append('pageSize', pageSize.toString())\n      .append('sort', sort);\n\n    return super.getAllWithPagination<Review>(`${this.baseUrl}/${id}/review`, params);\n  }\n\n  sendCourseReview(id: string, review: Review): Observable<Review> {\n    return this.http.post<Review>(`${this.baseUrl}/${id}/review`, review);\n  }\n\n  getCourseAdvantage(courseId: string): Observable<Advantage[]> {\n    return this.http.get<Advantage[]>(`${this.baseUrl}/${courseId}/getadvantages`);\n  }\n\n  getCourseFaq(courseId: string): Observable<Question[]> {\n    return this.http.get<Question[]>(`${this.baseUrl}/${courseId}/questions`);\n  }\n\n  checkPartnerIdentity(phone: string): Observable<Participant> {\n    return this.http.post<Participant>(`${this.userUrl}/getUserInfoByPhoneOrEmail`,{ phone });\n  }\n\n  isUserReview(userId: string, courseId: string): Observable<boolean> {\n    return this.http.get<boolean>(`${this.baseUrl}/${courseId}/getreview?userId=${userId}`);\n  }\n}\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { digitalCourseAdapter } from './digital-course.entity';\nimport { DigitalCourseState, digitalCourseFeatureKey } from './digital-course.state';\n\nexport const { selectAll, selectEntities, selectIds, selectTotal } = digitalCourseAdapter.getSelectors();\n\nexport const getDigitalCourseState = createFeatureSelector<DigitalCourseState>(digitalCourseFeatureKey);\n\nexport const getAllDigitalCourses = createSelector(getDigitalCourseState, selectAll);\n\nexport const getDigitalCourseById = (id: string) =>\n  createSelector(getDigitalCourseState, (state) => state.entities[id]);\nexport const getDigitalCourseBySlug = (slug: string) =>\n  createSelector(getAllDigitalCourses, (state) => {\n    return state.find((course) => course.courseSlug === slug);\n    /*for (const [key, value] of Object.entries(state.entities)) {\n    if(value.courseSlug === slug) return state.entities[key];\n  }*/\n  });\n\nexport const getSelectedDigitalCourse = createSelector(\n  getDigitalCourseState,\n  (state) => state.entities[state.selectedDigitalCourseId]\n);\nexport const getDigitalCourseId = createSelector(getDigitalCourseState, (state) => state.selectedDigitalCourseId);\nexport const getAdvantages = createSelector(getDigitalCourseState, (state) => state.advantages);\nexport const getQuestions = createSelector(getDigitalCourseState, (state) => state.questions);\n\nexport const getError = createSelector(getDigitalCourseState, (state) => state.error);\n\nexport const getFilter = createSelector(getDigitalCourseState, (state) => state.filter);\n\nexport const getTotalCount = createSelector(getDigitalCourseState, (state) => state.totalCount);\n","import { Injectable } from '@angular/core';\nimport { select, Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { Guid } from '@core/utils/guid';\nimport { Review } from '@shared/models/review';\nimport { Advantage, DigitalCourse, DigitalCourseFilter, DigitalCourseQueryParams, Question } from '../../models';\nimport { DigitalCourseState } from '../digital-course.state';\nimport * as fromAction from '../digital-course.action';\nimport * as fromSelector from '../digital-course.selector';\n\n@Injectable()\nexport class DigitalCourseStoreService {\n  constructor(private store: Store<DigitalCourseState>) {}\n\n  fetchAllDigitalCourses(queryParams: DigitalCourseQueryParams, filter?: DigitalCourseFilter): void {\n    this.store.dispatch(fromAction.FetchDigitalCourses({ queryParams, filter }));\n  }\n\n  fetchDigitalCourse(courseId: string): void {\n    this.store.dispatch(fromAction.FetchDigitalCourse({ courseId }));\n  }\n\n  getAllDigitalCourse(): Observable<DigitalCourse[]> {\n    return this.store.pipe(select(fromSelector.getAllDigitalCourses));\n  }\n\n  getDigitalCourse(courseId: string): Observable<DigitalCourse> {\n    if (Guid.IsGuid(courseId)) {\n      return this.store.select(fromSelector.getDigitalCourseById(courseId));\n    } else {\n      return this.store.select(fromSelector.getDigitalCourseBySlug(courseId));\n    }\n  }\n\n  addSelectedDigitalCourse(digitalCourseId: string): void {\n    this.store.dispatch(fromAction.AddSelectedDigitalCourse({ digitalCourseId }));\n  }\n\n  getSelectedDigitalCourse(): Observable<DigitalCourse> {\n    return this.store.pipe(select(fromSelector.getSelectedDigitalCourse));\n  }\n\n  removeSelectedDigitalCourse(): void {\n    this.store.dispatch(fromAction.RemoveSelectedDigitalCourse());\n  }\n\n  fetchCourseAdvantage(courseId: string): void {\n    this.store.dispatch(fromAction.FetchCourseAdvantage({ courseId }));\n  }\n\n  getCourseAdvantage(): Observable<Advantage[]> {\n    return this.store.select(fromSelector.getAdvantages);\n  }\n\n  fetchCourseQuestion(courseId: string): void {\n    this.store.dispatch(fromAction.FetchCourseQuestion({ courseId }));\n  }\n\n  getCourseQuestion(): Observable<Question[]> {\n    return this.store.select(fromSelector.getQuestions);\n  }\n\n  addError(error: any): void {\n    this.store.dispatch(fromAction.AddError(error));\n  }\n\n  submitCourseReview(id: string, review: Review): void {\n    this.store.dispatch(fromAction.SaveCourseReview({ courseId: id, review: review }));\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { MetaTagService } from '@core/services/meta-tag.service';\nimport { Observable, of } from 'rxjs';\nimport { tap, first } from 'rxjs/operators';\n\nimport { DigitalCourse } from '../../models';\nimport { DigitalCourseStoreService } from './digital-course.store.service';\n\n@Injectable()\nexport class DigitalCourseResolver implements Resolve<DigitalCourse> {\n  constructor(\n    private digitalCourseStoreService: DigitalCourseStoreService,\n    private metaService: MetaTagService) {}\n\n  resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<DigitalCourse> {\n    const courseId = route.params['id'];\n    if (courseId) {\n      return this.digitalCourseStoreService.getDigitalCourse(courseId).pipe(\n        tap((course) => {\n          if (!course) {\n            this.digitalCourseStoreService.fetchDigitalCourse(courseId);\n          } else {\n            this.metaService.digitalCourseOGMetaTag(course);\n          }\n        }),\n        first(course => course && Boolean(Object.keys(course).length > 0))\n      );\n    } else {\n      return of(null);\n    }\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { Advantage } from '../../models';\nimport { DigitalCourseStoreService } from './digital-course.store.service';\n\n@Injectable()\nexport class DigitalCourseAdvantageResolver implements Resolve<Advantage[]> {\n  constructor(private digitalCourseStoreService: DigitalCourseStoreService) {}\n\n  resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Advantage[]> {\n    const courseId = route.params['id'];\n    if (courseId) {\n      return this.digitalCourseStoreService.getCourseAdvantage().pipe(\n        tap((advantages) => {\n          if (advantages.length <= 0) {\n            this.digitalCourseStoreService.fetchCourseAdvantage(courseId);\n          }\n        }),\n        first()\n      );\n    } else {\n      return of(null);\n    }\n  }\n}\n"],"sourceRoot":"webpack:///","file":"563.8f2e08743a86552dbd53.js"}