lido-player 0.0.2-beta-18-dev → 0.0.2-beta-21-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-Buln7Iaf.js} +1 -1
- package/dist/cjs/{index-BEjUmVtH.js → index-Bb_TFgTA.js} +137 -64
- package/dist/cjs/{index-DnqQXD5x.js → index-DBCFoh1I.js} +12 -53
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/lido-avatar_22.cjs.entry.js +139 -50
- 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 +108 -19
- 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-BAfFgI9q.js +1 -0
- 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-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-BNNX1Pew.js → p-wF7SBGpr.js} +2 -2
- package/dist/esm/{decode-BgBfbPZu.js → decode-B_VrYFdJ.js} +1 -1
- package/dist/esm/{index-D-29PaRa.js → index-B-VyHxJa.js} +137 -64
- package/dist/esm/{index-BeHFCsWf.js → index-mMpK8062.js} +12 -53
- package/dist/esm/index.js +2 -2
- package/dist/esm/lido-avatar_22.entry.js +139 -50
- 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-744dee1c.entry.js} +2 -2
- package/dist/lido-player/p-BK926Rl3.js +1 -0
- package/dist/lido-player/{p-BA2X6O7O.js → p-Cw84dpIR.js} +1 -1
- package/dist/lido-player/p-mMpK8062.js +2 -0
- package/dist/lido-player/readme.md +49 -49
- package/dist/types/components/trace/lido-trace.d.ts +9 -1
- package/dist/types/stencil-public-runtime.d.ts +0 -12
- 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/loader/index.d.ts +1 -1
- package/package.json +74 -74
- package/readme.md +113 -113
- package/dist/components/p-BSV5U72F.js +0 -1
- package/dist/components/p-CTlwn9r7.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 +0,0 @@
|
|
|
1
|
-
import{t,p as i,H as e,B as s,getAssetPath as n,c as o,k as r,E as a,F as h,s as l,f as c,w as d,g as u,j as f,a as w,h as g,b as m}from"./index.js";const p=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.svgSource="",this.svgUrls=[],this.audioUrls=[],this.currentSvgIndex=0,this.moving=!1,this.value="",this.height="auto",this.width="auto",this.audio="",this.x="0px",this.y="0px",this.z="0",this.ariaLabel="",this.ariaHidden="",this.tabIndex=0,this.mode=s.ShowFlow,this.fingerHintUrl=n("assets/Tracing-hand.svg"),this.highlightTextId="",this.animationTrace=!1,this.delayVisible="",this.disableSpeak=!1,this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.fileIndex=-1,this.isDragging=!1,this.activePointerId=null,this.freeTraceUpdateCounter=0,this.idleTimer=null,this.fingerImg=null}async initializeSVG(){let t={fileIndex:-1,currentPathIndex:0,lastLength:0,totalPathLength:0,isDragging:!1,circle:null,paths:[],svg:null,proximityThreshold:60,freeTraceProximityThreshold:350,rafId:null,pointerMoveEvent:null,activePointerId:null,mode:this.mode,flowMarkers:[],freeTraceLines:[],currentFreePath:[],lastPointerPos:null,dragOffset:null,isCompletingPath:!1,touchProximityThreshold:null};const i=this.svgUrls[this.currentSvgIndex];i&&""!==i.trim()?(await this.fetchSVG(o(i)),await this.loadAnotherSVG(t,!0)):console.error("No SVG URL provided or index out of bounds.")}componentDidLoad(){r(this.el,this.delayVisible)}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad),this.svgUrls=this.svgSource.split(";").map((t=>t.trim())),this.currentSvgIndex=0,this.showSpeakIcon&&(a(this.el),this.el.append(a(this.el))),this.initializeSVG()}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}resetIdleTimer(t){null!==this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.idleTimer=window.setTimeout((()=>{this.showFingerHint(t)}),3e3)}showFingerHint(t){var i;if(this.fingerImg)return;const e=t.paths[t.currentPathIndex];if(!e)return;const s=document.createElementNS("http://www.w3.org/2000/svg","image"),n=new Image;n.onload=()=>{s.setAttributeNS("http://www.w3.org/1999/xlink","href",o(this.fingerHintUrl))},n.onerror=()=>{s.setAttributeNS("http://www.w3.org/1999/xlink","href",o(h))},n.src=o(this.fingerHintUrl||h),s.setAttribute("width","40"),s.setAttribute("height","40"),s.setAttribute("id","lido-finger-hint"),s.style.pointerEvents="none",s.style.opacity="0.8",s.setAttribute("x","0"),s.setAttribute("y","0");const r=document.createElementNS("http://www.w3.org/2000/svg","animateMotion");r.setAttribute("dur","2s"),r.setAttribute("repeatCount","indefinite");const a=document.createElementNS("http://www.w3.org/2000/svg","mpath");a.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${e.id}`),r.appendChild(a),s.appendChild(r),null===(i=t.svg)||void 0===i||i.appendChild(s),this.fingerImg=s}hideFingerHint(){this.fingerImg&&this.fingerImg.parentNode&&this.fingerImg.parentNode.removeChild(this.fingerImg),this.fingerImg=null}async fetchSVG(t){const i=await fetch(t);if(!i.ok)throw new Error(`Failed to fetch SVG (${t}): ${i.statusText}`);return await i.text()}calculateBoundingBox(t,i=22){let e=1/0,s=1/0,n=-1/0,o=-1/0;return t.forEach((t=>{const i=t.getTotalLength();for(let r=0;r<=100;r++){const a=t.getPointAtLength(r/100*i);a.x<e&&(e=a.x),a.y<s&&(s=a.y),a.x>n&&(n=a.x),a.y>o&&(o=a.y)}})),e-=i,s-=i,n+=i,o+=i,{minX:e,minY:s,maxX:n,maxY:o}}insertSVG(t){const i=document.getElementById("lido-svgContainer");if(!i)return;i.innerHTML=t;const e=i.querySelector("svg");e.classList.add("lido-trace-svg"),e.removeAttribute("width"),e.removeAttribute("height");const s=e.querySelectorAll("path, line"),n=this.calculateBoundingBox(Array.from(s));e.setAttribute("viewBox",`${n.minX} ${n.minY} ${n.maxX-n.minX} ${n.maxY-n.minY}`)}getSVGElement(){return document.getElementById("lido-svgContainer").querySelector("svg")}getPaths(t){return Array.from(t.querySelectorAll("path, line"))}createFlowMarkersForPath(t){var i;if(!t)return;const e=t.ownerSVGElement;if(!e)return;const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",t.getAttribute("d")||""),s.setAttribute("stroke","blue"),s.setAttribute("stroke-width","2"),s.setAttribute("stroke-dasharray","6,6"),s.setAttribute("fill","none"),s.setAttribute("class","lido-flow-indicator"),null===(i=t.parentNode)||void 0===i||i.appendChild(s);let n=e.querySelector("defs#lido-flow-defs");n||(n=document.createElementNS("http://www.w3.org/2000/svg","defs"),n.setAttribute("id","lido-flow-defs"),e.insertBefore(n,e.firstChild));const o=`arrow-${Math.random().toString(36)}`,r=document.createElementNS("http://www.w3.org/2000/svg","marker");r.setAttribute("id",o),r.setAttribute("markerWidth","10"),r.setAttribute("markerHeight","10"),r.setAttribute("refX","5"),r.setAttribute("refY","5"),r.setAttribute("orient","auto"),r.setAttribute("markerUnits","strokeWidth");const a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d","M0,0 L10,5 L0,10 L2,5 Z"),a.setAttribute("fill","blue"),r.appendChild(a),n.appendChild(r),s.setAttribute("marker-end",`url(#${o})`),s}updateFlowIndicators(t){t.svg.querySelectorAll(".lido-flow-indicator").forEach((i=>{t.mode===s.NoFlow?i.style.display="none":t.mode===s.ShowFlow&&(i.style.display="block")}))}setupDrawingPath(t){t.paths.forEach(((i,e)=>{const n=i.getTotalLength();i._lidoTraceLength=n,i._lidoTraceStart=i.getPointAtLength(0),i._lidoTraceEnd=i.getPointAtLength(n),i._lidoTraceIsClosed=this.getDistanceSquared(i._lidoTraceStart,i._lidoTraceEnd)<200,i.setAttribute("id","lido-path-"+e);const o=i.cloneNode();o.style.opacity="100",o.style["stroke-opacity"]="100";const r=i.style["stroke-width"]||i.getAttribute("stroke-width");o.setAttribute("stroke-width",r),o.setAttribute("stroke-dasharray",n.toString()),o.setAttribute("stroke-dashoffset",n.toString()),i.parentNode.appendChild(o,i),i.setAttribute("class","lido-trace-path"),o.setAttribute("class","lido-trace-path-green"),i.greenPath=o,i.classList.add(t.mode),t.mode===s.BlindTracing||t.mode===s.BlindFreeTrace?i.setAttribute("stroke","none"):(i.setAttribute("stroke","#000"),i.setAttribute("stroke-width",r),i.setAttribute("fill","none"),i.setAttribute("stroke-dasharray",n.toString()),i.setAttribute("stroke-dashoffset","0")),e===t.currentPathIndex&&t.mode===s.ShowFlow&&(t.flowMarkers=this.createFlowMarkersForPath(i))})),t.totalPathLength=t.paths[t.currentPathIndex].getTotalLength()}setupDraggableCircle(t){var i;const e=t.paths[0].getPointAtLength(0),s=document.createElementNS("http://www.w3.org/2000/svg","circle");t.paths[t.currentPathIndex].style["stroke-width"]||t.paths[t.currentPathIndex].getAttribute("stroke-width"),s.setAttribute("id","lido-draggableCircle"),s.setAttribute("cx",e.x.toString()),s.setAttribute("cy",e.y.toString()),s.setAttribute("r","20"),s.setAttribute("fill","#CF1565"),null===(i=t.svg)||void 0===i||i.appendChild(s),t.circle=s,this.resetIdleTimer(t)}addEventListeners(t){var i,e,s,n;if(!t.circle||!t.paths||0===t.paths.length)return;t.svg.style.touchAction="none",t.circle.style.touchAction="none",t.circle.addEventListener("pointerdown",(i=>{i.preventDefault();const e=this.getPointerPosition(i,t.svg),s={x:parseFloat(t.circle.getAttribute("cx")),y:parseFloat(t.circle.getAttribute("cy"))},n=this.getDistanceSquared(e,s),o=this.getProximityThresholdForEvent(t,i);if(n<=o*o||"touch"===i.pointerType){t.isDragging=!0,t.activePointerId=i.pointerId,t.dragOffset={x:e.x-s.x,y:e.y-s.y};try{t.circle.setPointerCapture(i.pointerId)}catch(t){}t.lastPointerPos=s}this.hideFingerHint(),this.resetIdleTimer(t)}),{passive:!1}),null===(i=t.svg)||void 0===i||i.addEventListener("pointermove",(i=>{t.isDragging&&i.pointerId===t.activePointerId&&(i.preventDefault(),t.pointerMoveEvent=i,t.rafId||(t.rafId=requestAnimationFrame((()=>{this.handlePointerMove(t),t.rafId=null}))))}));const o=i=>{i.pointerId===t.activePointerId&&(t.isDragging=!1,t.activePointerId=null,t.lastPointerPos=null,t.dragOffset=null,this.hideFingerHint(),this.resetIdleTimer(t))};null===(e=t.svg)||void 0===e||e.addEventListener("pointerup",o),null===(s=t.svg)||void 0===s||s.addEventListener("pointercancel",o),null===(n=t.svg)||void 0===n||n.addEventListener("contextmenu",(t=>{t.preventDefault()}))}async handlePointerMove(t){var i,e,n,o,r;if(!t.isDragging)return;if(!t.circle||!t.paths||0===t.paths.length)return;if(t.isCompletingPath)return;this.hideFingerHint();const a=t.pointerMoveEvent,h=this.getPointerPosition(a,t.svg),l=t.dragOffset?{x:h.x-t.dragOffset.x,y:h.y-t.dragOffset.y}:h,c={x:parseFloat(t.circle.getAttribute("cx")),y:parseFloat(t.circle.getAttribute("cy"))};let d=1/0;if(t.lastPointerPos){const i=l.x-t.lastPointerPos.x,e=l.y-t.lastPointerPos.y;if(d=i*i+e*e,d<1)return}const u=t.paths[t.currentPathIndex];if(!u)return void console.error("No valid path found at the current index");const f=this.getProximityThresholdForEvent(t,a),w=f*f;if(this.getDistanceSquared(l,c)>w)return;const g=t.mode===s.FreeTrace||t.mode===s.BlindFreeTrace,m=this.getClosestPointOnPath(u,l,g?void 0:t.lastLength);if(this.getDistanceSquared(l,m)>w)return;if(g){if(this.freeTraceUpdateCounter=(this.freeTraceUpdateCounter||0)+1,this.freeTraceUpdateCounter%2!=0)return;if(t.currentFreePath||(t.currentFreePath=[]),!t.currentFreePath[t.currentPathIndex]){const e=document.createElementNS("http://www.w3.org/2000/svg","polyline"),s=t.paths[t.currentPathIndex].style["stroke-width"]||t.paths[t.currentPathIndex].getAttribute("stroke-width");e.setAttribute("stroke-width",s),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke","lightgreen"),e.setAttribute("points",`${l.x},${l.y}`),null===(i=t.svg)||void 0===i||i.appendChild(e),t.currentFreePath[t.currentPathIndex]=e,t.currentFreePolylinePoints=t.currentFreePolylinePoints||[],t.currentFreePolylinePoints[t.currentPathIndex]=[{x:l.x,y:l.y}],t.lastPointerPos=l,t.freeTracePointsCount=1}const s=10;if(t.freeTracePointsCount=(t.freeTracePointsCount||1)+1,t.freeTracePointsCount>s)return;t.currentFreePolylinePoints=t.currentFreePolylinePoints||[];let n=t.currentFreePolylinePoints[t.currentPathIndex]||[];n.push({x:l.x,y:l.y}),t.currentFreePolylinePoints[t.currentPathIndex]=n;const o=n.map((t=>`${t.x},${t.y}`)).join(" ");return t.currentFreePath[t.currentPathIndex].setAttribute("points",o),t.circle.setAttribute("cx",l.x.toString()),t.circle.setAttribute("cy",l.y.toString()),t.circle.parentNode!==t.svg&&(null===(e=t.svg)||void 0===e||e.appendChild(t.circle)),t.lastPointerPos=l,void(n.length>=s&&(this.moveToNextPath(t),t.currentFreePath[t.currentPathIndex]=null,t.currentFreePolylinePoints[t.currentPathIndex]=[],t.freeTracePointsCount=0))}const p=Math.min(320,Math.max(160,.45*t.totalPathLength)),v=Math.min(60,Math.max(24,.12*t.totalPathLength));let x=m,y=x.length>=t.lastLength-20&&x.length-t.lastLength<=80;if(!y){const i=this.getClosestPointOnPath(u,l),e=this.getDistanceSquared(l,i);d>=64&&e<=w&&i.length>=t.lastLength-20&&i.length-t.lastLength<=p&&i.length<t.totalPathLength-v&&(x=i,y=!0)}if(t.isDragging&&y)if(t.lastLength=Math.max(t.lastLength,x.length),t.lastPointerPos=l,(Math.abs(x.x-c.x)>1||Math.abs(x.y-c.y)>1)&&(t.circle.setAttribute("cx",x.x.toString()),t.circle.setAttribute("cy",x.y.toString())),t.circle.parentNode!==t.svg&&(null===(n=t.svg)||void 0===n||n.appendChild(t.circle)),null===(o=u.greenPath)||void 0===o||o.setAttribute("stroke-dashoffset",(t.totalPathLength-t.lastLength).toString()),null!==(r=u._lidoTraceIsClosed)&&void 0!==r&&r&&t.totalPathLength>50){if(t.lastLength/t.totalPathLength>=.95){if(t.isCompletingPath)return;t.isCompletingPath=!0,await this.animatePathToEnd(t,u),t.currentPathIndex<t.paths.length-1?this.moveToNextPath(t):t.currentPathIndex===t.paths.length-1&&this.moveToNextContainer()}}else if(t.totalPathLength-1-t.lastLength<5&&t.currentPathIndex<t.paths.length-1){if(t.isCompletingPath)return;t.isCompletingPath=!0,this.moveToNextPath(t)}else if(t.totalPathLength-1-t.lastLength<5&&t.currentPathIndex===t.paths.length-1){if(t.isCompletingPath)return;t.isCompletingPath=!0,this.moveToNextContainer()}}animatePathToEnd(t,i,e=300){if(!i||!t.svg)return Promise.resolve();if(t._animatingToEnd)return Promise.resolve();t._animatingToEnd=!0;const s=t.lastLength||0,n=i.getTotalLength(),o=performance.now(),r=i.greenPath||i.parentNode&&i.parentNode.querySelector(".lido-trace-path-green");return new Promise((a=>{const h=l=>{const c=Math.min(1,(l-o)/e),d=s+(n-s)*c;t.lastLength=d;const u=i.getPointAtLength(d);if(t.circle&&(t.circle.setAttribute("cx",u.x.toString()),t.circle.setAttribute("cy",u.y.toString())),r&&r.setAttribute("stroke-dashoffset",(t.totalPathLength-d).toString()),c<1)requestAnimationFrame(h);else{if(t.lastLength=n,t.circle){const e=i.getPointAtLength(n);t.circle.setAttribute("cx",e.x.toString()),t.circle.setAttribute("cy",e.y.toString())}r&&r.setAttribute("stroke-dashoffset","0"),t._animatingToEnd=!1,a()}};requestAnimationFrame(h)}))}async moveToNextContainer(){if(this.isDragging=!1,this.moving)return;if(this.moving=!0,this.highlightTextId&&this.highlightLetter(this.currentSvgIndex),this.animationTrace&&await this.playTraceAnimation(),l(!0),this.currentSvgIndex<this.svgUrls.length-1)return await new Promise((t=>setTimeout(t,1e3))),this.currentSvgIndex++,await this.initializeSVG(),document.getElementById("lido-svgContainer").style.visibility="visible",this.moving=!1,void(this.el&&this.onCorrect&&await c(this.onCorrect,this.el));const t=document.querySelector(d),i=t.getAttribute("onCorrect");t&&i&&(await new Promise((t=>setTimeout(t,1e3))),await c(i,this.el)),u(),f()}getPointerPosition(t,i){var e;const s=this.getPointerPositionFromViewBox(t,i);if(s)return s;const n=i.createSVGPoint();n.x=t.clientX,n.y=t.clientY;const o=null===(e=i.getScreenCTM())||void 0===e?void 0:e.inverse();return o?n.matrixTransform(o):{x:t.clientX,y:t.clientY}}getPointerPositionFromViewBox(t,i){const e=i.getBoundingClientRect(),s=i.viewBox.baseVal;if(!(e.width&&e.height&&s.width&&s.height))return null;const{offsetX:n,offsetY:o,scaleX:r,scaleY:a}=this.getSvgViewBoxTransform(i,e);return{x:s.x+(t.clientX-e.left-n)/r,y:s.y+(t.clientY-e.top-o)/a}}getSvgViewBoxTransform(t,i=t.getBoundingClientRect()){const e=t.viewBox.baseVal,s=t.preserveAspectRatio.baseVal,n=i.width/e.width,o=i.height/e.height;if(1===s.align)return{offsetX:0,offsetY:0,scaleX:n,scaleY:o};const r=2===s.meetOrSlice?Math.max(n,o):Math.min(n,o),a=e.width*r,h=e.height*r;let l=0,c=0;const d=s.align;return 3===d||6===d||9===d?l=(i.width-a)/2:4!==d&&7!==d&&10!==d||(l=i.width-a),5===d||6===d||7===d?c=(i.height-h)/2:8!==d&&9!==d&&10!==d||(c=i.height-h),{offsetX:l,offsetY:c,scaleX:r,scaleY:r}}getProximityThresholdForEvent(t,i){const e=t.mode===s.FreeTrace||t.mode===s.BlindFreeTrace?t.freeTraceProximityThreshold:t.proximityThreshold;if("touch"!==(null==i?void 0:i.pointerType)||!t.svg)return e;const n=t.svg.getBoundingClientRect(),o=t.svg.viewBox.baseVal;if(!(n.width&&n.height&&o.width&&o.height))return e;const{scaleX:r,scaleY:a}=this.getSvgViewBoxTransform(t.svg,n),h=44*Math.max(1/r,1/a);return Math.max(e,h)}getDistanceSquared(t,i){const e=t.x-i.x,s=t.y-i.y;return e*e+s*s}getClosestPointOnPath(t,i,e){var s;const n=null!==(s=t._lidoTraceLength)&&void 0!==s?s:t.getTotalLength();let o={x:0,y:0,length:0},r=1/0,a=0,h=n;void 0!==e&&(a=Math.max(0,e-150),h=Math.min(n,e+150));let l={length:a};for(let e=a;e<=h;e+=40){const s=t.getPointAtLength(e),n=this.getDistanceSquared(i,s);n<r&&(r=n,l={x:s.x,y:s.y,length:e})}const c=Math.max(0,l.length-40),d=Math.min(n,l.length+40);r=1/0;for(let e=c;e<=d;e+=6){const s=t.getPointAtLength(e),n=this.getDistanceSquared(i,s);n<r&&(r=n,o={x:s.x,y:s.y,length:e})}return o}async loadAnotherSVG(t,i){t.isDragging=!1;try{t.svg&&this.cleanupPreviousSVG(t);const i=await this.fetchSVG(o(this.svgSource.split(";").map((t=>t.trim()))[this.currentSvgIndex]));this.insertSVG(i),t.svg=this.getSVGElement(),this.mode!==s.BlindTracing&&this.mode!==s.BlindFreeTrace||t.svg.querySelectorAll("image").forEach((t=>{t.style.display="none"})),t.paths=this.getPaths(t.svg),this.setupDrawingPath(t),this.setupDraggableCircle(t),this.addEventListeners(t)}catch(t){console.error(`Error loading SVG (${this.svgSource}):`,t)}}cleanupPreviousSVG(t){var i,e;t.circle&&(null===(i=t.svg)||void 0===i||i.removeChild(t.circle),t.circle=null),(null===(e=t.svg)||void 0===e?void 0:e.querySelectorAll(".lido-flow-indicator")).forEach((t=>{t.remove()})),t.currentPathIndex=0,t.lastLength=0,t.totalPathLength=t.paths[0].getTotalLength(),this.hideFingerHint(),this.resetIdleTimer(t)}async moveToNextPath(t){var i,e;if(t.isDragging=!1,t.currentPathIndex++,t.lastLength=0,t.isCompletingPath=!1,this.hideFingerHint(),t.currentPathIndex>=t.paths.length)return void this.moveToNextContainer();const n=t.paths[t.currentPathIndex];if(!n)return void console.error("No valid path found at the next index");t.totalPathLength=n.getTotalLength();const o=n.getPointAtLength(0);null===(i=t.circle)||void 0===i||i.setAttribute("cx",o.x.toString()),null===(e=t.circle)||void 0===e||e.setAttribute("cy",o.y.toString()),t.mode===s.ShowFlow&&(t.flowMarkers=this.createFlowMarkersForPath(n)),this.resetIdleTimer(t)}async playTraceAnimation(){const t=document.getElementById(this.id);t&&(t.classList.add("trace-animate"),await new Promise((t=>setTimeout(t,500))),t.classList.remove("trace-animate"))}async highlightLetter(t){if(!document.getElementById(d))return;const i=this.el;if(!i)return;const e=this.highlightTextId;if(!e)return;const s=document.getElementById(e);if(!s)return;const n=this.audio;if(!n)return;this.audioUrls=n.split(";").map((t=>t.trim()));const r=s.getAttribute("span-type");if(!r)return;const a=s.querySelector(".lido-text-content");if(a){if("letters"===r){const e=a.querySelectorAll(".text-letters");if(t<0||t>=e.length)return;const n=e[t];if(n){const t=i.querySelector("#lido-svgContainer");if(await c("this.alignMatch='true';",s,t),t.style.animation="trace-animation 0.4s forwards",t.style.setProperty("--trace-width",n.offsetWidth-5+"px"),t.style.setProperty("--trace-height",n.offsetHeight-5+"px"),await c("this.alignMatch='true';",n,t),setTimeout((()=>{n.classList.add("letter-highlight"),t.style.transform="",t.style.animation="",t.style.visibility="hidden"}),500),this.audioUrls[this.currentSvgIndex]){const t=new Audio(o(this.audioUrls[this.currentSvgIndex]));await t.play()}}}if("words"===r){const i=a.querySelectorAll(".text-words");if(t<0||t>=i.length)return;const e=i[t];if(e&&(e.classList.add("word-highlight"),this.audioUrls[this.currentSvgIndex])){const t=new Audio(o(this.audioUrls[this.currentSvgIndex]));await t.play()}}}}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:w(this.height,t),width:w(this.width,t),top:w(this.y,t),left:w(this.x,t),zIndex:this.z}}render(){return g(m,{key:"4955636a199ba56ca7f6d73144aca42ab4e3f411",class:"lido-trace",id:this.id,audio:this.audio,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,tabindex:this.tabIndex,"disable-speak":this.disableSpeak},g("div",{key:"b732946e97fefb0d4cb192e5c9b6863568ff64be",style:this.style,id:"lido-svgContainer"}))}static get assetsDirs(){return["assets"]}get el(){return this}static get watchers(){return{svgSource:[{initializeSVG:0}],mode:[{initializeSVG:0}]}}static get style(){return":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}.lido-trace-svg{width:100%;height:100%;touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#CF1565;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}"}},[0,"lido-trace",{showSpeakIcon:[4,"show-speak-icon"],id:[1],svgSource:[1,"svg-source"],value:[1],height:[1],width:[1],audio:[1],x:[1],y:[1],z:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],tabIndex:[2,"tab-index"],mode:[1],fingerHintUrl:[1,"finger-hint-url"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],highlightTextId:[1,"highlight-text-id"],animationTrace:[4,"animation-trace"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],svgUrls:[32],audioUrls:[32],currentSvgIndex:[32],moving:[32],style:[32],fileIndex:[32],isDragging:[32],activePointerId:[32],idleTimer:[32],fingerImg:[32]},void 0,{svgSource:[{initializeSVG:0}],mode:[{initializeSVG:0}]}]);function v(){"undefined"!=typeof customElements&&["lido-trace"].forEach((i=>{"lido-trace"===i&&(customElements.get(t(i))||customElements.define(t(i),p))}))}v();export{p as L,v as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as i,p as t,H as e,a as s,k as a,i as h,h as n,b as o}from"./index.js";const d=t(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible=!0,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.flipped=!1,this.margin="",this.disableSpeak=!1,this.style={},this.delayVisible="",this.updateStyles=()=>{const i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:s(this.height,i)||"200px",width:s(this.width,i)||"200px",backgroundColor:s(this.bgColor,i),top:s(this.y,i),left:s(this.x,i),zIndex:this.z,display:this.visible?this.display?s(this.display,i):"inline-block":"none",flexDirection:this.direction?s(this.direction,i):void 0,margin:s(this.margin,i)}},this.handleFlip=()=>{this.flipped=!this.flipped}}handleFlippedChange(){}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.updateStyles),window.addEventListener("load",this.updateStyles)}componentDidLoad(){a(this.el,this.delayVisible);const i=this.el.querySelector(".card");i&&setTimeout((()=>{i.classList.add("flipped"),setTimeout((()=>{i.classList.remove("flipped")}),500)}),500),h(this.el,this.type)}disconnectedCallback(){window.removeEventListener("resize",this.updateStyles),window.removeEventListener("load",this.updateStyles)}render(){return n(o,{key:"db8de4cdb5466700ca29fba17e2a5ffb01907559",value:this.value,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,type:this.type,onClick:this.handleFlip,"disable-speak":this.disableSpeak},n("div",{key:"ec3aeff247e581f4aef061b7fea5b752a64804b3",class:"card "+(this.flipped?"flipped":"")},n("div",{key:"cb7ffa64077c89157a0d75720964605eed639363",class:"card-face card-front"},null!=this.front?this.front:n("slot",{name:"front"})),n("div",{key:"537e1b60c82be542b2a8a8426abc4b801865688e",class:"card-face card-back"},null!=this.back?this.back:n("slot",{name:"back"}))))}get el(){return this}static get watchers(){return{flipped:[{handleFlippedChange:0}]}}static get style(){return".card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}"}},[260,"lido-flash-card",{value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],direction:[1],display:[1],front:[8],back:[8],flipped:[1540],margin:[1],disableSpeak:[4,"disable-speak"],delayVisible:[1,"delay-visible"],style:[32]},void 0,{flipped:[{handleFlippedChange:0}]}]);function r(){"undefined"!=typeof customElements&&["lido-flash-card"].forEach((t=>{"lido-flash-card"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}r();export{d as L,r as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as i,H as e,k as s,i as o,u as a,v as l,a as d,h as n,b as h}from"./index.js";const r=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.id="",this.value="",this.z="0",this.tabIndex=0,this.visible=!1,this.onEntry="",this.delayVisible="",this.floatDirection="bottomToTop",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}componentDidLoad(){s(this.el,this.delayVisible),o(this.el,this.type),this.initializeFloatElement()}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}initializeFloatElement(){let t=0;Array.from(this.el.children).forEach((i=>{const e=i;e.style.visibility="hidden",setTimeout((()=>{e.style.visibility="visible",a(e)}),t),t+=1e3,i.addEventListener("click",(()=>{l(e)}))}))}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:"leftToRight"!==this.floatDirection?"100%":d(this.height,t),width:"leftToRight"===this.floatDirection?"100%":d(this.width,t),backgroundColor:d(this.bgColor,t),zIndex:this.z,display:this.visible?"flex":"none"}}render(){return n(h,{key:"c461f1142dd6addd9ceb41ade183b044b875681f",class:"lido-float","float-direction":this.floatDirection,id:this.id,"tab-index":this.tabIndex,style:this.style,onEntry:this.onEntry},n("slot",{key:"240439bfda6a9e4e2d67e6ae2b5c878d99e632b3"}))}get el(){return this}static get style(){return".lido-float{position:relative}.lido-float>*{position:absolute;cursor:pointer}@keyframes float-up{from{top:var(--el-top)}to{top:-500px}}#removeShadow{box-shadow:unset !important}@keyframes float-lr{from{right:var(--el-left)}to{right:-500px}}"}},[260,"lido-float",{id:[1],value:[1],z:[1],tabIndex:[2,"tab-index"],visible:[4],onEntry:[1,"on-entry"],width:[1],height:[1],bgColor:[1,"bg-color"],type:[1],delayVisible:[1,"delay-visible"],floatDirection:[1,"float-direction"],style:[32]}]);function c(){"undefined"!=typeof customElements&&["lido-float"].forEach((i=>{"lido-float"===i&&(customElements.get(t(i))||customElements.define(t(i),r))}))}c();export{r as L,c as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as i,H as s,m as o,h,b as e}from"./index.js";const n=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.minDrops=1,this.maxDrops=1,this.margin=""}componentDidLoad(){setTimeout((()=>{const t=this.el.parentElement;if(!t)return;const i=t.offsetWidth,s=t.offsetHeight;Array.from(this.el.children).forEach((t=>{const o=i-t.offsetWidth,h=s-t.offsetHeight,e=Math.random()*o,n=Math.random()*h;t.style.position="absolute",t.style.left=`${e}px`,t.style.top=`${n}px`}))}),50),this.showSpeakIcon&&o(this.el)}render(){return h(e,{key:"a4cec45d407b57833a4296a20230717534adf39b",class:"lido-random",type:this.type,"tab-index":this.tabIndex,value:this.value,style:{height:this.height,width:this.width,top:this.y,left:this.x,display:this.visible?"block":"none",zIndex:this.z,backgroundColor:this.bgColor,margin:this.margin},"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,minDrops:this.minDrops,maxDrops:this.maxDrops,onInCorrect:this.onInCorrect,onEntry:this.onEntry},h("slot",{key:"b80726b68b7f1c009f35352b9d05cd573159f87b"}))}get el(){return this}static get style(){return".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}"}},[260,"lido-random",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1]}]);function a(){"undefined"!=typeof customElements&&["lido-random"].forEach((i=>{"lido-random"===i&&(customElements.get(t(i))||customElements.define(t(i),n))}))}a();export{n as L,a as d}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const t=()=>{},e="@font-face{font-family:'Baloo Bhai 2';font-style:normal;font-weight:400 800;font-display:swap;src:url('../assets/offline-assets/fonts/Baloo-Bhai-2/Baloo-Bhai-2-Variable.woff2') format('woff2')}body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:rgb(243, 77, 8) 0px 0px 40px !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}.lido-tts-highlight-overlay{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;background:linear-gradient(\r\n 180deg,\r\n rgba(255, 235, 59, 0.95),\r\n rgba(255, 214, 0, 0.95)\r\n );border-radius:6px;box-shadow:0 2px 6px rgba(0, 0, 0, 0.18),\r\n inset 0 -1px 0 rgba(255, 255, 255, 0.25);transition:width 25ms ease-out,\r\n height 25ms ease-out,\r\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height;contain:layout paint style}";function n(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var o,i=(t,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[i]])=>{if(31&i||32&i){const i=t[o],l=n(Object.getPrototypeOf(t),o,!0)||Object.getOwnPropertyDescriptor(t,o);l&&Object.defineProperty(t,o,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),e.i.has(o)?t[o]=e.i.get(o):void 0!==i&&(t[o]=i)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},r=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.l=t,512&e.o.u&&i(t,e))},s=(t,e)=>e in t,a=(t,e)=>(0,console.error)(t,e),c=new Map,u=new Map,f=new Map,d="slot-fb{display:contents}slot-fb[hidden]{display:none}",p="http://www.w3.org/1999/xlink",h="undefined"!=typeof window?window:{},m={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},b=t=>Promise.resolve(t),v=(()=>{try{return!!h.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!v&&(()=>!!h.document&&Object.getOwnPropertyDescriptor(h.document.adoptedStyleSheets,"length").writable)(),g=!1,w=[],x=[],k=()=>{var t;return(null==(t=h.document)?void 0:t.hidden)?O(j):m.raf(j)},$=(t,e)=>n=>{t.push(n),g||(g=!0,e&&4&m.u?O(j):k())},S=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){a(t)}t.length=0},j=()=>{S(w),S(x),(g=w.length>0)&&k()},O=t=>b().then(t),z=$(x,!0),N=t=>{const e=new URL(t,m.p);return e.origin!==h.location.origin?e.href:e.pathname};function C(){var t;const n=this.attachShadow({mode:"open"});if(void 0===o&&(o=null!=(t=function(t){if(!v)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?t:null),o)y?n.adoptedStyleSheets.push(o):n.adoptedStyleSheets=[...n.adoptedStyleSheets,o];else if(!v){const t=document.createElement("style");t.innerHTML=e,n.prepend(t)}}var E=t=>{const e=L(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&M(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!B(t,T(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&L(t,"childNodes").length&&E(t)}};function M(t,e,n){let o,i=0,l=[];for(;i<t.length;i++){if(o=t[i],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||T(o)===n)&&(l.push(o),void 0!==n))return l;l=[...l,...M(L(o,"childNodes"),e,n)]}return l}var B=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let i=t;for(;i=i.nextSibling;)T(i)!==e||!n&&i["s-sr"]||o.push(i);return o},F=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,T=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function L(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}function R(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var P,A,D=new WeakMap,H=t=>"sc-"+t.h,U=t=>"object"==(t=typeof t)||"function"===t,_=(t,e,...n)=>{let o=null,i=null,l=null,r=!1,s=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(r="function"!=typeof t&&!U(o))o+="";else if("function"!=typeof t&&void 0===o.u){a("Invalid vNode child");continue}r&&s?c[c.length-1].m+=o:c.push(r?I(null,o):o),s=r}};if(u(n),e){e.key&&(i=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=I(t,null);return f.v=e,c.length>0&&(f.k=c),f.$=i,f.S=l,f},I=(t,e)=>({u:0,j:t,m:null!=e?e:null,O:null,k:null,v:null,$:null,S:null}),V={},W=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},Y=(t,e)=>null==t||U(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,q=t=>{var e;return null==(e=l(t))?void 0:e.$hostElement$},G=(t,e)=>{const n=q(t);return{emit:t=>Z(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Z=(t,e,n)=>{const o=m.ce(e,n);return t.dispatchEvent(o),o},J=(t,e,n,o,i,r)=>{if(n===o)return;let a=s(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=tt(n);let l=tt(o);e.remove(...i.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!i.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&kt(o,t);else if(a||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=l(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=U(o);if((a||l&&null!==o)&&!i)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const i=null==o?"":o;"list"===e?a=!1:null!=n&&t[e]===i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}let s=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,s=!0),null==o||!1===o?(!1!==o||""===t.getAttribute(e)||4&r&&!Q(e))&&(s?t.removeAttributeNS(p,e):t.removeAttribute(e)):(!a||4&r||i)&&!l&&1===t.nodeType&&(o=!0===o?"":o,s?t.setAttributeNS(p,e,o):t.setAttribute(e,o))}}else if(e="-"===e[2]?e.slice(3):s(h,c)?c.slice(2):c[2]+e.slice(3),n||o){const i=e.endsWith(et);e=e.replace(nt,""),n&&m.rel(t,e,n,i),o&&m.ael(t,e,o,i)}},K=new Set(["draggable","contenteditable","spellcheck"]),Q=t=>K.has(t)||t.startsWith("aria-"),X=/\s/,tt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(X):[]),et="Capture",nt=RegExp(et+"$"),ot=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,i=t&&t.v||{},l=e.v||{};for(const t of it(Object.keys(i)))t in l||J(o,t,i[t],void 0,n,e.u);for(const t of it(Object.keys(l)))J(o,t,i[t],l[t],n,e.u)};function it(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var lt=!1,rt=!1,st=!1,at=!1,ct=[],ut=[],ft=(t,e,n)=>{var o;const i=e.k[n];let l,r,s,a=0;if(lt||(st=!0,"slot"===i.j&&(i.u|=i.k?2:1)),null!=i.m)l=i.O=h.document.createTextNode(i.m);else if(1&i.u)l=i.O=h.document.createTextNode(""),ot(null,i,at);else{if(!h.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=i.O=h.document.createElement(!lt&&2&i.u?"slot-fb":i.j),ot(null,i,at),i.k){const e="template"===i.j?l.content:l;for(a=0;a<i.k.length;++a)r=ft(t,i,a),r&&e.appendChild(r)}}return l["s-hn"]=A,3&i.u&&(l["s-sr"]=!0,l["s-cr"]=P,l["s-sn"]=i.S||"",l["s-rf"]=null==(o=i.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e})(i.childNodes)).forEach((t=>{o===T(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(l),s=t&&t.k&&t.k[n],s&&s.j===i.j&&t.O&&dt(t.O)),l},dt=t=>{m.u|=1;const e=t.closest(A.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&($t(e,t,null!=n?n:null),t["s-sh"]=void 0,st=!0)}m.u&=-2},pt=(t,e)=>{m.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===A&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==A&&o["s-ol"]&&($t(vt(o).parentNode,o,vt(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,st=!0),e&&pt(o,e)}m.u&=-2},ht=(t,e,n,o,i,l)=>{let r,s=t["s-cr"]&&t["s-cr"].parentNode||t;for(s.shadowRoot&&s.tagName===A&&(s=s.shadowRoot),"template"===n.j&&(s=s.content);i<=l;++i)o[i]&&(r=ft(null,n,i),r&&(o[i].O=r,$t(s,r,vt(e))))},mt=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;xt(e),t&&(rt=!0,t["s-ol"]?t["s-ol"].remove():pt(t,!0),t.remove())}}},bt=(t,e,n=!1)=>t.j===e.j&&("slot"===t.j?t.S===e.S:n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),vt=t=>t&&t["s-ol"]||t,yt=(t,e,n=!1)=>{const o=e.O=t.O,i=t.k,l=e.k,r=e.m;let s;null==r?("slot"!==e.j||lt||t.S!==e.S&&(e.O["s-sn"]=e.S||"",dt(e.O.parentElement)),ot(t,e,at),null!==i&&null!==l?((t,e,n,o,i=!1)=>{let l,r,s=0,a=0,c=0,u=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,m=o[0],b=o[h];const v="template"===n.j?t.content:t;for(;s<=f&&a<=h;)if(null==d)d=e[++s];else if(null==p)p=e[--f];else if(null==m)m=o[++a];else if(null==b)b=o[--h];else if(bt(d,m,i))yt(d,m,i),d=e[++s],m=o[++a];else if(bt(p,b,i))yt(p,b,i),p=e[--f],b=o[--h];else if(bt(d,b,i))"slot"!==d.j&&"slot"!==b.j||pt(d.O.parentNode,!1),yt(d,b,i),$t(v,d.O,p.O.nextSibling),d=e[++s],b=o[--h];else if(bt(p,m,i))"slot"!==d.j&&"slot"!==b.j||pt(p.O.parentNode,!1),yt(p,m,i),$t(v,p.O,d.O),p=e[--f],m=o[++a];else{for(c=-1,u=s;u<=f;++u)if(e[u]&&null!==e[u].$&&e[u].$===m.$){c=u;break}c>=0?(r=e[c],r.j!==m.j?l=ft(e&&e[a],n,c):(yt(r,m,i),e[c]=void 0,l=r.O),m=o[++a]):(l=ft(e&&e[a],n,a),m=o[++a]),l&&$t(vt(d.O).parentNode,l,vt(d.O))}s>f?ht(t,null==o[h+1]?null:o[h+1].O,n,o,a,h):a>h&&mt(e,s,f)})(o,i,e,l,n):null!==l?(null!==t.m&&(o.textContent=""),ht(o,null,e,l,0,l.length-1)):!n&&null!==i&&mt(i,0,i.length-1)):(s=o["s-cr"])?s.parentNode.textContent=r:t.m!==r&&(o.data=r)},gt=[],wt=t=>{let e,n,o;const i=t.__childNodes||t.childNodes;for(const t of i){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const i=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==t["s-hn"]&&(!e["s-sh"]||e["s-sh"]!==t["s-hn"]||""!==i&&T(e)===i))if(F(e,i)){let n=gt.find((t=>t.N===e));rt=!0,e["s-sn"]=e["s-sn"]||i,n?(n.N["s-sh"]=t["s-hn"],n.C=t):(e["s-sh"]=t["s-hn"],gt.push({C:t,N:e})),e["s-sr"]&>.map((t=>{F(t.N,e["s-sn"])&&(n=gt.find((t=>t.N===e)),n&&!t.C&&(t.C=n.C))}))}else gt.some((t=>t.N===e))||gt.push({N:e})}1===t.nodeType&&wt(t)}},xt=t=>{t.v&&t.v.ref&&ct.push((()=>t.v.ref(null))),t.k&&t.k.map(xt)},kt=(t,e)=>{ut.push((()=>t(e)))},$t=(t,e,n,o)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:i}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=T(t)||"";return{slotNode:M(L(e,"childNodes"),e.tagName,o)[0],slotName:o}}(e);return i&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(i),e}return(null==t?void 0:t.__insertBefore)?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},St=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},jt=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);St(t,t.B);const n=()=>Ot(t,e);if(!e)return z(n);queueMicrotask((()=>{n()}))},Ot=(t,e)=>{const n=t.$hostElement$,o=t.l;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return e?(t.F&&(t.F=!1,Ft(o,"connectedCallback",void 0,n)),t.T.length&&t.T.forEach((t=>t(n))),i=Ft(o,"componentWillLoad",void 0,n)):i=Ft(o,"componentWillUpdate",void 0,n),i=zt(i,(()=>Ft(o,"componentWillRender",void 0,n))),zt(i,(()=>Ct(t,o,e)))},zt=(t,e)=>Nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ct=async(t,e,n)=>{var o;const i=t.$hostElement$,l=i["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,i=((t,e)=>{var n,o,i;const l=H(e),r=f.get(l);if(!h.document)return l;if(t=11===t.nodeType?t:h.document,r)if("string"==typeof r){let i,s=D.get(t=t.head||t);if(s||D.set(t,s=new Set),!s.has(l)){i=h.document.createElement("style"),i.textContent=r;const a=null!=(n=m.L)?n:R(h.document);if(null!=a&&i.setAttribute("nonce",a),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(v){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),y?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(i)}else t.append(i);1&e.u&&t.insertBefore(i,null),4&e.u&&(i.textContent+=d),s&&s.add(l)}}else{let e=D.get(t);if(e||D.set(t,e=new Set),!e.has(l)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let o;if(r.constructor===n.CSSStyleSheet)o=r;else{o=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)o.insertRule(r.cssRules[t].cssText,t)}y?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(l)}}return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Et(t,e,i,n),l&&(l.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(o=i["s-p"])?o:[],n=()=>Mt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},Et=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var o,i,l,r,s;const a=t.$hostElement$,c=t.o,u=t.R||I(null,null),f=(t=>t&&t.j===V)(e)?e:_(null,null,e);if(A=a.tagName,c.P&&(f.v=f.v||{},c.P.forEach((([t,e])=>{f.v[e]=a[t]}))),n&&f.v)for(const t of Object.keys(f.v))a.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.v[t]=a[t]);if(f.j=null,f.u|=4,t.R=f,f.O=u.O=a.shadowRoot||a,lt=!(!(1&c.u)||128&c.u),P=a["s-cr"],rt=!1,yt(u,f,n),m.u|=1,st){wt(f.O);for(const t of gt){const e=t.N;if(!e["s-ol"]&&h.document){const t=h.document.createTextNode("");t["s-nr"]=e,$t(e.parentNode,e["s-ol"]=t,e,n)}}for(const t of gt){const e=t.N,s=t.C;if(1===e.nodeType&&n&&(e["s-ih"]=null!=(o=e.hidden)&&o),s){const t=s.parentNode;let o=s.nextSibling;if(o&&1===o.nodeType){let n=null==(i=e["s-ol"])?void 0:i.previousSibling;for(;n;){let i=null!=(l=n["s-nr"])?l:null;if(i&&i["s-sn"]===e["s-sn"]&&t===(i.__parentNode||i.parentNode)){for(i=i.nextSibling;i===e||(null==i?void 0:i["s-sr"]);)i=null==i?void 0:i.nextSibling;if(!i||!i["s-nr"]){o=i;break}}n=n.previousSibling}}if((!o&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==o)&&e!==o){if($t(t,e,o,n),8===e.nodeType&&e.nodeValue.startsWith("s-nt-")){const t=h.document.createTextNode(e.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=e["s-hn"],t["s-sn"]=e["s-sn"],t["s-sh"]=e["s-sh"],t["s-sr"]=e["s-sr"],t["s-ol"]=e["s-ol"],t["s-ol"]["s-nr"]=t,$t(e.parentNode,t,e,n),e.parentNode.removeChild(e)}1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(r=e["s-ih"])&&r)}e&&"function"==typeof s["s-rf"]&&s["s-rf"](s)}else 1===e.nodeType&&(e.hidden=!0)}}if(rt&&E(f.O),m.u&=-2,gt.length=0,!lt&&!(1&c.u)&&a["s-cr"]){const t=f.O.__childNodes||f.O.childNodes;for(const e of t)if(e["s-hn"]!==A&&!e["s-sh"])if(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(s=e.hidden)&&s),1===e.nodeType)e.hidden=!0;else if(3===e.nodeType&&e.nodeValue.trim()){const t=h.document.createComment("s-nt-"+e.nodeValue);t["s-sn"]=e["s-sn"],$t(e.parentNode,t,e,n),e.parentNode.removeChild(e)}}P=void 0,ct.forEach((t=>t())),ct.length=0,ut.forEach((t=>t())),ut.length=0})(t,e,o)}catch(e){a(e,t.$hostElement$)}return null},Mt=t=>{const e=t.$hostElement$,n=t.l,o=t.B;Ft(n,"componentDidRender",void 0,e),64&t.u?Ft(n,"componentDidUpdate",void 0,e):(t.u|=64,Tt(e),Ft(n,"componentDidLoad",void 0,e),t.A(e),o||Bt()),t.D(e),t.M&&(t.M(),t.M=void 0),512&t.u&&O((()=>jt(t,!1))),t.u&=-517},Bt=()=>{O((()=>Z(h,"appload",{detail:{namespace:"lido-player"}})))},Ft=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){a(t,o)}},Tt=t=>t.classList.add("hydrated"),Lt=(t,e,n,o)=>{const i=l(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${o.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,s=i.i.get(e),c=i.u,u=i.l;if(n=Y(n,o.t[e][0]),!(8&c&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n))){if(i.i.set(e,n),o.H){const t=o.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&c||1&l)&&(u?u[o](n,s,e):i.T.push((()=>{i.l[o](n,s,e)})))}catch(t){a(t,r)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,s,e)&&!(16&c))return;16&c||jt(i,!1)}}},Rt=(t,e,o)=>{var i,r;const s=t.prototype;{t.watchers&&!e.H&&(e.H=W(t.watchers)),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e._&&(e._=t.serializers);const a=Object.entries(null!=(i=e.t)?i:{});if(a.map((([t,[i]])=>{if(31&i||2&o&&32&i){const{get:r,set:a}=n(s,t)||{};r&&(e.t[t][0]|=2048),a&&(e.t[t][0]|=4096),(1&o||!r)&&Object.defineProperty(s,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>l(this).i.get(e))(0,t);const n=l(this),o=n?n.l:s;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(n){const r=l(this);if(r){if(a)return void 0===(32&i?this[t]:r.$hostElement$[t])&&r.i.get(t)&&(n=r.i.get(t)),a.call(this,Y(n,i)),void Lt(this,t,n=32&i?this[t]:r.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return Lt(this,t,n,e),void(1&o&&!r.l&&r.T.push((()=>{4096&e.t[t][0]&&r.l[t]!==r.i.get(t)&&(r.l[t]=n)})));const l=()=>{const o=r.l[t];!r.i.get(t)&&o&&r.i.set(t,o),r.l[t]=Y(n,i),Lt(this,t,r.l[t],e)};r.l?l():r.T.push((()=>{l()}))}}}})}else 1&o&&64&i&&Object.defineProperty(s,t,{value(...e){var n;const o=l(this);return null==(n=null==o?void 0:o.I)?void 0:n.then((()=>{var n;return null==(n=o.l)?void 0:n[t](...e)}))}})})),1&o){const n=new Map;s.attributeChangedCallback=function(t,o,i){m.jmp((()=>{var r;const c=n.get(t),u=l(this);if(this.hasOwnProperty(c)&&(i=this[c],delete this[c]),s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==i)return;if(null==c){const n=null==u?void 0:u.u;if(u&&n&&!(8&n)&&i!==o){const l=u.l,s=null==(r=e.H)?void 0:r[t];null==s||s.forEach((e=>{const[[r,s]]=Object.entries(e);null!=l[r]&&(128&n||1&s)&&l[r].call(l,i,o,t)}))}return}const f=a.find((([t])=>t===c)),d=f?f[1][0]:0,p=4&d;if(512&d&&8&d&&!U(this[c])&&(t=>null==t||!1===t?null:!0===t?"":t+"")(this[c])===i)return;const h=p&&null===i&&void 0===this[c];p&&(i=null!==i&&"false"!==i);const m=Object.getOwnPropertyDescriptor(s,c);h||i==this[c]||m.get&&!m.set||(this[c]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.H)?r:{}),...a.filter((([t,e])=>31&e[0])).map((([t,o])=>{var i;const l=o[1]||t;return n.set(l,t),512&o[0]&&(null==(i=e.P)||i.push([t,l])),l}))]))}}return t},Pt=async(t,e,n)=>{var o;let i;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,n.V){const l=((t,e)=>{var n;const o=t.h.replace(/-/g,"_"),i=t.V;if(!i)return;const l=c.get(i);if(l)return l[o];const r=null!=(n=u.get(i))?n:0,s=[r>0?"s-retry="+r:"",""].filter(Boolean).join("&");
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
-
return import(`./${i}.entry.js${s?"?"+s:""}`).then((t=>(u.delete(i),c.set(i,t),t[o])),(t=>{u.set(i,r+1),a(t,e.$hostElement$)}))})(n,e);if(l&&"then"in l){const t=()=>{};i=await l,t()}else i=l;if(!i)throw e.u&=-33,e.W=(null!=(o=e.W)?o:0)+1,e.W<3&&(e.u|=1024),Error(`Constructor for "${n.h}#${e.Y}" was not found`);i.isProxied||(n.H=W(i.watchers),n._=i.serializers,n.U=i.deserializers,Rt(i,n,2),i.isProxied=!0);const r=()=>{};e.u|=8;try{new i(e)}catch(e){a(e,t)}e.u&=-9,e.u|=128,r(),4&n.u?e.F=!0:At(e.l,t)}else i=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(i&&i.style){let t;"string"==typeof i.style&&(t=i.style);const e=H(n);if(!f.has(e)){const o=()=>{};((t,e,n)=>{let o=f.get(t);v&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,f.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.B,r=()=>jt(e,!0);l&&l["s-rc"]?l["s-rc"].push(r):r()}catch(n){a(n,t),e.M&&(e.M(),e.M=void 0),!e.A||1024&e.u||e.A(t)}},At=(t,e)=>{Ft(t,"connectedCallback",void 0,e)},Dt=(t,e)=>{Ft(t,"disconnectedCallback",void 0,e||t)},Ht=(t,e={})=>{var n;if(!h.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],i=e.exclude||[],r=h.customElements,s=h.document.head,a=s.querySelector("meta[charset]"),c=h.document.createElement("style"),u=[];let f,p=!0;Object.assign(m,e),m.p=new URL(e.resourcesUrl||"./",h.document.baseURI).href;let b=!1;if(t.map((t=>{t[1].map((e=>{var n,s;const a={u:e[0],h:e[1],t:e[2],q:e[3]};4&a.u&&(b=!0),a.t=e[2],a.P=[],a.H=W(e[4]),a._=null!=(n=e[5])?n:{},a.U=null!=(s=e[6])?s:{};const c=a.h,d=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,i:new Map,G:new Map};n.I=new Promise((t=>n.D=t)),n.Z=new Promise((t=>n.A=t)),t["s-p"]=[],t["s-rc"]=[],n.T=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,a),1&a.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${a.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else C.call(t,a)}connectedCallback(){l(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),p?u.push(this):m.jmp((()=>(t=>{if(!(1&m.u)){const e=l(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.u)(null==e?void 0:e.l)?At(e.l,t):1024&e.u?setTimeout((()=>Pt(t,e,n)),1e3):(null==e?void 0:e.Z)&&e.Z.then((()=>At(e.l,t)));else{e.u|=1,12&n.u&&(t=>{if(!h.document)return;const e=t["s-cr"]=h.document.createComment("");e["s-cn"]=!0,$t(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){St(e,e.B=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),Pt(t,e,n)}o()}})(this))))}disconnectedCallback(){m.jmp((()=>(async t=>{if(!(1&m.u)){const e=l(t);(null==e?void 0:e.l)?Dt(e.l,t):(null==e?void 0:e.Z)&&e.Z.then((()=>Dt(e.l,t)))}D.has(t)&&D.delete(t),t.shadowRoot&&D.has(t.shadowRoot)&&D.delete(t.shadowRoot)})(this))),O((()=>{var t;const e=l(this);if(!e)return;const n=u.findIndex((t=>t===this));n>-1&&u.splice(n,1),(null==(t=null==e?void 0:e.R)?void 0:t.O)instanceof Node&&!e.R.O.isConnected&&delete e.R.O}))}componentOnReady(){var t;return null==(t=l(this))?void 0:t.Z}};a.V=t[0],i.includes(c)||r.get(c)||(o.push(c),r.define(c,Rt(d,a,1)))}))})),o.length>0&&(b&&(c.textContent+=d),c.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=m.L)?n:R(h.document);null!=t&&c.setAttribute("nonce",t),s.insertBefore(c,a?a.nextSibling:s.firstChild)}p=!1,u.length?u.map((t=>t.connectedCallback())):m.jmp((()=>f=setTimeout(Bt,30)))},Ut=t=>m.L=t;export{V as H,q as a,Ht as b,N as c,G as d,t as g,_ as h,b as p,r,Ut as s}
|