@openremote/or-translate 1.0.3 → 1.2.0-snapshot.20240512154942

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js DELETED
@@ -1,41 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- 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;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { translate } from "./translate-mixin";
8
- import i18next from "i18next";
9
- import { LitElement, customElement, property, html, css } from "lit-element";
10
- export { i18next };
11
- export { translate };
12
- let OrTranslate = class OrTranslate extends translate(i18next)(LitElement) {
13
- render() {
14
- return html `
15
- ${this._getTranslatedValue()}
16
- `;
17
- }
18
- _getTranslatedValue() {
19
- return this.value ? i18next.isInitialized ? i18next.t(this.value, this.options) : this.value : "";
20
- }
21
- };
22
- OrTranslate.styles = css `
23
- :host {
24
- display: inline;
25
- }
26
-
27
- :host([hidden]) {
28
- display: none;
29
- }
30
- `;
31
- __decorate([
32
- property({ type: String })
33
- ], OrTranslate.prototype, "value", void 0);
34
- __decorate([
35
- property({ type: Object })
36
- ], OrTranslate.prototype, "options", void 0);
37
- OrTranslate = __decorate([
38
- customElement("or-translate")
39
- ], OrTranslate);
40
- export { OrTranslate };
41
- //# sourceMappingURL=index.js.map
@@ -1,47 +0,0 @@
1
- // TODO: Can't currently export declaration files with explicit LitElement type (see https://github.com/Microsoft/TypeScript/issues/17293)
2
- export const translate = (i18next) => (base) => class extends base {
3
- constructor() {
4
- super(...arguments);
5
- this._i18nextJustInitialized = false;
6
- this.initCallback = (options) => {
7
- this._i18nextJustInitialized = true;
8
- // @ts-ignore
9
- if (this.requestUpdate) {
10
- // @ts-ignore
11
- this.requestUpdate();
12
- }
13
- };
14
- this.langChangedCallback = () => {
15
- // @ts-ignore
16
- if (this.requestUpdate) {
17
- // @ts-ignore
18
- this.requestUpdate();
19
- }
20
- };
21
- }
22
- connectedCallback() {
23
- if (!i18next.language) {
24
- i18next.on("initialized", this.initCallback);
25
- }
26
- i18next.on("languageChanged", this.langChangedCallback);
27
- if (super.connectedCallback) {
28
- super.connectedCallback();
29
- }
30
- }
31
- disconnectedCallback() {
32
- i18next.off("initialized", this.initCallback);
33
- i18next.off("languageChanged", this.langChangedCallback);
34
- if (super.disconnectedCallback) {
35
- super.disconnectedCallback();
36
- }
37
- }
38
- shouldUpdate(changedProps) {
39
- if (this._i18nextJustInitialized) {
40
- this._i18nextJustInitialized = false;
41
- return true;
42
- }
43
- // @ts-ignore
44
- return super.shouldUpdate && super.shouldUpdate(changedProps);
45
- }
46
- };
47
- //# sourceMappingURL=translate-mixin.js.map
@@ -1,172 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ORTranslate=t():e.ORTranslate=t()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t,n){var i=n(12);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){var i=n(4),r=n(3);e.exports=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?r(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var i=n(13);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}},function(e,t,n){var i=n(17),r=n(18),s=n(10),o=n(19);e.exports=function(e,t){return i(e)||r(e,t)||s(e,t)||o()}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}},function(e,t,n){var i=n(9);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}},function(e,t,n){var i=n(14),r=n(15),s=n(10),o=n(16);e.exports=function(e){return i(e)||r(e)||s(e)||o()}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,i)}e.exports=n},function(e,t,n){var i=n(9);e.exports=function(e){if(Array.isArray(e))return i(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);i=!0);}catch(e){r=!0,s=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw s}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t),n.d(t,"i18next",(function(){return Y})),n.d(t,"translate",(function(){return i})),n.d(t,"OrTranslate",(function(){return et}));const i=e=>t=>class extends t{constructor(){super(...arguments),this._i18nextJustInitialized=!1,this.initCallback=e=>{this._i18nextJustInitialized=!0,this.requestUpdate&&this.requestUpdate()},this.langChangedCallback=()=>{this.requestUpdate&&this.requestUpdate()}}connectedCallback(){e.language||e.on("initialized",this.initCallback),e.on("languageChanged",this.langChangedCallback),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){e.off("initialized",this.initCallback),e.off("languageChanged",this.langChangedCallback),super.disconnectedCallback&&super.disconnectedCallback()}shouldUpdate(e){return this._i18nextJustInitialized?(this._i18nextJustInitialized=!1,!0):super.shouldUpdate&&super.shouldUpdate(e)}};var r=n(4),s=n.n(r),o=n(0),a=n.n(o),l=n(1),u=n.n(l),c=n(2),p=n.n(c),h=n(5),d=n.n(h),f=n(6),g=n.n(f),y=n(7),v=n.n(y),m=n(3),b=n.n(m),S=n(11),x=n.n(S),_={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n;console&&console[e]&&(n=console)[e].apply(n,x()(t))}},w=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,e),this.init(t,n)}return p()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||_,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),k=function(){function e(){u()(this,e),this.observers={}}return p()(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var n=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var i=n.observers[e].indexOf(t);i>-1&&n.observers[e].splice(i,1)}else delete n.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(this.observers[e]){var r=[].concat(this.observers[e]);r.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function P(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function C(e){return null==e?"":""+e}function O(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function N(e,t,n){function i(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function r(){return!e||"string"==typeof e}for(var s="string"!=typeof t?[].concat(t):t.split(".");s.length>1;){if(r())return{};var o=i(s.shift());!e[o]&&n&&(e[o]=new n),e=e[o]}return r()?{}:{obj:e,k:i(s.shift())}}function E(e,t,n){var i=N(e,t,Object);i.obj[i.k]=n}function j(e,t){var n=N(e,t),i=n.obj,r=n.k;if(i)return i[r]}function R(e,t,n){for(var i in t)i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?n&&(e[i]=t[i]):R(e[i],t[i],n):e[i]=t[i];return e}function T(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var A={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function L(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return A[e]})):e}var V=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u()(this,t),n=d()(this,g()(t).call(this)),k.call(b()(b()(n))),n.data=e||{},n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return v()(t,e),p()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[e,t];return n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(s=e.split(".")),j(this.data,s)}},{key:"addResource",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var o=[e,t];n&&(o=o.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(i=t,t=(o=e.split("."))[1]),this.addNamespaces(t),E(this.data,o,i),r.silent||this.emit("added",e,t,n,i)}},{key:"addResources",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var r in n)"string"!=typeof n[r]&&"[object Array]"!==Object.prototype.toString.apply(n[r])||this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,i,r){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},o=[e,t];e.indexOf(".")>-1&&(i=n,n=t,t=(o=e.split("."))[1]),this.addNamespaces(t);var l=j(this.data,o)||{};i?R(l,n,r):l=a()({},l,n),E(this.data,o,l),s.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(k),U={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,i,r){var s=this;return e.forEach((function(e){s.processors[e]&&(t=s.processors[e].process(t,n,i,r))})),t}},F=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u()(this,t),n=d()(this,g()(t).call(this)),k.call(b()(b()(n))),O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,b()(b()(n))),n.options=i,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=w.create("translator"),n}return v()(t,e),p()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var s=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(s[0])>-1)&&(r=s.shift()),e=s.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e,t){var n=this;if("object"!==s()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=this.extractFromKey(e[e.length-1],t),o=r.key,l=r.namespaces,u=l[l.length-1],c=t.lng||this.language,p=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(p){var h=t.nsSeparator||this.options.nsSeparator;return u+h+o}return o}var d=this.resolve(e,t),f=d&&d.res,g=d&&d.usedKey||o,y=d&&d.exactUsedKey||o,v=Object.prototype.toString.apply(f),m=["[object Number]","[object Function]","[object RegExp]"],b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f;if(S&&f&&x&&m.indexOf(v)<0&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,f,t):"key '".concat(o," (").concat(this.language,")' returned an object instead of string.");if(i){var _="[object Array]"===v,w=_?[]:{},k=_?y:g;for(var P in f)if(Object.prototype.hasOwnProperty.call(f,P)){var C="".concat(k).concat(i).concat(P);w[P]=this.translate(C,a()({},t,{joinArrays:!1,ns:l})),w[P]===C&&(w[P]=f[P])}f=w}}else if(S&&"string"==typeof b&&"[object Array]"===v)(f=f.join(b))&&(f=this.extendTranslation(f,e,t));else{var O=!1,N=!1;if(!this.isValidLookup(f)&&void 0!==t.defaultValue){if(O=!0,void 0!==t.count){var E=this.pluralResolver.getSuffix(c,t.count);f=t["defaultValue".concat(E)]}f||(f=t.defaultValue)}this.isValidLookup(f)||(N=!0,f=o);var j=t.defaultValue&&t.defaultValue!==f&&this.options.updateMissing;if(N||O||j){this.logger.log(j?"updateKey":"missingKey",c,u,o,j?t.defaultValue:f);var R=[],T=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&T&&T[0])for(var A=0;A<T.length;A++)R.push(T[A]);else"all"===this.options.saveMissingTo?R=this.languageUtils.toResolveHierarchy(t.lng||this.language):R.push(t.lng||this.language);var L=function(e,i){n.options.missingKeyHandler?n.options.missingKeyHandler(e,u,i,j?t.defaultValue:f,j,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,u,i,j?t.defaultValue:f,j,t),n.emit("missingKey",e,u,i,f)};if(this.options.saveMissing){var V=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&V?R.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,o).forEach((function(t){return L([e],t)}))})):L(R,o)}}f=this.extendTranslation(f,e,t,d),N&&f===o&&this.options.appendNamespaceToMissingKey&&(f="".concat(u,":").concat(o)),N&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(f))}return f}},{key:"extendTranslation",value:function(e,t,n,i){var r=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(a()({},n,{interpolation:a()({},this.options.interpolation,n.interpolation)}));var s=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(s=a()({},this.options.interpolation.defaultVariables,s)),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){return r.translate.apply(r,arguments)}),n)),n.interpolation&&this.interpolator.reset()}var o=n.postProcess||this.options.postProcess,l="string"==typeof o?[o]:o;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=U.handle(l,e,t,n,this)),e}},{key:"resolve",value:function(e){var t,n,i,r,s,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!o.isValidLookup(t)){var l=o.extractFromKey(e,a),u=l.key;n=u;var c=l.namespaces;o.options.fallbackNS&&(c=c.concat(o.options.fallbackNS));var p=void 0!==a.count&&"string"!=typeof a.count,h=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,d=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);c.forEach((function(e){o.isValidLookup(t)||(s=e,d.forEach((function(n){if(!o.isValidLookup(t)){r=n;var s,l,c=u,d=[c];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(d,u,n,e,a);else p&&(s=o.pluralResolver.getSuffix(n,a.count)),p&&h&&d.push(c+s),h&&d.push(c+="".concat(o.options.contextSeparator).concat(a.context)),p&&d.push(c+=s);for(;l=d.pop();)o.isValidLookup(t)||(i=l,t=o.getResource(n,e,l,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:i,usedLng:r,usedNS:s}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}}]),t}(k);function M(e){return e.charAt(0).toUpperCase()+e.slice(1)}var I=function(){function e(t){u()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=w.create("languageUtils")}return p()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=M(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,i=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],s=function(e){e&&(n.isWhitelisted(e)?r.push(e):n.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):"string"==typeof e&&s(this.formatLanguageCode(e)),i.forEach((function(e){r.indexOf(e)<0&&s(n.formatLanguageCode(e))})),r}}]),e}(),q=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],z={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function H(){var e={};return q.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:z[t.fc]}}))})),e}var D=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u()(this,e),this.languageUtils=t,this.options=n,this.logger=w.create("pluralResolver"),this.rules=H()}return p()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=this,i=[],r=this.getRule(e);return r?(r.numbers.forEach((function(r){var s=n.getSuffix(e,r);i.push("".concat(t).concat(s))})),i):i}},{key:"getSuffix",value:function(e,t){var n=this,i=this.getRule(e);if(i){var r=i.noAbs?i.plurals(t):i.plurals(Math.abs(t)),s=i.numbers[r];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var o=function(){return n.options.prepend&&s.toString()?n.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,e),this.logger=w.create("interpolator"),this.init(t,!0)}return p()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var n=e.interpolation;this.escape=void 0!==n.escape?n.escape:L,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?T(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?T(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?T(n.nestingPrefix):n.nestingPrefixEscaped||T("$t("),this.nestingSuffix=n.nestingSuffix?T(n.nestingSuffix):n.nestingSuffixEscaped||T(")"),this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,i){var r,s,o,a=this;function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return j(t,e);var i=e.split(a.formatSeparator),r=i.shift().trim(),s=i.join(a.formatSeparator).trim();return a.format(j(t,r),s,n)};this.resetRegExp();var c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler;for(o=0;(r=this.regexpUnescape.exec(e))&&(s=u(r[1].trim()),e=e.replace(r[0],s),this.regexpUnescape.lastIndex=0,!(++o>=this.maxReplaces)););for(o=0;r=this.regexp.exec(e);){if(void 0===(s=u(r[1].trim())))if("function"==typeof c){var p=c(e,r,i);s="string"==typeof p?p:""}else this.logger.warn("missed to pass in variable ".concat(r[1]," for interpolating ").concat(e)),s="";else"string"==typeof s||this.useRawValueToEscape||(s=C(s));if(s=this.escapeValue?l(this.escape(s)):l(s),e=e.replace(r[0],s),this.regexp.lastIndex=0,++o>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var n,i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a()({},r);function o(e,t){if(e.indexOf(",")<0)return e;var n=e.split(",");e=n.shift();var i=n.join(",");i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),t&&(s=a()({},t,s))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(s.applyPostProcessor=!1;n=this.nestingRegexp.exec(e);){if((i=t(o.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=C(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),i=""),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}]),e}(),B=n(8),K=n.n(B);var J=function(e){function t(e,n,i){var r,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u()(this,t),r=d()(this,g()(t).call(this)),k.call(b()(b()(r))),r.backend=e,r.store=n,r.languageUtils=i.languageUtils,r.options=s,r.logger=w.create("backendConnector"),r.state={},r.queue=[],r.backend&&r.backend.init&&r.backend.init(i,s.backend,s),r}return v()(t,e),p()(t,[{key:"queueLoad",value:function(e,t,n,i){var r=this,s=[],o=[],a=[],l=[];return e.forEach((function(e){var i=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&r.store.hasResourceBundle(e,t)?r.state[a]=2:r.state[a]<0||(1===r.state[a]?o.indexOf(a)<0&&o.push(a):(r.state[a]=1,i=!1,o.indexOf(a)<0&&o.push(a),s.indexOf(a)<0&&s.push(a),l.indexOf(t)<0&&l.push(t)))})),i||a.push(e)})),(s.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:i}),{toLoad:s,pending:o,toLoadLanguages:a,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var i=e.split("|"),r=K()(i,2),s=r[0],o=r[1];t&&this.emit("failedLoading",s,o,t),n&&this.store.addResourceBundle(s,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var i,r,l,u,c,p;i=n.loaded,r=o,u=N(i,[s],Object),c=u.obj,p=u.k,c[p]=c[p]||[],l&&(c[p]=c[p].concat(r)),l||c[p].push(r),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(a,l){a&&l&&r<5?setTimeout((function(){i.read.call(i,e,t,n,r+1,2*s,o)}),s):o(a,l)})):o(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var s=this.queueLoad(e,t,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.split("|"),r=K()(i,2),s=r[0],o=r[1];this.read(s,o,"read",null,null,(function(i,r){i&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(s," failed"),i),!i&&r&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(s),r),t.loaded(e,i,r)}))}},{key:"saveMissing",value:function(e,t,n,i,r){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,n,i,null,a()({},s,{isUpdate:r})),e&&e[0]&&this.store.addResource(e[0],t,n,i)}}]),t}(k);function W(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===s()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===s()(e[2])||"object"===s()(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function G(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function Q(){}var X=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(u()(this,t),e=d()(this,g()(t).call(this)),k.call(b()(b()(e))),e.options=G(n),e.services={},e.logger=w,e.modules={external:[]},i&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,i),d()(e,b()(b()(e)));setTimeout((function(){e.init(n,i)}),0)}return e}return v()(t,e),p()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),this.options=a()({},W(),this.options,G(t)),this.format=this.options.interpolation.format,n||(n=Q),!this.options.isClone){this.modules.logger?w.init(i(this.modules.logger),this.options):w.init(null,this.options);var r=new I(this.options);this.store=new V(this.options.resources,this.options);var s=this.services;s.logger=w,s.resourceStore=this.store,s.languageUtils=r,s.pluralResolver=new D(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new $(this.options),s.backendConnector=new J(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new F(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];e.emit.apply(e,[t].concat(i))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var o=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];o.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var l=P(),u=function(){e.changeLanguage(e.options.lng,(function(t,i){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(i),n(t,i)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var n=[],i=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){n.indexOf(e)<0&&n.push(e)}))};if(this.language)i(this.language);else{var r=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);r.forEach((function(e){return i(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(n,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,n){var i=P();return e||(e=this.languages),t||(t=this.options.ns),n||(n=Q),this.services.backendConnector.reload(e,t,(function(e){i.resolve(),n(e)})),i}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&U.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this,i=P();this.emit("languageChanging",e);var r=function(e){e&&(n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.translator.language||n.translator.changeLanguage(e),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(e)),n.loadResources((function(r){!function(e,r){n.translator.changeLanguage(r),r&&(n.emit("languageChanged",r),n.logger.log("languageChanged",r)),i.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(r,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var r=a()({},i);if("object"!==s()(i)){for(var o=arguments.length,l=new Array(o>2?o-2:0),u=2;u<o;u++)l[u-2]=arguments[u];r=n.options.overloadTranslationOptionHandler([t,i].concat(l))}return r.lng=r.lng||e.lng,r.lngs=r.lngs||e.lngs,r.ns=r.ns||e.ns,n.t(t,r)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var n=this,i=P();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),t&&t(e)})),i):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=P();"string"==typeof e&&(e=[e]);var i=this.options.preload||[],r=e.filter((function(e){return i.indexOf(e)<0}));return r.length?(this.options.preload=i.concat(r),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(e,n)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q,r=a()({},this.options,n,{isClone:!0}),s=new t(r),o=["store","services","language"];return o.forEach((function(t){s[t]=e[t]})),s.translator=new F(s.services,s.options),s.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];s.emit.apply(s,[e].concat(n))})),s.init(r,i),s.translator.options=s.options,s}}]),t}(k)),Y=X;X.changeLanguage.bind(X),X.cloneInstance.bind(X),X.createInstance.bind(X),X.dir.bind(X),X.exists.bind(X),X.getFixedT.bind(X),X.init.bind(X),X.loadLanguages.bind(X),X.loadNamespaces.bind(X),X.loadResources.bind(X),X.off.bind(X),X.on.bind(X),X.setDefaultNamespace.bind(X),X.t.bind(X),X.use.bind(X);
2
- /**
3
- * @license
4
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5
- * This code may only be used under the BSD style license found at
6
- * http://polymer.github.io/LICENSE.txt
7
- * The complete set of authors may be found at
8
- * http://polymer.github.io/AUTHORS.txt
9
- * The complete set of contributors may be found at
10
- * http://polymer.github.io/CONTRIBUTORS.txt
11
- * Code distributed by Google as part of the polymer project is also
12
- * subject to an additional IP rights grant found at
13
- * http://polymer.github.io/PATENTS.txt
14
- */
15
- const Z="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,ee=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},te=`{{lit-${String(Math.random()).slice(2)}}}`,ne=`\x3c!--${te}--\x3e`,ie=new RegExp(`${te}|${ne}`);class re{constructor(e,t){this.parts=[],this.element=t;const n=[],i=[],r=document.createTreeWalker(t.content,133,null,!1);let s=0,o=-1,a=0;const{strings:l,values:{length:u}}=e;for(;a<u;){const e=r.nextNode();if(null!==e){if(o++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let i=0;for(let e=0;e<n;e++)se(t[e].name,"$lit$")&&i++;for(;i-- >0;){const t=l[a],n=le.exec(t)[2],i=n.toLowerCase()+"$lit$",r=e.getAttribute(i);e.removeAttribute(i);const s=r.split(ie);this.parts.push({type:"attribute",index:o,name:n,strings:s}),a+=s.length-1}}"TEMPLATE"===e.tagName&&(i.push(e),r.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(te)>=0){const i=e.parentNode,r=t.split(ie),s=r.length-1;for(let t=0;t<s;t++){let n,s=r[t];if(""===s)n=ae();else{const e=le.exec(s);null!==e&&se(e[2],"$lit$")&&(s=s.slice(0,e.index)+e[1]+e[2].slice(0,-"$lit$".length)+e[3]),n=document.createTextNode(s)}i.insertBefore(n,e),this.parts.push({type:"node",index:++o})}""===r[s]?(i.insertBefore(ae(),e),n.push(e)):e.data=r[s],a+=s}}else if(8===e.nodeType)if(e.data===te){const t=e.parentNode;null!==e.previousSibling&&o!==s||(o++,t.insertBefore(ae(),e)),s=o,this.parts.push({type:"node",index:o}),null===e.nextSibling?e.data="":(n.push(e),o--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(te,t+1));)this.parts.push({type:"node",index:-1}),a++}}else r.currentNode=i.pop()}for(const e of n)e.parentNode.removeChild(e)}}const se=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},oe=e=>-1!==e.index,ae=()=>document.createComment(""),le=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function ue(e,t){const{element:{content:n},parts:i}=e,r=document.createTreeWalker(n,133,null,!1);let s=pe(i),o=i[s],a=-1,l=0;const u=[];let c=null;for(;r.nextNode();){a++;const e=r.currentNode;for(e.previousSibling===c&&(c=null),t.has(e)&&(u.push(e),null===c&&(c=e)),null!==c&&l++;void 0!==o&&o.index===a;)o.index=null!==c?-1:o.index-l,s=pe(i,s),o=i[s]}u.forEach(e=>e.parentNode.removeChild(e))}const ce=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},pe=(e,t=-1)=>{for(let n=t+1;n<e.length;n++){const t=e[n];if(oe(t))return n}return-1};
16
- /**
17
- * @license
18
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
19
- * This code may only be used under the BSD style license found at
20
- * http://polymer.github.io/LICENSE.txt
21
- * The complete set of authors may be found at
22
- * http://polymer.github.io/AUTHORS.txt
23
- * The complete set of contributors may be found at
24
- * http://polymer.github.io/CONTRIBUTORS.txt
25
- * Code distributed by Google as part of the polymer project is also
26
- * subject to an additional IP rights grant found at
27
- * http://polymer.github.io/PATENTS.txt
28
- */
29
- const he=new WeakMap,de=e=>"function"==typeof e&&he.has(e),fe={},ge={};
30
- /**
31
- * @license
32
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
33
- * This code may only be used under the BSD style license found at
34
- * http://polymer.github.io/LICENSE.txt
35
- * The complete set of authors may be found at
36
- * http://polymer.github.io/AUTHORS.txt
37
- * The complete set of contributors may be found at
38
- * http://polymer.github.io/CONTRIBUTORS.txt
39
- * Code distributed by Google as part of the polymer project is also
40
- * subject to an additional IP rights grant found at
41
- * http://polymer.github.io/PATENTS.txt
42
- */
43
- class ye{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=Z?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r,s=0,o=0,a=i.nextNode();for(;s<n.length;)if(r=n[s],oe(r)){for(;o<r.index;)o++,"TEMPLATE"===a.nodeName&&(t.push(a),i.currentNode=a.content),null===(a=i.nextNode())&&(i.currentNode=t.pop(),a=i.nextNode());if("node"===r.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(a.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(a,r.name,r.strings,this.options));s++}else this.__parts.push(void 0),s++;return Z&&(document.adoptNode(e),customElements.upgrade(e)),e}}
44
- /**
45
- * @license
46
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
47
- * This code may only be used under the BSD style license found at
48
- * http://polymer.github.io/LICENSE.txt
49
- * The complete set of authors may be found at
50
- * http://polymer.github.io/AUTHORS.txt
51
- * The complete set of contributors may be found at
52
- * http://polymer.github.io/CONTRIBUTORS.txt
53
- * Code distributed by Google as part of the polymer project is also
54
- * subject to an additional IP rights grant found at
55
- * http://polymer.github.io/PATENTS.txt
56
- */const ve=` ${te} `;class me{constructor(e,t,n,i){this.strings=e,this.values=t,this.type=n,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let i=0;i<e;i++){const e=this.strings[i],r=e.lastIndexOf("\x3c!--");n=(r>-1||n)&&-1===e.indexOf("--\x3e",r+1);const s=le.exec(e);t+=null===s?e+(n?ve:ne):e.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+te}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}
57
- /**
58
- * @license
59
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
60
- * This code may only be used under the BSD style license found at
61
- * http://polymer.github.io/LICENSE.txt
62
- * The complete set of authors may be found at
63
- * http://polymer.github.io/AUTHORS.txt
64
- * The complete set of contributors may be found at
65
- * http://polymer.github.io/CONTRIBUTORS.txt
66
- * Code distributed by Google as part of the polymer project is also
67
- * subject to an additional IP rights grant found at
68
- * http://polymer.github.io/PATENTS.txt
69
- */
70
- const be=e=>null===e||!("object"==typeof e||"function"==typeof e),Se=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class xe{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new _e(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let i=0;i<t;i++){n+=e[i];const t=this.parts[i];if(void 0!==t){const e=t.value;if(be(e)||!Se(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t],n}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class _e{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===fe||be(e)&&e===this.value||(this.value=e,de(e)||(this.committer.dirty=!0))}commit(){for(;de(this.value);){const e=this.value;this.value=fe,e(this)}this.value!==fe&&this.committer.commit()}}class we{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(ae()),this.endNode=e.appendChild(ae())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=ae()),e.__insert(this.endNode=ae())}insertAfterPart(e){e.__insert(this.startNode=ae()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;de(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=fe,e(this)}const e=this.__pendingValue;e!==fe&&(be(e)?e!==this.value&&this.__commitText(e):e instanceof me?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Se(e)?this.__commitIterable(e):e===ge?(this.value=ge,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof ye&&this.value.template===t)this.value.update(e.values);else{const n=new ye(t,e.processor,this.options),i=n._clone();n.update(e.values),this.__commitNode(i),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,i=0;for(const r of e)n=t[i],void 0===n&&(n=new we(this.options),t.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(t[i-1])),n.setValue(r),n.commit(),i++;i<t.length&&(t.length=i,this.clear(n&&n.endNode))}clear(e=this.startNode){ee(this.startNode.parentNode,e.nextSibling,this.endNode)}}class ke{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;de(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=fe,e(this)}if(this.__pendingValue===fe)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=fe}}class Pe extends xe{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new Ce(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class Ce extends _e{}let Oe=!1;(()=>{try{const e={get capture(){return Oe=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class Ne{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;de(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=fe,e(this)}if(this.__pendingValue===fe)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=Ee(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=fe}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const Ee=e=>e&&(Oe?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
71
- /**
72
- * @license
73
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
74
- * This code may only be used under the BSD style license found at
75
- * http://polymer.github.io/LICENSE.txt
76
- * The complete set of authors may be found at
77
- * http://polymer.github.io/AUTHORS.txt
78
- * The complete set of contributors may be found at
79
- * http://polymer.github.io/CONTRIBUTORS.txt
80
- * Code distributed by Google as part of the polymer project is also
81
- * subject to an additional IP rights grant found at
82
- * http://polymer.github.io/PATENTS.txt
83
- */;function je(e){let t=Re.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},Re.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const i=e.strings.join(te);return n=t.keyString.get(i),void 0===n&&(n=new re(e,e.getTemplateElement()),t.keyString.set(i,n)),t.stringsArray.set(e.strings,n),n}const Re=new Map,Te=new WeakMap;
84
- /**
85
- * @license
86
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
87
- * This code may only be used under the BSD style license found at
88
- * http://polymer.github.io/LICENSE.txt
89
- * The complete set of authors may be found at
90
- * http://polymer.github.io/AUTHORS.txt
91
- * The complete set of contributors may be found at
92
- * http://polymer.github.io/CONTRIBUTORS.txt
93
- * Code distributed by Google as part of the polymer project is also
94
- * subject to an additional IP rights grant found at
95
- * http://polymer.github.io/PATENTS.txt
96
- */const Ae=new
97
- /**
98
- * @license
99
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
100
- * This code may only be used under the BSD style license found at
101
- * http://polymer.github.io/LICENSE.txt
102
- * The complete set of authors may be found at
103
- * http://polymer.github.io/AUTHORS.txt
104
- * The complete set of contributors may be found at
105
- * http://polymer.github.io/CONTRIBUTORS.txt
106
- * Code distributed by Google as part of the polymer project is also
107
- * subject to an additional IP rights grant found at
108
- * http://polymer.github.io/PATENTS.txt
109
- */
110
- class{handleAttributeExpressions(e,t,n,i){const r=t[0];if("."===r){return new Pe(e,t.slice(1),n).parts}if("@"===r)return[new Ne(e,t.slice(1),i.eventContext)];if("?"===r)return[new ke(e,t.slice(1),n)];return new xe(e,t,n).parts}handleTextExpression(e){return new we(e)}};
111
- /**
112
- * @license
113
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
114
- * This code may only be used under the BSD style license found at
115
- * http://polymer.github.io/LICENSE.txt
116
- * The complete set of authors may be found at
117
- * http://polymer.github.io/AUTHORS.txt
118
- * The complete set of contributors may be found at
119
- * http://polymer.github.io/CONTRIBUTORS.txt
120
- * Code distributed by Google as part of the polymer project is also
121
- * subject to an additional IP rights grant found at
122
- * http://polymer.github.io/PATENTS.txt
123
- */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const Le=(e,...t)=>new me(e,t,"html",Ae),Ve=(e,t)=>`${e}--${t}`;let Ue=!0;void 0===window.ShadyCSS?Ue=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),Ue=!1);const Fe=e=>t=>{const n=Ve(t.type,e);let i=Re.get(n);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},Re.set(n,i));let r=i.stringsArray.get(t.strings);if(void 0!==r)return r;const s=t.strings.join(te);if(r=i.keyString.get(s),void 0===r){const n=t.getTemplateElement();Ue&&window.ShadyCSS.prepareTemplateDom(n,e),r=new re(t,n),i.keyString.set(s,r)}return i.stringsArray.set(t.strings,r),r},Me=["html","svg"],Ie=new Set,qe=(e,t,n)=>{Ie.add(e);const i=n?n.element:document.createElement("template"),r=t.querySelectorAll("style"),{length:s}=r;if(0===s)return void window.ShadyCSS.prepareTemplateStyles(i,e);const o=document.createElement("style");for(let e=0;e<s;e++){const t=r[e];t.parentNode.removeChild(t),o.textContent+=t.textContent}(e=>{Me.forEach(t=>{const n=Re.get(Ve(t,e));void 0!==n&&n.keyString.forEach(e=>{const{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{n.add(e)}),ue(e,n)})})})(e);const a=i.content;n?function(e,t,n=null){const{element:{content:i},parts:r}=e;if(null==n)return void i.appendChild(t);const s=document.createTreeWalker(i,133,null,!1);let o=pe(r),a=0,l=-1;for(;s.nextNode();){l++;for(s.currentNode===n&&(a=ce(t),n.parentNode.insertBefore(t,n));-1!==o&&r[o].index===l;){if(a>0){for(;-1!==o;)r[o].index+=a,o=pe(r,o);return}o=pe(r,o)}}}(n,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(i,e);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(n){a.insertBefore(o,a.firstChild);const e=new Set;e.add(o),ue(n,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const ze={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},He=(e,t)=>t!==e&&(t==t||e==e),De={attribute:!0,type:String,converter:ze,reflect:!1,hasChanged:He};class $e extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,n)=>{const i=this._attributeNameForProperty(n,t);void 0!==i&&(this._attributeToPropertyMap.set(i,n),e.push(i))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=De){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdateInternal(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||De}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=He){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,i=t.converter||ze,r="function"==typeof i?i:i.fromAttribute;return r?r(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,i=t.converter;return(i&&i.toAttribute||ze.toAttribute)(e,n)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=De){const i=this.constructor,r=i._attributeNameForProperty(e,n);if(void 0!==r){const e=i._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(r):this.setAttribute(r,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,i=n._attributeToPropertyMap.get(e);if(void 0!==i){const e=n.getPropertyOptions(i);this._updateState=16|this._updateState,this[i]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,n){let i=!0;if(void 0!==e){const r=this.constructor;n=n||r.getPropertyOptions(e),r._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}$e.finalized=!0;
124
- /**
125
- * @license
126
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
127
- * This code may only be used under the BSD style license found at
128
- * http://polymer.github.io/LICENSE.txt
129
- * The complete set of authors may be found at
130
- * http://polymer.github.io/AUTHORS.txt
131
- * The complete set of contributors may be found at
132
- * http://polymer.github.io/CONTRIBUTORS.txt
133
- * Code distributed by Google as part of the polymer project is also
134
- * subject to an additional IP rights grant found at
135
- * http://polymer.github.io/PATENTS.txt
136
- */
137
- const Be=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};function Ke(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):Be(e,t)}const Je=Element.prototype;Je.msMatchesSelector||Je.webkitMatchesSelector;
138
- /**
139
- @license
140
- Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
141
- This code may only be used under the BSD style license found at
142
- http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
143
- http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
144
- found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
145
- part of the polymer project is also subject to an additional IP rights grant
146
- found at http://polymer.github.io/PATENTS.txt
147
- */
148
- const We=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ge=Symbol();class Qe{constructor(e,t){if(t!==Ge)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(We?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}
149
- /**
150
- * @license
151
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
152
- * This code may only be used under the BSD style license found at
153
- * http://polymer.github.io/LICENSE.txt
154
- * The complete set of authors may be found at
155
- * http://polymer.github.io/AUTHORS.txt
156
- * The complete set of contributors may be found at
157
- * http://polymer.github.io/CONTRIBUTORS.txt
158
- * Code distributed by Google as part of the polymer project is also
159
- * subject to an additional IP rights grant found at
160
- * http://polymer.github.io/PATENTS.txt
161
- */
162
- (window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const Xe={};class Ye extends $e{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,n)=>e.reduceRight((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e),n),n=t(e,new Set),i=[];n.forEach(e=>i.unshift(e)),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!We){const t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return new Qe(String(t),Ge)}return e})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?We?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==Xe&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return Xe}}Ye.finalized=!0,Ye.render=(e,t,n)=>{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const i=n.scopeName,r=Te.has(t),s=Ue&&11===t.nodeType&&!!t.host,o=s&&!Ie.has(i),a=o?document.createDocumentFragment():t;if(((e,t,n)=>{let i=Te.get(t);void 0===i&&(ee(t,t.firstChild),Te.set(t,i=new we(Object.assign({templateFactory:je},n))),i.appendInto(t)),i.setValue(e),i.commit()})(e,a,Object.assign({templateFactory:Fe(i)},n)),o){const e=Te.get(a);Te.delete(a);const n=e.value instanceof ye?e.value.template:void 0;qe(i,a,n),ee(t,t.firstChild),t.appendChild(a),Te.set(t,e)}!r&&s&&window.ShadyCSS.styleElement(t.host)};var Ze=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o};let et=class extends(i(Y)(Ye)){render(){return Le`
163
- ${this._getTranslatedValue()}
164
- `}_getTranslatedValue(){return this.value?Y.isInitialized?Y.t(this.value,this.options):this.value:""}};var tt;et.styles=((e,...t)=>{const n=t.reduce((t,n,i)=>t+(e=>{if(e instanceof Qe)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[i+1],e[0]);return new Qe(n,Ge)})`
165
- :host {
166
- display: inline;
167
- }
168
-
169
- :host([hidden]) {
170
- display: none;
171
- }
172
- `,Ze([Ke({type:String})],et.prototype,"value",void 0),Ze([Ke({type:Object})],et.prototype,"options",void 0),et=Ze([(tt="or-translate",e=>"function"==typeof e?((e,t)=>(window.customElements.define(e,t),t))(tt,e):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){window.customElements.define(e,t)}}})(tt,e))],et)}])}));
package/dist/umd/index.js DELETED
@@ -1,172 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("i18next")):"function"==typeof define&&define.amd?define(["i18next"],e):"object"==typeof exports?exports.ORTranslate=e(require("i18next")):t.ORTranslate=e(t.i18next)}(window,(function(t){return function(t){var e={};function s(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}return s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)s.d(n,i,function(e){return t[e]}.bind(null,i));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=1)}([function(e,s){e.exports=t},function(t,e,s){"use strict";s.r(e),s.d(e,"i18next",(function(){return r.a})),s.d(e,"translate",(function(){return n})),s.d(e,"OrTranslate",(function(){return at}));const n=t=>e=>class extends e{constructor(){super(...arguments),this._i18nextJustInitialized=!1,this.initCallback=t=>{this._i18nextJustInitialized=!0,this.requestUpdate&&this.requestUpdate()},this.langChangedCallback=()=>{this.requestUpdate&&this.requestUpdate()}}connectedCallback(){t.language||t.on("initialized",this.initCallback),t.on("languageChanged",this.langChangedCallback),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){t.off("initialized",this.initCallback),t.off("languageChanged",this.langChangedCallback),super.disconnectedCallback&&super.disconnectedCallback()}shouldUpdate(t){return this._i18nextJustInitialized?(this._i18nextJustInitialized=!1,!0):super.shouldUpdate&&super.shouldUpdate(t)}};var i=s(0),r=s.n(i);
2
- /**
3
- * @license
4
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5
- * This code may only be used under the BSD style license found at
6
- * http://polymer.github.io/LICENSE.txt
7
- * The complete set of authors may be found at
8
- * http://polymer.github.io/AUTHORS.txt
9
- * The complete set of contributors may be found at
10
- * http://polymer.github.io/CONTRIBUTORS.txt
11
- * Code distributed by Google as part of the polymer project is also
12
- * subject to an additional IP rights grant found at
13
- * http://polymer.github.io/PATENTS.txt
14
- */
15
- const o="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},l=`{{lit-${String(Math.random()).slice(2)}}}`,c=`\x3c!--${l}--\x3e`,d=new RegExp(`${l}|${c}`);class h{constructor(t,e){this.parts=[],this.element=e;const s=[],n=[],i=document.createTreeWalker(e.content,133,null,!1);let r=0,o=-1,a=0;const{strings:c,values:{length:h}}=t;for(;a<h;){const t=i.nextNode();if(null!==t){if(o++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:s}=e;let n=0;for(let t=0;t<s;t++)u(e[t].name,"$lit$")&&n++;for(;n-- >0;){const e=c[a],s=m.exec(e)[2],n=s.toLowerCase()+"$lit$",i=t.getAttribute(n);t.removeAttribute(n);const r=i.split(d);this.parts.push({type:"attribute",index:o,name:s,strings:r}),a+=r.length-1}}"TEMPLATE"===t.tagName&&(n.push(t),i.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(l)>=0){const n=t.parentNode,i=e.split(d),r=i.length-1;for(let e=0;e<r;e++){let s,r=i[e];if(""===r)s=f();else{const t=m.exec(r);null!==t&&u(t[2],"$lit$")&&(r=r.slice(0,t.index)+t[1]+t[2].slice(0,-"$lit$".length)+t[3]),s=document.createTextNode(r)}n.insertBefore(s,t),this.parts.push({type:"node",index:++o})}""===i[r]?(n.insertBefore(f(),t),s.push(t)):t.data=i[r],a+=r}}else if(8===t.nodeType)if(t.data===l){const e=t.parentNode;null!==t.previousSibling&&o!==r||(o++,e.insertBefore(f(),t)),r=o,this.parts.push({type:"node",index:o}),null===t.nextSibling?t.data="":(s.push(t),o--),a++}else{let e=-1;for(;-1!==(e=t.data.indexOf(l,e+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=n.pop()}for(const t of s)t.parentNode.removeChild(t)}}const u=(t,e)=>{const s=t.length-e.length;return s>=0&&t.slice(s)===e},p=t=>-1!==t.index,f=()=>document.createComment(""),m=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function _(t,e){const{element:{content:s},parts:n}=t,i=document.createTreeWalker(s,133,null,!1);let r=g(n),o=n[r],a=-1,l=0;const c=[];let d=null;for(;i.nextNode();){a++;const t=i.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(c.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===a;)o.index=null!==d?-1:o.index-l,r=g(n,r),o=n[r]}c.forEach(t=>t.parentNode.removeChild(t))}const y=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},g=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(p(e))return s}return-1};
16
- /**
17
- * @license
18
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
19
- * This code may only be used under the BSD style license found at
20
- * http://polymer.github.io/LICENSE.txt
21
- * The complete set of authors may be found at
22
- * http://polymer.github.io/AUTHORS.txt
23
- * The complete set of contributors may be found at
24
- * http://polymer.github.io/CONTRIBUTORS.txt
25
- * Code distributed by Google as part of the polymer project is also
26
- * subject to an additional IP rights grant found at
27
- * http://polymer.github.io/PATENTS.txt
28
- */
29
- const S=new WeakMap,v=t=>"function"==typeof t&&S.has(t),w={},b={};
30
- /**
31
- * @license
32
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
33
- * This code may only be used under the BSD style license found at
34
- * http://polymer.github.io/LICENSE.txt
35
- * The complete set of authors may be found at
36
- * http://polymer.github.io/AUTHORS.txt
37
- * The complete set of contributors may be found at
38
- * http://polymer.github.io/CONTRIBUTORS.txt
39
- * Code distributed by Google as part of the polymer project is also
40
- * subject to an additional IP rights grant found at
41
- * http://polymer.github.io/PATENTS.txt
42
- */
43
- class x{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=o?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],s=this.template.parts,n=document.createTreeWalker(t,133,null,!1);let i,r=0,a=0,l=n.nextNode();for(;r<s.length;)if(i=s[r],p(i)){for(;a<i.index;)a++,"TEMPLATE"===l.nodeName&&(e.push(l),n.currentNode=l.content),null===(l=n.nextNode())&&(n.currentNode=e.pop(),l=n.nextNode());if("node"===i.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(l.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,i.name,i.strings,this.options));r++}else this.__parts.push(void 0),r++;return o&&(document.adoptNode(t),customElements.upgrade(t)),t}}
44
- /**
45
- * @license
46
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
47
- * This code may only be used under the BSD style license found at
48
- * http://polymer.github.io/LICENSE.txt
49
- * The complete set of authors may be found at
50
- * http://polymer.github.io/AUTHORS.txt
51
- * The complete set of contributors may be found at
52
- * http://polymer.github.io/CONTRIBUTORS.txt
53
- * Code distributed by Google as part of the polymer project is also
54
- * subject to an additional IP rights grant found at
55
- * http://polymer.github.io/PATENTS.txt
56
- */const P=` ${l} `;class C{constructor(t,e,s,n){this.strings=t,this.values=e,this.type=s,this.processor=n}getHTML(){const t=this.strings.length-1;let e="",s=!1;for(let n=0;n<t;n++){const t=this.strings[n],i=t.lastIndexOf("\x3c!--");s=(i>-1||s)&&-1===t.indexOf("--\x3e",i+1);const r=m.exec(t);e+=null===r?t+(s?P:c):t.substr(0,r.index)+r[1]+r[2]+"$lit$"+r[3]+l}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}
57
- /**
58
- * @license
59
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
60
- * This code may only be used under the BSD style license found at
61
- * http://polymer.github.io/LICENSE.txt
62
- * The complete set of authors may be found at
63
- * http://polymer.github.io/AUTHORS.txt
64
- * The complete set of contributors may be found at
65
- * http://polymer.github.io/CONTRIBUTORS.txt
66
- * Code distributed by Google as part of the polymer project is also
67
- * subject to an additional IP rights grant found at
68
- * http://polymer.github.io/PATENTS.txt
69
- */
70
- const N=t=>null===t||!("object"==typeof t||"function"==typeof t),T=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class A{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new E(this)}_getValue(){const t=this.strings,e=t.length-1;let s="";for(let n=0;n<e;n++){s+=t[n];const e=this.parts[n];if(void 0!==e){const t=e.value;if(N(t)||!T(t))s+="string"==typeof t?t:String(t);else for(const e of t)s+="string"==typeof e?e:String(e)}}return s+=t[e],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class E{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===w||N(t)&&t===this.value||(this.value=t,v(t)||(this.committer.dirty=!0))}commit(){for(;v(this.value);){const t=this.value;this.value=w,t(this)}this.value!==w&&this.committer.commit()}}class k{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(f()),this.endNode=t.appendChild(f())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=f()),t.__insert(this.endNode=f())}insertAfterPart(t){t.__insert(this.startNode=f()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;v(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=w,t(this)}const t=this.__pendingValue;t!==w&&(N(t)?t!==this.value&&this.__commitText(t):t instanceof C?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):T(t)?this.__commitIterable(t):t===b?(this.value=b,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof x&&this.value.template===e)this.value.update(t.values);else{const s=new x(e,t.processor,this.options),n=s._clone();s.update(t.values),this.__commitNode(n),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,n=0;for(const i of t)s=e[n],void 0===s&&(s=new k(this.options),e.push(s),0===n?s.appendIntoPart(this):s.insertAfterPart(e[n-1])),s.setValue(i),s.commit(),n++;n<e.length&&(e.length=n,this.clear(s&&s.endNode))}clear(t=this.startNode){a(this.startNode.parentNode,t.nextSibling,this.endNode)}}class O{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;v(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=w,t(this)}if(this.__pendingValue===w)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=w}}class V extends A{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new U(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class U extends E{}let j=!1;(()=>{try{const t={get capture(){return j=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class R{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;v(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=w,t(this)}if(this.__pendingValue===w)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),n=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),n&&(this.__options=M(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=w}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const M=t=>t&&(j?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
71
- /**
72
- * @license
73
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
74
- * This code may only be used under the BSD style license found at
75
- * http://polymer.github.io/LICENSE.txt
76
- * The complete set of authors may be found at
77
- * http://polymer.github.io/AUTHORS.txt
78
- * The complete set of contributors may be found at
79
- * http://polymer.github.io/CONTRIBUTORS.txt
80
- * Code distributed by Google as part of the polymer project is also
81
- * subject to an additional IP rights grant found at
82
- * http://polymer.github.io/PATENTS.txt
83
- */;function q(t){let e=z.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},z.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const n=t.strings.join(l);return s=e.keyString.get(n),void 0===s&&(s=new h(t,t.getTemplateElement()),e.keyString.set(n,s)),e.stringsArray.set(t.strings,s),s}const z=new Map,I=new WeakMap;
84
- /**
85
- * @license
86
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
87
- * This code may only be used under the BSD style license found at
88
- * http://polymer.github.io/LICENSE.txt
89
- * The complete set of authors may be found at
90
- * http://polymer.github.io/AUTHORS.txt
91
- * The complete set of contributors may be found at
92
- * http://polymer.github.io/CONTRIBUTORS.txt
93
- * Code distributed by Google as part of the polymer project is also
94
- * subject to an additional IP rights grant found at
95
- * http://polymer.github.io/PATENTS.txt
96
- */const $=new
97
- /**
98
- * @license
99
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
100
- * This code may only be used under the BSD style license found at
101
- * http://polymer.github.io/LICENSE.txt
102
- * The complete set of authors may be found at
103
- * http://polymer.github.io/AUTHORS.txt
104
- * The complete set of contributors may be found at
105
- * http://polymer.github.io/CONTRIBUTORS.txt
106
- * Code distributed by Google as part of the polymer project is also
107
- * subject to an additional IP rights grant found at
108
- * http://polymer.github.io/PATENTS.txt
109
- */
110
- class{handleAttributeExpressions(t,e,s,n){const i=e[0];if("."===i){return new V(t,e.slice(1),s).parts}if("@"===i)return[new R(t,e.slice(1),n.eventContext)];if("?"===i)return[new O(t,e.slice(1),s)];return new A(t,e,s).parts}handleTextExpression(t){return new k(t)}};
111
- /**
112
- * @license
113
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
114
- * This code may only be used under the BSD style license found at
115
- * http://polymer.github.io/LICENSE.txt
116
- * The complete set of authors may be found at
117
- * http://polymer.github.io/AUTHORS.txt
118
- * The complete set of contributors may be found at
119
- * http://polymer.github.io/CONTRIBUTORS.txt
120
- * Code distributed by Google as part of the polymer project is also
121
- * subject to an additional IP rights grant found at
122
- * http://polymer.github.io/PATENTS.txt
123
- */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const F=(t,...e)=>new C(t,e,"html",$),L=(t,e)=>`${t}--${e}`;let B=!0;void 0===window.ShadyCSS?B=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),B=!1);const H=t=>e=>{const s=L(e.type,t);let n=z.get(s);void 0===n&&(n={stringsArray:new WeakMap,keyString:new Map},z.set(s,n));let i=n.stringsArray.get(e.strings);if(void 0!==i)return i;const r=e.strings.join(l);if(i=n.keyString.get(r),void 0===i){const s=e.getTemplateElement();B&&window.ShadyCSS.prepareTemplateDom(s,t),i=new h(e,s),n.keyString.set(r,i)}return n.stringsArray.set(e.strings,i),i},J=["html","svg"],W=new Set,D=(t,e,s)=>{W.add(t);const n=s?s.element:document.createElement("template"),i=e.querySelectorAll("style"),{length:r}=i;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(n,t);const o=document.createElement("style");for(let t=0;t<r;t++){const e=i[t];e.parentNode.removeChild(e),o.textContent+=e.textContent}(t=>{J.forEach(e=>{const s=z.get(L(e,t));void 0!==s&&s.keyString.forEach(t=>{const{element:{content:e}}=t,s=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{s.add(t)}),_(t,s)})})})(t);const a=n.content;s?function(t,e,s=null){const{element:{content:n},parts:i}=t;if(null==s)return void n.appendChild(e);const r=document.createTreeWalker(n,133,null,!1);let o=g(i),a=0,l=-1;for(;r.nextNode();){l++;for(r.currentNode===s&&(a=y(e),s.parentNode.insertBefore(e,s));-1!==o&&i[o].index===l;){if(a>0){for(;-1!==o;)i[o].index+=a,o=g(i,o);return}o=g(i,o)}}}(s,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(n,t);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(s){a.insertBefore(o,a.firstChild);const t=new Set;t.add(o),_(s,t)}};window.JSCompiler_renameProperty=(t,e)=>t;const G={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},K=(t,e)=>e!==t&&(e==e||t==t),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:K};class X extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,s)=>{const n=this._attributeNameForProperty(s,e);void 0!==n&&(this._attributeToPropertyMap.set(n,s),t.push(n))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=Q){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const s="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const i=this[t];this[e]=n,this.requestUpdateInternal(t,i,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||Q}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const s of e)this.createProperty(s,t[s])}}static _attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,s=K){return s(t,e)}static _propertyValueFromAttribute(t,e){const s=e.type,n=e.converter||G,i="function"==typeof n?n:n.fromAttribute;return i?i(t,s):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const s=e.type,n=e.converter;return(n&&n.toAttribute||G.toAttribute)(t,s)}initialize(){this._updateState=0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,s){e!==s&&this._attributeToProperty(t,s)}_propertyToAttribute(t,e,s=Q){const n=this.constructor,i=n._attributeNameForProperty(t,s);if(void 0!==i){const t=n._propertyValueToAttribute(e,s);if(void 0===t)return;this._updateState=8|this._updateState,null==t?this.removeAttribute(i):this.setAttribute(i,t),this._updateState=-9&this._updateState}}_attributeToProperty(t,e){if(8&this._updateState)return;const s=this.constructor,n=s._attributeToPropertyMap.get(t);if(void 0!==n){const t=s.getPropertyOptions(n);this._updateState=16|this._updateState,this[n]=s._propertyValueFromAttribute(e,t),this._updateState=-17&this._updateState}}requestUpdateInternal(t,e,s){let n=!0;if(void 0!==t){const i=this.constructor;s=s||i.getPropertyOptions(t),i._valueHasChanged(this[t],e,s.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==s.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,s))):n=!1}!this._hasRequestedUpdate&&n&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this.requestUpdateInternal(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}X.finalized=!0;
124
- /**
125
- * @license
126
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
127
- * This code may only be used under the BSD style license found at
128
- * http://polymer.github.io/LICENSE.txt
129
- * The complete set of authors may be found at
130
- * http://polymer.github.io/AUTHORS.txt
131
- * The complete set of contributors may be found at
132
- * http://polymer.github.io/CONTRIBUTORS.txt
133
- * Code distributed by Google as part of the polymer project is also
134
- * subject to an additional IP rights grant found at
135
- * http://polymer.github.io/PATENTS.txt
136
- */
137
- const Y=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?Object.assign(Object.assign({},e),{finisher(s){s.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function Z(t){return(e,s)=>void 0!==s?((t,e,s)=>{e.constructor.createProperty(s,t)})(t,e,s):Y(t,e)}const tt=Element.prototype;tt.msMatchesSelector||tt.webkitMatchesSelector;
138
- /**
139
- @license
140
- Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
141
- This code may only be used under the BSD style license found at
142
- http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
143
- http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
144
- found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
145
- part of the polymer project is also subject to an additional IP rights grant
146
- found at http://polymer.github.io/PATENTS.txt
147
- */
148
- const et=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol();class nt{constructor(t,e){if(e!==st)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(et?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}
149
- /**
150
- * @license
151
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
152
- * This code may only be used under the BSD style license found at
153
- * http://polymer.github.io/LICENSE.txt
154
- * The complete set of authors may be found at
155
- * http://polymer.github.io/AUTHORS.txt
156
- * The complete set of contributors may be found at
157
- * http://polymer.github.io/CONTRIBUTORS.txt
158
- * Code distributed by Google as part of the polymer project is also
159
- * subject to an additional IP rights grant found at
160
- * http://polymer.github.io/PATENTS.txt
161
- */
162
- (window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const it={};class rt extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,s)=>t.reduceRight((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t),s),s=e(t,new Set),n=[];s.forEach(t=>n.unshift(t)),this._styles=n}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map(t=>{if(t instanceof CSSStyleSheet&&!et){const e=Array.prototype.slice.call(t.cssRules).reduce((t,e)=>t+e.cssText,"");return new nt(String(e),st)}return t})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?et?this.renderRoot.adoptedStyleSheets=t.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==it&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return it}}rt.finalized=!0,rt.render=(t,e,s)=>{if(!s||"object"!=typeof s||!s.scopeName)throw new Error("The `scopeName` option is required.");const n=s.scopeName,i=I.has(e),r=B&&11===e.nodeType&&!!e.host,o=r&&!W.has(n),l=o?document.createDocumentFragment():e;if(((t,e,s)=>{let n=I.get(e);void 0===n&&(a(e,e.firstChild),I.set(e,n=new k(Object.assign({templateFactory:q},s))),n.appendInto(e)),n.setValue(t),n.commit()})(t,l,Object.assign({templateFactory:H(n)},s)),o){const t=I.get(l);I.delete(l);const s=t.value instanceof x?t.value.template:void 0;D(n,l,s),a(e,e.firstChild),e.appendChild(l),I.set(e,t)}!i&&r&&window.ShadyCSS.styleElement(e.host)};var ot=function(t,e,s,n){var i,r=arguments.length,o=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,s):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(r<3?i(o):r>3?i(e,s,o):i(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o};let at=class extends(n(r.a)(rt)){render(){return F`
163
- ${this._getTranslatedValue()}
164
- `}_getTranslatedValue(){return this.value?r.a.isInitialized?r.a.t(this.value,this.options):this.value:""}};var lt;at.styles=((t,...e)=>{const s=e.reduce((e,s,n)=>e+(t=>{if(t instanceof nt)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[n+1],t[0]);return new nt(s,st)})`
165
- :host {
166
- display: inline;
167
- }
168
-
169
- :host([hidden]) {
170
- display: none;
171
- }
172
- `,ot([Z({type:String})],at.prototype,"value",void 0),ot([Z({type:Object})],at.prototype,"options",void 0),at=ot([(lt="or-translate",t=>"function"==typeof t?((t,e)=>(window.customElements.define(t,e),e))(lt,t):((t,e)=>{const{kind:s,elements:n}=e;return{kind:s,elements:n,finisher(e){window.customElements.define(t,e)}}})(lt,t))],at)}])}));