@ezeep/ezeep-js 1.0.284 → 1.0.290
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/cjs/ezp-auth_15.cjs.entry.js +17 -11
- package/dist/collection/components/ezp-printing/ezp-printing.js +5 -2
- package/dist/collection/components/ezp-upload/ezp-upload.css +0 -18
- package/dist/collection/components/ezp-upload/ezp-upload.js +28 -6
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
- package/dist/components/ezp-printing.js +1 -1
- package/dist/components/ezp-upload2.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/directives/proxies.ts +10 -2
- package/dist/esm/ezp-auth_15.entry.js +17 -11
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-0df147f4.entry.js +1 -0
- package/dist/ezeep/{p-1e286bd1.system.entry.js → p-6a494b7b.system.entry.js} +2 -2
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +6 -0
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +3 -1
- package/dist/types/components.d.ts +6 -1
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/p-0df147f4.entry.js +1 -0
- package/www/build/{p-544b7033.js → p-67021add.js} +1 -1
- package/www/build/{p-1e286bd1.system.entry.js → p-6a494b7b.system.entry.js} +2 -2
- package/www/build/p-DCznw2Ee.system.js +1 -1
- package/www/data/locales/de.json +1 -1
- package/www/data/locales/en.json +1 -1
- package/www/index.html +1 -1
- package/dist/ezeep/p-a2b688f0.entry.js +0 -1
- package/www/build/p-a2b688f0.entry.js +0 -1
package/dist/components/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{forceUpdate as t}from"@stencil/core/internal/client";const e=t=>"string"==typeof t,s=()=>{let t,e;const s=new Promise(((s,i)=>{t=s,e=i}));return s.resolve=t,s.reject=e,s},i=t=>null==t?"":String(t),n=/###/g,r=t=>t&&t.includes("###")?t.replace(n,"."):t,o=t=>!t||e(t),a=(t,s,i)=>{const n=e(s)?s.split("."):s;let a=0;for(;a<n.length-1;){if(o(t))return{};const e=r(n[a]);!t[e]&&i&&(t[e]=new i),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++a}return o(t)?{}:{obj:t,k:r(n[a])}},h=(t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);if(void 0!==i||1===e.length)return void(i[n]=s);let r=e[e.length-1],o=e.slice(0,e.length-1),h=a(t,o,Object);for(;void 0===h.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),h=a(t,o,Object),h?.obj&&void 0!==h.obj[`${h.k}.${r}`]&&(h.obj=void 0);h.obj[`${h.k}.${r}`]=s},l=(t,e)=>{const{obj:s,k:i}=a(t,e);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},c=(t,s,i)=>{for(const n in s)"__proto__"!==n&&"constructor"!==n&&(Object.prototype.hasOwnProperty.call(t,n)?e(t[n])||t[n]instanceof String||e(s[n])||s[n]instanceof String?i&&(t[n]=s[n]):c(t[n],s[n],i):t[n]=s[n]);return t},u=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},p=t=>e(t)?t.replace(/[&<>"'\/]/g,(t=>d[t])):t,f=[" ",",","?","!",";"],g=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}(20),y=(t,e,s=".")=>{if(!t)return;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return;return t[e]}const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||"object"!=typeof n)return;let e,r="";for(let o=t;o<i.length;++o)if(o!==t&&(r+=s),r+=i[o],e=n[r],void 0!==e){if(["string","number","boolean"].includes(typeof e)&&o<i.length-1)continue;t+=o-t+1;break}n=e}return n},m=t=>t?.replace(/_/g,"-"),b={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class v{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:",this.logger=t||b,this.options=e,this.debug=e.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,i,n){return n&&!this.debug?null:(t=t.map((t=>e(t)?t.replace(/[\r\n\x00-\x1F\x7F]/g," "):t)),e(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new v(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new v(this.logger,t)}}var $=new v;class _{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}once(t,e){const s=(...i)=>{e(...i),this.off(t,s)};return this.on(t,s),this}emit(t,...e){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,s])=>{for(let i=0;i<s;i++)t(...e)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([s,i])=>{for(let n=0;n<i;n++)s(t,...e)}))}}class w extends _{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,s,i,n={}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,s],i&&(Array.isArray(i)?a.push(...i):e(i)&&r?a.push(...i.split(r)):a.push(i)));const h=l(this.data,a);return h||s||i||!t.includes(".")||(t=a[0],s=a[1],i=a.slice(2).join(".")),!h&&o&&e(i)?y(this.data?.[t]?.[s],i,r):h}addResource(t,e,s,i,n={silent:!1}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let o=[t,e];s&&(o=o.concat(r?s.split(r):s)),t.includes(".")&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),h(this.data,o,i),n.silent||this.emit("added",t,e,s,i)}addResources(t,s,i,n={silent:!1}){for(const n in i)(e(i[n])||Array.isArray(i[n]))&&this.addResource(t,s,n,i[n],{silent:!0});n.silent||this.emit("added",t,s,i)}addResourceBundle(t,e,s,i,n,r={silent:!1,skipCopy:!1}){let o=[t,e];t.includes(".")&&(o=t.split("."),i=s,s=e,e=o[1]),this.addNamespaces(e);let a=l(this.data,o)||{};r.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?c(a,s,n):a={...a,...s},h(this.data,o,a),r.silent||this.emit("added",t,e,s)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var k={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){return t.forEach((t=>{e=this.processors[t]?.process(e,s,i,n)??e})),e}};const x=Symbol("i18next/PATH_KEY");function S(t,e){const{[x]:s}=t(function(){const t=[],e=Object.create(null);let s;return e.get=(i,n)=>(s?.revoke?.(),n===x?t:(t.push(n),s=Proxy.revocable(i,e),s.proxy)),Proxy.revocable(Object.create(null),e).proxy}()),i=e?.keySeparator??".",n=e?.nsSeparator??":",r="strict"===e?.enableSelector;if(s.length>1&&n){const t=e?.ns,o=r?Array.isArray(t)?t:t?[t]:null:Array.isArray(t)?t:null;if(o&&(r?o:o.length>1?o.slice(1):[]).includes(s[0]))return`${s[0]}${n}${s.slice(1).join(i)}`}return s.join(i)}const j=t=>!e(t)&&"boolean"!=typeof t&&"number"!=typeof t;class O extends _{constructor(t,e={}){var s,i;super(),s=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{s[t]&&(i[t]=s[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,e={interpolation:{}}){const s={...e};if(null==t)return!1;const i=this.resolve(t,s);if(void 0===i?.res)return!1;const n=j(i.res);return!1!==s.returnObjects||!n}extractFromKey(t,s){let i=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let r=s.ns||this.options.defaultNS||[];const o=i&&t.includes(i),a=!(this.options.userDefinedKeySeparator||s.keySeparator||this.options.userDefinedNsSeparator||s.nsSeparator||((t,e,s)=>{e=e||"",s=s||"";const i=f.filter((t=>!e.includes(t)&&!s.includes(t)));if(0===i.length)return!0;const n=g.getRegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(s);e>0&&!n.test(t.substring(0,e))&&(r=!0)}return r})(t,i,n));if(o&&!a){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:e(r)?[r]:r};const o=t.split(i);(i!==n||i===n&&this.options.ns.includes(o[0]))&&(r=o.shift()),t=o.join(n)}return{key:t,namespaces:e(r)?[r]:r}}translate(t,s,i){let n="object"==typeof s?{...s}:s;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==t)return"";"function"==typeof t&&(t=S(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?S(t,{...this.options,...n}):String(t)));const r=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:h}=this.extractFromKey(t[t.length-1],n),l=h[h.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?r?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;const p=this.resolve(t,n);let f=p?.res;const g=p?.usedKey||a,y=p?.exactUsedKey||a,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!e(n.count),$=O.hasDefaultValue(n),_=v?this.pluralResolver.getSuffix(u,n.count,n):"",w=n.ordinal&&v?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",k=v&&!n.ordinal&&0===n.count,x=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${w}`]||n.defaultValue;let P=f;b&&!f&&$&&(P=x);const N=j(P),D=Object.prototype.toString.apply(P);if(!(b&&P&&N)||["[object Number]","[object Function]","[object RegExp]"].includes(D)||e(m)&&Array.isArray(P))if(b&&e(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,i));else{let e=!1,s=!1;!this.isValidLookup(f)&&$&&(e=!0,f=x),this.isValidLookup(f)||(s=!0,f=a);const r=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:f,h=$&&x!==f&&this.options.updateMissing;if(s||e||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,v&&!h?`${a}${this.pluralResolver.getSuffix(u,n.count,n)}`:a,h?x:f),o){const t=this.resolve(a,{...n,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&e&&e[0])for(let s=0;s<e.length;s++)t.push(e[s]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(n.lng||this.language):t.push(n.lng||this.language);const s=(t,e,s)=>{const i=$&&s!==f?s:r;this.options.missingKeyHandler?this.options.missingKeyHandler(t,l,e,i,h,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,l,e,i,h,n),this.emit("missingKey",t,l,e,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!e.includes(`${this.options.pluralSeparator}zero`)&&e.push(`${this.options.pluralSeparator}zero`),e.forEach((e=>{s([t],a+e,n[`defaultValue${e}`]||x)}))})):s(t,a,x))}f=this.extendTranslation(f,t,n,p,i),s&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(s||e)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,e?f:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,P,{...n,ns:h}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=t,p.usedParams=this.getUsedParamsDetails(n),p):t}if(o){const t=Array.isArray(P),e=t?[]:{},s=t?y:g;for(const t in P)if(Object.prototype.hasOwnProperty.call(P,t)){const i=`${s}${o}${t}`;e[t]=this.translate(i,$&&!f?{...n,defaultValue:j(x)?x[t]:void 0,joinArrays:!1,ns:h}:{...n,joinArrays:!1,ns:h}),e[t]===i&&(e[t]=P[t])}f=e}}return r?(p.res=f,p.usedParams=this.getUsedParamsDetails(n),p):f}extendTranslation(t,s,i,n,r){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const o=e(t)&&(void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let h=i.replace&&!e(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||n.usedLng,i),o){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(t=this.interpolator.nest(t,((...t)=>r?.[0]!==t[0]||i.context?this.translate(...t,s):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${s[0]}`),null)),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,a=e(o)?[o]:o;return null!=t&&a?.length&&!1!==i.applyPostProcessor&&(t=k.handle(a,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,s={}){let i,n,r,o,a;return e(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?S(t,{...this.options,...s}):t))),t.forEach((t=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(t,s),l=h.key;n=l;let c=h.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!e(s.count),d=u&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(e(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(i)||(a=t,this.checkedLoadedFor[`${f[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(this.checkedLoadedFor[`${f[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((e=>{if(this.isValidLookup(i))return;o=e;const n=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,l,e,t,s);else{let t;u&&(t=this.pluralResolver.getSuffix(e,s.count,s));const i=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(s.ordinal&&t.startsWith(r)&&n.push(l+t.replace(r,this.options.pluralSeparator)),n.push(l+t),d&&n.push(l+i)),p){const e=`${l}${this.options.contextSeparator||"_"}${s.context}`;n.push(e),u&&(s.ordinal&&t.startsWith(r)&&n.push(e+t.replace(r,this.options.pluralSeparator)),n.push(e+t),d&&n.push(e+i))}}let a;for(;a=n.pop();)this.isValidLookup(i)||(r=a,i=this.getResource(e,t,a,s))})))}))})),{res:i,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,e,s,i):this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!e(t.replace);let n=i?t.replace:t;if(i&&void 0!==t.count&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const t of s)delete n[t]}return n}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&e.startsWith("defaultValue")&&void 0!==t[e])return!0;return!1}}class P{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(t){if(!(t=m(t))||!t.includes("-"))return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=m(t))||!t.includes("-"))return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(e(t)&&t.includes("-")){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(s)||(e=s)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const s=this.getScriptPartFromCode(t);if(this.isSupportedCode(s))return e=s;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>!(t!==i&&(!t.includes("-")&&!i.includes("-")||(!t.includes("-")||i.includes("-")||t.slice(0,t.indexOf("-"))!==i)&&!(t.startsWith(i)&&i.length>1)))))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,s){if(!t)return[];if("function"==typeof t&&(t=t(s)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.getFallbackCodes((!1===s?[]:s)||this.options.fallbackLng||[],t),n=[],r=t=>{t&&(this.isSupportedCode(t)?n.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return e(t)&&(t.includes("-")||t.includes("_"))?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(t))):e(t)&&r(this.formatLanguageCode(t)),i.forEach((t=>{n.includes(t)||r(this.formatLanguageCode(t))})),n}}const N={zero:0,one:1,two:2,few:3,many:4,other:5},D={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class L{constructor(t,e={}){this.languageUtils=t,this.options=e,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const s=m("dev"===t?"en":t),i=e.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),D;if(!t.match(/-|_/))return D;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}return this.pluralRulesCache[n]=r,r}needsPlural(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,s={}){return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?s.resolvedOptions().pluralCategories.sort(((t,e)=>N[t]-N[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,e,s={}){const i=this.getRule(t,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,s))}}const R=(t,s,i,n=".",r=!0)=>{let o=((t,e,s)=>{const i=l(t,s);return void 0!==i?i:l(e,s)})(t,s,i);return!o&&r&&e(i)&&(o=y(t,i,n),void 0===o&&(o=y(s,i,n))),o},z=t=>t.replace(/\$/g,"$$$$");class A{constructor(t={}){this.logger=$.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=void 0!==e?e:p,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=n?u(n):r||"{{",this.suffix=o?u(o):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":c?u(c):"-",this.unescapeSuffix=this.unescapePrefix?"":l?u(l):"",this.nestingPrefix=d?u(d):f||u("$t("),this.nestingSuffix=g?u(g):y||u(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=b||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t?.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,s,n,r){let o,a,h;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=t=>{if(!t.includes(this.formatSeparator)){const e=R(s,l,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,void 0,n,{...r,...s,interpolationkey:t}):e}const e=t.split(this.formatSeparator),i=e.shift().trim(),o=e.join(this.formatSeparator).trim();return this.format(R(s,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...s,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&"string"==typeof t&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>z(t)},{regex:this.regexp,safeValue:t=>z(this.escapeValue?this.escape(t):t)}].forEach((s=>{for(h=0;o=s.regex.exec(t);){const n=o[1].trim();if(a=c(n),void 0===a)if("function"==typeof u){const s=u(t,o,r);a=e(s)?s:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),a=""}else e(a)||this.useRawValueToEscape||(a=i(a));const l=s.safeValue(a);if(t=t.replace(o[0],l),d?(s.regex.lastIndex+=a.length,s.regex.lastIndex-=o[0].length):s.regex.lastIndex=0,h++,h>=this.maxReplaces)break}})),t}nest(t,s,n={}){let r,o,a;const h=(t,e)=>{const s=this.nestingOptionsSeparator;if(!t.includes(s))return t;const i=t.split(new RegExp(`${u(s)}[ ]*{`));let n=`{${i[1]}`;t=i[0],n=this.interpolate(n,a);const r=n.match(/'/g),o=n.match(/"/g);((r?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(n=n.replace(/'/g,'"'));try{a=JSON.parse(n),e&&(a={...e,...a})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${s}${n}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,t};for(;r=this.nestingRegexp.exec(t);){let l=[];a={...n},a=a.replace&&!e(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(l=r[1].slice(c).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),r[1]=r[1].slice(0,c)),o=s(h.call(this,r[1].trim(),a),a),o&&r[0]===t&&!e(o))return o;e(o)||(o=i(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:r[1].trim()})),o.trim())),t=t.replace(r[0],o),this.regexp.lastIndex=0}return t}}const C=t=>{const e={};return(s,i,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const o=i+JSON.stringify(r);let a=e[o];return a||(a=t(m(i),n),e[o]=a),a(s)}},I=t=>(e,s,i)=>t(m(s),i)(e);class E{constructor(t={}){this.logger=$.create("formatter"),this.options=t,this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const s=e.cacheInBuiltFormats?C:I;this.formats={number:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:s(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:s(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:s(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=C(e)}format(t,e,s,i={}){if(!e)return t;if(null==t)return t;const n=e.split(this.formatSeparator),r=[];for(let t=0;t<n.length;t++){let e=n[t];for(;e.indexOf("(")>-1&&!e.includes(")")&&t+1<n.length;)e=`${e}${this.formatSeparator}${n[++t]}`;r.push(e)}return r.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=(t=>{let e=t.toLowerCase().trim();const s={};if(t.includes("(")){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].slice(0,-1);"currency"!==e||n.includes(":")?"relativetime"!==e||n.includes(":")?n.split(";").forEach((t=>{if(t){const[e,...i]=t.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,""),r=e.trim();s[r]||(s[r]=n),"false"===n&&(s[r]=!1),"true"===n&&(s[r]=!0),isNaN(n)||(s[r]=parseInt(n,10))}})):s.range||(s.range=n.trim()):s.currency||(s.currency=n.trim())}return{formatName:e,formatOptions:s}})(e);if(this.formats[n]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};e=this.formats[n](t,o.locale||o.lng||i.locale||i.lng||s,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${n}`),t}),t)}}class B extends _{constructor(t,e,s,i={}){super(),this.backend=t,this.store=e,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(t,e,s,i){const n={},r={},o={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const o=`${t}|${e}`;!s.reload&&this.store.hasResourceBundle(t,e)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,i=!1,void 0===r[o]&&(r[o]=!0),void 0===n[o]&&(n[o]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(o[t]=!0)})),(Object.keys(n).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|"),n=i[0],r=i[1];e&&this.emit("failedLoading",n,r,e),!e&&s&&this.store.addResourceBundle(n,r,s,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&s&&(this.state[t]=0);const o={};this.queue.forEach((s=>{((t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);i[n]=i[n]||[],i[n].push(s)})(s.loaded,[n],r),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(s,t),e&&s.errors.push(e),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((t=>{o[t]||(o[t]={});const e=s.loaded[t];e.length&&e.forEach((e=>{void 0===o[t][e]&&(o[t][e]=!0)}))})),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((t=>!t.done))}read(t,e,s,i=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}o&&a&&i<this.maxRetries?setTimeout((()=>{this.read(t,e,s,i+1,2*n,r)}),n):r(o,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(t,e,o);try{const s=a(t,e);s&&"function"==typeof s.then?s.then((t=>o(null,t))).catch(o):o(null,s)}catch(t){o(t)}}prepareLoading(t,s,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(s)&&(s=[s]);const r=this.queueLoad(t,s,i,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:!0},s)}loadOne(t,e=""){const s=t.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,((s,r)=>{s&&this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s),!s&&r&&this.logger.log(`${e}loaded namespace ${n} for language ${i}`,r),this.loaded(t,s,r)}))}saveMissing(t,e,s,i,n,r={},o=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(e)){if(null!=s&&""!==s){if(this.backend?.create){const a={...r,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let n;n=5===h.length?h(t,e,s,i,a):h(t,e,s,i),n&&"function"==typeof n.then?n.then((t=>o(null,t))).catch(o):o(null,n)}catch(t){o(t)}else h(t,e,s,i,o,a)}t&&t[0]&&this.store.addResource(t[0],e,s,i)}}else this.logger.warn(`did not save key "${s}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const K=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let s={};if("object"==typeof t[1]&&(s=t[1]),e(t[1])&&(s.defaultValue=t[1]),e(t[2])&&(s.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{s[t]=e[t]}))}return s},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),T=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),F=()=>{};class V extends _{constructor(t={},e){var s;if(super(),this.options=T(t),this.services={},this.logger=$,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((t=>{"function"==typeof s[t]&&(s[t]=s[t].bind(s))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(e(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const n=K();this.options={...n,...this.options,...T(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const r=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;$.init(this.modules.logger?r(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:E;const e=new P(this.options);this.store=new w(this.options.resources,this.options);const s=this.services;s.logger=$,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new L(e,{prepend:this.options.pluralSeparator}),t&&(s.formatter=r(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new A(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new B(r(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=F),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...e)=>this.store[t](...e)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...e)=>(this.store[t](...e),this)}));const o=s(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(e),i(t,e)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),o}loadResources(t,s=F){let i=s;const n=e(t)?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const t=[],e=e=>{e&&"cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&(t.includes(e)||t.push(e))}))};n?e(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>e(t))),this.options.preload?.forEach?.((t=>e(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(t)}))}else i(null)}reloadResources(t,e,i){const n=s();return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),i||(i=F),this.services.backendConnector.reload(t,e,(t=>{n.resolve(),i(t)})),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&k.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!["cimode","dev"].includes(t)){for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!["cimode","dev"].includes(e)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}this.resolvedLanguage||this.languages.includes(t)||!this.store.hasLanguageSomeTranslations(t)||(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const n=s();this.emit("languageChanging",t);const r=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(e,s)=>{s?this.isLanguageChangingTo===t&&(r(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,n.resolve(((...t)=>this.t(...t))),i&&i(e,((...t)=>this.t(...t)))},a=s=>{t||s||!this.services.languageDetector||(s=[]);const i=e(s)?s:s&&s[0],n=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(e(s)?[s]:s);n&&(this.language||r(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),n}getFixedT(t,s,i,n){const r=n?.scopeNs,o=(t,e,...s)=>{let n;n="object"!=typeof e?this.options.overloadTranslationOptionHandler([t,e].concat(s)):{...e},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs;const a=null!=n.ns;n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||i||o.keyPrefix);const h={...this.options,...n};Array.isArray(r)&&!a&&(h.ns=r),"function"==typeof n.keyPrefix&&(n.keyPrefix=S(n.keyPrefix,h));const l=this.options.keySeparator||".";let c;return n.keyPrefix&&Array.isArray(t)?c=t.map((t=>("function"==typeof t&&(t=S(t,h)),`${n.keyPrefix}${l}${t}`))):("function"==typeof t&&(t=S(t,h)),c=n.keyPrefix?`${n.keyPrefix}${l}${t}`:t),this.t(c,n)};return e(t)?o.lng=t:o.lngs=t,o.ns=s,o.keyPrefix=i,o}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const r=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return-1===s||0===s||2===s};if(e.precheck){const t=e.precheck(this,r);if(void 0!==t)return t}return!(!this.hasResourceBundle(s,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(s,t)||i&&!r(n,t)))}loadNamespaces(t,i){const n=s();return this.options.ns?(e(t)&&(t=[t]),t.forEach((t=>{this.options.ns.includes(t)||this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}loadLanguages(t,i){const n=s();e(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter((t=>!r.includes(t)&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=r.concat(o),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=this.services?.languageUtils||new P(K());return t.toLowerCase().indexOf("-latn")>1?"ltr":["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","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(e.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){const s=new V(t,e);return s.createInstance=V.createInstance,s}cloneInstance(t={},e=F){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},n=new V(i);if(void 0===t.debug&&void 0===t.prefix||(n.logger=n.logger.clone(t)),["store","services","language"].forEach((t=>{n[t]=this[t]})),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const t=Object.keys(this.store.data).reduce(((t,e)=>(t[e]={...this.store.data[e]},t[e]=Object.keys(t[e]).reduce(((s,i)=>(s[i]={...t[e][i]},s)),t[e]),t)),{});n.store=new w(t,i),n.services.resourceStore=n.store}if(t.interpolation){const e={...K().interpolation,...this.options.interpolation,...t.interpolation},s={...i,interpolation:e};n.services.interpolator=new A(s)}return n.translator=new O(n.services,i),n.translator.on("*",((t,...e)=>{n.emit(t,...e)})),n.init(i,e),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const W=V.createInstance();var M,H={login_dialog:{heading:"Drucke mit ezeep Blue",description:"Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",action:"Anmelden"},no_document_dialog:{heading:"Keine Datei ausgewählt",description:"Wähle zunächst eine Datei zum Drucken aus.",action:"OK"},printer_selection:{loading:"Lade meine Drucker…",print:"Drucken",printer:"Drucker",print_processing:"Drucken…",print_success:"Erfolgreich gedruckt.",print_success_sub:"Dein Dokument ist auf dem Weg zum Drucker.",print_failed:"Druck fehlgeschlagen",print_timeout:"Das dauert länger als erwartet. Der Auftrag wird möglicherweise noch auf dem Drucker fertiggestellt.",not_supported:"Der ausgewählte Dateityp wird nicht unterstützt.",color:"Farbe",orientation:"Ausrichtung",size:"Papierformat",duplex:"Beidseitig",quality:"Druckqualität",select_printer:"Wähle einen Drucker",select_color:"Wähle Farbe/Graustufen",select_size:"Wähle Papierformat",select_orientation:"Wähle Ausrichtung",select_quality:"Wähle Druckqualität",select_duplex:"Wähle Beidseitig",color_color:"Farbe",color_grayscale:"Graustufen",orientation_portrait:"Hochformat",orientation_landscape:"Querformat",unknown_location:"Unbekannter Standort",no_printers:"Keine Drucker gefunden.",prepare_upload:"Vorbereiten…",uploading:"Hochladen…",duplex_none:"Keine",copies:"Kopien",duplex_long:"auf der langen Seite umdrehen",duplex_short:"auf der kurzen Seite umdrehen",pull_print_success:"Bereit zum Auslösen.",width:"Breite",length:"Länge",trays:"Papierfach",select_trays:"Wähle Papierfach",page_ranges:"Druckbereich",paper_ranges:"Papier-Ranges",files:"Dateien",file_count_one:"{{count}} Datei",file_count_other:"{{count}} Dateien"},button_actions:{login:"Anmelden",print:"Drucken",cancel:"Abbrechen",close:"Schließen",retry:"Wiederholen",select_printer:"Wähle Drucker"},upload:{description:"Ziehe Dateien hier in den Browser ",meta_leading:"oder",heading:"Jetzt drucken",dropzone_title:"Dateien hier ablegen",browse:"vom Gerät auswählen",file_type_fallback:"DATEI",meta_multiple:"— mehrere Dateien möglich",add_more:"Hinzufügen",files_ready_one:"{{count}} Datei bereit",files_ready_other:"{{count}} Dateien bereit",continue:"Weiter zu Druckoptionen"},user_menu:{theme:"Farbschema",appearance:"Darstellung",system:"System",light:"Hell",dark:"Dunkel",account:"Konto verwalten",help:"Hilfe & Unterstützung",logout:"Ausloggen"}},U={login_dialog:{heading:"Print with ezeep Blue",description:"Sign in with your ezeep Blue account to print.",action:"Sign in"},no_document_dialog:{heading:"No file selected",description:"Select a file first to print.",action:"OK"},printer_selection:{loading:"Loading My Printers…",print_processing:"Printing…",print_success:"Successfully printed.",print_success_sub:"Your document is on its way to the printer.",pull_print_success:"Ready to be released.",print_failed:"Print failed",print_timeout:"This is taking longer than expected. The job may still finish on the printer.",not_supported:"The selected file type is not supported.",prepare_upload:"Preparing…",uploading:"Uploading…",print:"Print",printer:"Printer",color:"Color",orientation:"Orientation",size:"Paper Size",duplex:"Double-sided",duplex_none:"None",duplex_long:"flip on long side",duplex_short:"flip on short side",quality:"Print Quality",select_printer:"Select a printer",select_color:"Select Color/Grayscale",select_orientation:"Select Orientation",select_size:"Select Paper Size",select_quality:"Select Print Quality",select_duplex:"Select Double-sided",color_color:"Color",color_grayscale:"Grayscale",orientation_portrait:"Portrait",orientation_landscape:"Landscape",unknown_location:"Unknown location",no_printers:"No printers found.",copies:"Copies",width:"Width",length:"Length",trays:"Tray",select_trays:"Select Tray",page_ranges:"Page Ranges",paper_ranges:"Paper Ranges",files:"files",file_count_one:"{{count}} file",file_count_other:"{{count}} files"},button_actions:{login:"Sign In",print:"Print",cancel:"Cancel",close:"Close",retry:"Retry",select_printer:"Select Printer"},upload:{description:"Drop files here into the browser ",meta_leading:"or",heading:"Print Now",dropzone_title:"Drop files here",browse:"select from device",file_type_fallback:"FILE",meta_multiple:"— multiple files supported",add_more:"Add",files_ready_one:"{{count}} file ready",files_ready_other:"{{count}} files ready",continue:"Continue to print options"},user_menu:{theme:"Color theme",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",account:"Manage Account",help:"Help & Support",logout:"Logout"}};!function(t){t[t.Success=0]="Success",t[t.Processing=1246]="Processing",t[t.Rendering=129]="Rendering",t[t.Failed=3011]="Failed",t[t.Error=2]="Error"}(M||(M={}));const q=[M.Processing,M.Rendering],J=[M.Failed,M.Error],G=[412,500,503,1048579],Y=412,Q=804,Z=201,X=256,tt=2e3,et=Math.ceil(300),st=3e4,it=1800;function nt(e){const s=()=>t(e);return W.on("languageChanged",s),()=>W.off("languageChanged",s)}function rt(t){return Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&")}function ot(t){const e={en:{translation:U},de:{translation:H}};W.init(""!=t?{resources:e,lng:t,nsSeparator:!1,fallbackLng:"en"}:{resources:e,lng:navigator.language,nsSeparator:!1,fallbackLng:"en"})}const at=async({fn:t,validate:e,interval:s,maxAttempts:i})=>{let n=0;const r=async(o,a)=>{const h=await t();return n++,e(h)?o(h):i&&n===i?a(new Error("Exceeded max attempts.")):void setTimeout(r,s,o,a)};return new Promise(r)},ht=t=>{const e={};return Object.keys(t).forEach((s=>{""!==t[s]&&(e[s]=t[s])})),e},lt=t=>(256!=t.paperid&&(delete t.paperlength,delete t.paperwidth),t.paperlength&&t.paperwidth&&(t.paperlength=10*+t.paperlength,t.paperwidth=10*+t.paperwidth),t),ct=t=>t.replace(/,/g,";"),ut=t=>{if(!t)return!0;if(!/^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/.test(t))return!1;const e=t.split(",");for(let t=0;t<e.length;t++){const s=e[t].trim();if(s.includes("-")){const[t,e]=s.split("-"),i=parseInt(t),n=parseInt(e);if(isNaN(i)||isNaN(n)||i>n||i<=0)return!1}else{const t=parseInt(s);if(isNaN(t)||t<=0)return!1}}return!0};export{Z as B,J as F,G as H,M as J,et as M,q as P,it as T,ot as a,Q as b,tt as c,st as d,Y as e,ct as f,X as g,rt as h,W as i,lt as m,at as p,ht as r,nt as s,ut as v}
|
|
1
|
+
import{forceUpdate as t}from"@stencil/core/internal/client";const e=t=>"string"==typeof t,s=()=>{let t,e;const s=new Promise(((s,i)=>{t=s,e=i}));return s.resolve=t,s.reject=e,s},i=t=>null==t?"":String(t),n=/###/g,r=t=>t&&t.includes("###")?t.replace(n,"."):t,o=t=>!t||e(t),a=(t,s,i)=>{const n=e(s)?s.split("."):s;let a=0;for(;a<n.length-1;){if(o(t))return{};const e=r(n[a]);!t[e]&&i&&(t[e]=new i),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++a}return o(t)?{}:{obj:t,k:r(n[a])}},h=(t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);if(void 0!==i||1===e.length)return void(i[n]=s);let r=e[e.length-1],o=e.slice(0,e.length-1),h=a(t,o,Object);for(;void 0===h.obj&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),h=a(t,o,Object),h?.obj&&void 0!==h.obj[`${h.k}.${r}`]&&(h.obj=void 0);h.obj[`${h.k}.${r}`]=s},l=(t,e)=>{const{obj:s,k:i}=a(t,e);if(s&&Object.prototype.hasOwnProperty.call(s,i))return s[i]},c=(t,s,i)=>{for(const n in s)"__proto__"!==n&&"constructor"!==n&&(Object.prototype.hasOwnProperty.call(t,n)?e(t[n])||t[n]instanceof String||e(s[n])||s[n]instanceof String?i&&(t[n]=s[n]):c(t[n],s[n],i):t[n]=s[n]);return t},u=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),d={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},p=t=>e(t)?t.replace(/[&<>"'\/]/g,(t=>d[t])):t,f=[" ",",","?","!",";"],g=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const s=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,s),this.regExpQueue.push(t),s}}(20),y=(t,e,s=".")=>{if(!t)return;if(t[e]){if(!Object.prototype.hasOwnProperty.call(t,e))return;return t[e]}const i=e.split(s);let n=t;for(let t=0;t<i.length;){if(!n||"object"!=typeof n)return;let e,r="";for(let o=t;o<i.length;++o)if(o!==t&&(r+=s),r+=i[o],e=n[r],void 0!==e){if(["string","number","boolean"].includes(typeof e)&&o<i.length-1)continue;t+=o-t+1;break}n=e}return n},m=t=>t?.replace(/_/g,"-"),b={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class v{constructor(t,e={}){this.init(t,e)}init(t,e={}){this.prefix=e.prefix||"i18next:",this.logger=t||b,this.options=e,this.debug=e.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,i,n){return n&&!this.debug?null:(t=t.map((t=>e(t)?t.replace(/[\r\n\x00-\x1F\x7F]/g," "):t)),e(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new v(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new v(this.logger,t)}}var $=new v;class _{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const s=this.observers[t].get(e)||0;this.observers[t].set(e,s+1)})),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}once(t,e){const s=(...i)=>{e(...i),this.off(t,s)};return this.on(t,s),this}emit(t,...e){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,s])=>{for(let i=0;i<s;i++)t(...e)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([s,i])=>{for(let n=0;n<i;n++)s(t,...e)}))}}class w extends _{constructor(t,e={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.includes(t)||this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,s,i,n={}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.includes(".")?a=t.split("."):(a=[t,s],i&&(Array.isArray(i)?a.push(...i):e(i)&&r?a.push(...i.split(r)):a.push(i)));const h=l(this.data,a);return h||s||i||!t.includes(".")||(t=a[0],s=a[1],i=a.slice(2).join(".")),!h&&o&&e(i)?y(this.data?.[t]?.[s],i,r):h}addResource(t,e,s,i,n={silent:!1}){const r=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator;let o=[t,e];s&&(o=o.concat(r?s.split(r):s)),t.includes(".")&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),h(this.data,o,i),n.silent||this.emit("added",t,e,s,i)}addResources(t,s,i,n={silent:!1}){for(const n in i)(e(i[n])||Array.isArray(i[n]))&&this.addResource(t,s,n,i[n],{silent:!0});n.silent||this.emit("added",t,s,i)}addResourceBundle(t,e,s,i,n,r={silent:!1,skipCopy:!1}){let o=[t,e];t.includes(".")&&(o=t.split("."),i=s,s=e,e=o[1]),this.addNamespaces(e);let a=l(this.data,o)||{};r.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?c(a,s,n):a={...a,...s},h(this.data,o,a),r.silent||this.emit("added",t,e,s)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find((t=>e[t]&&Object.keys(e[t]).length>0))}toJSON(){return this.data}}var x={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,s,i,n){return t.forEach((t=>{e=this.processors[t]?.process(e,s,i,n)??e})),e}};const k=Symbol("i18next/PATH_KEY");function S(t,e){const{[k]:s}=t(function(){const t=[],e=Object.create(null);let s;return e.get=(i,n)=>(s?.revoke?.(),n===k?t:(t.push(n),s=Proxy.revocable(i,e),s.proxy)),Proxy.revocable(Object.create(null),e).proxy}()),i=e?.keySeparator??".",n=e?.nsSeparator??":",r="strict"===e?.enableSelector;if(s.length>1&&n){const t=e?.ns,o=r?Array.isArray(t)?t:t?[t]:null:Array.isArray(t)?t:null;if(o&&(r?o:o.length>1?o.slice(1):[]).includes(s[0]))return`${s[0]}${n}${s.slice(1).join(i)}`}return s.join(i)}const j=t=>!e(t)&&"boolean"!=typeof t&&"number"!=typeof t;class O extends _{constructor(t,e={}){var s,i;super(),s=t,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{s[t]&&(i[t]=s[t])})),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,e={interpolation:{}}){const s={...e};if(null==t)return!1;const i=this.resolve(t,s);if(void 0===i?.res)return!1;const n=j(i.res);return!1!==s.returnObjects||!n}extractFromKey(t,s){let i=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===i&&(i=":");const n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator;let r=s.ns||this.options.defaultNS||[];const o=i&&t.includes(i),a=!(this.options.userDefinedKeySeparator||s.keySeparator||this.options.userDefinedNsSeparator||s.nsSeparator||((t,e,s)=>{e=e||"",s=s||"";const i=f.filter((t=>!e.includes(t)&&!s.includes(t)));if(0===i.length)return!0;const n=g.getRegExp(`(${i.map((t=>"?"===t?"\\?":t)).join("|")})`);let r=!n.test(t);if(!r){const e=t.indexOf(s);e>0&&!n.test(t.substring(0,e))&&(r=!0)}return r})(t,i,n));if(o&&!a){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:e(r)?[r]:r};const o=t.split(i);(i!==n||i===n&&this.options.ns.includes(o[0]))&&(r=o.shift()),t=o.join(n)}return{key:t,namespaces:e(r)?[r]:r}}translate(t,s,i){let n="object"==typeof s?{...s}:s;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==t)return"";"function"==typeof t&&(t=S(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?S(t,{...this.options,...n}):String(t)));const r=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:h}=this.extractFromKey(t[t.length-1],n),l=h[h.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return d?r?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;const p=this.resolve(t,n);let f=p?.res;const g=p?.usedKey||a,y=p?.exactUsedKey||a,m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==n.count&&!e(n.count),$=O.hasDefaultValue(n),_=v?this.pluralResolver.getSuffix(u,n.count,n):"",w=n.ordinal&&v?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",x=v&&!n.ordinal&&0===n.count,k=x&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${w}`]||n.defaultValue;let P=f;b&&!f&&$&&(P=k);const D=j(P),N=Object.prototype.toString.apply(P);if(!(b&&P&&D)||["[object Number]","[object Function]","[object RegExp]"].includes(N)||e(m)&&Array.isArray(P))if(b&&e(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,i));else{let e=!1,s=!1;!this.isValidLookup(f)&&$&&(e=!0,f=k),this.isValidLookup(f)||(s=!0,f=a);const r=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:f,h=$&&k!==f&&this.options.updateMissing;if(s||e||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,v&&!h?`${a}${this.pluralResolver.getSuffix(u,n.count,n)}`:a,h?k:f),o){const t=this.resolve(a,{...n,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const e=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&e&&e[0])for(let s=0;s<e.length;s++)t.push(e[s]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(n.lng||this.language):t.push(n.lng||this.language);const s=(t,e,s)=>{const i=$&&s!==f?s:r;this.options.missingKeyHandler?this.options.missingKeyHandler(t,l,e,i,h,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,l,e,i,h,n),this.emit("missingKey",t,l,e,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?t.forEach((t=>{const e=this.pluralResolver.getSuffixes(t,n);x&&n[`defaultValue${this.options.pluralSeparator}zero`]&&!e.includes(`${this.options.pluralSeparator}zero`)&&e.push(`${this.options.pluralSeparator}zero`),e.forEach((e=>{s([t],a+e,n[`defaultValue${e}`]||k)}))})):s(t,a,k))}f=this.extendTranslation(f,t,n,p,i),s&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}${c}${a}`),(s||e)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,e?f:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,P,{...n,ns:h}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(p.res=t,p.usedParams=this.getUsedParamsDetails(n),p):t}if(o){const t=Array.isArray(P),e=t?[]:{},s=t?y:g;for(const t in P)if(Object.prototype.hasOwnProperty.call(P,t)){const i=`${s}${o}${t}`;e[t]=this.translate(i,$&&!f?{...n,defaultValue:j(k)?k[t]:void 0,joinArrays:!1,ns:h}:{...n,joinArrays:!1,ns:h}),e[t]===i&&(e[t]=P[t])}f=e}}return r?(p.res=f,p.usedParams=this.getUsedParamsDetails(n),p):f}extendTranslation(t,s,i,n,r){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const o=e(t)&&(void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const e=t.match(this.interpolator.nestingRegexp);a=e&&e.length}let h=i.replace&&!e(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||n.usedLng,i),o){const e=t.match(this.interpolator.nestingRegexp);a<(e&&e.length)&&(i.nest=!1)}!i.lng&&n&&n.res&&(i.lng=this.language||n.usedLng),!1!==i.nest&&(t=this.interpolator.nest(t,((...t)=>r?.[0]!==t[0]||i.context?this.translate(...t,s):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${s[0]}`),null)),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,a=e(o)?[o]:o;return null!=t&&a?.length&&!1!==i.applyPostProcessor&&(t=x.handle(a,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,s={}){let i,n,r,o,a;return e(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?S(t,{...this.options,...s}):t))),t.forEach((t=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(t,s),l=h.key;n=l;let c=h.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!e(s.count),d=u&&!s.ordinal&&0===s.count,p=void 0!==s.context&&(e(s.context)||"number"==typeof s.context)&&""!==s.context,f=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(i)||(a=t,this.checkedLoadedFor[`${f[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(this.checkedLoadedFor[`${f[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((e=>{if(this.isValidLookup(i))return;o=e;const n=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(n,l,e,t,s);else{let t;u&&(t=this.pluralResolver.getSuffix(e,s.count,s));const i=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(s.ordinal&&t.startsWith(r)&&n.push(l+t.replace(r,this.options.pluralSeparator)),n.push(l+t),d&&n.push(l+i)),p){const e=`${l}${this.options.contextSeparator||"_"}${s.context}`;n.push(e),u&&(s.ordinal&&t.startsWith(r)&&n.push(e+t.replace(r,this.options.pluralSeparator)),n.push(e+t),d&&n.push(e+i))}}let a;for(;a=n.pop();)this.isValidLookup(i)||(r=a,i=this.getResource(e,t,a,s))})))}))})),{res:i,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,e,s,i):this.resourceStore.getResource(t,e,s,i)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!e(t.replace);let n=i?t.replace:t;if(i&&void 0!==t.count&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!i){n={...n};for(const t of s)delete n[t]}return n}static hasDefaultValue(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&e.startsWith("defaultValue")&&void 0!==t[e])return!0;return!1}}class P{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(t){if(!(t=m(t))||!t.includes("-"))return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=m(t))||!t.includes("-"))return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(e(t)&&t.includes("-")){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(t){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach((t=>{if(e)return;const s=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(s)||(e=s)})),!e&&this.options.supportedLngs&&t.forEach((t=>{if(e)return;const s=this.getScriptPartFromCode(t);if(this.isSupportedCode(s))return e=s;const i=this.getLanguagePartFromCode(t);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find((t=>!(t!==i&&(!t.includes("-")&&!i.includes("-")||(!t.includes("-")||i.includes("-")||t.slice(0,t.indexOf("-"))!==i)&&!(t.startsWith(i)&&i.length>1)))))})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,s){if(!t)return[];if("function"==typeof t&&(t=t(s)),e(t)&&(t=[t]),Array.isArray(t))return t;if(!s)return t.default||[];let i=t[s];return i||(i=t[this.getScriptPartFromCode(s)]),i||(i=t[this.formatLanguageCode(s)]),i||(i=t[this.getLanguagePartFromCode(s)]),i||(i=t.default),i||[]}toResolveHierarchy(t,s){const i=this.getFallbackCodes((!1===s?[]:s)||this.options.fallbackLng||[],t),n=[],r=t=>{t&&(this.isSupportedCode(t)?n.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return e(t)&&(t.includes("-")||t.includes("_"))?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(t))):e(t)&&r(this.formatLanguageCode(t)),i.forEach((t=>{n.includes(t)||r(this.formatLanguageCode(t))})),n}}const D={zero:0,one:1,two:2,few:3,many:4,other:5},N={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class L{constructor(t,e={}){this.languageUtils=t,this.options=e,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,e={}){const s=m("dev"===t?"en":t),i=e.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let r;try{r=new Intl.PluralRules(s,{type:i})}catch(s){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),N;if(!t.match(/-|_/))return N;const i=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(i,e)}return this.pluralRulesCache[n]=r,r}needsPlural(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,e,s={}){return this.getSuffixes(t,s).map((t=>`${e}${t}`))}getSuffixes(t,e={}){let s=this.getRule(t,e);return s||(s=this.getRule("dev",e)),s?s.resolvedOptions().pluralCategories.sort(((t,e)=>D[t]-D[e])).map((t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,e,s={}){const i=this.getRule(t,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,s))}}const R=(t,s,i,n=".",r=!0)=>{let o=((t,e,s)=>{const i=l(t,s);return void 0!==i?i:l(e,s)})(t,s,i);return!o&&r&&e(i)&&(o=y(t,i,n),void 0===o&&(o=y(s,i,n))),o},z=t=>t.replace(/\$/g,"$$$$");class A{constructor(t={}){this.logger=$.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:r,suffix:o,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=void 0!==e?e:p,this.escapeValue=void 0===s||s,this.useRawValueToEscape=void 0!==i&&i,this.prefix=n?u(n):r||"{{",this.suffix=o?u(o):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":c?u(c):"-",this.unescapeSuffix=this.unescapePrefix?"":l?u(l):"",this.nestingPrefix=d?u(d):f||u("$t("),this.nestingSuffix=g?u(g):y||u(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=b||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t?.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,s,n,r){let o,a,h;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=t=>{if(!t.includes(this.formatSeparator)){const e=R(s,l,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(e,void 0,n,{...r,...s,interpolationkey:t}):e}const e=t.split(this.formatSeparator),i=e.shift().trim(),o=e.join(this.formatSeparator).trim();return this.format(R(s,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...s,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&"string"==typeof t&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>z(t)},{regex:this.regexp,safeValue:t=>z(this.escapeValue?this.escape(t):t)}].forEach((s=>{for(h=0;o=s.regex.exec(t);){const n=o[1].trim();if(a=c(n),void 0===a)if("function"==typeof u){const s=u(t,o,r);a=e(s)?s:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(d){a=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),a=""}else e(a)||this.useRawValueToEscape||(a=i(a));const l=s.safeValue(a);if(t=t.replace(o[0],l),d?(s.regex.lastIndex+=a.length,s.regex.lastIndex-=o[0].length):s.regex.lastIndex=0,h++,h>=this.maxReplaces)break}})),t}nest(t,s,n={}){let r,o,a;const h=(t,e)=>{const s=this.nestingOptionsSeparator;if(!t.includes(s))return t;const i=t.split(new RegExp(`${u(s)}[ ]*{`));let n=`{${i[1]}`;t=i[0],n=this.interpolate(n,a);const r=n.match(/'/g),o=n.match(/"/g);((r?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(n=n.replace(/'/g,'"'));try{a=JSON.parse(n),e&&(a={...e,...a})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${s}${n}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,t};for(;r=this.nestingRegexp.exec(t);){let l=[];a={...n},a=a.replace&&!e(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==c&&(l=r[1].slice(c).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),r[1]=r[1].slice(0,c)),o=s(h.call(this,r[1].trim(),a),a),o&&r[0]===t&&!e(o))return o;e(o)||(o=i(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce(((t,e)=>this.format(t,e,n.lng,{...n,interpolationkey:r[1].trim()})),o.trim())),t=t.replace(r[0],o),this.regexp.lastIndex=0}return t}}const C=t=>{const e={};return(s,i,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const o=i+JSON.stringify(r);let a=e[o];return a||(a=t(m(i),n),e[o]=a),a(s)}},I=t=>(e,s,i)=>t(m(s),i)(e);class E{constructor(t={}){this.logger=$.create("formatter"),this.options=t,this.init(t)}init(t,e={interpolation:{}}){this.formatSeparator=e.interpolation.formatSeparator||",";const s=e.cacheInBuiltFormats?C:I;this.formats={number:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e});return t=>s.format(t)})),currency:s(((t,e)=>{const s=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>s.format(t)})),datetime:s(((t,e)=>{const s=new Intl.DateTimeFormat(t,{...e});return t=>s.format(t)})),relativetime:s(((t,e)=>{const s=new Intl.RelativeTimeFormat(t,{...e});return t=>s.format(t,e.range||"day")})),list:s(((t,e)=>{const s=new Intl.ListFormat(t,{...e});return t=>s.format(t)}))}}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=C(e)}format(t,e,s,i={}){if(!e)return t;if(null==t)return t;const n=e.split(this.formatSeparator),r=[];for(let t=0;t<n.length;t++){let e=n[t];for(;e.indexOf("(")>-1&&!e.includes(")")&&t+1<n.length;)e=`${e}${this.formatSeparator}${n[++t]}`;r.push(e)}return r.reduce(((t,e)=>{const{formatName:n,formatOptions:r}=(t=>{let e=t.toLowerCase().trim();const s={};if(t.includes("(")){const i=t.split("(");e=i[0].toLowerCase().trim();const n=i[1].slice(0,-1);"currency"!==e||n.includes(":")?"relativetime"!==e||n.includes(":")?n.split(";").forEach((t=>{if(t){const[e,...i]=t.split(":"),n=i.join(":").trim().replace(/^'+|'+$/g,""),r=e.trim();s[r]||(s[r]=n),"false"===n&&(s[r]=!1),"true"===n&&(s[r]=!0),isNaN(n)||(s[r]=parseInt(n,10))}})):s.range||(s.range=n.trim()):s.currency||(s.currency=n.trim())}return{formatName:e,formatOptions:s}})(e);if(this.formats[n]){let e=t;try{const o=i?.formatParams?.[i.interpolationkey]||{};e=this.formats[n](t,o.locale||o.lng||i.locale||i.lng||s,{...r,...i,...o})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${n}`),t}),t)}}class B extends _{constructor(t,e,s,i={}){super(),this.backend=t,this.store=e,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(t,e,s,i){const n={},r={},o={},a={};return t.forEach((t=>{let i=!0;e.forEach((e=>{const o=`${t}|${e}`;!s.reload&&this.store.hasResourceBundle(t,e)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===r[o]&&(r[o]=!0):(this.state[o]=1,i=!1,void 0===r[o]&&(r[o]=!0),void 0===n[o]&&(n[o]=!0),void 0===a[e]&&(a[e]=!0)))})),i||(o[t]=!0)})),(Object.keys(n).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(r),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(t,e,s){const i=t.split("|"),n=i[0],r=i[1];e&&this.emit("failedLoading",n,r,e),!e&&s&&this.store.addResourceBundle(n,r,s,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&s&&(this.state[t]=0);const o={};this.queue.forEach((s=>{((t,e,s)=>{const{obj:i,k:n}=a(t,e,Object);i[n]=i[n]||[],i[n].push(s)})(s.loaded,[n],r),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(s,t),e&&s.errors.push(e),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach((t=>{o[t]||(o[t]={});const e=s.loaded[t];e.length&&e.forEach((e=>{void 0===o[t][e]&&(o[t][e]=!0)}))})),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())})),this.emit("loaded",o),this.queue=this.queue.filter((t=>!t.done))}read(t,e,s,i=0,n=this.retryTimeout,r){if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:s,tried:i,wait:n,callback:r});this.readingCalls++;const o=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}o&&a&&i<this.maxRetries?setTimeout((()=>{this.read(t,e,s,i+1,2*n,r)}),n):r(o,a)},a=this.backend[s].bind(this.backend);if(2!==a.length)return a(t,e,o);try{const s=a(t,e);s&&"function"==typeof s.then?s.then((t=>o(null,t))).catch(o):o(null,s)}catch(t){o(t)}}prepareLoading(t,s,i={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();e(t)&&(t=this.languageUtils.toResolveHierarchy(t)),e(s)&&(s=[s]);const r=this.queueLoad(t,s,i,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,e,s){this.prepareLoading(t,e,{},s)}reload(t,e,s){this.prepareLoading(t,e,{reload:!0},s)}loadOne(t,e=""){const s=t.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,((s,r)=>{s&&this.logger.warn(`${e}loading namespace ${n} for language ${i} failed`,s),!s&&r&&this.logger.log(`${e}loaded namespace ${n} for language ${i}`,r),this.loaded(t,s,r)}))}saveMissing(t,e,s,i,n,r={},o=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(e)){if(null!=s&&""!==s){if(this.backend?.create){const a={...r,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let n;n=5===h.length?h(t,e,s,i,a):h(t,e,s,i),n&&"function"==typeof n.then?n.then((t=>o(null,t))).catch(o):o(null,n)}catch(t){o(t)}else h(t,e,s,i,o,a)}t&&t[0]&&this.store.addResource(t[0],e,s,i)}}else this.logger.warn(`did not save key "${s}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const K=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let s={};if("object"==typeof t[1]&&(s=t[1]),e(t[1])&&(s.defaultValue=t[1]),e(t[2])&&(s.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{s[t]=e[t]}))}return s},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),T=t=>(e(t.ns)&&(t.ns=[t.ns]),e(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),e(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),F=()=>{};class V extends _{constructor(t={},e){var s;if(super(),this.options=T(t),this.services={},this.logger=$,this.modules={external:[]},s=this,Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((t=>{"function"==typeof s[t]&&(s[t]=s[t].bind(s))})),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout((()=>{this.init(t,e)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(e(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const n=K();this.options={...n,...this.options,...T(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const r=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;$.init(this.modules.logger?r(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:E;const e=new P(this.options);this.store=new w(this.options.resources,this.options);const s=this.services;s.logger=$,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new L(e,{prepend:this.options.pluralSeparator}),t&&(s.formatter=r(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new A(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new B(r(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.languageDetector&&(s.languageDetector=r(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=r(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",((t,...e)=>{this.emit(t,...e)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=F),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...e)=>this.store[t](...e)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...e)=>(this.store[t](...e),this)}));const o=s(),a=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(e),i(t,e)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),o}loadResources(t,s=F){let i=s;const n=e(t)?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return i();const t=[],e=e=>{e&&"cimode"!==e&&this.services.languageUtils.toResolveHierarchy(e).forEach((e=>{"cimode"!==e&&(t.includes(e)||t.push(e))}))};n?e(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>e(t))),this.options.preload?.forEach?.((t=>e(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),i(t)}))}else i(null)}reloadResources(t,e,i){const n=s();return"function"==typeof t&&(i=t,t=void 0),"function"==typeof e&&(i=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),i||(i=F),this.services.backendConnector.reload(t,e,(t=>{n.resolve(),i(t)})),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&x.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!["cimode","dev"].includes(t)){for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!["cimode","dev"].includes(e)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}this.resolvedLanguage||this.languages.includes(t)||!this.store.hasLanguageSomeTranslations(t)||(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const n=s();this.emit("languageChanging",t);const r=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(e,s)=>{s?this.isLanguageChangingTo===t&&(r(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,n.resolve(((...t)=>this.t(...t))),i&&i(e,((...t)=>this.t(...t)))},a=s=>{t||s||!this.services.languageDetector||(s=[]);const i=e(s)?s:s&&s[0],n=this.store.hasLanguageSomeTranslations(i)?i:this.services.languageUtils.getBestMatchFromCodes(e(s)?[s]:s);n&&(this.language||r(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t):a(this.services.languageDetector.detect()),n}getFixedT(t,s,i,n){const r=n?.scopeNs,o=(t,e,...s)=>{let n;n="object"!=typeof e?this.options.overloadTranslationOptionHandler([t,e].concat(s)):{...e},n.lng=n.lng||o.lng,n.lngs=n.lngs||o.lngs;const a=null!=n.ns;n.ns=n.ns||o.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||i||o.keyPrefix);const h={...this.options,...n};Array.isArray(r)&&!a&&(h.ns=r),"function"==typeof n.keyPrefix&&(n.keyPrefix=S(n.keyPrefix,h));const l=this.options.keySeparator||".";let c;return n.keyPrefix&&Array.isArray(t)?c=t.map((t=>("function"==typeof t&&(t=S(t,h)),`${n.keyPrefix}${l}${t}`))):("function"==typeof t&&(t=S(t,h)),c=n.keyPrefix?`${n.keyPrefix}${l}${t}`:t),this.t(c,n)};return e(t)?o.lng=t:o.lngs=t,o.ns=s,o.keyPrefix=i,o}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,e={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=e.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,n=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;const r=(t,e)=>{const s=this.services.backendConnector.state[`${t}|${e}`];return-1===s||0===s||2===s};if(e.precheck){const t=e.precheck(this,r);if(void 0!==t)return t}return!(!this.hasResourceBundle(s,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!r(s,t)||i&&!r(n,t)))}loadNamespaces(t,i){const n=s();return this.options.ns?(e(t)&&(t=[t]),t.forEach((t=>{this.options.ns.includes(t)||this.options.ns.push(t)})),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}loadLanguages(t,i){const n=s();e(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter((t=>!r.includes(t)&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=r.concat(o),this.loadResources((t=>{n.resolve(),i&&i(t)})),n):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const e=new Intl.Locale(t);if(e&&e.getTextInfo){const t=e.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const e=this.services?.languageUtils||new P(K());return t.toLowerCase().indexOf("-latn")>1?"ltr":["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","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].includes(e.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},e){const s=new V(t,e);return s.createInstance=V.createInstance,s}cloneInstance(t={},e=F){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},n=new V(i);if(void 0===t.debug&&void 0===t.prefix||(n.logger=n.logger.clone(t)),["store","services","language"].forEach((t=>{n[t]=this[t]})),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const t=Object.keys(this.store.data).reduce(((t,e)=>(t[e]={...this.store.data[e]},t[e]=Object.keys(t[e]).reduce(((s,i)=>(s[i]={...t[e][i]},s)),t[e]),t)),{});n.store=new w(t,i),n.services.resourceStore=n.store}if(t.interpolation){const e={...K().interpolation,...this.options.interpolation,...t.interpolation},s={...i,interpolation:e};n.services.interpolator=new A(s)}return n.translator=new O(n.services,i),n.translator.on("*",((t,...e)=>{n.emit(t,...e)})),n.init(i,e),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const W=V.createInstance();var M,H={login_dialog:{heading:"Drucke mit ezeep Blue",description:"Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",action:"Anmelden"},no_document_dialog:{heading:"Keine Datei ausgewählt",description:"Wähle zunächst eine Datei zum Drucken aus.",action:"OK"},printer_selection:{loading:"Lade meine Drucker…",print:"Drucken",printer:"Drucker",print_processing:"Drucken…",print_success:"Erfolgreich gedruckt.",print_success_sub:"Dein Dokument ist auf dem Weg zum Drucker.",print_failed:"Druck fehlgeschlagen",print_timeout:"Das dauert länger als erwartet. Der Auftrag wird möglicherweise noch auf dem Drucker fertiggestellt.",not_supported:"Der ausgewählte Dateityp wird nicht unterstützt.",color:"Farbe",orientation:"Ausrichtung",size:"Papierformat",duplex:"Beidseitig",quality:"Druckqualität",select_printer:"Wähle einen Drucker",select_color:"Wähle Farbe/Graustufen",select_size:"Wähle Papierformat",select_orientation:"Wähle Ausrichtung",select_quality:"Wähle Druckqualität",select_duplex:"Wähle Beidseitig",color_color:"Farbe",color_grayscale:"Graustufen",orientation_portrait:"Hochformat",orientation_landscape:"Querformat",unknown_location:"Unbekannter Standort",no_printers:"Keine Drucker gefunden.",prepare_upload:"Vorbereiten…",uploading:"Hochladen…",duplex_none:"Keine",copies:"Kopien",duplex_long:"auf der langen Seite umdrehen",duplex_short:"auf der kurzen Seite umdrehen",pull_print_success:"Bereit zum Auslösen.",width:"Breite",length:"Länge",trays:"Papierfach",select_trays:"Wähle Papierfach",page_ranges:"Druckbereich",paper_ranges:"Papier-Ranges",files:"Dateien",file_count_one:"{{count}} Datei",file_count_other:"{{count}} Dateien"},button_actions:{login:"Anmelden",print:"Drucken",cancel:"Abbrechen",close:"Schließen",retry:"Wiederholen",select_printer:"Wähle Drucker"},upload:{description:"Ziehe Dateien hier in den Browser ",meta_leading:"oder",dropzone_title:"Dateien hier ablegen",browse:"vom Gerät auswählen",file_type_fallback:"DATEI",meta_multiple:"— mehrere Dateien möglich",add_more:"Hinzufügen",clear_files:"Dateien entfernen",files_ready_one:"{{count}} Datei bereit",files_ready_other:"{{count}} Dateien bereit",continue:"Weiter zu Druckoptionen"},user_menu:{theme:"Farbschema",appearance:"Darstellung",system:"System",light:"Hell",dark:"Dunkel",account:"Konto verwalten",help:"Hilfe & Unterstützung",logout:"Ausloggen"}},U={login_dialog:{heading:"Print with ezeep Blue",description:"Sign in with your ezeep Blue account to print.",action:"Sign in"},no_document_dialog:{heading:"No file selected",description:"Select a file first to print.",action:"OK"},printer_selection:{loading:"Loading My Printers…",print_processing:"Printing…",print_success:"Successfully printed.",print_success_sub:"Your document is on its way to the printer.",pull_print_success:"Ready to be released.",print_failed:"Print failed",print_timeout:"This is taking longer than expected. The job may still finish on the printer.",not_supported:"The selected file type is not supported.",prepare_upload:"Preparing…",uploading:"Uploading…",print:"Print",printer:"Printer",color:"Color",orientation:"Orientation",size:"Paper Size",duplex:"Double-sided",duplex_none:"None",duplex_long:"flip on long side",duplex_short:"flip on short side",quality:"Print Quality",select_printer:"Select a printer",select_color:"Select Color/Grayscale",select_orientation:"Select Orientation",select_size:"Select Paper Size",select_quality:"Select Print Quality",select_duplex:"Select Double-sided",color_color:"Color",color_grayscale:"Grayscale",orientation_portrait:"Portrait",orientation_landscape:"Landscape",unknown_location:"Unknown location",no_printers:"No printers found.",copies:"Copies",width:"Width",length:"Length",trays:"Tray",select_trays:"Select Tray",page_ranges:"Page Ranges",paper_ranges:"Paper Ranges",files:"files",file_count_one:"{{count}} file",file_count_other:"{{count}} files"},button_actions:{login:"Sign In",print:"Print",cancel:"Cancel",close:"Close",retry:"Retry",select_printer:"Select Printer"},upload:{description:"Drop files here into the browser ",meta_leading:"or",dropzone_title:"Drop files here",browse:"select from device",file_type_fallback:"FILE",meta_multiple:"— multiple files supported",add_more:"Add",clear_files:"Clear files",files_ready_one:"{{count}} file ready",files_ready_other:"{{count}} files ready",continue:"Continue to print options"},user_menu:{theme:"Color theme",appearance:"Appearance",system:"System",light:"Light",dark:"Dark",account:"Manage Account",help:"Help & Support",logout:"Logout"}};!function(t){t[t.Success=0]="Success",t[t.Processing=1246]="Processing",t[t.Rendering=129]="Rendering",t[t.Failed=3011]="Failed",t[t.Error=2]="Error"}(M||(M={}));const q=[M.Processing,M.Rendering],J=[M.Failed,M.Error],G=[412,500,503,1048579],Y=412,Q=804,Z=201,X=256,tt=2e3,et=Math.ceil(300),st=3e4,it=1800;function nt(e){const s=()=>t(e);return W.on("languageChanged",s),()=>W.off("languageChanged",s)}function rt(t){return Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&")}function ot(t){const e={en:{translation:U},de:{translation:H}};W.init(""!=t?{resources:e,lng:t,nsSeparator:!1,fallbackLng:"en"}:{resources:e,lng:navigator.language,nsSeparator:!1,fallbackLng:"en"})}const at=async({fn:t,validate:e,interval:s,maxAttempts:i})=>{let n=0;const r=async(o,a)=>{const h=await t();return n++,e(h)?o(h):i&&n===i?a(new Error("Exceeded max attempts.")):void setTimeout(r,s,o,a)};return new Promise(r)},ht=t=>{const e={};return Object.keys(t).forEach((s=>{""!==t[s]&&(e[s]=t[s])})),e},lt=t=>(256!=t.paperid&&(delete t.paperlength,delete t.paperwidth),t.paperlength&&t.paperwidth&&(t.paperlength=10*+t.paperlength,t.paperwidth=10*+t.paperwidth),t),ct=t=>t.replace(/,/g,";"),ut=t=>{if(!t)return!0;if(!/^(\d+(-\d+)?(,\d+(-\d+)?)*|(\d+,\d+(-\d+)?(,\d+(-\d+)?)*)+)$/.test(t))return!1;const e=t.split(",");for(let t=0;t<e.length;t++){const s=e[t].trim();if(s.includes("-")){const[t,e]=s.split("-"),i=parseInt(t),n=parseInt(e);if(isNaN(i)||isNaN(n)||i>n||i<=0)return!1}else{const t=parseInt(s);if(isNaN(t)||t<=0)return!1}}return!0};export{Z as B,J as F,G as H,M as J,et as M,q as P,it as T,ot as a,Q as b,tt as c,st as d,Y as e,ct as f,X as g,rt as h,W as i,lt as m,at as p,ht as r,nt as s,ut as v}
|
|
@@ -295,7 +295,10 @@ import type { EzpPrintingCustomEvent } from '@ezeep/ezeep-js/dist/components';
|
|
|
295
295
|
|
|
296
296
|
export declare interface EzpPrinting extends Components.EzpPrinting {
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
298
|
+
* Fired when the print flow reaches an end state and the host may dismiss the
|
|
299
|
+
component: a print job was submitted, or the user cancelled on the upload
|
|
300
|
+
card, the sign-in dialog (with files pending) or the print options card. It
|
|
301
|
+
does not mean a job was printed — check for that on the print API side.
|
|
299
302
|
*/
|
|
300
303
|
printFinished: EventEmitter<EzpPrintingCustomEvent<void>>;
|
|
301
304
|
}
|
|
@@ -442,12 +445,13 @@ export declare interface EzpTextButton extends Components.EzpTextButton {}
|
|
|
442
445
|
template: '<ng-content></ng-content>',
|
|
443
446
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
444
447
|
inputs: [],
|
|
445
|
-
outputs: ['uploadFile', 'uploadContinue'],
|
|
448
|
+
outputs: ['uploadFile', 'uploadContinue', 'printCancel'],
|
|
446
449
|
})
|
|
447
450
|
export class EzpUpload {
|
|
448
451
|
protected el: HTMLEzpUploadElement;
|
|
449
452
|
@Output() uploadFile = new EventEmitter<EzpUploadCustomEvent<File[]>>();
|
|
450
453
|
@Output() uploadContinue = new EventEmitter<EzpUploadCustomEvent<File[]>>();
|
|
454
|
+
@Output() printCancel = new EventEmitter<EzpUploadCustomEvent<MouseEvent>>();
|
|
451
455
|
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
452
456
|
c.detach();
|
|
453
457
|
this.el = r.nativeElement;
|
|
@@ -466,6 +470,10 @@ export declare interface EzpUpload extends Components.EzpUpload {
|
|
|
466
470
|
* Fired when the user confirms the selection and wants to move on to print options.
|
|
467
471
|
*/
|
|
468
472
|
uploadContinue: EventEmitter<EzpUploadCustomEvent<File[]>>;
|
|
473
|
+
/**
|
|
474
|
+
* Fired when the user cancels, closing the print flow in the host app.
|
|
475
|
+
*/
|
|
476
|
+
printCancel: EventEmitter<EzpUploadCustomEvent<MouseEvent>>;
|
|
469
477
|
}
|
|
470
478
|
|
|
471
479
|
|
|
@@ -2577,12 +2577,12 @@ const button_actions$1 = {
|
|
|
2577
2577
|
const upload$1 = {
|
|
2578
2578
|
description: "Ziehe Dateien hier in den Browser ",
|
|
2579
2579
|
meta_leading: "oder",
|
|
2580
|
-
heading: "Jetzt drucken",
|
|
2581
2580
|
dropzone_title: "Dateien hier ablegen",
|
|
2582
2581
|
browse: "vom Gerät auswählen",
|
|
2583
2582
|
file_type_fallback: "DATEI",
|
|
2584
2583
|
meta_multiple: "— mehrere Dateien möglich",
|
|
2585
2584
|
add_more: "Hinzufügen",
|
|
2585
|
+
clear_files: "Dateien entfernen",
|
|
2586
2586
|
files_ready_one: "{{count}} Datei bereit",
|
|
2587
2587
|
files_ready_other: "{{count}} Dateien bereit",
|
|
2588
2588
|
"continue": "Weiter zu Druckoptionen"
|
|
@@ -2671,12 +2671,12 @@ const button_actions = {
|
|
|
2671
2671
|
const upload = {
|
|
2672
2672
|
description: "Drop files here into the browser ",
|
|
2673
2673
|
meta_leading: "or",
|
|
2674
|
-
heading: "Print Now",
|
|
2675
2674
|
dropzone_title: "Drop files here",
|
|
2676
2675
|
browse: "select from device",
|
|
2677
2676
|
file_type_fallback: "FILE",
|
|
2678
2677
|
meta_multiple: "— multiple files supported",
|
|
2679
2678
|
add_more: "Add",
|
|
2679
|
+
clear_files: "Clear files",
|
|
2680
2680
|
files_ready_one: "{{count}} file ready",
|
|
2681
2681
|
files_ready_other: "{{count}} files ready",
|
|
2682
2682
|
"continue": "Continue to print options"
|
|
@@ -39083,6 +39083,9 @@ const EzpPrinting = class {
|
|
|
39083
39083
|
detail: {},
|
|
39084
39084
|
});
|
|
39085
39085
|
document.dispatchEvent(printCancelEvent);
|
|
39086
|
+
// Cancelling sign-in with files pending discards them, so the flow is over
|
|
39087
|
+
// for the host — same signal as cancelling on the upload or print step.
|
|
39088
|
+
this.printFinished.emit();
|
|
39086
39089
|
this.checkAuth();
|
|
39087
39090
|
}
|
|
39088
39091
|
async listenAuthSuccess() {
|
|
@@ -39325,7 +39328,7 @@ const EzpPrinting = class {
|
|
|
39325
39328
|
*
|
|
39326
39329
|
*/
|
|
39327
39330
|
render() {
|
|
39328
|
-
return (h(Host, { key: '
|
|
39331
|
+
return (h(Host, { key: '8eaeae452fb60e1c15265cf970dddf8767e4c849', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
|
|
39329
39332
|
? this.systemAppearance
|
|
39330
39333
|
: userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, this.trigger === 'custom' ? (h("slot", null)) : this.trigger === 'file' ? (h("ezp-upload", null)) : (this.trigger === 'button' && (h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, files: this.files, hidemenu: this.hidemenu, hideheader: this.hideheader, seamless: this.seamless })) : this.noDocumentOpen ? (h("ezp-dialog", { heading: instance.t('no_document_dialog.heading'), description: instance.t('no_document_dialog.description'), action: instance.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
|
|
39331
39334
|
}
|
|
@@ -39832,7 +39835,7 @@ const EzpTextButton = class {
|
|
|
39832
39835
|
};
|
|
39833
39836
|
EzpTextButton.style = ezpTextButtonCss();
|
|
39834
39837
|
|
|
39835
|
-
const ezpUploadCss = () => `:host{--ezp-upload-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;width:var(--ezp-upload-width, auto);height:var(--ezp-upload-height, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);height:100%;padding:var(--ezp-spacing-5)}#
|
|
39838
|
+
const ezpUploadCss = () => `:host{--ezp-upload-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;width:var(--ezp-upload-width, auto);height:var(--ezp-upload-height, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);height:100%;padding:var(--ezp-spacing-5)}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-background, transparent);border:1.5px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:0;padding:var(--ezp-spacing-6) var(--ezp-spacing-5);text-align:center;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-solid)}#cloud{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:20px;-webkit-box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:84px;-ms-flex-pack:center;justify-content:center;width:84px}#cloud ezp-icon{--ezp-icon-size:40px;--ezp-icon-gridTemplate:40px}#dropzone-title{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#meta{-ms-flex-align:baseline;align-items:baseline;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px;-ms-flex-pack:center;justify-content:center}#browse{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-browse-opacity, 1)}@media (hover: hover){#browse:hover{--ezp-upload-browse-opacity:0.6}}#formats{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center}.format{background:transparent;border:1px solid var(--ezp-core-outline);border-radius:999px;color:var(--ezp-core-foreground-secondary);font-size:12px;font-weight:600;letter-spacing:0.02em;line-height:1;padding:7px 14px}#thumbs{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;max-height:40vh;overflow-y:auto;padding:var(--ezp-spacing-1);scrollbar-width:thin;width:100%}.thumb{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:6px;position:relative;width:88px}.thumb-icon{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:50%;color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;width:56px}.thumb-icon ezp-icon{--ezp-icon-size:26px;--ezp-icon-gridTemplate:26px}.thumb-name{--ezp-label-minWidth:0;max-width:100%}.thumb-meta{letter-spacing:0.02em}.thumb-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-core-surface-tertiary);border:1px solid var(--ezp-core-outline);border-radius:50%;color:var(--ezp-core-foreground-secondary);cursor:pointer;display:-ms-flexbox;display:flex;height:20px;-ms-flex-pack:center;justify-content:center;padding:0;position:absolute;right:8px;top:-4px;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:20px;z-index:1}.thumb-remove ezp-icon{--ezp-icon-size:12px;--ezp-icon-gridTemplate:12px}@media (hover: hover){.thumb-remove:hover{color:var(--ezp-core-foreground-primary)}}.thumb-add{cursor:pointer}.thumb-add .thumb-add-icon{-ms-flex-align:center;align-items:center;border:1.5px dashed var(--ezp-core-foreground-tertiary);border-radius:50%;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;-webkit-transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:56px}.thumb-add .thumb-add-icon ezp-icon{--ezp-icon-size:24px;--ezp-icon-gridTemplate:24px}@media (hover: hover){.thumb-add:hover .thumb-add-icon{border-color:var(--ezp-theme-solid);color:var(--ezp-theme-solid)}}#ready{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;text-align:center;text-transform:uppercase}#footer{display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr}.action{--ezp-textButton-borderRadius:999px;--ezp-textButton-padding:var(--ezp-spacing-4)}#continue{--ezp-textButton-background-init:var(--ezp-upload-gradient)}`;
|
|
39836
39839
|
|
|
39837
39840
|
/** File formats advertised to the user as supported for printing. */
|
|
39838
39841
|
const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
|
|
@@ -39841,6 +39844,7 @@ const EzpUpload = class {
|
|
|
39841
39844
|
registerInstance(this, hostRef);
|
|
39842
39845
|
this.uploadFile = createEvent(this, "uploadFile", 7);
|
|
39843
39846
|
this.uploadContinue = createEvent(this, "uploadContinue", 7);
|
|
39847
|
+
this.printCancel = createEvent(this, "printCancel", 7);
|
|
39844
39848
|
/**
|
|
39845
39849
|
*
|
|
39846
39850
|
* States
|
|
@@ -39874,11 +39878,13 @@ const EzpUpload = class {
|
|
|
39874
39878
|
this.input.value = '';
|
|
39875
39879
|
}
|
|
39876
39880
|
};
|
|
39877
|
-
this.
|
|
39878
|
-
|
|
39879
|
-
|
|
39880
|
-
|
|
39881
|
-
|
|
39881
|
+
this.handleCancel = () => {
|
|
39882
|
+
if (this.selectedFiles.length === 0)
|
|
39883
|
+
return;
|
|
39884
|
+
// Closing is the host's call: the event bubbles to `ezp-printing`, which
|
|
39885
|
+
// ends the print flow. It also reaches the document, where our own
|
|
39886
|
+
// `printCancel` listener resets the form and the selection.
|
|
39887
|
+
this.printCancel.emit();
|
|
39882
39888
|
};
|
|
39883
39889
|
this.handleContinue = () => {
|
|
39884
39890
|
if (this.selectedFiles.length === 0)
|
|
@@ -39951,7 +39957,7 @@ const EzpUpload = class {
|
|
|
39951
39957
|
*/
|
|
39952
39958
|
render() {
|
|
39953
39959
|
const hasFiles = this.selectedFiles.length > 0;
|
|
39954
|
-
return (h(Host, { key: '
|
|
39960
|
+
return (h(Host, { key: '608dcbc11a2271bf80219b571b24b2f03c94911c', class: { dragging: this.dragging } }, h("form", { key: '17d3b566de3e7c1341c7e0eeb5c7646535ea8c30', id: "form", ref: (form) => (this.form = form) }, h("input", { key: '4679b7a7ca9410c3206908e60a42a75e926bf235', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.description'), ref: (input) => (this.input = input), onInput: this.handleInput }), h("div", { key: 'a6fd75ba5d84f5d661a788d14be192008cd19d0d', id: "modal" }, h("div", { key: 'cac145aec8a96b40120f22b34dec304ef3a4cf35', id: "dropzone" }, hasFiles && (h("div", { key: '93f2bbdd939ae74263f1df292ff36165f91fe588', id: "thumbs" }, this.selectedFiles.map((file, index) => (h("div", { key: index, class: "thumb" }, h("button", { type: "button", class: "thumb-remove", "aria-label": instance.t('button_actions.close'), onClick: (event) => this.removeFile(event, index) }, h("ezp-icon", { name: "close" })), h("div", { class: "thumb-icon" }, h("ezp-icon", { name: "file" })), h("ezp-label", { class: "thumb-name", ellipsis: true, text: file.name }), h("ezp-label", { class: "thumb-meta", level: "tertiary", weight: "strong", text: `${this.fileType(file.name)} · ${this.formatSize(file.size)}` })))), h("label", { key: '0e2315d9faf04be36e4f3dd4e69213d082d1e013', htmlFor: "input", class: "thumb thumb-add" }, h("div", { key: 'a65be2f4c3e8defcf51f21fa1c66149325c3f605', class: "thumb-add-icon" }, h("ezp-icon", { key: '59aead1e74833dba5bf835718687ea88088528d4', name: "plus" })), h("ezp-label", { key: '80b2a5dcc6d825b5bd63d658f97560ea07114c0e', class: "thumb-name", level: "tertiary", text: instance.t('upload.add_more') })))), !hasFiles && (h("div", { key: '4f8c72529f46d9b9a593bfa29d5ccbf5aa43be3a', id: "cloud" }, h("ezp-icon", { key: '22d131ee67be25bbc7ad4644aa04c805099418b2', name: "cloud-upload" }))), h("ezp-label", { key: 'c281c0b3d343a76c3f7ce09ed8d5583286105ce5', id: "dropzone-title", weight: "heavy", text: instance.t('upload.dropzone_title') }), h("div", { key: '9afffb9a48f2260f7018b63561013911b6d5fff1', id: "meta" }, h("ezp-label", { key: '321e0f8617d78b3955d3f01d8cdc5f06d2cca71a', level: "secondary", text: instance.t('upload.meta_leading') }), h("label", { key: '1200d155f93edfaa3bc096c21cd28e2b19809ae3', htmlFor: "input", id: "browse" }, h("ezp-label", { key: 'e5b3d0fad31bbdb19f1310399f2463c8a742b686', level: "secondary", weight: "strong", text: instance.t('upload.browse') })), h("ezp-label", { key: 'e7a185e8e3c762735bdfa94ff5a5b3dddaaad474', level: "secondary", text: instance.t('upload.meta_multiple') })), h("div", { key: '173740ccd7e5d68b4607acce266e11e49388d2d0', id: "formats" }, SUPPORTED_FORMATS.map((format) => (h("span", { class: "format", key: format }, format))))), hasFiles && (h("ezp-label", { key: 'a4417410915b4b22a1174c319814e3b65268b099', id: "ready", level: "secondary", weight: "strong", text: instance.t('upload.files_ready', { count: this.selectedFiles.length }) })), h("div", { key: '113f7fe49d5ca93ee35428fff0855e3cf70e4457', id: "footer" }, h("ezp-text-button", { key: '6c99266aeb6ce1776509feb6359f30fc78a2901b', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.clear_files'), class: "action" }), h("ezp-text-button", { key: 'ad16674be9a1b1a3cf6db16bc6c4b3abff95dfbd', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
|
|
39955
39961
|
}
|
|
39956
39962
|
};
|
|
39957
39963
|
EzpUpload.style = ezpUploadCss();
|
|
@@ -40041,7 +40047,7 @@ const EzpUserMenu = class {
|
|
|
40041
40047
|
*
|
|
40042
40048
|
*/
|
|
40043
40049
|
render() {
|
|
40044
|
-
return (h(Host, { key: '
|
|
40050
|
+
return (h(Host, { key: '8f5dde2735c47dc8102ddd5a625e26f853b7b587', class: this.open ? 'is-open' : '' }, h("div", { key: 'e188d9ad63ade716adaace39718bb988bc4159c9', id: "header" }, h("ezp-label", { key: '53907b171c8eeb9ed7a4a1c2cbf22e233110328c', ellipsis: true, id: "name", weight: "heavy", text: this.name }), h("ezp-icon-button", { key: '8370bfe1563693c31ee712e5a84662f39ea55ec0', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), h("div", { key: '1c34c655d43f7de3375caeeba156f9eb616c11e8', id: "links" }, this.links.map((link) => (h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, h("ezp-icon", { class: "link__icon", name: link.icon }), h("ezp-label", { text: link.title })))), h("a", { key: '18bde718f8a7a480dd6cac365a306951f80028f5', class: "link", onClick: this.logOut }, h("ezp-icon", { key: '3f7ce8f3974b10a0ae866abd1f1371b652abe0b1', class: "link__icon", name: "logout" }), h("ezp-label", { key: '424e025c00b4cfe7638efbecd1680b8402a791e0', text: instance.t('user_menu.logout') }))), h("div", { key: 'b163718862a0f086fd674134847d845fa229c91c', id: "theme" }, h("ezp-label", { key: '6bb91ea03c727485d53df484ea465d103b1d1af4', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), h("div", { key: 'c834c2421138fea1f497dec486664b3fd6f86b69', id: "swatches" }, this.themes.map((theme) => (h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, h("span", { class: "dot" })))))), h("div", { key: 'c84c57f3662760967c876242a85719a89f087eb3', id: "appearance" }, h("ezp-label", { key: '9ea2300e84a4d6421f496d3a033a97689b6fc498', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), h("div", { key: '4718a7e9e71ebfeece0ccc2f9fe4ce94d703e08e', id: "tabs" }, this.appearances.map((appearance) => (h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, h("ezp-icon", { name: appearance.name }), h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
|
|
40045
40051
|
}
|
|
40046
40052
|
get component() { return getElement(this); }
|
|
40047
40053
|
static get watchers() { return {
|