lido-player 0.0.2-beta-15 → 0.0.2-beta-16-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 (73) hide show
  1. package/dist/cjs/{decode-xNTgi2vl.js → decode-C08Ujimj.js} +1 -1
  2. package/dist/cjs/{index-BFTVvr1n.js → index-BkBqiwe8.js} +134 -8
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/lido-avatar_22.cjs.entry.js +52 -29
  5. package/dist/cjs/lido-player.cjs.js +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/calculator/lido-calculator.css +12 -12
  8. package/dist/collection/components/canvas/lido-canvas.css +32 -32
  9. package/dist/collection/components/canvas/lido-canvas.js +1 -1
  10. package/dist/collection/components/cell/lido-cell.js +1 -1
  11. package/dist/collection/components/column/lido-col.js +1 -1
  12. package/dist/collection/components/container/lido-container.js +2 -2
  13. package/dist/collection/components/float/lido-float.js +1 -1
  14. package/dist/collection/components/position/lido-pos.js +1 -1
  15. package/dist/collection/components/row/lido-row.js +1 -1
  16. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  17. package/dist/collection/components/text/lido-text.js +25 -1
  18. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  19. package/dist/collection/utils/constants.js +1 -0
  20. package/dist/collection/utils/utils.js +4 -0
  21. package/dist/collection/utils/utilsHandlers/animationHandler.js +20 -9
  22. package/dist/collection/utils/utilsHandlers/moveHandler.js +111 -0
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/lido-calculator.js +1 -1
  25. package/dist/components/lido-canvas.js +1 -1
  26. package/dist/components/lido-cell.js +1 -1
  27. package/dist/components/lido-col.js +1 -1
  28. package/dist/components/lido-container.js +1 -1
  29. package/dist/components/lido-float.js +1 -1
  30. package/dist/components/lido-home.js +1 -1
  31. package/dist/components/lido-image.js +1 -1
  32. package/dist/components/lido-keyboard.js +1 -1
  33. package/dist/components/lido-pos.js +1 -1
  34. package/dist/components/lido-root.js +1 -1
  35. package/dist/components/lido-row.js +1 -1
  36. package/dist/components/lido-slide-fill.js +1 -1
  37. package/dist/components/lido-text.js +1 -1
  38. package/dist/components/lido-wrap.js +1 -1
  39. package/dist/components/{p-kmKkLN_7.js → p-BE25wHoo.js} +1 -1
  40. package/dist/components/p-BfwUqpXc.js +1 -0
  41. package/dist/components/{p-CDhOF-lb.js → p-Bw-OC9iR.js} +1 -1
  42. package/dist/components/{p-DVn4BL1l.js → p-C2p0KZh4.js} +1 -1
  43. package/dist/components/p-C5jvgiPE.js +1 -0
  44. package/dist/components/{p-CFNRhdZZ.js → p-CPYnt0P-.js} +1 -1
  45. package/dist/components/{p-B8USa8EO.js → p-CS6iRQJh.js} +1 -1
  46. package/dist/components/{p-DflRPD3L.js → p-CyGxEcn7.js} +1 -1
  47. package/dist/components/{p-BP79Al--.js → p-D-IYWSAa.js} +1 -1
  48. package/dist/components/{p-CbZUFX8q.js → p-DGvzMlyn.js} +2 -2
  49. package/dist/components/p-DbR5sNOj.js +1 -0
  50. package/dist/components/{p-D2RiLzSu.js → p-Sl9R-E6h.js} +1 -1
  51. package/dist/components/p-Uluc7jQ7.js +1 -0
  52. package/dist/components/{p-CLX-8DBk.js → p-useuhkjH.js} +1 -1
  53. package/dist/esm/{decode-DyBLrL5N.js → decode-CGJIPA4t.js} +1 -1
  54. package/dist/esm/{index-B7s7KKj1.js → index-C854B63S.js} +134 -8
  55. package/dist/esm/index.js +1 -1
  56. package/dist/esm/lido-avatar_22.entry.js +52 -29
  57. package/dist/esm/lido-player.js +1 -1
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/lido-player/index.esm.js +1 -1
  60. package/dist/lido-player/lido-player.esm.js +1 -1
  61. package/dist/lido-player/{p-Detap4vV.js → p-Bg5mBsd9.js} +1 -1
  62. package/dist/lido-player/p-C4OTDhbr.js +1 -0
  63. package/dist/lido-player/{p-05fff653.entry.js → p-f0e333c6.entry.js} +2 -2
  64. package/dist/types/components/text/lido-text.d.ts +4 -0
  65. package/dist/types/components.d.ts +11 -0
  66. package/dist/types/utils/constants.d.ts +1 -0
  67. package/dist/types/utils/utilsHandlers/moveHandler.d.ts +1 -0
  68. package/package.json +1 -1
  69. package/dist/components/p-BJ4H1UxZ.js +0 -1
  70. package/dist/components/p-BiNO9454.js +0 -1
  71. package/dist/components/p-DH6lvh19.js +0 -1
  72. package/dist/components/p-DbDgJi-A.js +0 -1
  73. package/dist/lido-player/p-CofY42mG.js +0 -1
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-B8USa8EO.js";const a=o,p=s;export{a as LidoCalculator,p as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CS6iRQJh.js";const p=o,r=s;export{p as LidoCalculator,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CFNRhdZZ.js";const p=o,r=s;export{p as LidoCanvas,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CPYnt0P-.js";const t=o,p=s;export{t as LidoCanvas,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CDhOF-lb.js";const p=o,r=s;export{p as LidoCell,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-Bw-OC9iR.js";const p=o,r=s;export{p as LidoCell,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BJ4H1UxZ.js";const p=o,r=s;export{p as LidoCol,r as defineCustomElement}
1
+ import{L as o,d as p}from"./p-BfwUqpXc.js";const s=o,r=p;export{s as LidoCol,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-DH6lvh19.js";const p=o,r=s;export{p as LidoContainer,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-Uluc7jQ7.js";const p=o,r=s;export{p as LidoContainer,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BiNO9454.js";const p=o,r=s;export{p as LidoFloat,r as defineCustomElement}
1
+ import{L as s,d as o}from"./p-DbR5sNOj.js";const p=s,r=o;export{p as LidoFloat,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CbZUFX8q.js";const p=o,r=s;export{p as LidoHome,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-DGvzMlyn.js";const p=o,r=s;export{p as LidoHome,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-DbDgJi-A.js";const p=o,r=s;export{p as LidoImage,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-C5jvgiPE.js";const p=o,r=s;export{p as LidoImage,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BP79Al--.js";const p=o,r=s;export{p as LidoKeyboard,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-D-IYWSAa.js";const a=o,p=s;export{a as LidoKeyboard,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-DflRPD3L.js";const p=o,r=s;export{p as LidoPos,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CyGxEcn7.js";const p=o,r=s;export{p as LidoPos,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-DVn4BL1l.js";import{d as r}from"./p-CwDTdXe5.js";import{d as m}from"./p-DPAlnts-.js";import{d as n}from"./p-B8USa8EO.js";import{d}from"./p-CFNRhdZZ.js";import{d as c}from"./p-CDhOF-lb.js";import{d as p}from"./p-BJ4H1UxZ.js";import{d as h}from"./p-DH6lvh19.js";import{d as u}from"./p-D-B1groh.js";import{d as b}from"./p-BiNO9454.js";import{d as f}from"./p-CbZUFX8q.js";import{d as k}from"./p-DbDgJi-A.js";import{d as E}from"./p-BP79Al--.js";import{d as x}from"./p-C7U1h9gI.js";import{d as j}from"./p-DflRPD3L.js";import{d as g}from"./p-leIEepjl.js";import{d as v}from"./p-CLX-8DBk.js";import{d as L}from"./p-BSV5U72F.js";import{d as U}from"./p-D2RiLzSu.js";import{d as B}from"./p-DYs8s-uh.js";import{d as D}from"./p-kmKkLN_7.js";const w=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.xmlPath="",this.initialIndex=0,this.margin="",this.canplay=!0,this.baseUrl="",this.zipUrl=""}connectedCallback(){this.setLanguage(this.Lang)}onLangChange(t){this.setLanguage(t)}setLanguage(t){l.changeLanguage(t||l.language)}async componentWillLoad(){var t,s;if(this.zipUrl)return void(this.xmlData="");const o=null!==(t=this.xmlPath)&&void 0!==t?t:this.baseUrl+((null===(s=this.baseUrl)||void 0===s?void 0:s.endsWith("/"))?"index.xml":"/index.xml");try{const t=o.startsWith("http")?o:e(o),s=await fetch(t);if(!s.ok)throw Error("Failed to fetch XML data: "+s.statusText);const a=await s.text();this.xmlData=a}catch(t){console.error("Error fetching XML data:",t),this.xmlData=null}}render(){return void 0===this.xmlData?a("div",null,"Loading..."):null===this.xmlData?a("div",null,"Error loading XML data. Please check the path or URL."):a("lido-home",Object.assign({showNav:!0,activeContainerIndexes:[],initialIndex:this.initialIndex,canplay:this.canplay,xmlData:this.xmlData,baseUrl:this.baseUrl},this.zipUrl?{zipUrl:this.zipUrl}:{},{exitButtonUrl:this.exitButtonUrl,prevButtonUrl:this.prevButtonUrl,nextButtonUrl:this.nextButtonUrl,speakerButtonUrl:this.speakerButtonUrl}))}static get assetsDirs(){return["assets"]}static get watchers(){return{Lang:[{onLangChange:0}]}}},[0,"lido-root",{Lang:[1,"lang"],xmlPath:[1,"xml-path"],initialIndex:[2,"initial-index"],margin:[1],canplay:[4],baseUrl:[1,"base-url"],zipUrl:[1,"zip-url"],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],xmlData:[32]},void 0,{Lang:[{onLangChange:0}]}]);function C(){"undefined"!=typeof customElements&&["lido-root","lido-avatar","lido-balance","lido-calculator","lido-canvas","lido-cell","lido-col","lido-container","lido-flash-card","lido-float","lido-home","lido-image","lido-keyboard","lido-math-matrix","lido-pos","lido-random","lido-row","lido-shape","lido-slide-fill","lido-text","lido-trace","lido-wrap"].forEach((s=>{switch(s){case"lido-root":customElements.get(t(s))||customElements.define(t(s),w);break;case"lido-avatar":customElements.get(t(s))||r();break;case"lido-balance":customElements.get(t(s))||m();break;case"lido-calculator":customElements.get(t(s))||n();break;case"lido-canvas":customElements.get(t(s))||d();break;case"lido-cell":customElements.get(t(s))||c();break;case"lido-col":customElements.get(t(s))||p();break;case"lido-container":customElements.get(t(s))||h();break;case"lido-flash-card":customElements.get(t(s))||u();break;case"lido-float":customElements.get(t(s))||b();break;case"lido-home":customElements.get(t(s))||f();break;case"lido-image":customElements.get(t(s))||k();break;case"lido-keyboard":customElements.get(t(s))||E();break;case"lido-math-matrix":customElements.get(t(s))||x();break;case"lido-pos":customElements.get(t(s))||j();break;case"lido-random":customElements.get(t(s))||g();break;case"lido-row":customElements.get(t(s))||v();break;case"lido-shape":customElements.get(t(s))||L();break;case"lido-slide-fill":customElements.get(t(s))||U();break;case"lido-text":customElements.get(t(s))||i();break;case"lido-trace":customElements.get(t(s))||B();break;case"lido-wrap":customElements.get(t(s))||D()}}))}C();const y=w,X=C;export{y as LidoRoot,X as defineCustomElement}
1
+ import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-C2p0KZh4.js";import{d as r}from"./p-CwDTdXe5.js";import{d as n}from"./p-DPAlnts-.js";import{d as m}from"./p-CS6iRQJh.js";import{d}from"./p-CPYnt0P-.js";import{d as c}from"./p-Bw-OC9iR.js";import{d as p}from"./p-BfwUqpXc.js";import{d as h}from"./p-Uluc7jQ7.js";import{d as u}from"./p-D-B1groh.js";import{d as f}from"./p-DbR5sNOj.js";import{d as b}from"./p-DGvzMlyn.js";import{d as E}from"./p-C5jvgiPE.js";import{d as k}from"./p-D-IYWSAa.js";import{d as j}from"./p-C7U1h9gI.js";import{d as x}from"./p-CyGxEcn7.js";import{d as g}from"./p-leIEepjl.js";import{d as v}from"./p-useuhkjH.js";import{d as U}from"./p-BSV5U72F.js";import{d as w}from"./p-Sl9R-E6h.js";import{d as B}from"./p-DYs8s-uh.js";import{d as C}from"./p-BE25wHoo.js";const L=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.xmlPath="",this.initialIndex=0,this.margin="",this.canplay=!0,this.baseUrl="",this.zipUrl=""}connectedCallback(){this.setLanguage(this.Lang)}onLangChange(t){this.setLanguage(t)}setLanguage(t){l.changeLanguage(t||l.language)}async componentWillLoad(){var t,s;if(this.zipUrl)return void(this.xmlData="");const o=null!==(t=this.xmlPath)&&void 0!==t?t:this.baseUrl+((null===(s=this.baseUrl)||void 0===s?void 0:s.endsWith("/"))?"index.xml":"/index.xml");try{const t=o.startsWith("http")?o:e(o),s=await fetch(t);if(!s.ok)throw Error("Failed to fetch XML data: "+s.statusText);const a=await s.text();this.xmlData=a}catch(t){console.error("Error fetching XML data:",t),this.xmlData=null}}render(){return void 0===this.xmlData?a("div",null,"Loading..."):null===this.xmlData?a("div",null,"Error loading XML data. Please check the path or URL."):a("lido-home",Object.assign({showNav:!0,activeContainerIndexes:[],initialIndex:this.initialIndex,canplay:this.canplay,xmlData:this.xmlData,baseUrl:this.baseUrl},this.zipUrl?{zipUrl:this.zipUrl}:{},{exitButtonUrl:this.exitButtonUrl,prevButtonUrl:this.prevButtonUrl,nextButtonUrl:this.nextButtonUrl,speakerButtonUrl:this.speakerButtonUrl}))}static get assetsDirs(){return["assets"]}static get watchers(){return{Lang:[{onLangChange:0}]}}},[0,"lido-root",{Lang:[1,"lang"],xmlPath:[1,"xml-path"],initialIndex:[2,"initial-index"],margin:[1],canplay:[4],baseUrl:[1,"base-url"],zipUrl:[1,"zip-url"],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],xmlData:[32]},void 0,{Lang:[{onLangChange:0}]}]);function D(){"undefined"!=typeof customElements&&["lido-root","lido-avatar","lido-balance","lido-calculator","lido-canvas","lido-cell","lido-col","lido-container","lido-flash-card","lido-float","lido-home","lido-image","lido-keyboard","lido-math-matrix","lido-pos","lido-random","lido-row","lido-shape","lido-slide-fill","lido-text","lido-trace","lido-wrap"].forEach((s=>{switch(s){case"lido-root":customElements.get(t(s))||customElements.define(t(s),L);break;case"lido-avatar":customElements.get(t(s))||r();break;case"lido-balance":customElements.get(t(s))||n();break;case"lido-calculator":customElements.get(t(s))||m();break;case"lido-canvas":customElements.get(t(s))||d();break;case"lido-cell":customElements.get(t(s))||c();break;case"lido-col":customElements.get(t(s))||p();break;case"lido-container":customElements.get(t(s))||h();break;case"lido-flash-card":customElements.get(t(s))||u();break;case"lido-float":customElements.get(t(s))||f();break;case"lido-home":customElements.get(t(s))||b();break;case"lido-image":customElements.get(t(s))||E();break;case"lido-keyboard":customElements.get(t(s))||k();break;case"lido-math-matrix":customElements.get(t(s))||j();break;case"lido-pos":customElements.get(t(s))||x();break;case"lido-random":customElements.get(t(s))||g();break;case"lido-row":customElements.get(t(s))||v();break;case"lido-shape":customElements.get(t(s))||U();break;case"lido-slide-fill":customElements.get(t(s))||w();break;case"lido-text":customElements.get(t(s))||i();break;case"lido-trace":customElements.get(t(s))||B();break;case"lido-wrap":customElements.get(t(s))||C()}}))}D();const y=L,I=D;export{y as LidoRoot,I as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CLX-8DBk.js";const p=o,r=s;export{p as LidoRow,r as defineCustomElement}
1
+ import{L as s,d as o}from"./p-useuhkjH.js";const p=s,r=o;export{p as LidoRow,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-D2RiLzSu.js";const p=o,r=s;export{p as LidoSlideFill,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-Sl9R-E6h.js";const p=o,r=s;export{p as LidoSlideFill,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-DVn4BL1l.js";const p=o,r=s;export{p as LidoText,r as defineCustomElement}
1
+ import{L as o,d as p}from"./p-C2p0KZh4.js";const s=o,r=p;export{s as LidoText,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-kmKkLN_7.js";const m=o,p=s;export{m as LidoWrap,p as defineCustomElement}
1
+ import{L as o,d as s}from"./p-BE25wHoo.js";const p=o,r=s;export{p as LidoWrap,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t as i,p as t,H as s,i as e,l as o,m as a,a as n,h as r,b as h}from"./index.js";const d=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.showSpeakIcon=!1,this.minDrops=1,this.maxDrops=1,this.margin="",this.disableSpeak=!1,this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}componentDidLoad(){e(this.el,this.type),o(this.el,this.minLength,this.maxLength,this.childElementsLength),"true"===this.flex&&(this.el.classList.remove("lido-wrap"),this.el.classList.add("lido-flex")),this.showSpeakIcon&&a(this.el)}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 i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:n(this.height,i),width:n(this.width,i),backgroundColor:n(this.bgColor,i),top:n(this.y,i),left:n(this.x,i),zIndex:this.z,display:JSON.parse(n(`${this.visible}`,i))?"true"===this.flex?"flex":"grid":"none",margin:n(this.margin,i)}}render(){return r(h,{key:"c209fed0cad8eb46d43fc9ec54822eef228c4321",class:"lido-wrap",value:this.value,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,minDrops:this.minDrops,maxDrops:this.maxDrops,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,disableSpeak:this.disableSpeak},r("slot",{key:"83ff04e7488aa185c1711de212eecc75b1aa9861"}))}get el(){return this}static get style(){return".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}"}},[260,"lido-wrap",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],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"],childElementsLength:[2,"child-elements-length"],minLength:[2,"min-length"],maxLength:[2,"max-length"],flex:[1],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],disableSpeak:[4,"disable-speak"],style:[32]}]);function l(){"undefined"!=typeof customElements&&["lido-wrap"].forEach((t=>{"lido-wrap"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}l();export{d as L,l as d}
1
+ import{t as i,p as t,H as s,i as e,l as o,m as a,a as n,h as r,b as h}from"./index.js";const d=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.showSpeakIcon=!1,this.minDrops=1,this.maxDrops=1,this.margin="",this.disableSpeak=!1,this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}componentDidLoad(){e(this.el,this.type),o(this.el,this.minLength,this.maxLength,this.childElementsLength),"true"===this.flex&&(this.el.classList.remove("lido-wrap"),this.el.classList.add("lido-flex")),this.showSpeakIcon&&a(this.el)}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 i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:n(this.height,i),width:n(this.width,i),backgroundColor:n(this.bgColor,i),top:n(this.y,i),left:n(this.x,i),zIndex:this.z,display:JSON.parse(n(`${this.visible}`,i))?"true"===this.flex?"flex":"grid":"none",margin:n(this.margin,i)}}render(){return r(h,{key:"58b1e37a1787349d3ccd2bc6952d94a7d945e234",class:"lido-wrap",value:this.value,type:this.type,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,minDrops:this.minDrops,maxDrops:this.maxDrops,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,disableSpeak:this.disableSpeak},r("slot",{key:"44389fcc3d2e86faf291b74bfe50b55d467a7278"}))}get el(){return this}static get style(){return".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}"}},[260,"lido-wrap",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],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"],childElementsLength:[2,"child-elements-length"],minLength:[2,"min-length"],maxLength:[2,"max-length"],flex:[1],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],disableSpeak:[4,"disable-speak"],style:[32]}]);function l(){"undefined"!=typeof customElements&&["lido-wrap"].forEach((t=>{"lido-wrap"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}l();export{d as L,l as d}
@@ -0,0 +1 @@
1
+ import{t,p as i,H as e,i as s,l as o,m as n,c as h,a,h as r,b as d}from"./index.js";const l=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.minDrops=1,this.maxDrops=1,this.margin="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}componentDidLoad(){s(this.el,this.type),o(this.el,this.minLength,this.maxLength,this.childElementsLength),this.showSpeakIcon&&n(this.el)}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?h(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:a(this.height,i),width:a(this.width,i),backgroundColor:a(this.bgColor,i),top:a(this.y,i),left:a(this.x,i),zIndex:this.z,display:this.visible?"flex":"none",flexDirection:this.direction?a(this.direction,i):"column",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",boxShadow:this.boxShadow?this.boxShadow:"unset",margin:a(this.margin,i)}}render(){return r(d,{key:"334206d6054442fec787cfb479a68ae164404730",id:this.id,class:"lido-col",type:this.type,"tab-index":this.tabIndex,value:this.value,style:this.style,minDrops:this.minDrops,maxDrops:this.maxDrops,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry},r("slot",{key:"590cd219bc5a02e6b96eafe108fb8b310daf941d"}))}get el(){return this}static get style(){return".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}"}},[260,"lido-col",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],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"],childElementsLength:[2,"child-elements-length"],minLength:[2,"min-length"],maxLength:[2,"max-length"],direction:[1],borderImage:[1,"border-image"],boxShadow:[1,"box-shadow"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],style:[32]}]);function c(){"undefined"!=typeof customElements&&["lido-col"].forEach((i=>{"lido-col"===i&&(customElements.get(t(i))||customElements.define(t(i),l))}))}c();export{l as L,c as d}
@@ -1 +1 @@
1
- import{t as i,p as t,H as s,k as o,i as e,l as a,m as l,a as r,h,b as d}from"./index.js";const n=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.showSpeakIcon=!1,this.scrollbarWidth="",this.id="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.gap="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible="false",this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.childElementsLength=9999,this.minLength=0,this.maxLength=9999,this.layout="wrap",this.minDrops=1,this.maxDrops=1,this.margin="",this.padding="",this.alignItems="",this.borderRadius="0px",this.flexDirection="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){o(this.el,this.delayVisible),e(this.el,this.type),a(this.el,this.minLength,this.maxLength,this.childElementsLength),setTimeout((()=>{const i=this.el.className.includes("lido-random")?this.el:null;if(i){const t=i.parentElement;if(!t)return;const s=t.offsetWidth,o=t.offsetHeight;Array.from(i.children).forEach((i=>{const t=s-i.offsetWidth,e=o-i.offsetHeight,a=Math.random()*t,l=Math.random()*e;i.style.position="absolute",i.style.left=`${a}px`,i.style.top=`${l}px`}))}}),50),this.showSpeakIcon&&l(this.el)}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 i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:r(this.height,i),width:r(this.width,i),backgroundColor:r(this.bgColor,i),top:r(this.y,i),left:r(this.x,i),zIndex:this.z,margin:r(this.margin,i),padding:r(this.padding,i),borderRadius:r(this.borderRadius,i),gap:r(this.gap,i),"--scrollbar-width":r(this.scrollbarWidth||"0px",i),display:JSON.parse(r(`${this.visible}`,i))?"wrap"===r(this.layout,i)?"grid":"pos"===r(this.layout,i)||"random"===r(this.layout,i)?"block":"flex":"none",flexDirection:this.flexDirection?r(this.flexDirection,i):"",alignItems:this.alignItems?r(this.alignItems,i):""},this.el.className=`lido-${r(this.layout,i)}`}render(){return h(d,{key:"98b1531fb9231062fa8a07cfa0e364e63a7d4829",id:this.id,class:"lido-cell",value:this.value,type:this.type,"tab-index":this.tabIndex,style:this.style,minDrops:this.minDrops,maxDrops:this.maxDrops,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,"flex-direction":this.flexDirection,"disable-speak":this.disableSpeak},h("slot",{key:"d223539fc21f45c0dc87c179e58f2dd689fa9276"}))}get el(){return this}static get style(){return".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}.lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}.lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}.lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}.lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}.lido-col::-webkit-scrollbar,.lido-wrap::-webkit-scrollbar,.lido-flex::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}.lido-col::-webkit-scrollbar-thumb,.lido-wrap::-webkit-scrollbar-thumb,.lido-flex::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px;border:3px solid transparent;background-clip:content-box}.lido-col::-webkit-scrollbar-track,.lido-wrap::-webkit-scrollbar-track,.lido-flex::-webkit-scrollbar-track{background:#f1f1f1}"}},[260,"lido-cell",{showSpeakIcon:[4,"show-speak-icon"],scrollbarWidth:[1,"scrollbar-width"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],gap:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[1],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],childElementsLength:[2,"child-elements-length"],minLength:[2,"min-length"],maxLength:[2,"max-length"],layout:[1],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],padding:[1],alignItems:[1,"align-items"],borderRadius:[1,"border-radius"],flexDirection:[1,"flex-direction"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function c(){"undefined"!=typeof customElements&&["lido-cell"].forEach((t=>{"lido-cell"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}c();export{n as L,c as d}
1
+ import{t as i,p as t,H as s,k as o,i as e,l as a,m as l,a as r,h,b as d}from"./index.js";const n=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.showSpeakIcon=!1,this.scrollbarWidth="",this.id="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.gap="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible="false",this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.childElementsLength=9999,this.minLength=0,this.maxLength=9999,this.layout="wrap",this.minDrops=1,this.maxDrops=1,this.margin="",this.padding="",this.alignItems="",this.borderRadius="0px",this.flexDirection="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){o(this.el,this.delayVisible),e(this.el,this.type),a(this.el,this.minLength,this.maxLength,this.childElementsLength),setTimeout((()=>{const i=this.el.className.includes("lido-random")?this.el:null;if(i){const t=i.parentElement;if(!t)return;const s=t.offsetWidth,o=t.offsetHeight;Array.from(i.children).forEach((i=>{const t=s-i.offsetWidth,e=o-i.offsetHeight,a=Math.random()*t,l=Math.random()*e;i.style.position="absolute",i.style.left=`${a}px`,i.style.top=`${l}px`}))}}),50),this.showSpeakIcon&&l(this.el)}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 i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:r(this.height,i),width:r(this.width,i),backgroundColor:r(this.bgColor,i),top:r(this.y,i),left:r(this.x,i),zIndex:this.z,margin:r(this.margin,i),padding:r(this.padding,i),borderRadius:r(this.borderRadius,i),gap:r(this.gap,i),"--scrollbar-width":r(this.scrollbarWidth||"0px",i),display:JSON.parse(r(`${this.visible}`,i))?"wrap"===r(this.layout,i)?"grid":"pos"===r(this.layout,i)||"random"===r(this.layout,i)?"block":"flex":"none",flexDirection:this.flexDirection?r(this.flexDirection,i):"",alignItems:this.alignItems?r(this.alignItems,i):""},this.el.className=`lido-${r(this.layout,i)}`}render(){return h(d,{key:"73bdf9dd33fdd8322c35465de011697da112193a",id:this.id,class:"lido-cell",value:this.value,type:this.type,"tab-index":this.tabIndex,style:this.style,minDrops:this.minDrops,maxDrops:this.maxDrops,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,"flex-direction":this.flexDirection,"disable-speak":this.disableSpeak},h("slot",{key:"6e9d4507b36716f04853d39ef66015441782aa88"}))}get el(){return this}static get style(){return".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}.lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}.lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}.lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}.lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}.lido-col::-webkit-scrollbar,.lido-wrap::-webkit-scrollbar,.lido-flex::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}.lido-col::-webkit-scrollbar-thumb,.lido-wrap::-webkit-scrollbar-thumb,.lido-flex::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px;border:3px solid transparent;background-clip:content-box}.lido-col::-webkit-scrollbar-track,.lido-wrap::-webkit-scrollbar-track,.lido-flex::-webkit-scrollbar-track{background:#f1f1f1}"}},[260,"lido-cell",{showSpeakIcon:[4,"show-speak-icon"],scrollbarWidth:[1,"scrollbar-width"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],gap:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[1],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],childElementsLength:[2,"child-elements-length"],minLength:[2,"min-length"],maxLength:[2,"max-length"],layout:[1],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1],padding:[1],alignItems:[1,"align-items"],borderRadius:[1,"border-radius"],flexDirection:[1,"flex-direction"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function c(){"undefined"!=typeof customElements&&["lido-cell"].forEach((t=>{"lido-cell"===t&&(customElements.get(i(t))||customElements.define(i(t),n))}))}c();export{n as L,c as d}
@@ -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.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:"e1ca534d9823a8b967c9d8c51d4aebd4706004e7",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,"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"],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 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}