lido-player 0.0.2-beta-18-dev → 0.0.2-beta-19-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.
- package/LICENSE +21 -21
- package/dist/cjs/{decode-DUZYNXIv.js → decode-Bny56MQ9.js} +1 -1
- package/dist/cjs/{index-BEjUmVtH.js → index-BY9fvbr8.js} +137 -64
- package/dist/cjs/{index-DnqQXD5x.js → index-DjsCseV8.js} +16 -10
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/lido-avatar_22.cjs.entry.js +33 -33
- package/dist/cjs/lido-player.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/avatar/lido-avatar.css +4 -4
- package/dist/collection/components/avatar/lido-avatar.js +1 -1
- package/dist/collection/components/avatar/lido-avatar.tsx +207 -207
- package/dist/collection/components/avatar/readme.md +49 -49
- package/dist/collection/components/calculator/lido-calculator.css +89 -89
- package/dist/collection/components/calculator/lido-calculator.js +2 -2
- package/dist/collection/components/canvas/lido-canvas.css +33 -33
- package/dist/collection/components/canvas/lido-canvas.js +1 -1
- package/dist/collection/components/cell/lido-cell.css +100 -100
- package/dist/collection/components/cell/lido-cell.js +12 -12
- package/dist/collection/components/column/lido-col.css +19 -19
- package/dist/collection/components/column/lido-col.js +6 -6
- package/dist/collection/components/container/lido-container.css +10 -10
- package/dist/collection/components/container/lido-container.js +8 -8
- package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
- package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
- package/dist/collection/components/float/lido-float.css +30 -30
- package/dist/collection/components/float/lido-float.js +2 -2
- package/dist/collection/components/home/lido-home.css +309 -309
- package/dist/collection/components/home/lido-home.js +5 -5
- package/dist/collection/components/image/lido-image.css +17 -17
- package/dist/collection/components/image/lido-image.js +6 -6
- package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
- package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
- package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
- package/dist/collection/components/position/lido-pos.css +16 -16
- package/dist/collection/components/position/lido-pos.js +2 -2
- package/dist/collection/components/random/lido-random.css +8 -8
- package/dist/collection/components/random/lido-random.js +2 -2
- package/dist/collection/components/root/lido-root.js +5 -5
- package/dist/collection/components/row/lido-row.css +10 -10
- package/dist/collection/components/row/lido-row.js +6 -6
- package/dist/collection/components/scale/assets/Shadow.svg +9 -9
- package/dist/collection/components/scale/lido-balance.css +145 -145
- package/dist/collection/components/scale/lido-balance.js +13 -13
- package/dist/collection/components/shape/lido-shape.css +216 -216
- package/dist/collection/components/shape/lido-shape.js +6 -6
- package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
- package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
- package/dist/collection/components/text/lido-text.css +53 -53
- package/dist/collection/components/text/lido-text.js +5 -5
- package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
- package/dist/collection/components/trace/lido-trace.css +97 -97
- package/dist/collection/components/trace/lido-trace.js +2 -2
- package/dist/collection/components/wrap/lido-wrap.css +18 -18
- package/dist/collection/components/wrap/lido-wrap.js +6 -6
- package/dist/collection/css/animation.css +211 -211
- package/dist/collection/css/index.css +324 -315
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
- package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
- package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
- package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
- package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
- package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
- package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
- package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
- package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
- package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
- package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
- package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
- package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
- package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
- package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
- package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
- package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
- package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
- package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
- package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
- package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +631 -631
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
- package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
- package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
- package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
- package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
- package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
- package/dist/collection/stories/Templates/total/total.stories.js +28 -28
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
- package/dist/collection/stories/components/flash-card.stories.js +48 -48
- package/dist/collection/stories/components/keyboard.stories.js +10 -10
- package/dist/collection/stories/components/slider.stories.js +4 -4
- package/dist/collection/stories/components/trace.stories.js +5 -5
- package/dist/collection/utils/audioPlayer.js +2 -5
- package/dist/collection/utils/utils.js +49 -9
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +10 -10
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
- package/dist/collection/utils/utilsHandlers/sortHandler.js +53 -15
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-yT7udDfd.js → p-B4YAipq-.js} +1 -1
- package/dist/components/{p-DdQ1eqJr.js → p-B8nzzM8c.js} +1 -1
- package/dist/components/{p-Sl9R-E6h.js → p-BBHM059l.js} +1 -1
- package/dist/components/{p-SPZTb5fI.js → p-BJMjg5wu.js} +1 -1
- package/dist/components/{p-Cj-6tqzU.js → p-BOQDbCrm.js} +1 -1
- package/dist/components/{p-CwDTdXe5.js → p-BeRr8u5m.js} +1 -1
- package/dist/components/{p-CjdDpXfk.js → p-BfqihbR6.js} +1 -1
- package/dist/components/{p-CPYnt0P-.js → p-C5WmmkI6.js} +1 -1
- package/dist/components/{p-useuhkjH.js → p-C70ykycD.js} +1 -1
- package/dist/components/{p-BE25wHoo.js → p-CCR42e0i.js} +1 -1
- package/dist/components/{p-BfwUqpXc.js → p-CTlcpv4a.js} +1 -1
- package/dist/components/{p-BNNX1Pew.js → p-CWwymnbk.js} +2 -2
- package/dist/components/{p-CyGxEcn7.js → p-CXHPZN3m.js} +1 -1
- package/dist/components/{p-Bw-OC9iR.js → p-CgsPIpg0.js} +1 -1
- package/dist/components/{p-D54c-ybm.js → p-CljvnHkI.js} +1 -1
- package/dist/components/p-CwIlwnQk.js +1 -0
- package/dist/components/p-DLyacZap.js +1 -0
- package/dist/components/p-DONbWJGn.js +1 -0
- package/dist/components/p-DVTigdH_.js +1 -0
- package/dist/components/{p-CTlwn9r7.js → p-DYFVwyRr.js} +1 -1
- package/dist/esm/{decode-BgBfbPZu.js → decode-Buyq-Iy5.js} +1 -1
- package/dist/esm/{index-D-29PaRa.js → index-CQXciux9.js} +137 -64
- package/dist/esm/{index-BeHFCsWf.js → index-DQZfuGjI.js} +16 -10
- package/dist/esm/index.js +2 -2
- package/dist/esm/lido-avatar_22.entry.js +33 -33
- package/dist/esm/lido-player.js +3 -3
- package/dist/esm/loader.js +2 -2
- package/dist/lido-player/assets/Shadow.svg +9 -9
- package/dist/lido-player/assets/Tracing-hand.svg +8 -8
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-avatar.css +4 -4
- package/dist/lido-player/lido-avatar.tsx +207 -207
- package/dist/lido-player/lido-player.css +8 -8
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-856e1956.entry.js → p-37736e11.entry.js} +2 -2
- package/dist/lido-player/p-3Ry570XH.js +1 -0
- package/dist/lido-player/{p-BA2X6O7O.js → p-CFtq4Thh.js} +1 -1
- package/dist/lido-player/p-DQZfuGjI.js +3 -0
- package/dist/lido-player/readme.md +49 -49
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/dist/types/types/json.d.ts +3 -3
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/types/utils/utilsHandlers/dragDropHandler.d.ts +1 -0
- package/dist/types/utils/utilsHandlers/sortHandler.d.ts +2 -0
- package/package.json +73 -73
- package/readme.md +113 -113
- package/dist/components/p-BSV5U72F.js +0 -1
- package/dist/components/p-D-B1groh.js +0 -1
- package/dist/components/p-DbR5sNOj.js +0 -1
- package/dist/components/p-leIEepjl.js +0 -1
- package/dist/lido-player/p-BeHFCsWf.js +0 -3
- package/dist/lido-player/p-TuBmCgtK.js +0 -1
|
@@ -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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const A=t=>d(t)?t.replace(/[&<>"'\/]/g,(t=>k[t])):t,S=[" ",",","?","!",";"],E=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(void 0!==i)return i;const e=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,e),this.regExpQueue.push(t),e}}(20),I=(t,i,e=".")=>{if(!t)return;if(t[i]){if(!Object.prototype.hasOwnProperty.call(t,i))return;return t[i]}const s=i.split(e);let o=t;for(let t=0;t<s.length;){if(!o||"object"!=typeof o)return;let i,n="";for(let r=t;r<s.length;++r)if(r!==t&&(n+=e),n+=s[r],i=o[n],void 0!==i){if(["string","number","boolean"].indexOf(typeof i)>-1&&r<s.length-1)continue;t+=r-t+1;break}o=i}return o},W=t=>t?.replace(/_/g,"-"),O={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,i){console?.[t]?.apply?.(console,i)}};class j{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||O,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,e,s){return s&&!this.debug?null:(d(t[0])&&(t[0]=`${e}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new j(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new j(this.logger,t)}}var L=new j;class P{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const e=this.observers[t].get(i)||0;this.observers[t].set(i,e+1)})),this}off(t,i){this.observers[t]&&(i?this.observers[t].delete(i):delete this.observers[t])}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,e])=>{for(let s=0;s<e;s++)t(...i)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([e,s])=>{for(let o=0;o<s;o++)e.apply(e,[t,...i])}))}}class M extends P{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,e,s={}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,n=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,i],e&&(Array.isArray(e)?r.push(...e):d(e)&&o?r.push(...e.split(o)):r.push(e)));const a=v(this.data,r);return!a&&!i&&!e&&t.indexOf(".")>-1&&(t=r[0],i=r[1],e=r.slice(2).join(".")),!a&&n&&d(e)?I(this.data?.[t]?.[i],e,o):a}addResource(t,i,e,s,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[t,i];e&&(r=r.concat(n?e.split(n):e)),t.indexOf(".")>-1&&(r=t.split("."),s=i,i=r[1]),this.addNamespaces(i),w(this.data,r,s),o.silent||this.emit("added",t,i,e,s)}addResources(t,i,e,s={silent:!1}){for(const s in e)(d(e[s])||Array.isArray(e[s]))&&this.addResource(t,i,s,e[s],{silent:!0});s.silent||this.emit("added",t,i,e)}addResourceBundle(t,i,e,s,o,n={silent:!1,skipCopy:!1}){let r=[t,i];t.indexOf(".")>-1&&(r=t.split("."),s=e,e=i,i=r[1]),this.addNamespaces(i);let a=v(this.data,r)||{};n.skipCopy||(e=JSON.parse(JSON.stringify(e))),s?x(a,e,o):a={...a,...e},w(this.data,r,a),n.silent||this.emit("added",t,i,e)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return void 0!==this.getResource(t,i)}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find((t=>i[t]&&Object.keys(i[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,i,e,s,o){return t.forEach((t=>{i=this.processors[t]?.process(i,e,s,o)??i})),i}};const D=Symbol("i18next/PATH_KEY");function N(t,i){const{[D]:e}=t(function(){const t=[],i=Object.create(null);let e;return i.get=(s,o)=>(e?.revoke?.(),o===D?t:(t.push(o),e=Proxy.revocable(s,i),e.proxy)),Proxy.revocable(Object.create(null),i).proxy}()),s=i?.keySeparator??".",o=i?.nsSeparator??":";if(e.length>1&&o){const t=i?.ns,n=Array.isArray(t)?t:null;if(n&&n.length>1&&n.slice(1).includes(e[0]))return`${e[0]}${o}${e.slice(1).join(s)}`}return e.join(s)}const R={},T=t=>!d(t)&&"boolean"!=typeof t&&"number"!=typeof t;class K extends P{constructor(t,i={}){var e,s;super(),e=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{e[t]&&(s[t]=e[t])})),this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=L.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const e={...i};if(null==t)return!1;const s=this.resolve(t,e);if(void 0===s?.res)return!1;const o=T(s.res);return!1!==e.returnObjects||!o}extractFromKey(t,i){let e=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===e&&(e=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const n=e&&t.indexOf(e)>-1,r=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((t,i,e)=>{i=i||"",e=e||"";const s=S.filter((t=>i.indexOf(t)<0&&e.indexOf(t)<0));if(0===s.length)return!0;const o=E.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let n=!o.test(t);if(!n){const i=t.indexOf(e);i>0&&!o.test(t.substring(0,i))&&(n=!0)}return n})(t,e,s));if(n&&!r){const i=t.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:t,namespaces:d(o)?[o]:o};const n=t.split(e);(e!==s||e===s&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),t=n.join(s)}return{key:t,namespaces:d(o)?[o]:o}}translate(t,i,e){let s="object"==typeof i?{...i}:i;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=N(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?N(t,{...this.options,...s}):String(t)));const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=s.lng||this.language,c=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return c?o?{res:`${h}${l}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${r}`:o?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:r;const g=this.resolve(t,s);let p=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!d(s.count),v=K.hasDefaultValue(s),x=w?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",k=w&&!s.ordinal&&0===s.count,A=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${$}`]||s.defaultValue;let S=p;b&&!p&&v&&(S=A);const E=T(S),I=Object.prototype.toString.apply(S);if(!(b&&S&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(I)<0)||d(y)&&Array.isArray(S))if(b&&d(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,e));else{let i=!1,o=!1;!this.isValidLookup(p)&&v&&(i=!0,p=A),this.isValidLookup(p)||(o=!0,p=r);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,c=v&&A!==p&&this.options.updateMissing;if(o||i||c){if(this.logger.log(c?"updateKey":"missingKey",u,h,r,c?A:p),n){const t=this.resolve(r,{...s,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let e=0;e<i.length;e++)t.push(i[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const e=(t,i,e)=>{const o=v&&e!==p?e:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,i,o,c,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,i,o,c,s),this.emit("missingKey",t,h,i,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const i=this.pluralResolver.getSuffixes(t,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&i.indexOf(`${this.options.pluralSeparator}zero`)<0&&i.push(`${this.options.pluralSeparator}zero`),i.forEach((i=>{e([t],r+i,s[`defaultValue${i}`]||A)}))})):e(t,r,A))}p=this.extendTranslation(p,t,s,g,e),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${r}`:r,i?p:void 0,s))}else{if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,S,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(g.res=t,g.usedParams=this.getUsedParamsDetails(s),g):t}if(n){const t=Array.isArray(S),i=t?[]:{},e=t?m:f;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t)){const o=`${e}${n}${t}`;i[t]=this.translate(o,v&&!p?{...s,defaultValue:T(A)?A[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),i[t]===o&&(i[t]=S[t])}p=i}}return o?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,i,e,s,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...e},e.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!e.skipInterpolation){e.interpolation&&this.interpolator.init({...e,interpolation:{...this.options.interpolation,...e.interpolation}});const n=d(t)&&(void 0!==e?.interpolation?.skipOnVariables?e.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(n){const i=t.match(this.interpolator.nestingRegexp);r=i&&i.length}let a=e.replace&&!d(e.replace)?e.replace:e;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,e.lng||this.language||s.usedLng,e),n){const i=t.match(this.interpolator.nestingRegexp);r<(i&&i.length)&&(e.nest=!1)}!e.lng&&s&&s.res&&(e.lng=this.language||s.usedLng),!1!==e.nest&&(t=this.interpolator.nest(t,((...t)=>o?.[0]!==t[0]||e.context?this.translate(...t,i):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null)),e)),e.interpolation&&this.interpolator.reset()}const n=e.postProcess||this.options.postProcess,r=d(n)?[n]:n;return null!=t&&r?.length&&!1!==e.applyPostProcessor&&(t=C.handle(r,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(e)},...e}:e,this)),t}resolve(t,i={}){let e,s,o,n,r;return d(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?N(t,{...this.options,...i}):t))),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,i),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==i.count&&!d(i.count),c=u&&!i.ordinal&&0===i.count,g=void 0!==i.context&&(d(i.context)||"number"==typeof i.context)&&""!==i.context,p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(r=t,R[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(R[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((s=>{if(this.isValidLookup(e))return;n=s;const r=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(r,h,s,t,i);else{let t;u&&(t=this.pluralResolver.getSuffix(s,i.count,i));const e=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.ordinal&&0===t.indexOf(o)&&r.push(h+t.replace(o,this.options.pluralSeparator)),r.push(h+t),c&&r.push(h+e)),g){const s=`${h}${this.options.contextSeparator||"_"}${i.context}`;r.push(s),u&&(i.ordinal&&0===t.indexOf(o)&&r.push(s+t.replace(o,this.options.pluralSeparator)),r.push(s+t),c&&r.push(s+e))}}let a;for(;a=r.pop();)this.isValidLookup(e)||(o=a,e=this.getResource(s,t,a,i))})))}))})),{res:e,usedKey:s,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,i,e,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,e,s):this.resourceStore.getResource(t,i,e,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],e=t.replace&&!d(t.replace);let s=e?t.replace:t;if(e&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!e){s={...s};for(const t of i)delete s[t]}return s}static hasDefaultValue(t){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"defaultValue"===i.substring(0,12)&&void 0!==t[i])return!0;return!1}}class H{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=L.create("languageUtils")}getScriptPartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return null;const i=t.split("-");return 2===i.length?null:(i.pop(),"x"===i[i.length-1].toLowerCase()?null:this.formatLanguageCode(i.join("-")))}getLanguagePartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(d(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch(t){}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach((t=>{if(i)return;const e=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(e)||(i=e)})),!i&&this.options.supportedLngs&&t.forEach((t=>{if(i)return;const e=this.getScriptPartFromCode(t);if(this.isSupportedCode(e))return i=e;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return i=s;i=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if("function"==typeof t&&(t=t(i)),d(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let e=t[i];return e||(e=t[this.getScriptPartFromCode(i)]),e||(e=t[this.formatLanguageCode(i)]),e||(e=t[this.getLanguagePartFromCode(i)]),e||(e=t.default),e||[]}toResolveHierarchy(t,i){const e=this.getFallbackCodes((!1===i?[]:i)||this.options.fallbackLng||[],t),s=[],o=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return d(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):d(t)&&o(this.formatLanguageCode(t)),e.forEach((t=>{s.indexOf(t)<0&&o(this.formatLanguageCode(t))})),s}}const z={zero:0,one:1,two:2,few:3,many:4,other:5},B={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=L.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const e=W("dev"===t?"en":t),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:e,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(e,{type:s})}catch(e){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),B;if(!t.match(/-|_/))return B;const s=this.languageUtils.getLanguagePartFromCode(t);n=this.getRule(s,i)}return this.pluralRulesCache[o]=n,n}needsPlural(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,e={}){return this.getSuffixes(t,e).map((t=>`${i}${t}`))}getSuffixes(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?e.resolvedOptions().pluralCategories.sort(((t,i)=>z[t]-z[i])).map((t=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,i,e={}){const s=this.getRule(t,e);return s?`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,e))}}const q=(t,i,e,s=".",o=!0)=>{let n=((t,i,e)=>{const s=v(t,e);return void 0!==s?s:v(i,e)})(t,i,e);return!n&&o&&d(e)&&(n=I(t,e,s),void 0===n&&(n=I(i,e,s))),n},V=t=>t.replace(/\$/g,"$$$$");class _{constructor(t={}){this.logger=L.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:e,useRawValueToEscape:s,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:g,nestingSuffixEscaped:p,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==i?i:A,this.escapeValue=void 0===e||e,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):n||"{{",this.suffix=r?$(r):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=c?$(c):d||$("$t("),this.nestingSuffix=g?$(g):p||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,e,s){let o,n,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const o=q(i,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,e,{...s,...i,interpolationkey:t}):o}const o=t.split(this.formatSeparator),n=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(q(i,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,e,{...s,...i,interpolationkey:n})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>V(this.escapeValue?this.escape(t):t)}].forEach((i=>{for(r=0;o=i.regex.exec(t);){const e=o[1].trim();if(n=h(e),void 0===n)if("function"==typeof l){const i=l(t,o,s);n=d(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,e))n="";else{if(u){n=o[0];continue}this.logger.warn(`missed to pass in variable ${e} for interpolating ${t}`),n=""}else d(n)||this.useRawValueToEscape||(n=p(n));const a=i.safeValue(n);if(t=t.replace(o[0],a),u?(i.regex.lastIndex+=n.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,i,e={}){let s,o,n;const r=(t,i)=>{const e=this.nestingOptionsSeparator;if(t.indexOf(e)<0)return t;const s=t.split(new RegExp(`${$(e)}[ ]*{`));let o=`{${s[1]}`;t=s[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),i&&(n={...i,...n})}catch(i){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,i),`${t}${e}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];n={...e},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),o=i(r.call(this,s[1].trim(),n),n),o&&s[0]===t&&!d(o))return o;d(o)||(o=p(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce(((t,i)=>this.format(t,i,e.lng,{...e,interpolationkey:s[1].trim()})),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const U=t=>{const i={};return(e,s,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=s+JSON.stringify(n);let a=i[r];return a||(a=t(W(s),o),i[r]=a),a(e)}},J=t=>(i,e,s)=>t(W(e),s)(i);class Y{constructor(t={}){this.logger=L.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const e=i.cacheInBuiltFormats?U:J;this.formats={number:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i});return t=>e.format(t)})),currency:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i,style:"currency"});return t=>e.format(t)})),datetime:e(((t,i)=>{const e=new Intl.DateTimeFormat(t,{...i});return t=>e.format(t)})),relativetime:e(((t,i)=>{const e=new Intl.RelativeTimeFormat(t,{...i});return t=>e.format(t,i.range||"day")})),list:e(((t,i)=>{const e=new Intl.ListFormat(t,{...i});return t=>e.format(t)}))}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=U(i)}format(t,i,e,s={}){const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}return o.reduce(((t,i)=>{const{formatName:o,formatOptions:n}=(t=>{let i=t.toLowerCase().trim();const e={};if(t.indexOf("(")>-1){const s=t.split("(");i=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===i&&o.indexOf(":")<0?e.currency||(e.currency=o.trim()):"relativetime"===i&&o.indexOf(":")<0?e.range||(e.range=o.trim()):o.split(";").forEach((t=>{if(t){const[i,...s]=t.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),n=i.trim();e[n]||(e[n]=o),"false"===o&&(e[n]=!1),"true"===o&&(e[n]=!0),isNaN(o)||(e[n]=parseInt(o,10))}}))}return{formatName:i,formatOptions:e}})(i);if(this.formats[o]){let i=t;try{const r=s?.formatParams?.[s.interpolationkey]||{};i=this.formats[o](t,r.locale||r.lng||s.locale||s.lng||e,{...n,...s,...r})}catch(t){this.logger.warn(t)}return i}return this.logger.warn(`there was no format function for ${o}`),t}),t)}}class G extends P{constructor(t,i,e,s={}){super(),this.backend=t,this.store=i,this.services=e,this.languageUtils=e.languageUtils,this.options=s,this.logger=L.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(e,s.backend,s)}queueLoad(t,i,e,s){const o={},n={},r={},a={};return t.forEach((t=>{let s=!0;i.forEach((i=>{const r=`${t}|${i}`;!e.reload&&this.store.hasResourceBundle(t,i)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,s=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[i]&&(a[i]=!0)))})),s||(r[t]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,i,e){const s=t.split("|"),o=s[0],n=s[1];i&&this.emit("failedLoading",o,n,i),!i&&e&&this.store.addResourceBundle(o,n,e,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&e&&(this.state[t]=0);const r={};this.queue.forEach((e=>{((t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);s[o]=s[o]||[],s[o].push(e)})(e.loaded,[o],n),((t,i)=>{void 0!==t.pending[i]&&(delete t.pending[i],t.pendingCount--)})(e,t),i&&e.errors.push(i),0!==e.pendingCount||e.done||(Object.keys(e.loaded).forEach((t=>{r[t]||(r[t]={});const i=e.loaded[t];i.length&&i.forEach((i=>{void 0===r[t][i]&&(r[t][i]=!0)}))})),e.done=!0,e.errors.length?e.callback(e.errors):e.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((t=>!t.done))}read(t,i,e,s=0,o=this.retryTimeout,n){if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:i,fcName:e,tried:s,wait:o,callback:n});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}r&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,i,e,s+1,2*o,n)}),o):n(r,a)},a=this.backend[e].bind(this.backend);if(2!==a.length)return a(t,i,r);try{const e=a(t,i);e&&"function"==typeof e.then?e.then((t=>r(null,t))).catch(r):r(null,e)}catch(t){r(t)}}prepareLoading(t,i,e={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(t)&&(t=this.languageUtils.toResolveHierarchy(t)),d(i)&&(i=[i]);const o=this.queueLoad(t,i,e,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,i,e){this.prepareLoading(t,i,{},e)}reload(t,i,e){this.prepareLoading(t,i,{reload:!0},e)}loadOne(t,i=""){const e=t.split("|"),s=e[0],o=e[1];this.read(s,o,"read",void 0,void 0,((e,n)=>{e&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,e),!e&&n&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,n),this.loaded(t,e,n)}))}saveMissing(t,i,e,s,o,n={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(i)){if(null!=e&&""!==e){if(this.backend?.create){const a={...n,isUpdate:o},h=this.backend.create.bind(this.backend);if(h.length<6)try{let o;o=5===h.length?h(t,i,e,s,a):h(t,i,e,s),o&&"function"==typeof o.then?o.then((t=>r(null,t))).catch(r):r(null,o)}catch(t){r(t)}else h(t,i,e,s,r,a)}t&&t[0]&&this.store.addResource(t[0],i,e,s)}}else this.logger.warn(`did not save key "${e}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let i={};if("object"==typeof t[1]&&(i=t[1]),d(t[1])&&(i.defaultValue=t[1]),d(t[2])&&(i.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{i[t]=e[t]}))}return i},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(d(t.ns)&&(t.ns=[t.ns]),d(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),d(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),X=()=>{},tt="__i18next_supportNoticeShown";class it extends P{constructor(t={},i){var e;if(super(),this.options=Z(t),this.services={},this.logger=L,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout((()=>{this.init(t,i)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const e=Q();var s;this.options={...e,...this.options,...Z(t)},this.options.interpolation={...e.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=e.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[tt]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[tt]=!0));const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;L.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Y;const i=new H(this.options);this.store=new M(this.options.resources,this.options);const s=this.services;s.logger=L,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new F(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format||(s.formatter=o(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new _(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new G(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=X),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...i)=>this.store[t](...i)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...i)=>(this.store[t](...i),this)}));const n=g(),r=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(e),i(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),n}loadResources(t,i=X){let e=i;const s=d(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=i=>{i&&"cimode"!==i&&this.services.languageUtils.toResolveHierarchy(i).forEach((i=>{"cimode"!==i&&t.indexOf(i)<0&&t.push(i)}))};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload?.forEach?.((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,i,e){const s=g();return"function"==typeof t&&(e=t,t=void 0),"function"==typeof i&&(e=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),e||(e=X),this.services.backendConnector.reload(t,i,(t=>{s.resolve(),e(t)})),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const e=g();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(o,n)=>{n?this.isLanguageChangingTo===t&&(s(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,e.resolve(((...t)=>this.t(...t))),i&&i(o,((...t)=>this.t(...t)))},n=i=>{t||i||!this.services.languageDetector||(i=[]);const e=d(i)?i:i&&i[0],n=this.store.hasLanguageSomeTranslations(e)?e:this.services.languageUtils.getBestMatchFromCodes(d(i)?[i]:i);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(n):this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect()),e}getFixedT(t,i,e){const s=(t,i,...o)=>{let n;n="object"!=typeof i?this.options.overloadTranslationOptionHandler([t,i].concat(o)):{...i},n.lng=n.lng||s.lng,n.lngs=n.lngs||s.lngs,n.ns=n.ns||s.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||e||s.keyPrefix);const r={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,r));const a=this.options.keySeparator||".";let h;return n.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=N(t,r)),`${n.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=N(t,r)),h=n.keyPrefix?`${n.keyPrefix}${a}${t}`:t),this.t(h,n)};return d(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=e,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const e=i.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===e.toLowerCase())return!0;const n=(t,i)=>{const e=this.services.backendConnector.state[`${t}|${i}`];return-1===e||0===e||2===e};if(i.precheck){const t=i.precheck(this,n);if(void 0!==t)return t}return!(!this.hasResourceBundle(e,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(e,t)||s&&!n(o,t)))}loadNamespaces(t,i){const e=g();return this.options.ns?(d(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}loadLanguages(t,i){const e=g();d(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=s.concat(o),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const t=i.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const i=this.services?.languageUtils||new H(Q());return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const e=new it(t,i);return e.createInstance=it.createInstance,e}cloneInstance(t={},i=X){const e=t.forkResourceStore;e&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new it(s);if(void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},e){const t=Object.keys(this.store.data).reduce(((t,i)=>(t[i]={...this.store.data[i]},t[i]=Object.keys(t[i]).reduce(((e,s)=>(e[s]={...t[i][s]},e)),t[i]),t)),{});o.store=new M(t,s),o.services.resourceStore=o.store}if(t.interpolation){const i={...Q().interpolation,...this.options.interpolation,...t.interpolation},e={...s,interpolation:i};o.services.interpolator=new _(e)}return o.translator=new K(o.services,s),o.translator.on("*",((t,...i)=>{o.emit(t,...i)})),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=it.createInstance(),{slice:st,forEach:ot}=[],nt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rt={create(t,i,e,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};e&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*e*1e3)),s&&(o.domain=s),document.cookie=function(t,i){const e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(i)}`;if(e.maxAge>0){const t=e.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(e.domain){if(!nt.test(e.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${e.domain}`}if(e.path){if(!nt.test(e.path))throw new TypeError("option path is invalid");s+=`; Path=${e.path}`}if(e.expires){if("function"!=typeof e.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${e.expires.toUTCString()}`}if(e.httpOnly&&(s+="; HttpOnly"),e.secure&&(s+="; Secure"),e.sameSite)switch("string"==typeof e.sameSite?e.sameSite.toLowerCase():e.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return e.partitioned&&(s+="; Partitioned"),s}(t,i,o)},read(t){const i=`${t}=`,e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return null},remove(t,i){this.create(t,"",-1,i)}};var at={name:"cookie",lookup(t){let{lookupCookie:i}=t;if(i&&"undefined"!=typeof document)return rt.read(i)||void 0},cacheUserLanguage(t,i){let{lookupCookie:e,cookieMinutes:s,cookieDomain:o,cookieOptions:n}=i;e&&"undefined"!=typeof document&&rt.create(e,t,s,o,n)}},ht={name:"querystring",lookup(t){let i,{lookupQuerystring:e}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const o=s[t].indexOf("=");o>0&&s[t].substring(0,o)===e&&(i=s[t].substring(o+1))}}return i}},lt={name:"hash",lookup(t){let i,{lookupHash:e,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const o=t.substring(1);if(e){const t=o.split("&");for(let s=0;s<t.length;s++){const o=t[s].indexOf("=");o>0&&t[s].substring(0,o)===e&&(i=t[s].substring(o+1))}}if(i)return i;if(!i&&s>-1){const i=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const e="number"==typeof s?s:0;return i[e]?.replace("/","")}}}return i}};let ut=null;const ct=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var dt={name:"localStorage",lookup(t){let{lookupLocalStorage:i}=t;if(i&&ct())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupLocalStorage:e}=i;e&&ct()&&window.localStorage.setItem(e,t)}};let gt=null;const pt=()=>{if(null!==gt)return gt;try{if(gt="undefined"!=typeof window&&null!==window.sessionStorage,!gt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){gt=!1}return gt};var ft={name:"sessionStorage",lookup(t){let{lookupSessionStorage:i}=t;if(i&&pt())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupSessionStorage:e}=i;e&&pt()&&window.sessionStorage.setItem(e,t)}},mt={name:"navigator",lookup(t){const i=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:e,language:s}=navigator;if(t)for(let e=0;e<t.length;e++)i.push(t[e]);e&&i.push(e),s&&i.push(s)}return i.length>0?i:void 0}},yt={name:"htmlTag",lookup(t){let i,{htmlTag:e}=t;const s=e||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(i=s.getAttribute("lang")),i}},bt={name:"path",lookup(t){let{lookupFromPathIndex:i}=t;if("undefined"==typeof window)return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const s="number"==typeof i?i:0;return e[s]?.replace("/","")}},wt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:i}=t;const e="number"==typeof i?i+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[e]}};let vt=!1;try{vt=!0}catch(t){}const xt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vt||xt.splice(1,1);class $t{constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return ot.call(st.call(arguments,1),(i=>{if(i)for(const e in i)void 0===t[e]&&(t[e]=i[e])})),t}(t,this.options||{},{order:xt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(at),this.addDetector(ht),this.addDetector(dt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(bt),this.addDetector(wt),this.addDetector(lt)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((i=>{if(this.detectors[i]){let e=this.detectors[i].lookup(this.options);e&&"string"==typeof e&&(e=[e]),e&&(t=t.concat(e))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(i=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(i))));var i})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach((i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(t,this.options)})))}}$t.type="languageDetector";et.use($t).init({resources:{en:{translation:{"Do you want to exit? button":"Do you want to exit?","Exit button":"Exit","Continue playing button":"Continue playing","Drop the elements to match the given symbol order":"Drop the elements to match the given symbol order","Fill in the blanks":"Fill in the blanks",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageEngAudio",substractionWithoutImage:"substractionWithoutImageEngAudio",numberIdentificationWithImage:"numberIdentificationWithImageEngAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageEngAudio",wordBuildingWithImage:"wordBuildingWithImageEngAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageEngAudio",pictureClues:"pictureCluesEngAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesEngAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageEngAudio",sentenceMatch:"sentenceMatchEngAudio",imageMatch:"imageMatchEngAudio",palStoryTale:"palStoryTaleEngAudio",palEgmaPatternMatching:"palEgmaPatternMatchingEngAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropEngAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickEngAudio",palEgraOddOneOut:"palEgraOddOneOutEngAudio",palEgraArrangePictures:"palEgraArrangePicturesEngAudio",palEgraBuildWord:"palEgraBuildWordEngAudio",palEgraWordFormation:"palEgraWordFormationEngAudio",palInventedSpelling:"palInventedSpellingEngAudio",palLetterIdentification:"palLetterIdentificationEngAudio",palStoryMaking:"palStoryMakingEngAudio",palegmasumtogether:"palegmasumtogetherEngAudio",palegmamultioption:"palegmamultioptionEngAudio",palegraoptionaudio:"palegraoptionaudioEngAudio",palegrawordmatch:"palegrawordmatchEngAudio",palegramcqimages:"palegramcqimagesEngAudio"}}},fr:{translation:{"Do you want to exit? button":"Voulez-vous quitter?","Exit button":"Quitter","Continue playing button":"Continuer à jouer","Drop the elements to match the given symbol order":"Déposez les éléments pour correspondre au symbole donné","Fill in the blanks":"Remplissez les blancs",instruction:{dragAndDrop:"Faites glisser les objets vers le bon emplacement.",mcq:"Choisissez la bonne réponse parmi les options proposées.",tracing:"Tracez soigneusement la forme en suivant la ligne.",flashcards:"Regardez les cartes mémoire pour renforcer l’apprentissage."}}},hi:{translation:{"Do you want to exit? button":"क्या आप बाहर निकलना चाहते हैं?","Exit button":"बाहर निकलें","Continue playing button":"खेलना जारी रखें","Drop the elements to match the given symbol order":"दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें","Fill in the blanks":"रिक्त स्थान भरें",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageHiAudio",substractionWithoutImage:"substractionWithoutImageHiAudio",numberIdentificationWithImage:"numberIdentificationWithImageHiAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageHiAudio",wordBuildingWithImage:"wordBuildingWithImageHiAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageHiAudio",pictureClues:"pictureCluesHiAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesHiAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageHiAudio",sentenceMatch:"sentenceMatchHiAudio",imageMatch:"imageMatchHiAudio",palStoryTale:"palStoryTaleHiAudio",palEgmaPatternMatching:"palEgmaPatternMatchingHiAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropHiAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickHiAudio",palEgraOddOneOut:"palEgraOddOneOutHiAudio",palEgraArrangePictures:"palEgraArrangePicturesHiAudio",palEgraBuildWord:"palEgraBuildWordHiAudio",palEgraWordFormation:"palEgraWordFormationHiAudio",palInventedSpelling:"palInventedSpellingHiAudio",palLetterIdentification:"palLetterIdentificationHiAudio",palStoryMaking:"palStoryMakingHiAudio",palegmasumtogether:"palegmasumtogetherHiAudio",palegmamultioption:"palegmamultioptionHiAudio",palegraoptionaudio:"palegraoptionaudioHiAudio",palegrawordmatch:"palegrawordmatchHiAudio",palegramcqimages:"palegramcqimagesHiAudio"}}},kn:{translation:{"Do you want to exit? button":"ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?","Exit button":"ನಿರ್ಗಮಿಸು","Continue playing button":"ಆಟವನ್ನು ಮುಂದುವರಿಸಿ","Drop the elements to match the given symbol order":"ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageKaAudio",substractionWithoutImage:"substractionWithoutImageKaAudio",numberIdentificationWithImage:"numberIdentificationWithImageKaAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageKaAudio",wordBuildingWithImage:"wordBuildingWithImageKaAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageKaAudio",pictureClues:"pictureCluesKaAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesKaAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageKaAudio",sentenceMatch:"sentenceMatchKaAudio",imageMatch:"imageMatchKaAudio",palStoryTale:"palStoryTaleKaAudio",palEgmaPatternMatching:"palEgmaPatternMatchingKaAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropKaAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickKaAudio",palEgraOddOneOut:"palEgraOddOneOutKaAudio",palEgraArrangePictures:"palEgraArrangePicturesKaAudio",palEgraBuildWord:"palEgraBuildWordKaAudio",palEgraWordFormation:"palEgraWordFormationKaAudio",palInventedSpelling:"palInventedSpellingKaAudio",palLetterIdentification:"palLetterIdentificationKaAudio",palStoryMaking:"palStoryMakingKaAudio",palegmasumtogether:"palegmasumtogetherKaAudio",palegmamultioption:"palegmamultioptionKaAudio",palegraoptionaudio:"palegraoptionaudioKaAudio",palegrawordmatch:"palegrawordmatchKaAudio",palegramcqimages:"palegramcqimagesKaAudio"}}},te:{translation:{"Do you want to exit? button":"మీరు బయటకు వెళ్లాలనుకుంటున్నారా?","Exit button":"బయటకు వెళ్ళు","Continue playing button":"ఆటను కొనసాగించు","Drop the elements to match the given symbol order":"ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయಂడಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"}},pt:{translation:{"Do you want to exit? button":"Você deseja sair?","Exit button":"Sair","Continue playing button":"Continuar jogando","Drop the elements to match the given symbol order":"Solte os elementos para corresponder à ordem dos símbolos fornecida","Fill in the blanks":"Preencha os espaços em branco"}},mr:{translation:{"Do you want to exit? button":"तुम्हाला बाहेर पडायचे आहे का?","Exit button":"बाहेर पडा","Continue playing button":"खेळ सुरू ठेवा",instruction:{dragAndDrop:"वस्तू योग्य ठिकाणी ओढून आणि सोडून जुळवा.",mcq:"दिलेल्या पर्यायांमधून योग्य उत्तर निवडा.",tracing:"रेषेचा काळजीपूर्वक मागोवा घेत आकृती काढा.",flashcards:"तुमचे शिक्षण मजबूत करण्यासाठी फ्लॅशकार्ड्स पाहा."}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},detection:{order:["querystring","localStorage","navigator","htmlTag"],caches:["localStorage"]}});const kt=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.requiredDrops="",this.string="",this.fontFamily="",this.fontSize="20px",this.fontColor="",this.highlightWhileSpeaking=!1,this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.move="false",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.borderImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.minDrops=1,this.maxDrops=1,this.onEntry="",this.margin="",this.padding="",this.borderRadius="0px",this.spanType="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(s(this.el,this.delayVisible),o(this.el,this.type),"words"!==this.spanType&&"letters"!==this.spanType||this.addSpanToText(),this.showSpeakIcon&&n(this.el),!this.audio||""===this.audio.trim()){const t=()=>{const t=this.resolveAutoAudio();t&&(this.audio=t)};window.__LIDO_COMMON_AUDIO_PATH__?t():window.addEventListener(r,t,{once:!0})}}resolveAutoAudio(){const t=window[c];return t&&this.string?`${t}/${this.string}.mp3`:null}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=this.borderImage?a(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,i),width:h(this.width,i),backgroundColor:h(this.bgColor,i),top:h(this.y,i),left:h(this.x,i),zIndex:this.z,fontSize:h(this.fontSize,i),fontFamily:this.fontFamily,color:h(this.fontColor,i),display:"true"===h(`${this.visible}`,i)?"flex":"none",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",margin:h(this.margin,i),padding:h(this.padding,i),borderRadius:h(this.borderRadius,i)}}async addSpanToText(){const t=this.el.querySelector(".lido-text-content");if(!t)return;const i=t.textContent||"";t.innerHTML="","letters"===this.spanType&&i.split("").forEach((i=>{if(""===i.trim())return;const e=document.createElement("span");e.textContent=i,e.className="text-letters",t.appendChild(e)})),"words"===this.spanType&&i.split(" ").forEach((i=>{const e=document.createElement("span");e.textContent=i,e.className="text-words",t.appendChild(e)}))}render(){const t=et.t(this.string).replace(/_phonics?/gi,"");return l(u,{key:"44bb34e461d90e1832066986454c5b0f8c392617",class:"lido-text",value:this.value,"required-drops":this.requiredDrops,type:this.type,"tab-index":this.tabIndex,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,minDrops:this.minDrops,maxDrops:this.maxDrops,id:this.id,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,move:this.move,"span-type":this.spanType,"disable-speak":`${this.disableSpeak}`},""!==this.spanType?l("div",{class:"lido-text-content"}," ",t):t)}get el(){return this}static get style(){return".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}"}},[0,"lido-text",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],requiredDrops:[1,"required-drops"],string:[1],fontFamily:[1,"font-family"],fontSize:[1,"font-size"],fontColor:[1,"font-color"],highlightWhileSpeaking:[4,"highlight-while-speaking"],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],move:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],borderImage:[1,"border-image"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],onEntry:[1,"on-entry"],margin:[1],padding:[1],borderRadius:[1,"border-radius"],spanType:[1,"span-type"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function At(){"undefined"!=typeof customElements&&["lido-text"].forEach((i=>{"lido-text"===i&&(customElements.get(t(i))||customElements.define(t(i),kt))}))}At();export{kt as L,At as d,et as i}
|
|
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={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const A=t=>d(t)?t.replace(/[&<>"'\/]/g,(t=>k[t])):t,S=[" ",",","?","!",";"],E=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(void 0!==i)return i;const e=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,e),this.regExpQueue.push(t),e}}(20),I=(t,i,e=".")=>{if(!t)return;if(t[i]){if(!Object.prototype.hasOwnProperty.call(t,i))return;return t[i]}const s=i.split(e);let o=t;for(let t=0;t<s.length;){if(!o||"object"!=typeof o)return;let i,n="";for(let r=t;r<s.length;++r)if(r!==t&&(n+=e),n+=s[r],i=o[n],void 0!==i){if(["string","number","boolean"].indexOf(typeof i)>-1&&r<s.length-1)continue;t+=r-t+1;break}o=i}return o},W=t=>t?.replace(/_/g,"-"),O={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,i){console?.[t]?.apply?.(console,i)}};class j{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||O,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,e,s){return s&&!this.debug?null:(d(t[0])&&(t[0]=`${e}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new j(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new j(this.logger,t)}}var L=new j;class P{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach((t=>{this.observers[t]||(this.observers[t]=new Map);const e=this.observers[t].get(i)||0;this.observers[t].set(i,e+1)})),this}off(t,i){this.observers[t]&&(i?this.observers[t].delete(i):delete this.observers[t])}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach((([t,e])=>{for(let s=0;s<e;s++)t(...i)})),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach((([e,s])=>{for(let o=0;o<s;o++)e.apply(e,[t,...i])}))}}class M extends P{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,e,s={}){const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,n=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;t.indexOf(".")>-1?r=t.split("."):(r=[t,i],e&&(Array.isArray(e)?r.push(...e):d(e)&&o?r.push(...e.split(o)):r.push(e)));const a=v(this.data,r);return!a&&!i&&!e&&t.indexOf(".")>-1&&(t=r[0],i=r[1],e=r.slice(2).join(".")),!a&&n&&d(e)?I(this.data?.[t]?.[i],e,o):a}addResource(t,i,e,s,o={silent:!1}){const n=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[t,i];e&&(r=r.concat(n?e.split(n):e)),t.indexOf(".")>-1&&(r=t.split("."),s=i,i=r[1]),this.addNamespaces(i),w(this.data,r,s),o.silent||this.emit("added",t,i,e,s)}addResources(t,i,e,s={silent:!1}){for(const s in e)(d(e[s])||Array.isArray(e[s]))&&this.addResource(t,i,s,e[s],{silent:!0});s.silent||this.emit("added",t,i,e)}addResourceBundle(t,i,e,s,o,n={silent:!1,skipCopy:!1}){let r=[t,i];t.indexOf(".")>-1&&(r=t.split("."),s=e,e=i,i=r[1]),this.addNamespaces(i);let a=v(this.data,r)||{};n.skipCopy||(e=JSON.parse(JSON.stringify(e))),s?x(a,e,o):a={...a,...e},w(this.data,r,a),n.silent||this.emit("added",t,i,e)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return void 0!==this.getResource(t,i)}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find((t=>i[t]&&Object.keys(i[t]).length>0))}toJSON(){return this.data}}var C={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,i,e,s,o){return t.forEach((t=>{i=this.processors[t]?.process(i,e,s,o)??i})),i}};const D=Symbol("i18next/PATH_KEY");function N(t,i){const{[D]:e}=t(function(){const t=[],i=Object.create(null);let e;return i.get=(s,o)=>(e?.revoke?.(),o===D?t:(t.push(o),e=Proxy.revocable(s,i),e.proxy)),Proxy.revocable(Object.create(null),i).proxy}()),s=i?.keySeparator??".",o=i?.nsSeparator??":";if(e.length>1&&o){const t=i?.ns,n=Array.isArray(t)?t:null;if(n&&n.length>1&&n.slice(1).includes(e[0]))return`${e[0]}${o}${e.slice(1).join(s)}`}return e.join(s)}const R={},T=t=>!d(t)&&"boolean"!=typeof t&&"number"!=typeof t;class K extends P{constructor(t,i={}){var e,s;super(),e=t,s=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((t=>{e[t]&&(s[t]=e[t])})),this.options=i,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=L.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const e={...i};if(null==t)return!1;const s=this.resolve(t,e);if(void 0===s?.res)return!1;const o=T(s.res);return!1!==e.returnObjects||!o}extractFromKey(t,i){let e=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===e&&(e=":");const s=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator;let o=i.ns||this.options.defaultNS||[];const n=e&&t.indexOf(e)>-1,r=!(this.options.userDefinedKeySeparator||i.keySeparator||this.options.userDefinedNsSeparator||i.nsSeparator||((t,i,e)=>{i=i||"",e=e||"";const s=S.filter((t=>i.indexOf(t)<0&&e.indexOf(t)<0));if(0===s.length)return!0;const o=E.getRegExp(`(${s.map((t=>"?"===t?"\\?":t)).join("|")})`);let n=!o.test(t);if(!n){const i=t.indexOf(e);i>0&&!o.test(t.substring(0,i))&&(n=!0)}return n})(t,e,s));if(n&&!r){const i=t.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:t,namespaces:d(o)?[o]:o};const n=t.split(e);(e!==s||e===s&&this.options.ns.indexOf(n[0])>-1)&&(o=n.shift()),t=n.join(s)}return{key:t,namespaces:d(o)?[o]:o}}translate(t,i,e){let s="object"==typeof i?{...i}:i;if("object"!=typeof s&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof s&&(s={...s}),s||(s={}),null==t)return"";"function"==typeof t&&(t=N(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]),t=t.map((t=>"function"==typeof t?N(t,{...this.options,...s}):String(t)));const o=void 0!==s.returnDetails?s.returnDetails:this.options.returnDetails,n=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,{key:r,namespaces:a}=this.extractFromKey(t[t.length-1],s),h=a[a.length-1];let l=void 0!==s.nsSeparator?s.nsSeparator:this.options.nsSeparator;void 0===l&&(l=":");const u=s.lng||this.language,c=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===u?.toLowerCase())return c?o?{res:`${h}${l}${r}`,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:`${h}${l}${r}`:o?{res:r,usedKey:r,exactUsedKey:r,usedLng:u,usedNS:h,usedParams:this.getUsedParamsDetails(s)}:r;const g=this.resolve(t,s);let p=g?.res;const f=g?.usedKey||r,m=g?.exactUsedKey||r,y=void 0!==s.joinArrays?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==s.count&&!d(s.count),v=K.hasDefaultValue(s),x=w?this.pluralResolver.getSuffix(u,s.count,s):"",$=s.ordinal&&w?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",k=w&&!s.ordinal&&0===s.count,A=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${x}`]||s[`defaultValue${$}`]||s.defaultValue;let S=p;b&&!p&&v&&(S=A);const E=T(S),I=Object.prototype.toString.apply(S);if(!(b&&S&&E&&["[object Number]","[object Function]","[object RegExp]"].indexOf(I)<0)||d(y)&&Array.isArray(S))if(b&&d(y)&&Array.isArray(p))p=p.join(y),p&&(p=this.extendTranslation(p,t,s,e));else{let i=!1,o=!1;!this.isValidLookup(p)&&v&&(i=!0,p=A),this.isValidLookup(p)||(o=!0,p=r);const a=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,c=v&&A!==p&&this.options.updateMissing;if(o||i||c){if(this.logger.log(c?"updateKey":"missingKey",u,h,r,c?A:p),n){const t=this.resolve(r,{...s,keySeparator:!1});t&&t.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let t=[];const i=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if("fallback"===this.options.saveMissingTo&&i&&i[0])for(let e=0;e<i.length;e++)t.push(i[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(s.lng||this.language):t.push(s.lng||this.language);const e=(t,i,e)=>{const o=v&&e!==p?e:a;this.options.missingKeyHandler?this.options.missingKeyHandler(t,h,i,o,c,s):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(t,h,i,o,c,s),this.emit("missingKey",t,h,i,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?t.forEach((t=>{const i=this.pluralResolver.getSuffixes(t,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&i.indexOf(`${this.options.pluralSeparator}zero`)<0&&i.push(`${this.options.pluralSeparator}zero`),i.forEach((i=>{e([t],r+i,s[`defaultValue${i}`]||A)}))})):e(t,r,A))}p=this.extendTranslation(p,t,s,g,e),o&&p===r&&this.options.appendNamespaceToMissingKey&&(p=`${h}${l}${r}`),(o||i)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}${l}${r}`:r,i?p:void 0,s))}else{if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,S,{...s,ns:a}):`key '${r} (${this.language})' returned an object instead of string.`;return o?(g.res=t,g.usedParams=this.getUsedParamsDetails(s),g):t}if(n){const t=Array.isArray(S),i=t?[]:{},e=t?m:f;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t)){const o=`${e}${n}${t}`;i[t]=this.translate(o,v&&!p?{...s,defaultValue:T(A)?A[t]:void 0,joinArrays:!1,ns:a}:{...s,joinArrays:!1,ns:a}),i[t]===o&&(i[t]=S[t])}p=i}}return o?(g.res=p,g.usedParams=this.getUsedParamsDetails(s),g):p}extendTranslation(t,i,e,s,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...e},e.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!e.skipInterpolation){e.interpolation&&this.interpolator.init({...e,interpolation:{...this.options.interpolation,...e.interpolation}});const n=d(t)&&(void 0!==e?.interpolation?.skipOnVariables?e.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let r;if(n){const i=t.match(this.interpolator.nestingRegexp);r=i&&i.length}let a=e.replace&&!d(e.replace)?e.replace:e;if(this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),t=this.interpolator.interpolate(t,a,e.lng||this.language||s.usedLng,e),n){const i=t.match(this.interpolator.nestingRegexp);r<(i&&i.length)&&(e.nest=!1)}!e.lng&&s&&s.res&&(e.lng=this.language||s.usedLng),!1!==e.nest&&(t=this.interpolator.nest(t,((...t)=>o?.[0]!==t[0]||e.context?this.translate(...t,i):(this.logger.warn(`It seems you are nesting recursively key: ${t[0]} in key: ${i[0]}`),null)),e)),e.interpolation&&this.interpolator.reset()}const n=e.postProcess||this.options.postProcess,r=d(n)?[n]:n;return null!=t&&r?.length&&!1!==e.applyPostProcessor&&(t=C.handle(r,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(e)},...e}:e,this)),t}resolve(t,i={}){let e,s,o,n,r;return d(t)&&(t=[t]),Array.isArray(t)&&(t=t.map((t=>"function"==typeof t?N(t,{...this.options,...i}):t))),t.forEach((t=>{if(this.isValidLookup(e))return;const a=this.extractFromKey(t,i),h=a.key;s=h;let l=a.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const u=void 0!==i.count&&!d(i.count),c=u&&!i.ordinal&&0===i.count,g=void 0!==i.context&&(d(i.context)||"number"==typeof i.context)&&""!==i.context,p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);l.forEach((t=>{this.isValidLookup(e)||(r=t,R[`${p[0]}-${t}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(r)||(R[`${p[0]}-${t}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((s=>{if(this.isValidLookup(e))return;n=s;const r=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(r,h,s,t,i);else{let t;u&&(t=this.pluralResolver.getSuffix(s,i.count,i));const e=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.ordinal&&0===t.indexOf(o)&&r.push(h+t.replace(o,this.options.pluralSeparator)),r.push(h+t),c&&r.push(h+e)),g){const s=`${h}${this.options.contextSeparator||"_"}${i.context}`;r.push(s),u&&(i.ordinal&&0===t.indexOf(o)&&r.push(s+t.replace(o,this.options.pluralSeparator)),r.push(s+t),c&&r.push(s+e))}}let a;for(;a=r.pop();)this.isValidLookup(e)||(o=a,e=this.getResource(s,t,a,i))})))}))})),{res:e,usedKey:s,exactUsedKey:o,usedLng:n,usedNS:r}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,i,e,s={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,e,s):this.resourceStore.getResource(t,i,e,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],e=t.replace&&!d(t.replace);let s=e?t.replace:t;if(e&&void 0!==t.count&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!e){s={...s};for(const t of i)delete s[t]}return s}static hasDefaultValue(t){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"defaultValue"===i.substring(0,12)&&void 0!==t[i])return!0;return!1}}class H{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=L.create("languageUtils")}getScriptPartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return null;const i=t.split("-");return 2===i.length?null:(i.pop(),"x"===i[i.length-1].toLowerCase()?null:this.formatLanguageCode(i.join("-")))}getLanguagePartFromCode(t){if(!(t=W(t))||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(d(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch(t){}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach((t=>{if(i)return;const e=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(e)||(i=e)})),!i&&this.options.supportedLngs&&t.forEach((t=>{if(i)return;const e=this.getScriptPartFromCode(t);if(this.isSupportedCode(e))return i=e;const s=this.getLanguagePartFromCode(t);if(this.isSupportedCode(s))return i=s;i=this.options.supportedLngs.find((t=>t===s?t:t.indexOf("-")<0&&s.indexOf("-")<0?void 0:t.indexOf("-")>0&&s.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===s||0===t.indexOf(s)&&s.length>1?t:void 0))})),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if("function"==typeof t&&(t=t(i)),d(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let e=t[i];return e||(e=t[this.getScriptPartFromCode(i)]),e||(e=t[this.formatLanguageCode(i)]),e||(e=t[this.getLanguagePartFromCode(i)]),e||(e=t.default),e||[]}toResolveHierarchy(t,i){const e=this.getFallbackCodes((!1===i?[]:i)||this.options.fallbackLng||[],t),s=[],o=t=>{t&&(this.isSupportedCode(t)?s.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return d(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):d(t)&&o(this.formatLanguageCode(t)),e.forEach((t=>{s.indexOf(t)<0&&o(this.formatLanguageCode(t))})),s}}const z={zero:0,one:1,two:2,few:3,many:4,other:5},B={select:t=>1===t?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class F{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=L.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const e=W("dev"===t?"en":t),s=i.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:e,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let n;try{n=new Intl.PluralRules(e,{type:s})}catch(e){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),B;if(!t.match(/-|_/))return B;const s=this.languageUtils.getLanguagePartFromCode(t);n=this.getRule(s,i)}return this.pluralRulesCache[o]=n,n}needsPlural(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,i,e={}){return this.getSuffixes(t,e).map((t=>`${i}${t}`))}getSuffixes(t,i={}){let e=this.getRule(t,i);return e||(e=this.getRule("dev",i)),e?e.resolvedOptions().pluralCategories.sort(((t,i)=>z[t]-z[i])).map((t=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${t}`)):[]}getSuffix(t,i,e={}){const s=this.getRule(t,e);return s?`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,e))}}const q=(t,i,e,s=".",o=!0)=>{let n=((t,i,e)=>{const s=v(t,e);return void 0!==s?s:v(i,e)})(t,i,e);return!n&&o&&d(e)&&(n=I(t,e,s),void 0===n&&(n=I(i,e,s))),n},V=t=>t.replace(/\$/g,"$$$$");class _{constructor(t={}){this.logger=L.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(t=>t),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:e,useRawValueToEscape:s,prefix:o,prefixEscaped:n,suffix:r,suffixEscaped:a,formatSeparator:h,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:c,nestingPrefixEscaped:d,nestingSuffix:g,nestingSuffixEscaped:p,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:y}=t.interpolation;this.escape=void 0!==i?i:A,this.escapeValue=void 0===e||e,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?$(o):n||"{{",this.suffix=r?$(r):a||"}}",this.formatSeparator=h||",",this.unescapePrefix=l?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=c?$(c):d||$("$t("),this.nestingSuffix=g?$(g):p||$(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,e,s){let o,n,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=t=>{if(t.indexOf(this.formatSeparator)<0){const o=q(i,a,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,e,{...s,...i,interpolationkey:t}):o}const o=t.split(this.formatSeparator),n=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(q(i,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),r,e,{...s,...i,interpolationkey:n})};this.resetRegExp();const l=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>V(t)},{regex:this.regexp,safeValue:t=>V(this.escapeValue?this.escape(t):t)}].forEach((i=>{for(r=0;o=i.regex.exec(t);){const e=o[1].trim();if(n=h(e),void 0===n)if("function"==typeof l){const i=l(t,o,s);n=d(i)?i:""}else if(s&&Object.prototype.hasOwnProperty.call(s,e))n="";else{if(u){n=o[0];continue}this.logger.warn(`missed to pass in variable ${e} for interpolating ${t}`),n=""}else d(n)||this.useRawValueToEscape||(n=p(n));const a=i.safeValue(n);if(t=t.replace(o[0],a),u?(i.regex.lastIndex+=n.length,i.regex.lastIndex-=o[0].length):i.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),t}nest(t,i,e={}){let s,o,n;const r=(t,i)=>{const e=this.nestingOptionsSeparator;if(t.indexOf(e)<0)return t;const s=t.split(new RegExp(`${$(e)}[ ]*{`));let o=`{${s[1]}`;t=s[0],o=this.interpolate(o,n);const r=o.match(/'/g),a=o.match(/"/g);((r?.length??0)%2==0&&!a||(a?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{n=JSON.parse(o),i&&(n={...i,...n})}catch(i){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,i),`${t}${e}${o}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,t};for(;s=this.nestingRegexp.exec(t);){let a=[];n={...e},n=n.replace&&!d(n.replace)?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;const h=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(-1!==h&&(a=s[1].slice(h).split(this.formatSeparator).map((t=>t.trim())).filter(Boolean),s[1]=s[1].slice(0,h)),o=i(r.call(this,s[1].trim(),n),n),o&&s[0]===t&&!d(o))return o;d(o)||(o=p(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),a.length&&(o=a.reduce(((t,i)=>this.format(t,i,e.lng,{...e,interpolationkey:s[1].trim()})),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const U=t=>{const i={};return(e,s,o)=>{let n=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(n={...n,[o.interpolationkey]:void 0});const r=s+JSON.stringify(n);let a=i[r];return a||(a=t(W(s),o),i[r]=a),a(e)}},J=t=>(i,e,s)=>t(W(e),s)(i);class Y{constructor(t={}){this.logger=L.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const e=i.cacheInBuiltFormats?U:J;this.formats={number:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i});return t=>e.format(t)})),currency:e(((t,i)=>{const e=new Intl.NumberFormat(t,{...i,style:"currency"});return t=>e.format(t)})),datetime:e(((t,i)=>{const e=new Intl.DateTimeFormat(t,{...i});return t=>e.format(t)})),relativetime:e(((t,i)=>{const e=new Intl.RelativeTimeFormat(t,{...i});return t=>e.format(t,i.range||"day")})),list:e(((t,i)=>{const e=new Intl.ListFormat(t,{...i});return t=>e.format(t)}))}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=U(i)}format(t,i,e,s={}){const o=i.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((t=>t.indexOf(")")>-1))){const t=o.findIndex((t=>t.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}return o.reduce(((t,i)=>{const{formatName:o,formatOptions:n}=(t=>{let i=t.toLowerCase().trim();const e={};if(t.indexOf("(")>-1){const s=t.split("(");i=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===i&&o.indexOf(":")<0?e.currency||(e.currency=o.trim()):"relativetime"===i&&o.indexOf(":")<0?e.range||(e.range=o.trim()):o.split(";").forEach((t=>{if(t){const[i,...s]=t.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),n=i.trim();e[n]||(e[n]=o),"false"===o&&(e[n]=!1),"true"===o&&(e[n]=!0),isNaN(o)||(e[n]=parseInt(o,10))}}))}return{formatName:i,formatOptions:e}})(i);if(this.formats[o]){let i=t;try{const r=s?.formatParams?.[s.interpolationkey]||{};i=this.formats[o](t,r.locale||r.lng||s.locale||s.lng||e,{...n,...s,...r})}catch(t){this.logger.warn(t)}return i}return this.logger.warn(`there was no format function for ${o}`),t}),t)}}class G extends P{constructor(t,i,e,s={}){super(),this.backend=t,this.store=i,this.services=e,this.languageUtils=e.languageUtils,this.options=s,this.logger=L.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(e,s.backend,s)}queueLoad(t,i,e,s){const o={},n={},r={},a={};return t.forEach((t=>{let s=!0;i.forEach((i=>{const r=`${t}|${i}`;!e.reload&&this.store.hasResourceBundle(t,i)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===n[r]&&(n[r]=!0):(this.state[r]=1,s=!1,void 0===n[r]&&(n[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[i]&&(a[i]=!0)))})),s||(r[t]=!0)})),(Object.keys(o).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(n),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(t,i,e){const s=t.split("|"),o=s[0],n=s[1];i&&this.emit("failedLoading",o,n,i),!i&&e&&this.store.addResourceBundle(o,n,e,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&e&&(this.state[t]=0);const r={};this.queue.forEach((e=>{((t,i,e)=>{const{obj:s,k:o}=b(t,i,Object);s[o]=s[o]||[],s[o].push(e)})(e.loaded,[o],n),((t,i)=>{void 0!==t.pending[i]&&(delete t.pending[i],t.pendingCount--)})(e,t),i&&e.errors.push(i),0!==e.pendingCount||e.done||(Object.keys(e.loaded).forEach((t=>{r[t]||(r[t]={});const i=e.loaded[t];i.length&&i.forEach((i=>{void 0===r[t][i]&&(r[t][i]=!0)}))})),e.done=!0,e.errors.length?e.callback(e.errors):e.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((t=>!t.done))}read(t,i,e,s=0,o=this.retryTimeout,n){if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:i,fcName:e,tried:s,wait:o,callback:n});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}r&&a&&s<this.maxRetries?setTimeout((()=>{this.read.call(this,t,i,e,s+1,2*o,n)}),o):n(r,a)},a=this.backend[e].bind(this.backend);if(2!==a.length)return a(t,i,r);try{const e=a(t,i);e&&"function"==typeof e.then?e.then((t=>r(null,t))).catch(r):r(null,e)}catch(t){r(t)}}prepareLoading(t,i,e={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();d(t)&&(t=this.languageUtils.toResolveHierarchy(t)),d(i)&&(i=[i]);const o=this.queueLoad(t,i,e,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((t=>{this.loadOne(t)}))}load(t,i,e){this.prepareLoading(t,i,{},e)}reload(t,i,e){this.prepareLoading(t,i,{reload:!0},e)}loadOne(t,i=""){const e=t.split("|"),s=e[0],o=e[1];this.read(s,o,"read",void 0,void 0,((e,n)=>{e&&this.logger.warn(`${i}loading namespace ${o} for language ${s} failed`,e),!e&&n&&this.logger.log(`${i}loaded namespace ${o} for language ${s}`,n),this.loaded(t,e,n)}))}saveMissing(t,i,e,s,o,n={},r=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(i)){if(null!=e&&""!==e){if(this.backend?.create){const a={...n,isUpdate:o},h=this.backend.create.bind(this.backend);if(h.length<6)try{let o;o=5===h.length?h(t,i,e,s,a):h(t,i,e,s),o&&"function"==typeof o.then?o.then((t=>r(null,t))).catch(r):r(null,o)}catch(t){r(t)}else h(t,i,e,s,r,a)}t&&t[0]&&this.store.addResource(t[0],i,e,s)}}else this.logger.warn(`did not save key "${e}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let i={};if("object"==typeof t[1]&&(i=t[1]),d(t[1])&&(i.defaultValue=t[1]),d(t[2])&&(i.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const e=t[3]||t[2];Object.keys(e).forEach((t=>{i[t]=e[t]}))}return i},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Z=t=>(d(t.ns)&&(t.ns=[t.ns]),d(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),d(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),"boolean"==typeof t.initImmediate&&(t.initAsync=t.initImmediate),t),X=()=>{},tt="__i18next_supportNoticeShown";class it extends P{constructor(t={},i){var e;if(super(),this.options=Z(t),this.services={},this.logger=L,this.modules={external:[]},e=this,Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout((()=>{this.init(t,i)}),0)}}init(t={},i){this.isInitializing=!0,"function"==typeof t&&(i=t,t={}),null==t.defaultNS&&t.ns&&(d(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const e=Q();var s;this.options={...e,...this.options,...Z(t)},this.options.interpolation={...e.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=e.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(s=this,s?.modules?.backend?.name?.indexOf("Locize")>0||s?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||s?.options?.backend?.backends&&s.options.backend.backends.some((t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0))||s?.options?.backend?.projectId||s?.options?.backend?.backendOptions&&s.options.backend.backendOptions.some((t=>t?.projectId)))||"undefined"!=typeof globalThis&&globalThis[tt]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[tt]=!0));const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let t;L.init(this.modules.logger?o(this.modules.logger):null,this.options),t=this.modules.formatter?this.modules.formatter:Y;const i=new H(this.options);this.store=new M(this.options.resources,this.options);const s=this.services;s.logger=L,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new F(i,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!t||this.options.interpolation.format&&this.options.interpolation.format!==e.interpolation.format||(s.formatter=o(t),s.formatter.init&&s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new _(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new G(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new K(this.services,this.options),this.translator.on("*",((t,...i)=>{this.emit(t,...i)})),this.modules.external.forEach((t=>{t.init&&t.init(this)}))}if(this.format=this.options.interpolation.format,i||(i=X),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=(...i)=>this.store[t](...i)})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=(...i)=>(this.store[t](...i),this)}));const n=g(),r=()=>{const t=(t,e)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(e),i(t,e)};if(this.languages&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),n}loadResources(t,i=X){let e=i;const s=d(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===s?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],i=i=>{i&&"cimode"!==i&&this.services.languageUtils.toResolveHierarchy(i).forEach((i=>{"cimode"!==i&&t.indexOf(i)<0&&t.push(i)}))};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((t=>i(t))),this.options.preload?.forEach?.((t=>i(t))),this.services.backendConnector.load(t,this.options.ns,(t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)}))}else e(null)}reloadResources(t,i,e){const s=g();return"function"==typeof t&&(e=t,t=void 0),"function"==typeof i&&(e=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),e||(e=X),this.services.backendConnector.reload(t,i,(t=>{s.resolve(),e(t)})),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const e=g();this.emit("languageChanging",t);const s=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},o=(o,n)=>{n?this.isLanguageChangingTo===t&&(s(n),this.translator.changeLanguage(n),this.isLanguageChangingTo=void 0,this.emit("languageChanged",n),this.logger.log("languageChanged",n)):this.isLanguageChangingTo=void 0,e.resolve(((...t)=>this.t(...t))),i&&i(o,((...t)=>this.t(...t)))},n=i=>{t||i||!this.services.languageDetector||(i=[]);const e=d(i)?i:i&&i[0],n=this.store.hasLanguageSomeTranslations(e)?e:this.services.languageUtils.getBestMatchFromCodes(d(i)?[i]:i);n&&(this.language||s(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector?.cacheUserLanguage?.(n)),this.loadResources(n,(t=>{o(t,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(n):this.services.languageDetector.detect(n):n(t):n(this.services.languageDetector.detect()),e}getFixedT(t,i,e){const s=(t,i,...o)=>{let n;n="object"!=typeof i?this.options.overloadTranslationOptionHandler([t,i].concat(o)):{...i},n.lng=n.lng||s.lng,n.lngs=n.lngs||s.lngs,n.ns=n.ns||s.ns,""!==n.keyPrefix&&(n.keyPrefix=n.keyPrefix||e||s.keyPrefix);const r={...this.options,...n};"function"==typeof n.keyPrefix&&(n.keyPrefix=N(n.keyPrefix,r));const a=this.options.keySeparator||".";let h;return n.keyPrefix&&Array.isArray(t)?h=t.map((t=>("function"==typeof t&&(t=N(t,r)),`${n.keyPrefix}${a}${t}`))):("function"==typeof t&&(t=N(t,r)),h=n.keyPrefix?`${n.keyPrefix}${a}${t}`:t),this.t(h,n)};return d(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=e,s}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const e=i.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===e.toLowerCase())return!0;const n=(t,i)=>{const e=this.services.backendConnector.state[`${t}|${i}`];return-1===e||0===e||2===e};if(i.precheck){const t=i.precheck(this,n);if(void 0!==t)return t}return!(!this.hasResourceBundle(e,t)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!n(e,t)||s&&!n(o,t)))}loadNamespaces(t,i){const e=g();return this.options.ns?(d(t)&&(t=[t]),t.forEach((t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)})),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}loadLanguages(t,i){const e=g();d(t)&&(t=[t]);const s=this.options.preload||[],o=t.filter((t=>s.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t)));return o.length?(this.options.preload=s.concat(o),this.loadResources((t=>{e.resolve(),i&&i(t)})),e):(i&&i(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const t=i.getTextInfo();if(t&&t.direction)return t.direction}}catch(t){}const i=this.services?.languageUtils||new H(Q());return t.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const e=new it(t,i);return e.createInstance=it.createInstance,e}cloneInstance(t={},i=X){const e=t.forkResourceStore;e&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new it(s);if(void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t)),["store","services","language"].forEach((t=>{o[t]=this[t]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},e){const t=Object.keys(this.store.data).reduce(((t,i)=>(t[i]={...this.store.data[i]},t[i]=Object.keys(t[i]).reduce(((e,s)=>(e[s]={...t[i][s]},e)),t[i]),t)),{});o.store=new M(t,s),o.services.resourceStore=o.store}if(t.interpolation){const i={...Q().interpolation,...this.options.interpolation,...t.interpolation},e={...s,interpolation:i};o.services.interpolator=new _(e)}return o.translator=new K(o.services,s),o.translator.on("*",((t,...i)=>{o.emit(t,...i)})),o.init(s,i),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const et=it.createInstance(),{slice:st,forEach:ot}=[],nt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rt={create(t,i,e,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};e&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*e*1e3)),s&&(o.domain=s),document.cookie=function(t,i){const e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${t}=${encodeURIComponent(i)}`;if(e.maxAge>0){const t=e.maxAge-0;if(Number.isNaN(t))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(t)}`}if(e.domain){if(!nt.test(e.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${e.domain}`}if(e.path){if(!nt.test(e.path))throw new TypeError("option path is invalid");s+=`; Path=${e.path}`}if(e.expires){if("function"!=typeof e.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${e.expires.toUTCString()}`}if(e.httpOnly&&(s+="; HttpOnly"),e.secure&&(s+="; Secure"),e.sameSite)switch("string"==typeof e.sameSite?e.sameSite.toLowerCase():e.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return e.partitioned&&(s+="; Partitioned"),s}(t,i,o)},read(t){const i=`${t}=`,e=document.cookie.split(";");for(let t=0;t<e.length;t++){let s=e[t];for(;" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return null},remove(t,i){this.create(t,"",-1,i)}};var at={name:"cookie",lookup(t){let{lookupCookie:i}=t;if(i&&"undefined"!=typeof document)return rt.read(i)||void 0},cacheUserLanguage(t,i){let{lookupCookie:e,cookieMinutes:s,cookieDomain:o,cookieOptions:n}=i;e&&"undefined"!=typeof document&&rt.create(e,t,s,o,n)}},ht={name:"querystring",lookup(t){let i,{lookupQuerystring:e}=t;if("undefined"!=typeof window){let{search:t}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(t=window.location.hash.substring(window.location.hash.indexOf("?")));const s=t.substring(1).split("&");for(let t=0;t<s.length;t++){const o=s[t].indexOf("=");o>0&&s[t].substring(0,o)===e&&(i=s[t].substring(o+1))}}return i}},lt={name:"hash",lookup(t){let i,{lookupHash:e,lookupFromHashIndex:s}=t;if("undefined"!=typeof window){const{hash:t}=window.location;if(t&&t.length>2){const o=t.substring(1);if(e){const t=o.split("&");for(let s=0;s<t.length;s++){const o=t[s].indexOf("=");o>0&&t[s].substring(0,o)===e&&(i=t[s].substring(o+1))}}if(i)return i;if(!i&&s>-1){const i=t.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(i))return;const e="number"==typeof s?s:0;return i[e]?.replace("/","")}}}return i}};let ut=null;const ct=()=>{if(null!==ut)return ut;try{if(ut="undefined"!=typeof window&&null!==window.localStorage,!ut)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch(t){ut=!1}return ut};var dt={name:"localStorage",lookup(t){let{lookupLocalStorage:i}=t;if(i&&ct())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupLocalStorage:e}=i;e&&ct()&&window.localStorage.setItem(e,t)}};let gt=null;const pt=()=>{if(null!==gt)return gt;try{if(gt="undefined"!=typeof window&&null!==window.sessionStorage,!gt)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch(t){gt=!1}return gt};var ft={name:"sessionStorage",lookup(t){let{lookupSessionStorage:i}=t;if(i&&pt())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(t,i){let{lookupSessionStorage:e}=i;e&&pt()&&window.sessionStorage.setItem(e,t)}},mt={name:"navigator",lookup(t){const i=[];if("undefined"!=typeof navigator){const{languages:t,userLanguage:e,language:s}=navigator;if(t)for(let e=0;e<t.length;e++)i.push(t[e]);e&&i.push(e),s&&i.push(s)}return i.length>0?i:void 0}},yt={name:"htmlTag",lookup(t){let i,{htmlTag:e}=t;const s=e||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(i=s.getAttribute("lang")),i}},bt={name:"path",lookup(t){let{lookupFromPathIndex:i}=t;if("undefined"==typeof window)return;const e=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(e))return;const s="number"==typeof i?i:0;return e[s]?.replace("/","")}},wt={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:i}=t;const e="number"==typeof i?i+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[e]}};let vt=!1;try{vt=!0}catch(t){}const xt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];vt||xt.splice(1,1);class $t{constructor(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,i)}init(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(t){return ot.call(st.call(arguments,1),(i=>{if(i)for(const e in i)void 0===t[e]&&(t[e]=i[e])})),t}(t,this.options||{},{order:xt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=t=>t.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(at),this.addDetector(ht),this.addDetector(dt),this.addDetector(ft),this.addDetector(mt),this.addDetector(yt),this.addDetector(bt),this.addDetector(wt),this.addDetector(lt)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach((i=>{if(this.detectors[i]){let e=this.detectors[i].lookup(this.options);e&&"string"==typeof e&&(e=[e]),e&&(t=t.concat(e))}})),t=t.filter((t=>{return null!=t&&!("string"==typeof(i=t)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((t=>t.test(i))));var i})).map((t=>this.options.convertDetectedLanguage(t))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||i.forEach((i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(t,this.options)})))}}$t.type="languageDetector";et.use($t).init({resources:{en:{translation:{"Do you want to exit? button":"Do you want to exit?","Exit button":"Exit","Continue playing button":"Continue playing","Drop the elements to match the given symbol order":"Drop the elements to match the given symbol order","Fill in the blanks":"Fill in the blanks",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageEngAudio",substractionWithoutImage:"substractionWithoutImageEngAudio",numberIdentificationWithImage:"numberIdentificationWithImageEngAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageEngAudio",wordBuildingWithImage:"wordBuildingWithImageEngAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageEngAudio",pictureClues:"pictureCluesEngAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesEngAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageEngAudio",sentenceMatch:"sentenceMatchEngAudio",imageMatch:"imageMatchEngAudio",palStoryTale:"palStoryTaleEngAudio",palEgmaPatternMatching:"palEgmaPatternMatchingEngAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropEngAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickEngAudio",palEgraOddOneOut:"palEgraOddOneOutEngAudio",palEgraArrangePictures:"palEgraArrangePicturesEngAudio",palEgraBuildWord:"palEgraBuildWordEngAudio",palEgraWordFormation:"palEgraWordFormationEngAudio",palInventedSpelling:"palInventedSpellingEngAudio",palLetterIdentification:"palLetterIdentificationEngAudio",palStoryMaking:"palStoryMakingEngAudio",palegmasumtogether:"palegmasumtogetherEngAudio",palegmamultioption:"palegmamultioptionEngAudio",palegraoptionaudio:"palegraoptionaudioEngAudio",palegrawordmatch:"palegrawordmatchEngAudio",palegramcqimages:"palegramcqimagesEngAudio"}}},fr:{translation:{"Do you want to exit? button":"Voulez-vous quitter?","Exit button":"Quitter","Continue playing button":"Continuer à jouer","Drop the elements to match the given symbol order":"Déposez les éléments pour correspondre au symbole donné","Fill in the blanks":"Remplissez les blancs",instruction:{dragAndDrop:"Faites glisser les objets vers le bon emplacement.",mcq:"Choisissez la bonne réponse parmi les options proposées.",tracing:"Tracez soigneusement la forme en suivant la ligne.",flashcards:"Regardez les cartes mémoire pour renforcer l’apprentissage."}}},hi:{translation:{"Do you want to exit? button":"क्या आप बाहर निकलना चाहते हैं?","Exit button":"बाहर निकलें","Continue playing button":"खेलना जारी रखें","Drop the elements to match the given symbol order":"दिए गए चिन्ह से मिलाने के लिए तत्वों को ड्रॉप करें","Fill in the blanks":"रिक्त स्थान भरें",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageHiAudio",substractionWithoutImage:"substractionWithoutImageHiAudio",numberIdentificationWithImage:"numberIdentificationWithImageHiAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageHiAudio",wordBuildingWithImage:"wordBuildingWithImageHiAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageHiAudio",pictureClues:"pictureCluesHiAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesHiAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageHiAudio",sentenceMatch:"sentenceMatchHiAudio",imageMatch:"imageMatchHiAudio",palStoryTale:"palStoryTaleHiAudio",palEgmaPatternMatching:"palEgmaPatternMatchingHiAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropHiAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickHiAudio",palEgraOddOneOut:"palEgraOddOneOutHiAudio",palEgraArrangePictures:"palEgraArrangePicturesHiAudio",palEgraBuildWord:"palEgraBuildWordHiAudio",palEgraWordFormation:"palEgraWordFormationHiAudio",palInventedSpelling:"palInventedSpellingHiAudio",palLetterIdentification:"palLetterIdentificationHiAudio",palStoryMaking:"palStoryMakingHiAudio",palegmasumtogether:"palegmasumtogetherHiAudio",palegmamultioption:"palegmamultioptionHiAudio",palegraoptionaudio:"palegraoptionaudioHiAudio",palegrawordmatch:"palegrawordmatchHiAudio",palegramcqimages:"palegramcqimagesHiAudio"}}},kn:{translation:{"Do you want to exit? button":"ನೀವು ನಿರ್ಗಮಿಸಲು ಬಯಸುವಿರಾ?","Exit button":"ನಿರ್ಗಮಿಸು","Continue playing button":"ಆಟವನ್ನು ಮುಂದುವರಿಸಿ","Drop the elements to match the given symbol order":"ನೀಡಿರುವ ಸಂಕೇತಕ್ಕೆ ಹೊಂದುವಂತೆ ಅಂಶಗಳನ್ನು ಬಿಡಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ",instruction:{dragAndDrop:"Match the items by dragging and dropping them into the correct places.",mcq:"Select the correct answer from the options provided.",tracing:"Trace the shape by following the outline carefully.",flashcards:"Review the flashcards to reinforce your learning.",substractionWithImage:"substractionWithImageKaAudio",substractionWithoutImage:"substractionWithoutImageKaAudio",numberIdentificationWithImage:"numberIdentificationWithImageKaAudio",numberIdentificationWithoutImage:"numberIdentificationWithoutImageKaAudio",wordBuildingWithImage:"wordBuildingWithImageKaAudio",wordBuildingWithoutImage:"wordBuildingWithoutImageKaAudio",pictureClues:"pictureCluesKaAudio",pictureWordMatchMultipleImages:"pictureWordMatchMultipleImagesKaAudio",pictureWordMatchSingleImage:"pictureWordMatchSingleImageKaAudio",sentenceMatch:"sentenceMatchKaAudio",imageMatch:"imageMatchKaAudio",palStoryTale:"palStoryTaleKaAudio",palEgmaPatternMatching:"palEgmaPatternMatchingKaAudio",palEgmaWordProblemDragnDrop:"palEgmaWordProblemDragnDropKaAudio",palEgmaWordProblemClick:"palEgmaWordProblemClickKaAudio",palEgraOddOneOut:"palEgraOddOneOutKaAudio",palEgraArrangePictures:"palEgraArrangePicturesKaAudio",palEgraBuildWord:"palEgraBuildWordKaAudio",palEgraWordFormation:"palEgraWordFormationKaAudio",palInventedSpelling:"palInventedSpellingKaAudio",palLetterIdentification:"palLetterIdentificationKaAudio",palStoryMaking:"palStoryMakingKaAudio",palegmasumtogether:"palegmasumtogetherKaAudio",palegmamultioption:"palegmamultioptionKaAudio",palegraoptionaudio:"palegraoptionaudioKaAudio",palegrawordmatch:"palegrawordmatchKaAudio",palegramcqimages:"palegramcqimagesKaAudio"}}},te:{translation:{"Do you want to exit? button":"మీరు బయటకు వెళ్లాలనుకుంటున్నారా?","Exit button":"బయటకు వెళ్ళు","Continue playing button":"ఆటను కొనసాగించు","Drop the elements to match the given symbol order":"ఇచ్చిన చిహ్నానికి సరిపడేలా అంశాలను డ్రాప్ చేయಂడಿ","Fill in the blanks":"ಖಾಲಿ ಸ್ಥಳಗಳನ್ನು ಭರ್ತಿ ಮಾಡಿ"}},pt:{translation:{"Do you want to exit? button":"Você deseja sair?","Exit button":"Sair","Continue playing button":"Continuar jogando","Drop the elements to match the given symbol order":"Solte os elementos para corresponder à ordem dos símbolos fornecida","Fill in the blanks":"Preencha os espaços em branco"}},mr:{translation:{"Do you want to exit? button":"तुम्हाला बाहेर पडायचे आहे का?","Exit button":"बाहेर पडा","Continue playing button":"खेळ सुरू ठेवा",instruction:{dragAndDrop:"वस्तू योग्य ठिकाणी ओढून आणि सोडून जुळवा.",mcq:"दिलेल्या पर्यायांमधून योग्य उत्तर निवडा.",tracing:"रेषेचा काळजीपूर्वक मागोवा घेत आकृती काढा.",flashcards:"तुमचे शिक्षण मजबूत करण्यासाठी फ्लॅशकार्ड्स पाहा."}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},detection:{order:["querystring","localStorage","navigator","htmlTag"],caches:["localStorage"]}});const kt=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.requiredDrops="",this.string="",this.fontFamily="",this.fontSize="20px",this.fontColor="",this.highlightWhileSpeaking=!1,this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.move="false",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.borderImage="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.minDrops=1,this.maxDrops=1,this.onEntry="",this.margin="",this.padding="",this.borderRadius="0px",this.spanType="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1}componentDidLoad(){if(s(this.el,this.delayVisible),o(this.el,this.type),"words"!==this.spanType&&"letters"!==this.spanType||this.addSpanToText(),this.showSpeakIcon&&n(this.el),!this.audio||""===this.audio.trim()){const t=()=>{const t=this.resolveAutoAudio();t&&(this.audio=t)};window.__LIDO_COMMON_AUDIO_PATH__?t():window.addEventListener(r,t,{once:!0})}}resolveAutoAudio(){const t=window[c];return t&&this.string?`${t}/${this.string}.mp3`:null}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=this.borderImage?a(this.borderImage):"",i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:h(this.height,i),width:h(this.width,i),backgroundColor:h(this.bgColor,i),top:h(this.y,i),left:h(this.x,i),zIndex:this.z,fontSize:h(this.fontSize,i),fontFamily:this.fontFamily,color:h(this.fontColor,i),display:"true"===h(`${this.visible}`,i)?"flex":"none",borderImage:`url(${t})`,borderImageSlice:t?"0 fill":"",margin:h(this.margin,i),padding:h(this.padding,i),borderRadius:h(this.borderRadius,i)}}async addSpanToText(){const t=this.el.querySelector(".lido-text-content");if(!t)return;const i=t.textContent||"";t.innerHTML="","letters"===this.spanType&&i.split("").forEach((i=>{if(""===i.trim())return;const e=document.createElement("span");e.textContent=i,e.className="text-letters",t.appendChild(e)})),"words"===this.spanType&&i.split(" ").forEach((i=>{const e=document.createElement("span");e.textContent=i,e.className="text-words",t.appendChild(e)}))}render(){const t=et.t(this.string).replace(/_phonics?/gi,"");return l(u,{key:"14a67034db7bf3d268e999404425879c95964b82",class:"lido-text",value:this.value,"required-drops":this.requiredDrops,type:this.type,"tab-index":this.tabIndex,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,minDrops:this.minDrops,maxDrops:this.maxDrops,id:this.id,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,move:this.move,"span-type":this.spanType,"disable-speak":`${this.disableSpeak}`},""!==this.spanType?l("div",{class:"lido-text-content"}," ",t):t)}get el(){return this}static get style(){return".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}"}},[0,"lido-text",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],requiredDrops:[1,"required-drops"],string:[1],fontFamily:[1,"font-family"],fontSize:[1,"font-size"],fontColor:[1,"font-color"],highlightWhileSpeaking:[4,"highlight-while-speaking"],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],move:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],borderImage:[1,"border-image"],type:[1],tabIndex:[2,"tab-index"],visible:[8],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],onEntry:[1,"on-entry"],margin:[1],padding:[1],borderRadius:[1,"border-radius"],spanType:[1,"span-type"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function At(){"undefined"!=typeof customElements&&["lido-text"].forEach((i=>{"lido-text"===i&&(customElements.get(t(i))||customElements.define(t(i),kt))}))}At();export{kt as L,At as d,et as i}
|