lido-player 0.0.2-beta-16-dev → 0.0.2-beta-17-dev

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.
Files changed (76) hide show
  1. package/dist/cjs/{decode-C08Ujimj.js → decode-DUZYNXIv.js} +1 -1
  2. package/dist/cjs/{index-BkBqiwe8.js → index-BEjUmVtH.js} +189 -53
  3. package/dist/cjs/{index-Dy19zuTX.js → index-DnqQXD5x.js} +53 -12
  4. package/dist/cjs/index.cjs.js +2 -2
  5. package/dist/cjs/lido-avatar_22.cjs.entry.js +60 -54
  6. package/dist/cjs/lido-player.cjs.js +3 -3
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/calculator/lido-calculator.js +3 -3
  10. package/dist/collection/components/mathMatrix/lido-math-matrix.js +12 -2
  11. package/dist/collection/components/scale/assets/Shadow.svg +9 -0
  12. package/dist/collection/components/scale/lido-balance.css +1 -1
  13. package/dist/collection/components/scale/lido-balance.js +13 -11
  14. package/dist/collection/components/text/lido-text.js +28 -2
  15. package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -0
  16. package/dist/collection/components/trace/lido-trace.js +25 -38
  17. package/dist/collection/css/index.css +7 -4
  18. package/dist/collection/stories/Templates/blender/blender.stories.js +9 -5
  19. package/dist/collection/utils/audioPlayer.js +31 -9
  20. package/dist/collection/utils/utils.js +20 -10
  21. package/dist/collection/utils/utilsHandlers/animationHandler.js +9 -2
  22. package/dist/collection/utils/utilsHandlers/clickHandler.js +8 -0
  23. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +28 -8
  24. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +12 -15
  25. package/dist/collection/utils/utilsHandlers/slideHandler.js +76 -17
  26. package/dist/components/index.js +1 -1
  27. package/dist/components/lido-balance.js +1 -1
  28. package/dist/components/lido-calculator.js +1 -1
  29. package/dist/components/lido-container.js +1 -1
  30. package/dist/components/lido-home.js +1 -1
  31. package/dist/components/lido-keyboard.js +1 -1
  32. package/dist/components/lido-math-matrix.js +1 -1
  33. package/dist/components/lido-root.js +1 -1
  34. package/dist/components/lido-text.js +1 -1
  35. package/dist/components/lido-trace.js +1 -1
  36. package/dist/components/p-BNNX1Pew.js +12 -0
  37. package/dist/components/p-CTlwn9r7.js +1 -0
  38. package/dist/components/{p-C2p0KZh4.js → p-Cj-6tqzU.js} +1 -1
  39. package/dist/components/p-CjdDpXfk.js +1 -0
  40. package/dist/components/{p-Uluc7jQ7.js → p-D54c-ybm.js} +1 -1
  41. package/dist/components/p-DdQ1eqJr.js +1 -0
  42. package/dist/components/{p-D-IYWSAa.js → p-SPZTb5fI.js} +1 -1
  43. package/dist/components/p-yT7udDfd.js +1 -0
  44. package/dist/esm/{decode-CGJIPA4t.js → decode-BgBfbPZu.js} +1 -1
  45. package/dist/esm/{index-Dq-Z8Dx0.js → index-BeHFCsWf.js} +54 -13
  46. package/dist/esm/{index-C854B63S.js → index-D-29PaRa.js} +189 -53
  47. package/dist/esm/index.js +2 -2
  48. package/dist/esm/lido-avatar_22.entry.js +60 -54
  49. package/dist/esm/lido-player.js +4 -4
  50. package/dist/esm/loader.js +3 -3
  51. package/dist/lido-player/assets/Shadow.svg +9 -0
  52. package/dist/lido-player/assets/Tracing-hand.svg +8 -0
  53. package/dist/lido-player/index.esm.js +1 -1
  54. package/dist/lido-player/lido-player.css +1 -1
  55. package/dist/lido-player/lido-player.esm.js +1 -1
  56. package/dist/lido-player/p-856e1956.entry.js +12 -0
  57. package/dist/lido-player/{p-Bg5mBsd9.js → p-BA2X6O7O.js} +1 -1
  58. package/dist/lido-player/p-BeHFCsWf.js +3 -0
  59. package/dist/lido-player/p-TuBmCgtK.js +1 -0
  60. package/dist/types/components/scale/lido-balance.d.ts +2 -2
  61. package/dist/types/components/text/lido-text.d.ts +6 -1
  62. package/dist/types/components/trace/lido-trace.d.ts +1 -1
  63. package/dist/types/components.d.ts +21 -10
  64. package/dist/types/stencil-public-runtime.d.ts +12 -0
  65. package/dist/types/utils/audioPlayer.d.ts +2 -0
  66. package/dist/types/utils/utilsHandlers/slideHandler.d.ts +5 -0
  67. package/loader/index.d.ts +1 -1
  68. package/package.json +1 -1
  69. package/dist/components/p-C7U1h9gI.js +0 -1
  70. package/dist/components/p-CS6iRQJh.js +0 -1
  71. package/dist/components/p-DGvzMlyn.js +0 -12
  72. package/dist/components/p-DPAlnts-.js +0 -1
  73. package/dist/components/p-DYs8s-uh.js +0 -1
  74. package/dist/lido-player/p-C4OTDhbr.js +0 -1
  75. package/dist/lido-player/p-Dq-Z8Dx0.js +0 -2
  76. package/dist/lido-player/p-f0e333c6.entry.js +0 -12
