mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 09:23:00 +00:00
3 lines
8.0 KiB
JavaScript
3 lines
8.0 KiB
JavaScript
import{s as le,e as w,a as S,y as R,c as E,l as Y,g as j,i as A,q as G,f as g,r as ie,k as ce,z as fe,A as ue,n as K,t as B,b as I,d as $,m as D,B as M,h as y,j as H,C as O,D as _e}from"../chunks/scheduler.CXEVs2ap.js";import{S as he,i as me,t as P,c as T,a as C,g as F,b as pe,d as de,e as ne,f as se,m as oe,h as re}from"../chunks/index.CTdcniaS.js";import{e as q}from"../chunks/each.CypvCfon.js";import{c as ve,A as ae}from"../chunks/Action.tNSJ0eLt.js";import{K as ge}from"../chunks/keymap-codes.DVdCLxHW.js";import{f as J}from"../chunks/index.C1YOBj0U.js";function L(h,e,n){const t=h.slice();return t[16]=e[n],t[18]=n,t}function Q(h,e,n){const t=h.slice();return t[19]=e[n],t}function U(h,e,n){const t=h.slice();return t[19]=e[n],t}function ke(h){let e,n="You don't have any chords";return{c(){e=w("p"),e.textContent=n},l(t){e=E(t,"P",{"data-svelte-h":!0}),Y(e)!=="svelte-16dajim"&&(e.textContent=n)},m(t,a){A(t,e,a)},p:K,i:K,o:K,d(t){t&&g(e)}}}function be(h){let e,n=h[4],t,a,r,f,s,c,o,k,p=Z(h),v=q(h[0][0].actions),l=[];for(let i=0;i<v.length;i+=1)l[i]=x(U(h,v,i));const m=i=>P(l[i],1,1,()=>{l[i]=null});let b=q(h[0]),d=[];for(let i=0;i<b.length;i+=1)d[i]=te(L(h,b,i));const z=i=>P(d[i],1,1,()=>{d[i]=null});return{c(){e=w("div"),p.c(),t=S(),a=w("div");for(let i=0;i<l.length;i+=1)l[i].c();r=S(),f=w("div"),s=B(h[5]),c=S();for(let i=0;i<d.length;i+=1)d[i].c();o=R(),this.h()},l(i){e=E(i,"DIV",{class:!0});var u=I(e);p.l(u),u.forEach(g),t=j(i),a=E(i,"DIV",{class:!0});var _=I(a);for(let V=0;V<l.length;V+=1)l[V].l(_);_.forEach(g),r=j(i),f=E(i,"DIV",{});var N=I(f);s=$(N,h[5]),N.forEach(g),c=j(i);for(let V=0;V<d.length;V+=1)d[V].l(i);o=R(),this.h()},h(){D(e,"class","row svelte-1mjktf5"),D(a,"class","hint"),M(a,"opacity",h[1]>3e3?1:0)},m(i,u){A(i,e,u),p.m(e,null),A(i,t,u),A(i,a,u);for(let _=0;_<l.length;_+=1)l[_]&&l[_].m(a,null);A(i,r,u),A(i,f,u),y(f,s),A(i,c,u);for(let _=0;_<d.length;_+=1)d[_]&&d[_].m(i,u);A(i,o,u),k=!0},p(i,u){if(u&16&&le(n,n=i[4])?(F(),P(p,1,1,K),T(),p=Z(i),p.c(),C(p,1),p.m(e,null)):p.p(i,u),u&1){v=q(i[0][0].actions);let _;for(_=0;_<v.length;_+=1){const N=U(i,v,_);l[_]?(l[_].p(N,u),C(l[_],1)):(l[_]=x(N),l[_].c(),C(l[_],1),l[_].m(a,null))}for(F(),_=v.length;_<l.length;_+=1)m(_);T()}if(u&2&&M(a,"opacity",i[1]>3e3?1:0),(!k||u&32)&&H(s,i[5]),u&1){b=q(i[0]);let _;for(_=0;_<b.length;_+=1){const N=L(i,b,_);d[_]?(d[_].p(N,u),C(d[_],1)):(d[_]=te(N),d[_].c(),C(d[_],1),d[_].m(o.parentNode,o))}for(F(),_=b.length;_<d.length;_+=1)z(_);T()}},i(i){if(!k){C(p);for(let u=0;u<v.length;u+=1)C(l[u]);for(let u=0;u<b.length;u+=1)C(d[u]);k=!0}},o(i){P(p),l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)P(l[u]);d=d.filter(Boolean);for(let u=0;u<d.length;u+=1)P(d[u]);k=!1},d(i){i&&(g(e),g(t),g(a),g(r),g(f),g(c),g(o)),p.d(i),O(l,i),O(d,i)}}}function W(h){let e,n,t="timer",a=`var(--md-sys-color-${h[2][3]?"primary":"error"})`,r,f=h[2][1]+"",s,c,o,k,p=h[2][2]+"",v;return{c(){e=w("span"),n=w("span"),n.textContent=t,r=S(),s=B(f),c=S(),o=w("span"),k=B("sentiment_"),v=B(p),this.h()},l(l){e=E(l,"SPAN",{class:!0});var m=I(e);n=E(m,"SPAN",{class:!0,"data-svelte-h":!0}),Y(n)!=="svelte-lba7dj"&&(n.textContent=t),r=j(m),s=$(m,f),c=j(m),o=E(m,"SPAN",{class:!0});var b=I(o);k=$(b,"sentiment_"),v=$(b,p),b.forEach(g),m.forEach(g),this.h()},h(){D(n,"class","icon"),M(n,"color",a),D(o,"class","icon"),D(e,"class","rating-item svelte-1mjktf5")},m(l,m){A(l,e,m),y(e,n),y(e,r),y(e,s),y(e,c),y(e,o),y(o,k),y(o,v)},p(l,m){m&4&&a!==(a=`var(--md-sys-color-${l[2][3]?"primary":"error"})`)&&M(n,"color",a),m&4&&f!==(f=l[2][1]+"")&&H(s,f),m&4&&p!==(p=l[2][2]+"")&&H(v,p)},d(l){l&&g(e)}}}function X(h){let e,n,t="target",a=`var(--md-sys-color-${h[3][3]?"primary":"error"})`,r,f=h[3][1]+"",s,c,o,k,p=h[3][2]+"",v;return{c(){e=w("span"),n=w("span"),n.textContent=t,r=S(),s=B(f),c=S(),o=w("span"),k=B("sentiment_"),v=B(p),this.h()},l(l){e=E(l,"SPAN",{class:!0});var m=I(e);n=E(m,"SPAN",{class:!0,"data-svelte-h":!0}),Y(n)!=="svelte-s07s57"&&(n.textContent=t),r=j(m),s=$(m,f),c=j(m),o=E(m,"SPAN",{class:!0});var b=I(o);k=$(b,"sentiment_"),v=$(b,p),b.forEach(g),m.forEach(g),this.h()},h(){D(n,"class","icon"),M(n,"color",a),D(o,"class","icon"),D(e,"class","rating-item svelte-1mjktf5")},m(l,m){A(l,e,m),y(e,n),y(e,r),y(e,s),y(e,c),y(e,o),y(o,k),y(o,v)},p(l,m){m&8&&a!==(a=`var(--md-sys-color-${l[3][3]?"primary":"error"})`)&&M(n,"color",a),m&8&&f!==(f=l[3][1]+"")&&H(s,f),m&8&&p!==(p=l[3][2]+"")&&H(v,p)},d(l){l&&g(e)}}}function Z(h){let e,n,t,a,r,f=h[2]&&W(h),s=h[3]&&X(h);return{c(){e=w("div"),f&&f.c(),n=S(),s&&s.c(),this.h()},l(c){e=E(c,"DIV",{class:!0});var o=I(e);f&&f.l(o),n=j(o),s&&s.l(o),o.forEach(g),this.h()},h(){D(e,"class","rating svelte-1mjktf5")},m(c,o){A(c,e,o),f&&f.m(e,null),y(e,n),s&&s.m(e,null),r=!0},p(c,o){c[2]?f?f.p(c,o):(f=W(c),f.c(),f.m(e,n)):f&&(f.d(1),f=null),c[3]?s?s.p(c,o):(s=X(c),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i(c){r||(c&&_e(()=>{r&&(a&&a.end(1),t=pe(e,J,{duration:300,x:-48}),t.start())}),r=!0)},o(c){t&&t.invalidate(),c&&(a=de(e,J,{duration:1e3,x:128})),r=!1},d(c){c&&g(e),f&&f.d(),s&&s.d(),c&&a&&a.end()}}}function x(h){let e,n;return e=new ae({props:{action:h[19],display:"keys"}}),{c(){ne(e.$$.fragment)},l(t){se(e.$$.fragment,t)},m(t,a){oe(e,t,a),n=!0},p(t,a){const r={};a&1&&(r.action=t[19]),e.$set(r)},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){P(e.$$.fragment,t),n=!1},d(t){re(e,t)}}}function ee(h){let e,n;return e=new ae({props:{action:h[19]}}),{c(){ne(e.$$.fragment)},l(t){se(e.$$.fragment,t)},m(t,a){oe(e,t,a),n=!0},p(t,a){const r={};a&1&&(r.action=t[19]),e.$set(r)},i(t){n||(C(e.$$.fragment,t),n=!0)},o(t){P(e.$$.fragment,t),n=!1},d(t){re(e,t)}}}function te(h){let e,n,t,a=q(h[16].phrase),r=[];for(let s=0;s<a.length;s+=1)r[s]=ee(Q(h,a,s));const f=s=>P(r[s],1,1,()=>{r[s]=null});return{c(){e=w("div");for(let s=0;s<r.length;s+=1)r[s].c();n=S(),this.h()},l(s){e=E(s,"DIV",{class:!0});var c=I(e);for(let o=0;o<r.length;o+=1)r[o].l(c);n=j(c),c.forEach(g),this.h()},h(){D(e,"class","words"),M(e,"opacity",1-h[18]/h[0].length)},m(s,c){A(s,e,c);for(let o=0;o<r.length;o+=1)r[o]&&r[o].m(e,null);y(e,n),t=!0},p(s,c){if(c&1){a=q(s[16].phrase);let o;for(o=0;o<a.length;o+=1){const k=Q(s,a,o);r[o]?(r[o].p(k,c),C(r[o],1)):(r[o]=ee(k),r[o].c(),C(r[o],1),r[o].m(e,n))}for(F(),o=a.length;o<r.length;o+=1)f(o);T()}c&1&&M(e,"opacity",1-s[18]/s[0].length)},i(s){if(!t){for(let c=0;c<a.length;c+=1)C(r[c]);t=!0}},o(s){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)P(r[c]);t=!1},d(s){s&&g(e),O(r,s)}}}function ye(h){let e,n="Vocabulary Trainer",t,a,r,f,s,c,o;const k=[be,ke],p=[];function v(l,m){return l[0][0]?0:1}return a=v(h),r=p[a]=k[a](h),{c(){e=w("h1"),e.textContent=n,t=S(),r.c(),f=R()},l(l){e=E(l,"H1",{"data-svelte-h":!0}),Y(e)!=="svelte-1lpf2cx"&&(e.textContent=n),t=j(l),r.l(l),f=R()},m(l,m){A(l,e,m),A(l,t,m),p[a].m(l,m),A(l,f,m),s=!0,c||(o=[G(window,"keydown",h[6]),G(window,"keypress",h[7])],c=!0)},p(l,[m]){let b=a;a=v(l),a===b?p[a].p(l,m):(F(),P(p[b],1,1,()=>{p[b]=null}),T(),r=p[a],r?r.p(l,m):(r=p[a]=k[a](l),r.c()),C(r,1),r.m(f.parentNode,f))},i(l){s||(C(r),s=!0)},o(l){P(r),s=!1},d(l){l&&(g(e),g(t),g(f)),p[a].d(l),c=!1,ie(o)}}}function Ce(h,e,n){let t;ce(h,ve,u=>n(12,t=u));const a=[[400,"+100","excited",!0],[700,"+50","satisfied",!0],[1400,"+25","neutral",!0],[3e3,"0","dissatisfied",!1],[1/0,"-50","sad",!1]],r=[[2,"+100","calm",!0],[3,"+50","content",!1],[5,"+25","stressed",!1],[7,"0","frustrated",!1],[14,"-25","very_dissatisfied",!1],[1/0,"-50","extremely_dissatisfied",!1]];let f=[],s,c,o=0,k,p,v=0,l=0,m="";fe(()=>{b()});function b(){c===void 0&&(c=performance.now(),n(1,o=0),l=0,n(5,m=""),f.length===0?n(0,f=Array.from({length:5},()=>t[Math.floor(Math.random()*t.length)])):(f.shift(),f.push(t[Math.floor(Math.random()*t.length)]),n(0,f))),m===f[0].phrase.map(u=>u===32?" ":ge.get(u).id).join("")+" "?(c=void 0,n(2,k=a.find(([u])=>o<=u)),n(3,p=r.find(([u])=>l<=u)),n(4,v++,v)):n(1,o=performance.now()-c),s=requestAnimationFrame(b)}let d=0;function z(u){u.code==="Backspace"&&n(5,m=m.slice(0,-1))}function i(u){const _=performance.now();_-d>50&&l++,d=_,n(5,m+=u.key)}return ue(()=>{s&&cancelAnimationFrame(s)}),[f,o,k,p,v,m,z,i]}class De extends he{constructor(e){super(),me(this,e,Ce,ye,le,{})}}export{De as component};
|
|
//# sourceMappingURL=12.4qmTQT-Y.js.map
|