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gB,CAC5BtH,EACAtC,EACA2B,EACAN,EACAqB,EACAD,EACAI,EACAD,EACA6E,EACAxE,IAEJwG,EAAgBI,UAAS,WACrB,IAAIC,EAAYL,EAAgBvI,UAAUD,IAAI,MAC1C8I,EAAuBD,EAAU1M,aAAa,KAC9C4M,EAAqBF,EAAU1M,aAAa,YAC5CrD,EAAa4P,EAASzQ,QAAQM,QAAQO,WAErCA,IACDA,EAAa,CAAC,IAAK,SAEvBA,EAAWkQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAOH,EAAsB,IAAM,IAC5GhQ,EAAWkQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAQ,UAAWF,EAAoB,WAAa,GACjI,IACOhB,CACX","sources":["webpack://iadviser/./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js"],"sourcesContent":["import i18next from 'i18next';\nimport { getLogger } from 'aurelia-logging';\nimport { resolver } from 'aurelia-dependency-injection';\nimport { customAttribute, HtmlBehaviorResource, ViewResources } from 'aurelia-templating';\nimport { metadata } from 'aurelia-metadata';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { valueConverter } from 'aurelia-framework';\nimport { BindingSignaler, SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { ValueConverter, bindingBehavior, valueConverter as valueConverter$1 } from 'aurelia-binding';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar I18N_EA_SIGNAL = \"i18n:locale:changed\";\nvar I18N = /** @class */ (function () {\n function I18N(ea, signaler) {\n this.ea = ea;\n this.signaler = signaler;\n this.globalVars = {};\n this.i18next = i18next;\n this.Intl = PLATFORM.global.Intl;\n }\n I18N.inject = function () { return [EventAggregator, BindingSignaler]; };\n I18N.prototype.setup = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var defaultOptions;\n var _this = this;\n return __generator(this, function (_a) {\n defaultOptions = {\n skipTranslationOnMissingKey: false,\n compatibilityJSON: \"v1\",\n lng: \"en\",\n attributes: [\"t\", \"i18n\"],\n fallbackLng: \"en\",\n debug: false\n };\n this.i18nextDeferred = new Promise(function (resolve, reject) {\n _this.i18next.init(options || defaultOptions, function (err) {\n if (err && !Array.isArray(err)) {\n reject(err);\n }\n // make sure attributes is an array in case a string was provided\n if (_this.i18next.options.attributes instanceof String) {\n _this.i18next.options.attributes = [_this.i18next.options.attributes];\n }\n resolve(_this.i18next);\n });\n });\n return [2 /*return*/, this.i18nextDeferred];\n });\n });\n };\n I18N.prototype.i18nextReady = function () {\n return this.i18nextDeferred;\n };\n I18N.prototype.setLocale = function (locale) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var oldLocale = _this.getLocale();\n _this.i18next.changeLanguage(locale, function (err, tr) {\n if (err) {\n reject(err);\n }\n _this.ea.publish(I18N_EA_SIGNAL, { oldValue: oldLocale, newValue: locale });\n _this.signaler.signal(\"aurelia-translation-signal\");\n resolve(tr);\n });\n });\n };\n I18N.prototype.getLocale = function () {\n return this.i18next.language;\n };\n I18N.prototype.nf = function (options, locales) {\n return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});\n };\n I18N.prototype.uf = function (numberLike, locale) {\n var nf = this.nf({}, locale || this.getLocale());\n var comparer = nf.format(10000 / 3);\n var thousandSeparator = comparer[1];\n var decimalSeparator = comparer[5];\n if (thousandSeparator === \".\") {\n thousandSeparator = \"\\\\.\";\n }\n // remove all thousand seperators\n var result = numberLike.replace(new RegExp(thousandSeparator, \"g\"), \"\")\n // remove non-numeric signs except -> , .\n .replace(/[^\\d.,-]/g, \"\")\n // replace original decimalSeparator with english one\n .replace(decimalSeparator, \".\");\n // return real number\n return Number(result);\n };\n I18N.prototype.df = function (options, locales) {\n return new this.Intl.DateTimeFormat(locales || this.getLocale(), options);\n };\n I18N.prototype.tr = function (key, options) {\n var fullOptions = this.globalVars;\n if (options !== undefined) {\n fullOptions = Object.assign(Object.assign({}, this.globalVars), options);\n }\n return this.i18next.t(key, fullOptions);\n };\n I18N.prototype.registerGlobalVariable = function (key, value) {\n this.globalVars[key] = value;\n };\n I18N.prototype.unregisterGlobalVariable = function (key) {\n delete this.globalVars[key];\n };\n /**\n * Scans an element for children that have a translation attribute and\n * updates their innerHTML with the current translation values.\n *\n * If an image is encountered the translated value will be applied to the src attribute.\n *\n * @param el HTMLElement to search within\n */\n I18N.prototype.updateTranslations = function (el) {\n if (!el || !el.querySelectorAll) {\n return;\n }\n var i;\n var l;\n // create a selector from the specified attributes to look for\n // var selector = [].concat(this.i18next.options.attributes);\n var attributes = this.i18next.options.attributes;\n var selector = [].concat(attributes);\n for (i = 0, l = selector.length; i < l; i++) {\n selector[i] = \"[\" + selector[i] + \"]\";\n }\n selector = selector.join(\",\");\n // get the nodes\n var nodes = el.querySelectorAll(selector);\n for (i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n var keys = void 0;\n var params = void 0;\n // test every attribute and get the first one that has a value\n for (var i2 = 0, l2 = attributes.length; i2 < l2; i2++) {\n keys = node.getAttribute(attributes[i2]);\n var pname = attributes[i2] + \"-params\";\n if (pname && node.au && node.au[pname]) {\n params = node.au[pname].viewModel.value;\n }\n if (keys) {\n break;\n }\n }\n // skip if nothing was found\n if (!keys) {\n continue;\n }\n // split the keys into multiple keys separated by a ;\n this.updateValue(node, keys, params);\n }\n };\n I18N.prototype.updateValue = function (node, value, params) {\n if (value === null || value === undefined) {\n value = \"\";\n }\n var keys = value.toString().split(\";\");\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n // remove the optional attribute\n var re = /\\[([a-z\\-, ]*)\\]/ig;\n var m = void 0;\n var attr = \"text\";\n // set default attribute to src if this is an image node\n if (node.nodeName === \"IMG\") {\n attr = \"src\";\n }\n // check if a attribute was specified in the key\n // tslint:disable-next-line:no-conditional-assignment\n while ((m = re.exec(key)) !== null) {\n if (m.index === re.lastIndex) {\n re.lastIndex++;\n }\n if (m) {\n key = key.replace(m[0], \"\");\n attr = m[1];\n }\n }\n var attrs = attr.split(\",\");\n var j = attrs.length;\n while (j--) {\n attr = attrs[j].trim();\n if (!node._textContent) {\n node._textContent = node.textContent;\n }\n if (!node._innerHTML) {\n node._innerHTML = node.innerHTML;\n }\n // convert to camelCase\n // tslint:disable-next-line:only-arrow-functions\n var attrCC = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n var reservedNames = [\"prepend\", \"append\", \"text\", \"html\"];\n var i18nLogger = getLogger(\"i18n\");\n if (reservedNames.indexOf(attr) > -1 &&\n node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n i18nLogger.warn(\"Aurelia I18N reserved attribute name\\n\\n [\" + reservedNames.join(\", \") + \"]\\n\\n Your custom element has a bindable named \" + attr + \" which is a reserved word.\\n\\n If you'd like Aurelia I18N to translate your bindable instead, please consider giving it another name.\");\n }\n if (this.i18next.options.skipTranslationOnMissingKey &&\n this.tr(key, params) === key) {\n i18nLogger.warn(\"Couldn't find translation for key: \" + key);\n return;\n }\n // handle various attributes\n // anything other than text,prepend,append or html will be added as an attribute on the element.\n switch (attr) {\n case \"text\":\n var newChild = DOM.createTextNode(this.tr(key, params));\n if (node._newChild && node._newChild.parentNode === node) {\n node.removeChild(node._newChild);\n }\n node._newChild = newChild;\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n node.appendChild(node._newChild);\n break;\n case \"prepend\":\n var prependParser = DOM.createElement(\"div\");\n prependParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._prepended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n for (var pi = prependParser.childNodes.length - 1; pi >= 0; pi--) {\n prependParser.childNodes[pi]._prepended = true;\n if (node.firstChild) {\n node.insertBefore(prependParser.childNodes[pi], node.firstChild);\n }\n else {\n node.appendChild(prependParser.childNodes[pi]);\n }\n }\n break;\n case \"append\":\n var appendParser = DOM.createElement(\"div\");\n appendParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._appended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n while (appendParser.firstChild) {\n appendParser.firstChild._appended = true;\n node.appendChild(appendParser.firstChild);\n }\n break;\n case \"html\":\n node.innerHTML = this.tr(key, params);\n break;\n default: // normal html attribute\n if (node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n node.au.controller.viewModel[attrCC] = this.tr(key, params);\n }\n else {\n node.setAttribute(attr, this.tr(key, params));\n }\n break;\n }\n }\n }\n };\n return I18N;\n}());\n\nvar TBindingBehavior = /** @class */ (function () {\n function TBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n TBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n TBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the TValueConverter.\n // pass through any args to the binding behavior to the TValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"t\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n TBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n TBindingBehavior = __decorate([\n bindingBehavior(\"t\")\n ], TBindingBehavior);\n return TBindingBehavior;\n}());\n\n// tslint:disable-next-line:only-arrow-functions\nvar isInteger = Number.isInteger || function (value) {\n return typeof value === \"number\" &&\n isFinite(value) &&\n Math.floor(value) === value;\n};\nvar LazyOptional = /** @class */ (function () {\n function LazyOptional(key) {\n this.key = key;\n }\n LazyOptional_1 = LazyOptional;\n LazyOptional.of = function (key) {\n return new LazyOptional_1(key);\n };\n LazyOptional.prototype.get = function (container) {\n var _this = this;\n return function () {\n if (container.hasResolver(_this.key, false)) {\n return container.get(_this.key);\n }\n return null;\n };\n };\n var LazyOptional_1;\n LazyOptional = LazyOptional_1 = __decorate([\n resolver()\n ], LazyOptional);\n return LazyOptional;\n}());\n\nvar TParamsCustomAttribute = /** @class */ (function () {\n function TParamsCustomAttribute(element) {\n this.element = element;\n }\n TParamsCustomAttribute_1 = TParamsCustomAttribute;\n TParamsCustomAttribute.inject = function () {\n return [DOM.Element];\n };\n TParamsCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TParamsCustomAttribute_1);\n r.aliases = aliases;\n };\n TParamsCustomAttribute.prototype.valueChanged = function () { };\n var TParamsCustomAttribute_1;\n TParamsCustomAttribute = TParamsCustomAttribute_1 = __decorate([\n customAttribute(\"t-params\")\n ], TParamsCustomAttribute);\n return TParamsCustomAttribute;\n}());\n\nvar TCustomAttribute = /** @class */ (function () {\n function TCustomAttribute(element, service, ea, p) {\n this.element = element;\n this.service = service;\n this.ea = ea;\n this.lazyParams = p;\n }\n TCustomAttribute_1 = TCustomAttribute;\n TCustomAttribute.inject = function () {\n return [DOM.Element, I18N, EventAggregator, LazyOptional.of(TParamsCustomAttribute)];\n };\n TCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TCustomAttribute_1);\n r.aliases = aliases;\n };\n TCustomAttribute.prototype.bind = function () {\n var _this = this;\n this.params = this.lazyParams();\n if (this.params) {\n this.params.valueChanged = function (newParams, oldParams) {\n _this.paramsChanged(_this.value, newParams, oldParams);\n };\n }\n var p = this.params !== null ? this.params.value : undefined;\n this.subscription = this.ea.subscribe(I18N_EA_SIGNAL, function () {\n _this.service.updateValue(_this.element, _this.value, _this.params !== null ? _this.params.value : undefined);\n });\n this.service.updateValue(this.element, this.value, p);\n };\n TCustomAttribute.prototype.paramsChanged = function (newValue, newParams) {\n this.service.updateValue(this.element, newValue, newParams);\n };\n TCustomAttribute.prototype.valueChanged = function (newValue) {\n var p = this.params !== null ? this.params.value : undefined;\n this.service.updateValue(this.element, newValue, p);\n };\n TCustomAttribute.prototype.unbind = function () {\n // If unbind is called before timeout for subscription is triggered, subscription will be undefined\n if (this.subscription) {\n this.subscription.dispose();\n }\n };\n var TCustomAttribute_1;\n TCustomAttribute = TCustomAttribute_1 = __decorate([\n customAttribute(\"t\")\n ], TCustomAttribute);\n return TCustomAttribute;\n}());\n\nvar TValueConverter = /** @class */ (function () {\n function TValueConverter(service) {\n this.service = service;\n }\n TValueConverter.inject = function () { return [I18N]; };\n TValueConverter.prototype.toView = function (value, options) {\n return this.service.tr(value, options);\n };\n TValueConverter = __decorate([\n valueConverter(\"t\")\n ], TValueConverter);\n return TValueConverter;\n}());\n\nvar NfBindingBehavior = /** @class */ (function () {\n function NfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n NfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n NfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the NfValueConverter.\n // pass through any args to the binding behavior to the NfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"nf\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n NfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n NfBindingBehavior = __decorate([\n bindingBehavior(\"nf\")\n ], NfBindingBehavior);\n return NfBindingBehavior;\n}());\n\nvar NfValueConverter = /** @class */ (function () {\n function NfValueConverter(service) {\n this.service = service;\n }\n NfValueConverter.inject = function () { return [I18N]; };\n NfValueConverter.prototype.toView = function (value, nfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (nfOrOptions && (nfOrOptions instanceof Intl.NumberFormat && typeof nfOrOptions.format === \"function\")) {\n return nfOrOptions.format(value);\n }\n var nf = this.service.nf(nfOrOptions, locale || this.service.getLocale());\n return nf.format(value);\n };\n NfValueConverter = __decorate([\n valueConverter$1(\"nf\")\n ], NfValueConverter);\n return NfValueConverter;\n}());\n\nvar DfBindingBehavior = /** @class */ (function () {\n function DfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n DfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n DfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the DfValueConverter.\n // pass through any args to the binding behavior to the DfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"df\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n DfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n DfBindingBehavior = __decorate([\n bindingBehavior(\"df\")\n ], DfBindingBehavior);\n return DfBindingBehavior;\n}());\n\nvar DfValueConverter = /** @class */ (function () {\n function DfValueConverter(service) {\n this.service = service;\n }\n DfValueConverter.inject = function () { return [I18N]; };\n DfValueConverter.prototype.toView = function (value, dfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !isInteger(value)) {\n value = new Date(value);\n }\n if (dfOrOptions && (dfOrOptions instanceof Intl.DateTimeFormat && typeof dfOrOptions.format === \"function\")) {\n return dfOrOptions.format(value);\n }\n var df = this.service.df(dfOrOptions, locale || this.service.getLocale());\n return df.format(value);\n };\n DfValueConverter = __decorate([\n valueConverter$1(\"df\")\n ], DfValueConverter);\n return DfValueConverter;\n}());\n\nvar RtBindingBehavior = /** @class */ (function () {\n function RtBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n RtBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n RtBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\", \"aurelia-relativetime-signal\");\n // rewrite the expression to use the RtValueConverter.\n // pass through any args to the binding behavior to the RtValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"rt\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n RtBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n RtBindingBehavior = __decorate([\n bindingBehavior(\"rt\")\n ], RtBindingBehavior);\n return RtBindingBehavior;\n}());\n\nvar translations = {\n ar: {\n translation: {\n now: 'الآن',\n second_ago: 'قبل ثانية واحدة',\n second_ago_plural: 'قبل __count__ ثانية',\n second_in: 'خلال ثانية واحدة',\n second_in_plural: 'خلال __count__ ثانية',\n minute_ago: 'قبل دقيقة واحدة',\n minute_ago_plural: 'قبل __count__ دقيقة',\n minute_in: 'خلال دقيقة واحدة',\n minute_in_plural: 'خلال __count__ دقيقة',\n hour_ago: 'قبل ساعة واحدة',\n hour_ago_plural: 'قبل __count__ ساعة',\n hour_in: 'خلال ساعة واحدة',\n hour_in_plural: 'خلال __count__ ساعة',\n day_ago: 'قبل يوم واحد',\n day_ago_plural: 'قبل __count__ يومًا',\n day_in: 'خلال يوم واحد',\n day_in_plural: 'خلال __count__ يومًا',\n month_ago: 'قبل شهر واحد',\n month_ago_plural: 'قبل __count__ شهرًا',\n month_in: 'خلال شهر واحد',\n month_in_plural: 'خلال __count__ شهرًا',\n year_ago: 'قبل سنة واحدة',\n year_ago_plural: 'قبل __count__ سنة',\n year_in: 'خلال سنة واحدة',\n year_in_plural: 'خلال __count__ سنة'\n }\n },\n da: {\n translation: {\n now: 'nu',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minut siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ dag siden',\n day_ago_plural: 'for __count__ dage siden',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dage',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n de: {\n translation: {\n now: 'jetzt',\n second_ago: 'vor __count__ Sekunde',\n second_ago_plural: 'vor __count__ Sekunden',\n second_in: 'in __count__ Sekunde',\n second_in_plural: 'in __count__ Sekunden',\n minute_ago: 'vor __count__ Minute',\n minute_ago_plural: 'vor __count__ Minuten',\n minute_in: 'in __count__ Minute',\n minute_in_plural: 'in __count__ Minuten',\n hour_ago: 'vor __count__ Stunde',\n hour_ago_plural: 'vor __count__ Stunden',\n hour_in: 'in __count__ Stunde',\n hour_in_plural: 'in __count__ Stunden',\n day_ago: 'vor __count__ Tag',\n day_ago_plural: 'vor __count__ Tagen',\n day_in: 'in __count__ Tag',\n day_in_plural: 'in __count__ Tagen',\n month_ago: 'vor __count__ Monat',\n month_ago_plural: 'vor __count__ Monaten',\n month_in: 'in __count__ Monat',\n month_in_plural: 'in __count__ Monaten',\n year_ago: 'vor __count__ Jahr',\n year_ago_plural: 'vor __count__ Jahren',\n year_in: 'in __count__ Jahr',\n year_in_plural: 'in __count__ Jahren'\n }\n },\n en: {\n translation: {\n now: 'now',\n second_ago: '__count__ second ago',\n second_ago_plural: '__count__ seconds ago',\n second_in: 'in __count__ second',\n second_in_plural: 'in __count__ seconds',\n minute_ago: '__count__ minute ago',\n minute_ago_plural: '__count__ minutes ago',\n minute_in: 'in __count__ minute',\n minute_in_plural: 'in __count__ minutes',\n hour_ago: '__count__ hour ago',\n hour_ago_plural: '__count__ hours ago',\n hour_in: 'in __count__ hour',\n hour_in_plural: 'in __count__ hours',\n day_ago: '__count__ day ago',\n day_ago_plural: '__count__ days ago',\n day_in: 'in __count__ day',\n day_in_plural: 'in __count__ days',\n month_ago: '__count__ month ago',\n month_ago_plural: '__count__ months ago',\n month_in: 'in __count__ month',\n month_in_plural: 'in __count__ months',\n year_ago: '__count__ year ago',\n year_ago_plural: '__count__ years ago',\n year_in: 'in __count__ year',\n year_in_plural: 'in __count__ years'\n }\n },\n es: {\n translation: {\n now: 'ahora',\n second_ago: 'hace __count__ segundo',\n second_ago_plural: 'hace __count__ segundos',\n second_in: 'dentro de __count__ segundo',\n second_in_plural: 'dentro de __count__ segundos',\n minute_ago: 'hace __count__ minuto',\n minute_ago_plural: 'hace __count__ minutos',\n minute_in: 'dentro de __count__ minuto',\n minute_in_plural: 'dentro de __count__ minutos',\n hour_ago: 'hace __count__ hora',\n hour_ago_plural: 'hace __count__ horas',\n hour_in: 'dentro de __count__ hora',\n hour_in_plural: 'dentro de __count__ horas',\n day_ago: 'hace __count__ día',\n day_ago_plural: 'hace __count__ días',\n day_in: 'dentro de __count__ día',\n day_in_plural: 'dentro de __count__ días',\n month_ago: 'hace __count__ mes',\n month_ago_plural: 'hace __count__ meses',\n month_in: 'dentro de __count__ mes',\n month_in_plural: 'dentro de __count__ meses',\n year_ago: 'hace __count__ año',\n year_ago_plural: 'hace __count__ años',\n year_in: 'dentro de __count__ año',\n year_in_plural: 'dentro de __count__ años'\n }\n },\n fi: {\n translation: {\n now: 'nyt',\n second_ago: '__count__ sekunti sitten',\n second_ago_plural: '__count__ sekuntia sitten',\n second_in: '__count__ sekunnin päästä',\n second_in_plural: '__count__ sekunnin päästä',\n minute_ago: '__count__ minuutti sitten',\n minute_ago_plural: '__count__ minuuttia sitten',\n minute_in: '__count__ minuutin päästä',\n minute_in_plural: '__count__ minuutin päästä',\n hour_ago: '__count__ tunti sitten',\n hour_ago_plural: '__count__ tuntia sitten',\n hour_in: '__count__ tunnin päästä',\n hour_in_plural: '__count__ tunnin päästä',\n day_ago: '__count__ päivä sitten',\n day_ago_plural: '__count__ päivää sitten',\n day_in: '__count__ päivän päästä',\n day_in_plural: '__count__ päivän päästä',\n month_ago: '__count__ kuukausi sitten',\n month_ago_plural: '__count__ kuukautta sitten',\n month_in: '__count__ kuukauden päästä',\n month_in_plural: '__count__ kuukauden päästä',\n year_ago: '__count__ vuosi sitten',\n year_ago_plural: '__count__ vuotta sitten',\n year_in: '__count__ vuoden päästä',\n year_in_plural: '__count__ vuoden päästä'\n }\n },\n fr: {\n translation: {\n now: 'maintenant',\n second_ago: 'il y a __count__ seconde',\n second_ago_plural: 'il y a __count__ secondes',\n second_in: 'dans __count__ seconde',\n second_in_plural: 'dans __count__ secondes',\n minute_ago: 'il y a __count__ minute',\n minute_ago_plural: 'il y a __count__ minutes',\n minute_in: 'dans __count__ minute',\n minute_in_plural: 'dans __count__ minutes',\n hour_ago: 'il y a __count__ heure',\n hour_ago_plural: 'il y a __count__ heures',\n hour_in: 'dans __count__ heure',\n hour_in_plural: 'dans __count__ heures',\n day_ago: 'il y a __count__ jour',\n day_ago_plural: 'il y a __count__ jours',\n day_in: 'dans __count__ jour',\n day_in_plural: 'dans __count__ jours',\n month_ago: 'il y a __count__ mois',\n month_ago_plural: 'il y a __count__ mois',\n month_in: 'dans __count__ mois',\n month_in_plural: 'dans __count__ mois',\n year_ago: 'il y a __count__ an',\n year_ago_plural: 'il y a __count__ ans',\n year_in: 'dans __count__ an',\n year_in_plural: 'dans __count__ ans'\n }\n },\n it: {\n translation: {\n now: 'ora',\n second_ago: '__count__ secondo fa',\n second_ago_plural: '__count__ secondi fa',\n second_in: 'tra __count__ secondo',\n second_in_plural: 'tra __count__ secondi',\n minute_ago: '__count__ minuto fa',\n minute_ago_plural: '__count__ minuti fa',\n minute_in: 'tra __count__ minuto',\n minute_in_plural: 'tra __count__ minuti',\n hour_ago: '__count__ ora fa',\n hour_ago_plural: '__count__ ore fa',\n hour_in: 'tra __count__ ora',\n hour_in_plural: 'tra __count__ ore',\n day_ago: '__count__ giorno fa',\n day_ago_plural: '__count__ giorni fa',\n day_in: 'tra __count__ giorno',\n day_in_plural: 'tra __count__ giorni',\n month_ago: '__count__ mese fa',\n month_ago_plural: '__count__ mesi fa',\n month_in: 'tra __count__ mese',\n month_in_plural: 'tra __count__ mesi',\n year_ago: '__count__ anno fa',\n year_ago_plural: '__count__ anni fa',\n year_in: 'tra __count__ anno',\n year_in_plural: 'tra __count__ anni'\n }\n },\n ja: {\n translation: {\n now: '今',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分前',\n minute_ago_plural: '__count__ 分前',\n minute_in: '__count__ 分後',\n minute_in_plural: '__count__ 分後',\n hour_ago: '__count__ 時間前',\n hour_ago_plural: '__count__ 時間前',\n hour_in: '__count__ 時間後',\n hour_in_plural: '__count__ 時間後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ か月前',\n month_ago_plural: '__count__ か月前',\n month_in: '__count__ か月後',\n month_in_plural: '__count__ か月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n }\n },\n lt: {\n translation: {\n now: 'dabar',\n second_ago: 'prieš __count__ sekundę',\n second_ago_plural: 'prieš __count__ sekundes',\n second_in: 'po __count__ sekundės',\n second_in_plural: 'po __count__ sekundžių',\n minute_ago: 'prieš __count__ minutę',\n minute_ago_plural: 'prieš __count__ minutes',\n minute_in: 'po __count__ minutės',\n minute_in_plural: 'po __count__ minučių',\n hour_ago: 'prieš __count__ valandą',\n hour_ago_plural: 'prieš __count__ valandas',\n hour_in: 'po __count__ valandos',\n hour_in_plural: 'po __count__ valandų',\n day_ago: 'prieš __count__ dieną',\n day_ago_plural: 'prieš __count__ dienas',\n day_in: 'po __count__ dienos',\n day_in_plural: 'po __count__ dienų',\n month_ago: 'prieš __count__ mėnesį',\n month_ago_plural: 'prieš __count__ mėnesius',\n month_in: 'po __count__ mėnesio',\n month_in_plural: 'po __count__ mėnesių',\n year_ago: 'prieš __count__ metus',\n year_ago_plural: 'prieš __count__ metus',\n year_in: 'po __count__ metų',\n year_in_plural: 'po __count__ metų'\n }\n },\n nl: {\n translation: {\n now: 'nu',\n second_ago: '__count__ seconde geleden',\n second_ago_plural: '__count__ seconden geleden',\n second_in: 'over __count__ seconde',\n second_in_plural: 'over __count__ seconden',\n minute_ago: '__count__ minuut geleden',\n minute_ago_plural: '__count__ minuten geleden',\n minute_in: 'over __count__ minuut',\n minute_in_plural: 'over __count__ minuten',\n hour_ago: '__count__ uur geleden',\n hour_ago_plural: '__count__ uur geleden',\n hour_in: 'over __count__ uur',\n hour_in_plural: 'over __count__ uur',\n day_ago: '__count__ dag geleden',\n day_ago_plural: '__count__ dagen geleden',\n day_in: 'over __count__ dag',\n day_in_plural: 'over __count__ dagen',\n month_ago: '__count__ maand geleden',\n month_ago_plural: '__count__ maanden geleden',\n month_in: 'over __count__ maand',\n month_in_plural: 'over __count__ maanden',\n year_ago: '__count__ jaar geleden',\n year_ago_plural: '__count__ jaar geleden',\n year_in: 'over __count__ jaar',\n year_in_plural: 'over __count__ jaar'\n }\n },\n nn: {\n translation: {\n now: 'no',\n second_ago: 'for __count__ sekund sidan',\n second_ago_plural: 'for __count__ sekund sidan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekund',\n minute_ago: 'for __count__ minutt sidan',\n minute_ago_plural: 'for __count__ minutt sidan',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutt',\n hour_ago: 'for __count__ time sidan',\n hour_ago_plural: 'for __count__ timar sidan',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timar',\n day_ago: 'for __count__ døgn sidan',\n day_ago_plural: 'for __count__ døgn sidan',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ månad sidan',\n month_ago_plural: 'for __count__ månadar sidan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månadar',\n year_ago: 'for __count__ år sidan',\n year_ago_plural: 'for __count__ år sidan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n nb: {\n translation: {\n now: 'nå',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minutt siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ døgn siden',\n day_ago_plural: 'for __count__ døgn siden',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n pl: {\n translation: {\n now: 'teraz',\n second_ago: '__count__ sekundę temu',\n second_ago_plural: '__count__ sekundy temu',\n second_in: 'za __count__ sekundę',\n second_in_plural: 'za __count__ sekundy',\n minute_ago: '__count__ minutę temu',\n minute_ago_plural: '__count__ minuty temu',\n minute_in: 'za __count__ minutę',\n minute_in_plural: 'za __count__ minuty',\n hour_ago: '__count__ godzinę temu',\n hour_ago_plural: '__count__ godziny temu',\n hour_in: 'za __count__ godzinę',\n hour_in_plural: 'za __count__ godziny',\n day_ago: '__count__ dzień temu',\n day_ago_plural: '__count__ dni temu',\n day_in: 'za __count__ dzień',\n day_in_plural: 'za __count__ dni',\n month_ago: '__count__ miesiąc temu',\n month_ago_plural: '__count__ miesiące temu',\n month_in: 'za __count__ miesiąc',\n month_in_plural: 'za __count__ miesiące',\n year_ago: '__count__ rok temu',\n year_ago_plural: '__count__ lata temu',\n year_in: 'za __count__ rok',\n year_in_plural: 'za __count__ lata'\n }\n },\n pt: {\n translation: {\n now: 'agora',\n second_ago: 'há __count__ segundo',\n second_ago_plural: 'há __count__ segundos',\n second_in: 'em __count__ segundo',\n second_in_plural: 'em __count__ segundos',\n minute_ago: 'há __count__ minuto',\n minute_ago_plural: 'há __count__ minutos',\n minute_in: 'em __count__ minuto',\n minute_in_plural: 'em __count__ minutos',\n hour_ago: 'há __count__ hora',\n hour_ago_plural: 'há __count__ horas',\n hour_in: 'em __count__ hora',\n hour_in_plural: 'em __count__ horas',\n day_ago: 'há __count__ dia',\n day_ago_plural: 'há __count__ dias',\n day_in: 'em __count__ dia',\n day_in_plural: 'em __count__ dias',\n month_ago: 'há __count__ mês',\n month_ago_plural: 'há __count__ meses',\n month_in: 'em __count__ mês',\n month_in_plural: 'em __count__ meses',\n year_ago: 'há __count__ ano',\n year_ago_plural: 'há __count__ anos',\n year_in: 'em __count__ ano',\n year_in_plural: 'em __count__ anos'\n }\n },\n sv: {\n translation: {\n now: 'nu',\n second_ago: 'för __count__ sekund sedan',\n second_ago_plural: 'för __count__ sekunder sedan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'för __count__ minut sedan',\n minute_ago_plural: 'för __count__ minuter sedan',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minuter',\n hour_ago: 'för __count__ timme sedan',\n hour_ago_plural: 'för __count__ timmar sedan',\n hour_in: 'om __count__ timme',\n hour_in_plural: 'om __count__ timmar',\n day_ago: 'för __count__ dag sedan',\n day_ago_plural: 'för __count__ dagar sedan',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dagar',\n month_ago: 'för __count__ månad sedan',\n month_ago_plural: 'för __count__ månader sedan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månader',\n year_ago: 'för __count__ år sedan',\n year_ago_plural: 'för __count__ år sedan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n th: {\n translation: {\n now: 'ขณะนี้',\n second_ago: '__count__ วินาทีที่ผ่านมา',\n second_ago_plural: '__count__ วินาทีที่ผ่านมา',\n second_in: 'ในอีก __count__ วินาที',\n second_in_plural: 'ในอีก __count__ วินาที',\n minute_ago: '__count__ นาทีที่ผ่านมา',\n minute_ago_plural: '__count__ นาทีที่ผ่านมา',\n minute_in: 'ในอีก __count__ นาที',\n minute_in_plural: 'ในอีก __count__ นาที',\n hour_ago: '__count__ ชั่วโมงที่ผ่านมา',\n hour_ago_plural: '__count__ ชั่วโมงที่ผ่านมา',\n hour_in: 'ในอีก __count__ ชั่วโมง',\n hour_in_plural: 'ในอีก __count__ ชั่วโมง',\n day_ago: '__count__ วันที่ผ่านมา',\n day_ago_plural: '__count__ วันที่ผ่านมา',\n day_in: 'ในอีก __count__ วัน',\n day_in_plural: 'ในอีก __count__ วัน',\n month_ago: '__count__ เดือนที่ผ่านมา',\n month_ago_plural: '__count__ เดือนที่ผ่านมา',\n month_in: 'ในอีก __count__ เดือน',\n month_in_plural: 'ในอีก __count__ เดือน',\n year_ago: '__count__ ปีที่แล้ว',\n year_ago_plural: '__count__ ปีที่แล้ว',\n year_in: 'ในอีก __count__ ปี',\n year_in_plural: 'ในอีก __count__ ปี'\n }\n },\n zh: {\n translation: {\n now: '现在',\n second_ago: '__count__秒钟前',\n second_ago_plural: '__count__秒钟前',\n second_in: '__count__秒钟后',\n second_in_plural: '__count__秒钟后',\n minute_ago: '__count__分钟前',\n minute_ago_plural: '__count__分钟前',\n minute_in: '__count__分钟后',\n minute_in_plural: '__count__分钟后',\n hour_ago: '__count__小时前',\n hour_ago_plural: '__count__小时前',\n hour_in: '__count__小时后',\n hour_in_plural: '__count__小时后',\n day_ago: '__count__天前',\n day_ago_plural: '__count__天前',\n day_in: '__count__天后',\n day_in_plural: '__count__天后',\n month_ago: '__count__个月前',\n month_ago_plural: '__count__个月前',\n month_in: '__count__个月后',\n month_in_plural: '__count__个月后',\n year_ago: '__count__年前',\n year_ago_plural: '__count__年前',\n year_in: '__count__年后',\n year_in_plural: '__count__年后'\n }\n },\n 'zh-HK': {\n translation: {\n now: '現在',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘後',\n minute_in_plural: '__count__ 分鐘後',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時後',\n hour_in_plural: '__count__ 小時後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ 個月前',\n month_ago_plural: '__count__ 個月前',\n month_in: '__count__ 個月後',\n month_in_plural: '__count__ 個月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n },\n },\n 'zh-TW': {\n translation: {\n now: '剛才',\n second_ago: '__count__ 秒鐘前',\n second_ago_plural: '__count__ 秒鐘前',\n second_in: '__count__ 秒內',\n second_in_plural: '__count__ 秒內',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘內',\n minute_in_plural: '__count__ 分鐘內',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時內',\n hour_in_plural: '__count__ 小時內',\n day_ago: '__count__ 天前',\n day_ago_plural: '__count__ 天前',\n day_in: '__count__ 天內',\n day_in_plural: '__count__ 天內',\n month_ago: '__count__ 月前',\n month_ago_plural: '__count__ 月前',\n month_in: '__count__ 月內',\n month_in_plural: '__count__ 月內',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年內',\n year_in_plural: '__count__ 年內'\n }\n }\n};\n// tslint:enable\n\nvar RelativeTime = /** @class */ (function () {\n function RelativeTime(service, ea) {\n var _this = this;\n this.service = service;\n this.ea = ea;\n this.service.i18nextReady().then(function () {\n _this.setup();\n });\n this.ea.subscribe(I18N_EA_SIGNAL, function (locales) {\n _this.setup(locales);\n });\n }\n RelativeTime.inject = function () { return [I18N, EventAggregator]; };\n RelativeTime.prototype.setup = function (locales) {\n var trans = translations;\n var fallbackLng = this.service.i18next.fallbackLng;\n var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;\n if (Array.isArray(alternateFb) && alternateFb.length > 0) {\n alternateFb = alternateFb[0];\n }\n var key = ((locales && locales.newValue)\n ? locales.newValue\n : this.service.getLocale()) || alternateFb;\n var index = 0;\n // tslint:disable-next-line:no-conditional-assignment\n if ((index = key.indexOf(\"-\")) >= 0) {\n var baseLocale = key.substring(0, index);\n if (trans[baseLocale]) {\n this.addTranslationResource(baseLocale, trans[baseLocale].translation);\n }\n }\n if (trans[key]) {\n this.addTranslationResource(key, trans[key].translation);\n }\n if (trans[fallbackLng]) {\n this.addTranslationResource(key, trans[fallbackLng].translation);\n }\n };\n RelativeTime.prototype.addTranslationResource = function (key, translation) {\n var options = this.service.i18next.options;\n if (options.interpolation && (options.interpolation.prefix !== \"__\" || options.interpolation.suffix !== \"__\")) {\n // tslint:disable-next-line:forin\n for (var subkey in translation) {\n translation[subkey] = translation[subkey]\n .replace(\"__count__\", (options.interpolation.prefix || \"{{\") + \"count\" + (options.interpolation.suffix || \"}}\"));\n }\n }\n this.service.i18next.addResources(key, options.defaultNS || \"translation\", translation);\n };\n RelativeTime.prototype.getRelativeTime = function (time) {\n var now = new Date();\n var diff = now.getTime() - time.getTime();\n var timeDiff = this.getTimeDiffDescription(diff, \"year\", 31104000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"month\", 2592000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"day\", 86400000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"hour\", 3600000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"minute\", 60000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"second\", 1000);\n if (!timeDiff) {\n timeDiff = this.service.tr(\"now\");\n }\n }\n }\n }\n }\n }\n return timeDiff;\n };\n RelativeTime.prototype.getTimeDiffDescription = function (diff, unit, timeDivisor) {\n var unitAmount = parseInt((diff / timeDivisor).toFixed(0), 10);\n if (unitAmount > 0) {\n return this.service.tr(unit, { count: unitAmount, context: \"ago\" });\n }\n else if (unitAmount < 0) {\n var abs = Math.abs(unitAmount);\n return this.service.tr(unit, { count: abs, context: \"in\" });\n }\n return null;\n };\n return RelativeTime;\n}());\n\nvar RtValueConverter = /** @class */ (function () {\n function RtValueConverter(service) {\n this.service = service;\n }\n RtValueConverter.inject = function () { return [RelativeTime]; };\n RtValueConverter.prototype.toView = function (value) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !Number.isInteger(value)) {\n value = new Date(value);\n }\n return this.service.getRelativeTime(value);\n };\n RtValueConverter = __decorate([\n valueConverter$1(\"rt\")\n ], RtValueConverter);\n return RtValueConverter;\n}());\n\nvar Backend = /** @class */ (function () {\n function Backend(services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = options;\n this.type = \"backend\";\n this.init(services, options);\n }\n Backend.with = function (loader) {\n this.loader = loader;\n return this;\n };\n Backend.prototype.init = function (services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = Object.assign({}, {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\",\n addPath: \"locales/add/{{lng}}/{{ns}}\",\n allowMultiLoading: false,\n parse: JSON.parse\n }, options);\n };\n Backend.prototype.readMulti = function (languages, namespaces, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath(languages, namespaces);\n }\n var url = this.services\n .interpolator\n .interpolate(loadPath, { lng: languages.join(\"+\"), ns: namespaces.join(\"+\") });\n this.loadUrl(url, callback);\n };\n Backend.prototype.read = function (language, namespace, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath([language], [namespace]);\n }\n var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });\n this.loadUrl(url, callback);\n };\n Backend.prototype.loadUrl = function (url, callback) {\n return __awaiter(this, void 0, void 0, function () {\n var response, ret, err, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, Backend.loader.loadText(url)];\n case 1:\n response = _b.sent();\n ret = void 0;\n err = void 0;\n try {\n ret = (response instanceof Object) ? response : this.options.parse(response, url);\n }\n catch (e) {\n err = \"failed parsing \" + url + \" to json\";\n }\n if (err) {\n return [2 /*return*/, callback(err, false)];\n }\n callback(null, ret);\n return [3 /*break*/, 3];\n case 2:\n _a = _b.sent();\n callback(\"failed loading \" + url, false /* no retry */);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n // tslint:disable-next-line:variable-name\n Backend.prototype.create = function (_languages, _namespace, _key, _fallbackValue) {\n // not supported\n };\n Backend.type = \"backend\";\n return Backend;\n}());\n\nfunction configure(frameworkConfig, cb) {\n if (typeof cb !== \"function\") {\n var errorMsg = \"You need to provide a callback method to properly configure the library\";\n throw errorMsg;\n }\n var instance = frameworkConfig.container.get(I18N);\n var ret = cb(instance);\n frameworkConfig.globalResources([\n TValueConverter,\n TBindingBehavior,\n TCustomAttribute,\n TParamsCustomAttribute,\n NfValueConverter,\n NfBindingBehavior,\n DfValueConverter,\n DfBindingBehavior,\n RtValueConverter,\n RtBindingBehavior\n ]);\n frameworkConfig.postTask(function () {\n var resources = frameworkConfig.container.get(ViewResources);\n var htmlBehaviorResource = resources.getAttribute(\"t\");\n var htmlParamsResource = resources.getAttribute(\"t-params\");\n var attributes = instance.i18next.options.attributes;\n // Register default attributes if none provided\n if (!attributes) {\n attributes = [\"t\", \"i18n\"];\n }\n attributes.forEach(function (alias) { return resources.registerAttribute(alias, htmlBehaviorResource, \"t\"); });\n attributes.forEach(function (alias) { return resources.registerAttribute(alias + \"-params\", htmlParamsResource, \"t-params\"); });\n });\n return ret;\n}\n\nexport { configure, DfValueConverter, DfBindingBehavior, NfValueConverter, NfBindingBehavior, RtValueConverter, RtBindingBehavior, TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute, I18N_EA_SIGNAL, I18N, RelativeTime, Backend };\n"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","this","n","v","op","TypeError","call","pop","push","I18N_EA_SIGNAL","I18N","ea","signaler","globalVars","i18next","Intl","inject","EventAggregator","prototype","setup","options","defaultOptions","_this","_a","skipTranslationOnMissingKey","compatibilityJSON","lng","attributes","fallbackLng","debug","i18nextDeferred","init","err","Array","isArray","String","i18nextReady","setLocale","locale","oldLocale","getLocale","changeLanguage","tr","publish","oldValue","newValue","signal","language","nf","locales","NumberFormat","uf","numberLike","comparer","format","thousandSeparator","decimalSeparator","replace","RegExp","Number","df","DateTimeFormat","fullOptions","undefined","assign","registerGlobalVariable","unregisterGlobalVariable","updateTranslations","el","querySelectorAll","l","selector","concat","join","nodes","node","keys","params","i2","l2","getAttribute","pname","au","viewModel","updateValue","toString","split","re","m","attr","nodeName","exec","index","lastIndex","attrs","j","trim","_textContent","textContent","_innerHTML","innerHTML","attrCC","toUpperCase","reservedNames","i18nLogger","getLogger","indexOf","controller","warn","newChild","_newChild","parentNode","removeChild","firstChild","appendChild","prependParser","ni","childNodes","_prepended","pi","insertBefore","appendParser","_appended","setAttribute","TBindingBehavior","signalBindingBehavior","bind","binding","source","sourceExpression","rewritten","expression","args","unbind","isInteger","isFinite","Math","floor","LazyOptional","LazyOptional_1","of","get","container","hasResolver","resolver","TParamsCustomAttribute","element","TParamsCustomAttribute_1","configureAliases","aliases","valueChanged","TCustomAttribute","service","p","lazyParams","TCustomAttribute_1","newParams","oldParams","paramsChanged","subscription","subscribe","dispose","TValueConverter","toView","valueConverter","NfBindingBehavior","NfValueConverter","nfOrOptions","DfBindingBehavior","DfValueConverter","dfOrOptions","isNaN","Date","RtBindingBehavior","translations","ar","translation","now","second_ago","second_ago_plural","second_in","second_in_plural","minute_ago","minute_ago_plural","minute_in","minute_in_plural","hour_ago","hour_ago_plural","hour_in","hour_in_plural","day_ago","day_ago_plural","day_in","day_in_plural","month_ago","month_ago_plural","month_in","month_in_plural","year_ago","year_ago_plural","year_in","year_in_plural","da","de","en","es","fi","fr","it","ja","lt","nl","nn","nb","pl","pt","sv","th","zh","RelativeTime","trans","alternateFb","baseLocale","substring","addTranslationResource","interpolation","prefix","suffix","subkey","addResources","defaultNS","getRelativeTime","time","diff","getTime","timeDiff","getTimeDiffDescription","unit","timeDivisor","unitAmount","parseInt","toFixed","count","context","abs","RtValueConverter","Backend","services","type","with","loader","loadPath","addPath","allowMultiLoading","parse","JSON","readMulti","languages","namespaces","callback","url","interpolator","interpolate","ns","loadUrl","read","namespace","response","ret","_b","loadText","create","_languages","_namespace","_key","_fallbackValue","configure","frameworkConfig","cb","instance","globalResources","postTask","resources","htmlBehaviorResource","htmlParamsResource","forEach","alias","registerAttribute"],"sourceRoot":""}