{"version":3,"sources":["webpack:///./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js"],"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","global","inject","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","indexOf","controller","warn","newChild","createTextNode","_newChild","parentNode","removeChild","firstChild","appendChild","prependParser","createElement","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","TParamsCustomAttribute","element","TParamsCustomAttribute_1","Element","configureAliases","aliases","getOrCreateOwn","resource","valueChanged","TCustomAttribute","service","p","lazyParams","TCustomAttribute_1","newParams","oldParams","paramsChanged","subscription","subscribe","dispose","TValueConverter","toView","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","no","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"],"mappings":"sGAAA;;;;;;;;;;;;;;;AA0BA,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GACzC,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,EAGhE,SAASO,EAAUC,EA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E7B,EAAQE,KAAO,UACRF,EA7EiB,GAgF5B,SAAS8B,EAAUC,EAAiBC,GAChC,GAAkB,mBAAPA,EAAmB,CAE1B,KADe,0EAGnB,IAAIC,EAAWF,EAAgBxI,UAAUD,IAAIpI,GACzCoQ,EAAMU,EAAGC,GAyBb,OAxBAF,EAAgBG,gBAAgB,CAC5BrH,EACAxC,EACA6B,EACAT,EACAuB,EACAD,EACAI,EACAD,EACA6E,EACAxE,IAEJwG,EAAgBI,UAAS,WACrB,IAAIC,EAAYL,EAAgBxI,UAAUD,IAAI,KAC1C+I,EAAuBD,EAAU5M,aAAa,KAC9C8M,EAAqBF,EAAU5M,aAAa,YAC5CrD,EAAa8P,EAAS3Q,QAAQM,QAAQO,WAErCA,IACDA,EAAa,CAAC,IAAK,SAEvBA,EAAWoQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAOH,EAAsB,QACtGlQ,EAAWoQ,SAAQ,SAAUC,GAAS,OAAOJ,EAAUK,kBAAkBD,EAAQ,UAAWF,EAAoB,kBAE7GhB","file":"vendor.aurelia-i18n~e76532a0.ceb71222428d725eeaf6.chunk.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: 'منذ __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 da: {\n translation: {\n now: 'lige nu',\n second_ago: '__count__ sekund siden',\n second_ago_plural: '__count__ sekunder siden',\n second_in: 'i __count__ sekund',\n second_in_plural: 'i __count__ sekunder',\n minute_ago: '__count__ minut siden',\n minute_ago_plural: '__count__ minutter siden',\n minute_in: 'i __count__ minut',\n minute_in_plural: 'i __count__ minutter',\n hour_ago: '__count__ time siden',\n hour_ago_plural: '__count__ timer siden',\n hour_in: 'i __count__ time',\n hour_in_plural: 'i __count__ timer',\n day_ago: '__count__ dag siden',\n day_ago_plural: '__count__ dage siden',\n day_in: 'i __count__ dag',\n day_in_plural: 'i __count__ dage',\n month_ago: '__count__ måned siden',\n month_ago_plural: '__count__ måneder siden',\n month_in: 'i __count__ måned',\n month_in_plural: 'i __count__ måneder',\n year_ago: '__count__ år siden',\n year_ago_plural: '__count__ år siden',\n year_in: 'i __count__ år',\n year_in_plural: 'i __count__ år'\n }\n },\n de: {\n translation: {\n now: 'jetzt gerade',\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: 'just 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 mismo',\n second_ago: 'hace __count__ segundo',\n second_ago_plural: 'hace __count__ segundos',\n second_in: 'en __count__ segundo',\n second_in_plural: 'en __count__ segundos',\n minute_ago: 'hace __count__ minuto',\n minute_ago_plural: 'hace __count__ minutos',\n minute_in: 'en __count__ minuto',\n minute_in_plural: 'en __count__ minutos',\n hour_ago: 'hace __count__ hora',\n hour_ago_plural: 'hace __count__ horas',\n hour_in: 'en __count__ hora',\n hour_in_plural: 'en __count__ horas',\n day_ago: 'hace __count__ día',\n day_ago_plural: 'hace __count__ días',\n day_in: 'en __count__ día',\n day_in_plural: 'en __count__ días',\n month_ago: 'hace __count__ mes',\n month_ago_plural: 'hace __count__ meses',\n month_in: 'en __count__ mes',\n month_in_plural: 'en __count__ meses',\n year_ago: 'hace __count__ año',\n year_ago_plural: 'hace __count__ años',\n year_in: 'en __count__ año',\n year_in_plural: 'en __count__ años'\n }\n },\n fi: {\n translation: {\n now: 'Nyt',\n second_ago: '__count__ sekuntti sitten',\n second_ago_plural: '__count__ sekunttia sitten',\n second_in: ' __count__ sekunnin kuluttua',\n second_in_plural: ' __count__ sekunttien kuluttua',\n minute_ago: '__count__ minuutti sitten',\n minute_ago_plural: '__count__ minuuttia sitten',\n minute_in: ' __count__ minuutin kuluttua',\n minute_in_plural: ' __count__ minuuttien kuluttua',\n hour_ago: '__count__ tunti sitten',\n hour_ago_plural: '__count__ tuntia sitten',\n hour_in: ' __count__ tunnin kuluttua',\n hour_in_plural: ' __count__ tunnin kuluttua',\n day_ago: '__count__ päivä sitten',\n day_ago_plural: '__count__ päiviä sitten',\n day_in: ' __count__ päivän kuluttua',\n day_in_plural: '__count__ päivien kuluttua',\n month_ago: '__count__ kuukausi sitten',\n month_ago_plural: '__count__ kuukausia sitten',\n month_in: ' __count__ kuukauden kuluttua',\n month_in_plural: ' __count__ kuukausien kuluttua',\n year_ago: '__count__ vuosi sitten',\n year_ago_plural: '__count__ vuosia sitten',\n year_in: ' __count__ vuoden kuluttua',\n year_in_plural: ' __count__ vuosien kuluttua'\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: 'adesso',\n second_ago: '__count__ secondo fa',\n second_ago_plural: '__count__ secondi fa',\n second_in: 'in __count__ secondo',\n second_in_plural: 'in __count__ secondi',\n minute_ago: '__count__ minuto fa',\n minute_ago_plural: '__count__ minuti fa',\n minute_in: 'in __count__ minuto',\n minute_in_plural: 'in __count__ minuti',\n hour_ago: '__count__ ora fa',\n hour_ago_plural: '__count__ ore fa',\n hour_in: 'in __count__ ora',\n hour_in_plural: 'in __count__ ore',\n day_ago: '__count__ giorno fa',\n day_ago_plural: '__count__ giorni fa',\n day_in: 'in __count__ giorno',\n day_in_plural: 'in __count__ giorni',\n month_ago: '__count__ mese fa',\n month_ago_plural: '__count__ mesi fa',\n month_in: 'in __count__ mese',\n month_in_plural: 'in __count__ mesi',\n year_ago: '__count__ anno fa',\n year_ago_plural: '__count__ anni fa',\n year_in: 'in __count__ anno',\n year_in_plural: 'in __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: 'šiuo metu',\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: 'zonet',\n second_ago: '__count__ seconde geleden',\n second_ago_plural: '__count__ seconden geleden',\n second_in: 'in __count__ seconde',\n second_in_plural: 'in __count__ seconden',\n minute_ago: '__count__ minuut geleden',\n minute_ago_plural: '__count__ minuten geleden',\n minute_in: 'in __count__ minuut',\n minute_in_plural: 'in __count__ minuten',\n hour_ago: '__count__ uur geleden',\n hour_ago_plural: '__count__ uren geleden',\n hour_in: 'in __count__ uur',\n hour_in_plural: 'in __count__ uren',\n day_ago: '__count__ dag geleden',\n day_ago_plural: '__count__ dagen geleden',\n day_in: 'in __count__ dag',\n day_in_plural: 'in __count__ dagen',\n month_ago: '__count__ maand geleden',\n month_ago_plural: '__count__ maanden geleden',\n month_in: 'in __count__ maand',\n month_in_plural: 'in __count__ maanden',\n year_ago: '__count__ jaar geleden',\n year_ago_plural: '__count__ jaren geleden',\n year_in: 'in __count__ jaar',\n year_in_plural: 'in __count__ jaren'\n }\n },\n nn: {\n translation: {\n now: 'akkurat nå',\n second_ago: '__count__ sekund siden',\n second_ago_plural: '__count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: '__count__ minutt siden',\n minute_ago_plural: '__count__ minutter siden',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: '__count__ time siden',\n hour_ago_plural: '__count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: '__count__ dag siden',\n day_ago_plural: '__count__ dager siden',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dager',\n month_ago: '__count__ en måned siden',\n month_ago_plural: '__count__ flere måneder siden',\n month_in: 'I løpet av en __count__ måned',\n month_in_plural: 'I løpet av __count__ måneder',\n year_ago: '__count__ et år siden',\n year_ago_plural: '__count__ flere å siden',\n year_in: 'I løpet av ett år __count__ år',\n year_in_plural: 'på flere __count__ år'\n }\n },\n no: {\n translation: {\n now: 'akkurat nå',\n second_ago: '__count__ sekund siden',\n second_ago_plural: '__count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: '__count__ minutt siden',\n minute_ago_plural: '__count__ minutter siden',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: '__count__ time siden',\n hour_ago_plural: '__count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: '__count__ dag siden',\n day_ago_plural: '__count__ dager siden',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dager',\n month_ago: '__count__ en måned siden',\n month_ago_plural: '__count__ flere måneder siden',\n month_in: 'I løpet av en __count__ måned',\n month_in_plural: 'I løpet av __count__ måneder',\n year_ago: '__count__ et år siden',\n year_ago_plural: '__count__ flere å siden',\n year_in: 'I løpet av ett år __count__ år',\n year_in_plural: 'på flere __count__ år'\n }\n },\n pl: {\n translation: {\n now: 'teraz',\n second_ago: '__count__ s temu',\n second_ago_plural: '__count__ s temu',\n second_in: 'za __count__ s',\n second_in_plural: 'za __count__ s',\n minute_ago: '__count__ min temu',\n minute_ago_plural: '__count__ min temu',\n minute_in: 'za __count__ min',\n minute_in_plural: 'za __count__ min',\n hour_ago: '__count__ h temu',\n hour_ago_plural: '__count__ h temu',\n hour_in: 'za __count__ h',\n hour_in_plural: 'za __count__ h',\n day_ago: '__count__ dzień temu',\n day_ago_plural: '__count__ dias atrás',\n day_in: 'za __count__ dni',\n day_in_plural: 'za __count__ dni',\n month_ago: '__count__ miesiąc temu',\n month_ago_plural: '__count__ mies. temu',\n month_in: 'za __count__ miesiąc',\n month_in_plural: 'za __count__ mies.',\n year_ago: '__count__ rok temu',\n year_ago_plural: '__count__ lata/lat temu',\n year_in: 'za __count__ rok',\n year_in_plural: '__count__ lata/lat'\n }\n },\n pt: {\n translation: {\n now: 'neste exato momento',\n second_ago: '__count__ segundo atrás',\n second_ago_plural: '__count__ segundos atrás',\n second_in: 'em __count__ segundo',\n second_in_plural: 'em __count__ segundos',\n minute_ago: '__count__ minuto atrás',\n minute_ago_plural: '__count__ minutos atrás',\n minute_in: 'em __count__ minuto',\n minute_in_plural: 'em __count__ minutos',\n hour_ago: '__count__ hora atrás',\n hour_ago_plural: '__count__ horas atrás',\n hour_in: 'em __count__ hora',\n hour_in_plural: 'em __count__ horas',\n day_ago: '__count__ dia atrás',\n day_ago_plural: '__count__ dias atrás',\n day_in: 'em __count__ dia',\n day_in_plural: 'em __count__ dias',\n month_ago: '__count__ mês atrás',\n month_ago_plural: '__count__ meses atrás',\n month_in: 'em __count__ mês',\n month_in_plural: 'em __count__ meses',\n year_ago: '__count__ ano atrás',\n year_ago_plural: '__count__ anos atrás',\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: '__count__ sekund sedan',\n second_ago_plural: '__count__ sekunder sedan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: '__count__ minut sedan',\n minute_ago_plural: '__count__ minuter sedan',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minuter',\n hour_ago: '__count__ timme sedan',\n hour_ago_plural: '__count__ timmar sedan',\n hour_in: 'om __count__ timme',\n hour_in_plural: 'om __count__ timmar',\n day_ago: '__count__ dag sedan',\n day_ago_plural: '__count__ dagar sedan',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dagar',\n month_ago: '__count__ månad sedan',\n month_ago_plural: '__count__ månader sedan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månader',\n year_ago: '__count__ år sedan',\n year_ago_plural: '__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 }\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-CN': {\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"],"sourceRoot":""}