1import{a as w}from"./chunk-QPUVHJIO.js";import{a as z}from"./chunk-ZTPV5Q2V.js";import{a as I,d as k,e as U,f as H,g as O,h as G,l as q,o as Q,z as X}from"./chunk-YTNBM6NL.js";import"./chunk-EWRFUGRC.js";import{I as L,K as $,oa as A}from"./chunk-OVOR3KFK.js";import{$a as m,Ba as s,Db as P,Fb as y,Hc as b,Ja as l,La as N,Lc as R,Yb as C,Za as h,Zb as v,_a as g,ab as n,bb as _,c as T,cb as p,pb as u,tb as f,tc as M}from"./chunk-A7GXEXYS.js";import{a as S}from"./chunk-3MQWISOM.js";var V=(r,o)=>o.key;function F(r,o){if(r&1&&(n(0,"div",13),p(1,"input",15),n(2,"label",16),P(3),_()()),r&2){let a=o.$implicit;s(),m("id",a.key)("formControlName",a.key),s(),m("for",a.key),s(),y(" ",a.name," ");}}var d=[{key:"updates",name:"Software updates"},{key:"connection",name:"Networking / connection issue"},{key:"electrical",name:"Electrical"},{key:"camera",name:"Camera"},{key:"programmingJava",name:"Programming- Java"},{key:"programmingC",name:"Programming- C++"},{key:"programmingLabView",name:"Programming- LabVIEW"},{key:"programmingPython",name:"Programming- Python"},{key:"other",name:"Other technical issue"}],oe=(()=>{let o=class o{constructor(e,t,i,E,c){this.route=e,this.router=t,this.rpcService=i,this.toast=E,this.analytics=c,this.eventKey=this.route.snapshot.paramMap.get("eventKey"),this.teamNumber=this.route.snapshot.paramMap.get("teamNumber"),this.key=this.route.snapshot.queryParamMap.get("key"),this.HELP_TYPES=d,this.inProgress$=new T(!1),this.formGroup=new H(this.getFormControls(),{validators:[x()]});}submit(){if(!this.formGroup.valid)return;this.inProgress$.next(!0);let e="",t={};for(let i of d)this.formGroup.get(i.key).value&&(e&&(e+=` 2`),e+=i.name,t[i.key]=!0);this.rpcService.requestCsa(this.eventKey,"team",this.teamNumber,e,this.key).subscribe({next:()=>{this.router.navigate(["../"],{relativeTo:this.route,queryParamsHandling:"merge"}),this.toast.show("Request submitted");},error:()=>{this.toast.show("Error submitting request, try again later",{color:"danger"}),this.inProgress$.next(!1);}}),$(this.analytics,"team-help-request-submit",S({eventKey:this.eventKey,teamNumber:this.teamNumber},t));}getFormControls(){let e={};for(let t of d)e[t.key]=new O(!1);return e;}};o.ɵfac=function(t){return new(t||o)(l(b),l(R),l(z),l(A),l(L));},o.ɵcmp=N({type:o,selectors:[["nexus-request-help"]],decls:19,vars:5,consts:()=>{let e;e="Request technical help";let t;t="Requests will be sent to event volunteers. For non-technical issues, see pit admin.";let i;i="What do you need help with?";let E;return E="Submit",[e,t,i,E,[3,"teamNumber"],[1,"container",2,"padding-top","80px"],[1,"row","mb-2"],[1,"col","col-fixed"],[1,"card"],[1,"card-body"],[1,"card-title"],[1,"card-text"],[3,"ngSubmit","formGroup"],[1,"form-check"],["type","submit",1,"btn","btn-primary","mt-3",3,"disabled"],["type","checkbox",1,"form-check-input",3,"id","formControlName"],[1,"form-check-label",3,"for"]];},template:function(t,i){t&1&&(p(0,"nexus-team-sub-nav-bar",4),n(1,"div",5)(2,"div",6)(3,"div",7)(4,"div",8)(5,"div",9)(6,"h5",10),u(7,0),_(),n(8,"p",11),u(9,1),_(),n(10,"p",11)(11,"b"),u(12,2),_()(),n(13,"form",12),f("ngSubmit",function(){return i.submit();}),h(14,F,4,4,"div",13,V),n(16,"button",14),C(17,"async"),u(18,3),_()()()()()()()),t&2&&(m("teamNumber",i.teamNumber),s(13),m("formGroup",i.formGroup),s(),g(i.HELP_TYPES),s(2),m("disabled",!i.formGroup.valid||v(17,3,i.inProgress$)));},dependencies:[X,G,I,k,U,q,Q,w,M],encapsulation:2,changeDetection:0});let r=o;return r;})();function x(r=1){return function(a){let e=0;return Object.keys(a.controls).forEach(t=>{a.controls[t].value===!0&&e++;}),e<r?{requireOne:!0}:null;};}export{oe as RequestHelpComponent};/**i18n:8849c35ed7d56eea57e07b59482ab337b8520b0828ef6bfd1761c41b6d989a36*/
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.