1import{Kt as Z,at as Q,y as E}from"./chunk-FNeiiqXF.js";import{v as ao}from"./chunk-oXf9PsZ3.js";import{a as V,n as H,o as X,s as Y}from"./chunk-Xuz4qtXG.js";import{n as U$1}from"./chunk-mePxNM4w.js";import{t as $}from"./chunk-89W33yOm.js";import{E as Wn}from"./main-IfXJUcXE.js";import{a as St,c as jt,i as Pt,n as Ct,s as bt}from"./chunk-Gb-GzH4V.js";var i={state:`none`,col:null,detail:null};var F={moveFeedback:i};var U=V({providedIn:`root`},Y(F),Pt({gamePath:`connect4`}),X(t=>({resetExtraState:()=>{t.resetDrawOfferState(),H(t,F)},setMoveFeedback:r=>H(t,{moveFeedback:r}),clearMoveFeedback:()=>H(t,{moveFeedback:i})})),jt({gamePath:`connect4`,gameLabel:`Connect 4`}),Wn({gamePath:`connect4`,gameLabel:`Connect 4`}),X((t,r=E(ao),h=E(U$1))=>{let x=h.apiUrl,_=e=>bt(e)??`server_rejected`;return{submitMove:$(St({http:r,ctx:t,url:e=>`${x}/connect4/games/${e}/moves`,body:({column:e})=>({column:e}),onStart:({column:e})=>H(t,{isLoading:!0,error:null,moveFeedback:{state:`submitting`,col:e,detail:null}}),onSuccess:({column:e},a,n,w)=>H(t,Z(Q({},n?{gameState:a}:{}),{isLoading:!1,moveFeedback:w?{state:`accepted`,col:e,detail:null}:i})),onError:({column:e},a)=>{let n=Ct(a);H(t,{isLoading:!1,error:n,moveFeedback:{state:_(a),col:e,detail:n}})}}))}}));export{U as t};
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.