LI=typeof LI!=="undefined"&&LI?LI:{};LI.i18n=LI.i18n||{};
(function(root,factory){var lib=factory();root["t8"]=lib;if(typeof exports!=="undefined")module.exports=lib})(this,function(){var __localeData={};var Utils=function(){var Utils={};var breaker={};var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var push=ArrayProto.push,slice=ArrayProto.slice,concat=ArrayProto.concat,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,
nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var lookupIterator=function(value){return Utils.isFunction(value)?value:function(obj){return obj[value]}};Utils.extend=function(obj){Utils.each(Array.prototype.slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]=
source[prop]});return obj};var each=Utils.each=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach)obj.forEach(iterator,context);else if(obj.length===+obj.length)for(var i=0,length=obj.length;i<length;i++){if(iterator.call(context,obj[i],i,obj)===breaker)return}else{var keys=Utils.keys(obj);for(var i=0,length=keys.length;i<length;i++)if(iterator.call(context,obj[keys[i]],keys[i],obj)===breaker)return}};var any=Utils.any=Utils.some=function(obj,iterator,
context){iterator||(iterator=Utils.identity);var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);Utils.each(obj,function(value,index,list){if(result||(result=iterator.call(context,value,index,list)))return breaker});return!!result};Utils.find=function(obj,iterator,context){var result;any(obj,function(value,index,list){if(iterator.call(context,value,index,list)){result=value;return true}});return result};Utils.invert=function(obj){var result=
{};var keys=Utils.keys(obj);for(var i=0,length=keys.length;i<length;i++)result[obj[keys[i]]]=keys[i];return result};Utils.identity=function(value){return value};Utils.has=function(obj,key){return hasOwnProperty.call(obj,key)};Utils.contains=function(obj,target){if(obj==null)return false;if(nativeIndexOf&&obj.indexOf===nativeIndexOf)return obj.indexOf(target)!=-1;return Utils.some(obj,function(value){return value===target})};Utils.keys=function(obj){if(obj!==Object(obj))throw new TypeError("Invalid object");
var keys=[];for(var key in obj)if(Utils.has(obj,key))keys.push(key);return keys};Utils.map=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);Utils.each(obj,function(value,index,list){results.push(iterator.call(context,value,index,list))});return results};Utils.indexOf=function(array,item,isSorted){if(array==null)return-1;var i=0,length=array.length;if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item,
isSorted);for(;i<length;i++)if(array[i]===item)return i;return-1};Utils.isUndefined=function(obj){return obj===void 0};Utils.isDefined=function(obj){return!Utils.isUndefined(obj)&&!Utils.isNull(obj)};Utils.isNull=function(obj){return obj===null};Utils.isArray=function(obj){return toString.call(obj)=="[object Array]"};Utils.isString=function(obj){return toString.call(obj)=="[object String]"};Utils.isNumber=function(obj){return toString.call(obj)=="[object Number]"};Utils.isFunction=function(obj){return toString.call(obj)==
"[object Function]"};Utils.isArguments=function(obj){return toString.call(obj)=="[object Arguments]"};if(!Utils.isArguments(arguments))Utils.isArguments=function(obj){return!!(obj&&Utils.has(obj,"callee"))};if(typeof/./!=="function")Utils.isFunction=function(obj){return typeof obj==="function"};var entityMap={escape:{"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#x27;"}};entityMap.unescape=Utils.invert(entityMap.escape);var entityRegexes={escape:new RegExp("["+Utils.keys(entityMap.escape).join("")+
"]","g"),unescape:new RegExp("("+Utils.keys(entityMap.unescape).join("|")+")","g")};Utils.each(["escape","unescape"],function(method){Utils[method]=function(string){if(string==null)return"";return(""+string).replace(entityRegexes[method],function(match){return entityMap[method][match]})}});Utils.assert=function(condition,message){if(!condition)throw new Error(message);};Utils.assertDefined=function(value,message){Utils.assert(Utils.isDefined(value),message)};Utils.assertNotDefined=function(value,
message){Utils.assert(!Utils.isDefined(value),message)};Utils.bestEffortNumberConversion=function(value){try{if(Utils.isDefined(value)){if(Utils.isNumber(value))return value;var digitsOnly=value.replace(/[^0-9]/g,"");var asInt=parseInt(digitsOnly,10);if(isNaN(asInt))return 0;else return asInt}}catch(e){}return 0};if(!String.prototype.startsWith)String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position};if(!String.prototype.endsWith)String.prototype.endsWith=
function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1};if(!String.prototype.trim)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};Utils.parseDateString=function(sDate,useTimeZone){var d=new Date(sDate);if(isNaN(d))d=parseISO8601(sDate);if(typeof d==="undefined"||isNaN(d))throw new Error("t8 could not parse date string '"+sDate+"'");if(useTimeZone)d=convertUTCToLocal(d);return d};function parseISO8601(s){var re=/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:.(\d+))?(Z|[+-]\d{2})(?::(\d{2}))?/,
d=s.match(re),i=0,len;if(!d)return null;for(i,len=d.length;i<len;i++)d[i]=~~d[i];return new Date(Date.UTC(d[1],d[2]-1,d[3],d[4],d[5],d[6],d[7])+(d[8]*60+d[9])*6E4)}function convertUTCToLocal(date){var localDate=new Date(date.getTime());localDate.setMinutes(date.getMinutes()-date.getTimezoneOffset());return localDate}return Utils}();var tmpl=function(){var cache={};function tmpl(str,data){var fn=!/\W/.test(str)?cache[str]=cache[str]||tmpl(document.getElementById(str).innerHTML):new Function("obj",
"var p\x3d[],print\x3dfunction(){p.push.apply(p,arguments);};"+"with(obj){p.push('"+str.replace(/[\r\t\n]/g," ").split("\x3c%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%\x3e").join("p.push('").split("\r").join("\\'")+"');}return p.join('');");return data?fn(data):fn}return tmpl}();var CurrencyFormatter=function(){var formatter=function(){};formatter.prototype.format=function(amount,currency,locale){var fmt,formattedValue="",localeData=
__localeData[locale],options={style:"currency",currency:currency,currencyDisplay:"code",minimumFractionDigits:2,maximumFractionDigits:2};if(!localeData)throw new Error("No locale data found for locale "+locale);else if(!localeData.intlLocale)throw new Error("IntlLocale is not specified for locale "+locale);if(localeData.currency&&typeof localeData.currency.getCurrencyDisplay==="function")options.currencyDisplay=localeData.currency.getCurrencyDisplay(currency);if(currency==="INR"||currency==="JPY"){options.minimumFractionDigits=
0;options.maximumFractionDigits=0}try{fmt=new Intl.NumberFormat(localeData.intlLocale+"-u-nu-latn-ca-gregory",options);formattedValue=fmt.format(amount)}catch(err){if(options.currencyDisplay==="code")try{options.currencyDisplay="symbol";fmt=new Intl.NumberFormat(localeData.intlLocale+"-u-nu-latn-ca-gregory",options);formattedValue=fmt.format(amount);var currencySymbols=["(AU|A|US|BR|R|CAN|CA|C|A|HK|NZ|SG)\\u0024","\\u0024(AU|A|US|BR|R|CAN|CA|C|A|HK|NZ|SG)|\\u0024","GB\u00a3|\u00a3GB|\u00a3","\u20ac",
"\u0631.\u0647.\u200f","JP\u00a5|\u00a5JP|\u00a5","\u20b9|Rs","Dkr","NKr","kr"],re=new RegExp("("+currencySymbols.join("|")+")");formattedValue=formattedValue.replace(re,currency)}catch(e){formattedValue=amount+" "+currency}}formattedValue=formattedValue.replace(/\u0020/g,"\u00a0");if(localeData.currency&&localeData.currency.postFormatting)formattedValue=localeData.currency.postFormatting(currency,amount,formattedValue);return formattedValue};return formatter}();var DateFormatter=function(){var formatter=
function(){};function pad(number){if(number<10)return"0"+number;return number}function toISODateString(date){return date.getUTCFullYear()+"-"+pad(date.getUTCMonth()+1)+"-"+pad(date.getUTCDate())}formatter.prototype.format=function(date,locale,format,useTimeZone){var fmt,formattedValue="",localeData=__localeData[locale],options,intlLocale,dateToFormat=Utils.parseDateString(date,useTimeZone);if(format==="iso")return toISODateString(dateToFormat);if(!localeData)throw new Error("No locale data found for locale "+
locale);else if(!localeData.intlLocale)throw new Error("IntlLocale is not specified for locale "+locale);options=localeData.date.intlOptions[format];options.timeZone="UTC";try{intlLocale=localeData.intlLocale;if(intlLocale!=="zh")intlLocale+="-u-nu-latn-ca-gregory";fmt=new Intl.DateTimeFormat(intlLocale,options);formattedValue=fmt.format(dateToFormat)}catch(ex){formattedValue=dateToFormat.toLocaleDateString()}formattedValue=formattedValue.replace(/\u200e/g,"");if(localeData.date&&localeData.date.postFormatting)formattedValue=
localeData.date.postFormatting(format,date,formattedValue);return formattedValue};return formatter}();var NameFormatter=function(){var formatter=function(){};formatter.formats={FAMILIAR_NAME:"FAMILIAR_NAME",FULL_NAME:"FULL_NAME",MICROFORMAT:"MICROFORMAT",LIST_VIEW:"LIST_VIEW"};formatter.templates={MICROFORMAT:{firstName:tmpl('\x3cspan class\x3d"given-name"\x3e\x3c%\x3dvalue%\x3e\x3c/span\x3e'),lastName:tmpl('\x3cspan class\x3d"family-name"\x3e\x3c%\x3dvalue%\x3e\x3c/span\x3e'),maidenName:tmpl('\x3cspan class\x3d"additional-name"\x3e\x3c%\x3dvalue%\x3e\x3c/span\x3e')},
FAMILIAR_NAME:{defaultTemplate:tmpl("\x3c%\x3dfirstName%\x3e"),localeTemplates:[{locales:["de_DE","nl_NL","pl_PL","ro_RO","tr_TR"],template:tmpl("\x3c%\x3dfirstName%\x3e \x3c%\x3dlastName%\x3e")},{locales:["CJK"],template:tmpl("\x3c%\x3dlastName%\x3e\x3c%\x3dfirstName%\x3e")},{locales:["CJK-ja_JP"],template:tmpl("\x3c%\x3dlastName%\x3e \x3c%\x3dfirstName%\x3e")}]},FULL_NAME:{defaultTemplate:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(maidenName){%\x3e (\x3c%\x3dmaidenName%\x3e)\x3c%}%\x3e \x3c%\x3dlastName%\x3e"),
localeTemplates:[{locales:["ar_AE","th_TH"],template:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(maidenName){%\x3e \x3c%\x3dmaidenName%\x3e\x3c%}%\x3e\x3c%if(lastName){%\x3e \x3c%\x3dlastName%\x3e\x3c%}%\x3e")},{locales:["cs_CZ"],template:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(lastName){%\x3e \x3c%\x3dlastName%\x3e\x3c%}%\x3e\x3c%if(maidenName){%\x3e (roz. \x3c%\x3dmaidenName%\x3e)\x3c%}%\x3e")},{locales:["de_DE"],template:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(lastName){%\x3e \x3c%\x3dlastName%\x3e\x3c%}%\x3e\x3c%if(maidenName){%\x3e geb. \x3c%\x3dmaidenName%\x3e\x3c%}%\x3e")},
{locales:["CJK-ja_JP"],template:tmpl("\x3c%\x3dlastName%\x3e\x3c%if(firstName){%\x3e \x3c%\x3dfirstName%\x3e\x3c%}%\x3e\x3c%if(maidenName){%\x3e (\x3c%\x3dmaidenName%\x3e)\x3c%}%\x3e")},{locales:["CJK"],template:tmpl("\x3c%\x3dlastName%\x3e\x3c%\x3dfirstName%\x3e\x3c%if(maidenName){%\x3e (\x3c%\x3dmaidenName%\x3e)\x3c%}%\x3e")},{locales:["ms_MY"],template:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(lastName){%\x3e \x3c%\x3dlastName%\x3e\x3c%}%\x3e\x3c%if(maidenName){%\x3e (\x3c%\x3dmaidenName%\x3e)\x3c%}%\x3e")},
{locales:["nl_NL"],template:tmpl("\x3c%\x3dfirstName%\x3e \x3c%\x3dlastName%\x3e\x3c%if(maidenName){%\x3e-\x3c%\x3dmaidenName%\x3e\x3c%}%\x3e")},{locales:["pl_PL"],template:tmpl("\x3c%\x3dfirstName%\x3e\x3c%if(lastName){%\x3e \x3c%\x3dlastName%\x3e\x3c%}%\x3e\x3c%if(maidenName){%\x3e z d. \x3c%\x3dmaidenName%\x3e\x3c%}%\x3e")}]},LIST_VIEW:{defaultTemplate:tmpl("\x3c%if(lastName){%\x3e\x3c%\x3dlastName%\x3e, \x3c%}%\x3e\x3c%\x3dfirstName%\x3e"),localeTemplates:[{locales:["CJK"],template:tmpl("\x3c%\x3dlastName%\x3e\x3c%\x3dfirstName%\x3e")},
{locales:["CJK-ja_JP"],template:tmpl("\x3c%\x3dlastName%\x3e \x3c%\x3dfirstName%\x3e")},{locales:["ar_AE","in_ID","ms_MY","th_TH"],template:tmpl("\x3c%\x3dfirstName%\x3e \x3c%\x3dlastName%\x3e")}]}};formatter.locales={CJK:"CJK",CJK_ja_JP:"CJK-ja_JP",ja_JP:"ja_JP"};formatter.charsets={korean:{lowerbound:44032,upperbound:55215},CJ:[{lowerbound:19968,upperbound:40895},{lowerbound:12448,upperbound:12543},{lowerbound:65377,upperbound:65439},{lowerbound:12352,upperbound:12447}]};formatter.prototype.htmlEncode=
function(str){if(str===null||str===undefined)return null;return str.toString().replace(/(.)/g,function(a){if(a==="\x3c")return"\x26lt;";else if(a==="\x3e")return"\x26gt;";else if(a==="\x26")return"\x26amp;";else if(a==='"')return"\x26quot;";else{if(a.charCodeAt(0)<127)return a;return"\x26#x"+a.charCodeAt(0).toString(16).toLowerCase()+";"}})};formatter.prototype.format=function(name,format,locale){function isKoreanCharset(lastName){if(!lastName)return false;var koreanCharset=NameFormatter.charsets.korean,
firstCharCode=lastName.charCodeAt(0);return firstCharCode>=koreanCharset.lowerbound&&firstCharCode<=koreanCharset.upperbound}function isCJCharset(lastName){if(!lastName)return false;var firstCharCode=lastName.charCodeAt(0);return Utils.some(NameFormatter.charsets.CJ,function(charset){return firstCharCode>=charset.lowerbound&&firstCharCode>=charset.upperbound})}function getLocaleTemplate(formatTemplates,locale){var localeTemplate=Utils.find(formatTemplates.localeTemplates,function(currLocaleTemplate){return Utils.indexOf(currLocaleTemplate.locales,
locale)>=0});return localeTemplate?localeTemplate.template:formatTemplates.defaultTemplate}function getFormatTemplates(format){var formats=NameFormatter.formats,templates=NameFormatter.templates;if(!format)return templates.FAMILIAR_NAME;if(Utils.isString(format))format=[format];if(!Utils.isArray(format))return templates.FAMILIAR_NAME;if(Utils.indexOf(format,formats.FULL_NAME)>=0)return templates.FULL_NAME;if(Utils.indexOf(format,formats.LIST_VIEW)>=0)return templates.LIST_VIEW;return templates.FAMILIAR_NAME}
function hasMicroformat(format){if(format)if(Utils.isArray(format))return Utils.indexOf(format,NameFormatter.formats.MICROFORMAT)>=0;else if(Utils.isString(format))return format===NameFormatter.formats.MICROFORMAT;return false}function processInputValue(value,isHTMLOutput,useMicroformat,htmlEncode,microformatTemplate){if(!value)return"";var processedValue=value.replace(TRIM_WHITESPACE_REGEX,"");if(isHTMLOutput)processedValue=htmlEncode(processedValue);if(useMicroformat)processedValue=microformatTemplate({value:processedValue});
return processedValue}var TRIM_WHITESPACE_REGEX=/(^\s+|\s+$)/g,useMicroformat=hasMicroformat(format),isHTMLOutput=useMicroformat||name.lastNameWithHighlight,microformatTemplates=NameFormatter.templates.MICROFORMAT,firstName=processInputValue(name.firstName,isHTMLOutput,useMicroformat,this.htmlEncode,microformatTemplates.firstName),lastName=processInputValue(name.lastName,isHTMLOutput,useMicroformat,this.htmlEncode,microformatTemplates.lastName),maidenName=processInputValue(name.maidenName,isHTMLOutput,
useMicroformat,this.htmlEncode,microformatTemplates.maidenName),lastNameWithHighlight=processInputValue(name.lastNameWithHighlight,false,useMicroformat,this.htmlEncode,microformatTemplates.lastName),formatTemplate="",nameFormatted="";if(isKoreanCharset(name.lastName))locale=NameFormatter.locales.CJK;else if(isCJCharset(name.lastName))if(locale===NameFormatter.locales.ja_JP)locale=NameFormatter.locales.CJK_ja_JP;else locale=NameFormatter.locales.CJK;formatTemplate=getLocaleTemplate(getFormatTemplates(format),
locale);nameFormatted=formatTemplate({firstName:firstName,lastName:lastNameWithHighlight?lastNameWithHighlight:lastName,maidenName:maidenName});nameFormatted=nameFormatted.replace(TRIM_WHITESPACE_REGEX,"");return nameFormatted};return formatter}();var NumberFormatter=function(){var formatter=function(){};formatter.prototype.format=function(value,locale){var fmt,formattedValue="",localeData=__localeData[locale],options={maximumFractionDigits:3};if(!localeData)throw new Error("No locale data found for locale "+
locale);else if(!localeData.intlLocale)throw new Error("IntlLocale is not specified for locale "+locale);if(localeData.number&&localeData.number.maximumFractionDigits)options.maximumFractionDigits=localeData.number.maximumFractionDigits;try{fmt=new Intl.NumberFormat(localeData.intlLocale+"-u-nu-latn-ca-gregory",options);formattedValue=fmt.format(value)}catch(err){formattedValue=value+""}if(localeData.number&&localeData.number.postFormatting)formattedValue=localeData.number.postFormatting(value,formattedValue);
return formattedValue};return formatter}();var Possessive=function(){var formatter=function(){};formatter.prototype.format=function(text,locale){var localeData=__localeData[locale],possessiveRules=localeData.possessive?localeData.possessive:{};if(possessiveRules){var suffixFromRules=Utils.find(possessiveRules.rules,function(suffix,regexString){var regex=new RegExp(regexString);return regex.test(text)});if(Utils.isDefined(suffixFromRules))return text+suffixFromRules;else if(possessiveRules.fallback)return text+
possessiveRules.fallback}return text};return formatter}();var TimeFormatter=function(){var formatter=function(){};formatter.prototype.format=function(date,locale,format,useTimeZone){var fmt,formattedValue="",localeData=__localeData[locale],options,intlLocale,dateToFormat=Utils.parseDateString(date,useTimeZone),intlOptions={"hm":{hour:"numeric",minute:"numeric"},"hms":{hour:"numeric",minute:"numeric",second:"numeric"}};if(!localeData)throw new Error("No locale data found for locale "+locale);else if(!localeData.intlLocale)throw new Error("IntlLocale is not specified for locale "+
locale);options=localeData.time&&localeData.time.intlOptions?localeData.time.intlOptions[format]:intlOptions[format];if(!options)options=intlOptions.hms;options.timeZone="UTC";try{intlLocale=localeData.intlLocale;if(intlLocale!=="zh")intlLocale+="-u-nu-latn-ca-gregory";fmt=new Intl.DateTimeFormat(intlLocale,options);formattedValue=fmt.format(dateToFormat)}catch(ex){formattedValue=dateToFormat.toLocaleTimeString()}formattedValue=formattedValue.replace(/\u200e/g,"");if(localeData.time&&localeData.time.postFormatting)formattedValue=
localeData.time.postFormatting(format,date,formattedValue);return formattedValue};return formatter}();var TruncationFormatter=function(){var _ellipsis="...",formatter=function(ellipsis){_ellipsis=typeof ellipsis!=="undefined"?ellipsis:_ellipsis};formatter.prototype.format=function(value,limit){if(!value||typeof value!=="string"){if(typeof value==="undefined"||value==="")return"";return null}if(typeof limit==="undefined")return"...";if(!limit||typeof limit!=="number"||limit>=value.length||limit<0||
value.replace(/\s/g,"").length===0)return value;var truncated=value.substr(0,limit),chars=truncated.split(""),idx=limit-1,output="",regexPunctuation=/\s|\?|\!|\.|\,|\;|\:/g;while(idx>=0)if(!regexPunctuation.test(chars[idx]))idx--;else break;if(idx>0)output=truncated.substr(0,idx);else output=truncated;output+=_ellipsis;return output};return formatter}();var Chooser=function(){var formatter=function(){},isDefined=Utils.isDefined,grammarLongestEndsWith=2,defaultGrammarRules;formatter.CATEGORIES={SINGULAR:0,
PLURAL:1,DUAL:2,FEW:3,MANY:4,ZERO:5};defaultGrammarRules={"equals":{1:formatter.CATEGORIES.SINGULAR},"endsWith":{0:formatter.CATEGORIES.PLURAL,1:formatter.CATEGORIES.PLURAL,2:formatter.CATEGORIES.PLURAL,3:formatter.CATEGORIES.PLURAL,4:formatter.CATEGORIES.PLURAL,5:formatter.CATEGORIES.PLURAL,6:formatter.CATEGORIES.PLURAL,7:formatter.CATEGORIES.PLURAL,8:formatter.CATEGORIES.PLURAL,9:formatter.CATEGORIES.PLURAL}};formatter.COMPARISONS={eq:function(left,right){return left===right},gt:function(left,right){return left>
right},gte:function(left,right){return left>=right},endsWith:function(left,right){return left.toString().endsWith(right.toString())}};formatter.prototype.findRule=function(rules,value,comparison){return Utils.find(rules,function(rule){return isDefined(Utils.find(rule.values,function(v){return comparison(value,v)}))})};formatter.prototype.pickCategory=function(gramma,value,longestEndsWith){if(isDefined(gramma)&&isDefined(value)&&isDefined(longestEndsWith)){var asString=value.toString();if(isDefined(gramma.equals)&&
isDefined(gramma.equals[asString]))return gramma.equals[asString];if(isDefined(gramma.endsWith)){var max=Math.min(longestEndsWith,asString.length);for(var i=max;i>0;i--){var suffix=asString.slice(-1*i);if(isDefined(gramma.endsWith[suffix]))return gramma.endsWith[suffix]}}}return undefined};formatter.prototype.findCategoryMatch=function(value,rules,grammarRules){value=Math.floor(value);var numberMatch=this.findNumberMatchNoRanges(value,rules);if(isDefined(numberMatch))return numberMatch;var categoryId=
this.pickCategory(grammarRules,value,grammarLongestEndsWith),category;if(isDefined(categoryId)){for(var currCategory in formatter.CATEGORIES)if(formatter.CATEGORIES[currCategory]===categoryId)category=currCategory.toLowerCase();return Utils.find(rules,function(rule){return rule.category===category})}return undefined};formatter.prototype.findNumberMatchNoRanges=function(value,rules){var rulesWithoutRanges=Utils.map(rules,function(rule){if(isDefined(rule.arg)&&rule.comparison==="gte")return Utils.extend({},
rule,{comparison:"eq"});else return rule});return this.findNumberMatch(value,rulesWithoutRanges)};formatter.prototype.findNumberMatch=function(value,rules){var bestMatch;for(var i=0;i<rules.length;i++){var rule=rules[i];var comparison=Chooser.COMPARISONS[rule.comparison];if(comparison(value,rule.arg)&&(!isDefined(bestMatch)||rule.arg>bestMatch.arg))bestMatch=rule}return bestMatch};formatter.prototype.isValidCategory=function(str){return typeof formatter.CATEGORIES[str.toUpperCase()]!=="undefined"};
formatter.prototype.format=function(value,rules,locale){var localeData=__localeData[locale],grammarRules=localeData.chooser?localeData.chooser:defaultGrammarRules,numericValue=Utils.bestEffortNumberConversion(value),hasCategory,match,text;hasCategory=Utils.find(rules,function(rule){return isDefined(rule.category)});if(hasCategory)match=this.findCategoryMatch(numericValue,rules,grammarRules);else match=this.findNumberMatch(numericValue,rules);if(match){text=match.text;if(Utils.isFunction(text))return text()}return text};
return formatter}();var Resources=function(){var formatter=function(i18nCacheStatic,i18nCacheDynamic){this.i18nCacheStatic=i18nCacheStatic;this.i18nCacheDynamic=i18nCacheDynamic};var DYNAMIC_KEY_PREFIX="__i18n__";formatter.prototype.get=function(key,namespace,context,callback){Utils.assert(callback,"get called with null callback");Utils.assert(key,"get called with null or empty key");Utils.assert(namespace,"get called with null or empty namespace");var staticString=this.getStaticString(key,namespace);
if(Utils.isDefined(staticString))callback(null,staticString);else this.renderDynamicString(key,namespace,context,callback)};formatter.prototype.getStaticString=function(key,namespace){Utils.assert(key,"getStaticString called with null or empty key");Utils.assert(namespace,"getStaticString called with null or empty namespace");if(this.i18nCacheStatic&&this.i18nCacheStatic.cache&&this.i18nCacheStatic.cache[namespace])return this.i18nCacheStatic.cache[namespace][key];return};formatter.prototype.renderDynamicString=
function(key,namespace,context,callback){Utils.assert(callback,"renderDynamicString called with null callback");Utils.assert(key,"renderDynamicString called with null or empty key");Utils.assert(namespace,"renderDynamicString called with null or empty namespace");var dynamicKeyName=this.dynamicKeyName(key,namespace);if(this.i18nCacheDynamic&&this.i18nCacheDynamic.cache&&this.i18nCacheDynamic.cache[dynamicKeyName])t8.renderDynamicString(dynamicKeyName,this.i18nCacheDynamic.cache[dynamicKeyName],context,
callback);else callback("Could not find static i18n key "+key+" in static i18n cache nor dynamic i18n template "+dynamicKeyName+" in dynamic i18n cache.")};formatter.prototype.dynamicKeyName=function(key,namespace){Utils.assert(key,"dynamicKeyName called with null or empty key");Utils.assert(namespace,"dynamicKeyName called with null or empty namespace");return DYNAMIC_KEY_PREFIX+namespace+"__"+key};return formatter}();var Rtl=function(){var formatter=function(){};var WHITESPACES=" \n\r\t\f\u00a0\u2028\u2029".split(""),
EXCLUDED_CHARACTERS="~!@#$%^\x26*()_+`1234567890-\x3d{}|[]\\:\";'\x3c\x3e?,./".split(""),EXCLUSION_SET=WHITESPACES.concat(EXCLUDED_CHARACTERS),ARABIC_LOW="\u0590",ARABIC_HIGH="\u06ff";function firstRtlCharacter(content){if(!Utils.isDefined(content))return-1;var i=0,ch="\x00",contentLength=content.length;for(i=0;i<contentLength;i++){ch=content.charAt(i);if(!Utils.contains(EXCLUSION_SET,ch))break}if(i>=contentLength)return-1;else return ch>=ARABIC_LOW&&ch<=ARABIC_HIGH?i:-1}var htmlDecode=function(undefined){var namedEntities=
{"nbsp":"\u00a0","lt":"\x3c","gt":"\x3e","amp":"\x26","quot":'"'};var rEntities=/&(?:(lt|gt|amp|quot|nbsp)|#x([\da-f]{1,4})|#(\d{1,5}));/ig;return function(encodedText){if(encodedText===null||encodedText===undefined)return null;return(encodedText+"").replace(rEntities,function(match,named,hex,dec){if(named)return namedEntities[named];else if(hex||dec)return String.fromCharCode(parseInt(hex||dec,hex?16:10)||65533);return"\ufffd"})}}();formatter.prototype.isRtl=function(content){return firstRtlCharacter(htmlDecode(content))!==
-1};return formatter}();return{Chooser:Chooser,CurrencyFormatter:CurrencyFormatter,DateFormatter:DateFormatter,NameFormatter:NameFormatter,NumberFormatter:NumberFormatter,Possessive:Possessive,Resources:Resources,Rtl:Rtl,TimeFormatter:TimeFormatter,TruncationFormatter:TruncationFormatter,Utils:Utils,__addLocaleData:function(locale,localeData){__localeData[locale]=localeData}}});
(function(){var localeData={intlLocale:"en",date:{intlOptions:{}},time:{},currency:{},number:{}};localeData.date.postFormatting=function(format,date,formattedValue){var formatName=format.split(".")[0];formattedValue=formattedValue.replace(/\s0/," ");if(formatName==="my")formattedValue=formattedValue.replace(/,/g,"");else if(formatName==="time"){formattedValue=formattedValue.split(" ");if(formattedValue.length===5&&!/,$/.test(formattedValue[2]))formattedValue[2]=formattedValue[2]+",";else if(formattedValue.length===
3&&!/,$/.test(formattedValue[0]))formattedValue[0]=formattedValue[0]+",";formattedValue=formattedValue.join(" ")}return formattedValue};var intlOpts=localeData.date.intlOptions;intlOpts["time"]={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};intlOpts["time.long"]=intlOpts["time"];intlOpts["time.medium"]=intlOpts["time"];intlOpts["time.short"]={year:"2-digit",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"};intlOpts["mdy"]={year:"numeric",month:"long",day:"numeric"};
intlOpts["mdy.long"]=intlOpts["mdy"];intlOpts["mdy.medium"]={year:"numeric",month:"short",day:"numeric"};intlOpts["mdy.short"]={year:"numeric",month:"numeric",day:"numeric"};intlOpts["my"]={year:"numeric",month:"long"};intlOpts["my.long"]=intlOpts["my"];intlOpts["my.medium"]={year:"numeric",month:"short"};intlOpts["my.short"]=intlOpts["my.medium"];intlOpts["md"]={month:"long",day:"numeric"};intlOpts["md.long"]=intlOpts["md"];intlOpts["md.medium"]={month:"short",day:"numeric"};intlOpts["md.short"]=
intlOpts["md.medium"];intlOpts["m"]={month:"long"};intlOpts["m.long"]=intlOpts["m"];intlOpts["m.medium"]={month:"short"};intlOpts["m.short"]={month:"numeric"};intlOpts["d"]={weekday:"long"};intlOpts["d.long"]=intlOpts["d"];intlOpts["d.medium"]={weekday:"short"};intlOpts["d.short"]={day:"numeric"};intlOpts["y"]={year:"numeric"};intlOpts["y.long"]=intlOpts["y"];intlOpts["y.medium"]=intlOpts["y"];intlOpts["y.short"]={year:"2-digit"};localeData.currency.getCurrencyDisplay=function(currency){if(/^(DKK|NOK|SGD|ZAR|SEK|CHF)$/.test(currency))return"code";
return"symbol"};localeData.currency.postFormatting=function(currency,amount,formattedValue){var dollarSignRegex=/^(\(|-)?\$/,currencySymbol={AUD:"A$",CAD:"CA$",HKD:"HK$",NZD:"NZ$"};if(typeof currencySymbol[currency]!=="undefined")formattedValue=formattedValue.replace(dollarSignRegex,currencySymbol[currency]);else if(currency==="INR")formattedValue=formattedValue.replace(/Rs\./,"\u20b9");if(amount<0&&formattedValue.indexOf(")")>=0)formattedValue="-"+formattedValue.replace(/[\(\)]/g,"");return formattedValue.replace(/\s/,
"")};localeData.possessive={"fallback":"\u2019s","rules":{".*[Ss]$":"\u2019",".*[A-RT-Z]$":"\u2019S",".*[a-rt-z]$":"\u2019s"}};t8.__addLocaleData("en_US",localeData)})();
(function(root,factory){factory(dust,t8)})(this,function(dust,t8){var dustVars={i18n:dust.i18n||{cache:{}}};t8.renderDynamicString=function(dynamicTemplateName,dynamicTemplate,context,callback){dust.render(dynamicTemplateName,context,callback)};var rtl=new t8.Rtl;var formatters={},formatHelpers={name:function(format,locale,params,chunk,context){var firstName=dust.helpers.tap(params.firstName,chunk,context),lastName=dust.helpers.tap(params.lastName,chunk,context),maidenName=dust.helpers.tap(params.maidenName,
chunk,context),lastNameWithHighlight=dust.helpers.tap(params.lastNameWithHighlight,chunk,context);if(!formatters.name)if(typeof t8.NameFormatter!=="undefined")formatters.name=new t8.NameFormatter;else return dust.log("@format helper can not create instance of NameFormatter. t8.NameFormatter is null or undefined","ERROR");var formatMap={"familiar":"FAMILIAR_NAME","full":"FULL_NAME","list":"LIST_VIEW","micro":"MICROFORMAT"},requestedFormat=format.split("."),nameFormats=[];for(var i=0;i<requestedFormat.length;i++)if(formatMap[requestedFormat[i]])nameFormats.push(formatMap[requestedFormat[i]]);
return formatters.name.format({firstName:firstName,lastName:lastName,maidenName:maidenName,lastNameWithHighlight:lastNameWithHighlight},nameFormats,locale)},date:function(format,locale,params,chunk,context){var date=dust.helpers.tap(params.date,chunk,context),useTimeZone=dust.helpers.tap(params.useTimeZone,chunk,context);if(!formatters.date)if(typeof t8.DateFormatter!=="undefined")formatters.date=new t8.DateFormatter;else return dust.log("@format helper can not create instance of DateFormatter. t8.DateFormatter is null or undefined",
"ERROR");if(!/^date\.(time|mdy|my|md|m|d|y|iso)(\.(long|medium|short))?$/.test(format)){dust.log("@format helper was called with invalid format "+format+". Falling back to default date.mdy.long","WARN");format="mdy.long"}else format=format.replace(/date\./,"");return formatters.date.format(date,locale,format,useTimeZone)},time:function(format,locale,params,chunk,context){var date=dust.helpers.tap(params.date,chunk,context),useTimeZone=dust.helpers.tap(params.useTimeZone,chunk,context);if(!formatters.time)if(typeof t8.TimeFormatter!==
"undefined")formatters.time=new t8.TimeFormatter;else return dust.log("@format helper can not create instance of TimeFormatter. t8.TimeFormatter is null or undefined","ERROR");if(!/^time\.(hm|hms)?$/.test(format)){dust.log("@format helper was called with invalid format "+format+". Falling back to default time.hms","WARN");format="hms"}else format=format.replace(/time\./,"");return formatters.time.format(date,locale,format,useTimeZone)},currency:function(format,locale,params,chunk,context){var formattedValue,
amount=dust.helpers.tap(params.amount,chunk,context),defaultAmount=dust.helpers.tap(params.defaultAmount,chunk,context),currency=dust.helpers.tap(params.currency,chunk,context);if(!formatters.currency)if(typeof t8.CurrencyFormatter!=="undefined")formatters.currency=new t8.CurrencyFormatter;else return dust.log("@format helper can not create instance of CurrencyFormatter. t8.CurrencyFormatter is null or undefined","ERROR");if(isNaN(amount))if(isNaN(defaultAmount))formattedValue="";else formattedValue=
formatters.currency.format(defaultAmount,currency,locale);else formattedValue=formatters.currency.format(amount,currency,locale);return formattedValue},number:function(format,locale,params,chunk,context){var formattedValue,value=dust.helpers.tap(params.value,chunk,context),defaultValue=dust.helpers.tap(params.defaultValue,chunk,context);if(!formatters.number)if(typeof t8.NumberFormatter!=="undefined")formatters.number=new t8.NumberFormatter;else return dust.log("@format helper can not create instance of NumberFormatter. t8.NumberFormatter is null or undefined",
"ERROR");if(isNaN(value))if(isNaN(defaultValue))formattedValue="";else formattedValue=formatters.number.format(defaultValue,locale);else formattedValue=formatters.number.format(value,locale);return formattedValue},string:function(format,locale,params,chunk,context){var value=dust.helpers.tap(params.value,chunk,context),limit=dust.helpers.tap(params.limit,chunk,context);if(!formatters.truncation)if(typeof t8.TruncationFormatter!=="undefined")formatters.truncation=new t8.TruncationFormatter;else return dust.log("@format helper can not create instance of stringFormatter. t8.stringFormatter is null or undefined",
"ERROR");return formatters.truncation.format(value,limit)}};var chooser;function getChooserParams(chunk,context,bodies,params){var CHOOSER_TYPE_NUMBER="number",CHOOSER_TYPE_BOOLEAN="boolean",CHOOSER_TYPE_STRING="string",CHOOSER_DEFAULT_BLOCK="block",type=params.type?params.type:CHOOSER_TYPE_NUMBER,omitParams=["key","type","locale"],hasCategories=false,categories={},key;for(key in params)if(omitParams.indexOf(key)<0){hasCategories=true;categories[key]=params[key]}for(key in bodies)if(key!==CHOOSER_DEFAULT_BLOCK){hasCategories=
true;categories[key]=bodies[key]}return{key:dust.helpers.tap(params.key,chunk,context),locale:getLocale(params),hasCategories:hasCategories,categories:categories,isBooleanComparison:type===CHOOSER_TYPE_BOOLEAN,isStringComparison:type===CHOOSER_TYPE_STRING,isNumericComparison:type===CHOOSER_TYPE_NUMBER}}function toChooserArg(str,text,chunk,context){var CHOOSER_NUMERIC_PREFIX="_",CHOOSER_GREATER_THAN_PREFIX="_gt_",lazyText=function(){return dust.helpers.tap(text,chunk,context)};if(chooser.isValidCategory(str))return{category:str,
comparison:"eq",text:lazyText};else if(str.startsWith(CHOOSER_GREATER_THAN_PREFIX))return{arg:+str.substring(CHOOSER_GREATER_THAN_PREFIX.length),comparison:"gt",text:lazyText};else if(str.startsWith(CHOOSER_NUMERIC_PREFIX))return{arg:+str.substring(CHOOSER_NUMERIC_PREFIX.length),comparison:"gte",text:lazyText};else return dust.log("@choice helper called with invalid chooser key: "+str,"ERROR")}function chooseNumeric(chooserParams,chunk,context){if(typeof chooser==="undefined")if(typeof t8.Chooser!==
"undefined")chooser=new t8.Chooser;else return dust.log("@choice helper could not create an instance of t8.Chooser","ERROR");var chosen,rules=[];for(var chooserCategory in chooserParams.categories)rules.push(toChooserArg(chooserCategory,chooserParams.categories[chooserCategory],chunk,context));chosen=chooser.format(chooserParams.key,rules,chooserParams.locale);if(typeof chosen==="undefined")chosen=rules[0].text();return chosen}function chooseString(chooserParams,chunk,context){var chosen,CHOOSER_DEFAULT=
"default";if(typeof chooserParams.categories[chooserParams.key]!=="undefined")chosen=dust.helpers.tap(chooserParams.categories[chooserParams.key],chunk,context);else if(chooserParams.isStringComparison&&typeof chooserParams.categories[CHOOSER_DEFAULT]!=="undefined")chosen=dust.helpers.tap(chooserParams.categories[CHOOSER_DEFAULT],chunk,context);return chosen}function getLocale(params){if(params&&params.locale)return params.locale;else if(typeof LI!=="undefined"&&typeof LI.i18n!=="undefined"&&typeof LI.i18n.getLocale!==
"undefined")return LI.i18n.getLocale().value;return"en_US"}function applyFilters(value,chunk,context,params){var filters="",rawFilters=params.filter||params.filters,ignoreDefaultFilter=params.ignoreDefaultFilter;if(typeof rawFilters!=="undefined")filters=dust.helpers.tap(rawFilters,chunk,context).split("|");if(ignoreDefaultFilter)return value;else return dust.filter(value,"h",filters)}var helpers={"translate":function(chunk,context,bodies,params){if(typeof params==="undefined"||typeof params.key===
"undefined")return chunk.setError('@translate helper called with null or undefined "key" attribute');var hide=params.hide?dust.helpers.tap(params.hide,chunk,context):null;if(hide==="true")return chunk;if(typeof t8.Resources!=="undefined")dustVars.i18n.resources=new t8.Resources(dust.i18n,dust);else return chunk.setError("Can not create an instance of i18n.Resources. i18n.Resources is undefined");function outputValue(key,out,myChunk){if(!context.stack.head)context.stack.head={};if(params.output===
"json"){context.stack.head[key]=out;myChunk.end("")}else myChunk.end(applyFilters(out,myChunk,context,params))}function useFallbackValue(key,myChunk){if(typeof bodies!=="undefined"&&typeof bodies.block!=="undefined")myChunk.capture(bodies.block,context,function(out,captureChunk){outputValue(key,out,myChunk);captureChunk.end("")}).end();else{var output;if(typeof params.text!=="undefined")output=params.text;else output=key;outputValue(key,output,myChunk)}}var key=dust.helpers.tap(params.key,chunk,context),
template=typeof context.getTemplateName==="function"?context.getTemplateName():context.global.__template_name__;if(params.template)template=dust.helpers.tap(params.template,chunk,context);else if(params.templateName)template=dust.helpers.tap(params.templateName,chunk,context);return chunk.map(function(chunk){var i18nContext,excludeParams=["key","template"],contextOverrides={};for(var param in params)if(excludeParams.indexOf(param)<0)contextOverrides[param]=params[param];i18nContext=context.push(contextOverrides);
if(typeof template!=="undefined")dustVars.i18n.resources.get(key,template,i18nContext,function(err,out){if(err){dust.log(err);useFallbackValue(key,chunk)}else outputValue(key,out,chunk)});else{dust.log("@translate helper can not determine templateName");useFallbackValue(key,chunk)}chunk.end("")})},"format":function(chunk,context,bodies,params){if(!params||!params.type)return chunk.setError('@format helper called with null or undefined "format" attribute');var format=dust.helpers.tap(params.type,chunk,
context),key=dust.helpers.tap(params.key,chunk,context),type=format.split(".")[0],output="",locale=getLocale(params);if(typeof formatHelpers[type]!=="undefined")try{output=formatHelpers[type](format,locale,params,chunk,context)}catch(err){dust.log("@format failed to format value. "+err.message,"ERROR")}if(typeof key!=="undefined")context.stack.head[key]=output;if(params.output&&params.output==="json")return chunk;else{if(type==="name"&&(format.indexOf("micro")!==-1||typeof params.lastNameWithHighlight!==
"undefined"))params.ignoreDefaultFilter=true;return chunk.write(applyFilters(output,chunk,context,params))}},"choice":function(chunk,context,bodies,params){if(!params||!params.hasOwnProperty("key"))return chunk.setError('@choice helper called without required parameter "key"');else if(typeof params.key==="undefined"){dust.log("@choice helper called with undefined key","WARN");return chunk.write("")}var chosen="",chooserParams=getChooserParams(chunk,context,bodies,params);if(!chooserParams.hasCategories)return chunk.setError("@choice helper called with no patterns to choose from");
if(chooserParams.isBooleanComparison||chooserParams.isStringComparison)chosen=chooseString(chooserParams,chunk,context);else if(chooserParams.isNumericComparison)chosen=chooseNumeric(chooserParams,chunk,context);return chunk.write(applyFilters(chosen,chunk,context,params))},"possessive":function(chunk,context,bodies,params){if(!params||!params.hasOwnProperty("key"))return chunk.setError('@possessive helper called without required parameter "key"');else if(typeof params.key==="undefined"){dust.log("@possessive helper called with undefined key",
"WARN");return chunk.write("")}var key=dust.helpers.tap(params.key,chunk,context),possessive=new t8.Possessive,locale=getLocale(params),asPossessive=possessive.format(key,locale);return chunk.write(applyFilters(asPossessive,chunk,context,params))},"dirAttr":function(chunk,context,bodies,params){if(!params||!params.hasOwnProperty("text"))return chunk.setError('@dirAttr helper called without required parameter "text"');return chunk.write('dir\x3d"'+(rtl.isRtl(dust.helpers.tap(params.text,chunk,context))?
"rtl":"ltr")+'"')},"isRtl":function(chunk,context,bodies,params){var body=bodies.block,skip=bodies["else"];if(!params||!params.hasOwnProperty("text"))return chunk.setError('@isRtl helper called without required parameter "text"');if(rtl.isRtl(dust.helpers.tap(params.text,chunk,context)))if(body)chunk.render(body,context);else dust.log("Missing body block in the isRtl helper!","INFO");else if(skip)chunk.render(skip,context);return chunk}};var key;for(key in dustVars)dust[key]=dustVars[key];for(key in helpers)dust.helpers[key]=
helpers[key]});(function(root,dust){var oldDustLog;if(dust.log){oldDustLog=dust.log;dust.log=function dustErrorReportToJet(message,type){try{if(root.jet&&(type==="ERROR"||type==="WARN"))if(message instanceof Error)jet.error(message);else if(typeof message==="string")try{throw new Error(message);}catch(err){jet.error(err)}}finally{return oldDustLog.apply(dust,arguments)}}}else if(root.jet)jet.error(new Error("The function dust.log doesn't exist in this version."))})(this,dust);
(function(root){root.play=root.play||{};root.sc=root.sc||{};sc.hashes=sc.hashes||{}})(this);
(function(play,root){play.EVENTS={};play.EVENTS.DUST_READY="playDustReady";play.Utils={};var Utils=play.Utils;var breaker={};if(!String.prototype.startsWith)String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position};if(!String.prototype.endsWith)String.prototype.endsWith=function(suffix){return this.indexOf(suffix,this.length-suffix.length)!==-1};var ArrayProto=Array.prototype,ObjProto=Object.prototype,nativeFilter=ArrayProto.filter,
nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeSome=ArrayProto.some,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,playEventsHash={};Utils.has=function(obj,key){return hasOwnProperty.call(obj,key)};Utils.keys=function(obj){if(obj!==Object(obj))throw new TypeError("Invalid object");var keys=[];for(var key in obj)if(Utils.has(obj,key))keys.push(key);return keys};Utils.filter=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeFilter&&
obj.filter===nativeFilter)return obj.filter(iterator,context);Utils.each(obj,function(value,index,list){if(iterator.call(context,value,index,list))results.push(value)});return results};Utils.assert=function(condition,message){if(!condition)throw new Error(message);};Utils.each=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach)obj.forEach(iterator,context);else if(obj.length===+obj.length)for(var i=0,length=obj.length;i<length;i++){if(iterator.call(context,
obj[i],i,obj)===breaker)return}else{var keys=Utils.keys(obj);for(var i=0,length=keys.length;i<length;i++)if(iterator.call(context,obj[keys[i]],keys[i],obj)===breaker)return}};Utils.identity=function(value){return value};Utils.any=Utils.some=function(obj,iterator,context){iterator||(iterator=Utils.identity);var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);Utils.each(obj,function(value,index,list){if(result||(result=iterator.call(context,
value,index,list)))return breaker});return!!result};Utils.isUndefined=function(obj){return obj===void 0};Utils.isDefined=function(obj){return!Utils.isUndefined(obj)&&!Utils.isNull(obj)};Utils.isNull=function(obj){return obj===null};Utils.assertDefined=function(value,message){Utils.assert(Utils.isDefined(value),message)};Utils.map=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);Utils.each(obj,function(value,
index,list){results.push(iterator.call(context,value,index,list))});return results};Utils.extend=function(obj){Utils.each(ArrayProto.slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]=source[prop]});return obj};Utils.isArray=function(obj){return toString.call(obj)=="[object Array]"};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(searchElement){if(this===null)throw new TypeError;var t=Object(this);var len=t.length>>>0;if(len===0)return-1;var n=0;if(arguments.length>
1){n=Number(arguments[1]);if(n!==n)n=0;else if(n!==0&&n!==Infinity&&n!==-Infinity)n=(n>0||-1)*Math.floor(Math.abs(n))}if(n>=len)return-1;var k=n>=0?n:Math.max(len-Math.abs(n),0);for(;k<len;k++)if(k in t&&t[k]===searchElement)return k;return-1};if(!Array.isArray)Array.isArray=function(vArg){return Object.prototype.toString.call(vArg)==="[object Array]"};play.getScript=function(url,callback){Utils.assert(url,"getScript called with null url");var script=document.createElement("script");script.src=url;
play.executeScript(script,callback)};play.executeScript=function(script,callback){Utils.assert(play.isClient,"executeScript should only be used for client-side rendering!");Utils.assert(script,"executeScript called with null script");var head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;script.async="async";var cleanup=function(){if(head&&script.parentNode)head.removeChild(script);script=undefined};if(script.src)script.onload=script.onreadystatechange=function(_,
isAbort){if(isAbort||!script.readyState||/loaded|complete/.test(script.readyState)){script.onload=script.onreadystatechange=null;cleanup();if(!isAbort&&callback)callback()}};script=head.insertBefore(script,head.firstChild);if(typeof script!=="undefined"&&!script.src){cleanup();if(callback)callback()}};play.traverseObject=function(obj,path,required){Utils.assert(path,"traverseObject called with null path");Utils.assert(obj||!required,"traverseObject called with a null object, but required is set to true");
var parts=path.split(".");for(var i=0;i<parts.length;i++){obj=obj?obj[parts[i]]:obj;if(!obj){Utils.assert(!required,"traverseObject could not find required path "+path);return null}}return obj};play.log=function(msg){if(root.console&&root.console.log)root.console.log(msg);else if(root.java&&root.java.lang&&root.java.lang.System&&root.java.lang.System.out&&root.java.lang.System.out.println)root.java.lang.System.out.println(msg)};play.templateAlias=function(templatePath,alias){if(dust&&dust.cache)if(templatePath in
dust.cache)dust.cache[alias]=dust.cache[templatePath];else dust.log("Unable to find template '"+templatePath+'" to create alias "'+alias+"'","ERROR");else play.log("Unable to find dust or dust.cache.  Please ensure dust js is included in your base page.")};play._={};play._.some=function(array,predicate){var index=-1,length=array.length;while(++index<length)if(predicate(array[index],index,array))return true;return false};play._.omit=function(obj,arrayKeysToOmit){var result={};for(var prop in obj)if(obj.hasOwnProperty(prop)&&
arrayKeysToOmit.indexOf(prop)===-1)result[prop]=obj[prop];return result};play._.reduce=function(array,iteraree,accumulator,initFromArray){var index=-1,length=array.length;if(initFromArray&&length)accumulator=array[++index];while(++index<length)accumulator=iteraree(accumulator,array[index],index,array);return accumulator};play._.result=function(object,property){if(object===null)return null;var value=object[property];return typeof value==="function"?value.call(object):value};play.on=function(event,
callback){if(typeof playEventsHash[event]==="undefined")playEventsHash[event]=[];playEventsHash[event].push(callback)};play.off=function(event,callback){var callbacks=playEventsHash[event];if(typeof callbacks==="undefined")return;for(var i=0,len=callbacks.length;i<len;i++)if(callbacks[i]===callback){callbacks.splice(i,1);break}};play.trigger=function(event,params){if(typeof playEventsHash[event]!=="undefined")for(var i=0,len=playEventsHash[event].length;i<len;i++)playEventsHash[event][i].apply(this,
params)}})(play,this);
(function(play,LI,dust){var HtmlUtils=LI.HtmlUtils={};var Utils=play.Utils;HtmlUtils.dustFilter=function(str,params){var filters=[];if(params&&params.filters)filters=Utils.map(params.filters.split("|"),function(elem){return elem.trim()});return dust.filter(str,"h",filters)};HtmlUtils.createHtmlTag=function(tagName,attributes,body){Utils.assert(tagName,"createHtmlTag called with null or undefined tagName");var tagNameEscaped=dust.escapeHtml(tagName);var out="\x3c"+tagNameEscaped;if(attributes){var htmlAttributes=
HtmlUtils.objectToHtmlAttributes(attributes);if(htmlAttributes&&htmlAttributes.length>0)out+=" "+htmlAttributes}var closedTag="\x3c/"+tagNameEscaped+"\x3e";if(body)out+="\x3e"+body+closedTag;else if(tagNameEscaped==="script")out+="\x3e"+closedTag;else out+="/\x3e";return out};HtmlUtils.objectToHtmlAttributes=function(obj){var attrs=[];Utils.map(obj,function(value,key){if(Utils.isDefined(key)&&Utils.isDefined(value))attrs.push(dust.escapeHtml(key)+'\x3d"'+dust.escapeHtml(value)+'"')});return attrs.join(" ")}})(play,
LI,dust);
(function(play,dust){var Utils=play.Utils;play.isClient=typeof window!=="undefined"&&typeof document!=="undefined";play.isDustReady=false;play.getDustDebugLevel=function(){return play.getPageContextValue("dustDebug",false)};var resourcesInProgress={};if(typeof javadust!==undefined)dust.onLoad=function(name,callback){Utils.assert(play.isClient,"Could not find template "+name+". Lazy loading for dust templates is only available for client-side rendering!");var callbacks=resourcesInProgress[name];if(callbacks)callbacks.push(callback);
else{resourcesInProgress[name]=[callback];play.getScript(play.templateUrl(name),function(){var toNotify=resourcesInProgress[name];while(toNotify&&toNotify.length>0){var cb=toNotify.pop();cb()}})}};dust.helpers.tapAll=function(params,chunk,context){Utils.assert(params,"tapAll called with null params");var tappedParams={};Utils.each(params,function(value,key){tappedParams[key]=dust.helpers.tap(value,chunk,context)});return tappedParams};dust.helpers.addToContext=function(chunk,context,bodies,params){Utils.assert(params.name,
"@addToContext called with null params.name");params=dust.helpers.tapAll(params,chunk,context);return chunk.capture(bodies.block,context,function(out,chunk){context.current()[params.name]=out;return chunk.end("")})};dust.helpers.first=function(chunk,context,bodies){if(context.stack.index===0)return bodies.block(chunk,context);else return chunk.write("")};dust.helpers["pre.i18n.translate"]=function(chunk){return chunk}})(play,dust);
(function(play,LI,dust){var Utils=play.Utils;var HtmlUtils=LI.HtmlUtils;play.EMBEDDED_CONTEXT_ID="__pageContext__";var ESC_FLAGS="gi";var START_COMMENT="\x3c!--";var END_COMMENT="--\x3e";var HTML_ENTITY={dsh:{escaped:"\\u002d\\u002d",unescaped:"--",escaped_re:"\\\\u002d\\\\u002d"},lt:{escaped:"\\u003c",unescaped:"\x3c",escaped_re:"\\\\u003c"},gt:{escaped:"\\u003e",unescaped:"\x3e",escaped_re:"\\\\u003e"}};play.pageContext=null;play.getPageContext=function(){if(play.pageContext)return play.pageContext;
else if(play.isClient){play.setPageContext(play.getEmbeddedContent(play.EMBEDDED_CONTEXT_ID));return play.pageContext}else throw"The pageContext is null. Did you call the @initContext helper in the body of your dust base page?";};play.hasPageContext=function(){try{play.getPageContext();return true}catch(err){return false}};play.setPageContext=function(context){Utils.assert(context,"setPageContext called with a null context");play.pageContext=context};play.removePageContext=function(){play.pageContext=
null};play.getPageContextValue=function(key,required){var context=play.getPageContext();Utils.assert(context,"pageContext is null");var value=context[key];if(required)Utils.assertDefined(value,"The value for "+key+" in the pageContext was null or undefined");return value};play.escapeForEmbedding=function(str){if(Utils.isDefined(str))return str.replace(new RegExp(HTML_ENTITY.dsh.unescaped,ESC_FLAGS),HTML_ENTITY.dsh.escaped).replace(new RegExp(HTML_ENTITY.gt.unescaped,ESC_FLAGS),HTML_ENTITY.gt.escaped).replace(new RegExp(HTML_ENTITY.lt.unescaped,
ESC_FLAGS),HTML_ENTITY.lt.escaped);else return str};play.unescapeForEmbedding=function(str){if(Utils.isDefined(str))return str.replace(new RegExp(HTML_ENTITY.dsh.escaped_re,ESC_FLAGS),HTML_ENTITY.dsh.unescaped).replace(new RegExp(HTML_ENTITY.gt.escaped_re,ESC_FLAGS),HTML_ENTITY.gt.unescaped).replace(new RegExp(HTML_ENTITY.lt.escaped_re,ESC_FLAGS),HTML_ENTITY.lt.unescaped);else return str};play.embeddedJsonTag=function(json,id){Utils.assert(id,"embeddedJsonTag called with null id");var attrs={id:id,
style:"display: none;"};var body=play.wrapInComment(JSON.stringify(json));return HtmlUtils.createHtmlTag("code",attrs,body)};play.wrapInComment=function(text){Utils.assertDefined(text,"wrapInComment called with null text");return START_COMMENT+play.escapeForEmbedding(text)+END_COMMENT};play.getEmbeddedContent=function(id){Utils.assert(id,"getEmbeddedContent called with null id");var contentElem=document.getElementById(id);Utils.assert(contentElem,"Could not find DOM node with id "+id);Utils.assert(contentElem.firstChild,
"DOM node with id "+id+" did not have a child comment node");var innerContent=contentElem.firstChild.nodeValue;Utils.assert(innerContent!==null&&innerContent.length>0,"No inner contents found for DOM node with id "+id);contentElem.parentNode.removeChild(contentElem);return JSON.parse(innerContent)};dust.helpers.render=function(chunk,context,bodies,params){Utils.assert(!play.isClient,"The @render helper is only used in a server-side rendered base page to setup client-side rendering. Perhaps you want fs.embed() instead?");
Utils.assert(params.template,"@render called with null params.template");params=dust.helpers.tapAll(params,chunk,context);var template=params.template;var data=params.data||{};var templateId=params.templateId||template;var templateUrl=params.templateUrl||play.templateUrl(template);var skipTemplateUrl=params.skipTemplateUrl;var containerId=params.containerId;var scriptTagParams={src:templateUrl,id:templateId};var fetchTemplateScriptTag=skipTemplateUrl?"":HtmlUtils.createHtmlTag("script",scriptTagParams);
var embeddedJsonTag=play.embeddedJsonTag(data,templateId+"-content");var asJsString=function(str){if(Utils.isDefined(str))return'"'+dust.escapeJs(str)+'"';else return"undefined"};var fsEmbedParams=Utils.map([templateId,template,undefined,containerId],asJsString);var fsEmbedBody="fs.embed("+fsEmbedParams.join(", ")+");";var fsEmbedTag=HtmlUtils.createHtmlTag("script",{},fsEmbedBody);return chunk.write(fetchTemplateScriptTag+embeddedJsonTag+fsEmbedTag)};dust.helpers.embedJSON=function(chunk,context,
bodies,params){Utils.assert(params.id,"@embedJSON called with null id");Utils.assert(params.data,"@embedJSON called with null data");params=dust.helpers.tapAll(params,chunk,context);return chunk.write(play.embeddedJsonTag(params.data,params.id))};dust.helpers.initContext=function(chunk){Utils.assert(!play.isClient,"The @initContext helper is only used in a server-side rendered base page to setup the page context for server and client-side rendering.");var embeddedJsonCodeTag=play.embeddedJsonTag(play.getPageContext(),
play.EMBEDDED_CONTEXT_ID);dust.debugLevel=play.getDustDebugLevel();var scHashesScriptTag=play.useScHashesJs()?HtmlUtils.createHtmlTag("script",{src:play.getPageContextValue("scHashesUrl",true)}):"";var dustUtilJSUrl=play.getPageContextValue("dustUtilsUrl",true),playUtilJSUrl=play.getPageContextValue("playUtilsUrl",true),dustUtilScriptTag=HtmlUtils.createHtmlTag("script",{src:play.getPageContextValue("serveT8WithDust",true)?playUtilJSUrl:dustUtilJSUrl});var jsRoutesScriptTag=play.jsRoutesString?HtmlUtils.createHtmlTag("script",
{},play.jsRoutesString.replace(/__NEW_LINE__/g,"\n")):"";return chunk.write(embeddedJsonCodeTag+scHashesScriptTag+dustUtilScriptTag+jsRoutesScriptTag)};if(!play.isClient&&!play.contextReady){play.contextReady=true;var originalRenderFunction=dust.render;dust.render=function(name,context,callback){var pageContext=context[play.EMBEDDED_CONTEXT_ID];Utils.assert(pageContext,"No page context found!");play.setPageContext(pageContext);dust.debugLevel=play.getDustDebugLevel();dust.render=originalRenderFunction;
originalRenderFunction(name,context,callback)}}})(play,LI,dust);
(function(play,LI,dust){var Utils=play.Utils;var HtmlUtils=LI.HtmlUtils;dust.helpers.form=function(chunk,context,bodies,params){params=params||{};params=dust.helpers.tapAll(params,chunk,context);if(params.formData){var formData=this.tap(params.formData,chunk,context);context=context.push({formData:formData})}var attrs={method:"POST"};var body=play.createCsrfInput();if(params.alias)attrs.action=play.url(params);attrs=Utils.extend({},attrs,play._.omit(params,["alias","formData"]));if(bodies&&bodies.block)return chunk.capture(bodies.block,
context,function(out,chunk){body+=out;return chunk.end(HtmlUtils.createHtmlTag("form",attrs,body))});else return chunk.write(HtmlUtils.createHtmlTag("form",attrs,body))};dust.helpers.input=function(chunk,context,bodies,params){Utils.assert(params,"@input called with null params");params=dust.helpers.tapAll(params,chunk,context);var formData=context.get("formData")||params.formData;Utils.assert(formData,"@input called with null formData");var field=play.getFormField(formData,params.field);Utils.assert(field,
"@input did not find field "+params.field+" in the formData");Utils.assert(field.id,"@input did not find an id in field "+params.field);Utils.assert(field.name,"@input did not find a name in field "+params.field);var id=field.id;if(params.arrayIndex)id+="["+params.arrayIndex+"]";var defaultAttrs={type:"text",id:id,name:id};var value=field.value||field["default"];if(value)defaultAttrs.value=value;var attrs=Utils.extend({},defaultAttrs,play._.omit(params,["field","label","noLabel","noError","error",
"formData","field","arrayIndex"]));var out="";if(!params.noLabel){var label=params.label||field.name;var labelAttrs={"for":attrs.id};if(!field.optional)labelAttrs["class"]="required";out+=HtmlUtils.createHtmlTag("label",labelAttrs,label)}if(!params.noError){var error=params.error||field.error||"";var divAttrs={id:attrs.id+"-error","class":"error"};out+=HtmlUtils.createHtmlTag("div",divAttrs,error)}out+=HtmlUtils.createHtmlTag("input",attrs);return chunk.write(out)};play.getFormField=function(formData,
fieldName){Utils.assert(formData,"getFormField called with null formData");Utils.assert(fieldName,"getFormField called with null fieldName");var field=formData;var parts=fieldName.split(".");for(var i=0;i<parts.length;i++){field=field.fields[parts[i]];Utils.assert(field,"Could not find field "+fieldName+" in form data")}return field}})(play,LI,dust);
(function(play,LI){var Utils=play.Utils;var HtmlUtils=LI.HtmlUtils;play.createScriptTag=function(customAttrs,params){Utils.assert(customAttrs,"createScriptTag called with null customAttrs");Utils.assert(params,"createScriptTag called with null params");var attrs=Utils.extend({type:"text/javascript"},Utils.extend({},customAttrs,play._.omit(params,["path","paths"])));return HtmlUtils.createHtmlTag("script",attrs)};play.createCssTag=function(customAttrs,params){Utils.assert(customAttrs,"createCssTag called with null customAttrs");
Utils.assert(params,"createCssTag called with null params");var attrs=Utils.extend({rel:"stylesheet"},Utils.extend({},customAttrs,play._.omit(params,["path","paths"])));return HtmlUtils.createHtmlTag("link",attrs)}})(play,LI);
(function(play,dust,LI){var Utils=play.Utils,DEFAULT_LOCALE="en_US",dustRenderCalls=[],originalRenderFunction;if(play.isClient&&typeof Intl==="undefined"){originalRenderFunction=dust.render;dust.render=function(){dustRenderCalls.push(arguments)};play.getScript(play.getPageContextValue("intlPolyfillUrl",true),function(){var dustRenderCall;dust.render=originalRenderFunction;while(dustRenderCall=dustRenderCalls.shift())dust.render.apply(this,dustRenderCall);play.isDustReady=true;play.trigger(play.EVENTS.DUST_READY)})}else{play.isDustReady=
true;play.trigger(play.EVENTS.DUST_READY)}dust.helpers.i18n=dust.helpers.translate;var originalLIi18nGetLocale=LI.i18n.getLocale||function(){return{value:DEFAULT_LOCALE}};LI.i18n.getLocale=function(){try{return{value:play.getPageContextValue("locale",false)||DEFAULT_LOCALE}}catch(err){return originalLIi18nGetLocale()}};dust.helpers.truncate=function(chunk,context,bodies,params){Utils.assert(params.value,"@truncate called with null value param");Utils.assert(params.length,"@truncate called with null length param");
Utils.assert(params.length>0,"@truncate called with length param less than one");params=dust.helpers.tapAll(params,chunk,context);function removeTrailingPunctuation(value){var lastChar=value.charAt(value.length-1);if(lastChar==="."||lastChar===",")value=value.substring(0,value.length-1);return value.trim()}var value=params.value.trim(),indexOfLastSpace=0;if(value.length>params.length){var lastChar=value.charAt(params.length-1);if(lastChar===" "||lastChar==="\r"||lastChar==="\n"||lastChar==="\t")value=
removeTrailingPunctuation(value.substring(0,params.length))+"\u2026";else{value=value.substring(0,params.length);indexOfLastSpace=value.lastIndexOf(" ");if(indexOfLastSpace>0)value=removeTrailingPunctuation(value.substring(0,indexOfLastSpace))+"\u2026";else value=removeTrailingPunctuation(value)+"\u2026"}}return chunk.write(dust.escapeHtml(value))}})(play,dust,LI);
(function(play,LI,dust){var Utils=play.Utils;var HtmlUtils=LI.HtmlUtils;play.createCsrfInput=function(){var attributes={type:"hidden",name:"csrfToken",value:play.getPageContextValue("csrfToken",true)};return HtmlUtils.createHtmlTag("input",attributes,null)};play.addCsrfTokenToUrl=function(url){Utils.assert(url,"addCsrfTokenToUrl called with null url");return play.addQueryParameter(url,"csrfToken",play.getPageContextValue("csrfToken",true))};dust.helpers.csrf=function(chunk){return chunk.write(dust.escapeHtml(play.getPageContextValue("csrfToken",
true)))};dust.helpers.createCsrfInput=function(chunk){return chunk.write(play.createCsrfInput())};dust.helpers.isCsUser=function(chunk,context,bodies){if(play.getPageContextValue("isCsUser",false)&&bodies.block)return chunk.render(bodies.block,context);return chunk}})(play,LI,dust);(function(play,dust){dust.helpers.contextPath=function(chunk){return chunk.write(play.getPageContextValue("contextPath"))}})(play,dust);
(function(play,LI,dust,sc){var Utils=play.Utils;var HtmlUtils=LI.HtmlUtils;var URL_MAX_LENGTH=1024;var URL_HASH_LENGTH=25;var TYPICAL_CDN_URL_LENGTH=50;play.MEDIA_URN_PREFIX="urn:li:media:";var assetCache={cache:{},add:function(assetPath){this.cache[assetPath]=true},remove:function(assetPath){if(assetPath in this.cache)delete this.cache[assetPath]},exists:function(assetPath){return assetPath in this.cache},clear:function(assetPath){this.cache={}},getAssets:function(){var assets=[];for(var assetPath in this.cache)assets.push(assetPath);
return assets}};play.assetCache={exists:function(assetPath){return assetCache.exists(assetPath)},getAssets:function(assetPath){return assetCache.getAssets(assetPath)}};var asArray=function(value){return Utils.isArray(value)?value:[value]};var checkUrlLength=function(paths){var sparkBaseForFiles=play.getPageContextValue("baseSparkUrlForFiles",true);var sparkBaseForHashes=play.getPageContextValue("baseSparkUrlForHashes",true);var appName=play.getPageContextValue("appName",true);var versionedUrlLength=
formatPathsForSpark(appName,paths).length+sparkBaseForFiles.length;var estHashedUrlLength=paths.length*(URL_HASH_LENGTH+1)+sparkBaseForHashes.length;var shorterUrlLength=versionedUrlLength>estHashedUrlLength?estHashedUrlLength:versionedUrlLength;if(shorterUrlLength>URL_MAX_LENGTH-TYPICAL_CDN_URL_LENGTH){var errorMsg="Error: The generated URL for paths "+paths+" MAY exceed the max length of "+URL_MAX_LENGTH+" in production. Please break up the URLs into multiple pieces, or use build time concat.";
if(!play.isProd())play.log(errorMsg)}};var formatPathsForSpark=function(appName,paths){return Utils.map(paths,function(path){return encodeURIComponent(play.buildPath("/",appName,"/",path))}).join(",")};var versionedSparkUrl=function(appName,paths){paths=formatPathsForSpark(appName,paths);var sparkBasePath=play.getPageContextValue("baseSparkUrlForFiles",true);return play.appendCdnUrlIfNeeded(play.combineUrlPieces(sparkBasePath,paths))};var hashedSparkUrl=function(appName,paths){paths=Utils.map(paths,
function(path){return sc.hashes[appName][path]}).join(",");var sparkBasePath=play.getPageContextValue("baseSparkUrlForHashes",true);return play.appendCdnUrlIfNeeded(play.combineUrlPieces(sparkBasePath,paths))};var maybeDynamicConcatJs=function(paths,generateUrl,params){if(play.getPageContextValue("disableDynamicConcat",false))return play._.reduce(paths,function(acc,path){return acc+play.createScriptTag({src:generateUrl(path)},params)+"\n"},"");else return play.createScriptTag({src:generateUrl(paths)},
params)};var maybeDynamicConcatCss=function(paths,generateUrl,params){if(play.getPageContextValue("disableDynamicConcat",false))return play._.reduce(paths,function(acc,path){return acc+play.createCssTag({href:generateUrl(path)},params)+"\n"},"");else return play.createCssTag({href:generateUrl(paths)},params)};play.useCdn=function(){return play.getPageContextValue("useCdn",false)};play.isProd=function(){return play.getPageContextValue("isProd",false)};play.useScHashesJs=function(){return play.getPageContextValue("useScHashesJs",
false)};play.hashesDisabledByQueryParam=function(){return play.getPageContextValue("hashesDisabledByQueryParam",false)};play.addQueryParameter=function(url,key,value){Utils.assert(url,"addQueryParameter called with null url");Utils.assert(key,"addQueryParameter called with null key");Utils.assert(value,"addQueryParameter called with null value");key=encodeURIComponent(key);value=encodeURIComponent(value);var re=new RegExp("([?|\x26])"+key+"\x3d.*?(\x26|$)","i");if(url.match(re))return url.replace(re,
"$1"+key+"\x3d"+value+"$2");else{var questionIndex=url.indexOf("?");var separator="\x26";if(questionIndex<0)separator="?";else if(questionIndex===url.length-1)separator="";return url+separator+key+"\x3d"+value}};play.parseQueryString=function(url){Utils.assertDefined(url,"parseQueryString called with null url");var urlParts=url.split("?");Utils.assert(urlParts.length<=2,"Malformed url");if(urlParts.length<2)return{};var queryString=urlParts[1];var result={};var keyValues=queryString.split("\x26");
Utils.each(keyValues,function(keyValue){var keyValueParts=keyValue.split("\x3d");var key=decodeURIComponent(keyValueParts[0]);if(key){var value=keyValueParts.length>1?decodeURIComponent(keyValueParts[1]):"";if(result[key])result[key].push(value);else result[key]=[value]}});return result};play.parseQueryStringSimple=function(url){var queryString=play.parseQueryString(url);var queryStringSimple={};Utils.each(queryString,function(value,key){queryStringSimple[key]=value[0]});return queryStringSimple};
play.buildUrl=function(url,urlParameters){url=url||"";urlParameters=urlParameters||{};var baseUrl=url.split("?")[0];var parameters=play.parseQueryString(url);Utils.each(urlParameters,function(value,key){parameters[key]=value});var keyValues=[];Utils.each(parameters,function(values,key){Utils.assert(Array.isArray(values),"All parameter values must be arrays, see buildUrlSimple for simple values");Utils.each(values,function(value){keyValues.push(encodeURIComponent(key)+"\x3d"+encodeURIComponent(value))})});
var queryString=keyValues.join("\x26");return baseUrl+"?"+queryString};play.buildUrlSimple=function(url,urlParameters){url=url||"";urlParameters=urlParameters||{};var urlParametersArray={};Utils.each(urlParameters,function(value,key){Utils.assert(typeof urlParameters[key]==="string","All values must be simple strings, for array parameters see buildUrl");urlParametersArray[key]=[value]});return play.buildUrl(url,urlParametersArray)};play.getUrlParameter=function(url,name){Utils.assert(url,"getUrlParameter called with null url");
Utils.assert(name,"getUrlParameter called with null parameter name");return play.parseQueryStringSimple(url)[name]};play.combineUrlPieces=function(leftPiece,rightPiece){if(!leftPiece)return rightPiece;if(!rightPiece)return leftPiece;if(/\?$/.test(leftPiece)||/^\?/.test(rightPiece))return leftPiece+rightPiece;else return leftPiece.replace(/\/$/,"")+"/"+rightPiece.replace(/^\//,"")};play.buildPath=function(){if(arguments.length===0)return"";return play._.reduce(arguments,function(acc,path){return play.combineUrlPieces(acc,
path)})};play.addLocale=function(path,locale){Utils.assert(path,"addLocale called with null or empty path");Utils.assert(locale,"addLocale called with null or empty locale");return path.endsWith(locale)?path:path+"_"+locale};play.replaceWithLocale=function(paths){Utils.assert(paths,"replaceWithLocale called with null or empty path");paths=asArray(paths);var locale=play.getPageContextValue("locale",true);return Utils.map(paths,function(path){return path.replace(/<locale>/g,locale)})};play.addExtension=
function(path,ext){Utils.assert(path,"addExtension called with null path");Utils.assert(ext,"addExtension called with null extension");return path.endsWith(ext)?path:path+ext};play.removeExtension=function(path,ext){Utils.assert(path,"removeExtension called with null path");Utils.assert(ext,"removeExtension called with null extension");return path.endsWith(ext)?path.substring(0,path.length-ext.length):path};play.extractUrlArgs=function(params,len){params=params||{};var args=[];for(var i=0;i<len;++i)if(params["arg"+
i]!==undefined)args.push(params["arg"+i]);else args.push(null);return args};play.reverseRouterForAlias=function(params){Utils.assert(params,"reverseRouterForAlias called with null params object");Utils.assert(params.alias,"reverseRouterForAlias called with a params object that does not define an alias");Utils.assert(play.jsRoutes,"Could not find any JavaScript reverse routers. Did you define any in your DustOptions object?");var alias=params.alias;var route=play.traverseObject(play.jsRoutes,alias);
Utils.assert(route,"Could not find alias "+alias+". Make sure to define the proper JavaScriptRoutes in your DustOptions object.");var args=params.args||play.extractUrlArgs(params,route.length);args=args||[];var argList=args instanceof Array?args:[args];return route.apply(route,argList)};play.url=function(params,absolute){absolute=absolute||false;Utils.assert(params,"url called with null params object");var reverseRoute=play.reverseRouterForAlias(params);var url=play._.result(reverseRoute,absolute?
"absoluteURL":"url");if(params.withCsrf)url=play.addCsrfTokenToUrl(url);var track=params.track||params.trk;if(track)url=play.addQueryParameter(url,"trk",track);return url};play.assetUrl=function(paths){Utils.assert(paths,"assetUrl called with null paths");paths=asArray(paths);checkUrlLength(paths);var oldAssetUrlRouter=play.traverseObject(play.jsRoutes,"controllers.Assets");var newAssetUrlRouter=play.traverseObject(play.jsRoutes,"com.linkedin.assets.AssetsController");var appName=play.getPageContextValue("appName",
true);if(play.useCdn())return play.sparkUrl(paths);else if(oldAssetUrlRouter)return oldAssetUrlRouter.at(paths).url;else if(newAssetUrlRouter)return newAssetUrlRouter.at(formatPathsForSpark(appName,paths)).url;else return play.combineUrlPieces(play.getPageContextValue("baseAssetsUrl",true),formatPathsForSpark(appName,paths))};play.sparkUrl=function(paths){Utils.assert(paths,"sparkUrl called with null paths");var appName=play.getPageContextValue("appName",true);var hashNotFound=function(path){var result=
!Utils.isDefined(sc.hashes[appName][path]);return result};if(play.hashesDisabledByQueryParam()||!Utils.isDefined(sc.hashes[appName])||Utils.some(paths,hashNotFound))return versionedSparkUrl(appName,paths);else return hashedSparkUrl(appName,paths)};play.scdsDirectUnversionedUrl=function(path){Utils.assert(path,"scdsDirectUnversionedUrl called with null path");return play.scdsDirectUrl(play.combineUrlPieces("common/u/",path))};play.scdsDirectUrl=function(path){Utils.assert(path,"scdsDirectUrl called with null path");
if(/^http/.test(path))return path;else return play.combineUrlPieces(play.getPageContextValue("baseScdsUrl",true),path)};play.appendCdnUrlIfNeeded=function(path){Utils.assert(path,"appendCdnUrlIfNeeded called with null path");if(/^http/.test(path))return path;else return play.combineUrlPieces(play.getPageContextValue("cdnUrl",true),path)};play.localizedAssetUrl=function(paths,extension){Utils.assert(paths,"localizedAssetUrl called with null or empty paths");paths=asArray(paths);var locale=play.getPageContextValue("locale",
true);var pathsWithLocale=Utils.map(paths,function(path){return play.addExtension(play.addLocale(play.removeExtension(path,extension),locale),extension)});return play.assetUrl(pathsWithLocale)};play.localizedJsAssetUrl=function(paths){return play.localizedAssetUrl(paths,".js")};play.localizedCssAssetUrl=function(paths){return play.localizedAssetUrl(paths,".css")};play.templateUrl=function(paths){Utils.assert(paths,"templateUrl called with null or empty paths");paths=asArray(paths);var pathsWithPrefix=
Utils.map(paths,function(path){return path.startsWith("templates")||path.startsWith("scmp")?path:play.combineUrlPieces("templates",path)});return play.localizedAssetUrl(pathsWithPrefix,".js")};play.concatCssUrl=function(paths){Utils.assert(paths,"concatCssUrl called with null or empty paths");paths=asArray(paths);var pathsWithPrefix=Utils.map(paths,function(path){return play.combineUrlPieces("concat",path)});return play.localizedAssetUrl(pathsWithPrefix,".css")};play.concatJsUrl=function(paths){Utils.assert(paths,
"concatJsUrl called with null or empty paths");paths=asArray(paths);var pathsWithPrefix=Utils.map(paths,function(path){return play.combineUrlPieces("concat",path)});return play.localizedAssetUrl(pathsWithPrefix,".js")};play.jsUrl=function(paths){Utils.assert(paths,"jsUrl called with null paths");paths=asArray(paths);var pathsWithPrefix=Utils.map(paths,function(path){return play.combineUrlPieces("javascripts",play.addExtension(path,".js"))});return play.assetUrl(pathsWithPrefix)};play.cssUrl=function(paths){Utils.assert(paths,
"cssUrl called with null path");paths=asArray(paths);var pathsWithPrefix=Utils.map(paths,function(path){return play.combineUrlPieces("stylesheets",play.addExtension(path,".css"))});return play.assetUrl(pathsWithPrefix)};play.scssUrl=function(paths){Utils.assert(paths,"scssUrl called with null path");paths=asArray(paths);var pathsWithPrefix=Utils.map(paths,function(path){var withoutExtension=play.removeExtension(path,".scss");return play.combineUrlPieces("scss",withoutExtension)});return play.localizedAssetUrl(pathsWithPrefix,
".css")};play.imgUrl=function(path){Utils.assert(path,"imgUrl called with null path");return play.assetUrl("images/"+path)};play.rawMprUrl=function(mediaId){Utils.assert(mediaId,"rawMprUrl called with null mediaId");return play.combineUrlPieces(play.getPageContextValue("baseMprUrl",true),mediaId)};play.mprUrl=function(mediaId,width,height,withoutPadding){Utils.assert(mediaId,"mprUrl called with null mediaId");Utils.assert(width,"mprUrl called with null width/size");var imageWidth=width,imageHeight,
filterPostfix;if(typeof height==="boolean"){imageHeight=width;withoutPadding=height}else imageHeight=height||width;filterPostfix=withoutPadding?"np":"";return play.combineUrlPieces(play.getPageContextValue("baseMprUrl",true),"shrink"+filterPostfix+"_"+imageWidth+"_"+imageHeight+mediaId)};play.mediaUrl=function(mediaId){Utils.assert(mediaId,"mediaUrl called with null mediaId");return play.combineUrlPieces(play.getPageContextValue("baseMediaUrl",true),mediaId)};play.noPhotoUrl=function(width,height){Utils.assert(width,
"noPhotoUrl called with null width/size");var imageWidth=width;var imageHeight=height||width;return play.scdsDirectUnversionedUrl("/images/themes/katy/ghosts/person/ghost_person_"+imageWidth+"x"+imageHeight+"_v1.png")};play.getPathList=function(params){params=params||{};var allPaths=[];if(params.path)allPaths.push(params.path);if(params.paths)allPaths=allPaths.concat(Array.isArray(params.paths)?params.paths:params.paths.split(","));return Utils.map(allPaths,function(path){return path.trim()})};play.getMediaIdFromUrn=
function(urn){var indexOfUrnMediaPrefix=urn.lastIndexOf(play.MEDIA_URN_PREFIX);Utils.assert(indexOfUrnMediaPrefix>-1,"Incorrectly formatted URN");return urn.slice(indexOfUrnMediaPrefix+play.MEDIA_URN_PREFIX.length)};play.getMediaIdFromParams=function(params){Utils.assert(params,"getMediaIdFromParams called with null params");if(params.mediaId)return params.mediaId;else if(params.urn)return play.getMediaIdFromUrn(params.urn);else return undefined};dust.helpers.assetUrl=function(chunk,context,bodies,
params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(dust.escapeHtml(play.assetUrl(paths)))};dust.helpers.templateUrl=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(dust.escapeHtml(play.templateUrl(paths)))};dust.helpers.concatCssUrl=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);
return chunk.write(dust.escapeHtml(play.concatCssUrl(paths)))};dust.helpers.concatJsUrl=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(dust.escapeHtml(play.concatJsUrl(paths)))};dust.helpers.linkedInDustScriptTag=function(chunk,context,bodies,params){var liDustJSURL=play.getPageContextValue("serveT8WithDust",true)?play.getPageContextValue("linkedInDustI18nJsUrl",true):play.getPageContextValue("linkedInDustJsUrl",
true);return chunk.write(play.createScriptTag({src:liDustJSURL},params||{}))};dust.helpers.template=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatJs(paths,play.templateUrl,params))};dust.helpers.concatCss=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatCss(paths,play.concatCssUrl,
params))};dust.helpers.concatJs=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatJs(paths,play.concatJsUrl,params))};dust.helpers.js=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.replaceWithLocale(play.getPathList(params));return chunk.write(maybeDynamicConcatJs(paths,play.jsUrl,params))};dust.helpers.jsLocalized=function(chunk,context,
bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatJs(paths,play.localizedJsAssetUrl,params))};dust.helpers.jsAsset=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.replaceWithLocale(play.getPathList(params));var jsPaths=Utils.map(paths,function(path){return play.addExtension(path,".js")});return chunk.write(maybeDynamicConcatJs(jsPaths,play.assetUrl,params))};
dust.helpers.jsAssetLocalized=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatJs(paths,play.localizedJsAssetUrl,params))};dust.helpers.css=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatCss(paths,play.cssUrl,params))};dust.helpers.scss=function(chunk,context,bodies,params){params=
dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatCss(paths,play.scssUrl,params))};dust.helpers.cssAsset=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);var cssPaths=Utils.map(paths,function(path){return play.addExtension(path,".css")});return chunk.write(maybeDynamicConcatCss(cssPaths,play.assetUrl,params))};dust.helpers.cssAssetLocalized=function(chunk,context,
bodies,params){params=dust.helpers.tapAll(params,chunk,context);var paths=play.getPathList(params);return chunk.write(maybeDynamicConcatCss(paths,play.localizedCssAssetUrl,params))};dust.helpers.img=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var attrs=Utils.extend({src:play.imgUrl(params.path)},play._.omit(params,["path"]));return chunk.write(HtmlUtils.createHtmlTag("img",attrs,null))};dust.helpers.scdsImg=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,
chunk,context);var attrs=Utils.extend({src:play.scdsDirectUnversionedUrl(params.path)},play._.omit(params,["path"]));return chunk.write(HtmlUtils.createHtmlTag("img",attrs,null))};dust.helpers.scdsJs=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);return chunk.write(play.createScriptTag({src:play.scdsDirectUnversionedUrl(play.addExtension(params.path,".js"))},params))};dust.helpers.scdsUrl=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,
chunk,context);return chunk.write(dust.escapeHtml(play.scdsDirectUnversionedUrl(params.path)))};dust.helpers.scdsCss=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);return chunk.write(play.createCssTag({href:play.scdsDirectUnversionedUrl(play.addExtension(params.path,".css"))},params))};var SCDS_CONCAT_JS_URL=play.combineUrlPieces("concat/common","js");dust.helpers.scdsJsConcat=function(chunk,context,bodies,params){var paths,date=new Date,versionDate="\x26_v\x3d"+
date.getFullYear()+date.getMonth()+Math.ceil(date.getDate()/7);Utils.assert(params,"@scdsJsConcatUrl called without params");Utils.assert(params.paths,"@scdsJsConcatUrl called without paths param");if(params.cacheBuster&&params.cacheBuster.length){versionDate="\x26_v\x3d"+params.cacheBuster;params=play._.omit(params,"cacheBuster")}paths=play.getPathList(params);return chunk.write(play.createScriptTag({src:play.scdsDirectUrl(play.buildUrl(SCDS_CONCAT_JS_URL,{"f":paths}))+versionDate},params))};dust.helpers.mprImg=
function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var imageWidth=params.size||params.width,imageHeight=params.size||params.height,mprWidth=params.mprSize||params.mprWidth||imageWidth,mprHeight=params.mprSize||params.mprHeight||imageHeight,mprWithoutPadding=params.withoutPadding==="true",attrs=play._.omit(params,["mediaId","urn","size","width","height","imageWidth","imageHeight","mprHeight","mprWidth","mprSize","withoutPadding"]);attrs[params.lazyLoad==="true"?
"data-delayed-url":"src"]=play.mprUrl(play.getMediaIdFromParams(params),mprWidth,mprHeight,mprWithoutPadding);if(imageWidth)attrs.width=parseInt(imageWidth,10)+"";if(imageHeight)attrs.height=parseInt(imageHeight,10)+"";return chunk.write(HtmlUtils.createHtmlTag("img",attrs,null))};dust.helpers.profileImg=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var imageWidth=params.size||params.width,imageHeight=params.size||params.height,mprWidth=params.mprSize||params.mprWidth||
imageWidth,mprHeight=params.mprSize||params.mprHeight||imageHeight,mprWithoutPadding=params.withoutPadding==="true",mediaId=play.getMediaIdFromParams(params),src=mediaId?play.mprUrl(mediaId,mprWidth,mprHeight,mprWithoutPadding):play.noPhotoUrl(imageWidth,imageHeight),attrs=Utils.extend({src:src},play._.omit(params,["mediaId","urn","size","width","height","mprHeight","mprWidth","mprSize"]));if(imageWidth)attrs.width=parseInt(imageWidth,10)+"";if(imageHeight)attrs.height=parseInt(imageHeight,10)+"";
return chunk.write(HtmlUtils.createHtmlTag("img",attrs,null))};dust.helpers.mediaImg=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);var attrs=Utils.extend({src:play.mediaUrl(play.getMediaIdFromParams(params))},play._.omit(params,["mediaId","urn"]));return chunk.write(HtmlUtils.createHtmlTag("img",attrs,null))};dust.helpers.mediaUrl=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);return chunk.write(dust.escapeHtml(play.mediaUrl(play.getMediaIdFromParams(params))))};
dust.helpers.url=function(chunk,context,bodies,params){params=dust.helpers.tapAll(params,chunk,context);return chunk.write(dust.escapeHtml(play.url(params,params.absolute==="true")))};dust.helpers.addQueryParameter=function(chunk,context,bodies,params){Utils.assert(params.url,"@addQueryParameter called without URL param");Utils.assert(params.key,"@addQueryParameter called without key name");Utils.assert(params.value,"@addQueryParameter called without value for key");params=dust.helpers.tapAll(params,
chunk,context);return chunk.write(dust.escapeHtml(play.addQueryParameter(params.url,params.key,params.value)))};dust.helpers.addTrackingCode=function(chunk,context,bodies,params){Utils.assert(params.url,"@addTracking called without url");Utils.assert(params.code,"@addTracking called without tracking code");params=dust.helpers.tapAll(params,chunk,context);return dust.helpers.addQueryParameter(chunk,context,bodies,{key:"trk",value:params.code,url:params.url})}})(play,LI,dust,sc);
(function(){var require=function(moduleName){return this[moduleName]};function exportAsGlobal(exports,require){var t8=require("t8");t8="default"in t8?t8["default"]:t8;"use strict";var xmessage_reader__CHAR_BACK_SLASH="\\";function Reader(input){this._input=input;this._index=0;this._last=null;this.next=this.next.bind(this);this.consume=this.consume.bind(this)}Reader.prototype.next=function(){if(this._index<this._input.length)return this._input[this._index];return null};Reader.prototype.consume=function(){this._last=
this._input[this._index];this._index++};Reader.prototype.isEscaped=function(){return this._last===xmessage_reader__CHAR_BACK_SLASH};Reader.prototype.constructor=Reader;var xmessage_reader=Reader;"use strict";var CHAR_LEFT_BRACE="{",CHAR_RIGHT_BRACE="}",CHAR_COMMA=",",CHAR_COLON=":",CHAR_PIPE="|",CHAR_ZERO="0",CHAR_SINGLE_QUOTE="'",parser__CHAR_BACK_SLASH="\\",EMPTY_STRING="",REGEX_LETTERS=/[a-zA-Z]/,REGEX_NUMBERS_LEADING=/[1-9]/,REGEX_NUMBERS_TRAILING=/[0-9]/,REGEX_LETTERS_OR_NUMBERS=/[a-zA-Z0-9]/,
REGEX_KEYWORD_ALLOWED_CHARS=/[a-zA-Z0-9_\-~.|\[\]\/]/,REGEX_STYLE_DELIMITER_DEFAULT=/[#]/,REGEX_STYLE_DELIMITER_CHOICE=/[#+<]/,SPECIAL_STYLE_PARSERS={},SPECIAL_DELIMITER_PATTERNS={},KEEP_DELIMITER_FLAGS={},KEEP_STYLE_ORDER_FLAGS={};SPECIAL_DELIMITER_PATTERNS.choice=REGEX_STYLE_DELIMITER_CHOICE;KEEP_DELIMITER_FLAGS.choice=true;KEEP_STYLE_ORDER_FLAGS.choice=true;function throwError(message){throw new Error(message);}function extractMessage(input){var segments=[],curlyStack=[],isInsideQuote=false,buffer=
[],reader=new xmessage_reader(input),currentFn=reader.next,nextFn=reader.consume;while(currentFn()){if(currentFn()===parser__CHAR_BACK_SLASH&&!reader.isEscaped()){nextFn();continue}if(reader.isEscaped()){buffer.push(currentFn());nextFn();continue}if(curlyStack.length===0)if(currentFn()===CHAR_SINGLE_QUOTE){isInsideQuote=!isInsideQuote;nextFn();if(buffer.length>0){segments.push(buffer.join(EMPTY_STRING));buffer.length=0}}if(!isInsideQuote)if(currentFn()===CHAR_RIGHT_BRACE&&!reader.isEscaped()&&curlyStack.length===
0)throwError('Unexpected "}"');else if(currentFn()===CHAR_LEFT_BRACE){if(curlyStack.length===0){if(buffer.length>0){segments.push(buffer.join(EMPTY_STRING));buffer.length=0}}else buffer.push(currentFn());curlyStack.push(currentFn());nextFn()}else if(currentFn()===CHAR_RIGHT_BRACE){curlyStack.pop();if(curlyStack.length===0)if(buffer.length>0){segments.push({text:buffer.join(EMPTY_STRING)});buffer.length=0}else throwError("Unexpected end of placeholder (found no content)");else buffer.push(currentFn());
nextFn()}else{if(currentFn())buffer.push(currentFn());nextFn()}else{if(currentFn())buffer.push(currentFn());nextFn()}}if(curlyStack.length!==0)throwError('Unexpected end of placeholder (unmatched "{")');if(buffer.length>0){segments.push(buffer.join(EMPTY_STRING));buffer.length=0}return segments}function expectIndex(currentFn,nextFn){var indexBuffer=[],keywordBuffer=[];if(currentFn()===CHAR_ZERO){indexBuffer.push(currentFn());nextFn();if(currentFn()&&(currentFn()!==CHAR_COMMA&&currentFn()!==CHAR_COLON))throwError('Could not parse index; expected ":" or end of identifier but found "'+
currentFn()+'"')}else if(currentFn()&&REGEX_NUMBERS_LEADING.test(currentFn()))while(currentFn()&&REGEX_NUMBERS_TRAILING.test(currentFn())){indexBuffer.push(currentFn());nextFn()}if(currentFn()===CHAR_COLON){nextFn();if(currentFn()&&REGEX_LETTERS_OR_NUMBERS.test(currentFn())){keywordBuffer.push(currentFn());nextFn()}else throwError('Expected letter (a-zA-Z) or number (0-9) but found "'+currentFn()+'"');while(currentFn()&&REGEX_KEYWORD_ALLOWED_CHARS.test(currentFn())){keywordBuffer.push(currentFn());
nextFn()}}else if(indexBuffer.length===0&&currentFn())throwError('Unexpected character; expected ":" but found "'+currentFn()+'"');if(currentFn()===CHAR_COMMA||!currentFn()){indexBuffer=parseInt(indexBuffer.join(EMPTY_STRING),10);if(isNaN(indexBuffer))indexBuffer=null;keywordBuffer=keywordBuffer.join(EMPTY_STRING)||null}else throwError('Unexpected character; expected "," or end of identifier but found "'+currentFn()+'"');return{number:indexBuffer,keyword:keywordBuffer}}function expectType(currentFn,
nextFn){var buffer=[];if(!currentFn())throwError('Unable to parse type. Expected letter (a-zA-Z) but found end of identifier after ","');else while(currentFn()&&REGEX_LETTERS.test(currentFn())){buffer.push(currentFn());nextFn()}return buffer.join(EMPTY_STRING)}function expectStyleTuple(currentFn,nextFn,parseMode){var DELIMITER_PATTERN=SPECIAL_DELIMITER_PATTERNS[parseMode]||REGEX_STYLE_DELIMITER_DEFAULT,KEEP_DELIMITER=KEEP_DELIMITER_FLAGS[parseMode]||false;var buffer=[],delimiter=null,key=null,value=
undefined,result={};while(currentFn()){if(DELIMITER_PATTERN.test(currentFn()))if(buffer.length===0)throwError('Error parsing style key/value. Found delimiter "'+currentFn()+'" but expected key.');else if(key===null){key=buffer.join(EMPTY_STRING);buffer.length=0;delimiter=currentFn();nextFn()}buffer.push(currentFn());nextFn()}if(delimiter===null){key=buffer.join(EMPTY_STRING);buffer.length=0}else{value=buffer.join(EMPTY_STRING);buffer.length=0}result.key=key||null;result.value=value||null;if(KEEP_DELIMITER)result.delimiter=
delimiter||null;return result}function expectDelimitedStyleList(currentFn,nextFn,parseMode,styleIndexOffset){var KEEP_STYLE_ORDER=KEEP_STYLE_ORDER_FLAGS[parseMode]||false;var curlyStack=[],parsedStyles={},unprocessedStyles=[],buffer=[];styleIndexOffset=styleIndexOffset||0;while(currentFn()){if(currentFn()===CHAR_LEFT_BRACE)curlyStack.push(currentFn());else if(currentFn()===CHAR_RIGHT_BRACE)curlyStack.pop();if(curlyStack.length===0&&currentFn()===CHAR_PIPE){if(buffer.length===0)throwError('Unexpected "'+
CHAR_PIPE+'" in style list.');unprocessedStyles.push(buffer.join(EMPTY_STRING));buffer.length=0;nextFn()}else{buffer.push(currentFn());nextFn()}}if(buffer.length>0){unprocessedStyles.push(buffer.join(EMPTY_STRING));buffer.length=0}unprocessedStyles.map(function(style){var reader=new xmessage_reader(style);return expectStyleTuple(reader.next,reader.consume,parseMode)}).forEach(function(style,index){if(KEEP_STYLE_ORDER)style.order=index+styleIndexOffset;if(!parsedStyles.hasOwnProperty(style.key))parsedStyles[style.key]=
style;else throwError('Found duplicate style key "'+style.key+'". Styles must have unique names.')});return parsedStyles}function expectRemainderAsStyle(currentFn,nextFn){var buffer=[],value=undefined,result={};while(currentFn()){buffer.push(currentFn());nextFn()}value=buffer.join(EMPTY_STRING);result[value]={key:value,value:null};return result}SPECIAL_STYLE_PARSERS.choice=function expectChoiceStyleList(currentFn,nextFn,parseMode){return expectDelimitedStyleList(currentFn,nextFn,parseMode)};SPECIAL_STYLE_PARSERS.date=
function expectDateStyleList(currentFn,nextFn,parseMode){return expectRemainderAsStyle(currentFn,nextFn,parseMode)};SPECIAL_STYLE_PARSERS.number=function expectDateStyleList(currentFn,nextFn,parseMode){return expectRemainderAsStyle(currentFn,nextFn,parseMode)};SPECIAL_STYLE_PARSERS.list=function expectListStyleList(currentFn,nextFn,parseMode){var remainder=[],remainderText,parameters,styleParameters,styleIterator,key;while(currentFn()){remainder.push(currentFn());nextFn()}remainderText=remainder.join(EMPTY_STRING);
if(/^(name$|name\,)/.test(remainderText)){parameters={name:{key:"name",value:"name"}};styleIterator=new xmessage_reader(remainderText.substr("name".length))}else if(/^(text$|text\,)/.test(remainderText)){parameters={text:{key:"text",value:"text"}};styleIterator=new xmessage_reader(remainderText.substr("text".length))}else throwError("Invalid style list for List placeholder.");if(styleIterator)if(styleIterator.next()===CHAR_COMMA){styleIterator.consume();styleParameters=expectDelimitedStyleList(styleIterator.next,
styleIterator.consume,parseMode);for(key in styleParameters)if(styleParameters.hasOwnProperty(key))if(!/^(name$|name\,)/.test(key)&&!/^(text$|text\,)/.test(key))parameters[key]=styleParameters[key]}return parameters};function expectParameters(currentFn,nextFn,parseMode){if(SPECIAL_STYLE_PARSERS[parseMode])return SPECIAL_STYLE_PARSERS[parseMode](currentFn,nextFn,parseMode);return expectDelimitedStyleList(currentFn,nextFn,parseMode)}function expectPlaceholder(currentFn,nextFn){var index=null,type=null,
parameters=null;if(currentFn()){index=expectIndex(currentFn,nextFn);if(currentFn()===CHAR_COMMA){nextFn();type=expectType(currentFn,nextFn);if(currentFn()===CHAR_COMMA){nextFn();parameters=expectParameters(currentFn,nextFn,type)}}else type="simple"}else throwError("Error parsing placeholder. Unexpected end of input.");if(currentFn())throwError('Unexpected character "'+currentFn()+'".');return{index:index,type:type,parameters:parameters}}function parsePlaceholder(str){var reader=new xmessage_reader(str);
return expectPlaceholder(reader.next,reader.consume)}function parseMessage(str){return extractMessage(str).map(function(textOrPlaceholder){if(typeof textOrPlaceholder==="string")return textOrPlaceholder;else return parsePlaceholder(textOrPlaceholder.text)}).map(function parseSubexpressions(textOrPlaceholder){if(typeof textOrPlaceholder==="string")return textOrPlaceholder;else{if(typeof textOrPlaceholder.parameters==="object"){var key=undefined,value=undefined;for(key in textOrPlaceholder.parameters)if(textOrPlaceholder.parameters.hasOwnProperty(key)){value=
textOrPlaceholder.parameters[key];if(value.value)value.value=parseMessage(value.value)}}return textOrPlaceholder}})}var parser=parseMessage;"use strict";var locale="default",ruleSets={"default":{list:{start:"{0}, {1}",middle:"{0}, {1}",end:"{0}, {1}",2:"{0}, {1}"},number:{percent:"{0}%",integer:{separator:","}},suffix:{}},"en_US":{"date":{"long":"LL","medium":"ll","short":"M/D/YY","full":"EEEE, MMMM D, YYYY"},"list":{2:"{0} and {1}","start":"{0}, {1}","middle":"{0}, {1}","end":"{0}, and {1}"},"number":{"percent":"{0}%"},
"possessive":{"fallback":"\u2019s","rules":{".*[Ss]$":"\u2019",".*[A-RT-Z]$":"\u2019S",".*[a-rt-z]$":"\u2019s"}},"time":{"short":"h:mm a","medium":"h:mm:ss a","long":"h:mm:ss a ZZ","full":"h:mm:ss a ZZ"}}},placeholder_placeholder__evaluator=function evaluator(){};function setEvaluator(fn){placeholder_placeholder__evaluator=fn}function getRules(locale,type){var ruleSet=ruleSets[locale];if(type&&ruleSet)return ruleSet[type];return ruleSet}function addRuleSet(locale,rules){ruleSets[locale]=rules}function getStyle(placeholder,
key){var result;if(placeholder.parameters)result=placeholder.parameters[key];if(result)return result.value;return undefined}function getStyleByIndex(placeholder,index){var styles=placeholder.parameters,name;if(styles)for(name in styles)if(styles.hasOwnProperty(name))if(styles[name].order===index)return styles[name];return undefined}function evaluateStyle(placeholder,key,context,locale){var maybeStyle=getStyle(placeholder,key),result;if(maybeStyle)result=maybeStyle.map(function(segment){if(segment instanceof
Object)return placeholder_placeholder__evaluator(segment,context,locale);return segment.toString()}).join("");return result}function resolveIndex(placeholder,context){var result=null;if(placeholder&&placeholder.index&&context){var index=placeholder.index;if(typeof index.number==="number")result=context[index.number];else if(index.number===null)result=context[0];if(result!==undefined&&result!==null){if(typeof index.keyword==="string")result=result[index.keyword]}else result=undefined}return result}
"use strict";var anchor_placeholder=evaluateAnchorPlaceholder;var anchor_placeholder__STRING_TEXT="text",anchor_placeholder__STRING_TITLE="title",STRING_ID="id",STRING_CLASS="class";function evaluateAnchorPlaceholder(placeholderAst,context,locale){var resolved=resolveIndex(placeholderAst,context),isMap=resolved&&typeof resolved==="object",hrefAttr=isMap?resolved.href:resolved,idAttr=isMap?resolved.id:null,classAttr=isMap?resolved["class"]:null,textStyle=evaluateStyle(placeholderAst,anchor_placeholder__STRING_TEXT,
context,locale),titleStyle=evaluateStyle(placeholderAst,anchor_placeholder__STRING_TITLE,context,locale),result="\x3ca";if(hrefAttr)result+=' href\x3d"'+hrefAttr+'"';if(titleStyle)result+=' title\x3d"'+titleStyle+'"';if(idAttr)result+=' id\x3d"'+idAttr+'"';if(classAttr)result+=' class\x3d"'+classAttr+'"';result+="\x3e"+textStyle+"\x3c/a\x3e";return result}"use strict";var boolean_placeholder=evaluateBooleanPlaceholder;var boolean_placeholder__STRING_TRUE="true",boolean_placeholder__STRING_FALSE="false";
function evaluateBooleanPlaceholder(placeholderAst,context,locale){var indexValue=resolveIndex(placeholderAst,context),result="";if(indexValue===true||indexValue===boolean_placeholder__STRING_TRUE)result=evaluateStyle(placeholderAst,boolean_placeholder__STRING_TRUE,context,locale);else if(indexValue===false||indexValue===boolean_placeholder__STRING_FALSE)result=evaluateStyle(placeholderAst,boolean_placeholder__STRING_FALSE,context,locale);else throw new Error('Invalid argument for BooleanPlaceholder. Expected boolean or "true" or "false" but found "'+
indexValue+'"');return result}"use strict";var choice_placeholder=evaluateChoicePlaceholder;var choice_placeholder__REGEX_NUMBERS=/-?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/,choice_placeholder__REGEX_CATEGORIES=/^(zero|singular|dual|few|many|plural|other)$/;function evaluateChoicePlaceholder(placeholderAst,context,locale){var indexValue=resolveIndex(placeholderAst,context),result="",stylesAsRules,styleToRender,chooserResult,styles,params=placeholderAst.parameters,currentStyle,key;styles=[];for(key in params)if(params.hasOwnProperty(key)){currentStyle=
params[key];styles[currentStyle.order]=currentStyle}if(!choice_placeholder__REGEX_NUMBERS.test(indexValue))throw new Error('Invalid context value for ChoicePlaceholder. "'+indexValue+'" is not a valid number.');stylesAsRules=styles.map(function(style,index){var result={};if(choice_placeholder__REGEX_CATEGORIES.test(style.key)){result.category=style.key;result.comparison="eq";result.text=index.toString()}else{result.arg=parseFloat(style.key);switch(style.delimiter){case "\x3c":result.comparison="gt";
break;case "+":result.comparison="gte";break;case "#":result.comparison="gte";break;default:result.comparison="eq";break}result.text=index.toString()}return result});chooserResult=(new t8.Chooser).format(parseFloat(indexValue),stylesAsRules,locale);if(chooserResult!==undefined){styleToRender=styles[parseInt(chooserResult,10)];result=evaluateStyle(placeholderAst,styleToRender.key,context,locale)}return result}"use strict";var map_placeholder=evaluateMapPlaceholder;var DEFAULT_TEXT="DEFAULT_TEXT";function evaluateMapPlaceholder(placeholderAst,
context,locale){var indexValue=resolveIndex(placeholderAst,context),style,result="";if(indexValue!==undefined){indexValue=indexValue.toString();style=getStyle(placeholderAst,indexValue);if(style)result=evaluateStyle(placeholderAst,indexValue,context,locale);else result=evaluateStyle(placeholderAst,DEFAULT_TEXT,context,locale)}else result=evaluateStyle(placeholderAst,DEFAULT_TEXT,context,locale);return result}"use strict";function formatPossessive(value,locale){var result="",key=undefined;if(value!==
undefined){var possessiveRules=getRules(locale,"possessive");if(possessiveRules){var suffixFromRules=undefined;if(possessiveRules.rules)for(key in possessiveRules.rules)if(possessiveRules.rules.hasOwnProperty(key)){var suffixValue=possessiveRules.rules[key];var regex=new RegExp(key);if(regex.test(value))suffixFromRules=suffixValue}if(suffixFromRules!==undefined)result=suffixFromRules;else if(possessiveRules.fallback)result=possessiveRules.fallback}}return result}"use strict";var possessive_placeholder=
evaluatePossessivePlaceholder;function evaluatePossessivePlaceholder(placeholderAst,context,locale){var resolvedValue=resolveIndex(placeholderAst,context),result="";if(resolvedValue!==undefined)result=formatPossessive(resolvedValue,locale);return result}"use strict";var simple_placeholder=evaluateSimplePlaceholder;function evaluateSimplePlaceholder(placeholderAst,context){var resolvedValue=resolveIndex(placeholderAst,context),output;if(resolvedValue===undefined)output="{"+(placeholderAst.index.number!==
null?placeholderAst.index.number:"")+(placeholderAst.index.keyword!==null?":"+placeholderAst.index.keyword:"")+"}";else output=resolvedValue;return output}"use strict";var prefix_suffix_formatter=formatPrefixOrSuffix;var STYLE_PREFIX="prefix",STYLE_SUFFIX="suffix";function formatPrefixOrSuffix(styles,value){if(styles){var maybePrefix=styles[STYLE_PREFIX];var maybeSuffix=styles[STYLE_SUFFIX];if(maybePrefix)value=maybePrefix.value+value;if(maybeSuffix)value=value+maybeSuffix.value}return value}"use strict";
var text_placeholder=evaluateTextPlaceholder;function evaluateTextPlaceholder(placeholderAst,context){var resolvedValue=resolveIndex(placeholderAst,context),output;if(resolvedValue===undefined)output="{"+(placeholderAst.index.number!==null?placeholderAst.index.number:"")+(placeholderAst.index.keyword!==null?":"+placeholderAst.index.keyword:"")+"}";else output=resolvedValue;output=prefix_suffix_formatter(placeholderAst.parameters,output);return output}"use strict";function stringFormat(template){var args=
Array.prototype.slice.call(arguments,1);return template.replace(/{(\d+)}/g,function(match,number){return typeof args[number]!=="undefined"?args[number]:match})}function findFirstProperty(properties,object){var length,index;for(index=0,length=properties.length;index<length;++index){var key=properties[index];if(object.hasOwnProperty(key))return object[key]}return null}function defaults(target,source){var key;if(target&&source)for(key in source)if(source.hasOwnProperty(key))if(!target.hasOwnProperty(key))target[key]=
source[key];return target}"use strict";var number_placeholder=evaluateNumberPlaceholder;function formatPercentage(template,value){value=Math.floor(value*100);return stringFormat(template,value)}function getFormattingRules(locale){return defaults(defaults({},getRules(locale,"number")),getRules("default","number"))}function evaluateNumberPlaceholder(placeholderAst,context,locale){var resolvedValue=resolveIndex(placeholderAst,context),styles=placeholderAst.parameters,rules=getFormattingRules(locale),
output;if(resolvedValue!==undefined)if(styles)if(styles.integer)output=(new t8.NumberFormatter).format(Math.floor(resolvedValue),locale);else if(styles.currency)output=(new t8.CurrencyFormatter).format(resolvedValue,undefined,locale);else{if(styles.percent)output=formatPercentage(rules.percent,resolvedValue)}else output=(new t8.NumberFormatter).format(resolvedValue,locale);return output}"use strict";var date_placeholder=evaluateDatePlaceholder;function evaluateDatePlaceholder(placeholderAst,context,
locale){var resolvedValue=resolveIndex(placeholderAst,context),output="",style,pattern,t8Impl,rules=getRules(locale,"date");style=getStyleByIndex(placeholderAst,0);if(!style)style="medium";else style=style.key;pattern=rules[style];if(!pattern){pattern=style;if(pattern)pattern=pattern.replace(/Z/,"ZZ")}if(pattern){t8Impl=new t8.DateFormatter;output=t8Impl.format(new Date(resolvedValue),locale,pattern,false)}return output}"use strict";var time_placeholder=evaluateTimePlaceholder;function evaluateTimePlaceholder(placeholderAst,
context,locale){var resolvedValue=resolveIndex(placeholderAst,context),output="",style,pattern,t8Impl,rules=getRules(locale,"time");style=getStyleByIndex(placeholderAst,0);if(!style)style="medium";else style=style.key;pattern=rules[style];if(!pattern)pattern=style;if(pattern){t8Impl=new t8.DateFormatter;output=t8Impl.format(new Date(resolvedValue),locale,pattern,false)}return output}"use strict";var suffix_placeholder=evaluateSuffixPlaceholder;var CHAR_SPACE=" ",CHAR_TAB="\t",suffix_placeholder__STRING_SEP=
"sep",STRATEGY_REVERSE_SEARCH_FOR_VOWEL="reverseSearchForVowel";function evaluateSuffixPlaceholder(placeholderAst,context,locale){var resolvedValue=resolveIndex(placeholderAst,context),result="",addSeparator=false,rules,key,value,regex,suffixFromRules,currentChar,i,lastIndex,vowels,endsWithVowel,params=placeholderAst.parameters;if(resolvedValue!==undefined){if(params)addSeparator=!!params[suffix_placeholder__STRING_SEP];rules=getRules(locale,"suffix");if(rules){vowels=(rules.hardVowels||"")+(rules.softVowels||
"");switch(rules.strategy){case STRATEGY_REVERSE_SEARCH_FOR_VOWEL:if(resolvedValue.length>0){lastIndex=resolvedValue.length-1;for(i=lastIndex;i>=0&&currentChar!==CHAR_SPACE&&currentChar!==CHAR_TAB;i--){currentChar=resolvedValue.charAt(i);if(vowels.indexOf(currentChar)!==-1){endsWithVowel=i===lastIndex;suffixFromRules=rules.hardVowels&&rules.hardVowels.indexOf(currentChar)>-1?rules.hardVowelSuffix:rules.fallbackSuffix;result=""+(endsWithVowel?rules.bufferChar:"")+suffixFromRules;return addSeparator?
rules.separator+result:result}}for(key in rules.nonVowelToSuffix)if(rules.nonVowelToSuffix.hasOwnProperty(key)){value=rules.nonVowelToSuffix[key];regex=new RegExp(key);if(regex.test(resolvedValue.charAt(lastIndex))){suffixFromRules=value;break}}if(!suffixFromRules)suffixFromRules=rules.defaultBufferChar;result=addSeparator?rules.separator+suffixFromRules:suffixFromRules;break}break;default:break}}}return result}"use strict";var name_formatter=formatName;var DEFAULT_NAME_STYLE="FULL_NAME",NAME_STYLES=
["familiar","family","full","given","list","maiden"];function formatName(styles,value,locale){var output,nameAdapter={},formatAdapter,formatStyle,hasMicroformat=false,t8Impl;if(value!==undefined){nameAdapter.firstName=value.givenName;nameAdapter.lastName=value.familyName;nameAdapter.maidenName=value.maidenName;formatStyle=findFirstProperty(NAME_STYLES,styles);if(formatStyle)formatStyle=formatStyle.key;else formatStyle="familiar";hasMicroformat=!!styles.micro;if(formatStyle)switch(formatStyle){case "given":output=
value.givenName||"";if(hasMicroformat)output='\x3cspan class\x3d"given-name"\x3e'+output+"\x3c/span\x3e";break;case "family":output=value.familyName||"";if(hasMicroformat)output='\x3cspan class\x3d"family-name"\x3e'+output+"\x3c/span\x3e";break;case "maiden":output=value.maidenName||"";if(hasMicroformat)output='\x3cspan class\x3d"additional-name"\x3e'+output+"\x3c/span\x3e";break;default:formatAdapter=formatStyle==="full"||formatStyle==="given"||formatStyle==="family"||formatStyle==="maiden"?"FULL_NAME":
formatStyle==="familiar"?"FAMILIAR_NAME":formatStyle==="list"?"LIST_VIEW":DEFAULT_NAME_STYLE;if(hasMicroformat)formatAdapter=[formatAdapter,"MICROFORMAT"];t8Impl=new t8.NameFormatter;output=t8Impl.format(nameAdapter,formatAdapter,locale);break}}return output}"use strict";var name_placeholder=evaluateNamePlaceholder;function evaluateNamePlaceholder(placeholderAst,context,locale){var resolvedValue=resolveIndex(placeholderAst,context),output=undefined;output=name_formatter(placeholderAst.parameters,
resolvedValue,locale);if(placeholderAst.parameters.possessive)output+=formatPossessive(output,locale);output=prefix_suffix_formatter(placeholderAst.parameters,output);return output}"use strict";var list_placeholder=evaluateListPlaceholder;var TYPE_NAME="name",RULE_START="start",RULE_MIDDLE="middle",RULE_END="end",RULE_2="2";function applyValueFormatting(styles,value,locale){if(styles){if(styles[TYPE_NAME])value=name_formatter(styles,value,locale);value=prefix_suffix_formatter(styles,value)}return value}
function evaluateListPlaceholder(placeholderAst,context,locale){var resolvedValue=resolveIndex(placeholderAst,context),result="",collectionSize,lastIndex,rules=getRules(locale,"list")||getRules("default","list"),listRule,firstPosition,secondPosition;if(resolvedValue&&resolvedValue instanceof Array){collectionSize=resolvedValue.length;lastIndex=collectionSize-1;if(collectionSize>0)switch(collectionSize){case 1:result=applyValueFormatting(placeholderAst.parameters,resolvedValue[0],locale);break;case 2:result=
stringFormat(rules[RULE_2],applyValueFormatting(placeholderAst.parameters,resolvedValue[0],locale),applyValueFormatting(placeholderAst.parameters,resolvedValue[1],locale));break;default:firstPosition=0;secondPosition=1;do{listRule=firstPosition===0?RULE_START:secondPosition<lastIndex?RULE_MIDDLE:RULE_END;if(listRule===RULE_START)result=stringFormat(rules[listRule],applyValueFormatting(placeholderAst.parameters,resolvedValue[firstPosition],locale),applyValueFormatting(placeholderAst.parameters,resolvedValue[secondPosition],
locale));else result=stringFormat(rules[listRule],result,applyValueFormatting(placeholderAst.parameters,resolvedValue[secondPosition],locale));firstPosition++;secondPosition++}while(listRule!==RULE_END);break}}return result}"use strict";var validatePlaceholder=validatePlaceholder__validate;function validatePlaceholder__validate(ast){if(!ast)return"Placeholder is invalid.";if(!ast.index)return"Placeholder must have an index.";return undefined}"use strict";function allowOnlyTheseStyleKeys(ast,allowedStylesRegexp){var hasValidationError,
styles,name;if(ast.parameters){styles=ast.parameters;for(name in styles)if(styles.hasOwnProperty(name))if(!allowedStylesRegexp.test(name)){hasValidationError='Invalid style "'+name+'"';break}}return hasValidationError}function mustHaveTheseStyleKeys(ast,requiredStyleKeys){var hasValidationError,styles,name,index,length;if(ast.parameters){styles=ast.parameters;for(index=0,length=requiredStyleKeys.length;index<length;++index){name=requiredStyleKeys[index];if(!styles.hasOwnProperty(name))hasValidationError=
'Missing required style key "'+name+'"'}}else hasValidationError="Placeholder must have styles";return hasValidationError}function checkStyleCount(ast,styleLimit,mode){var hasValidationError,messageZero="Placeholder must have styles",messageEq="Placeholder must have exactly "+styleLimit+" style(s)",messageLte="Placeholder must have at least "+styleLimit+" style(s)",styleCount=0,key;if(ast.parameters){for(key in ast.parameters)if(ast.parameters.hasOwnProperty(key))styleCount++;if(mode==="eq"&&styleCount!==
styleLimit)hasValidationError=messageEq;else if(mode==="gte"&&styleCount<styleLimit)hasValidationError=messageLte}else if(styleLimit>0)hasValidationError=messageZero;return hasValidationError}function mustHaveAtLeastNStyles(ast,styleLimit){return checkStyleCount(ast,styleLimit,"gte")}function mustHaveExactlyNStyles(ast,styleLimit){return checkStyleCount(ast,styleLimit,"eq")}function checkStyleValue(ast,styles,mode){var style,index,length,hasValidationError;if(ast.parameters)for(index=0,length=styles.length;index<
length;++index){style=ast.parameters[styles[index]];if("without"===mode){if(style&&style.value)hasValidationError='Invalid value for style "'+style.key+'"'}else if("with"===mode)if(style)if(!style.value)hasValidationError='Style "'+style.key+'" must have a value'}return hasValidationError}function stylesMustHaveAValue(ast,styles){return checkStyleValue(ast,styles,"with")}function stylesMustHaveNoValue(ast,styles){return checkStyleValue(ast,styles,"without")}"use strict";var validateAnchor=validateAnchor__validate;
var validateAnchor__STRING_TEXT="text",validateAnchor__STRING_TITLE="title",REQUIRED_STYLES=[validateAnchor__STRING_TEXT],validateAnchor__SUPPORTED_STYLES_REGEXP=new RegExp("^("+[validateAnchor__STRING_TEXT,validateAnchor__STRING_TITLE].join("|")+")$");function validateAnchor__validate(ast){var result=mustHaveTheseStyleKeys(ast,REQUIRED_STYLES);if(!result)result=allowOnlyTheseStyleKeys(validateAnchor__SUPPORTED_STYLES_REGEXP);return result}"use strict";var validateBoolean=validateBoolean__validate;
var validateBoolean__STRING_TRUE="true",validateBoolean__STRING_FALSE="false",validateBoolean__SUPPORTED_STYLES_REGEXP=new RegExp("^("+[validateBoolean__STRING_TRUE,validateBoolean__STRING_FALSE].join("|")+")$");function validateBoolean__validate(ast){var result=mustHaveAtLeastNStyles(ast,1);if(!result)result=allowOnlyTheseStyleKeys(ast,validateBoolean__SUPPORTED_STYLES_REGEXP);return result}"use strict";var validateChoice=validateChoice__validate;var validateChoice__REGEX_NUMBERS=/-?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/,
validateChoice__REGEX_CATEGORIES=/^(zero|singular|dual|few|many|plural|other)$/;function validateChoice__validate(ast){var result,lastNumber,currentNumber,i,length,styles,params=ast.parameters,currentStyle,key,hasCategories=false;styles=[];for(key in params)if(params.hasOwnProperty(key)){currentStyle=params[key];styles[currentStyle.order]=currentStyle;if(validateChoice__REGEX_CATEGORIES.test(key))hasCategories=true}currentStyle=undefined;for(i=0,length=styles.length;i<length;++i){currentStyle=styles[i];
if(validateChoice__REGEX_NUMBERS.test(currentStyle.key)){currentNumber=parseInt(currentStyle.key,10);if(lastNumber===undefined)lastNumber=currentNumber;else if(lastNumber<currentNumber)lastNumber=currentNumber;else{result="Invalid number order. Cannot list "+currentNumber+" after "+lastNumber+". Numbers must be ascending.";break}}else if(validateChoice__REGEX_CATEGORIES.test(currentStyle.key))hasCategories=true;else{result='Invalid category key "'+currentStyle.key+'".';break}}if(hasCategories)if(!params.singular)result=
'Missing required category "singular"';else if(!params.plural)result='Missing required category "plural"';return result}"use strict";var validateMap=validateMap__validate;function validateMap__validate(ast){var result,styles,name,hasStyle;if(!ast.parameters)result="MapPlaceholder must have parameters.";else{styles=ast.parameters;for(name in styles)if(styles.hasOwnProperty(name)){hasStyle=true;if(!styles[name].value){result="MapPlaceholder cannot have keys without values.";break}}if(!hasStyle)result=
"MapPlaceholder must have at least one style argument."}return result}"use strict";var validateName=validateName__validate;var validateName__STRING_PREFIX="prefix",validateName__STRING_SUFFIX="suffix",validateName__STYLES_THAT_REQUIRE_VALUES=[validateName__STRING_PREFIX,validateName__STRING_SUFFIX],validateName__SUPPORTED_STYLES_REGEXP=/^(familiar|family|full|given|list|maiden|micro|possessive|salutation|prefix|suffix)$/;function validateName__validate(ast){var result=allowOnlyTheseStyleKeys(ast,
validateName__SUPPORTED_STYLES_REGEXP);if(!result)result=stylesMustHaveAValue(ast,validateName__STYLES_THAT_REQUIRE_VALUES);return result}"use strict";var validateList=validateList__validate;var validateList__STRING_PREFIX="prefix",validateList__STRING_SUFFIX="suffix",validateList__STYLES_THAT_REQUIRE_VALUES=[validateList__STRING_PREFIX,validateList__STRING_SUFFIX],validateList__SUPPORTED_STYLES_REGEXP=/^(text|name|familiar|family|full|given|list|maiden|micro|possessive|salutation|prefix|suffix)$/;
function validateList__validate(ast){var result=allowOnlyTheseStyleKeys(ast,validateList__SUPPORTED_STYLES_REGEXP);if(!result)result=stylesMustHaveAValue(ast,validateList__STYLES_THAT_REQUIRE_VALUES);return result}"use strict";var validatePossessive=validatePossessive__validate;function validatePossessive__validate(ast){return mustHaveExactlyNStyles(ast,0)}"use strict";var validateSuffix=validateSuffix__validate;var validateSuffix__STRING_SEP="sep",STRING_NOSEP="nosep",EMPTY_STYLES=[validateSuffix__STRING_SEP,
STRING_NOSEP],validateSuffix__SUPPORTED_STYLES_REGEXP=new RegExp("^("+[validateSuffix__STRING_SEP,STRING_NOSEP].join("|")+")$");function validateSuffix__validate(ast){var result=mustHaveExactlyNStyles(ast,1);if(!result)result=allowOnlyTheseStyleKeys(ast,validateSuffix__SUPPORTED_STYLES_REGEXP);if(!result)result=stylesMustHaveNoValue(ast,EMPTY_STYLES);return result}"use strict";var validateText=validateText__validate;var validateText__STRING_PREFIX="prefix",validateText__STRING_SUFFIX="suffix",validateText__SUPPORTED_STYLES_REGEXP=
new RegExp([validateText__STRING_SUFFIX,validateText__STRING_PREFIX].join("|"));function validateText__validate(ast){return allowOnlyTheseStyleKeys(ast,validateText__SUPPORTED_STYLES_REGEXP)}"use strict";var Validator=Validator__validate;var specializedValidators={anchor:validateAnchor,boolean:validateBoolean,choice:validateChoice,list:validateList,map:validateMap,name:validateName,possessive:validatePossessive,suffix:validateSuffix,text:validateText};function Validator__validate(ast){var key,value,
hasValidationError;if(typeof ast==="string")return;hasValidationError=validatePlaceholder(ast);if(!hasValidationError)if(specializedValidators.hasOwnProperty(ast.type))hasValidationError=specializedValidators[ast.type](ast);if(hasValidationError)throw new Error(hasValidationError);else if(ast&&ast.parameters instanceof Object)for(key in ast.parameters)if(ast.parameters.hasOwnProperty(key)){value=ast.parameters[key];if(value.value&&value.value instanceof Array)value.value.forEach(Validator__validate)}}
"use strict";var EVALUATORS={anchor:anchor_placeholder,boolean:boolean_placeholder,choice:choice_placeholder,date:date_placeholder,list:list_placeholder,map:map_placeholder,name:name_placeholder,number:number_placeholder,possessive:possessive_placeholder,simple:simple_placeholder,suffix:suffix_placeholder,text:text_placeholder,time:time_placeholder};function message_builder__evaluator(placeholderAst,context,locale){var result="",evaluatorFunction;if(placeholderAst&&context&&locale){evaluatorFunction=
EVALUATORS[placeholderAst.type];if(evaluatorFunction)result=evaluatorFunction(placeholderAst,context,locale)}return result}setEvaluator(message_builder__evaluator);function toAst(xmessage){var protoMessage=parser(xmessage);protoMessage.forEach(Validator);return protoMessage}function makeInterpolator(ast,locale){return function evaluate(context){return ast.map(function(placeholder){if(typeof placeholder==="string")return placeholder;else return message_builder__evaluator(placeholder,context,locale)}).join("")}}
function fromString(xmessage,locale){return makeInterpolator(toAst(xmessage),locale)}exports.toAst=toAst;exports.makeInterpolator=makeInterpolator;exports.fromString=fromString}exportAsGlobal(this.xmessage={},require)})();
(function(play,t8,LI){var oldResourceGet=t8.Resources.prototype.get;t8.Resources.prototype.get=function(key,namespace,context,callback){var useNativeXmsg=false;var useJavaXmsg=false;if(play.hasPageContext()){useNativeXmsg=play.getPageContextValue("useNativeXmsg",true);useJavaXmsg=!play.isClient&&play.getPageContextValue("useJavaXmsg",false)}if(useNativeXmsg||useJavaXmsg){play.Utils.assert(callback,"get called with null callback");play.Utils.assert(key,"get called with null or empty key");play.Utils.assert(namespace,
"get called with null or empty namespace");evalXmsg(callback,key,namespace,context,useJavaXmsg,this.i18nCacheStatic)}else oldResourceGet.call(this,key,namespace,context,callback)};function evalXmsg(callback,key,namespace,context,useJavaXmsg,i18nCacheStatic){if(useJavaXmsg)try{callback(null,com.linkedin.playplugins.dust.plugin.I18nPropertiesRenderer.getProperty(namespace,LI.i18n.getLocale().value,key,context))}catch(e){callback(e.getMessage())}else if(i18nCacheStatic&&i18nCacheStatic.cache&&i18nCacheStatic.cache[namespace]&&
i18nCacheStatic.cache[namespace][key]){var xmsgString=i18nCacheStatic.cache[namespace][key];var ast=xmessage.toAst(xmsgString);var messageFn=xmessage.makeInterpolator(ast,LI.i18n.getLocale().value);callback(null,messageFn(getData(ast,context)))}else callback("Could not find xmsg key "+key+" in static i18n cache.")}function getData(ast,context){var result=[];var data={};ast.map(function(placeholder){if(typeof placeholder==="object"){var argName=placeholder.index.keyword;data[argName]=context.get(argName)}});
result[0]=data;return result}})(play,t8,LI);