1"use strict";(self.webpackChunkvokabeldojo=self.webpackChunkvokabeldojo||[]).push([[985],{5985:(y,l,o)=>{o.r(l),o.d(l,{DictionaryComponent:()=>b});var c=o(6720),h=o(5182),g=o(1126),a=o(2508),u=o(823),p=o(3298),m=o(266),_=o(3918),C=o(9425),d=o(4666),t=o(9676),O=o(7341),M=o(5352);function P(e,s){if(1&e){const n=t.EpF();t.ynx(0),t.TgZ(1,"app-word-list",8),t.NdJ("selectedCard",function(i){t.CHM(n);const D=t.oxw();return t.KtG(D.editCard(i))}),t.qZA(),t.BQk()}if(2&e){const n=t.oxw();t.xp6(1),t.Q6J("cards",n.results)}}function x(e,s){1&e&&(t.TgZ(0,"p",9),t._uU(1," Starte eine Suche indem du etwas oben eingibst. "),t.qZA())}const f=function(){return{modal:null}},E=function(e){return{outlets:e}},v=function(e){return["",e]};let b=(()=>{class e{constructor(n,r,i){this.router=n,this.auth=r,this.cardService=i,this.flyInOutTrigger="in",this.results=[],this.searchForm=new a.NI(""),this.cards=[]}ngOnInit(){this.userSub=this.auth.user.subscribe(n=>{this.user=n}),this.cardSub=this.cardService.allPublicCards().subscribe(n=>{this.cards=n.map(r=>g.Z.createFromCardInterface(r))}),this.searchFormSub=this.searchForm.valueChanges.pipe((0,u.b)(300),(0,p.x)((n,r)=>n===r)).subscribe(()=>{this.updateFilter()})}ngOnDestroy(){this.searchFormSub?.unsubscribe(),this.cardSub?.unsubscribe()}updateFilter(){if(this.searchForm.value){const n=new m.Z(this.cards,["german","japanese","examples.german","examples.japanese","examples.reading","japanese_readings","chinese_readings"],{caseSensitive:!1});this.results=n.search(this.searchForm.value)}else this.results=[]}editCard(n){this.auth.user.subscribe(r=>{this.router.navigate([{outlets:{modal:["card",n.uid]}}])})}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(c.F0),t.Y36(O.e),t.Y36(M.J))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-dictionary"]],hostVars:1,hostBindings:function(n,r){2&n&&t.d8E("@flyInOutTrigger",r.flyInOutTrigger)},standalone:!0,features:[t.jDz],decls:9,vars:9,consts:[[1,"action-shortcuts"],[3,"routerLink"],["name","x"],[1,"content"],[1,"no-print"],["type","search","placeholder","Suche",3,"formControl"],[4,"ngIf","ngIfElse"],["empty",""],[3,"cards","selectedCard"],[1,"align-c"]],template:function(n,r){if(1&n&&(t.TgZ(0,"div",0)(1,"a",1),t._UZ(2,"i-feather",2),t.qZA()(),t.TgZ(3,"div",3)(4,"label",4),t._UZ(5,"input",5),t.qZA(),t.YNc(6,P,2,1,"ng-container",6),t.YNc(7,x,2,0,"ng-template",null,7,t.W1O),t.qZA()),2&n){const i=t.MAs(8);t.xp6(1),t.Q6J("routerLink",t.VKq(7,v,t.VKq(5,E,t.DdM(4,f)))),t.xp6(4),t.Q6J("formControl",r.searchForm),t.xp6(1),t.Q6J("ngIf",r.results.length>0)("ngIfElse",i)}},dependencies:[d.ez,d.O5,c.Bz,c.yS,a.UX,a.Fj,a.JJ,a.oH,_.p,_.u,C.R],styles:["[_nghost-%COMP%]{overflow:auto;overscroll-behavior:contain;position:fixed;height:60%;left:0;right:0;top:50px;margin:auto;width:720px;background-color:var(--show-modal-backg);border-radius:8px;padding:8px;box-shadow:3px 4px 5px #0000004d}@media only screen and (max-width: 736px){[_nghost-%COMP%]{box-shadow:0 0 5px #0000004d;width:calc(100% - 16px);top:auto;top:initial;bottom:0;height:80%;border-bottom-left-radius:0;border-bottom-right-radius:0}}[_nghost-%COMP%] span[_ngcontent-%COMP%]{font-weight:lighter;color:#646464}[_nghost-%COMP%] .japanese[_ngcontent-%COMP%]{text-align:center;font-weight:800;font-size:25px}[_nghost-%COMP%] table[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(even){background-color:#6464641a}[_nghost-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px;border:none}.action-shortcuts[_ngcontent-%COMP%]{z-index:11;position:absolute;top:0;right:20px}.action-shortcuts[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{vertical-align:top;display:inline-block;margin-right:6px;text-decoration:none;color:#fff;background:#002828;padding:5px 8px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;transition:all .2s;box-shadow:2px 2px 2px #24242469}.action-shortcuts[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:last-child{margin-right:0}@media (hover: hover){.action-shortcuts[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{padding-top:8px}}.content[_ngcontent-%COMP%]{padding:0 15px;overflow:auto;overscroll-behavior:contain;height:100%}.content[_ngcontent-%COMP%]::-webkit-scrollbar{width:0!important}"],data:{animation:[h.xK]}}),e})()}}]);
2//# sourceMappingURL=985.553e371bf055ab6b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.