<commit_before>/**
  * AlertLink objects are view models for buttons or links representing profile alerts
  *
  * Do not create AlertLink objects directly, but use the factory function fromProfileAlert.
  * Some AlertLink objects require additional objects beyond ProfileAlerts to build
  * their properties. See documentation for fromProfileAlert below.
  *
  * @module
  */
'use strict';

var RouteParser = require('../utils/Router').RouteParser;

/**
 * Mapping of ProfileAlert alertName values to the properties specific to them used
 * in initializing an AlertLink.
 *
 * @private
 **/
var alertPresets = {
        positionservices: {
            label: 'Add details to your listing',
            route: new RouteParser('/servicesOverview/:jobTitleID')
        },
        availability: {
            label: 'When can you be booked?',
            route: new RouteParser('/schedulingPreferences')
        },
        personalinfo: {
            label: 'How do we reach you?',
            route: new RouteParser('/aboutMe')
        },
        photo: {
            label: 'Add your profile photo',
            route: new RouteParser('/aboutMe')
        },
        payment: {
            label: 'How do you want to be paid?',
            route: new RouteParser('/paymentAccount')
        },
        pricingdetails: {
            label: 'Create a bookable offering',
            route: new RouteParser('/serviceProfessionalService/:jobTitleID?mustReturn=marketplaceJobtitles/:jobTitleID')
        },
        publicbio: {
            label: 'Add a personal bio',
            route: new RouteParser('/aboutMe')
        },
        professionallicense: {
            label: 'Verify your professional license or certification',
            route: new RouteParser('/licensesCertifications/:jobTitleID')
        },
        location: {
            label: 'Where do you work?',
            route: new RouteParser('/serviceAddresses/:jobTitleID')
        },
        'add-education': {
            label: 'Add training or education',
            route: new RouteParser('/education')
        },
        verifyemail: {
              label: 'Verify your account (check your e-mail)',
              route: new RouteParser('/verifications')
        },
        showcasework: {
            label: 'Add photos of your work',
            route: new RouteParser('/workPhotos/:jobTitleID')
        },
        'required-professionallicense': {
              label: 'Verify your professional license or certification',
              route: new RouteParser('/licensesCertifications/:jobTitleID')
        }
    },
    undefinedPreset = { label: '', route: { reverse: function() { return ''; } } };

/*
 * Creates an AlertLink. Do not initialize directly.
 *
 * @class
 */
var AlertLink = function(label, href) {
    this._label = label;<commit_msg>Updated AlertLink presets so links without job-title has correct mustReturn parameters to fix backlinks #514<commit_after>/**
  * AlertLink objects are view models for buttons or links representing profile alerts
  *
  * Do not create AlertLink objects directly, but use the factory function fromProfileAlert.
  * Some AlertLink objects require additional objects beyond ProfileAlerts to build
  * their properties. See documentation for fromProfileAlert below.
  *
  * @module
  */
'use strict';

var RouteParser = require('../utils/Router').RouteParser;

/**
 * Mapping of ProfileAlert alertName values to the properties specific to them used
 * in initializing an AlertLink.
 *
 * @private
 **/
var alertPresets = {
        positionservices: {
            label: 'Add details to your listing',
            route: new RouteParser('/servicesOverview/:jobTitleID')
        },
        availability: {
            label: 'When can you be booked?',
            route: new RouteParser('/schedulingPreferences?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        personalinfo: {
            label: 'How do we reach you?',
            route: new RouteParser('/aboutMe?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        photo: {
            label: 'Add your profile photo',
            route: new RouteParser('/aboutMe?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        payment: {
            label: 'How do you want to be paid?',
            route: new RouteParser('/paymentAccount?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        pricingdetails: {
            label: 'Create a bookable offering',
            route: new RouteParser('/serviceProfessionalService/:jobTitleID')
        },
        publicbio: {
            label: 'Add a personal bio',
            route: new RouteParser('/aboutMe?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        professionallicense: {
            label: 'Verify your professional license or certification',
            route: new RouteParser('/licensesCertifications/:jobTitleID')
        },
        location: {
            label: 'Where do you work?',
            route: new RouteParser('/serviceAddresses/:jobTitleID')
        },
        'add-education': {
            label: 'Add training or education',
            route: new RouteParser('/education?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        verifyemail: {
              label: 'Verify your account (check your e-mail)',
              route: new RouteParser('/verifications?mustReturn=marketplaceJobtitles/:jobTitleID&returnText=Back to listing')
        },
        showcasework: {
            label: 'Add photos of your work',
            route: new RouteParser('/workPhotos/:jobTitleID')
        },
        'required-professionallicense': {
              label: 'Verify your professional license or certification',
              route: new RouteParser('/licensesCertifications/:jobTitleID')
        }
    },
    undefinedPreset = { label: '', route: { reverse: function() { return ''; } } };

/*
 * Creates an AlertLink. Do not initialize directly.
 *
 * @class
 */
var AlertLink = function(label, href) {
    this._label = label;
{'fraction_non_alphanumeric': 0.10245636716224951, 'fraction_numerical': 0.0004848093083387201, 'mean_word_length': 2.4231194690265485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6185281', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1539, 'n_words': 461}