[[ titleText ]] [[ copyText ]]
/* global window document */ /* eslint-disable strict */ window.PatternLibrary = window.PatternLibrary || {}; (function(behaviors) { 'use strict'; const AGE_CHECK_EVENT = { VERIFIED: 'nds.agecheck.verified', LAUNCH: 'nds.agecheck.launch', ERROR: 'nds.agecheck.error' }; behaviors.ageCheck = { properties: { /** * Does this component need Age Gate */ ageCheck: { type: Boolean, value: false, reflectToAttribute: true }, /** * Has the Player been verified for this age gate */ ageCheckVerified: { type: Boolean, value: false, reflectToAttribute: true }, /** * Has the Player had an error for this age gate */ ageCheckError: { type: Boolean, value: false, reflectToAttribute: true } }, /** * Checks whether to build the Player based on Age Gate Status * * @param {boolean} ageCheck Is the Age Gate required * @param {boolean} ageCheckVerified Has the Players age been verified * * @returns {boolean|*} */ isAgeGateCoverHidden(ageCheck, ageCheckVerified) { return !ageCheck || (ageCheck && ageCheckVerified); }, /** * Fires Event To Launch Age Gate Modal */ launchAgeGateEvent() { this.fire(AGE_CHECK_EVENT.LAUNCH); }, /** * Fires Event To notify successful Age Gate */ handleAgeGateSuccess() { this.fire(AGE_CHECK_EVENT.VERIFIED); }, /** * Fires Event To notify error Age Gate */ handleAgeGateError() { this.fire(AGE_CHECK_EVENT.ERROR); }, /** * Listens for Age Gate Events for any media that needs it */ ready() { document.body.addEventListener(AGE_CHECK_EVENT.VERIFIED, () => { this.ageCheckVerified = true; }); document.body.addEventListener(AGE_CHECK_EVENT.ERROR, () => { this.ageCheckError = true; }); } }; })(window.PatternLibrary.behaviors = window.PatternLibrary.behaviors || {});
[[ titleText ]] [[ captionText ]]
[[ saleText ]]
[[ disclaimerText]]
[[ tab.editionText ]]
[[ titleText ]] [[ strikePriceText ]] [[ priceText ]] [[ platformText ]] [[ releaseDatePrefixText ]] [[ releaseDateText ]]
[[ disclaimerText]]
[[ tab.editionText ]]
[[ titleText ]] [[ strikePriceText ]] [[ priceText ]] [[ platformText ]] [[ releaseDatePrefixText ]] [[ releaseDateText ]]
[[ remainingDays ]] [[ dayText ]]
[[ remainingHours ]] [[ hourText ]]
[[ remainingMinutes ]] [[ minuteText ]]
[[ remainingSeconds ]] [[ secondText ]]
[[ seeMoreText ]]
[[ item.gamerTag ]]
[[_text]]
[[ labelText ]] / /
[[ errorText ]]
[[ helpText ]]
[[ labelText ]] {{ text }}
[[ username ]]
[[ eyebrowText ]][[ eyebrowSecondaryText ]] [[ titleText ]]
/* global window */ /* eslint-disable strict */ window.PatternLibrary = window.PatternLibrary || {}; (function(behaviors) { 'use strict'; const emailReg = /[a-zA-Z0-9_\.\+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-\.]+/; const passWordReg = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{8,16}$/; behaviors.valueValidator = { /** * Checks if this element currently has a value * * @returns {boolean} */ hasValue() { return this.checked || this.value; }, /** * Checks if this element should be validated * * @returns {boolean} */ isValidatable() { if (this.required || !this.required && this.hasValue()) { return true; } return false; }, /** * validates a value based on supplied type * or custom RegExp Pattern * * @returns {boolean} */ validateValue() { let customReg; if (this.validPattern) { customReg = new RegExp(this.validPattern); return customReg.test(this.value); } switch (this.type) { case 'email': return this.value.match(emailReg); case 'password': return this.value.match(passWordReg); case 'date': return this._validateDateFieldValue(this.value); default: return true; } }, /** * Returns the valid state of this element * or custom RegExp Pattern * * @private * @returns {boolean} */ _validate() { if (this.isValidatable()) { return this.hasValue() && this.validateValue(); } return true; } }; })( window.PatternLibrary.behaviors = window.PatternLibrary.behaviors || {} ); /* global window */ /* eslint-disable strict */ window.PatternLibrary = window.PatternLibrary || {}; (function(behaviors) { 'use strict'; behaviors.formElement = { properties: { /** * Name */ name: { type: String }, /** * Value */ value: { type: String, observer: '_valueChanged' }, /** * Disabled */ disabled: { type: Boolean, value: false, reflectToAttribute: true }, /** * Error */ error: { type: Boolean, value: false, reflectToAttribute: true }, /** * Required */ required: { type: Boolean, value: false } }, /** * Sets the value of this elemement * * @param {string} value The value */ _setValue(value) { this.value = value; }, /** * Observer callback for when value changes. * Sets _empty to false. * * @param {string} newValue The new value */ _valueChanged(newValue) { if (newValue.length) { this._empty = false; } }, /** * Custom element Lifecycle callback * registers this element with it's parent form * Event listener is in the parent form */ attached() { this.fire('ea-form-element-register', {}, {}); } }; })(window.PatternLibrary.behaviors = window.PatternLibrary.behaviors || {}); /* global window */ /* eslint-disable strict */ window.PatternLibrary = window.PatternLibrary || {}; (function(behaviors) { 'use strict'; behaviors.inputElementInteractions = { properties: { /** * Current */ current: { type: Boolean, value: false, reflectToAttribute: true }, /** * Empty */ _empty: { type: Boolean, value: true, reflectToAttribute: true }, /** * Background color * * Possible values: * - none * - dark * - light */ backgroundColor: { type: String, reflectToAttribute: true }, /** * Error */ error: { type: Boolean, value: false, reflectToAttribute: true }, /** * Help active */ helpActive: { type: Boolean, value: false, reflectToAttribute: true } }, /** * Updates the state of the component to helpActive on mouseEnter */ _handleEnter() { this.helpActive = true; }, /** * Removes the helpActive state of the component on mouseLeave */ _handleLeave() { this.helpActive = false; }, /** * Listeners */ listeners: { mouseenter: '_handleEnter', mouseleave: '_handleLeave' } }; })(window.PatternLibrary.behaviors = window.PatternLibrary.behaviors || {});
[[ labelText ]] [[ errorText ]]
[[ helpText ]]
[[ eyebrowText ]] [[ eyebrowSecondaryText ]]
[[ bylineText ]]
[[ eyebrowText ]] [[ titleText ]] [[ subtitleText ]]
@[[ username ]]
/* global window document */ /* eslint-disable strict */ window.PatternLibrary = window.PatternLibrary || {}; (function(behaviors) { 'use strict'; behaviors.googleAnalytics = { properties: { /* * Name for the Google Analytics Event */ gaEventName: { type: String, value: null }, /* * Payload for the Google Analytics Event */ gaEventPayload: { type: Object, value: null } }, /** * Listeners */ listeners: { click: '_fireAnalytics' }, /** * Fires Google Analytics event */ _fireAnalytics() { if (this.gaEventName && this.gaEventPayload) { this.gaEvent(this.gaEventName, this.gaEventPayload); } }, /** * generic gaEvent wrapper * * @param {string} eventName The GA Event to trigger eg 'ga/newsletter' * @param {Object} payload The payload to pass to the event */ gaEvent(eventName, payload = {}) { if (window.tlm_ga && window.tlm_ga.isReady()) { this.fire(eventName, payload); } else { document.addEventListener('/ga/ready', () => { this.fire(eventName, payload); }, false); } } }; })(window.PatternLibrary.behaviors = window.PatternLibrary.behaviors || {});
[[ titleText ]]
[[ ctaText ]] [[ readMoreText ]] [[ readLessText ]] {{ option.text }} [[ labelText ]] {{ text }} [[ propositionTitleText ]]
[[ successTitleText ]] [[ _email ]]
[[ alreadyTitleText ]] [[ _email ]]
[[ ineligibleTitleText ]]
{{ text }} [[ cookiePreferencesText ]] [[ copyrightText ]]
[[ eyebrowText ]] [[ titleText ]]
[[ user.name ]] [[ user.email ]]
[[ titleText ]]
[[ titleText ]]
[[ copiedText ]] [[ shareUrl ]]
[[ titleText ]]
[[ labelText ]]
[[ searchLabelText ]]
[[ eyebrowText ]] [[ titleText ]] [[ subtitleText ]] [[ titleText ]] [[ copyText ]]
[[ titleText ]] [[ column.label ]] [[ column.label ]]
[[ eyebrowText ]] [[ eyebrowSecondaryText ]] [[ titleText ]] [[ subtitleText ]]