/*! messageResource.js 04-04-2015 */
!function(a){"use strict";var b=function(){function b(a,b){return b&&"string"==typeof b?a+"_"+b:a}function c(a,b,c){var d,e;return(a=""+a)?(i=i||{},i[c]=i[c]||{},i[c][b]=i[c][b]||{},e=i[c][b],d=a.split("\n"),void(d&&d.forEach(function(a){var b,c="";a=a.trim(),""!==a&&"#"!==a.charAt(0)&&(b=a.match(/([^=]*)=(.*)$/),b&&b[1]?(b[2]&&(c=b[2].trim()),e[b[1].trim()]=c):g("Invalid line : "+a))}))):void g("Invalid contents.")}function d(a){return a&&"string"==typeof a||(a=q),-1!==a.indexOf("-")&&(a=a.replace("-","_")),a}function e(a,b){var c=!1;return a&&b&&(c=i&&i[b]&&i[b][a]?!0:!1),c}function f(a){var b=a.replace(/\\u[\dA-Fa-f]{4}/g,function(a){return String.fromCharCode(parseInt(a.replace(/\\u/g,""),16))});return b}function g(b,c){s&&a.console&&a.console.log&&a.console.log("messageResource.js : "+b),c===!0&&alert("messageResource.js : "+b)}function h(a,b){var c;c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),c.onreadystatechange=function(){4===c.readyState&&b(200===c.status?c.responseText:c.status)},c.open("GET",a,!0),c.send()}var i,j,k,l,m,n="_default",o=".properties",p="en_US",q=p,r=!1,s=!1;return{init:function(a){a=a||{},j=a.filePath||"",j&&"/"!==j.charAt(j.length-1)&&(j+="/"),k=a.fileExtension||o,"."!==k.charAt(0)&&(k="."+k),a.defaultLocale=d(a.defaultLocale),p=a.defaultLocale,q=a.defaultLocale,l=a.fileNameResolver||b,m=a.ajaxFunction||h,s=a.debugMode||!1,r=!0},setCurrentLocale:function(a){a&&"string"==typeof a&&(q=a)},load:function(a,b,f){var h,o,q,s,t=[];if(!r)return void g("Invalid configuration - Invoke init method with proper configuration",!0);if(q=a||n,o=d(f),h=o===p?f:o,Array.isArray(q))for(s=0;s<q.length;s++)q[s]&&!e(q[s],o)&&t.push(q[s]);else e(q,o)||t.push(q);if(0===t.length)return void(b&&b());i=i||{},i[o]=i[o]||{};var u=0;t.forEach(function(a){var d,e;d=l(a,h),e=j+d+k,m(e,function(d){c(d,a,o),u+=1,u===t.length&&b&&b()})})},get:function(a,b,c,g){var h,j,k,l=g||a;return h=b||n,j=d(c),e(h,j)&&(k=i[j][h],"undefined"!=typeof k[a]&&(l=k[a])),f(l)}}}();"function"==typeof define&&define.amd?define([],function(){return b}):a.messageResource||(a.messageResource=b)}(this),function(){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c,d;if("undefined"==typeof this||null===this)throw new TypeError(" this is null or not defined");var e=Object(this),f=e.length>>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(c=b),d=0;f>d;){var g;d in e&&(g=e[d],a.call(c,g,d,e)),d++}}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})}();