@ezeep/ezeep-js 1.0.314 → 1.0.316
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/ezeep.cjs.js +1 -1
- package/dist/cjs/ezp-auth_16.cjs.entry.js +65 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.js +67 -9
- package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +1 -1
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +1 -1
- package/dist/components/ezp-auth2.js +1 -1
- package/dist/components/ezp-backdrop2.js +1 -1
- package/dist/components/ezp-dialog2.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/directives/proxies.ts +7 -1
- package/dist/esm/ezeep.js +1 -1
- package/dist/esm/ezp-auth_16.entry.js +65 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_16.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/p-98a77798.entry.js +1 -0
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
- package/dist/ezeep/{p-82546765.system.entry.js → p-f348cbab.system.entry.js} +2 -2
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +16 -3
- package/dist/types/components.d.ts +5 -0
- package/package.json +1 -1
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/{p-222b1c4b.js → p-4f218598.js} +1 -1
- package/www/build/p-98a77798.entry.js +1 -0
- package/www/build/p-DCznw2Ee.system.js +1 -1
- package/www/build/{p-82546765.system.entry.js → p-f348cbab.system.entry.js} +2 -2
- package/www/data/locales/de.json +5 -0
- package/www/data/locales/en.json +5 -0
- package/www/index.html +1 -1
- package/dist/ezeep/p-7b8ac37f.entry.js +0 -1
- package/www/build/p-7b8ac37f.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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},f=t=>e(t)?t.replace(/[&<>"'\/]/g,(t=>d[t])):t,p=[" ",",","?","!",";"],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 k 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 w=Symbol("i18next/PATH_KEY");function S(t,e){const{[w]:s}=t(function(){const t=[],e=Object.create(null);let s;return e.get=(i,n)=>(s?.revoke?.(),n===w?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=p.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 f=this.resolve(t,n);let p=f?.res;const g=f?.usedKey||a,y=f?.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):"",k=n.ordinal&&v?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",x=v&&!n.ordinal&&0===n.count,w=x&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${k}`]||n.defaultValue;let P=p;b&&!p&&$&&(P=w);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(p))p=p.join(m),p&&(p=this.extendTranslation(p,t,n,i));else{let e=!1,s=!1;!this.isValidLookup(p)&&$&&(e=!0,p=w),this.isValidLookup(p)||(s=!0,p=a);const r=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:p,h=$&&w!==p&&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?w:p),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!==p?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,p)};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}`]||w)}))})):s(t,a,w))}p=this.extendTranslation(p,t,n,f,i),s&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${a}`),(s||e)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,e?p: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?(f.res=t,f.usedParams=this.getUsedParamsDetails(n),f):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,$&&!p?{...n,defaultValue:j(w)?w[t]:void 0,joinArrays:!1,ns:h}:{...n,joinArrays:!1,ns:h}),e[t]===i&&(e[t]=P[t])}p=e}}return r?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}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,f=void 0!==s.context&&(e(s.context)||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach((t=>{this.isValidLookup(i)||(a=t,this.checkedLoadedFor[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(this.checkedLoadedFor[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${n}" for languages "${p.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!!!")),p.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)),f){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 R{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 L=(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:p,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:m,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=void 0!==e?e:f,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):p||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=L(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(L(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 k(this.options.resources,this.options);const s=this.services;s.logger=$,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new R(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 k(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:{choose_files:"Dateien auswählen",drag_hint:"oder Dateien hierher ziehen",dropzone_title:"Zum Hochladen ablegen",file_type_fallback:"DATEI",add_more:"Weitere Dateien hinzufügen",remove_file:"Datei entfernen",remove_files:"Dateien entfernen",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:{choose_files:"Choose files",drag_hint:"or drag files here",dropzone_title:"Drop to upload",file_type_fallback:"FILE",add_more:"Add more files",remove_file:"Remove file",remove_files:"Remove files",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){const e=t.getBoundingClientRect().top;return Array.from(t.children).findIndex((t=>{const s=t.getBoundingClientRect();return(s.top+s.bottom)/2>e}))}function ot(t,e,s,i){const n={top:e.top-i.top,bottom:i.bottom-e.bottom},r="top"===t?"bottom":"top";return n[t]>=s?t:n[r]>=s||n[r]>n[t]?r:t}function at(t){return Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&")}function ht(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 lt=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)},ct=t=>{const e={};return Object.keys(t).forEach((s=>{""!==t[s]&&(e[s]=t[s])})),e},ut=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),dt=t=>t.replace(/,/g,";"),ft=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,X as P,it as T,ht as a,q as b,Q as c,tt as d,st as e,dt as f,Y as g,rt as h,W as i,ot as j,at as k,ut as m,lt as p,ct as r,nt as s,ft 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 k 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 w={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 P 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),$=P.hasDefaultValue(n),_=v?this.pluralResolver.getSuffix(u,n.count,n):"",k=n.ordinal&&v?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",w=v&&!n.ordinal&&0===n.count,x=w&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${k}`]||n.defaultValue;let O=f;b&&!f&&$&&(O=x);const D=j(O),N=Object.prototype.toString.apply(O);if(!(b&&O&&D)||["[object Number]","[object Function]","[object RegExp]"].includes(N)||e(m)&&Array.isArray(O))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);w&&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,O,{...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(O),e=t?[]:{},s=t?y:g;for(const t in O)if(Object.prototype.hasOwnProperty.call(O,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]=O[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=w.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 O{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 R{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 L=(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},A=t=>t.replace(/\$/g,"$$$$");class z{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=L(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(L(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=>A(t)},{regex:this.regexp,safeValue:t=>A(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)}},E=t=>(e,s,i)=>t(m(s),i)(e);class I{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:E;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 T=()=>({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}),K=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 W extends _{constructor(t={},e){var s;if(super(),this.options=K(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=T();this.options={...n,...this.options,...K(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:I;const e=new O(this.options);this.store=new k(this.options.resources,this.options);const s=this.services;s.logger=$,s.resourceStore=this.store,s.languageUtils=e,s.pluralResolver=new R(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 z(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 P(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&&w.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 O(T());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 W(t,e);return s.createInstance=W.createInstance,s}cloneInstance(t={},e=F){const s=t.forkResourceStore;s&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},n=new W(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 k(t,i),n.services.resourceStore=n.store}if(t.interpolation){const e={...T().interpolation,...this.options.interpolation,...t.interpolation},s={...i,interpolation:e};n.services.interpolator=new z(s)}return n.translator=new P(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 V=W.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"},popup_blocked_dialog:{heading:"Anmeldefenster wurde blockiert",description:"Dein Browser hat das Anmelde-Pop-up blockiert. Erlaube Pop-ups für diese Website und tippe dann auf Erneut versuchen. Auf dem iPhone oder iPad öffne Einstellungen → Safari und deaktiviere Pop-ups blockieren.",action:"Erneut versuchen"},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:{choose_files:"Dateien auswählen",drag_hint:"oder Dateien hierher ziehen",dropzone_title:"Zum Hochladen ablegen",file_type_fallback:"DATEI",add_more:"Weitere Dateien hinzufügen",remove_file:"Datei entfernen",remove_files:"Dateien entfernen",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"},popup_blocked_dialog:{heading:"Sign-in window was blocked",description:"Your browser blocked the sign-in pop-up. Allow pop-ups for this site, then tap Try again. On iPhone or iPad, open Settings → Safari and turn off Block Pop-ups.",action:"Try again"},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:{choose_files:"Choose files",drag_hint:"or drag files here",dropzone_title:"Drop to upload",file_type_fallback:"FILE",add_more:"Add more files",remove_file:"Remove file",remove_files:"Remove files",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],Y=[412,500,503,1048579],G=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 V.on("languageChanged",s),()=>V.off("languageChanged",s)}function rt(t){const e=t.getBoundingClientRect().top;return Array.from(t.children).findIndex((t=>{const s=t.getBoundingClientRect();return(s.top+s.bottom)/2>e}))}function ot(t,e,s,i){const n={top:e.top-i.top,bottom:i.bottom-e.bottom},r="top"===t?"bottom":"top";return n[t]>=s?t:n[r]>=s||n[r]>n[t]?r:t}function at(t){return Object.keys(t).map((e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e]))).join("&")}function ht(t){const e={en:{translation:U},de:{translation:H}};V.init(""!=t?{resources:e,lng:t,nsSeparator:!1,fallbackLng:"en"}:{resources:e,lng:navigator.language,nsSeparator:!1,fallbackLng:"en"})}const lt=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)},ct=t=>{const e={};return Object.keys(t).forEach((s=>{""!==t[s]&&(e[s]=t[s])})),e},ut=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),dt=t=>t.replace(/,/g,";"),pt=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,Y as H,M as J,et as M,X as P,it as T,ht as a,q as b,Q as c,tt as d,st as e,dt as f,G as g,rt as h,V as i,ot as j,at as k,ut as m,lt as p,ct as r,nt as s,pt as v}
|
|
@@ -32,13 +32,14 @@ import { defineCustomElement as defineEzpUserMenu } from '@ezeep/ezeep-js/dist/c
|
|
|
32
32
|
template: '<ng-content></ng-content>',
|
|
33
33
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
34
34
|
inputs: ['clientID', 'code', 'hidelogin', 'redirectURI', 'trigger'],
|
|
35
|
-
outputs: ['authCancel', 'authSuccess', 'userCancel'],
|
|
35
|
+
outputs: ['authCancel', 'authSuccess', 'userCancel', 'popupBlocked'],
|
|
36
36
|
})
|
|
37
37
|
export class EzpAuth {
|
|
38
38
|
protected el: HTMLEzpAuthElement;
|
|
39
39
|
@Output() authCancel = new EventEmitter<EzpAuthCustomEvent<MouseEvent>>();
|
|
40
40
|
@Output() authSuccess = new EventEmitter<EzpAuthCustomEvent<void>>();
|
|
41
41
|
@Output() userCancel = new EventEmitter<EzpAuthCustomEvent<void>>();
|
|
42
|
+
@Output() popupBlocked = new EventEmitter<EzpAuthCustomEvent<void>>();
|
|
42
43
|
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
43
44
|
c.detach();
|
|
44
45
|
this.el = r.nativeElement;
|
|
@@ -55,6 +56,11 @@ export declare interface EzpAuth extends Components.EzpAuth {
|
|
|
55
56
|
authSuccess: EventEmitter<EzpAuthCustomEvent<void>>;
|
|
56
57
|
|
|
57
58
|
userCancel: EventEmitter<EzpAuthCustomEvent<void>>;
|
|
59
|
+
/**
|
|
60
|
+
* Emitted when the browser blocks the sign-in popup (e.g. iOS Safari with
|
|
61
|
+
"Block Pop-ups" on). Host apps can listen to layer additional UI on top.
|
|
62
|
+
*/
|
|
63
|
+
popupBlocked: EventEmitter<EzpAuthCustomEvent<void>>;
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
|
package/dist/esm/ezeep.js
CHANGED
|
@@ -44,5 +44,5 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
44
44
|
|
|
45
45
|
patchBrowser().then(async (options) => {
|
|
46
46
|
await globalScripts();
|
|
47
|
-
return bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"files":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"setAuthRefreshToken":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{"filedata":[{"watchFileData":0}],"filename":[{"watchFilename":0}],"fileurl":[{"watchFileUrl":0}],"language":[{"watchLanguage":0}]}],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"files":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"printTimedOut":[32],"notSupported":[32],"noPrinters":[32],"hubDriverError":[32],"userMenuOpen":[32],"printStopped":[32],"firstVisibleFile":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"loadingPrinterConfig":[32],"paperid":[32],"currentFileIndex":[32],"totalFiles":[32],"failedFiles":[32],"successfulFiles":[32],"partialSuccess":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"selectedFiles":[32],"dragging":[32],"firstVisibleFile":[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{"name":[1],"open":[1028]},null,{"open":[{"watchOpen":0}]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]},null,{"expanded":[{"watchExpanded":0}],"preSelected":[{"preSelectedChanged":0}]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]},null,{"value":[{"watchValue":0}]}],[1,"ezp-status",{"description":[1],"subtext":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-file-name",{"name":[1],"level":[1],"weight":[1],"placement":[1],"anchor":[1],"expanded":[32],"tooltipOpen":[32]},[[10,"keydown","handleKeyDown"]],{"tooltipOpen":[{"watchTooltipOpen":0}]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1],"isTruncated":[64]}]]]], options);
|
|
47
|
+
return bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"files":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"setAuthRefreshToken":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{"filedata":[{"watchFileData":0}],"filename":[{"watchFilename":0}],"fileurl":[{"watchFileUrl":0}],"language":[{"watchLanguage":0}]}],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"files":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"printTimedOut":[32],"notSupported":[32],"noPrinters":[32],"hubDriverError":[32],"userMenuOpen":[32],"printStopped":[32],"firstVisibleFile":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"loadingPrinterConfig":[32],"paperid":[32],"currentFileIndex":[32],"totalFiles":[32],"failedFiles":[32],"successfulFiles":[32],"partialSuccess":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32],"isPopupBlocked":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"selectedFiles":[32],"dragging":[32],"firstVisibleFile":[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{"name":[1],"open":[1028]},null,{"open":[{"watchOpen":0}]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]},null,{"expanded":[{"watchExpanded":0}],"preSelected":[{"preSelectedChanged":0}]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]},null,{"value":[{"watchValue":0}]}],[1,"ezp-status",{"description":[1],"subtext":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-file-name",{"name":[1],"level":[1],"weight":[1],"placement":[1],"anchor":[1],"expanded":[32],"tooltipOpen":[32]},[[10,"keydown","handleKeyDown"]],{"tooltipOpen":[{"watchTooltipOpen":0}]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1],"isTruncated":[64]}]]]], options);
|
|
48
48
|
});
|
|
@@ -2517,6 +2517,11 @@ const login_dialog$1 = {
|
|
|
2517
2517
|
description: "Melde dich mit deinem ezeep Blue-Konto an, um zu drucken.",
|
|
2518
2518
|
action: "Anmelden"
|
|
2519
2519
|
};
|
|
2520
|
+
const popup_blocked_dialog$1 = {
|
|
2521
|
+
heading: "Anmeldefenster wurde blockiert",
|
|
2522
|
+
description: "Dein Browser hat das Anmelde-Pop-up blockiert. Erlaube Pop-ups für diese Website und tippe dann auf Erneut versuchen. Auf dem iPhone oder iPad öffne Einstellungen → Safari und deaktiviere Pop-ups blockieren.",
|
|
2523
|
+
action: "Erneut versuchen"
|
|
2524
|
+
};
|
|
2520
2525
|
const no_document_dialog$1 = {
|
|
2521
2526
|
heading: "Keine Datei ausgewählt",
|
|
2522
2527
|
description: "Wähle zunächst eine Datei zum Drucken aus.",
|
|
@@ -2596,6 +2601,7 @@ const user_menu$1 = {
|
|
|
2596
2601
|
};
|
|
2597
2602
|
var translationsDE = {
|
|
2598
2603
|
login_dialog: login_dialog$1,
|
|
2604
|
+
popup_blocked_dialog: popup_blocked_dialog$1,
|
|
2599
2605
|
no_document_dialog: no_document_dialog$1,
|
|
2600
2606
|
printer_selection: printer_selection$1,
|
|
2601
2607
|
button_actions: button_actions$1,
|
|
@@ -2608,6 +2614,11 @@ const login_dialog = {
|
|
|
2608
2614
|
description: "Sign in with your ezeep Blue account to print.",
|
|
2609
2615
|
action: "Sign in"
|
|
2610
2616
|
};
|
|
2617
|
+
const popup_blocked_dialog = {
|
|
2618
|
+
heading: "Sign-in window was blocked",
|
|
2619
|
+
description: "Your browser blocked the sign-in pop-up. Allow pop-ups for this site, then tap Try again. On iPhone or iPad, open Settings → Safari and turn off Block Pop-ups.",
|
|
2620
|
+
action: "Try again"
|
|
2621
|
+
};
|
|
2611
2622
|
const no_document_dialog = {
|
|
2612
2623
|
heading: "No file selected",
|
|
2613
2624
|
description: "Select a file first to print.",
|
|
@@ -2687,6 +2698,7 @@ const user_menu = {
|
|
|
2687
2698
|
};
|
|
2688
2699
|
var translationsEN = {
|
|
2689
2700
|
login_dialog: login_dialog,
|
|
2701
|
+
popup_blocked_dialog: popup_blocked_dialog,
|
|
2690
2702
|
no_document_dialog: no_document_dialog,
|
|
2691
2703
|
printer_selection: printer_selection,
|
|
2692
2704
|
button_actions: button_actions,
|
|
@@ -3147,6 +3159,9 @@ const EzpAuth = class {
|
|
|
3147
3159
|
this.authCancel = createEvent(this, "authCancel", 7);
|
|
3148
3160
|
this.authSuccess = createEvent(this, "authSuccess", 7);
|
|
3149
3161
|
this.userCancel = createEvent(this, "userCancel", 7);
|
|
3162
|
+
this.popupBlocked = createEvent(this, "popupBlocked", 7);
|
|
3163
|
+
/** True when the browser blocked the sign-in popup; shows the popup-blocked dialog. */
|
|
3164
|
+
this.isPopupBlocked = false;
|
|
3150
3165
|
this.oauthPopupWindow = null;
|
|
3151
3166
|
this.previousUrl = null;
|
|
3152
3167
|
// Bound once (arrow property) so add/removeEventListener share the same
|
|
@@ -3186,10 +3201,23 @@ const EzpAuth = class {
|
|
|
3186
3201
|
});
|
|
3187
3202
|
};
|
|
3188
3203
|
}
|
|
3189
|
-
listenDialogAction() {
|
|
3204
|
+
listenDialogAction(event) {
|
|
3205
|
+
if (event.detail === 'popup-blocked') {
|
|
3206
|
+
this.handleRetry();
|
|
3207
|
+
return;
|
|
3208
|
+
}
|
|
3190
3209
|
this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
|
|
3191
3210
|
}
|
|
3192
|
-
listenDialogClose() {
|
|
3211
|
+
listenDialogClose(event) {
|
|
3212
|
+
if (event.detail === 'popup-blocked') {
|
|
3213
|
+
// Dismissing the blocked-popup dialog cancels like the screen it replaced:
|
|
3214
|
+
// the sign-in status (hidelogin) or the login dialog.
|
|
3215
|
+
this.isPopupBlocked = false;
|
|
3216
|
+
if (this.showsSignInStatus()) {
|
|
3217
|
+
this.listenStatusCancel();
|
|
3218
|
+
return;
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3193
3221
|
this.authCancel.emit();
|
|
3194
3222
|
}
|
|
3195
3223
|
listenStatusCancel() {
|
|
@@ -3227,16 +3255,24 @@ const EzpAuth = class {
|
|
|
3227
3255
|
/* if the pointer to the window object in memory does not exist
|
|
3228
3256
|
or if such pointer exists but the window was closed */
|
|
3229
3257
|
this.oauthPopupWindow = window.open(url, name, windowFeatures);
|
|
3258
|
+
if (this.isWindowBlocked(this.oauthPopupWindow)) {
|
|
3259
|
+
this.handlePopupBlocked();
|
|
3260
|
+
return;
|
|
3261
|
+
}
|
|
3230
3262
|
}
|
|
3231
3263
|
else if (this.previousUrl !== this.auth.authURI.toString()) {
|
|
3232
3264
|
/* if the resource to load is different,
|
|
3233
3265
|
then we load it in the already opened secondary window and then
|
|
3234
3266
|
we bring such window back on top/in front of its parent window. */
|
|
3267
|
+
const previousPopup = this.oauthPopupWindow;
|
|
3235
3268
|
this.oauthPopupWindow = window.open(url, name, windowFeatures);
|
|
3236
|
-
if (
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3269
|
+
if (this.isWindowBlocked(this.oauthPopupWindow)) {
|
|
3270
|
+
// The still-open popup carries the outdated auth URL (and PKCE
|
|
3271
|
+
// challenge), so finishing sign-in there could never succeed. Close it
|
|
3272
|
+
// so the user goes through the retry dialog with a fresh window.
|
|
3273
|
+
previousPopup === null || previousPopup === void 0 ? void 0 : previousPopup.close();
|
|
3274
|
+
this.handlePopupBlocked();
|
|
3275
|
+
return;
|
|
3240
3276
|
}
|
|
3241
3277
|
(_a = this.oauthPopupWindow) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3242
3278
|
}
|
|
@@ -3250,7 +3286,26 @@ const EzpAuth = class {
|
|
|
3250
3286
|
// add the listener for receiving a message from the popup (same bound
|
|
3251
3287
|
// reference used by removeEventListener above, so it never stacks)
|
|
3252
3288
|
window.addEventListener('message', this.receiveMessage, false);
|
|
3253
|
-
|
|
3289
|
+
// Store the string form: it is compared against authURI.toString() above.
|
|
3290
|
+
this.previousUrl = this.auth.authURI.toString();
|
|
3291
|
+
}
|
|
3292
|
+
showsSignInStatus() {
|
|
3293
|
+
return this.hidelogin && (this.trigger === 'button' || this.trigger === 'file');
|
|
3294
|
+
}
|
|
3295
|
+
/** A blocked window.open() returns null, or a window that is closed / has no `closed` flag. */
|
|
3296
|
+
isWindowBlocked(popup) {
|
|
3297
|
+
return !popup || popup.closed || typeof popup.closed === 'undefined';
|
|
3298
|
+
}
|
|
3299
|
+
handlePopupBlocked() {
|
|
3300
|
+
// Drop the dead reference so a retry goes through the fresh-open branch.
|
|
3301
|
+
this.oauthPopupWindow = null;
|
|
3302
|
+
this.isPopupBlocked = true;
|
|
3303
|
+
this.popupBlocked.emit();
|
|
3304
|
+
}
|
|
3305
|
+
/** "Try again" on the popup-blocked dialog: runs from a user gesture, so the popup may now open. */
|
|
3306
|
+
handleRetry() {
|
|
3307
|
+
this.isPopupBlocked = false;
|
|
3308
|
+
this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
|
|
3254
3309
|
}
|
|
3255
3310
|
async componentWillLoad() {
|
|
3256
3311
|
this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
|
|
@@ -3281,7 +3336,7 @@ const EzpAuth = class {
|
|
|
3281
3336
|
}
|
|
3282
3337
|
}
|
|
3283
3338
|
render() {
|
|
3284
|
-
return (h(Host, { key: '
|
|
3339
|
+
return (h(Host, { key: 'b947c930b88083bbcde53215bcb6159f2d2a79ce' }, this.isPopupBlocked ? (h("ezp-dialog", { heading: instance.t('popup_blocked_dialog.heading'), description: instance.t('popup_blocked_dialog.description'), action: instance.t('popup_blocked_dialog.action'), iconName: "exclamation-mark", instance: "popup-blocked", key: "popup-blocked" })) : this.showsSignInStatus() ? (h("ezp-status", { description: instance.t('login_dialog.action'), processing: true, cancel: true })) : (h("ezp-dialog", { heading: instance.t('login_dialog.heading'), description: instance.t('login_dialog.description'), action: instance.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login", key: "login" }))));
|
|
3285
3340
|
}
|
|
3286
3341
|
};
|
|
3287
3342
|
EzpAuth.style = ezpAuthCss();
|
|
@@ -3305,7 +3360,7 @@ const EzpBackdrop = class {
|
|
|
3305
3360
|
}
|
|
3306
3361
|
}
|
|
3307
3362
|
render() {
|
|
3308
|
-
return h(Host, { key: '
|
|
3363
|
+
return h(Host, { key: '7a559a59b645ba3610c90c872a8bc60de2ce5645', class: { hide: !this.visible }, onClick: () => this.handleClick() });
|
|
3309
3364
|
}
|
|
3310
3365
|
get component() { return getElement(this); }
|
|
3311
3366
|
};
|
|
@@ -3407,7 +3462,7 @@ const EzpDialog = class {
|
|
|
3407
3462
|
*
|
|
3408
3463
|
*/
|
|
3409
3464
|
render() {
|
|
3410
|
-
return (h(Host, { key: '
|
|
3465
|
+
return (h(Host, { key: '31add15a63c15bd40f88056c8db4b1621be8365c' }, h("div", { key: '4027e801bd98fea212c079282ace0e414cf23525', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, h("div", { key: '8efa479a250d00b64400ca75c2fe7b1e490a5f78', id: "header" }, h("ezp-icon-button", { key: '492ca4802b7ddf20c37a0ce712f77cb0beea07d5', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), h("div", { key: '65c7484b089a30b71f24014a5705a870522f4b65', id: "body" }, this.iconName && (h("ezp-icon", { key: '9d7689c2c5bc50196e7a4a7a25e9c314e0ca7372', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), h("div", { key: 'd2d9418cef0d876f9a59200b6c4a0995e18b8624', id: "text" }, h("ezp-label", { key: 'cf5ac182ee507a4e558e6d77a8ceae2fcd33912e', text: this.heading, weight: "heavy" }), h("ezp-label", { key: 'b925e9c5e830cf2b42b36b1fc60903ddc6aa9613', text: this.description }))), h("div", { key: '9d5d1663b68c8187d4e1767eee3587486974e7c5', id: "footer" }, h("ezp-text-button", { key: '3093c085f0001afec6a57aadb5f6866b1f4f2d22', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
|
|
3411
3466
|
}
|
|
3412
3467
|
};
|
|
3413
3468
|
EzpDialog.style = ezpDialogCss();
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-C0WTlb31.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"files":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"setAuthRefreshToken":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{"filedata":[{"watchFileData":0}],"filename":[{"watchFilename":0}],"fileurl":[{"watchFileUrl":0}],"language":[{"watchLanguage":0}]}],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"files":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"printTimedOut":[32],"notSupported":[32],"noPrinters":[32],"hubDriverError":[32],"userMenuOpen":[32],"printStopped":[32],"firstVisibleFile":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"loadingPrinterConfig":[32],"paperid":[32],"currentFileIndex":[32],"totalFiles":[32],"failedFiles":[32],"successfulFiles":[32],"partialSuccess":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"selectedFiles":[32],"dragging":[32],"firstVisibleFile":[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{"name":[1],"open":[1028]},null,{"open":[{"watchOpen":0}]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]},null,{"expanded":[{"watchExpanded":0}],"preSelected":[{"preSelectedChanged":0}]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]},null,{"value":[{"watchValue":0}]}],[1,"ezp-status",{"description":[1],"subtext":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-file-name",{"name":[1],"level":[1],"weight":[1],"placement":[1],"anchor":[1],"expanded":[32],"tooltipOpen":[32]},[[10,"keydown","handleKeyDown"]],{"tooltipOpen":[{"watchTooltipOpen":0}]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1],"isTruncated":[64]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{"clientid":[1],"redirecturi":[1],"filename":[1025],"fileurl":[1],"filetype":[1],"custom":[4],"hidelogin":[4],"hidemenu":[4],"hideheader":[4],"authapihosturl":[1],"printapihosturl":[1],"theme":[1],"fileid":[1],"appearance":[1],"trigger":[1],"language":[1],"code":[1],"filedata":[1],"seamless":[4],"printOpen":[32],"authOpen":[32],"onlyGetSasUri":[32],"noDocumentOpen":[32],"systemAppearance":[32],"files":[32],"open":[64],"logOut":[64],"getSasUri":[64],"getAuthUri":[64],"setAuthRefreshToken":[64],"checkAuth":[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{"filedata":[{"watchFileData":0}],"filename":[{"watchFilename":0}],"fileurl":[{"watchFileUrl":0}],"language":[{"watchLanguage":0}]}],[1,"ezp-printer-selection",{"clientID":[1,"client-i-d"],"redirectURI":[1,"redirect-u-r-i"],"filename":[1025],"fileurl":[1],"filetype":[1025],"fileid":[1025],"files":[16],"hidemenu":[4],"hideheader":[4],"seamless":[4],"loading":[32],"printProcessing":[32],"pageRangeInvalid":[32],"uploading":[32],"preparingUpload":[32],"printSuccess":[32],"printFailed":[32],"printTimedOut":[32],"notSupported":[32],"noPrinters":[32],"hubDriverError":[32],"userMenuOpen":[32],"printStopped":[32],"firstVisibleFile":[32],"userName":[32],"printers":[32],"selectedPrinter":[32],"printerConfig":[32],"selectedPrinterConfig":[32],"selectedProperties":[32],"loadingPrinterConfig":[32],"paperid":[32],"currentFileIndex":[32],"totalFiles":[32],"failedFiles":[32],"successfulFiles":[32],"partialSuccess":[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{"clientID":[1025,"client-i-d"],"redirectURI":[1025,"redirect-u-r-i"],"hidelogin":[4],"trigger":[1],"code":[1],"auth":[32],"authURI":[32],"accessToken":[32],"isPopupBlocked":[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{"selectedFiles":[32],"dragging":[32],"firstVisibleFile":[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{"heading":[1],"description":[1],"action":[1],"iconName":[1,"icon-name"],"iconSize":[1,"icon-size"],"iconFramed":[4,"icon-framed"],"instance":[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{"name":[1],"open":[1028]},null,{"open":[{"watchOpen":0}]}],[1,"ezp-select",{"icon":[1],"label":[1],"optionFlow":[1,"option-flow"],"options":[16],"placeholder":[1],"preSelected":[8,"pre-selected"],"toggleFlow":[1,"toggle-flow"],"disabled":[4],"expanded":[32],"selected":[32]},null,{"expanded":[{"watchExpanded":0}],"preSelected":[{"preSelectedChanged":0}]}],[1,"ezp-input",{"label":[1],"value":[1032],"type":[1],"icon":[1],"suffix":[513],"eventType":[1,"event-type"],"placeholder":[1],"focused":[32]}],[1,"ezp-stepper",{"icon":[1],"label":[1],"max":[2],"min":[2],"canDecrease":[32],"canIncrease":[32],"focused":[32],"value":[32]},null,{"value":[{"watchValue":0}]}],[1,"ezp-status",{"description":[1],"subtext":[1],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-file-name",{"name":[1],"level":[1],"weight":[1],"placement":[1],"anchor":[1],"expanded":[32],"tooltipOpen":[32]},[[10,"keydown","handleKeyDown"]],{"tooltipOpen":[{"watchTooltipOpen":0}]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{"blank":[4],"disabled":[4],"href":[1],"icon":[1],"level":[1],"type":[1]}],[1,"ezp-text-button",{"blank":[4],"disabled":[4],"href":[1],"level":[1],"label":[1],"type":[1],"small":[4]}],[1,"ezp-icon",{"name":[1],"size":[1],"framed":[4]}],[1,"ezp-label",{"ellipsis":[4],"level":[1],"noWrap":[4,"no-wrap"],"text":[1],"weight":[1],"isTruncated":[64]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
package/dist/esm-es5/ezeep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,t,i){function a(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function l(e){try{s(i.next(e))}catch(e){r(e)}}function o(e){try{s(i["throw"](e))}catch(e){r(e)}}function s(e){e.done?t(e.value):a(e.value).then(l,o)}s((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=o(0),l["throw"]=o(1),l["return"]=o(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(n){return s([e,n])}}function s(o){if(i)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(t=0)),t)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){t.label=o[1];break}if(o[0]===6&&t.label<r[1]){t.label=r[1];r=o;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(o);break}if(r[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(e){o=[6,e];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{p as promiseResolve,B as BUILD,c as consoleDevInfo,w as win,N as NAMESPACE,H,b as bootstrapLazy}from"./index-BButrLnB.js";export{s as setNonce}from"./index-BButrLnB.js";import{g as globalScripts}from"./app-globals-C0WTlb31.js";var patchBrowser=function(){if(BUILD.isDev&&!BUILD.isTesting){consoleDevInfo("Running in development mode.")}if(BUILD.cloneNodeFix){patchCloneNodeFix(H.prototype)}var e=BUILD.scriptDataOpts?win.document&&Array.from(win.document.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(NAMESPACE,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE})):null;var n=import.meta.url;var t=BUILD.scriptDataOpts?(e||{})["data-opts"]||{}:{};if(n!==""){t.resourcesUrl=new URL(".",n).href}return promiseResolve(t)};var patchCloneNodeFix=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var i=this.childNodes;if(e){for(var a=0;a<i.length;a++){if(i[a].nodeType!==2){t.appendChild(i[a].cloneNode(true))}}}return t}};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,globalScripts()];case 1:n.sent();return[2,bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1],isTruncated:[64]}]]]],e)]}}))}))}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,i){function a(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function l(e){try{s(i.next(e))}catch(e){r(e)}}function o(e){try{s(i["throw"](e))}catch(e){r(e)}}function s(e){e.done?t(e.value):a(e.value).then(l,o)}s((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,a,r,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=o(0),l["throw"]=o(1),l["return"]=o(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(n){return s([e,n])}}function s(o){if(i)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(t=0)),t)try{if(i=1,a&&(r=o[0]&2?a["return"]:o[0]?a["throw"]||((r=a["return"])&&r.call(a),0):a.next)&&!(r=r.call(a,o[1])).done)return r;if(a=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){t.label=o[1];break}if(o[0]===6&&t.label<r[1]){t.label=r[1];r=o;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(o);break}if(r[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(e){o=[6,e];a=0}finally{i=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{p as promiseResolve,B as BUILD,c as consoleDevInfo,w as win,N as NAMESPACE,H,b as bootstrapLazy}from"./index-BButrLnB.js";export{s as setNonce}from"./index-BButrLnB.js";import{g as globalScripts}from"./app-globals-C0WTlb31.js";var patchBrowser=function(){if(BUILD.isDev&&!BUILD.isTesting){consoleDevInfo("Running in development mode.")}if(BUILD.cloneNodeFix){patchCloneNodeFix(H.prototype)}var e=BUILD.scriptDataOpts?win.document&&Array.from(win.document.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(NAMESPACE,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE})):null;var n=import.meta.url;var t=BUILD.scriptDataOpts?(e||{})["data-opts"]||{}:{};if(n!==""){t.resourcesUrl=new URL(".",n).href}return promiseResolve(t)};var patchCloneNodeFix=function(e){var n=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return n.call(this,e)}var t=n.call(this,false);var i=this.childNodes;if(e){for(var a=0;a<i.length;a++){if(i[a].nodeType!==2){t.appendChild(i[a].cloneNode(true))}}}return t}};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,globalScripts()];case 1:n.sent();return[2,bootstrapLazy([["ezp-auth_16",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32],isPopupBlocked:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1],isTruncated:[64]}]]]],e)]}}))}))}));
|