PageSourceSearch

https://www.svenskhockey.tv/build/p-ce3cee8b.entry.js

js svenskhockey.tv collected 2026-10-06 19:24:26 UTC 5,295 bytes, 1 lines download raw bytes

1import{r as e,c as t,h as i,a}from"./p-BfiO-GnF.js";import{C as s}from"./p-CnIJ_mi2.js";import{X as o,W as n,i as l}from"./p-DQw3aa6Y.js";import{T as c,M as r}from"./p-D4nQ4C5b.js";import"./p-B3rt3ERk.js";import"./p-B0731Yan.js";import"./p-AuPLCHfl.js";import"./p-C9XQO4Tr.js";import"./p-B_-dwzkt.js";import"./p-1JSYZCwG.js";import"./p-CEkafJrf.js";import"./p-B5yexDit.js";import"./p-CWgfNgqu.js";import"./p-Dwv6KnWp.js";import"./p-vpVk1EJj.js";import"./p-E-ZsRS8r.js";const h=class{constructor(i){e(this,i),this.lineupUpdated=t(this,"lineupUpdated",7),this.hasSelectedPlayers=!1,this.newPlayer={firstName:"",lastName:"",num:0,position:o.MISC}}componentWillLoad(){this.selectedGroup=s.fromGroup(this.currentGroup)}async cancel(){await this.el.closest("ion-modal").dismiss()}async save(){await this.updateLineup(),await this.el.closest("ion-modal").dismiss(this.lineup)}updateLineup(){return n.patchLineup(this.lineup).then((e=>{this.lineup=e}))}createNewPlayer(){return i("ion-accordion-group",null,i("ion-accordion",{value:"newPlayer"},i("ion-item",{slot:"header",color:"light"},i("ion-icon",{slot:"start",name:"person-circle-outline"}),i("ion-label",null,l("COMPETITION_TEAM_PAGE.ADD_NEW_PLAYER_HEADER")," ",this.teamRole.toLowerCase())),i("div",{class:"ion-padding",slot:"content"},i("ion-item",null,i("ion-input",{label:l("COMMON.FIRST_NAME"),labelPlacement:"stacked",value:this.newPlayer.firstName,onIonChange:e=>this.newPlayer.firstName=e.detail.value})),i("ion-item",null,i("ion-input",{label:l("COMMON.LAST_NAME"),labelPlacement:"stacked",value:this.newPlayer.lastName,onIonChange:e=>this.newPlayer.lastName=e.detail.value})),i("ion-item",null,i("ion-input",{label:l("COMMON.NUMBER"),labelPlacement:"stacked",value:this.newPlayer.num,onIonChange:e=>this.newPlayer.num=parseInt(e.detail.value)})),i("ion-item",null,i("ion-select",{label:l("COMPETITION_TEAM_PAGE.POSITION"),labelPlacement:"stacked",value:this.newPlayer.position,onIonChange:e=>this.newPlayer.position=e.detail.value},Object.values(o).map((e=>i("ion-select-option",{value:e},e))))),i("ion-button",{expand:"full",onClick:()=>this.addNewPlayer()},l("COMPETITION_TEAM_PAGE.ADD_TEXT")))))}addNewPlayer(){const e={firstName:this.newPlayer.firstName,lastName:this.newPlayer.lastName,num:this.newPlayer.num,position:this.newPlayer.position};if(this.teamRole===c.COACH)this.lineup.coaches||(this.lineup.coaches=[]),this.lineup.coaches.push(e);else if(this.teamRole===c.GOALIE)this.lineup.goalies||(this.lineup.goalies=[]),this.lineup.goalies.push(e);else if(this.teamRole===c.PLAYER){let t;this.lineup.lines||(this.lineup.lines=[]),t=this.lineup.lines.find(this.lineName?e=>e.name===this.lineName:e=>"LINE_0"===e.name),t||(t={name:this.lineName?this.lineName:"LINE_0",players:[]},this.lineup.lines.push(t)),t.players.push(e)}this.save()}handleSelectedPlayers(e){let t=e;if(this.hasSelectedPlayers=t,this.teamRole===c.COACH)this.lineup.coaches=t;else if(this.teamRole===c.GOALIE)this.lineup.goalies=t;else if(this.teamRole===c.PLAYER){let e;this.lineup.lines||(this.lineup.lines=[]),e=this.lineup.lines.find(this.lineName?e=>e.name===this.lineName:e=>"LINE_0"===e.name),e||(e={name:this.lineName?this.lineName:"LINE_0",players:[]},this.lineup.lines.push(e)),t.forEach((t=>{const i=e.players.findIndex((e=>e.id===t.id));-1!==i?e.players[i]=t:e.players.push(t)}))}}render(){return[i("ion-header",{key:"5c2e299acc71ab9973e130b048ff9c9e138af38f"},i("ion-toolbar",{key:"b7d5312e4c0c047aea7e641e5a77371722675702",color:"primary"},i("ion-icon",{key:"3b291e6f02275ee562737dc8d8990932a86a5a3d",class:"ion-margin-start",size:"large",slot:"start",icon:"people-circle-outline"}),i("ion-title",{key:"c223db7f67bc43f823a527212a26e8943bdb08d9",style:{fontWeight:"bolder"}},l(`COMPETITION_TEAM_PAGE.${this.teamRole}`)),i("ion-buttons",{key:"20e3a4a243c15033d022b08b52bad151ffb4f24b",slot:"end"},i("ion-button",{key:"a47361cf4e97a64af51a34acf137ad5203d92b34",onClick:()=>this.cancel()},i("ion-icon",{key:"4bd4fd73f3bcb5ffcff568b93eebf68f78df7a80",slot:"icon-only",name:"close"}))))),i("ion-content",{key:"e4c0300dd98b485ddcd89ebb541c8f9422b5bc8c"},i("ion-accordion-group",{key:"f1c25183124d0da461c7417bec4435d05da12f24",value:"getPlayer"},i("ion-accordion",{key:"e512228808ef3d98bc4ee3bb180ef6df28c0c526",value:"getPlayer"},i("ion-item",{key:"fbcdcf4225ba97fcb40c68c98c92a28b62bd998d",slot:"header",color:"light"},i("ion-icon",{key:"a3b08c71cdca55bf3097041844b5df0dbe73a2b4",slot:"start",name:"search-outline"}),i("ion-label",{key:"39c715109e769eccb7173766ed88bec6780fdbb0"},l("COMPETITION_TEAM_PAGE.IMPORT_LINEUP_HEADER"))),i("div",{key:"5b32d46a1f261d3999bb725a152a4bb127cf1e09",class:"ion-padding",slot:"content"},i("app-get-player",{key:"bdc97ec9c48806fd5138b78c82feeebc88a0a192",mode:r.MULTI,teamRole:this.teamRole,onPlayersFormComplete:e=>this.handleSelectedPlayers(e.detail),currentAccordionElement:"team-level",selectGroup:!0,selectedGroup:this.selectedGroup,currentLine:this.currentLine,preSelectedPlayerLevel:this.lineup.playerLevel}
1))),this.createNewPlayer())),i("app-modal-footer",{key:"379186076b26a7ee753a86a6e64bf81b43b17c83",cancelText:l("COMMON.BACK"),showSave:this.hasSelectedPlayers,saveText:l("FAVORITE_PERSON_PAGE.ACTIVATE_TEST"),onCancel:()=>this.cancel()})]}get el(){return a(this)}};export{h as competition_team_lineup_modal}

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.