@@ -1 +1 @@
1
- import{t,p as i,H as e,k as s,i as o,m as n,a3 as r,c as a,a as h,h as l,b as u,Y as c}from"./index.js";const d=t=>"string"==typeof t,g=()=>{let t,i;const e=new Promise(((e,s)=>{t=e,i=s}));return e.resolve=t,e.reject=i,e},p=t=>null==t?"":""+t,f=/###/g,m=t=>t&&t.indexOf("###")>-1?t.replace(f,"."):t,y=t=>!t||d(t),b=(t,i,e)=>{const s=d(i)?i.split("."):i;let o=0;for(;o<s.length-1;){if(y(t))return{};const i=m(s[o]);!t[i]&&e&&(t[i]=new e),t=Object.prototype.hasOwnProperty.call(t,i)?t[i]:{},++o}return y(t)?{}:{obj:t,k:m(s[o])}},w=(t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);if(void 0!==s||1===i.length)return void(s[o]=e);let n=i[i.length-1],r=i.slice(0,i.length-1),a=b(t,r,Object);for(;void 0===a.obj&&r.length;)n=`${r[r.length-1]}.${n}`,r=r.slice(0,r.length-1),a=b(t,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${n}`]&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=e},v=(t,i)=>{const{obj:e,k:s}=b(t,i);if(e&&Object.prototype.hasOwnProperty.call(e,s))return e[s]},x=(t,i,e)=>{for(const s in i)"__proto__"!==s&&"constructor"!==s&&(s in t?d(t[s])||t[s]instanceof String||d(i[s])||i[s]instanceof String?e&&(t[s]=i[s]):x(t[s],i[s],e):t[s]=i[s]);return t},$=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const A=t=>d(t)?t.replace(/[&<>"'\/]/g,(t=>k[t])):t,S=[" ",",","?","!",";"],E=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(void 0!==i)return i;const e=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,e),this.regExpQueue.push(t),e}}(20),I=(t,i,e=".")=>{if(!t)return;if(t[i]){if(!Object.prototype.hasOwnProperty.call(t,i))return;return t[i]}const s=i.split(e);let o=t;for(let t=0;t<s.length;){if(!o||"object"!=typeof o)return;let i,n="";for(let r=t;r<s.length;++r)if(r!==t&&(n+=e),n+=s[r],i=o[n],void 0!==i){if(["string","number","boolean"].indexOf(typeof i)>-1&&r<s.length-1)continue;t+=r-t+1;break}o=i}return o},W=t=>t?.replace(/_/g,"-"),O={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,i){console?.[t]?.apply?.(console,i)}};class j{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||O,this.options=i,this.debug=i.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,i,e,s){return s&&!this.debug?null:(d(t[0])&&(t[0]=`${e}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new j(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new j(this.logger,t)}}var L=new j;class P{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const e=this.observers[t].get(i)||0;this.observers[t].set(i,e+1)})),this}off(t,i){this.observers[t]&&(i?this.observers[t].delete(i):delete this.observers[t])}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,e])=>{for(let s=0;s<e;s++)t(...i)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([e,s])=>{for(let o=0;o<s;o++)e.apply(e,[t,...i])}))}}class M extends P{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,e,s={}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,n=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,i],e&&(Array.isArray(e)?r.push(...e):d(e)&&o?r.push(...e.split(o)):r.push(e)));const a=v(this.data,r);return!a&&!i&&!e&&t.indexOf(".")>-1&&(t=r[0],i=r[1],e=r.slice(2).join(".")),!a&&n&&d(e)?I(this.data?.[t]?.[i],e,o):a}addResource(t,i,e,s,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[t,i];e&&(r=r.concat(n?e.split(n):e)),t.indexOf(".")>-1&&(r=t.split("."),s=i,i=r[1]),this.addNamespaces(i),w(this.data,r,s),o.silent||this.emit("added",t,i,e,s)}addResources(t,i,e,s={silent:!1}){for(const s in e)(d(e[s])||Array.isArray(e[s]))&&this.addResource(t,i,s,e[s],{silent:!0});s.silent||this.emit("added",t,i,e)}addResourceBundle(t,i,e,s,o,n={silent:!1,skipCopy:!1}){let r=[t,i];t.indexOf(".")>-1&&(r=t.split("."),s=e,e=i,i=r[1]),this.addNamespaces(i);let a=v(this.data,r)||{};n.skipCopy||(e=JSON.parse(JSON.stringify(e))),s?x(a,e,o):a={...a,...e},w(this.data,r,a),n.silent||this.emit("added",t,i,e)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return void 0!==this.getResource(t,i)}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find((t=>i[t]&&Object.keys(i[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,i,e,s,o){return t.forEach((t=>{i=this.processors[t]?.process(i,e,s,o)??i})),i}};const D=Symbol("i18next/PATH_KEY");function N(t,i){const{[D]:e}=t(function(){const t=[],i=Object.create(null);let e;return i.get=(s,o)=>(e?.revoke?.(),o===D?t:(t.push(o),e=Proxy.revocable(s,i),e.proxy)),Proxy.revocable(Object.create(null),i).proxy}()),s=i?.keySeparator??".",o=i?.nsSeparator??":";if(e.length>1&&o){const t=i?.ns,n=Array.isArray(t)?t:null;if(n&&n.length>1&&n.slice(1).includes(e[0]))return`${e[0]}${o}${e.slice(1).join(s)}`}return e.join(s)}const R={},T=t=>!d(t)&&"boolean"!=typeof t&&"number"!=typeof t;class K extends P{constructor(t,i={}){var e,s;super(),e=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{e[t]&&(s[t]=e[t])})),this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=L.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const e={...i};if(null==t)return!1;const s=this.resolve(t,e);if(void 0===s?.res)return!1;const o=T(s.res);return!1!==e.returnObjects||!o}extractFromKey(t,i){let e=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===e&&(e=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const n=e&&t.indexOf(e)>-1,r=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((t,i,e)=>{i=i||"",e=e||"";const s=S.filter((t=>i.indexOf(t)<0&&e.indexOf(t)<0));if(0===s.length)return!0;const o=E.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let n=!o.test(t);if(!n){const i=t.indexOf(e);i>0&&!o.test(t.substring(0,i))&&(n=!0)}return n})(t,e,s));if(n&&!r){const i=t.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:t,namespaces:d(o)?[o]:o};const n=t.split(e);(e!==s||e===s&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),t=n.join(s)}return{key:t,namespaces:d(o)?[o]:o}}translate(t,i,e){let s="object"==typeof i?{...i}:i;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=N(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?N(t,{...this.options,...s}):String(t)));const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=s.lng||this.language,c=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return c?o?{res:`${h}${l}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${r}`:o?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:r;const g=this.resolve(t,s);let p=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!d(s.count),v=K.hasDefaultValue(s),x=w?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",k=w&&!s.ordinal&&0===s.count,A=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${$}`]||s.defaultValue;let S=p;b&&!p&&v&&(S=A);const E=T(S),I=Object.prototype.toString.apply(S);if(!(b&&S&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(I)<0)||d(y)&&Array.isArray(S))if(b&&d(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,e));else{let i=!1,o=!1;!this.isValidLookup(p)&&v&&(i=!0,p=A),this.isValidLookup(p)||(o=!0,p=r);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,c=v&&A!==p&&this.options.updateMissing;if(o||i||c){if(this.logger.log(c?"updateKey":"missingKey",u,h,r,c?A:p),n){const t=this.resolve(r,{...s,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 i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let e=0;e<i.length;e++)t.push(i[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const e=(t,i,e)=>{const o=v&&e!==p?e:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,i,o,c,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,i,o,c,s),this.emit("missingKey",t,h,i,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const i=this.pluralResolver.getSuffixes(t,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&i.indexOf(`${this.options.pluralSeparator}zero`)<0&&i.push(`${this.options.pluralSeparator}zero`),i.forEach((i=>{e([t],r+i,s[`defaultValue${i}`]||A)}))})):e(t,r,A))}p=this.extendTranslation(p,t,s,g,e),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${r}`:r,i?p:void 0,s))}else{if(!s.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(f,S,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(g.res=t,g.usedParams=this.getUsedParamsDetails(s),g):t}if(n){const t=Array.isArray(S),i=t?[]:{},e=t?m:f;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t)){const o=`${e}${n}${t}`;i[t]=this.translate(o,v&&!p?{...s,defaultValue:T(A)?A[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),i[t]===o&&(i[t]=S[t])}p=i}}return o?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,i,e,s,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...e},e.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!e.skipInterpolation){e.interpolation&&this.interpolator.init({...e,interpolation:{...this.options.interpolation,...e.interpolation}});const n=d(t)&&(void 0!==e?.interpolation?.skipOnVariables?e.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(n){const i=t.match(this.interpolator.nestingRegexp);r=i&&i.length}let a=e.replace&&!d(e.replace)?e.replace:e;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,e.lng||this.language||s.usedLng,e),n){const i=t.match(this.interpolator.nestingRegexp);r<(i&&i.length)&&(e.nest=!1)}!e.lng&&s&&s.res&&(e.lng=this.language||s.usedLng),!1!==e.nest&&(t=this.interpolator.nest(t,((...t)=>o?.[0]!==t[0]||e.context?this.translate(...t,i):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null)),e)),e.interpolation&&this.interpolator.reset()}const n=e.postProcess||this.options.postProcess,r=d(n)?[n]:n;return null!=t&&r?.length&&!1!==e.applyPostProcessor&&(t=C.handle(r,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(e)},...e}:e,this)),t}resolve(t,i={}){let e,s,o,n,r;return d(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?N(t,{...this.options,...i}):t))),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,i),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==i.count&&!d(i.count),c=u&&!i.ordinal&&0===i.count,g=void 0!==i.context&&(d(i.context)||"number"==typeof i.context)&&""!==i.context,p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(r=t,R[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(R[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" 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((s=>{if(this.isValidLookup(e))return;n=s;const r=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(r,h,s,t,i);else{let t;u&&(t=this.pluralResolver.getSuffix(s,i.count,i));const e=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.ordinal&&0===t.indexOf(o)&&r.push(h+t.replace(o,this.options.pluralSeparator)),r.push(h+t),c&&r.push(h+e)),g){const s=`${h}${this.options.contextSeparator||"_"}${i.context}`;r.push(s),u&&(i.ordinal&&0===t.indexOf(o)&&r.push(s+t.replace(o,this.options.pluralSeparator)),r.push(s+t),c&&r.push(s+e))}}let a;for(;a=r.pop();)this.isValidLookup(e)||(o=a,e=this.getResource(s,t,a,i))})))}))})),{res:e,usedKey:s,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,i,e,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,e,s):this.resourceStore.getResource(t,i,e,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],e=t.replace&&!d(t.replace);let s=e?t.replace:t;if(e&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!e){s={...s};for(const t of i)delete s[t]}return s}static hasDefaultValue(t){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"defaultValue"===i.substring(0,12)&&void 0!==t[i])return!0;return!1}}class H{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=L.create("languageUtils")}getScriptPartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return null;const i=t.split("-");return 2===i.length?null:(i.pop(),"x"===i[i.length-1].toLowerCase()?null:this.formatLanguageCode(i.join("-")))}getLanguagePartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(d(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch(t){}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(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.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach((t=>{if(i)return;const e=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(e)||(i=e)})),!i&&this.options.supportedLngs&&t.forEach((t=>{if(i)return;const e=this.getScriptPartFromCode(t);if(this.isSupportedCode(e))return i=e;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return i=s;i=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if("function"==typeof t&&(t=t(i)),d(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let e=t[i];return e||(e=t[this.getScriptPartFromCode(i)]),e||(e=t[this.formatLanguageCode(i)]),e||(e=t[this.getLanguagePartFromCode(i)]),e||(e=t.default),e||[]}toResolveHierarchy(t,i){const e=this.getFallbackCodes((!1===i?[]:i)||this.options.fallbackLng||[],t),s=[],o=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return d(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):d(t)&&o(this.formatLanguageCode(t)),e.forEach((t=>{s.indexOf(t)<0&&o(this.formatLanguageCode(t))})),s}}const z={zero:0,one:1,two:2,few:3,many:4,other:5},B={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=L.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const e=W("dev"===t?"en":t),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:e,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(e,{type:s})}catch(e){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),B;if(!t.match(/-|_/))return B;const s=this.languageUtils.getLanguagePartFromCode(t);n=this.getRule(s,i)}return this.pluralRulesCache[o]=n,n}needsPlural(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,e={}){return this.getSuffixes(t,e).map((t=>`${i}${t}`))}getSuffixes(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?e.resolvedOptions().pluralCategories.sort(((t,i)=>z[t]-z[i])).map((t=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,i,e={}){const s=this.getRule(t,e);return s?`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,e))}}const V=(t,i,e,s=".",o=!0)=>{let n=((t,i,e)=>{const s=v(t,e);return void 0!==s?s:v(i,e)})(t,i,e);return!n&&o&&d(e)&&(n=I(t,e,s),void 0===n&&(n=I(i,e,s))),n},q=t=>t.replace(/\$/g,"$$$$");class _{constructor(t={}){this.logger=L.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:i,escapeValue:e,useRawValueToEscape:s,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:g,nestingSuffixEscaped:p,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==i?i:A,this.escapeValue=void 0===e||e,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):n||"{{",this.suffix=r?$(r):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=c?$(c):d||$("$t("),this.nestingSuffix=g?$(g):p||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"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,i,e,s){let o,n,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const o=V(i,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,e,{...s,...i,interpolationkey:t}):o}const o=t.split(this.formatSeparator),n=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(V(i,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,e,{...s,...i,interpolationkey:n})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>q(t)},{regex:this.regexp,safeValue:t=>q(this.escapeValue?this.escape(t):t)}].forEach((i=>{for(r=0;o=i.regex.exec(t);){const e=o[1].trim();if(n=h(e),void 0===n)if("function"==typeof l){const i=l(t,o,s);n=d(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,e))n="";else{if(u){n=o[0];continue}this.logger.warn(`missed to pass in variable ${e} for interpolating ${t}`),n=""}else d(n)||this.useRawValueToEscape||(n=p(n));const a=i.safeValue(n);if(t=t.replace(o[0],a),u?(i.regex.lastIndex+=n.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,i,e={}){let s,o,n;const r=(t,i)=>{const e=this.nestingOptionsSeparator;if(t.indexOf(e)<0)return t;const s=t.split(new RegExp(`${$(e)}[ ]*{`));let o=`{${s[1]}`;t=s[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),i&&(n={...i,...n})}catch(i){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,i),`${t}${e}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];n={...e},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),o=i(r.call(this,s[1].trim(),n),n),o&&s[0]===t&&!d(o))return o;d(o)||(o=p(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce(((t,i)=>this.format(t,i,e.lng,{...e,interpolationkey:s[1].trim()})),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const U=t=>{const i={};return(e,s,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=s+JSON.stringify(n);let a=i[r];return a||(a=t(W(s),o),i[r]=a),a(e)}},J=t=>(i,e,s)=>t(W(e),s)(i);class Y{constructor(t={}){this.logger=L.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const e=i.cacheInBuiltFormats?U:J;this.formats={number:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i});return t=>e.format(t)})),currency:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i,style:"currency"});return t=>e.format(t)})),datetime:e(((t,i)=>{const e=new Intl.DateTimeFormat(t,{...i});return t=>e.format(t)})),relativetime:e(((t,i)=>{const e=new Intl.RelativeTimeFormat(t,{...i});return t=>e.format(t,i.range||"day")})),list:e(((t,i)=>{const e=new Intl.ListFormat(t,{...i});return t=>e.format(t)}))}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=U(i)}format(t,i,e,s={}){const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}return o.reduce(((t,i)=>{const{formatName:o,formatOptions:n}=(t=>{let i=t.toLowerCase().trim();const e={};if(t.indexOf("(")>-1){const s=t.split("(");i=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===i&&o.indexOf(":")<0?e.currency||(e.currency=o.trim()):"relativetime"===i&&o.indexOf(":")<0?e.range||(e.range=o.trim()):o.split(";").forEach((t=>{if(t){const[i,...s]=t.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),n=i.trim();e[n]||(e[n]=o),"false"===o&&(e[n]=!1),"true"===o&&(e[n]=!0),isNaN(o)||(e[n]=parseInt(o,10))}}))}return{formatName:i,formatOptions:e}})(i);if(this.formats[o]){let i=t;try{const r=s?.formatParams?.[s.interpolationkey]||{};i=this.formats[o](t,r.locale||r.lng||s.locale||s.lng||e,{...n,...s,...r})}catch(t){this.logger.warn(t)}return i}return this.logger.warn(`there was no format function for ${o}`),t}),t)}}class G extends P{constructor(t,i,e,s={}){super(),this.backend=t,this.store=i,this.services=e,this.languageUtils=e.languageUtils,this.options=s,this.logger=L.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(e,s.backend,s)}queueLoad(t,i,e,s){const o={},n={},r={},a={};return t.forEach((t=>{let s=!0;i.forEach((i=>{const r=`${t}|${i}`;!e.reload&&this.store.hasResourceBundle(t,i)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,s=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[i]&&(a[i]=!0)))})),s||(r[t]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,i,e){const s=t.split("|"),o=s[0],n=s[1];i&&this.emit("failedLoading",o,n,i),!i&&e&&this.store.addResourceBundle(o,n,e,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&e&&(this.state[t]=0);const r={};this.queue.forEach((e=>{((t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);s[o]=s[o]||[],s[o].push(e)})(e.loaded,[o],n),((t,i)=>{void 0!==t.pending[i]&&(delete t.pending[i],t.pendingCount--)})(e,t),i&&e.errors.push(i),0!==e.pendingCount||e.done||(Object.keys(e.loaded).forEach((t=>{r[t]||(r[t]={});const i=e.loaded[t];i.length&&i.forEach((i=>{void 0===r[t][i]&&(r[t][i]=!0)}))})),e.done=!0,e.errors.length?e.callback(e.errors):e.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((t=>!t.done))}read(t,i,e,s=0,o=this.retryTimeout,n){if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:i,fcName:e,tried:s,wait:o,callback:n});this.readingCalls++;const r=(r,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)}r&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,i,e,s+1,2*o,n)}),o):n(r,a)},a=this.backend[e].bind(this.backend);if(2!==a.length)return a(t,i,r);try{const e=a(t,i);e&&"function"==typeof e.then?e.then((t=>r(null,t))).catch(r):r(null,e)}catch(t){r(t)}}prepareLoading(t,i,e={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(t)&&(t=this.languageUtils.toResolveHierarchy(t)),d(i)&&(i=[i]);const o=this.queueLoad(t,i,e,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,i,e){this.prepareLoading(t,i,{},e)}reload(t,i,e){this.prepareLoading(t,i,{reload:!0},e)}loadOne(t,i=""){const e=t.split("|"),s=e[0],o=e[1];this.read(s,o,"read",void 0,void 0,((e,n)=>{e&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,e),!e&&n&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,n),this.loaded(t,e,n)}))}saveMissing(t,i,e,s,o,n={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(i)){if(null!=e&&""!==e){if(this.backend?.create){const a={...n,isUpdate:o},h=this.backend.create.bind(this.backend);if(h.length<6)try{let o;o=5===h.length?h(t,i,e,s,a):h(t,i,e,s),o&&"function"==typeof o.then?o.then((t=>r(null,t))).catch(r):r(null,o)}catch(t){r(t)}else h(t,i,e,s,r,a)}t&&t[0]&&this.store.addResource(t[0],i,e,s)}}else this.logger.warn(`did not save key "${e}" as the namespace "${i}" 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 Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let i={};if("object"==typeof t[1]&&(i=t[1]),d(t[1])&&(i.defaultValue=t[1]),d(t[2])&&(i.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{i[t]=e[t]}))}return i},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(d(t.ns)&&(t.ns=[t.ns]),d(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),d(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),X=()=>{},tt="__i18next_supportNoticeShown";class it extends P{constructor(t={},i){var e;if(super(),this.options=Z(t),this.services={},this.logger=L,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout((()=>{this.init(t,i)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const e=Q();var s;this.options={...e,...this.options,...Z(t)},this.options.interpolation={...e.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=e.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[tt]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[tt]=!0));const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;L.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Y;const i=new H(this.options);this.store=new M(this.options.resources,this.options);const s=this.services;s.logger=L,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new F(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format||(s.formatter=o(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new _(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new G(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=X),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]=(...i)=>this.store[t](...i)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...i)=>(this.store[t](...i),this)}));const n=g(),r=()=>{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),n.resolve(e),i(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),n}loadResources(t,i=X){let e=i;const s=d(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=i=>{i&&"cimode"!==i&&this.services.languageUtils.toResolveHierarchy(i).forEach((i=>{"cimode"!==i&&t.indexOf(i)<0&&t.push(i)}))};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload?.forEach?.((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,i,e){const s=g();return"function"==typeof t&&(e=t,t=void 0),"function"==typeof i&&(e=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),e||(e=X),this.services.backendConnector.reload(t,i,(t=>{s.resolve(),e(t)})),s}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&&C.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"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const e=g();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(o,n)=>{n?this.isLanguageChangingTo===t&&(s(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,e.resolve(((...t)=>this.t(...t))),i&&i(o,((...t)=>this.t(...t)))},n=i=>{t||i||!this.services.languageDetector||(i=[]);const e=d(i)?i:i&&i[0],n=this.store.hasLanguageSomeTranslations(e)?e:this.services.languageUtils.getBestMatchFromCodes(d(i)?[i]:i);n&&(this.language||s(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(n):this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect()),e}getFixedT(t,i,e){const s=(t,i,...o)=>{let n;n="object"!=typeof i?this.options.overloadTranslationOptionHandler([t,i].concat(o)):{...i},n.lng=n.lng||s.lng,n.lngs=n.lngs||s.lngs,n.ns=n.ns||s.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||e||s.keyPrefix);const r={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,r));const a=this.options.keySeparator||".";let h;return n.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=N(t,r)),`${n.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=N(t,r)),h=n.keyPrefix?`${n.keyPrefix}${a}${t}`:t),this.t(h,n)};return d(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=e,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){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 e=i.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===e.toLowerCase())return!0;const n=(t,i)=>{const e=this.services.backendConnector.state[`${t}|${i}`];return-1===e||0===e||2===e};if(i.precheck){const t=i.precheck(this,n);if(void 0!==t)return t}return!(!this.hasResourceBundle(e,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(e,t)||s&&!n(o,t)))}loadNamespaces(t,i){const e=g();return this.options.ns?(d(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}loadLanguages(t,i){const e=g();d(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=s.concat(o),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(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 i=new Intl.Locale(t);if(i&&i.getTextInfo){const t=i.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const i=this.services?.languageUtils||new H(Q());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"].indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const e=new it(t,i);return e.createInstance=it.createInstance,e}cloneInstance(t={},i=X){const e=t.forkResourceStore;e&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new it(s);if(void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},e){const t=Object.keys(this.store.data).reduce(((t,i)=>(t[i]={...this.store.data[i]},t[i]=Object.keys(t[i]).reduce(((e,s)=>(e[s]={...t[i][s]},e)),t[i]),t)),{});o.store=new M(t,s),o.services.resourceStore=o.store}if(t.interpolation){const i={...Q().interpolation,...this.options.interpolation,...t.interpolation},e={...s,interpolation:i};o.services.interpolator=new _(e)}return o.translator=new K(o.services,s),o.translator.on("*",((t,...i)=>{o.emit(t,...i)})),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=it.createInstance(),{slice:st,forEach:ot}=[],nt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rt={create(t,i,e,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};e&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*e*1e3)),s&&(o.domain=s),document.cookie=function(t,i){const e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(i)}`;if(e.maxAge>0){const t=e.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(e.domain){if(!nt.test(e.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${e.domain}`}if(e.path){if(!nt.test(e.path))throw new TypeError("option path is invalid");s+=`; Path=${e.path}`}if(e.expires){if("function"!=typeof e.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${e.expires.toUTCString()}`}if(e.httpOnly&&(s+="; HttpOnly"),e.secure&&(s+="; Secure"),e.sameSite)switch("string"==typeof e.sameSite?e.sameSite.toLowerCase():e.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return e.partitioned&&(s+="; Partitioned"),s}(t,i,o)},read(t){const i=`${t}=`,e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return null},remove(t,i){this.create(t,"",-1,i)}};var at={name:"cookie",lookup(t){let{lookupCookie:i}=t;if(i&&"undefined"!=typeof document)return rt.read(i)||void 0},cacheUserLanguage(t,i){let{lookupCookie:e,cookieMinutes:s,cookieDomain:o,cookieOptions:n}=i;e&&"undefined"!=typeof document&&rt.create(e,t,s,o,n)}},ht={name:"querystring",lookup(t){let i,{lookupQuerystring:e}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const o=s[t].indexOf("=");o>0&&s[t].substring(0,o)===e&&(i=s[t].substring(o+1))}}return i}},lt={name:"hash",lookup(t){let i,{lookupHash:e,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const o=t.substring(1);if(e){const t=o.split("&");for(let s=0;s<t.length;s++){const o=t[s].indexOf("=");o>0&&t[s].substring(0,o)===e&&(i=t[s].substring(o+1))}}if(i)return i;if(!i&&s>-1){const i=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const e="number"==typeof s?s:0;return i[e]?.replace("/","")}}}return i}};let ut=null;const ct=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var dt={name:"localStorage",lookup(t){let{lookupLocalStorage:i}=t;if(i&&ct())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupLocalStorage:e}=i;e&&ct()&&window.localStorage.setItem(e,t)}};let gt=null;const pt=()=>{if(null!==gt)return gt;try{if(gt="undefined"!=typeof window&&null!==window.sessionStorage,!gt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){gt=!1}return gt};var ft={name:"sessionStorage",lookup(t){let{lookupSessionStorage:i}=t;if(i&&pt())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupSessionStorage:e}=i;e&&pt()&&window.sessionStorage.setItem(e,t)}},mt={name:"navigator",lookup(t){const i=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:e,language:s}=navigator;if(t)for(let e=0;e<t.length;e++)i.push(t[e]);e&&i.push(e),s&&i.push(s)}return i.length>0?i:void 0}},yt={name:"htmlTag",lookup(t){let i,{htmlTag:e}=t;const s=e||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(i=s.getAttribute("lang")),i}},bt={name:"path",lookup(t){let{lookupFromPathIndex:i}=t;if("undefined"==typeof window)return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const s="number"==typeof i?i:0;return e[s]?.replace("/","")}},wt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:i}=t;const e="number"==typeof i?i+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[e]}};let vt=!1;try{vt=!0}catch(t){}const xt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vt||xt.splice(1,1);class $t{constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return ot.call(st.call(arguments,1),(i=>{if(i)for(const e in i)void 0===t[e]&&(t[e]=i[e])})),t}(t,this.options||{},{order:xt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(at),this.addDetector(ht),this.addDetector(dt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(bt),this.addDetector(wt),this.addDetector(lt)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((i=>{if(this.detectors[i]){let e=this.detectors[i].lookup(this.options);e&&"string"==typeof e&&(e=[e]),e&&(t=t.concat(e))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(i=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(i))));var i})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach((i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(t,this.options)})))}}$t.type="languageDetector";et.use($t).init({resources:{en:{translation:{"Do you want to exit? button":"Do you want to exit?","Exit button":"Exit","Continue playing button":"Continue playing","Drop the elements to match the given symbol order":"Drop the elements to match the given symbol order","Fill in the blanks":"Fill in the blanks",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageEngAudio",substractionWithoutImage:"substractionWithoutImageEngAudio",numberIdentificationWithImage:"numberIdentificationWithImageEngAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageEngAudio",wordBuildingWithImage:"wordBuildingWithImageEngAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageEngAudio",pictureClues:"pictureCluesEngAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesEngAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageEngAudio",sentenceMatch:"sentenceMatchEngAudio",imageMatch:"imageMatchEngAudio",palStoryTale:"palStoryTaleEngAudio",palEgmaPatternMatching:"palEgmaPatternMatchingEngAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropEngAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickEngAudio",palEgraOddOneOut:"palEgraOddOneOutEngAudio",palEgraArrangePictures:"palEgraArrangePicturesEngAudio",palEgraBuildWord:"palEgraBuildWordEngAudio",palEgraWordFormation:"palEgraWordFormationEngAudio",palInventedSpelling:"palInventedSpellingEngAudio",palLetterIdentification:"palLetterIdentificationEngAudio",palStoryMaking:"palStoryMakingEngAudio",palegmasumtogether:"palegmasumtogetherEngAudio",palegmamultioption:"palegmamultioptionEngAudio",palegraoptionaudio:"palegraoptionaudioEngAudio",palegrawordmatch:"palegrawordmatchEngAudio",palegramcqimages:"palegramcqimagesEngAudio"}}},fr:{translation:{"Do you want to exit? button":"Voulez-vous quitter?","Exit button":"Quitter","Continue playing button":"Continuer à jouer","Drop the elements to match the given symbol order":"Déposez les éléments pour correspondre au symbole donné","Fill in the blanks":"Remplissez les blancs",instruction:{dragAndDrop:"Faites glisser les objets vers le bon emplacement.",mcq:"Choisissez la bonne réponse parmi les options proposées.",tracing:"Tracez soigneusement la forme en suivant la ligne.",flashcards:"Regardez les cartes mémoire pour renforcer l’apprentissage."}}},hi:{translation:{"Do you want to exit? button":"क्या आप बाहर निकलना चाहते हैं?","Exit button":"बाहर निकलें","Continue playing button":"खेलना जारी रखें","Drop the elements to match the given symbol order":"दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें","Fill in the blanks":"रिक्त स्थान भरें",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageHiAudio",substractionWithoutImage:"substractionWithoutImageHiAudio",numberIdentificationWithImage:"numberIdentificationWithImageHiAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageHiAudio",wordBuildingWithImage:"wordBuildingWithImageHiAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageHiAudio",pictureClues:"pictureCluesHiAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesHiAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageHiAudio",sentenceMatch:"sentenceMatchHiAudio",imageMatch:"imageMatchHiAudio",palStoryTale:"palStoryTaleHiAudio",palEgmaPatternMatching:"palEgmaPatternMatchingHiAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropHiAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickHiAudio",palEgraOddOneOut:"palEgraOddOneOutHiAudio",palEgraArrangePictures:"palEgraArrangePicturesHiAudio",palEgraBuildWord:"palEgraBuildWordHiAudio",palEgraWordFormation:"palEgraWordFormationHiAudio",palInventedSpelling:"palInventedSpellingHiAudio",palLetterIdentification:"palLetterIdentificationHiAudio",palStoryMaking:"palStoryMakingHiAudio",palegmasumtogether:"palegmasumtogetherHiAudio",palegmamultioption:"palegmamultioptionHiAudio",palegraoptionaudio:"palegraoptionaudioHiAudio",palegrawordmatch:"palegrawordmatchHiAudio",palegramcqimages:"palegramcqimagesHiAudio"}}},kn:{translation:{"Do you want to exit? button":"ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?","Exit button":"ನಿರ್ಗಮಿಸು","Continue playing button":"ಆಟವನ್ನು ಮುಂದುವರಿಸಿ","Drop the elements to match the given symbol order":"ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageKaAudio",substractionWithoutImage:"substractionWithoutImageKaAudio",numberIdentificationWithImage:"numberIdentificationWithImageKaAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageKaAudio",wordBuildingWithImage:"wordBuildingWithImageKaAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageKaAudio",pictureClues:"pictureCluesKaAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesKaAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageKaAudio",sentenceMatch:"sentenceMatchKaAudio",imageMatch:"imageMatchKaAudio",palStoryTale:"palStoryTaleKaAudio",palEgmaPatternMatching:"palEgmaPatternMatchingKaAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropKaAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickKaAudio",palEgraOddOneOut:"palEgraOddOneOutKaAudio",palEgraArrangePictures:"palEgraArrangePicturesKaAudio",palEgraBuildWord:"palEgraBuildWordKaAudio",palEgraWordFormation:"palEgraWordFormationKaAudio",palInventedSpelling:"palInventedSpellingKaAudio",palLetterIdentification:"palLetterIdentificationKaAudio",palStoryMaking:"palStoryMakingKaAudio",palegmasumtogether:"palegmasumtogetherKaAudio",palegmamultioption:"palegmamultioptionKaAudio",palegraoptionaudio:"palegraoptionaudioKaAudio",palegrawordmatch:"palegrawordmatchKaAudio",palegramcqimages:"palegramcqimagesKaAudio"}}},te:{translation:{"Do you want to exit? button":"మీరు బయటకు వెళ్లాలనుకుంటున్నారా?","Exit button":"బయటకు వెళ్ళు","Continue playing button":"ఆటను కొనసాగించు","Drop the elements to match the given symbol order":"ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయಂడಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"}},pt:{translation:{"Do you want to exit? button":"Você deseja sair?","Exit button":"Sair","Continue playing button":"Continuar jogando","Drop the elements to match the given symbol order":"Solte os elementos para corresponder à ordem dos símbolos fornecida","Fill in the blanks":"Preencha os espaços em branco"}},mr:{translation:{"Do you want to exit? button":"तुम्हाला बाहेर पडायचे आहे का?","Exit button":"बाहेर पडा","Continue playing button":"खेळ सुरू ठेवा",instruction:{dragAndDrop:"वस्तू योग्य ठिकाणी ओढून आणि सोडून जुळवा.",mcq:"दिलेल्या पर्यायांमधून योग्य उत्तर निवडा.",tracing:"रेषेचा काळजीपूर्वक मागोवा घेत आकृती काढा.",flashcards:"तुमचे शिक्षण मजबूत करण्यासाठी फ्लॅशकार्ड्स पाहा."}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},detection:{order:["querystring","localStorage","navigator","htmlTag"],caches:["localStorage"]}});const kt=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.string="",this.fontFamily="",this.fontSize="20px",this.fontColor="",this.highlightWhileSpeaking=!1,this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.move="false",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.borderImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.minDrops=1,this.maxDrops=1,this.onEntry="",this.margin="",this.padding="",this.borderRadius="0px",this.spanType="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(s(this.el,this.delayVisible),o(this.el,this.type),"words"!==this.spanType&&"letters"!==this.spanType||this.addSpanToText(),this.showSpeakIcon&&n(this.el),!this.audio||""===this.audio.trim()){const t=()=>{const t=this.resolveAutoAudio();t&&(this.audio=t)};window.__LIDO_COMMON_AUDIO_PATH__?t():window.addEventListener(r,t,{once:!0})}}resolveAutoAudio(){const t=window[c];return t&&this.string?`${t}/${this.string}.mp3`:null}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=this.borderImage?a(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,i),width:h(this.width,i),backgroundColor:h(this.bgColor,i),top:h(this.y,i),left:h(this.x,i),zIndex:this.z,fontSize:h(this.fontSize,i),fontFamily:this.fontFamily,color:h(this.fontColor,i),display:"true"===h(`${this.visible}`,i)?"flex":"none",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",margin:h(this.margin,i),padding:h(this.padding,i),borderRadius:h(this.borderRadius,i)}}async addSpanToText(){const t=this.el.querySelector(".lido-text-content");if(!t)return;const i=t.textContent||"";t.innerHTML="","letters"===this.spanType&&i.split("").forEach((i=>{if(""===i.trim())return;const e=document.createElement("span");e.textContent=i,e.className="text-letters",t.appendChild(e)})),"words"===this.spanType&&i.split(" ").forEach((i=>{const e=document.createElement("span");e.textContent=i,e.className="text-words",t.appendChild(e)}))}render(){return l(u,{key:"30e77a008aba08f90f88541574f70588bb8a2cd6",class:"lido-text",value:this.value,type:this.type,"tab-index":this.tabIndex,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,minDrops:this.minDrops,maxDrops:this.maxDrops,id:this.id,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,move:this.move,"span-type":this.spanType,"disable-speak":`${this.disableSpeak}`},""!==this.spanType?l("div",{class:"lido-text-content"}," ",et.t(this.string)):et.t(this.string))}get el(){return this}static get style(){return".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}"}},[0,"lido-text",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],string:[1],fontFamily:[1,"font-family"],fontSize:[1,"font-size"],fontColor:[1,"font-color"],highlightWhileSpeaking:[4,"highlight-while-speaking"],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],move:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],borderImage:[1,"border-image"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],onEntry:[1,"on-entry"],margin:[1],padding:[1],borderRadius:[1,"border-radius"],spanType:[1,"span-type"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function At(){"undefined"!=typeof customElements&&["lido-text"].forEach((i=>{"lido-text"===i&&(customElements.get(t(i))||customElements.define(t(i),kt))}))}At();export{kt as L,At as d,et as i}
1
+ import{t,p as i,H as e,k as s,i as o,m as n,a3 as r,c as a,a as h,h as l,b as u,Y as c}from"./index.js";const d=t=>"string"==typeof t,g=()=>{let t,i;const e=new Promise(((e,s)=>{t=e,i=s}));return e.resolve=t,e.reject=i,e},p=t=>null==t?"":""+t,f=/###/g,m=t=>t&&t.indexOf("###")>-1?t.replace(f,"."):t,y=t=>!t||d(t),b=(t,i,e)=>{const s=d(i)?i.split("."):i;let o=0;for(;o<s.length-1;){if(y(t))return{};const i=m(s[o]);!t[i]&&e&&(t[i]=new e),t=Object.prototype.hasOwnProperty.call(t,i)?t[i]:{},++o}return y(t)?{}:{obj:t,k:m(s[o])}},w=(t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);if(void 0!==s||1===i.length)return void(s[o]=e);let n=i[i.length-1],r=i.slice(0,i.length-1),a=b(t,r,Object);for(;void 0===a.obj&&r.length;)n=`${r[r.length-1]}.${n}`,r=r.slice(0,r.length-1),a=b(t,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${n}`]&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=e},v=(t,i)=>{const{obj:e,k:s}=b(t,i);if(e&&Object.prototype.hasOwnProperty.call(e,s))return e[s]},x=(t,i,e)=>{for(const s in i)"__proto__"!==s&&"constructor"!==s&&(s in t?d(t[s])||t[s]instanceof String||d(i[s])||i[s]instanceof String?e&&(t[s]=i[s]):x(t[s],i[s],e):t[s]=i[s]);return t},$=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const A=t=>d(t)?t.replace(/[&<>"'\/]/g,(t=>k[t])):t,S=[" ",",","?","!",";"],E=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(void 0!==i)return i;const e=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,e),this.regExpQueue.push(t),e}}(20),I=(t,i,e=".")=>{if(!t)return;if(t[i]){if(!Object.prototype.hasOwnProperty.call(t,i))return;return t[i]}const s=i.split(e);let o=t;for(let t=0;t<s.length;){if(!o||"object"!=typeof o)return;let i,n="";for(let r=t;r<s.length;++r)if(r!==t&&(n+=e),n+=s[r],i=o[n],void 0!==i){if(["string","number","boolean"].indexOf(typeof i)>-1&&r<s.length-1)continue;t+=r-t+1;break}o=i}return o},W=t=>t?.replace(/_/g,"-"),O={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,i){console?.[t]?.apply?.(console,i)}};class j{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||O,this.options=i,this.debug=i.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,i,e,s){return s&&!this.debug?null:(d(t[0])&&(t[0]=`${e}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new j(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new j(this.logger,t)}}var L=new j;class P{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const e=this.observers[t].get(i)||0;this.observers[t].set(i,e+1)})),this}off(t,i){this.observers[t]&&(i?this.observers[t].delete(i):delete this.observers[t])}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,e])=>{for(let s=0;s<e;s++)t(...i)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([e,s])=>{for(let o=0;o<s;o++)e.apply(e,[t,...i])}))}}class M extends P{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,e,s={}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,n=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,i],e&&(Array.isArray(e)?r.push(...e):d(e)&&o?r.push(...e.split(o)):r.push(e)));const a=v(this.data,r);return!a&&!i&&!e&&t.indexOf(".")>-1&&(t=r[0],i=r[1],e=r.slice(2).join(".")),!a&&n&&d(e)?I(this.data?.[t]?.[i],e,o):a}addResource(t,i,e,s,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[t,i];e&&(r=r.concat(n?e.split(n):e)),t.indexOf(".")>-1&&(r=t.split("."),s=i,i=r[1]),this.addNamespaces(i),w(this.data,r,s),o.silent||this.emit("added",t,i,e,s)}addResources(t,i,e,s={silent:!1}){for(const s in e)(d(e[s])||Array.isArray(e[s]))&&this.addResource(t,i,s,e[s],{silent:!0});s.silent||this.emit("added",t,i,e)}addResourceBundle(t,i,e,s,o,n={silent:!1,skipCopy:!1}){let r=[t,i];t.indexOf(".")>-1&&(r=t.split("."),s=e,e=i,i=r[1]),this.addNamespaces(i);let a=v(this.data,r)||{};n.skipCopy||(e=JSON.parse(JSON.stringify(e))),s?x(a,e,o):a={...a,...e},w(this.data,r,a),n.silent||this.emit("added",t,i,e)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return void 0!==this.getResource(t,i)}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find((t=>i[t]&&Object.keys(i[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,i,e,s,o){return t.forEach((t=>{i=this.processors[t]?.process(i,e,s,o)??i})),i}};const D=Symbol("i18next/PATH_KEY");function N(t,i){const{[D]:e}=t(function(){const t=[],i=Object.create(null);let e;return i.get=(s,o)=>(e?.revoke?.(),o===D?t:(t.push(o),e=Proxy.revocable(s,i),e.proxy)),Proxy.revocable(Object.create(null),i).proxy}()),s=i?.keySeparator??".",o=i?.nsSeparator??":";if(e.length>1&&o){const t=i?.ns,n=Array.isArray(t)?t:null;if(n&&n.length>1&&n.slice(1).includes(e[0]))return`${e[0]}${o}${e.slice(1).join(s)}`}return e.join(s)}const R={},T=t=>!d(t)&&"boolean"!=typeof t&&"number"!=typeof t;class K extends P{constructor(t,i={}){var e,s;super(),e=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{e[t]&&(s[t]=e[t])})),this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=L.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const e={...i};if(null==t)return!1;const s=this.resolve(t,e);if(void 0===s?.res)return!1;const o=T(s.res);return!1!==e.returnObjects||!o}extractFromKey(t,i){let e=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===e&&(e=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const n=e&&t.indexOf(e)>-1,r=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((t,i,e)=>{i=i||"",e=e||"";const s=S.filter((t=>i.indexOf(t)<0&&e.indexOf(t)<0));if(0===s.length)return!0;const o=E.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let n=!o.test(t);if(!n){const i=t.indexOf(e);i>0&&!o.test(t.substring(0,i))&&(n=!0)}return n})(t,e,s));if(n&&!r){const i=t.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:t,namespaces:d(o)?[o]:o};const n=t.split(e);(e!==s||e===s&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),t=n.join(s)}return{key:t,namespaces:d(o)?[o]:o}}translate(t,i,e){let s="object"==typeof i?{...i}:i;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=N(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?N(t,{...this.options,...s}):String(t)));const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=s.lng||this.language,c=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return c?o?{res:`${h}${l}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${r}`:o?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:r;const g=this.resolve(t,s);let p=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!d(s.count),v=K.hasDefaultValue(s),x=w?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",k=w&&!s.ordinal&&0===s.count,A=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${$}`]||s.defaultValue;let S=p;b&&!p&&v&&(S=A);const E=T(S),I=Object.prototype.toString.apply(S);if(!(b&&S&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(I)<0)||d(y)&&Array.isArray(S))if(b&&d(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,e));else{let i=!1,o=!1;!this.isValidLookup(p)&&v&&(i=!0,p=A),this.isValidLookup(p)||(o=!0,p=r);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,c=v&&A!==p&&this.options.updateMissing;if(o||i||c){if(this.logger.log(c?"updateKey":"missingKey",u,h,r,c?A:p),n){const t=this.resolve(r,{...s,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 i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let e=0;e<i.length;e++)t.push(i[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const e=(t,i,e)=>{const o=v&&e!==p?e:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,i,o,c,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,i,o,c,s),this.emit("missingKey",t,h,i,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const i=this.pluralResolver.getSuffixes(t,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&i.indexOf(`${this.options.pluralSeparator}zero`)<0&&i.push(`${this.options.pluralSeparator}zero`),i.forEach((i=>{e([t],r+i,s[`defaultValue${i}`]||A)}))})):e(t,r,A))}p=this.extendTranslation(p,t,s,g,e),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${r}`:r,i?p:void 0,s))}else{if(!s.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(f,S,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(g.res=t,g.usedParams=this.getUsedParamsDetails(s),g):t}if(n){const t=Array.isArray(S),i=t?[]:{},e=t?m:f;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t)){const o=`${e}${n}${t}`;i[t]=this.translate(o,v&&!p?{...s,defaultValue:T(A)?A[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),i[t]===o&&(i[t]=S[t])}p=i}}return o?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,i,e,s,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...e},e.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!e.skipInterpolation){e.interpolation&&this.interpolator.init({...e,interpolation:{...this.options.interpolation,...e.interpolation}});const n=d(t)&&(void 0!==e?.interpolation?.skipOnVariables?e.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(n){const i=t.match(this.interpolator.nestingRegexp);r=i&&i.length}let a=e.replace&&!d(e.replace)?e.replace:e;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,e.lng||this.language||s.usedLng,e),n){const i=t.match(this.interpolator.nestingRegexp);r<(i&&i.length)&&(e.nest=!1)}!e.lng&&s&&s.res&&(e.lng=this.language||s.usedLng),!1!==e.nest&&(t=this.interpolator.nest(t,((...t)=>o?.[0]!==t[0]||e.context?this.translate(...t,i):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null)),e)),e.interpolation&&this.interpolator.reset()}const n=e.postProcess||this.options.postProcess,r=d(n)?[n]:n;return null!=t&&r?.length&&!1!==e.applyPostProcessor&&(t=C.handle(r,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(e)},...e}:e,this)),t}resolve(t,i={}){let e,s,o,n,r;return d(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?N(t,{...this.options,...i}):t))),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,i),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==i.count&&!d(i.count),c=u&&!i.ordinal&&0===i.count,g=void 0!==i.context&&(d(i.context)||"number"==typeof i.context)&&""!==i.context,p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(r=t,R[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(R[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" 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((s=>{if(this.isValidLookup(e))return;n=s;const r=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(r,h,s,t,i);else{let t;u&&(t=this.pluralResolver.getSuffix(s,i.count,i));const e=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.ordinal&&0===t.indexOf(o)&&r.push(h+t.replace(o,this.options.pluralSeparator)),r.push(h+t),c&&r.push(h+e)),g){const s=`${h}${this.options.contextSeparator||"_"}${i.context}`;r.push(s),u&&(i.ordinal&&0===t.indexOf(o)&&r.push(s+t.replace(o,this.options.pluralSeparator)),r.push(s+t),c&&r.push(s+e))}}let a;for(;a=r.pop();)this.isValidLookup(e)||(o=a,e=this.getResource(s,t,a,i))})))}))})),{res:e,usedKey:s,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,i,e,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,e,s):this.resourceStore.getResource(t,i,e,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],e=t.replace&&!d(t.replace);let s=e?t.replace:t;if(e&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!e){s={...s};for(const t of i)delete s[t]}return s}static hasDefaultValue(t){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"defaultValue"===i.substring(0,12)&&void 0!==t[i])return!0;return!1}}class H{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=L.create("languageUtils")}getScriptPartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return null;const i=t.split("-");return 2===i.length?null:(i.pop(),"x"===i[i.length-1].toLowerCase()?null:this.formatLanguageCode(i.join("-")))}getLanguagePartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(d(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch(t){}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(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.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach((t=>{if(i)return;const e=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(e)||(i=e)})),!i&&this.options.supportedLngs&&t.forEach((t=>{if(i)return;const e=this.getScriptPartFromCode(t);if(this.isSupportedCode(e))return i=e;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return i=s;i=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if("function"==typeof t&&(t=t(i)),d(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let e=t[i];return e||(e=t[this.getScriptPartFromCode(i)]),e||(e=t[this.formatLanguageCode(i)]),e||(e=t[this.getLanguagePartFromCode(i)]),e||(e=t.default),e||[]}toResolveHierarchy(t,i){const e=this.getFallbackCodes((!1===i?[]:i)||this.options.fallbackLng||[],t),s=[],o=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return d(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):d(t)&&o(this.formatLanguageCode(t)),e.forEach((t=>{s.indexOf(t)<0&&o(this.formatLanguageCode(t))})),s}}const z={zero:0,one:1,two:2,few:3,many:4,other:5},B={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=L.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const e=W("dev"===t?"en":t),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:e,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(e,{type:s})}catch(e){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),B;if(!t.match(/-|_/))return B;const s=this.languageUtils.getLanguagePartFromCode(t);n=this.getRule(s,i)}return this.pluralRulesCache[o]=n,n}needsPlural(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,e={}){return this.getSuffixes(t,e).map((t=>`${i}${t}`))}getSuffixes(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?e.resolvedOptions().pluralCategories.sort(((t,i)=>z[t]-z[i])).map((t=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,i,e={}){const s=this.getRule(t,e);return s?`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,e))}}const q=(t,i,e,s=".",o=!0)=>{let n=((t,i,e)=>{const s=v(t,e);return void 0!==s?s:v(i,e)})(t,i,e);return!n&&o&&d(e)&&(n=I(t,e,s),void 0===n&&(n=I(i,e,s))),n},V=t=>t.replace(/\$/g,"$$$$");class _{constructor(t={}){this.logger=L.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:i,escapeValue:e,useRawValueToEscape:s,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:g,nestingSuffixEscaped:p,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==i?i:A,this.escapeValue=void 0===e||e,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):n||"{{",this.suffix=r?$(r):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=c?$(c):d||$("$t("),this.nestingSuffix=g?$(g):p||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"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,i,e,s){let o,n,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const o=q(i,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,e,{...s,...i,interpolationkey:t}):o}const o=t.split(this.formatSeparator),n=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(q(i,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,e,{...s,...i,interpolationkey:n})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>V(this.escapeValue?this.escape(t):t)}].forEach((i=>{for(r=0;o=i.regex.exec(t);){const e=o[1].trim();if(n=h(e),void 0===n)if("function"==typeof l){const i=l(t,o,s);n=d(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,e))n="";else{if(u){n=o[0];continue}this.logger.warn(`missed to pass in variable ${e} for interpolating ${t}`),n=""}else d(n)||this.useRawValueToEscape||(n=p(n));const a=i.safeValue(n);if(t=t.replace(o[0],a),u?(i.regex.lastIndex+=n.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,i,e={}){let s,o,n;const r=(t,i)=>{const e=this.nestingOptionsSeparator;if(t.indexOf(e)<0)return t;const s=t.split(new RegExp(`${$(e)}[ ]*{`));let o=`{${s[1]}`;t=s[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),i&&(n={...i,...n})}catch(i){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,i),`${t}${e}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];n={...e},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),o=i(r.call(this,s[1].trim(),n),n),o&&s[0]===t&&!d(o))return o;d(o)||(o=p(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce(((t,i)=>this.format(t,i,e.lng,{...e,interpolationkey:s[1].trim()})),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const U=t=>{const i={};return(e,s,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=s+JSON.stringify(n);let a=i[r];return a||(a=t(W(s),o),i[r]=a),a(e)}},J=t=>(i,e,s)=>t(W(e),s)(i);class Y{constructor(t={}){this.logger=L.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const e=i.cacheInBuiltFormats?U:J;this.formats={number:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i});return t=>e.format(t)})),currency:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i,style:"currency"});return t=>e.format(t)})),datetime:e(((t,i)=>{const e=new Intl.DateTimeFormat(t,{...i});return t=>e.format(t)})),relativetime:e(((t,i)=>{const e=new Intl.RelativeTimeFormat(t,{...i});return t=>e.format(t,i.range||"day")})),list:e(((t,i)=>{const e=new Intl.ListFormat(t,{...i});return t=>e.format(t)}))}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=U(i)}format(t,i,e,s={}){const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}return o.reduce(((t,i)=>{const{formatName:o,formatOptions:n}=(t=>{let i=t.toLowerCase().trim();const e={};if(t.indexOf("(")>-1){const s=t.split("(");i=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===i&&o.indexOf(":")<0?e.currency||(e.currency=o.trim()):"relativetime"===i&&o.indexOf(":")<0?e.range||(e.range=o.trim()):o.split(";").forEach((t=>{if(t){const[i,...s]=t.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),n=i.trim();e[n]||(e[n]=o),"false"===o&&(e[n]=!1),"true"===o&&(e[n]=!0),isNaN(o)||(e[n]=parseInt(o,10))}}))}return{formatName:i,formatOptions:e}})(i);if(this.formats[o]){let i=t;try{const r=s?.formatParams?.[s.interpolationkey]||{};i=this.formats[o](t,r.locale||r.lng||s.locale||s.lng||e,{...n,...s,...r})}catch(t){this.logger.warn(t)}return i}return this.logger.warn(`there was no format function for ${o}`),t}),t)}}class G extends P{constructor(t,i,e,s={}){super(),this.backend=t,this.store=i,this.services=e,this.languageUtils=e.languageUtils,this.options=s,this.logger=L.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(e,s.backend,s)}queueLoad(t,i,e,s){const o={},n={},r={},a={};return t.forEach((t=>{let s=!0;i.forEach((i=>{const r=`${t}|${i}`;!e.reload&&this.store.hasResourceBundle(t,i)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,s=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[i]&&(a[i]=!0)))})),s||(r[t]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,i,e){const s=t.split("|"),o=s[0],n=s[1];i&&this.emit("failedLoading",o,n,i),!i&&e&&this.store.addResourceBundle(o,n,e,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&e&&(this.state[t]=0);const r={};this.queue.forEach((e=>{((t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);s[o]=s[o]||[],s[o].push(e)})(e.loaded,[o],n),((t,i)=>{void 0!==t.pending[i]&&(delete t.pending[i],t.pendingCount--)})(e,t),i&&e.errors.push(i),0!==e.pendingCount||e.done||(Object.keys(e.loaded).forEach((t=>{r[t]||(r[t]={});const i=e.loaded[t];i.length&&i.forEach((i=>{void 0===r[t][i]&&(r[t][i]=!0)}))})),e.done=!0,e.errors.length?e.callback(e.errors):e.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((t=>!t.done))}read(t,i,e,s=0,o=this.retryTimeout,n){if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:i,fcName:e,tried:s,wait:o,callback:n});this.readingCalls++;const r=(r,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)}r&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,i,e,s+1,2*o,n)}),o):n(r,a)},a=this.backend[e].bind(this.backend);if(2!==a.length)return a(t,i,r);try{const e=a(t,i);e&&"function"==typeof e.then?e.then((t=>r(null,t))).catch(r):r(null,e)}catch(t){r(t)}}prepareLoading(t,i,e={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(t)&&(t=this.languageUtils.toResolveHierarchy(t)),d(i)&&(i=[i]);const o=this.queueLoad(t,i,e,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,i,e){this.prepareLoading(t,i,{},e)}reload(t,i,e){this.prepareLoading(t,i,{reload:!0},e)}loadOne(t,i=""){const e=t.split("|"),s=e[0],o=e[1];this.read(s,o,"read",void 0,void 0,((e,n)=>{e&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,e),!e&&n&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,n),this.loaded(t,e,n)}))}saveMissing(t,i,e,s,o,n={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(i)){if(null!=e&&""!==e){if(this.backend?.create){const a={...n,isUpdate:o},h=this.backend.create.bind(this.backend);if(h.length<6)try{let o;o=5===h.length?h(t,i,e,s,a):h(t,i,e,s),o&&"function"==typeof o.then?o.then((t=>r(null,t))).catch(r):r(null,o)}catch(t){r(t)}else h(t,i,e,s,r,a)}t&&t[0]&&this.store.addResource(t[0],i,e,s)}}else this.logger.warn(`did not save key "${e}" as the namespace "${i}" 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 Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let i={};if("object"==typeof t[1]&&(i=t[1]),d(t[1])&&(i.defaultValue=t[1]),d(t[2])&&(i.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{i[t]=e[t]}))}return i},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(d(t.ns)&&(t.ns=[t.ns]),d(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),d(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),X=()=>{},tt="__i18next_supportNoticeShown";class it extends P{constructor(t={},i){var e;if(super(),this.options=Z(t),this.services={},this.logger=L,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout((()=>{this.init(t,i)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const e=Q();var s;this.options={...e,...this.options,...Z(t)},this.options.interpolation={...e.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=e.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[tt]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[tt]=!0));const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;L.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Y;const i=new H(this.options);this.store=new M(this.options.resources,this.options);const s=this.services;s.logger=L,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new F(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format||(s.formatter=o(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new _(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new G(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=X),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]=(...i)=>this.store[t](...i)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...i)=>(this.store[t](...i),this)}));const n=g(),r=()=>{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),n.resolve(e),i(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),n}loadResources(t,i=X){let e=i;const s=d(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=i=>{i&&"cimode"!==i&&this.services.languageUtils.toResolveHierarchy(i).forEach((i=>{"cimode"!==i&&t.indexOf(i)<0&&t.push(i)}))};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload?.forEach?.((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,i,e){const s=g();return"function"==typeof t&&(e=t,t=void 0),"function"==typeof i&&(e=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),e||(e=X),this.services.backendConnector.reload(t,i,(t=>{s.resolve(),e(t)})),s}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&&C.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"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const e=g();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(o,n)=>{n?this.isLanguageChangingTo===t&&(s(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,e.resolve(((...t)=>this.t(...t))),i&&i(o,((...t)=>this.t(...t)))},n=i=>{t||i||!this.services.languageDetector||(i=[]);const e=d(i)?i:i&&i[0],n=this.store.hasLanguageSomeTranslations(e)?e:this.services.languageUtils.getBestMatchFromCodes(d(i)?[i]:i);n&&(this.language||s(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(n):this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect()),e}getFixedT(t,i,e){const s=(t,i,...o)=>{let n;n="object"!=typeof i?this.options.overloadTranslationOptionHandler([t,i].concat(o)):{...i},n.lng=n.lng||s.lng,n.lngs=n.lngs||s.lngs,n.ns=n.ns||s.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||e||s.keyPrefix);const r={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,r));const a=this.options.keySeparator||".";let h;return n.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=N(t,r)),`${n.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=N(t,r)),h=n.keyPrefix?`${n.keyPrefix}${a}${t}`:t),this.t(h,n)};return d(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=e,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){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 e=i.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===e.toLowerCase())return!0;const n=(t,i)=>{const e=this.services.backendConnector.state[`${t}|${i}`];return-1===e||0===e||2===e};if(i.precheck){const t=i.precheck(this,n);if(void 0!==t)return t}return!(!this.hasResourceBundle(e,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(e,t)||s&&!n(o,t)))}loadNamespaces(t,i){const e=g();return this.options.ns?(d(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}loadLanguages(t,i){const e=g();d(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=s.concat(o),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(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 i=new Intl.Locale(t);if(i&&i.getTextInfo){const t=i.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const i=this.services?.languageUtils||new H(Q());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"].indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const e=new it(t,i);return e.createInstance=it.createInstance,e}cloneInstance(t={},i=X){const e=t.forkResourceStore;e&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new it(s);if(void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},e){const t=Object.keys(this.store.data).reduce(((t,i)=>(t[i]={...this.store.data[i]},t[i]=Object.keys(t[i]).reduce(((e,s)=>(e[s]={...t[i][s]},e)),t[i]),t)),{});o.store=new M(t,s),o.services.resourceStore=o.store}if(t.interpolation){const i={...Q().interpolation,...this.options.interpolation,...t.interpolation},e={...s,interpolation:i};o.services.interpolator=new _(e)}return o.translator=new K(o.services,s),o.translator.on("*",((t,...i)=>{o.emit(t,...i)})),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=it.createInstance(),{slice:st,forEach:ot}=[],nt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rt={create(t,i,e,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};e&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*e*1e3)),s&&(o.domain=s),document.cookie=function(t,i){const e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(i)}`;if(e.maxAge>0){const t=e.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(e.domain){if(!nt.test(e.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${e.domain}`}if(e.path){if(!nt.test(e.path))throw new TypeError("option path is invalid");s+=`; Path=${e.path}`}if(e.expires){if("function"!=typeof e.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${e.expires.toUTCString()}`}if(e.httpOnly&&(s+="; HttpOnly"),e.secure&&(s+="; Secure"),e.sameSite)switch("string"==typeof e.sameSite?e.sameSite.toLowerCase():e.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return e.partitioned&&(s+="; Partitioned"),s}(t,i,o)},read(t){const i=`${t}=`,e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return null},remove(t,i){this.create(t,"",-1,i)}};var at={name:"cookie",lookup(t){let{lookupCookie:i}=t;if(i&&"undefined"!=typeof document)return rt.read(i)||void 0},cacheUserLanguage(t,i){let{lookupCookie:e,cookieMinutes:s,cookieDomain:o,cookieOptions:n}=i;e&&"undefined"!=typeof document&&rt.create(e,t,s,o,n)}},ht={name:"querystring",lookup(t){let i,{lookupQuerystring:e}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const o=s[t].indexOf("=");o>0&&s[t].substring(0,o)===e&&(i=s[t].substring(o+1))}}return i}},lt={name:"hash",lookup(t){let i,{lookupHash:e,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const o=t.substring(1);if(e){const t=o.split("&");for(let s=0;s<t.length;s++){const o=t[s].indexOf("=");o>0&&t[s].substring(0,o)===e&&(i=t[s].substring(o+1))}}if(i)return i;if(!i&&s>-1){const i=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const e="number"==typeof s?s:0;return i[e]?.replace("/","")}}}return i}};let ut=null;const ct=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var dt={name:"localStorage",lookup(t){let{lookupLocalStorage:i}=t;if(i&&ct())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupLocalStorage:e}=i;e&&ct()&&window.localStorage.setItem(e,t)}};let gt=null;const pt=()=>{if(null!==gt)return gt;try{if(gt="undefined"!=typeof window&&null!==window.sessionStorage,!gt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){gt=!1}return gt};var ft={name:"sessionStorage",lookup(t){let{lookupSessionStorage:i}=t;if(i&&pt())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupSessionStorage:e}=i;e&&pt()&&window.sessionStorage.setItem(e,t)}},mt={name:"navigator",lookup(t){const i=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:e,language:s}=navigator;if(t)for(let e=0;e<t.length;e++)i.push(t[e]);e&&i.push(e),s&&i.push(s)}return i.length>0?i:void 0}},yt={name:"htmlTag",lookup(t){let i,{htmlTag:e}=t;const s=e||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(i=s.getAttribute("lang")),i}},bt={name:"path",lookup(t){let{lookupFromPathIndex:i}=t;if("undefined"==typeof window)return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const s="number"==typeof i?i:0;return e[s]?.replace("/","")}},wt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:i}=t;const e="number"==typeof i?i+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[e]}};let vt=!1;try{vt=!0}catch(t){}const xt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vt||xt.splice(1,1);class $t{constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return ot.call(st.call(arguments,1),(i=>{if(i)for(const e in i)void 0===t[e]&&(t[e]=i[e])})),t}(t,this.options||{},{order:xt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(at),this.addDetector(ht),this.addDetector(dt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(bt),this.addDetector(wt),this.addDetector(lt)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((i=>{if(this.detectors[i]){let e=this.detectors[i].lookup(this.options);e&&"string"==typeof e&&(e=[e]),e&&(t=t.concat(e))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(i=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(i))));var i})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach((i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(t,this.options)})))}}$t.type="languageDetector";et.use($t).init({resources:{en:{translation:{"Do you want to exit? button":"Do you want to exit?","Exit button":"Exit","Continue playing button":"Continue playing","Drop the elements to match the given symbol order":"Drop the elements to match the given symbol order","Fill in the blanks":"Fill in the blanks",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageEngAudio",substractionWithoutImage:"substractionWithoutImageEngAudio",numberIdentificationWithImage:"numberIdentificationWithImageEngAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageEngAudio",wordBuildingWithImage:"wordBuildingWithImageEngAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageEngAudio",pictureClues:"pictureCluesEngAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesEngAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageEngAudio",sentenceMatch:"sentenceMatchEngAudio",imageMatch:"imageMatchEngAudio",palStoryTale:"palStoryTaleEngAudio",palEgmaPatternMatching:"palEgmaPatternMatchingEngAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropEngAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickEngAudio",palEgraOddOneOut:"palEgraOddOneOutEngAudio",palEgraArrangePictures:"palEgraArrangePicturesEngAudio",palEgraBuildWord:"palEgraBuildWordEngAudio",palEgraWordFormation:"palEgraWordFormationEngAudio",palInventedSpelling:"palInventedSpellingEngAudio",palLetterIdentification:"palLetterIdentificationEngAudio",palStoryMaking:"palStoryMakingEngAudio",palegmasumtogether:"palegmasumtogetherEngAudio",palegmamultioption:"palegmamultioptionEngAudio",palegraoptionaudio:"palegraoptionaudioEngAudio",palegrawordmatch:"palegrawordmatchEngAudio",palegramcqimages:"palegramcqimagesEngAudio"}}},fr:{translation:{"Do you want to exit? button":"Voulez-vous quitter?","Exit button":"Quitter","Continue playing button":"Continuer à jouer","Drop the elements to match the given symbol order":"Déposez les éléments pour correspondre au symbole donné","Fill in the blanks":"Remplissez les blancs",instruction:{dragAndDrop:"Faites glisser les objets vers le bon emplacement.",mcq:"Choisissez la bonne réponse parmi les options proposées.",tracing:"Tracez soigneusement la forme en suivant la ligne.",flashcards:"Regardez les cartes mémoire pour renforcer l’apprentissage."}}},hi:{translation:{"Do you want to exit? button":"क्या आप बाहर निकलना चाहते हैं?","Exit button":"बाहर निकलें","Continue playing button":"खेलना जारी रखें","Drop the elements to match the given symbol order":"दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें","Fill in the blanks":"रिक्त स्थान भरें",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageHiAudio",substractionWithoutImage:"substractionWithoutImageHiAudio",numberIdentificationWithImage:"numberIdentificationWithImageHiAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageHiAudio",wordBuildingWithImage:"wordBuildingWithImageHiAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageHiAudio",pictureClues:"pictureCluesHiAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesHiAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageHiAudio",sentenceMatch:"sentenceMatchHiAudio",imageMatch:"imageMatchHiAudio",palStoryTale:"palStoryTaleHiAudio",palEgmaPatternMatching:"palEgmaPatternMatchingHiAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropHiAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickHiAudio",palEgraOddOneOut:"palEgraOddOneOutHiAudio",palEgraArrangePictures:"palEgraArrangePicturesHiAudio",palEgraBuildWord:"palEgraBuildWordHiAudio",palEgraWordFormation:"palEgraWordFormationHiAudio",palInventedSpelling:"palInventedSpellingHiAudio",palLetterIdentification:"palLetterIdentificationHiAudio",palStoryMaking:"palStoryMakingHiAudio",palegmasumtogether:"palegmasumtogetherHiAudio",palegmamultioption:"palegmamultioptionHiAudio",palegraoptionaudio:"palegraoptionaudioHiAudio",palegrawordmatch:"palegrawordmatchHiAudio",palegramcqimages:"palegramcqimagesHiAudio"}}},kn:{translation:{"Do you want to exit? button":"ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?","Exit button":"ನಿರ್ಗಮಿಸು","Continue playing button":"ಆಟವನ್ನು ಮುಂದುವರಿಸಿ","Drop the elements to match the given symbol order":"ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageKaAudio",substractionWithoutImage:"substractionWithoutImageKaAudio",numberIdentificationWithImage:"numberIdentificationWithImageKaAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageKaAudio",wordBuildingWithImage:"wordBuildingWithImageKaAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageKaAudio",pictureClues:"pictureCluesKaAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesKaAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageKaAudio",sentenceMatch:"sentenceMatchKaAudio",imageMatch:"imageMatchKaAudio",palStoryTale:"palStoryTaleKaAudio",palEgmaPatternMatching:"palEgmaPatternMatchingKaAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropKaAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickKaAudio",palEgraOddOneOut:"palEgraOddOneOutKaAudio",palEgraArrangePictures:"palEgraArrangePicturesKaAudio",palEgraBuildWord:"palEgraBuildWordKaAudio",palEgraWordFormation:"palEgraWordFormationKaAudio",palInventedSpelling:"palInventedSpellingKaAudio",palLetterIdentification:"palLetterIdentificationKaAudio",palStoryMaking:"palStoryMakingKaAudio",palegmasumtogether:"palegmasumtogetherKaAudio",palegmamultioption:"palegmamultioptionKaAudio",palegraoptionaudio:"palegraoptionaudioKaAudio",palegrawordmatch:"palegrawordmatchKaAudio",palegramcqimages:"palegramcqimagesKaAudio"}}},te:{translation:{"Do you want to exit? button":"మీరు బయటకు వెళ్లాలనుకుంటున్నారా?","Exit button":"బయటకు వెళ్ళు","Continue playing button":"ఆటను కొనసాగించు","Drop the elements to match the given symbol order":"ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయಂడಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"}},pt:{translation:{"Do you want to exit? button":"Você deseja sair?","Exit button":"Sair","Continue playing button":"Continuar jogando","Drop the elements to match the given symbol order":"Solte os elementos para corresponder à ordem dos símbolos fornecida","Fill in the blanks":"Preencha os espaços em branco"}},mr:{translation:{"Do you want to exit? button":"तुम्हाला बाहेर पडायचे आहे का?","Exit button":"बाहेर पडा","Continue playing button":"खेळ सुरू ठेवा",instruction:{dragAndDrop:"वस्तू योग्य ठिकाणी ओढून आणि सोडून जुळवा.",mcq:"दिलेल्या पर्यायांमधून योग्य उत्तर निवडा.",tracing:"रेषेचा काळजीपूर्वक मागोवा घेत आकृती काढा.",flashcards:"तुमचे शिक्षण मजबूत करण्यासाठी फ्लॅशकार्ड्स पाहा."}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},detection:{order:["querystring","localStorage","navigator","htmlTag"],caches:["localStorage"]}});const kt=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.requiredDrops="",this.string="",this.fontFamily="",this.fontSize="20px",this.fontColor="",this.highlightWhileSpeaking=!1,this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.move="false",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.borderImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.minDrops=1,this.maxDrops=1,this.onEntry="",this.margin="",this.padding="",this.borderRadius="0px",this.spanType="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(s(this.el,this.delayVisible),o(this.el,this.type),"words"!==this.spanType&&"letters"!==this.spanType||this.addSpanToText(),this.showSpeakIcon&&n(this.el),!this.audio||""===this.audio.trim()){const t=()=>{const t=this.resolveAutoAudio();t&&(this.audio=t)};window.__LIDO_COMMON_AUDIO_PATH__?t():window.addEventListener(r,t,{once:!0})}}resolveAutoAudio(){const t=window[c];return t&&this.string?`${t}/${this.string}.mp3`:null}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=this.borderImage?a(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,i),width:h(this.width,i),backgroundColor:h(this.bgColor,i),top:h(this.y,i),left:h(this.x,i),zIndex:this.z,fontSize:h(this.fontSize,i),fontFamily:this.fontFamily,color:h(this.fontColor,i),display:"true"===h(`${this.visible}`,i)?"flex":"none",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",margin:h(this.margin,i),padding:h(this.padding,i),borderRadius:h(this.borderRadius,i)}}async addSpanToText(){const t=this.el.querySelector(".lido-text-content");if(!t)return;const i=t.textContent||"";t.innerHTML="","letters"===this.spanType&&i.split("").forEach((i=>{if(""===i.trim())return;const e=document.createElement("span");e.textContent=i,e.className="text-letters",t.appendChild(e)})),"words"===this.spanType&&i.split(" ").forEach((i=>{const e=document.createElement("span");e.textContent=i,e.className="text-words",t.appendChild(e)}))}render(){const t=et.t(this.string).replace(/_phonics?/gi,"");return l(u,{key:"44bb34e461d90e1832066986454c5b0f8c392617",class:"lido-text",value:this.value,"required-drops":this.requiredDrops,type:this.type,"tab-index":this.tabIndex,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,minDrops:this.minDrops,maxDrops:this.maxDrops,id:this.id,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,move:this.move,"span-type":this.spanType,"disable-speak":`${this.disableSpeak}`},""!==this.spanType?l("div",{class:"lido-text-content"}," ",t):t)}get el(){return this}static get style(){return".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}"}},[0,"lido-text",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],requiredDrops:[1,"required-drops"],string:[1],fontFamily:[1,"font-family"],fontSize:[1,"font-size"],fontColor:[1,"font-color"],highlightWhileSpeaking:[4,"highlight-while-speaking"],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],move:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],borderImage:[1,"border-image"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],onEntry:[1,"on-entry"],margin:[1],padding:[1],borderRadius:[1,"border-radius"],spanType:[1,"span-type"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function At(){"undefined"!=typeof customElements&&["lido-text"].forEach((i=>{"lido-text"===i&&(customElements.get(t(i))||customElements.define(t(i),kt))}))}At();export{kt as L,At as d,et as i}
@@ -0,0 +1 @@
1
+ import{t,p as i,H as e,c as a,i as s,getAssetPath as o,a as h,h as n,b as l}from"./index.js";const d=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.pivotimage="",this.scaleimage="",this.handlerimage="",this.fill="brown",this.tilt=0,this.maxTilt=9.5,this.onEntry="",this.height="auto",this.width="auto",this.x="0px",this.y="0px",this.z="0",this.visible=!1,this.margin="",this.padding="",this.balanceSymbol="=",this.showSymbol=!1,this.operation="count",this.pivotSvg="",this.scaleSvg="",this.handlerSvg="",this.style={},this.tiltf=0,this.leftVal=0,this.rightVal=0,this.currentAngle=0}async revealSymbol(){this.showSymbol=!0}async hideSymbol(){this.showSymbol=!1}async componentWillLoad(){this.updateStyles(),this.pivotSvg=await this.fetchAndApplyFill(a(this.pivotimage)),this.scaleSvg=await this.fetchAndApplyFill(a(this.scaleimage)),this.handlerSvg=await this.fetchAndApplyFill(a(this.handlerimage))}componentDidLoad(){this.animateBalance(),this.leftParentEl=document.getElementById("leftparent"),this.rightParentEl=document.getElementById("rightparent"),s(this.el)}disconnectedCallback(){null!=this.animationFrameId&&cancelAnimationFrame(this.animationFrameId)}async fetchAndApplyFill(t){try{const i=await fetch(t);if(!i.ok)return"";let e=await i.text();return e=e.replace(/fill="[^"]*"/g,""),e=e.replace(/stroke="[^"]*"/g,""),e=e.replace(/<svg([^>]*)>/,`<svg$1 fill="${this.fill}" stroke="${this.fill}">`),e}catch(t){return console.error("SVG fetch failed:",t),""}}tiltChanged(t){this.tiltf=t}async updateTilt(t,i){const e=Math.max(-5,Math.min(5,i-t));await new Promise((t=>setTimeout(t,700))),this.tiltf=e}animateBalance(){const t=()=>{let i=this.tiltf/5*this.maxTilt;if(i>this.maxTilt&&(i=this.maxTilt),i<-this.maxTilt&&(i=-this.maxTilt),this.currentAngle+=.1*(i-this.currentAngle),this.currentAngle>this.maxTilt&&(this.currentAngle=this.maxTilt),this.currentAngle<-this.maxTilt&&(this.currentAngle=-this.maxTilt),this.scaleEl&&(this.scaleEl.style.transform=`rotate(${this.currentAngle}deg)`,this.scaleEl.style.transformOrigin="50% 80%"),this.leftParentEl&&this.rightParentEl){const t=window.innerHeight>window.innerWidth,i=this.currentAngle/this.maxTilt*(t?40:60);this.leftParentEl.style.transform=`translateY(${-i}px)`,this.rightParentEl.style.transform=`translateY(${i}px)`}if(this.leftHandleEl&&this.rightHandleEl){const t=window.innerHeight>window.innerWidth,i=this.currentAngle/this.maxTilt*(t?40:60);this.leftHandleEl.style.transform=`translateY(${-i}px)`,this.rightHandleEl.style.transform=`translateY(${i}px)`}this.animationFrameId=requestAnimationFrame(t)};t()}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,t),width:h(this.width,t),top:h(this.y,t),left:h(this.x,t),zIndex:this.z,display:"true"===h(`${this.visible}`,t)?"flex":"none",margin:h(this.margin,t),padding:h(this.padding,t),"--lido-balance-shadow-url":`url(${o("assets/Shadow.svg")})`}}render(){return n(l,{key:"24eaa92142462fb2177b164d1f4f773deba5abc7",id:"lido-balance","bg-color":"red",onEntry:this.onEntry,class:"lido-balance",tilt:this.tilt.toString(),style:this.style,operation:this.operation.toString(),"pivot-image":this.pivotSvg,"scale-image":this.scaleSvg,"handler-image":this.handlerSvg},n("div",{key:"b8f95e748f8286cbedc45d1a7d54d8fdb671520f",innerHTML:this.pivotSvg,id:"pivotimg",class:"pivot"}),n("div",{key:"8877a0eee0f9662a2ef65fe6fc5f8426b3fa1d67",innerHTML:this.scaleSvg,id:"scaleimg",class:"scale",ref:t=>this.scaleEl=t}),n("div",{key:"9e93a52334facad8b582041185c89db879844ac1",innerHTML:this.handlerSvg,id:"handlerimg",class:"handler",ref:t=>this.leftHandleEl=t}),n("div",{key:"3a8bdea23a2a7cd8d923637186ae71fc39eeedb3",innerHTML:this.handlerSvg,id:"handimg",class:"hand",ref:t=>this.rightHandleEl=t}),n("div",{key:"0d0967805aa8b3e86e1220c53a18610f7106d425",id:"balanceSymbol",class:"lido-balance-symbol","aria-hidden":!this.showSymbol},this.showSymbol?this.balanceSymbol:""))}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{tilt:[{tiltChanged:0}]}}static get style(){return'#lido-balance{position:relative;height:500px;width:1205px;top:20%;left:-91px;z-index:0}.lido-balance-symbol{position:absolute;top:64%;left:50%;transform:translate(-50%, -50%);font-size:5vw;font-weight:bold;color:black;pointer-events:none;z-index:999}@media (orientation: portrait){.lido-balance-shadow{height:100px;position:absolute;top:80%;left:28%}}@media (orientation: landscape){.lido-balance-shadow{height:100px;position:absolute;top:90%;left:33%}}@media (orientation: portrait){#pivotimg{position:absolute;height:auto;width:23%;bottom:18%;left:38%;z-index:100}}#pivotimg::after{content:"";position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);width:120%;height:60px;background-image:var(--lido-balance-shadow-url);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;z-index:10}@media (orientation: landscape){#pivotimg{position:absolute;height:auto;width:23%;bottom:8%;left:38%;z-index:100}}.lido-balance .pivot svg{width:100%;height:auto}#scaleimg{position:absolute;width:73%;height:auto;top:61%;left:14%;z-index:90}.lido-balance .scale svg{width:100%;height:auto}@media (orientation: landscape){#handlerimg{position:absolute;width:35%;height:auto;top:49%;left:2%}}@media (orientation:portrait ){#handlerimg{position:absolute;width:35%;height:auto;top:53%;left:2%}}.lido-balance .handler svg{width:100%;height:auto;fill:brown}@media (orientation: landscape){#handimg{position:absolute;width:35%;height:auto;top:49%;right:2%}}@media (orientation:portrait){#handimg{position:absolute;width:35%;height:auto;top:53%;right:2%}}.lido-balance .hand svg{width:100%;height:auto;fill:brown}.pivot svg path:nth-of-type(1){fill:brown}.pivot svg path[d^="M78.9414"]{fill:white}'}},[0,"lido-balance",{pivotimage:[1],scaleimage:[1],handlerimage:[1],fill:[1],tilt:[2],maxTilt:[2,"max-tilt"],onEntry:[1,"on-entry"],height:[1],width:[1],x:[1],y:[1],z:[1],visible:[8],margin:[1],padding:[1],balanceSymbol:[1537,"balance-symbol"],showSymbol:[1540,"show-symbol"],operation:[1],pivotSvg:[32],scaleSvg:[32],handlerSvg:[32],style:[32],tiltf:[32],leftVal:[32],rightVal:[32],revealSymbol:[64],hideSymbol:[64],updateTilt:[64]},void 0,{tilt:[{tiltChanged:0}]}]);function r(){"undefined"!=typeof customElements&&["lido-balance"].forEach((i=>{"lido-balance"===i&&(customElements.get(t(i))||customElements.define(t(i),d))}))}r();export{d as L,r as d}
@@ -1 +1 @@
1
- import{t,p as e,H as i,L as a,T as o,n,c as r,i as s,o as l,q as u,h,b as d,r as c}from"./index.js";import{d as g,i as m}from"./p-C2p0KZh4.js";const p=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.showDropBorder=!0,this.appendToDropOnCompletion=!1,this.id="",this.objective="",this.customStyle="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="auto",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.bgImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.canplay=!0,this.showCheck=!1,this.isContinueOnCorrect=!1,this.isAllowOnlyCorrect=!1,this.baseUrl="",this.margin="",this.showPrevButton="false",this.showNextButton="false",this.delayVisible="",this.disableSpeak=!1,this.templateId="",this.highlightWordByWord=!1,this.instructName="",this.speakFlag=!1,this.handleWindowResize=()=>this.scaleContainer(this.el),this.handleWindowLoad=()=>this.scaleContainer(this.el)}cleanupInteractionHandlers(){this.el.querySelectorAll('[type="drag"], [type="slide"], [move="true"]').forEach((t=>{t.dispatchEvent(new Event(a))}))}languageChanged(t){const e=t||this.resolveLanguage();this.updateChildTextLanguage(e)}componentWillLoad(){const t=this.resolveLanguage();this.updateChildTextLanguage(t),this.resolveInstructionAudio()}resolveInstructionAudio(){var t;this.instructName=null!==(t={flashcard:"instruction.flashcards",mcq:"instruction.mcq",tracing:"instruction.tracing",dragAndDrop:"instruction.dragAndDrop",arrangeLetters:"arrangeLetters",balancing:"balancing",balloonPop:"balloonPop",blender:"blender",bubbleType:"bubbleType",calculator:"calculator",categorize:"categorize",checkerBlocks:"checkerBlocks",createSentence:"createSentence",fillAnswer:"fillAnswer",fillBlank:"fillBlank",fillUp:"fillUp",flashcardtemplate:"flashcard",foodJar:"foodJar",grid:"grid",imageMatchWithQuestionImageAndMultiOption:"imageMatchWithQuestionImageAndMultiOption",inventedSpelling:"inventedSpelling",jumpSentence:"jumpSentence",letterBoard:"letterBoard",letterIdentification:"letterIdentification",letterPairing:"letterPairing",makeSentence:"makeSentence",matchingCard:"matchingCard",multiplyBeeds:"multiplyBeeds",nimbleTable:"nimbleTable",numberBoardOneTwo:"numberBoardOneTwo",numberPair:"numberPair",openWindow:"openWindow",orderTractor:"orderTractor",phonicTractor:"phonicTractor",pictureMeaningCocos:"pictureMeaningCocos",pictureWordMatch1:"pictureWordMatch1",pictureWordMatch2:"pictureWordMatch2",puzzleGame:"puzzleGame",questionBoard:"questionBoard",quizLiteracySentenceSentence:"quizLiteracySentenceSentence",quizLiteracySoundOnlyImage:"quizLiteracySoundOnlyImage",quizLiteracySoundOnlySentence:"quizLiteracySoundOnlySentence",quizLiteracySoundOnlyWord:"quizLiteracySoundonlyWord",quizLiteracyAndShapes1:"quizLiteracyAndShapes1",quizLiteracyImageWithText:"quizLiteracyImageWithText",quizliteracyImageWord:"quizliteracyImageWord",quizMathBiggerAndSmaller:"quizMathBiggerAndSmaller",quizMathBiggestAndSmallest:"quizMathBiggestAndSmallest",quizmathCustomNumberMagnitude:"quizmathCustomNumberMagnitude",quizMathHowMany:"quizMathHowMany",quizmathMissingnumberDrag:"quizmathMissingnumberDrag",quizMathNumberIdentification:"quizMathNumberIdentification",quizMathOperationWithobjects:"quizMathOperationWithobjects",quizMathoperationWithoutObjects:"quizMathoperationWithoutObjects",quizMathRecognizeNumber:"quizMathRecognizeNumber",quizMathShapes:"quizMathShapes",reorder:"reorder",rocketGame:"rocketGame",rowBlock:"rowBlock",sequenceBox1:"sequenceBox1",shapeTractor:"shapeTractor",spellDoor:"spellDoor",storyMaking:"storyMaking",storyTale:"storyTale",sumTogether:"sumTogether",tag:"tag",total:"total",writeCard:"writeCard",writeLetter:"writeLetter",writeNumber:"writeNumber",writeSet:"writeSet",writeWord:"writeWord",numberIdentification:"numberIdentification",wordBuildingWithAndWithoutImage:"wordBuildingWithAndWithoutImage",subsWithAndWithoutImage:"subsWithAndWithoutImage",sentenceMatchTemplate:"sentenceMatch",pictureClues:"pictureClues",palEgmaCalculateSumAndSumTogether:"palEgmaCalculateSumAndSumTogether",palEgmaPatternMatching:"palEgmaPatternMatchingAudio",palEgmaWordProblem:"palEgmaWordProblem",palEgraArrangePictures:"palEgraArrangePicturesAudio",palEgraBuildWord:"palEgraBuildWordAudio",palEgraMCQWithImage:"palEgraMCQWithImage",palEgraOddOneOut:"palEgraOddOneOutAudio",palEgraOptionWithAudio:"palEgraOptionWithAudio",palEgraWordFormation:"palEgraWordFormationAudio",palEgraWordMatch:"palEgraWordMatch",substractionWithImage:"substractionWithImageAudio",substractionWithoutImage:"substractionWithoutImageAudio",numberIdentificationWithImage:"numberIdentificationWithImageAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageAudio",wordBuildingWithImage:"wordBuildingWithImageAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageAudio",sentenceMatch:"sentenceMatchAudio",imageMatch:"imageMatchAudio",palStoryTale:"palStoryTaleAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickAudio",palInventedSpelling:"palInventedSpellingAudio",palLetterIdentification:"palLetterIdentificationAudio",palStoryMaking:"palStoryMakingAudio",palegmasumtogether:"palegmasumtogetherAudio",palegmamultioption:"palegmamultioptionAudio",palegraoptionaudio:"palegraoptionAudio",palegrawordmatch:"palegrawordmatchAudio",palegramcqimages:"palegramcqimagesAudio",drawShape:"drawshape",drawshape:"drawshape"}[this.templateId])&&void 0!==t?t:"";const e=document.querySelector("lido-home");if(!e)return;const i=e.getAttribute(o)||"";this.speakFlag=i.includes(this.templateId),this.speakFlag||e.setAttribute(o,[i,this.templateId].filter(Boolean).join(","))}resolveLanguage(){var t,e;const i=this.el.closest("lido-root"),a=(null==i?void 0:i.Lang)||"";if(null==a?void 0:a.trim())return a;if(null===(t=this.Lang)||void 0===t?void 0:t.trim())return this.Lang;const o=this.el.getAttribute("Lang");return(null==o?void 0:o.trim())?o:null===(e=this.el.textContent)||void 0===e?void 0:e.trim()}convertToPixels(t,e=document.body){if(!t)return 0;if(t.endsWith("px"))return parseFloat(t);const i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",i.style.height=t,e.appendChild(i);const a=i.offsetHeight;return e.removeChild(i),a}scaleContainer(t){const e=this.getClosestParentWithWidth();let i=0;e&&(i=Math.min(e.clientWidth/1600,e.clientHeight/900)),t.style.transform=`translate(-50%, -50%) scale(${0!=i?i:n()})`,t.style.left="50%",t.style.top="50%",t.style.position="absolute",this.screenOrientation()}getClosestParentWithWidth(){let t=this.el.parentElement;for(;t;){if(t.offsetWidth>0)return t;t=t.parentElement}return null}screenOrientation(){window.innerHeight>window.innerWidth?(this.el.style.height="1600px",this.el.style.width="900px"):(this.el.style.height="900px",this.el.style.width="1600px")}updateChildTextLanguage(t){const e=t||m.language||"en";m.changeLanguage(e),this.el.querySelectorAll("lido-text").forEach((t=>{t.Lang=e,t.dispatchEvent(new CustomEvent("languageChanged",{bubbles:!0}))}))}componentDidLoad(){this.scaleContainer(this.el);const t=this.bgImage?r(this.bgImage):"",e=this.el.closest("lido-standalone"),i="true"===(null==e?void 0:e.getAttribute("bg-image"))?e:document.body;if(i.style.backgroundColor=this.bgColor,i.style.backgroundImage=t?`url(${t})`:"none",i.style.backgroundPosition=t?"bottom":"none",document.body.style.pointerEvents="auto",window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad),this.templateId?setTimeout((()=>{this.el.setAttribute("onEntry",`${this.templateId}.speak='${!this.speakFlag}'; `+this.el.getAttribute("onEntry")),s(this.el,this.type)}),100):s(this.el,this.type),this.customStyle){const t=document.createElement("style");t.innerHTML=this.customStyle,document.head.appendChild(t)}const a=this.resolveLanguage();this.updateChildTextLanguage(a),setTimeout((()=>{l()}),100),c(),u.getI().start()}disconnectedCallback(){this.cleanupInteractionHandlers(),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad),document.body.style.backgroundColor="",document.body.style.backgroundImage="",c(),u.getI().stop()}render(){return h(d,{key:"1862e30fedda58726edc107f81fae1f63e96d009",id:"lido-container",Lang:this.Lang,"tab-index":0,class:"lido-container",objective:this.objective,baseUrl:this.baseUrl,style:{backgroundColor:this.bgColor,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",margin:this.margin,userSelect:"none"},"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,onTouch:this.onTouch,onInCorrect:this.onInCorrect,onCorrect:this.onCorrect,onEntry:this.onEntry,"show-check":`${this.showCheck}`,"is-continue-on-correct":`${this.isContinueOnCorrect}`,"is-allow-only-correct":`${this.isAllowOnlyCorrect}`,canplay:`${this.canplay}`,appendToDropOnCompletion:`${this.appendToDropOnCompletion}`,"show-prev-button":`${this.showPrevButton}`,"show-next-button":`${this.showNextButton}`,"show-drop-border":`${this.showDropBorder}`,"bg-image":this.bgImage,"exit-button-url":this.exitButtonUrl,"prev-button-url":this.prevButtonUrl,"next-button-url":this.nextButtonUrl,"speaker-button-url":this.speakerButtonUrl,"disable-speak":`${this.disableSpeak}`,"template-id":this.templateId,audio:this.audio,"highlight-word-by-word":`${this.highlightWordByWord}`},h("lido-text",{key:"86fd014a61ba9cba6d67e2d921b2d8a8a289dbc7",visible:"false",id:this.templateId,audio:"",string:this.instructName}),h("slot",{key:"c3128ea2164892757b32cb076d717436947f9a4c"}))}get el(){return this}static get watchers(){return{Lang:[{languageChanged:0}]}}static get style(){return".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}"}},[260,"lido-container",{Lang:[1,"lang"],showDropBorder:[4,"show-drop-border"],appendToDropOnCompletion:[4,"append-to-drop-on-completion"],id:[1],objective:[1],customStyle:[1,"custom-style"],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],bgImage:[1,"bg-image"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],canplay:[4],showCheck:[4,"show-check"],isContinueOnCorrect:[4,"is-continue-on-correct"],isAllowOnlyCorrect:[4,"is-allow-only-correct"],baseUrl:[1,"base-url"],margin:[1],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],showPrevButton:[1,"show-prev-button"],showNextButton:[1,"show-next-button"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],templateId:[1,"template-id"],highlightWordByWord:[4,"highlight-word-by-word"],instructName:[32],speakFlag:[32]},void 0,{Lang:[{languageChanged:0}]}]);function b(){"undefined"!=typeof customElements&&["lido-container","lido-text"].forEach((e=>{switch(e){case"lido-container":customElements.get(t(e))||customElements.define(t(e),p);break;case"lido-text":customElements.get(t(e))||g()}}))}b();export{p as L,b as d}
1
+ import{t,p as e,H as i,L as a,T as o,n,c as r,i as s,o as l,q as u,h,b as d,r as c}from"./index.js";import{d as g,i as m}from"./p-Cj-6tqzU.js";const p=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.showDropBorder=!0,this.appendToDropOnCompletion=!1,this.id="",this.objective="",this.customStyle="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="auto",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.bgImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.canplay=!0,this.showCheck=!1,this.isContinueOnCorrect=!1,this.isAllowOnlyCorrect=!1,this.baseUrl="",this.margin="",this.showPrevButton="false",this.showNextButton="false",this.delayVisible="",this.disableSpeak=!1,this.templateId="",this.highlightWordByWord=!1,this.instructName="",this.speakFlag=!1,this.handleWindowResize=()=>this.scaleContainer(this.el),this.handleWindowLoad=()=>this.scaleContainer(this.el)}cleanupInteractionHandlers(){this.el.querySelectorAll('[type="drag"], [type="slide"], [move="true"]').forEach((t=>{t.dispatchEvent(new Event(a))}))}languageChanged(t){const e=t||this.resolveLanguage();this.updateChildTextLanguage(e)}componentWillLoad(){const t=this.resolveLanguage();this.updateChildTextLanguage(t),this.resolveInstructionAudio()}resolveInstructionAudio(){var t;this.instructName=null!==(t={flashcard:"instruction.flashcards",mcq:"instruction.mcq",tracing:"instruction.tracing",dragAndDrop:"instruction.dragAndDrop",arrangeLetters:"arrangeLetters",balancing:"balancing",balloonPop:"balloonPop",blender:"blender",bubbleType:"bubbleType",calculator:"calculator",categorize:"categorize",checkerBlocks:"checkerBlocks",createSentence:"createSentence",fillAnswer:"fillAnswer",fillBlank:"fillBlank",fillUp:"fillUp",flashcardtemplate:"flashcard",foodJar:"foodJar",grid:"grid",imageMatchWithQuestionImageAndMultiOption:"imageMatchWithQuestionImageAndMultiOption",inventedSpelling:"inventedSpelling",jumpSentence:"jumpSentence",letterBoard:"letterBoard",letterIdentification:"letterIdentification",letterPairing:"letterPairing",makeSentence:"makeSentence",matchingCard:"matchingCard",multiplyBeeds:"multiplyBeeds",nimbleTable:"nimbleTable",numberBoardOneTwo:"numberBoardOneTwo",numberPair:"numberPair",openWindow:"openWindow",orderTractor:"orderTractor",phonicTractor:"phonicTractor",pictureMeaningCocos:"pictureMeaningCocos",pictureWordMatch1:"pictureWordMatch1",pictureWordMatch2:"pictureWordMatch2",puzzleGame:"puzzleGame",questionBoard:"questionBoard",quizLiteracySentenceSentence:"quizLiteracySentenceSentence",quizLiteracySoundOnlyImage:"quizLiteracySoundOnlyImage",quizLiteracySoundOnlySentence:"quizLiteracySoundOnlySentence",quizLiteracySoundOnlyWord:"quizLiteracySoundonlyWord",quizLiteracyAndShapes1:"quizLiteracyAndShapes1",quizLiteracyImageWithText:"quizLiteracyImageWithText",quizliteracyImageWord:"quizliteracyImageWord",quizMathBiggerAndSmaller:"quizMathBiggerAndSmaller",quizMathBiggestAndSmallest:"quizMathBiggestAndSmallest",quizmathCustomNumberMagnitude:"quizmathCustomNumberMagnitude",quizMathHowMany:"quizMathHowMany",quizmathMissingnumberDrag:"quizmathMissingnumberDrag",quizMathNumberIdentification:"quizMathNumberIdentification",quizMathOperationWithobjects:"quizMathOperationWithobjects",quizMathoperationWithoutObjects:"quizMathoperationWithoutObjects",quizMathRecognizeNumber:"quizMathRecognizeNumber",quizMathShapes:"quizMathShapes",reorder:"reorder",rocketGame:"rocketGame",rowBlock:"rowBlock",sequenceBox1:"sequenceBox1",shapeTractor:"shapeTractor",spellDoor:"spellDoor",storyMaking:"storyMaking",storyTale:"storyTale",sumTogether:"sumTogether",tag:"tag",total:"total",writeCard:"writeCard",writeLetter:"writeLetter",writeNumber:"writeNumber",writeSet:"writeSet",writeWord:"writeWord",numberIdentification:"numberIdentification",wordBuildingWithAndWithoutImage:"wordBuildingWithAndWithoutImage",subsWithAndWithoutImage:"subsWithAndWithoutImage",sentenceMatchTemplate:"sentenceMatch",pictureClues:"pictureClues",palEgmaCalculateSumAndSumTogether:"palEgmaCalculateSumAndSumTogether",palEgmaPatternMatching:"palEgmaPatternMatchingAudio",palEgmaWordProblem:"palEgmaWordProblem",palEgraArrangePictures:"palEgraArrangePicturesAudio",palEgraBuildWord:"palEgraBuildWordAudio",palEgraMCQWithImage:"palEgraMCQWithImage",palEgraOddOneOut:"palEgraOddOneOutAudio",palEgraOptionWithAudio:"palEgraOptionWithAudio",palEgraWordFormation:"palEgraWordFormationAudio",palEgraWordMatch:"palEgraWordMatch",substractionWithImage:"substractionWithImageAudio",substractionWithoutImage:"substractionWithoutImageAudio",numberIdentificationWithImage:"numberIdentificationWithImageAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageAudio",wordBuildingWithImage:"wordBuildingWithImageAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageAudio",sentenceMatch:"sentenceMatchAudio",imageMatch:"imageMatchAudio",palStoryTale:"palStoryTaleAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickAudio",palInventedSpelling:"palInventedSpellingAudio",palLetterIdentification:"palLetterIdentificationAudio",palStoryMaking:"palStoryMakingAudio",palegmasumtogether:"palegmasumtogetherAudio",palegmamultioption:"palegmamultioptionAudio",palegraoptionaudio:"palegraoptionAudio",palegrawordmatch:"palegrawordmatchAudio",palegramcqimages:"palegramcqimagesAudio",drawShape:"drawshape",drawshape:"drawshape"}[this.templateId])&&void 0!==t?t:"";const e=document.querySelector("lido-home");if(!e)return;const i=e.getAttribute(o)||"";this.speakFlag=i.includes(this.templateId),this.speakFlag||e.setAttribute(o,[i,this.templateId].filter(Boolean).join(","))}resolveLanguage(){var t,e;const i=this.el.closest("lido-root"),a=(null==i?void 0:i.Lang)||"";if(null==a?void 0:a.trim())return a;if(null===(t=this.Lang)||void 0===t?void 0:t.trim())return this.Lang;const o=this.el.getAttribute("Lang");return(null==o?void 0:o.trim())?o:null===(e=this.el.textContent)||void 0===e?void 0:e.trim()}convertToPixels(t,e=document.body){if(!t)return 0;if(t.endsWith("px"))return parseFloat(t);const i=document.createElement("div");i.style.position="absolute",i.style.visibility="hidden",i.style.height=t,e.appendChild(i);const a=i.offsetHeight;return e.removeChild(i),a}scaleContainer(t){const e=this.getClosestParentWithWidth();let i=0;e&&(i=Math.min(e.clientWidth/1600,e.clientHeight/900)),t.style.transform=`translate(-50%, -50%) scale(${0!=i?i:n()})`,t.style.left="50%",t.style.top="50%",t.style.position="absolute",this.screenOrientation()}getClosestParentWithWidth(){let t=this.el.parentElement;for(;t;){if(t.offsetWidth>0)return t;t=t.parentElement}return null}screenOrientation(){window.innerHeight>window.innerWidth?(this.el.style.height="1600px",this.el.style.width="900px"):(this.el.style.height="900px",this.el.style.width="1600px")}updateChildTextLanguage(t){const e=t||m.language||"en";m.changeLanguage(e),this.el.querySelectorAll("lido-text").forEach((t=>{t.Lang=e,t.dispatchEvent(new CustomEvent("languageChanged",{bubbles:!0}))}))}componentDidLoad(){this.scaleContainer(this.el);const t=this.bgImage?r(this.bgImage):"",e=this.el.closest("lido-standalone"),i="true"===(null==e?void 0:e.getAttribute("bg-image"))?e:document.body;if(i.style.backgroundColor=this.bgColor,i.style.backgroundImage=t?`url(${t})`:"none",i.style.backgroundPosition=t?"bottom":"none",document.body.style.pointerEvents="auto",window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad),this.templateId?setTimeout((()=>{this.el.setAttribute("onEntry",`${this.templateId}.speak='${!this.speakFlag}'; `+this.el.getAttribute("onEntry")),s(this.el,this.type)}),100):s(this.el,this.type),this.customStyle){const t=document.createElement("style");t.innerHTML=this.customStyle,document.head.appendChild(t)}const a=this.resolveLanguage();this.updateChildTextLanguage(a),setTimeout((()=>{l()}),100),c(),u.getI().start()}disconnectedCallback(){this.cleanupInteractionHandlers(),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad),document.body.style.backgroundColor="",document.body.style.backgroundImage="",c(),u.getI().stop()}render(){return h(d,{key:"1862e30fedda58726edc107f81fae1f63e96d009",id:"lido-container",Lang:this.Lang,"tab-index":0,class:"lido-container",objective:this.objective,baseUrl:this.baseUrl,style:{backgroundColor:this.bgColor,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",margin:this.margin,userSelect:"none"},"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,onTouch:this.onTouch,onInCorrect:this.onInCorrect,onCorrect:this.onCorrect,onEntry:this.onEntry,"show-check":`${this.showCheck}`,"is-continue-on-correct":`${this.isContinueOnCorrect}`,"is-allow-only-correct":`${this.isAllowOnlyCorrect}`,canplay:`${this.canplay}`,appendToDropOnCompletion:`${this.appendToDropOnCompletion}`,"show-prev-button":`${this.showPrevButton}`,"show-next-button":`${this.showNextButton}`,"show-drop-border":`${this.showDropBorder}`,"bg-image":this.bgImage,"exit-button-url":this.exitButtonUrl,"prev-button-url":this.prevButtonUrl,"next-button-url":this.nextButtonUrl,"speaker-button-url":this.speakerButtonUrl,"disable-speak":`${this.disableSpeak}`,"template-id":this.templateId,audio:this.audio,"highlight-word-by-word":`${this.highlightWordByWord}`},h("lido-text",{key:"86fd014a61ba9cba6d67e2d921b2d8a8a289dbc7",visible:"false",id:this.templateId,audio:"",string:this.instructName}),h("slot",{key:"c3128ea2164892757b32cb076d717436947f9a4c"}))}get el(){return this}static get watchers(){return{Lang:[{languageChanged:0}]}}static get style(){return".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}"}},[260,"lido-container",{Lang:[1,"lang"],showDropBorder:[4,"show-drop-border"],appendToDropOnCompletion:[4,"append-to-drop-on-completion"],id:[1],objective:[1],customStyle:[1,"custom-style"],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],bgImage:[1,"bg-image"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],canplay:[4],showCheck:[4,"show-check"],isContinueOnCorrect:[4,"is-continue-on-correct"],isAllowOnlyCorrect:[4,"is-allow-only-correct"],baseUrl:[1,"base-url"],margin:[1],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],showPrevButton:[1,"show-prev-button"],showNextButton:[1,"show-next-button"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],templateId:[1,"template-id"],highlightWordByWord:[4,"highlight-word-by-word"],instructName:[32],speakFlag:[32]},void 0,{Lang:[{languageChanged:0}]}]);function b(){"undefined"!=typeof customElements&&["lido-container","lido-text"].forEach((e=>{switch(e){case"lido-container":customElements.get(t(e))||customElements.define(t(e),p);break;case"lido-text":customElements.get(t(e))||g()}}))}b();export{p as L,b as d}
@@ -0,0 +1 @@
1
+ import{t,p as i,H as e,i as s,c as o,w as n,a as l,e as a,s as h,y as r,h as c,b as d}from"./index.js";const u=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.rows="10",this.cols="10",this.defualtFill=0,this.leftIndex=!1,this.topIndex=!1,this.bottomIndex=!1,this.clickable=!0,this.activeOnlyVisible=!1,this.activeBgColor="transparent",this.deactiveBgColor="transparent",this.border="2px solid green",this.height="100%",this.width="100%",this.borderRadius="5px",this.visible="false",this.previousFilledSlot=-1,this.previousFilledSlotElement=null,this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}updateValue(t){this.el.setAttribute("value",t)}componentDidLoad(){const t=this.el.querySelectorAll(".slot");s(this.el,this.type),t.forEach((t=>{const i=t;i.style.setProperty("--active-bg-color",this.activeBgColor),i.style.setProperty("--deactive-bg-color",this.deactiveBgColor),i.style.pointerEvents=this.clickable?"":"none",i.style.border=this.border,i.style.color=this.fontColor,i.className.includes("slot-active")?(i.style.visibility="",this.matrixImage&&i.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):this.activeOnlyVisible&&(i.style.visibility="hidden")})),this.updateSlots(),this.updateStyles()}componentWillLoad(){this.updateStyles(),this.updateSlots(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateSlots(){const t=this.el.querySelectorAll(".slot"),i=this.el.querySelector(".slot");if(!t.length||!i)return;const e=document.getElementById(n);let s=this.rows,o=this.cols;e&&"multiplyBeeds"===e.getAttribute("template-id")&&(o="9",s="1");const l=Number(s)<Number(o)?this.el.offsetHeight:this.el.offsetWidth,a=Number(s)>Number(o)?Number(s):Number(o),h=this.el.querySelectorAll(".slot-parent"),r=l/a;h.forEach((t=>{t.style.width=`${r}px`,Array.from(t.children).forEach((t=>{const i=t;i.style.width=`${r}px`,i.style.height=`${r}px`,"drop"!==this.type&&"drag"!==this.type&&"checkerBlock"!==this.type||(this.el.style.width="auto",this.el.style.height="auto"),(!this.topIndex&&i.classList.contains("topIndex")||!this.leftIndex&&i.classList.contains("leftIndex")||!this.bottomIndex&&i.classList.contains("bottomIndex"))&&(i.classList.contains("leftIndex")&&i.parentElement.remove(),i.remove())}))}))}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:l(this.height,t),width:l(this.width,t),zIndex:this.z,display:"true"===l(`${this.visible}`,t)?"flex":"none",borderRadius:l(this.borderRadius,t),left:l(this.x,t),top:l(this.y,t),cols:l(`${this.cols}`,t),rows:l(`${this.rows}`,t)}}handleClickSlot(t){const i=parseInt(t.className.split(" ")[1].split("-")[1]),e=this.el.querySelectorAll(".slot");if(e.forEach(((t,e)=>{const s=t;e<i?(s.classList.add("slot-active"),s.classList.remove("slot-inactive"),this.matrixImage&&s.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):(s.classList.remove("slot-active"),s.classList.add("slot-inactive"))})),-1!==this.previousFilledSlot&&null!==this.previousFilledSlotElement&&(this.previousFilledSlotElement.textContent=""),t.textContent=i.toString(),this.previousFilledSlot=i,this.previousFilledSlotElement=t,i===e.length)try{const t=new CustomEvent("math-matrix-bottom-click",{detail:{matrix:this.el,cols:this.style.cols,rows:this.style.rows},bubbles:!0,composed:!0});this.el.dispatchEvent(t)}catch(t){console.warn("Error dispatching math-matrix-bottom-click from handleClickSlot",t)}this.updateValue(i.toString());const s=document.getElementById(n);if(this.clickable&&"checkerBlock"===this.type&&"mat1"===this.el.id&&(null==s?void 0:s.getAttribute("equationCheck"))&&s){const t=!!a(s.getAttribute("equationCheck"));console.log("Write Set checkerBlock click:",{result:t}),h(t)}r()}getSlotData(){const t={};return this.text?(this.text.split(",").forEach(((i,e)=>{const[s,o]=i.split("-"),n=parseInt(s.trim());isNaN(n)||(t[e]={text:s.trim(),color:null==o?void 0:o.trim()})})),t):t}render(){let t=1;const i=this.getSlotData();return c(d,{key:"8a17727416da00fda95c401c3a005cdea1e732d0",class:"math-matrix",style:{height:this.style.height,width:this.style.width,z:this.style.z,display:this.style.display,top:this.style.top,left:this.style.left},type:this.type,value:this.value,"tab-index":this.tabIndex,rows:this.style.rows,cols:this.style.cols,text:this.text,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry},Array.from({length:parseInt(this.style.rows)+1},((e,s)=>c("div",{class:"slot-parent",key:`row-${s}`},c("div",{style:0===s&&{visibility:"hidden"},class:"topIndex"},s),Array.from({length:parseInt(this.style.cols)},((e,o)=>{var n,l;return 0===s?c("div",{class:"leftIndex"},++o):c("div",{class:`slot slot-${t} ${this.defualtFill>=t?"slot-active":"slot-inactive"}`,onClick:t=>this.handleClickSlot(t.currentTarget),key:`slot-${s}-${o}`,style:{borderRadius:this.style.borderRadius,backgroundColor:(null===(n=i[t-1])||void 0===n?void 0:n.color)||""}},null===(l=i[t-1])||void 0===l?void 0:l.text,t++&&null)})),c("div",{style:0===s&&{visibility:"hidden"},class:"bottomIndex"},parseInt(this.style.cols)*s)))))}get el(){return this}static get style(){return".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%;text-align:center;align-content:center;font-size:42px;font-weight:800;font-family:'Baloo Bhai 2';box-sizing:content-box}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:contain;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--deactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px;font-weight:600;font-family:'Baloo Bhai 2'}"}},[0,"lido-math-matrix",{rows:[1],cols:[1],defualtFill:[1538,"defualt-fill"],leftIndex:[4,"left-index"],topIndex:[4,"top-index"],bottomIndex:[4,"bottom-index"],clickable:[4],activeOnlyVisible:[4,"active-only-visible"],matrixImage:[1,"matrix-image"],activeBgColor:[1537,"active-bg-color"],deactiveBgColor:[1537,"deactive-bg-color"],border:[1537],height:[1537],width:[1537],borderRadius:[1,"border-radius"],z:[1],margin:[1],padding:[1],visible:[1],text:[1],type:[1],value:[1],tabIndex:[2,"tab-index"],x:[1],y:[1],fontColor:[1,"font-color"],onCorrect:[1,"on-correct"],onInCorrect:[1,"on-in-correct"],onEntry:[1,"on-entry"],previousFilledSlot:[32],previousFilledSlotElement:[32],style:[32]}]);function m(){"undefined"!=typeof customElements&&["lido-math-matrix"].forEach((i=>{"lido-math-matrix"===i&&(customElements.get(t(i))||customElements.define(t(i),u))}))}m();export{u as L,m as d}
@@ -1 +1 @@
1
- import{t,p as e,H as i,w as s,S as o,s as n,A as a,x as r,f as d,g as l,j as h,u as c,D as p,a as u,h as b,b as f}from"./index.js";import{d as y}from"./p-C2p0KZh4.js";const g=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.keys="",this.gap="10px",this.bgColor="",this.borderRadius="",this.keyboardInput=!1,this.columns="10",this.disableSpeak=!1,this.numberOfClick=0,this.inputString="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}async inputValidation(t){if("click"!==this.type)return;const e=document.getElementById(s);if(!t.target.getAttribute("value"))return;let i=JSON.parse(localStorage.getItem(o))||"";localStorage.setItem(o,JSON.stringify(i));const p=document.body.getBoundingClientRect(),u=Array.from(e.querySelectorAll(".bubble-element")).filter((t=>{const e=t.getBoundingClientRect();return e.left<p.right&&e.right>p.left&&e.top<p.bottom&&e.bottom>p.top})).find((t=>{const e=t.getAttribute("value");return(null==e?void 0:e.startsWith(this.inputString.toLowerCase()))?t:null}));if(u){if(this.inputString.toLowerCase()===u.getAttribute("value").toLowerCase()){n(!0),a.getI().play(u),r(u),setTimeout((()=>{this.inputString=""}),1e3);const t=u.getAttribute("onCorrect");if(await d(t,u),u.style.animation="none",u.style.pointerEvents="none",this.numberOfClick++,localStorage.removeItem(o),this.numberOfClick===this.letterLength){const t=e.getAttribute("onCorrect");e.style.pointerEvents="none",await d(t,this.el),l(),h()}else c(u)}}else{n(!1),setTimeout((()=>{this.inputString=""}),1e3),localStorage.removeItem(o);const t=e.getAttribute("onInCorrect");await d(t,this.el)}}componentDidLoad(){if(document.getElementById(s).getAttribute("drop-action")===p.InfiniteDrop){const t=this.el.querySelectorAll(".key-button"),e=t[0];t.forEach((t=>{t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}))}}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:u(this.height,t),width:u(this.width,t),backgroundColor:u(this.bgColor,t),top:u(this.y,t),left:u(this.x,t),zIndex:this.z,fontSize:u(this.fontSize,t),fontFamily:this.fontFamily,color:u(this.fontColor,t),display:"true"===u(`${this.visible}`,t)?"flex":"none",margin:u(this.margin,t),padding:u(this.padding,t),borderRadius:u(this.borderRadius,t),columns:u(`${this.columns}`,t),gap:u(this.gap,t)}}render(){const t=this.keys.split(",").map((t=>t.trim())),e="true"===document.getElementById(s).getAttribute("show-check");return b(f,{key:"4de3b75fa2905744ad610d147d9b4fe9912dd732",class:"lido-keyboard",style:{width:this.style.width,height:this.style.height,position:"relative",margin:this.style.margin,zIndex:this.z}},this.keyboardInput&&b("div",{key:"7b5d293c52747700cde9c1069cfbbdae065e64f9",class:"input-area"},b("input",{key:"03a91cd87e6bb4f09bf698087258426dd9232f67",type:"text",value:this.inputString,class:"input-area",readonly:!0}),b("lido-text",{key:"d30e033a055df52b30b2f2775c2b3410ee37df63",visible:e?"true":"false",string:"<<","bg-color":"black","font-color":"white","border-radius":"20px","font-size":"30px",width:"100px",height:"70px",type:"click",onClick:()=>{this.inputString=this.inputString.slice(0,-1),this.inputValidation(event)}}),b("lido-text",{key:"70d78aed7dedbe7d03a05c13c4c320029280bb03",visible:e?"true":"false",id:"lido-checkButton",string:"Enter","bg-color":"green","font-color":"white","border-radius":"20px","font-size":"30px",width:"150px",height:"70px",type:"click"})),this.letterLength&&b("lido-text",{key:"19306cd12bd98dc8dc7b54b20bad3f2f0318116f",visible:"true",string:`${this.numberOfClick}/${this.letterLength}`,"font-size":"60px","font-color":"white",onEntry:"this.position='absolute'; this.right='0'; this.fontWeight='800';",x:"unset"}),b("div",{key:"826900d6ba26175eb45d2e7e4c02fccce2004db3",class:"keyboard-wrapper",style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"stretch",gap:this.gap,width:"100%",height:"100%"}},t.map(((t,e)=>{const[i,s]=t.split("-"),o="disable"===s;let n="Space"===i?" ":i;return b("lido-text",{id:"key-button-"+e,style:{flex:`0 0 calc(${100/parseInt(this.style.columns)}% - ${this.style.gap})`},visible:"true","font-size":this.style.fontSize,"font-color":this.fontColor,"font-family":this.fontFamily,"bg-color":this.bgColor,string:i,onEntry:this.onEntry,"border-radius":this.style.borderRadius,value:i.toLowerCase(),type:this.type,class:"key-button"+(o?" disabled":""),onClick:()=>{this.inputString+=n,this.inputValidation(event)},"disable-speak":this.disableSpeak})}))))}get el(){return this}static get style(){return'.lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type="text"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}'}},[0,"lido-keyboard",{keys:[1],width:[1],height:[1],fontSize:[1,"font-size"],fontColor:[1,"font-color"],fontFamily:[1,"font-family"],gap:[1],bgColor:[1,"bg-color"],borderRadius:[1,"border-radius"],y:[1],x:[1],z:[1],margin:[1],padding:[1],visible:[1],onEntry:[1,"on-entry"],type:[1],keyboardInput:[4,"keyboard-input"],columns:[1],letterLength:[2,"letter-length"],disableSpeak:[4,"disable-speak"],numberOfClick:[32],inputString:[32],style:[32]}]);function x(){"undefined"!=typeof customElements&&["lido-keyboard","lido-text"].forEach((e=>{switch(e){case"lido-keyboard":customElements.get(t(e))||customElements.define(t(e),g);break;case"lido-text":customElements.get(t(e))||y()}}))}x();export{g as L,x as d}
1
+ import{t,p as e,H as i,w as s,S as o,s as n,A as a,x as r,f as d,g as l,j as h,u as c,D as p,a as u,h as b,b as f}from"./index.js";import{d as y}from"./p-Cj-6tqzU.js";const g=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.keys="",this.gap="10px",this.bgColor="",this.borderRadius="",this.keyboardInput=!1,this.columns="10",this.disableSpeak=!1,this.numberOfClick=0,this.inputString="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}async inputValidation(t){if("click"!==this.type)return;const e=document.getElementById(s);if(!t.target.getAttribute("value"))return;let i=JSON.parse(localStorage.getItem(o))||"";localStorage.setItem(o,JSON.stringify(i));const p=document.body.getBoundingClientRect(),u=Array.from(e.querySelectorAll(".bubble-element")).filter((t=>{const e=t.getBoundingClientRect();return e.left<p.right&&e.right>p.left&&e.top<p.bottom&&e.bottom>p.top})).find((t=>{const e=t.getAttribute("value");return(null==e?void 0:e.startsWith(this.inputString.toLowerCase()))?t:null}));if(u){if(this.inputString.toLowerCase()===u.getAttribute("value").toLowerCase()){n(!0),a.getI().play(u),r(u),setTimeout((()=>{this.inputString=""}),1e3);const t=u.getAttribute("onCorrect");if(await d(t,u),u.style.animation="none",u.style.pointerEvents="none",this.numberOfClick++,localStorage.removeItem(o),this.numberOfClick===this.letterLength){const t=e.getAttribute("onCorrect");e.style.pointerEvents="none",await d(t,this.el),l(),h()}else c(u)}}else{n(!1),setTimeout((()=>{this.inputString=""}),1e3),localStorage.removeItem(o);const t=e.getAttribute("onInCorrect");await d(t,this.el)}}componentDidLoad(){if(document.getElementById(s).getAttribute("drop-action")===p.InfiniteDrop){const t=this.el.querySelectorAll(".key-button"),e=t[0];t.forEach((t=>{t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}))}}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:u(this.height,t),width:u(this.width,t),backgroundColor:u(this.bgColor,t),top:u(this.y,t),left:u(this.x,t),zIndex:this.z,fontSize:u(this.fontSize,t),fontFamily:this.fontFamily,color:u(this.fontColor,t),display:"true"===u(`${this.visible}`,t)?"flex":"none",margin:u(this.margin,t),padding:u(this.padding,t),borderRadius:u(this.borderRadius,t),columns:u(`${this.columns}`,t),gap:u(this.gap,t)}}render(){const t=this.keys.split(",").map((t=>t.trim())),e="true"===document.getElementById(s).getAttribute("show-check");return b(f,{key:"4de3b75fa2905744ad610d147d9b4fe9912dd732",class:"lido-keyboard",style:{width:this.style.width,height:this.style.height,position:"relative",margin:this.style.margin,zIndex:this.z}},this.keyboardInput&&b("div",{key:"7b5d293c52747700cde9c1069cfbbdae065e64f9",class:"input-area"},b("input",{key:"03a91cd87e6bb4f09bf698087258426dd9232f67",type:"text",value:this.inputString,class:"input-area",readonly:!0}),b("lido-text",{key:"d30e033a055df52b30b2f2775c2b3410ee37df63",visible:e?"true":"false",string:"<<","bg-color":"black","font-color":"white","border-radius":"20px","font-size":"30px",width:"100px",height:"70px",type:"click",onClick:()=>{this.inputString=this.inputString.slice(0,-1),this.inputValidation(event)}}),b("lido-text",{key:"70d78aed7dedbe7d03a05c13c4c320029280bb03",visible:e?"true":"false",id:"lido-checkButton",string:"Enter","bg-color":"green","font-color":"white","border-radius":"20px","font-size":"30px",width:"150px",height:"70px",type:"click"})),this.letterLength&&b("lido-text",{key:"19306cd12bd98dc8dc7b54b20bad3f2f0318116f",visible:"true",string:`${this.numberOfClick}/${this.letterLength}`,"font-size":"60px","font-color":"white",onEntry:"this.position='absolute'; this.right='0'; this.fontWeight='800';",x:"unset"}),b("div",{key:"826900d6ba26175eb45d2e7e4c02fccce2004db3",class:"keyboard-wrapper",style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"stretch",gap:this.gap,width:"100%",height:"100%"}},t.map(((t,e)=>{const[i,s]=t.split("-"),o="disable"===s;let n="Space"===i?" ":i;return b("lido-text",{id:"key-button-"+e,style:{flex:`0 0 calc(${100/parseInt(this.style.columns)}% - ${this.style.gap})`},visible:"true","font-size":this.style.fontSize,"font-color":this.fontColor,"font-family":this.fontFamily,"bg-color":this.bgColor,string:i,onEntry:this.onEntry,"border-radius":this.style.borderRadius,value:i.toLowerCase(),type:this.type,class:"key-button"+(o?" disabled":""),onClick:()=>{this.inputString+=n,this.inputValidation(event)},"disable-speak":this.disableSpeak})}))))}get el(){return this}static get style(){return'.lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type="text"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}'}},[0,"lido-keyboard",{keys:[1],width:[1],height:[1],fontSize:[1,"font-size"],fontColor:[1,"font-color"],fontFamily:[1,"font-family"],gap:[1],bgColor:[1,"bg-color"],borderRadius:[1,"border-radius"],y:[1],x:[1],z:[1],margin:[1],padding:[1],visible:[1],onEntry:[1,"on-entry"],type:[1],keyboardInput:[4,"keyboard-input"],columns:[1],letterLength:[2,"letter-length"],disableSpeak:[4,"disable-speak"],numberOfClick:[32],inputString:[32],style:[32]}]);function x(){"undefined"!=typeof customElements&&["lido-keyboard","lido-text"].forEach((e=>{switch(e){case"lido-keyboard":customElements.get(t(e))||customElements.define(t(e),g);break;case"lido-text":customElements.get(t(e))||y()}}))}x();export{g as L,x as d}
@@ -0,0 +1 @@
1
+ import{t,p as i,H as o,d as e,e as s,S as a,s as r,C as l,A as n,f as c,g as d,j as h,h as u,c as p,b}from"./index.js";import{d as f}from"./p-Bw-OC9iR.js";import{d as m}from"./p-Cj-6tqzU.js";const x=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.onOk=e(this,"onOk"),this.width="479px",this.visible=!1,this.height="711px",this.objective="",this.onEntry="",this.x="0px",this.y="0px",this.bgColor="#60DADA",this.penIcon="",this.displayValue="",this.style={},this.userAnswers=[],this.tempInputs=[]}updateValueAttr(){this.el.setAttribute("value",this.displayValue)}componentWillLoad(){if(!this.objective){const t=this.el.closest("lido-container");t&&(this.objective=(t.getAttribute("objective")||"").replace("=","").trim())}this.updateValueAttr()}handleClick(t){"OK"===t?this.verifyAnswer():"←"===t?this.displayValue=this.displayValue.slice(0,-1):this.displayValue.length<8&&(this.displayValue+=t),this.updateValueAttr()}async verifyAnswer(){var t;const i=this.displayValue.trim();if(!i)return;let o=!1;const e=this.el.closest("lido-container");if(!e)return;if(this.objective&&""!=this.objective&&!this.objective.includes(","))o=Number(i)===Number(this.objective);else if(this.objective&&this.objective.includes(",")){const t="true"===e.getAttribute("is-continue-on-correct"),s=this.objective.split(",").map((t=>t.trim())),a=this.userAnswers.length;a<s.length&&Number(i)===Number(s[a])&&(o=!0),t?o&&this.userAnswers.push(Number(i)):this.userAnswers.push(Number(i))}else if(""===this.objective){const t=e.getAttribute("equationCheck")||"";if(!t)return;try{const e=s(t);o=Number(e)===Number(i.trim())}catch(t){console.error("Error evaluating equation:",t),o=!1}}this.onOk.emit(o);const u=document.getElementById("btn-11");if(o){const s="nimbleTable"===e.getAttribute("template-id"),p=this.objective.includes(",");s&&p||e.setAttribute("game-completed","true"),this.tempInputs.push(i);const b=JSON.parse(null!==(t=e.getAttribute(a))&&void 0!==t?t:"[]"),f=Array.isArray(b)?b.filter((t=>""!==String(t).trim())):[],m=this.tempInputs[this.tempInputs.length-1];if(""!==String(m).trim()&&f.push(m),e.setAttribute(a,JSON.stringify(f)),u.style.pointerEvents="none",this.displayValue="",r(o,l),s&&p){const t=e.querySelector("[type='calculate']");t&&(t.getAttribute("audio")||"").trim()&&(t.style.boxShadow="none !important",t.setAttribute("onCorrect","this.speak='true'"),n.getI().play(t))}const x=(null==e?void 0:e.getAttribute("onCorrect"))||"";if(await c(x,e),!x.includes("scrollCellAfterEquationSolved"))if(p){const t=this.objective.split(",").map((t=>t.trim()));this.userAnswers.length>=t.length&&(e.setAttribute("game-completed","true"),d(),h())}else d(),h()}else{u.style.pointerEvents="none",this.displayValue="",r(o,l);const t=(null==e?void 0:e.getAttribute("onInCorrect"))||"",i=(null==e?void 0:e.getAttribute("onCorrect"))||"",s="true"===e.getAttribute("is-continue-on-correct");s?await c(t,e):await c(i,e),s||(e.setAttribute("game-completed","true"),d(),h())}u.style.pointerEvents="auto"}render(){return u(b,{key:"e8249dda090212d327b68b47d42a123de6a890c9",onEntry:this.onEntry,id:"lidoCalculator",style:{width:this.width,height:this.height,backgroundColor:this.bgColor,left:this.x,top:this.y}},u("lido-cell",{key:"54d093a3dd6a6e5850c881d224290bd6cf9c3690",visible:"true",height:"94px",width:"60px"},u("lido-text",{key:"7145c80b2477493a8a87f6d098164293732861bf",visible:"true",id:"lido-calculator-penIcon",type:"click",height:"80px",x:"204%",width:"89px",onEntry:"this.position='relative';",class:"top-icon"},u("img",{key:"7242feedd5172b555df683c747bbef778a9cdcd7",src:p(this.penIcon),alt:"pen",style:{width:"100%",height:"100%"}}))),u("div",{key:"6145a4f89da352c3576e6d51a1e260e335778fbb",class:"lido-calculator-displayParent"},u("div",{key:"04e07b724d912d43b08c7a1e15c605d0fd30c7be",class:"lido-calculator-display"},this.displayValue)),u("div",{key:"19839d02863ca1e27fddb4093f191171e237f143",class:"lido-calculator-buttons"},["1","2","3","4","5","6","7","8","9","←","0","OK"].map(((t,i)=>u("lido-text",{id:`btn-${i}`,string:t,visible:"true",type:"click",class:{"lido-calculator-btn-special":"←"===t||"OK"===t,"lido-calculator-btn-default":"←"!==t&&"OK"!==t},onClick:()=>this.handleClick(t)})))))}get el(){return this}static get style(){return"#lidoCalculator{border-radius:19px;border:5px solid #029A9A;position:relative;display:flex;flex-direction:column;padding:2%;box-sizing:border-box}.lido-calculator-btn-special{--btn-bg-color:#014D4D !important;background-color:#014D4D !important;--btn-shadow-color:#0a2f2f !important}.lido-calculator-btn-default{--btn-bg-color:#029A9A !important;background-color:#029A9A !important;color:#000;--btn-shadow-color:#0f4242 !important}#lido-calculator-penIcon{--btn-bg-color:#FB7038 !important;--btn-shadow-px:0 8px 0 !important;--btn-shadow-color:#D74B12 !important;border-radius:5px !important}.lido-calculator-displayParent{width:89%;height:107px;background-color:rgb(68, 186, 186);border-radius:5px;margin:14px auto 17px auto;overflow:hidden;display:flex;align-items:end}.lido-calculator-display{width:97%;height:94px;background:#029A9A;color:#fff;text-align:right;display:flex;justify-content:flex-end;align-items:center;font-size:72px;font-weight:700;font-family:'Baloo Bhai 2', serif;border-radius:5px 0px 0px 5px;box-sizing:border-box;margin:0 0px -6px auto}.lido-calculator-buttons{flex:1;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;gap:0%;width:100%;justify-items:center;align-items:center;position:relative;top:-1%}.lido-calculator-buttons lido-text{display:flex !important;justify-content:center;align-items:center;width:100px !important;height:88px !important;font-size:80px !important;font-weight:700 !important;color:#fff;border-radius:5px !important;cursor:pointer;text-align:center;line-height:1;box-sizing:border-box;transition:transform 0.1s}.lido-calculator-buttons lido-text:active{transform:scale(0.95)}"}},[0,"lido-calculator",{width:[1],visible:[8],height:[1],objective:[1],onEntry:[1,"on-entry"],x:[1],y:[1],bgColor:[1,"bg-color"],penIcon:[1,"pen-icon"],displayValue:[32],style:[32]}]);function g(){"undefined"!=typeof customElements&&["lido-calculator","lido-cell","lido-text"].forEach((i=>{switch(i){case"lido-calculator":customElements.get(t(i))||customElements.define(t(i),x);break;case"lido-cell":customElements.get(t(i))||f();break;case"lido-text":customElements.get(t(i))||m()}}))}g();export{x as L,g as d}
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from './index-C854B63S.js';
1
+ import { g as getDefaultExportFromCjs } from './index-D-29PaRa.js';
2
2
 
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {