@intent-hq/web 2.332.1 → 2.333.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web/app/immutable/chunks/{Cqn-1YSM.js → -Iq9nlAE.js} +1 -1
- package/web/app/immutable/chunks/{quL6pHxK.js → 31GDMDj9.js} +2 -2
- package/web/app/immutable/chunks/{BA5tpMka.js → 5BpiFfqe.js} +2 -2
- package/web/app/immutable/chunks/{D7VyNuwA.js → 60bkkSrP.js} +1 -1
- package/web/app/immutable/chunks/{C0mowKhJ.js → 9Hyeqhzq.js} +1 -1
- package/web/app/immutable/chunks/{DKDrWyIv.js → B3iZfhYu.js} +1 -1
- package/web/app/immutable/chunks/{Dr8wriKt.js → B4EyOcMP.js} +1 -1
- package/web/app/immutable/chunks/{CKDHxXsq.js → B56Mq91W.js} +1 -1
- package/web/app/immutable/chunks/{Dsnfh8nl.js → B7UFQMCa.js} +1 -1
- package/web/app/immutable/chunks/{DCmZzs_t.js → BB28H67K.js} +1 -1
- package/web/app/immutable/chunks/{CYgZakZC.js → BFjtbKU5.js} +1 -1
- package/web/app/immutable/chunks/{Dz_Si7JX.js → BIAzHfjL.js} +1 -1
- package/web/app/immutable/chunks/{BqzIXvAg.js → BJ8NXEMJ.js} +1 -1
- package/web/app/immutable/chunks/{BwHfUkOf.js → BKzrjZp1.js} +2 -2
- package/web/app/immutable/chunks/{NrjxMz2i.js → BP23sDOE.js} +1 -1
- package/web/app/immutable/chunks/{BL5Rh4Sz.js → BRzkxjZ7.js} +1 -1
- package/web/app/immutable/chunks/{CNf_ONa3.js → BSHExHmB.js} +1 -1
- package/web/app/immutable/chunks/{CHqSpAhM.js → BVV0KdYJ.js} +1 -1
- package/web/app/immutable/chunks/{jyWTS4lZ.js → BVlLHHIh.js} +2 -2
- package/web/app/immutable/chunks/{BaUPC41p.js → BWr9U17b.js} +1 -1
- package/web/app/immutable/chunks/{g2VxMEGm.js → BY6hRbJf.js} +1 -1
- package/web/app/immutable/chunks/{ZiiwkTV-.js → BZ3Ae-4U.js} +1 -1
- package/web/app/immutable/chunks/{DmihuZfS.js → BZCXNg5s.js} +1 -1
- package/web/app/immutable/chunks/{7usnYPNF.js → BaoulGHD.js} +1 -1
- package/web/app/immutable/chunks/{INGceerY.js → BcU-Zn0b.js} +3 -3
- package/web/app/immutable/chunks/{CFF4_0hC.js → BcgRdy5h.js} +1 -1
- package/web/app/immutable/chunks/{D10X859N.js → Bcxw4jL3.js} +1 -1
- package/web/app/immutable/chunks/{C0Tvtwp-.js → BfQcXH7l.js} +1 -1
- package/web/app/immutable/chunks/{BCJxSao_.js → Bfc3D5MS.js} +1 -1
- package/web/app/immutable/chunks/{CI8cTsXC.js → BfzrGa3A.js} +1 -1
- package/web/app/immutable/chunks/{IlWp1nGl.js → BirwNQi3.js} +4 -4
- package/web/app/immutable/chunks/{CdgAiqh6.js → Bk0QUQDW.js} +1 -1
- package/web/app/immutable/chunks/{BKjGGpm1.js → BkUS-e35.js} +4 -4
- package/web/app/immutable/chunks/{EnAyz2Ek.js → BlMN_W9c.js} +1 -1
- package/web/app/immutable/chunks/{BRc8KqQS.js → BqgLlXte.js} +1 -1
- package/web/app/immutable/chunks/{hgJz-lxL.js → BrgKUa-G.js} +1 -1
- package/web/app/immutable/chunks/{BwEg66U_.js → BsXH6ASx.js} +1 -1
- package/web/app/immutable/chunks/{Qj93naoS.js → BtQGF6MG.js} +1 -1
- package/web/app/immutable/chunks/{ClRyDWdo.js → C-hzwobp.js} +1 -1
- package/web/app/immutable/chunks/{Dl-ybQ3z.js → C0l2XLvP.js} +1 -1
- package/web/app/immutable/chunks/{-vn0_Dx_.js → C2q2h8LC.js} +1 -1
- package/web/app/immutable/chunks/{phDOGC4e.js → C4YSpHI_.js} +1 -1
- package/web/app/immutable/chunks/{Jr_-MnLx.js → C66LITAl.js} +1 -1
- package/web/app/immutable/chunks/C7ZRfZC1.js +2 -0
- package/web/app/immutable/chunks/{CY6Ad305.js → C7r-OuIg.js} +1 -1
- package/web/app/immutable/chunks/{CpxAEr5T.js → C8Ewc55B.js} +1 -1
- package/web/app/immutable/chunks/{ShdiMoFn.js → C8XfwzHP.js} +1 -1
- package/web/app/immutable/chunks/{BB1bdkKj.js → C92p6Xk1.js} +1 -1
- package/web/app/immutable/chunks/{CqCOQpit.js → CE3cTmuW.js} +1 -1
- package/web/app/immutable/chunks/{La4DuXBq.js → CFp19SMm.js} +1 -1
- package/web/app/immutable/chunks/{B4CT3ZnO.js → CH58YVSk.js} +1 -1
- package/web/app/immutable/chunks/{GLVkpxmO.js → CHjnK8eD.js} +1 -1
- package/web/app/immutable/chunks/{B9Yp_9YB.js → CJqmLHCx.js} +1 -1
- package/web/app/immutable/chunks/{eO-TU1Uq.js → CNKDyXfa.js} +2 -2
- package/web/app/immutable/chunks/{CYBP2kAe.js → COKOIhyC.js} +1 -1
- package/web/app/immutable/chunks/{zVHvgElF.js → COZF9anf.js} +1 -1
- package/web/app/immutable/chunks/{D-0JsOoD.js → CPYy7Bl8.js} +1 -1
- package/web/app/immutable/chunks/{BL_9_s5D.js → CVuCQwR4.js} +1 -1
- package/web/app/immutable/chunks/{BWcK5t6w.js → C_1dnC1X.js} +1 -1
- package/web/app/immutable/chunks/{CCXE6oHN.js → Cd6dNiWt.js} +1 -1
- package/web/app/immutable/chunks/{DEL8D3D_.js → CdxfWnwV.js} +1 -1
- package/web/app/immutable/chunks/{IqoI0Sop.js → Ce-iGpTr.js} +1 -1
- package/web/app/immutable/chunks/{rExovR4J.js → Ce6vcV0f.js} +1 -1
- package/web/app/immutable/chunks/{BLMF5IFF.js → Cf8id2rO.js} +1 -1
- package/web/app/immutable/chunks/{uc0NJTBD.js → CkyjResP.js} +1 -1
- package/web/app/immutable/chunks/{C7eDW7UL.js → ClAv9h9H.js} +1 -1
- package/web/app/immutable/chunks/{CA4-dLAB.js → ClouAezj.js} +3 -3
- package/web/app/immutable/chunks/{u6FKwXpA.js → CnivRSyI.js} +1 -1
- package/web/app/immutable/chunks/{VIhYvpCH.js → Coc7Z84W.js} +1 -1
- package/web/app/immutable/chunks/{wF4KE5sw.js → Coh-8FDf.js} +1 -1
- package/web/app/immutable/chunks/{CLMPxb4p.js → Cpr9mNUv.js} +1 -1
- package/web/app/immutable/chunks/{DO_AuT0X.js → Cr3SSyqj.js} +2 -2
- package/web/app/immutable/chunks/{DxhV3A5f.js → CwOQgsIB.js} +1 -1
- package/web/app/immutable/chunks/{DTmn8xTR.js → D0BCTOi7.js} +3 -3
- package/web/app/immutable/chunks/{o1Ob2Zjf.js → D6H9qMAI.js} +1 -1
- package/web/app/immutable/chunks/{XP2gV3S1.js → D9iOEcKX.js} +1 -1
- package/web/app/immutable/chunks/{dpdLxO6f.js → DBPvj7yj.js} +3 -3
- package/web/app/immutable/chunks/{D3hH9rNi.js → DFIsXmE_.js} +1 -1
- package/web/app/immutable/chunks/{C0y0G1dd.js → DJhmhU0F.js} +3 -3
- package/web/app/immutable/chunks/{RnZH5q_1.js → DJvRJQDF.js} +1 -1
- package/web/app/immutable/chunks/{DsAgoq4e.js → DKShYaIJ.js} +1 -1
- package/web/app/immutable/chunks/{DgyZN5lH.js → DM0_7KAa.js} +2 -2
- package/web/app/immutable/chunks/{Zi02dDqY.js → DNnl-ruw.js} +1 -1
- package/web/app/immutable/chunks/{Df2kEBtG.js → DOW78mrl.js} +1 -1
- package/web/app/immutable/chunks/{C9KtSy8M.js → DPgkHx8Z.js} +1 -1
- package/web/app/immutable/chunks/{DbZHCFkf.js → DR0muAaQ.js} +1 -1
- package/web/app/immutable/chunks/{Cc05Arx_.js → DVUO3Tx5.js} +1 -1
- package/web/app/immutable/chunks/{DJ54sSxs.js → DX3DcnUQ.js} +1 -1
- package/web/app/immutable/chunks/{Pd9lmiP5.js → DXKRxRra.js} +1 -1
- package/web/app/immutable/chunks/{C2aaRYxm.js → DYod7WBg.js} +1 -1
- package/web/app/immutable/chunks/{C1dnD04C.js → DZQgWgP1.js} +12 -12
- package/web/app/immutable/chunks/{DdkKMLjv.js → DeLyGL9g.js} +1 -1
- package/web/app/immutable/chunks/{D0WfEFI8.js → DhuL_LWc.js} +1 -1
- package/web/app/immutable/chunks/{Rni3zXxR.js → DlLRbNZR.js} +1 -1
- package/web/app/immutable/chunks/{DegFSSpo.js → DlMw3wRu.js} +1 -1
- package/web/app/immutable/chunks/{CS_bXQRj.js → Dnnm-5K1.js} +1 -1
- package/web/app/immutable/chunks/{BSQNx4Vk.js → Dogvt2Uo.js} +1 -1
- package/web/app/immutable/chunks/{DytZzUZT.js → DsuM61wf.js} +1 -1
- package/web/app/immutable/chunks/{9yLYut_f.js → DxnpD-Cb.js} +1 -1
- package/web/app/immutable/chunks/{AMuVbvNH.js → DyC0TlBU.js} +1 -1
- package/web/app/immutable/chunks/{BlieKkQ9.js → Dyx0lQpx.js} +1 -1
- package/web/app/immutable/chunks/{MbWbx059.js → Dzei16j2.js} +1 -1
- package/web/app/immutable/chunks/{CH1kO0eh.js → E1eRJOvk.js} +1 -1
- package/web/app/immutable/chunks/{a_UT53Db.js → F7DwQcta.js} +1 -1
- package/web/app/immutable/chunks/{BaodgUOU.js → K9qmyacm.js} +1 -1
- package/web/app/immutable/chunks/{Ci37X5fE.js → LD1u5ntr.js} +2 -2
- package/web/app/immutable/chunks/{L4diC29H.js → LTdieHUf.js} +4 -4
- package/web/app/immutable/chunks/{CInI0Sus.js → LU9o-VsR.js} +1 -1
- package/web/app/immutable/chunks/{DDNd0tnm.js → NmEpUrvw.js} +1 -1
- package/web/app/immutable/chunks/{BeZwt05v.js → QBrdUuj3.js} +1 -1
- package/web/app/immutable/chunks/{BdorRWAe.js → S8lIecOL.js} +1 -1
- package/web/app/immutable/chunks/{DsX0vSiK.js → So805CPS.js} +1 -1
- package/web/app/immutable/chunks/{vEgCNzPn.js → VzU2yQD-.js} +4 -4
- package/web/app/immutable/chunks/{CmtNfm_M.js → WOtBW7MG.js} +1 -1
- package/web/app/immutable/chunks/{FgsGgOBB.js → eE1Ik_Y8.js} +1 -1
- package/web/app/immutable/chunks/{D6dlkp5M.js → m9iBAChf.js} +1 -1
- package/web/app/immutable/chunks/{B6SFcGZ4.js → n9Al_b1R.js} +1 -1
- package/web/app/immutable/chunks/{B2Iig513.js → nISUgxKe.js} +1 -1
- package/web/app/immutable/chunks/{BzOYno2y.js → nfg7gMK0.js} +1 -1
- package/web/app/immutable/chunks/{DB6X5Jmb.js → rKfhSL2S.js} +1 -1
- package/web/app/immutable/chunks/{7ts4wsuO.js → uTT4_LLP.js} +1 -1
- package/web/app/immutable/chunks/{CdKj5L2M.js → yjIqqlQ2.js} +1 -1
- package/web/app/immutable/entry/{app.Btk0VZWt.js → app.BvRxV6R1.js} +2 -2
- package/web/app/immutable/entry/start.BrbYIb0p.js +1 -0
- package/web/app/immutable/nodes/{0.0HFA2uVE.js → 0.DlMK7EKt.js} +1 -1
- package/web/app/immutable/nodes/{1.CZQtUsls.js → 1.Bc43OCNt.js} +1 -1
- package/web/app/immutable/nodes/{10.MP2WoiSH.js → 10.CRW4MxVn.js} +1 -1
- package/web/app/immutable/nodes/{14.C9nz_rbo.js → 14.fcMbdu6Z.js} +1 -1
- package/web/app/immutable/nodes/{17.BIcZRnyp.js → 17.B3dCuKkH.js} +2 -2
- package/web/app/immutable/nodes/{2.B3TiYssM.js → 2.XomcwXea.js} +4 -4
- package/web/app/immutable/nodes/{3.Bi5S8K8Z.js → 3.tV7qLGeC.js} +1 -1
- package/web/app/immutable/nodes/{4.CtEWydTh.js → 4.CLfVtjCR.js} +1 -1
- package/web/app/immutable/nodes/{5.dqwJX5_j.js → 5.DcQbRELp.js} +1 -1
- package/web/app/immutable/nodes/{6.D2iLOyko.js → 6.CS7SDYA7.js} +1 -1
- package/web/app/immutable/nodes/{7.Ca_BtpTz.js → 7.D7iSydzH.js} +1 -1
- package/web/app/immutable/nodes/{8.BhbuK5L7.js → 8.C7yThhga.js} +4 -4
- package/web/app/immutable/nodes/{9.Db1dzGjG.js → 9.Daikd_tE.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/D6WWKWsa.js +0 -2
- package/web/app/immutable/entry/start.atGTcU00.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{U as be,aZ as we,Y as _e,b0 as De,V as Se,a_ as Ce,b as l,X as dt,aW as vt,B as Me,L as U,ay as st,z as Ee,P as Ie,r as $e,bh as Ye}from"./BKjGGpm1.js";import{g as It}from"./BdWqymET.js";import{t as Ae,d as Fe,m as Le,l as Oe,h as We,g as Zt,p as Qt,u as Pe,q as Ve,i as ze,v as Re,x as Ne,w as He,n as Be,e as Kt,j as Jt,k as te,s as ee,a as re}from"./IqoI0Sop.js";function qe(t){return t}var Tt=1,Yt=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function Xe(t){return"translate(0,"+t+")"}function je(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===Yt?"x":"y",W=t===Tt||t===Ft?Ge:Xe;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:je)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===Yt?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Yt?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,Y=o.day,A=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=Y||(G||c?1:at.getDate()),lt=G||at.getFullYear(),X=0;G&&!c||(X=c>0?c-1:at.getMonth());var K,Z=A||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,X,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,X,yt,Z,ot,J,it)):(K=new Date(lt,X,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,Y=2,A=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var X,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((X===null||typeof X>"u")&&(X=lt()),Z=$[K]&&$[K][X]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>Y&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
1
|
+
import{U as be,aZ as we,Y as _e,b0 as De,V as Se,a_ as Ce,b as l,X as dt,aW as vt,B as Me,L as U,ay as st,z as Ee,P as Ie,r as $e,bh as Ye}from"./BkUS-e35.js";import{g as It}from"./BdWqymET.js";import{t as Ae,d as Fe,m as Le,l as Oe,h as We,g as Zt,p as Qt,u as Pe,q as Ve,i as ze,v as Re,x as Ne,w as He,n as Be,e as Kt,j as Jt,k as te,s as ee,a as re}from"./Ce-iGpTr.js";function qe(t){return t}var Tt=1,Yt=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function Xe(t){return"translate(0,"+t+")"}function je(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===Yt?"x":"y",W=t===Tt||t===Ft?Ge:Xe;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:je)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===Yt?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Yt?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,Y=o.day,A=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=Y||(G||c?1:at.getDate()),lt=G||at.getFullYear(),X=0;G&&!c||(X=c>0?c-1:at.getMonth());var K,Z=A||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,X,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,X,yt,Z,ot,J,it)):(K=new Date(lt,X,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,Y=2,A=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var X,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((X===null||typeof X>"u")&&(X=lt()),Z=$[K]&&$[K][X]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>Y&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":$t="Parse error on line "+(G+1)+": Unexpected "+(X==A?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError($t,{text:F.match,token:this.terminals_[X]||X,line:F.yylineno,loc:nt,expected:pt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+X);switch(Z[0]){case 1:m.push(X),C.push(F.yytext),n.push(F.yylloc),m.push(Z[1]),X=null,c=F.yyleng,o=F.yytext,G=F.yylineno,nt=F.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=C[C.length-tt],J._$={first_line:n[n.length-(tt||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(tt||1)].first_column,last_column:n[n.length-1].last_column},at&&(J._$.range=[n[n.length-(tt||1)].range[0],n[n.length-1].range[1]]),ot=this.performAction.apply(J,[o,c,G,q.yy,Z[1],C,n].concat(R)),typeof ot<"u")return ot;tt&&(m=m.slice(0,-1*tt*2),C=C.slice(0,-1*tt),n=n.slice(0,-1*tt)),m.push(this.productions_[Z[1]][0]),C.push(J.$),n.push(J._$),Ut=$[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0},"parse")},T=(function(){var p={EOF:1,parseError:l(function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},"parseError"),setInput:l(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var d=a.length,m=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var ye=Object.defineProperty;var Re=(e,t,r)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Re(e,typeof t!="symbol"?t+"":t,r);import{k as we,N as Ce,T as Pe,d as Ie,l as Oe,w as Te}from"./5BjH__qw.js";import"./DYhIMPy1.js";import{bo as a,_ as Fe}from"./CXgKrD4b.js";import"./BEdXc2Cn.js";import"./CHyKyUzM.js";import"./-svebp9s.js";import{c as K}from"./ChTqQfQN.js";import"./CpMi3Pqw.js";import{Ik as i,tM as Le,ny as y,nx as _,m1 as De,v9 as xe,v7 as te,h8 as Ne,h9 as Be,c as We,HZ as Ve,a4 as Ue,y2 as O,y3 as G,y0 as Ge,y1 as He,bY as qe,bX as je,ca as Ke,c9 as ze,nA as R}from"./DenVKqrV.js";import{cG as $e,cv as Ze,bv as Qe,cj as oe,cL as Xe,cK as Ye,cP as Je,c7 as et,cn as tt,c9 as rt,cE as ce,ax as st,bR as nt,cM as it}from"./HcYBxKPc.js";import{a as at,i as ot}from"./CglC4HOM.js";import{aJ as ct,V as le,bK as lt,m as dt,O as ut,bX as z,g as pt,W as ft,bY as gt,c as ht,aK as mt,bF as $,an as bt,aZ as St,_ as _t,aF as vt,bM as At,Z as kt,X as Et,Y as Mt,bI as yt,w as Rt}from"./Bap15j_Q.js";import{y as wt}from"./BPe3vmZW.js";import{y as I}from"./Brb5mMFP.js";import{i as B}from"./01VYey36.js";import{n as Ct}from"./DgyZN5lH.js";const Pt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:Ce,TOAST_COUNTDOWN_CLASS:Pe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Ie,notify:we,notifyMetadata:Oe,withToastCountdown:Te},Symbol.toStringTag,{value:"Module"})),ks=i.createSelector(e=>$e.select(e)?.capabilities.gitlabCheckout===!0),Es=i.createSelector(e=>e.gitlabAuth.host),Ms=i.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),ys=i.createSelector(e=>Le(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Rs=i.createSelector(e=>e.gitlabAuth.isCancelling),ws=i.createSelector(e=>e.gitlabAuth.cancelOutcome),Cs=i.createSelector(e=>e.gitlabAuth.isConfigured),Ps=i.createSelector(e=>e.gitlabAuth.isAuthenticating),Is=i.createSelector(e=>e.gitlabAuth.deviceFlow),Os=i.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Ts=i.createSelector(e=>e.gitlabAuth.user),Fs=i.createSelector(e=>e.gitlabAuth.error);i.createSelector(e=>e.gitlabAuth.method);const Ls=i.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],de=new Set(["pr-reviewer"]),Ds="developer";function xs(e){return E.find(t=>t.id===e)}const It=i.createSelector(e=>e.githubAuth.mutationRequestId),Ot=i.createSelector(e=>e.githubAuth.callbacksCancelled),Tt=i.createSelector(e=>e.githubAuth.isDisconnecting),ue=i.createSelector(e=>e.githubAuth.isAuthenticated),Ft=i.createSelector(e=>e.githubAuth.statusSettled===!0),Lt=i.createSelector(e=>e.githubAuth.requiresDaemonAuth),Dt=i.createSelector(e=>e.githubAuth.user),xt=i.createSelector(e=>e.githubAuth.isAuthenticating),Nt=i.createSelector(e=>e.githubAuth.deviceFlow),Bt=i.createSelector(e=>e.githubAuth.error),Ns=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ot,selectGitHubAuthDeviceFlow:Nt,selectGitHubAuthError:Bt,selectGitHubAuthIsAuthenticated:ue,selectGitHubAuthIsAuthenticating:xt,selectGitHubAuthIsDisconnecting:Tt,selectGitHubAuthMutationRequestId:It,selectGitHubAuthRequiresDaemonAuth:Lt,selectGitHubAuthStatusSettled:Ft,selectGitHubAuthUser:Dt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Wt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((n,o)=>f(n.provider)===f(s[o].provider)&&n.model===s[o].model&&n.hint===s[o].hint&&f(n.reasoningEffort)===f(s[o].reasoningEffort))}function re(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Wt(e.modelOptions,r.modelOptions):!1}const Bs=i.createSelector(e=>e.specialists.bundledSpecialists),Vt=i.createSelector(e=>e.specialists.fileSpecialists),Ws=i.createSelector(e=>y(Vt.select(e))),Vs=i.createSelector(e=>e.specialists.userOverrides);i.createSelector(e=>e.specialists.overridesLoaded);const Us=i.createSelector(e=>e.specialists.customSpecialistsLoaded),Gs=i.createSelector(e=>e.specialists.fileSpecialistsLoaded),Hs=i.createSelector(e=>e.specialists.bundledSpecialistsLoaded),qs=i.createSelector(e=>e.specialists.specialistsFolderPath),js=i.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});i.createSelector(e=>e.specialists.providerModelOverrides);const W=i.createSelector((e,t)=>!(de.has(t)&&!ue.select(e)));function Ut(e,t){return t?e:e.filter(r=>!de.has(r.id))}function Gt(e,t){return Ut(e,t).filter(r=>!r.hidden)}function Ks(e,t){return Gt(e,t).filter(r=>r.role!=="internal")}const v=i.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,n=new Set,o=[];for(const l of r)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const b=c.has(l.id),N=c.has(p.id);return b&&N?(c.get(l.id)??0)-(c.get(p.id)??0):b&&!N?-1:!b&&N?1:l.name.localeCompare(p.name)}),o}),zs=i.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,n)=>+!r.has(s.id)-+!r.has(n.id)||s.id.localeCompare(n.id)),t[0]}),Ht=i.createSelector((e,t)=>{const r=_(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(n=>n.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const n=E.find(o=>o.id===t);if(n)return{id:n.id,name:n.name,description:n.description,source:"builtin"}}return null}),$s=i.createSelector((e,t)=>Ht.select(e,t)?.name??null),Zs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultModel?n.defaultModel:n.resolvedModel??"":""}),Qs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Xs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Ys=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultBehaviorPrompt:""});function T(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const Js=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&T(t,e.specialists.bundledSpecialists)}return T(t,e.specialists.bundledSpecialists)}),en=i.createSelector((e,t,r)=>r?!!Z.select(e,t,r):!!_(e.specialists.fileSpecialists,t)),tn=i.createSelector((e,t,r)=>{if(r){const o=Z.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:T(t,e.specialists.bundledSpecialists)&&!re(o)}if(!T(t,e.specialists.bundledSpecialists))return!1;const n=_(e.specialists.fileSpecialists,t);return!n||n.source!=="user"?!1:!re(n)}),Z=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return _(e.specialists.fileSpecialists,t)}),rn=i.createSelector((e,t,r)=>{const s=Z.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(n=>n.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(n=>n.id===t)?"Built-in":null}),sn=i.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=_(e.specialists.fileSpecialists,t);if(s)return s.filePath;const n=e.specialists.bundledSpecialists.find(o=>o.id===t);if(n&&"filePath"in n)return n.filePath}),nn=i.createSelector((e,t,r)=>{if(r){const n=v.select(e,r).find(l=>l.id===t),o=n?.codingAgent||n?.resolvedProvider;if(o)return Ze.select(e,o,r);const c=Qe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=_(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:qt.select(e,t)}),qt=i.createSelector((e,t)=>{const s=v.select(e).find(n=>n.id===t);return s?.codingAgent?s.codingAgent:ct.select(e)?le.select(e):""}),an=i.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),on=i.createSelector((e,t)=>e.specialists.creationByContext?.[t]??De),cn=i.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),V=K("Clipboard");async function ln(e){let t;if(at())try{const r=await ot("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,V.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw V.error("Browser clipboard write failed",r,{electronError:t}),r}throw V.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const jt=["connected","disconnected","unreachable","revoked","update-required"],M=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,w=e=>typeof e=="string"&&e.length>0?e:void 0,pe=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Kt(e){if(!M(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>M(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(n=>u(n)):[]}]:[]):[],r=w(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function dn(e){if(!M(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!jt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=M(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Kt(e.capabilities),s=w(e.tcAddress),n=w(e.observedAt),o=w(e.lastConnectedAt),c=xe(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:pe(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...n?{observedAt:n}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function un(e){if(!M(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=w(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:pe(e.runningAgents)}}function pn(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function zt(e){if(!M(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function fn(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=zt(r);if(!s)return null;t.push(s)}return t}function $t(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function P(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Zt={macos:"macOS",linux:"Linux",windows:"Windows"},Qt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function A(e,t){const r=[e&&(Zt[e]??e),t&&(Qt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Xt(e){return e?.placement?.target==="remote"||I(e?.placement?.target)}const Yt=new Set(["running","paused","resuming","pausing","stopping"]);function Jt(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&Yt.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function fe(e,t){if(!e||!Xt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(I(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ne(s?.cloud?.provider??Be(e.placement?.cloudMachineId)),platform:A(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:Jt(e,s)}};const n=A(e.placement?.os,e.placement?.arch)??A(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:n,state:o}}function gn(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:A(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ge(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function hn(e){const t=ge(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function mn(e){if(e.cloud){const r=ge(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function he(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function me(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function er(e,t){const r=e.detail??"",s=me(r),n=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(n&&s?.data.reason==="prepared-checkout")return{updateRequired:n,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=te(s?.data),c=o??(e.code?te({code:e.code}):null);return c?{updateRequired:n,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:n,message:s?.message||r}}function bn(e){if(!I(e?.placement?.target)||!e.placementError||e.status!==We.Error)return null;const t=er(e.placementError,"");return t.cloud?t:null}const tr=["attachments-too-large-for-machine:","node-prompt-too-large:"],rr="remote-agent-unsupported:";function se(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Sn(e){const t=me(e)?.message??e;for(const s of tr){const n=t.indexOf(s);if(n<0)continue;const o=t.slice(n+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:se(Number(c[1])),limit:se(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(rr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function _n(e){return I(e?.placement?.target)&&he(e,fe(e))==="starting"}function vn(e,t){if(!I(e?.placement?.target))return!1;const r=fe(e,t);return r?.cloud?.state==="resuming"&&he(e,r)===null}const h="",H="cloud:";function Q(e){return`${H}${e}`}function D(e){return e?.startsWith(H)&&e.slice(H.length)||null}const An=Q("e2b");function sr(e,t){return e?.find(r=>Q(r.cloudMachineId)===t&&r.unavailableReason===null)}const nr=new Set(["connected","disconnected"]);function ir(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function X(e){return nr.has(e.state)}function ar({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:n=!1}){const o=[n?{id:h,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:h,label:e,platform:A(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=A(c.platform?.os,c.platform?.arch);return X(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:ir(c.state)}})];for(const c of s??[])o.push({id:Q(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function kn(e){return e.find(t=>t.id===h)?.label??""}function En(e,t,r){if(e!==h)return D(e)?void 0:e;if(r)return t.find(s=>s.id!==h&&s.kind!=="cloud"&&!s.disabled)?.id}function or({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(X)||(s??[]).some(n=>n.unavailableReason===null))}function cr(e,t,r){if(!e)return h;if(D(e))return sr(r,e)?e:h;const s=t.find(n=>n.id===e);return s&&X(s)?s.id:h}function Mn(e,{cloudEntries:t=!1,providerOf:r}={}){const s=D(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function yn({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),n=e.find(c=>c.key===t),o=n?s(n):[];if(r){const c=Ve(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(n&&o.length>0)return{providerId:n.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function lr(e,t,r,s){const n=e.map(P),o=n.indexOf(t),c=n.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[b]=p.splice(o,1);return p.splice(l,0,b),p.map($t)}function Rn(e,t,r){const s=e.findIndex(o=>P(o)===t),n=e[s+r];return s<0||!n?null:lr(e,t,P(n),r===-1?"before":"after")}function dr(e,t){if(e===h)return"local";const r=t==="cloud"?D(e):null;return P(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function ne(e,t){const r=new Map(t.map((n,o)=>[P(n),o])),s=n=>r.get(dr(n.id,n.kind))??t.length;return e.map((n,o)=>({option:n,index:o})).sort((n,o)=>s(n.option)-s(o.option)||n.index-o.index).map(({option:n})=>n)}const Y=i.createSelector(e=>wt.select(e)&&e.remoteMachines?.supported===!0),wn=i.createSelector(e=>Y.select(e)&<.select(e)&&!oe.select(e)),be=i.createSelector(e=>Y.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ie=i.createSelector(e=>be.select(e)?e.remoteMachines.order??[]:[]),Cn=i.createSelector(e=>e.remoteMachines.orderSaving!==null),J=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Pn=i.createSelector(e=>e.remoteMachines.localFingerprint),In=i.createSelector(e=>e.remoteMachines.pending),On=i.createSelector(e=>e.remoteMachines.failures),Tn=i.createSelector(e=>e.remoteMachines.executorBackends??[]),ur=i.createSelector((e,t)=>{if(t===Ue)return a.layout_daemonStatus_localConnection_label();const r=_(e.connections.connections,t);return r?dt(r):t}),pr=i.createSelector(e=>ur.select(e,e.connections.windowBackendId)),Fn=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ln=i.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return ut({catalogProfiles:Je.select(e,t),defaultRemoteIncompatibility:Ye.select(e,t),defaultRemoteLaunch:Xe.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Dn=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),Se=i.createSelector(e=>or({remoteMachinesVisible:Y.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:J.select(e),cloud:z(e)}));function fr(e){const t=_(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const gr=i.createSelector(e=>{const t=oe.select(e),r=ar({backendLabel:pr.select(e),backendPlatform:fr(e),machines:J.select(e),cloud:z(e),orchestrator:t});if(!be.select(e))return r;if(!t)return ne(r,ie.select(e));const[s,...n]=r;return[s,...ne(n,ie.select(e))]}),xn=i.createSelector(e=>Se.select(e)?gr.select(e):[]),Nn=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),Bn=i.createSelector((e,t,r)=>Se.select(e)?cr(t,J.select(e),_e(e,r)):h);function _e(e,t){const r=z(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(n=>{if(n.unavailableReason)return n;const o=pt(e,t,s[n.cloudMachineId]??null);return o?{...n,unavailableReason:o}:n})}const Wn=i.createSelector((e,t)=>_e(e,t)),hr=K("WorkspaceValidation");async function Vn(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return mr(s)?Sr(s):_r(s,t,r)}function mr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function br(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const n of r){const o=t.match(n);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const n=s[2].replace(/\.git$/,"");return n?{owner:s[1],repo:n}:null}return null}async function Sr(e){return br(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function _r(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await B("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await B("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await B("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(hr.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Un(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Gn(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Hn(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function qn(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function jn(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const vr=["idle","exited"];function Ar(e){return e===void 0||!vr.includes(e)}function Kn(e){return e.status==="restarting"?"restarting":Ar(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function kr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const zn=i.createSelector(e=>e.voiceSettings.isLoading),$n=i.createSelector(e=>e.voiceSettings.available),Zn=i.createSelector(e=>e.voiceSettings.provider),Qn=i.createSelector(e=>e.voiceSettings.engine),Xn=i.createSelector(e=>e.voiceSettings.osEngineAvailable),Yn=i.createSelector(e=>e.voiceSettings.keyConfigured),Jn=i.createSelector(e=>e.voiceSettings.vocabulary),ei=i.createSelector(e=>e.voiceSettings.openaiModel),ti=i.createSelector(e=>e.voiceSettings.language),ri=i.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),si=i.createSelector(e=>e.voiceSettings.inputDeviceId),ni=i.createSelector(e=>e.voiceSettings.inputDevices),ii=i.createSelector(e=>e.voiceSettings.busyProvider),ai=i.createSelector(e=>e.voiceSettings.error),oi=i.createSelector(e=>et.select(e)?"unavailable":kr(e.voiceSettings)),q="intent.voice.inputDevice";let j;function Er(){if(j!==void 0)return j;try{const e=localStorage.getItem(q);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ci(e){j=e;try{e===null?localStorage.removeItem(q):localStorage.setItem(q,e)}catch{}}let F=null;function li(e){F=e}function di(){const e=F;return F=null,e}function Mr(){F=null}const yr=300,Rr=300;class wr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??yr,this.doublePressWindowMs=t.doublePressWindowMs??Rr,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let L=null;function ui(e){L=e}function pi(){const e=L;return L=null,e}function Cr(){L=null}const Pr=12e4,Ir=["audio/webm;codecs=opus","audio/webm"];function fi(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Or(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Tr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ir.find(e=>MediaRecorder.isTypeSupported(e))}class Fr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Pr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Or(this.deviceId))}catch(n){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(n),o?"discarded":"error"}if(this.discardRequested){for(const n of t.getTracks())n.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Tr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=n=>this.handleRecorderError(n),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,n=this.cancelRequested;this.teardown(),!n&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Lr=300;function Dr(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const xr={stopReason:"manual",autoSend:!1};let g=null,S=null,k=0,C=null;const x=new wr({onRecordStart:()=>{C&&Nr(C)},onRecordStop:e=>{ve(C,e)}});function gi(){return g!==null}function hi(){return g}function mi(e){C=e,k+=1,k===1&&x.keyDown()}function bi(e){C=e,k!==0&&(k-=1,k===0&&x.keyUp())}function Nr(e){if(g!==null)return;Cr(),Mr();const t=new Fr({deviceId:Er(),onFinished:r=>{g===t&&(g=null);const s=S??{stopReason:"auto-stop",autoSend:!1},n=S!==null;if(S=null,e.dispatch(O()),n||x.reset(),r.durationMs<Lr){s.autoSend&&e.dispatch(G());return}e.dispatch(Ge({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{g===t&&(g=null),S=null,e.dispatch(O()),e.showHint(Dr(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});g=t,e.dispatch(He()),t.start().then(r=>{if(r!=="recording"&&(g===t&&(g=null),r==="discarded")){const s=S?.autoSend===!0;S=null,e.dispatch(O()),s&&e.dispatch(G())}})}function ve(e,t){const r=g;if(r===null){t.autoSend&&e?.dispatch(G());return}S=t,r.stop()}function Si(){ve(null,xr)}function _i(e){x.reset(),k=0,S=null;const t=g;t!==null&&(g=null,t.cancel(),e.dispatch(O()))}const Br=K("HardwareConsoleVoiceSetupToast"),Wr="hardware-console-voice-setup";let U=null;function Vr(){return U||(U=Fe(()=>Promise.resolve().then(()=>Pt),void 0,import.meta.url).then(e=>e.notify)),U}function Ur(){Ct("/settings?tab=connections#voice").catch(e=>{Br.error("Failed to open voice settings from setup toast",e)})}function Gr(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Ur()}}function vi(){Vr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Wr,action:Gr()})})}const Ai=i.createSelector(e=>e.externalEditors.selectedAction),Hr=i.createSelector(e=>e.externalEditors.editors),qr=i.createSelector(e=>{const t=y(Hr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),n=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...n,...t.filter(({id:c})=>!o.has(c))]}),ki=i.createSelector(e=>e.externalEditors.editorOrder??[]),Ei=i.createSelector(e=>e.externalEditors.loading),Mi=i.createSelector(e=>e.externalEditors.lastFetched),jr=i.createSelector(e=>e.externalEditors.hiddenEditorIds),yi=i.createSelector((e,t)=>{if(!(t?tt.select(e,t):rt.select(e)))return[];const s=jr.select(e);return qr.select(e).filter(n=>n.installed&&!s.includes(n.id))});function Ri(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Kr=0;function zr(e,t){const r=++Kr;return i.dispatch(je(e,t,r)),r}function wi(e,t,r){i.dispatch(qe(e,t,r))}async function Ae(e,t,r,s){const n=crypto.randomUUID(),o=s?.source??"control";try{return(await i.dispatch(Ke({requestId:n,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:ce.select(i.state)},{...s,intent:s?.intent??zr(e,t)}))).status==="success"}finally{i.dispatch(ze(n,o))}}async function Ci(e,t,r,s,n){return Ae(e,t,{kind:"effort",effort:r,previous:s},n)}async function Pi(e,t,r,s,n){return Ae(e,t,{kind:"reconcile",current:r??null,levels:s},n)}const $r=i.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Ii=i.createSelector((e,t)=>$r.select(e,t).some(r=>r.status==="pending")),Oi=i.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],n=st.select(e,t),o=ft.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=gt(c),p=l?ht(s?.model,null,o):s?.model;return{session:s,providerId:n,levels:o,legacy:l,identity:JSON.stringify([p,n]),connection:ce.select(e),canWrite:!!s&&s.workspaceId===r&&!nt.select(e,r)}});function Zr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Ti=i.createSelector(e=>mt.select(e)?null:$.select(e)),Qr=i.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),m=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Fi=i.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Li=i.createSelector((e,t)=>!!m.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Qr.select(e)),ke=i.createSelector((e,t)=>t?m.select(e,t)?.catalog.providers??[]:it.select(e)),Ee=i.createSelector((e,t)=>{if(!t)return le.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),ee=i.createSelector((e,t)=>{if(!t)return bt.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),Me=i.createSelector((e,t)=>{if(!t)return St.select(e);const r=ee.select(e,t),s=Ee.select(e,t),n=m.select(e,t)?.readiness??{};return ke.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&n[o.id]?.available).map(o=>o.id)}),Di=i.createSelector((e,t)=>{const r=ee.select(e,t),s=t?m.select(e,t)?.readiness??{}:$.select(e);return ke.select(e,t).filter(n=>Zr(n.id,s[n.id]?.available,r[n.id]===!0)).map(n=>n.id)}),xi=i.createSelector((e,t)=>t?Me.select(e,t):_t.select(e)),Ni=i.createSelector((e,t)=>v.select(e,t)),Bi=i.createSelector((e,t)=>t?!!m.select(e,t):vt.select(e)),Wi=i.createSelector((e,t)=>{if(!t)return At.select(e);const r=m.select(e,t)?.settings??[],s=Ee.select(e,t),n=r.find(l=>l.path==="model.providerDefaults")?.value,o=n&&typeof n=="object"?n[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Vi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):kt.select(e)),Ui=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Et.select(e)),Gi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):Mt.select(e)),Hi=i.createSelector((e,t,r)=>{if(!r)return yt.select(e,t);const s=ee.select(e,r),n=m.select(e,r);return Me.select(e,r).filter(o=>o!==t&&(s[o]||n?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Rt(o,n?.readiness[o]?.authenticated))}),qi=i.createSelector((e,t)=>t?m.select(e,t)?.readiness??{}:$.select(e)),Xr={},ji=i.createSelector(e=>e.providerSettings?.profiles?.status??Xr),Ki=i.createSelector(e=>e.directoryPicker.listing),zi=i.createSelector(e=>e.directoryPicker.loading),$i=i.createSelector(e=>e.directoryPicker.error),Zi=i.createSelector(e=>e.directoryPicker.pathError),Qi=i.createSelector(e=>e.directoryPicker.createError),ae={},Yr=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Xi=i.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(n=>n.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Yi=i.createSelector(e=>e.mcpSettings.loading),Ji=i.createSelector(e=>e.mcpSettings.error),ea=i.createSelector(e=>e.mcpSettings.mutationError??null),ta=i.createSelector(e=>e.mcpSettings.enabled),Jr=i.createSelector(e=>e.mcpSettings.disabledServers),es=i.createSelector(e=>e.mcpSettings.statusMap),ts=i.createSelector(e=>e.mcpSettings.toolsMap),rs=i.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(n=>[n.id,R(n)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(n=>{const o=s.get(n.serverId);return o&&n.lastError?[[o,n.lastError]]:[]}))}),ss=i.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??ae:ae),ra=i.createSelector((e,t)=>Object.keys(ss.select(e,t))),sa=i.createSelector(e=>{const t=Yr.select(e),r=es.select(e),s=ts.select(e),n=Jr.select(e),o=rs.select(e);return t.map(c=>{const l=R(c)in n,p=s[R(c)]||[];let b=r[R(c)]||"disconnected";return l&&(b="disabled"),{...c,disabled:l,status:b,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});i.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const na=i.createSelector(e=>e.mcpSettings.lastImportedCount),ia=i.createSelector(e=>e.mcpSettings.advancedSaveStatus),aa=i.createSelector(e=>e.mcpSettings.advancedSaveError),oa=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],ns=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],ca=Object.fromEntries(ns.map(e=>[e.path,e.defaultValue]));export{wi as $,mi as A,bi as B,Pt as C,Ds as D,Mn as E,ns as F,de as G,Ar as H,Zr as I,gi as J,Ri as K,re as L,fi as M,Er as N,gn as O,yn as P,P as Q,A as R,E as S,zr as T,lr as U,un as V,br as W,fn as X,dn as Y,er as Z,Pi as _,ca as a,Cs as a$,Sn as a0,kr as a1,cr as a2,Gn as a3,ci as a4,Ii as a5,$r as a6,Oi as a7,Bs as a8,Hs as a9,nn as aA,Zs as aB,Bn as aC,oi as aD,Tn as aE,Qs as aF,Xs as aG,Ws as aH,Gs as aI,Z as aJ,Ot as aK,Nt as aL,Bt as aM,ue as aN,xt as aO,Tt as aP,It as aQ,Lt as aR,Dt as aS,ws as aT,Is as aU,Os as aV,Fs as aW,Es as aX,ys as aY,Ps as aZ,Rs as a_,ur as aa,xi as ab,Ee as ac,ee as ad,Di as ae,Me as af,ke as ag,Ui as ah,Gi as ai,Vi as aj,Hi as ak,qi as al,Bi as am,Wi as an,Ni as ao,pr as ap,Us as aq,Dn as ar,js as as,Qi as at,$i as au,Ki as av,zi as aw,Zi as ax,ki as ay,Ys as az,oa as b,Zn as b$,Ms as b0,Ts as b1,ks as b2,Ls as b3,tn as b4,jr as b5,Nn as b6,qr as b7,yi as b8,Ei as b9,J as bA,Y as bB,Ln as bC,wn as bD,Ti as bE,Ht as bF,on as bG,cn as bH,sn as bI,an as bJ,$s as bK,rn as bL,v as bM,qs as bN,Wn as bO,xn as bP,gr as bQ,Se as bR,Vs as bS,ii as bT,Qn as bU,si as bV,ni as bW,Yn as bX,ti as bY,ei as bZ,Xn as b_,Js as ba,en as bb,Mi as bc,Pn as bd,ie as be,Cn as bf,be as bg,aa as bh,ia as bi,Jr as bj,ta as bk,Ji as bl,rs as bm,na as bn,Yi as bo,ea as bp,Yr as bq,sa as br,es as bs,ts as bt,Ai as bu,zs as bv,ji as bw,Fn as bx,On as by,In as bz,h as c,$n as c0,ai as c1,zn as c2,Jn as c3,ri as c4,m as c5,Qr as c6,Li as c7,Fi as c8,ra as c9,Xi as ca,li as cb,ui as cc,vi as cd,kn as ce,Q as cf,D as cg,En as ch,Nr as ci,Rn as cj,Si as ck,Hn as cl,Un as cm,qn as cn,Vn as co,Gr as cp,ln as cq,An as d,bn as e,_n as f,vn as g,hn as h,fe as i,mn as j,he as k,Ci as l,_i as m,Mr as n,Cr as o,di as p,pi as q,Ks as r,Gt as s,Ut as t,pn as u,hi as v,jn as w,Kn as x,xs as y,Ns as z};
|
|
1
|
+
var ye=Object.defineProperty;var Re=(e,t,r)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>Re(e,typeof t!="symbol"?t+"":t,r);import{k as we,N as Ce,T as Pe,d as Ie,l as Oe,w as Te}from"./5BjH__qw.js";import"./DYhIMPy1.js";import{bo as a,_ as Fe}from"./CXgKrD4b.js";import"./BEdXc2Cn.js";import"./CHyKyUzM.js";import"./-svebp9s.js";import{c as K}from"./ChTqQfQN.js";import"./CpMi3Pqw.js";import{Ik as i,tM as Le,ny as y,nx as _,m1 as De,v9 as xe,v7 as te,h8 as Ne,h9 as Be,c as We,HZ as Ve,a4 as Ue,y2 as O,y3 as G,y0 as Ge,y1 as He,bY as qe,bX as je,ca as Ke,c9 as ze,nA as R}from"./DenVKqrV.js";import{cG as $e,cv as Ze,bv as Qe,cj as oe,cL as Xe,cK as Ye,cP as Je,c7 as et,cn as tt,c9 as rt,cE as ce,ax as st,bR as nt,cM as it}from"./HcYBxKPc.js";import{a as at,i as ot}from"./CglC4HOM.js";import{aJ as ct,V as le,bK as lt,m as dt,O as ut,bX as z,g as pt,W as ft,bY as gt,c as ht,aK as mt,bF as $,an as bt,aZ as St,_ as _t,aF as vt,bM as At,Z as kt,X as Et,Y as Mt,bI as yt,w as Rt}from"./Bap15j_Q.js";import{y as wt}from"./BPe3vmZW.js";import{y as I}from"./Brb5mMFP.js";import{i as B}from"./01VYey36.js";import{n as Ct}from"./DM0_7KAa.js";const Pt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:Ce,TOAST_COUNTDOWN_CLASS:Pe,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:Ie,notify:we,notifyMetadata:Oe,withToastCountdown:Te},Symbol.toStringTag,{value:"Module"})),ks=i.createSelector(e=>$e.select(e)?.capabilities.gitlabCheckout===!0),Es=i.createSelector(e=>e.gitlabAuth.host),Ms=i.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),ys=i.createSelector(e=>Le(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Rs=i.createSelector(e=>e.gitlabAuth.isCancelling),ws=i.createSelector(e=>e.gitlabAuth.cancelOutcome),Cs=i.createSelector(e=>e.gitlabAuth.isConfigured),Ps=i.createSelector(e=>e.gitlabAuth.isAuthenticating),Is=i.createSelector(e=>e.gitlabAuth.deviceFlow),Os=i.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Ts=i.createSelector(e=>e.gitlabAuth.user),Fs=i.createSelector(e=>e.gitlabAuth.error);i.createSelector(e=>e.gitlabAuth.method);const Ls=i.createSelector(e=>e.gitlabAuth.statusReady===!0),E=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return a.specialists_builtin_prReviewer_name()},get description(){return a.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return a.specialists_builtin_uiDesigner_name()},get description(){return a.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return a.specialists_builtin_vulnerabilityScanner_name()},get description(){return a.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return a.specialists_builtin_developer_name()},get description(){return a.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return a.specialists_builtin_productManager_name()},get description(){return a.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return a.specialists_builtin_maintenanceCoordinator_name()},get description(){return a.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return a.specialists_builtin_chiefOfStaff_name()},get description(){return a.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],de=new Set(["pr-reviewer"]),Ds="developer";function xs(e){return E.find(t=>t.id===e)}const It=i.createSelector(e=>e.githubAuth.mutationRequestId),Ot=i.createSelector(e=>e.githubAuth.callbacksCancelled),Tt=i.createSelector(e=>e.githubAuth.isDisconnecting),ue=i.createSelector(e=>e.githubAuth.isAuthenticated),Ft=i.createSelector(e=>e.githubAuth.statusSettled===!0),Lt=i.createSelector(e=>e.githubAuth.requiresDaemonAuth),Dt=i.createSelector(e=>e.githubAuth.user),xt=i.createSelector(e=>e.githubAuth.isAuthenticating),Nt=i.createSelector(e=>e.githubAuth.deviceFlow),Bt=i.createSelector(e=>e.githubAuth.error),Ns=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:Ot,selectGitHubAuthDeviceFlow:Nt,selectGitHubAuthError:Bt,selectGitHubAuthIsAuthenticated:ue,selectGitHubAuthIsAuthenticating:xt,selectGitHubAuthIsDisconnecting:Tt,selectGitHubAuthMutationRequestId:It,selectGitHubAuthRequiresDaemonAuth:Lt,selectGitHubAuthStatusSettled:Ft,selectGitHubAuthUser:Dt},Symbol.toStringTag,{value:"Module"}));function f(e){return e??""}function Wt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((n,o)=>f(n.provider)===f(s[o].provider)&&n.model===s[o].model&&n.hint===s[o].hint&&f(n.reasoningEffort)===f(s[o].reasoningEffort))}function re(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?f(e.name)===f(r.name)&&f(e.description)===f(r.description)&&f(e.behaviorPrompt)===f(r.behaviorPrompt)&&f(e.roleReminder)===f(r.roleReminder)&&f(e.reasoningEffort)===f(r.reasoningEffort)&&Wt(e.modelOptions,r.modelOptions):!1}const Bs=i.createSelector(e=>e.specialists.bundledSpecialists),Vt=i.createSelector(e=>e.specialists.fileSpecialists),Ws=i.createSelector(e=>y(Vt.select(e))),Vs=i.createSelector(e=>e.specialists.userOverrides);i.createSelector(e=>e.specialists.overridesLoaded);const Us=i.createSelector(e=>e.specialists.customSpecialistsLoaded),Gs=i.createSelector(e=>e.specialists.fileSpecialistsLoaded),Hs=i.createSelector(e=>e.specialists.bundledSpecialistsLoaded),qs=i.createSelector(e=>e.specialists.specialistsFolderPath),js=i.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});i.createSelector(e=>e.specialists.providerModelOverrides);const W=i.createSelector((e,t)=>!(de.has(t)&&!ue.select(e)));function Ut(e,t){return t?e:e.filter(r=>!de.has(r.id))}function Gt(e,t){return Ut(e,t).filter(r=>!r.hidden)}function Ks(e,t){return Gt(e,t).filter(r=>r.role!=="internal")}const v=i.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(l=>({...l,defaultModel:l.model,defaultBehaviorPrompt:l.behaviorPrompt??l.prompt??"",defaultAgentType:l.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,n=new Set,o=[];for(const l of r)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push({id:l.id,name:l.name,description:l.description,codingAgent:l.codingAgent,defaultModel:l.model||void 0,defaultBehaviorPrompt:l.behaviorPrompt,roleReminder:l.roleReminder,source:l.source,importedFrom:l.importedFrom,unsupportedFields:l.unsupportedFields,requiredSkills:l.requiredSkills,missingSkills:l.missingSkills,hidden:l.hidden,resolvedModel:l.resolvedModel,resolvedProvider:l.resolvedProvider,modelOptions:l.modelOptions,reasoningEffort:l.reasoningEffort,role:l.role,teamAgents:l.teamAgents,icon:l.icon}));for(const l of s)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const l of E)!n.has(l.id)&&W.select(e,l.id)&&(n.add(l.id),o.push(l));const c=new Map;for(const l of E)c.has(l.id)||c.set(l.id,c.size);for(const l of s)c.has(l.id)||c.set(l.id,c.size);return o.sort((l,p)=>{const b=c.has(l.id),N=c.has(p.id);return b&&N?(c.get(l.id)??0)-(c.get(p.id)??0):b&&!N?-1:!b&&N?1:l.name.localeCompare(p.name)}),o}),zs=i.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...E.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,n)=>+!r.has(s.id)-+!r.has(n.id)||s.id.localeCompare(n.id)),t[0]}),Ht=i.createSelector((e,t)=>{const r=_(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(n=>n.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const n=E.find(o=>o.id===t);if(n)return{id:n.id,name:n.name,description:n.description,source:"builtin"}}return null}),$s=i.createSelector((e,t)=>Ht.select(e,t)?.name??null),Zs=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultModel?n.defaultModel:n.resolvedModel??"":""}),Qs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),Xs=i.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),Ys=i.createSelector((e,t,r)=>{const n=v.select(e,r).find(o=>o.id===t);return n?n.defaultBehaviorPrompt:""});function T(e,t){return t.some(r=>r.id===e)||E.some(r=>r.id===e)}const Js=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&T(t,e.specialists.bundledSpecialists)}return T(t,e.specialists.bundledSpecialists)}),en=i.createSelector((e,t,r)=>r?!!Z.select(e,t,r):!!_(e.specialists.fileSpecialists,t)),tn=i.createSelector((e,t,r)=>{if(r){const o=Z.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:T(t,e.specialists.bundledSpecialists)&&!re(o)}if(!T(t,e.specialists.bundledSpecialists))return!1;const n=_(e.specialists.fileSpecialists,t);return!n||n.source!=="user"?!1:!re(n)}),Z=i.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(n=>n.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return _(e.specialists.fileSpecialists,t)}),rn=i.createSelector((e,t,r)=>{const s=Z.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(n=>n.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(n=>n.id===t)?"Built-in":null}),sn=i.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=_(e.specialists.fileSpecialists,t);if(s)return s.filePath;const n=e.specialists.bundledSpecialists.find(o=>o.id===t);if(n&&"filePath"in n)return n.filePath}),nn=i.createSelector((e,t,r)=>{if(r){const n=v.select(e,r).find(l=>l.id===t),o=n?.codingAgent||n?.resolvedProvider;if(o)return Ze.select(e,o,r);const c=Qe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[c]?.available?c:""}const s=_(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:qt.select(e,t)}),qt=i.createSelector((e,t)=>{const s=v.select(e).find(n=>n.id===t);return s?.codingAgent?s.codingAgent:ct.select(e)?le.select(e):""}),an=i.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),on=i.createSelector((e,t)=>e.specialists.creationByContext?.[t]??De),cn=i.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),V=K("Clipboard");async function ln(e){let t;if(at())try{const r=await ot("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,V.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw V.error("Browser clipboard write failed",r,{electronError:t}),r}throw V.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const jt=["connected","disconnected","unreachable","revoked","update-required"],M=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),u=e=>typeof e=="string"&&e.length>0,w=e=>typeof e=="string"&&e.length>0?e:void 0,pe=e=>Number.isSafeInteger(e)&&e>=0?e:0;function Kt(e){if(!M(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(s=>M(s)&&u(s.id)?[{id:s.id,...s.visible===!1?{visible:!1}:{},status:typeof s.status=="string"?s.status:"unknown",models:Array.isArray(s.models)?s.models.filter(n=>u(n)):[]}]:[]):[],r=w(e.intentdVersion);return{...r?{intentdVersion:r}:{},providers:t}}function dn(e){if(!M(e)||!u(e.id)||!u(e.name)||!u(e.fingerprint)||!jt.includes(e.state)||!Number.isInteger(e.port)||!u(e.addedAt))return null;const t=M(e.platform)&&u(e.platform.os)&&u(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,r=Kt(e.capabilities),s=w(e.tcAddress),n=w(e.observedAt),o=w(e.lastConnectedAt),c=xe(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>u(p)):[],port:e.port,...s?{tcAddress:s}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:pe(e.runningAgents),...r?{capabilities:r}:{},...l!==void 0?{nodeProtocol:l}:{},...n?{observedAt:n}:{},addedAt:e.addedAt,...o?{lastConnectedAt:o}:{},...c?{cloud:c}:{}}}function un(e){if(!M(e)||!u(e.credentialId)||!u(e.backendId)||!u(e.backendName)||!u(e.createdAt))return null;const t=w(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:pe(e.runningAgents)}}function pn(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function zt(e){if(!M(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&u(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&u(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function fn(e){if(!Array.isArray(e))return null;const t=[];for(const r of e){const s=zt(r);if(!s)return null;t.push(s)}return t}function $t(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function P(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const Zt={macos:"macOS",linux:"Linux",windows:"Windows"},Qt={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function A(e,t){const r=[e&&(Zt[e]??e),t&&(Qt[t]??t)].filter(s=>!!s);return r.length?r.join(" "):null}function Xt(e){return e?.placement?.target==="remote"||I(e?.placement?.target)}const Yt=new Set(["running","paused","resuming","pausing","stopping"]);function Jt(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const r=t?.cloud?.state;return r&&Yt.has(r)?r:e.effectiveIsolation==="pending"?"starting":null}function fe(e,t){if(!e||!Xt(e))return null;const r=e.nodeId??e.placement?.nodeId??"",s=t&&t.id===r?t:null;if(I(e.placement?.target))return{nodeId:r,name:e.nodeName?.trim()||Ne(s?.cloud?.provider??Be(e.placement?.cloudMachineId)),platform:A(s?.platform?.os,s?.platform?.arch),state:"ready",cloud:{state:Jt(e,s)}};const n=A(e.placement?.os,e.placement?.arch)??A(s?.platform?.os,s?.platform?.arch),o=s?.state==="revoked"?"revoked":s?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:r,name:e.nodeName?.trim()||s?.name||a.remoteAgent_location_unknownMachine(),platform:n,state:o}}function gn(e,t){if(!e)return null;const r=t&&t.id===e?t:null;return{nodeId:e,name:r?.name||a.remoteAgent_location_unknownMachine(),platform:A(r?.platform?.os,r?.platform?.arch),state:r?.state==="revoked"?"revoked":r?.state==="unreachable"?"unreachable":"ready"}}function ge(e){switch(e){case"starting":return a.cloudMachines_agent_starting();case"running":return a.cloudMachines_agent_running();case"paused":return a.cloudMachines_agent_paused();case"resuming":return a.cloudMachines_agent_resuming();case"pausing":return a.cloudMachines_agent_pausing();case"stopping":return a.cloudMachines_agent_stopping();default:return null}}function hn(e){const t=ge(e.cloud?.state);return t?a.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function mn(e){if(e.cloud){const r=ge(e.cloud.state),s=a.remoteAgent_location_tooltipNoPlatform({machine:e.name});return r?a.remoteAgent_location_tooltipWithState({location:s,state:r}):s}const t=e.platform?a.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):a.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_unreachable_label()});case"revoked":return a.remoteAgent_location_tooltipWithState({location:t,state:a.remoteMachines_state_revoked_label()});default:return t}}function he(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":null}function me(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const r=JSON.parse(e.slice(t+1));if(r&&typeof r=="object"&&typeof r.code=="string")return{message:e.slice(0,t).trim(),data:r}}catch{}return null}function er(e,t){const r=e.detail??"",s=me(r),n=e.code==="machine-update-required"||s?.data.code==="machine-update-required";if(n&&s?.data.reason==="prepared-checkout")return{updateRequired:n,message:a.remoteAgent_updateRequired_preparedCheckout({machine:t})};const o=te(s?.data),c=o??(e.code?te({code:e.code}):null);return c?{updateRequired:n,message:s?.message||r,cloud:c,cloudDetailKnown:!!o}:{updateRequired:n,message:s?.message||r}}function bn(e){if(!I(e?.placement?.target)||!e.placementError||e.status!==We.Error)return null;const t=er(e.placementError,"");return t.cloud?t:null}const tr=["attachments-too-large-for-machine:","node-prompt-too-large:"],rr="remote-agent-unsupported:";function se(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function Sn(e){const t=me(e)?.message??e;for(const s of tr){const n=t.indexOf(s);if(n<0)continue;const o=t.slice(n+s.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),c=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(o);return c?a.remoteAgent_attachmentsTooLargeSized_error({size:se(Number(c[1])),limit:se(Number(c[2]))}):o?a.remoteAgent_attachmentsTooLarge_error({detail:o}):a.remoteAgent_attachmentsTooLargeNoDetail_error()}const r=t.indexOf(rr);return r>=0&&/attachment/i.test(t.slice(r))?a.remoteAgent_attachmentsUnsupported_error():null}function _n(e){return I(e?.placement?.target)&&he(e,fe(e))==="starting"}function vn(e,t){if(!I(e?.placement?.target))return!1;const r=fe(e,t);return r?.cloud?.state==="resuming"&&he(e,r)===null}const h="",H="cloud:";function Q(e){return`${H}${e}`}function D(e){return e?.startsWith(H)&&e.slice(H.length)||null}const An=Q("e2b");function sr(e,t){return e?.find(r=>Q(r.cloudMachineId)===t&&r.unavailableReason===null)}const nr=new Set(["connected","disconnected"]);function ir(e){switch(e){case"unreachable":return a.remoteMachines_state_unreachable_label();case"revoked":return a.remoteMachines_state_revoked_label();case"update-required":return a.remoteMachines_state_updateRequired_label();default:return}}function X(e){return nr.has(e.state)}function ar({backendLabel:e,backendPlatform:t,machines:r,cloud:s,orchestrator:n=!1}){const o=[n?{id:h,label:a.remoteMachines_startOn_firstAvailable_label(),platform:null,disabled:!1,hint:a.remoteMachines_startOn_firstAvailable_hint()}:{id:h,label:e,platform:A(t?.os,t?.arch),disabled:!1},...r.map(c=>{const l=A(c.platform?.os,c.platform?.arch);return X(c)?{id:c.id,label:c.name,platform:l,disabled:!1}:{id:c.id,label:c.name,platform:l,disabled:!0,reason:ir(c.state)}})];for(const c of s??[])o.push({id:Q(c.cloudMachineId),label:c.label,platform:null,kind:"cloud",disabled:c.unavailableReason!==null,...c.unavailableReason?{reason:c.unavailableReason}:c.needsProfile?{hint:a.cloudMachines_startOn_hint()}:{}});return o}function kn(e){return e.find(t=>t.id===h)?.label??""}function En(e,t,r){if(e!==h)return D(e)?void 0:e;if(r)return t.find(s=>s.id!==h&&s.kind!=="cloud"&&!s.disabled)?.id}function or({remoteMachinesVisible:e,supported:t,machines:r,cloud:s}){return e&&t&&(r.some(X)||(s??[]).some(n=>n.unavailableReason===null))}function cr(e,t,r){if(!e)return h;if(D(e))return sr(r,e)?e:h;const s=t.find(n=>n.id===e);return s&&X(s)?s.id:h}function Mn(e,{cloudEntries:t=!1,providerOf:r}={}){const s=D(e);return s?t&&r?.(s)==="northflank"?{target:"cloud",checkout:"isolated",cloudMachineId:s}:t?{target:"e2b",checkout:"isolated",cloudMachineId:s}:{target:"e2b",checkout:"isolated"}:e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function yn({groups:e,providerRef:t,model:r}){const s=c=>c.options.filter(l=>!l.disabled),n=e.find(c=>c.key===t),o=n?s(n):[];if(r){const c=Ve(r).modelId;if(o.some(l=>l.value===c))return null}else if(o.length>0)return null;if(n&&o.length>0)return{providerId:n.key,modelId:o[0].value};for(const c of e){if(c.key==="default")continue;const l=s(c);if(l.length>0)return{providerId:c.key,modelId:l[0].value}}return null}function lr(e,t,r,s){const n=e.map(P),o=n.indexOf(t),c=n.indexOf(r);if(o<0||c<0||o===c)return null;let l=c+(s==="after"?1:0);if(o<l&&(l-=1),l===o)return null;const p=[...e],[b]=p.splice(o,1);return p.splice(l,0,b),p.map($t)}function Rn(e,t,r){const s=e.findIndex(o=>P(o)===t),n=e[s+r];return s<0||!n?null:lr(e,t,P(n),r===-1?"before":"after")}function dr(e,t){if(e===h)return"local";const r=t==="cloud"?D(e):null;return P(r?{kind:"cloud",cloudMachineId:r}:{kind:"machine",nodeId:e})}function ne(e,t){const r=new Map(t.map((n,o)=>[P(n),o])),s=n=>r.get(dr(n.id,n.kind))??t.length;return e.map((n,o)=>({option:n,index:o})).sort((n,o)=>s(n.option)-s(o.option)||n.index-o.index).map(({option:n})=>n)}const Y=i.createSelector(e=>wt.select(e)&&e.remoteMachines?.supported===!0),wn=i.createSelector(e=>Y.select(e)&<.select(e)&&!oe.select(e)),be=i.createSelector(e=>Y.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),ie=i.createSelector(e=>be.select(e)?e.remoteMachines.order??[]:[]),Cn=i.createSelector(e=>e.remoteMachines.orderSaving!==null),J=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,r)=>t.name.localeCompare(r.name))),Pn=i.createSelector(e=>e.remoteMachines.localFingerprint),In=i.createSelector(e=>e.remoteMachines.pending),On=i.createSelector(e=>e.remoteMachines.failures),Tn=i.createSelector(e=>e.remoteMachines.executorBackends??[]),ur=i.createSelector((e,t)=>{if(t===Ue)return a.layout_daemonStatus_localConnection_label();const r=_(e.connections.connections,t);return r?dt(r):t}),pr=i.createSelector(e=>ur.select(e,e.connections.windowBackendId)),Fn=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),Ln=i.createSelector((e,t)=>{const r=e.providerSettings?.profiles;return ut({catalogProfiles:Je.select(e,t),defaultRemoteIncompatibility:Ye.select(e,t),defaultRemoteLaunch:Xe.select(e,t),profileDefaults:Object.values(r?.defaults??{}),profilesLoadStatus:r?.loadStatus??"idle"})}),Dn=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),Se=i.createSelector(e=>or({remoteMachinesVisible:Y.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:J.select(e),cloud:z(e)}));function fr(e){const t=_(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const gr=i.createSelector(e=>{const t=oe.select(e),r=ar({backendLabel:pr.select(e),backendPlatform:fr(e),machines:J.select(e),cloud:z(e),orchestrator:t});if(!be.select(e))return r;if(!t)return ne(r,ie.select(e));const[s,...n]=r;return[s,...ne(n,ie.select(e))]}),xn=i.createSelector(e=>Se.select(e)?gr.select(e):[]),Nn=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),Bn=i.createSelector((e,t,r)=>Se.select(e)?cr(t,J.select(e),_e(e,r)):h);function _e(e,t){const r=z(e);if(!r||!t)return r;const s=e.cloudMachines?.providers??{};return r.map(n=>{if(n.unavailableReason)return n;const o=pt(e,t,s[n.cloudMachineId]??null);return o?{...n,unavailableReason:o}:n})}const Wn=i.createSelector((e,t)=>_e(e,t)),hr=K("WorkspaceValidation");async function Vn(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_repoPathRequired_error(),suggestion:a.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return mr(s)?Sr(s):_r(s,t,r)}function mr(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function br(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const n of r){const o=t.match(n);if(o){const c=o[2].replace(/\.git$/,"");return c?{owner:o[1],repo:c}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const n=s[2].replace(/\.git$/,"");return n?{owner:s[1],repo:n}:null}return null}async function Sr(e){return br(e)?{valid:!0,warning:a.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:a.workspace_validation_invalidGithubUrl_error(),suggestion:a.workspace_validation_invalidGithubUrl_suggestion()}}async function _r(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:a.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:a.workspace_validation_pathNotAbsolute_error(),suggestion:a.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await B("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const c=s.data;return c.exists?c.isDirectory?c.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c}:c.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:c,warning:a.workspace_validation_insideParentRepo_warning({path:c.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:c}:t?c.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:a.workspace_repoSelector_notGitRepository_label(),directoryStatus:c}:{valid:!1,error:a.workspace_validation_notDirectory_error(),suggestion:a.workspace_validation_notDirectory_suggestion(),directoryStatus:c}:t?{valid:!0,isNewRepo:!0,directoryStatus:c,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExist_suggestion(),directoryStatus:c}}if(!(await B("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:a.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:a.workspace_validation_dirNotExist_error(),suggestion:a.workspace_validation_dirNotExistLegacy_suggestion()};const o=await B("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?a.workspace_repoSelector_notGitRepository_label():a.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:a.workspace_validation_nonGitInit_warning()}}catch(s){if(hr.warn("Could not validate path existence",s),!t)return{valid:!1,error:a.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Un(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchPrefixInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:a.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:a.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:a.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Gn(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Hn(e){if(!e||e.trim().length===0)return{valid:!1,error:a.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:a.workspace_validation_branchNameInvalidChars_error(),suggestion:a.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:a.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:a.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:a.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:a.workspace_validation_branchNameLock_error()}:{valid:!0}}function qn(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:a.workspace_validation_promptTooLong_error(),suggestion:a.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function jn(e){const t=e.toLowerCase();return t.includes("maxbuffer")?a.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?a.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?a.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?a.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?a.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?a.workspace_gitError_cloneAuth():a.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?a.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?a.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?a.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?a.workspace_gitError_readPermission():e:t.includes("permission denied")?a.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?a.workspace_gitError_notFound():t.includes("already exists")?a.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?a.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:a.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?a.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?a.workspace_gitError_diskSpace():e}const vr=["idle","exited"];function Ar(e){return e===void 0||!vr.includes(e)}function Kn(e){return e.status==="restarting"?"restarting":Ar(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function kr(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const zn=i.createSelector(e=>e.voiceSettings.isLoading),$n=i.createSelector(e=>e.voiceSettings.available),Zn=i.createSelector(e=>e.voiceSettings.provider),Qn=i.createSelector(e=>e.voiceSettings.engine),Xn=i.createSelector(e=>e.voiceSettings.osEngineAvailable),Yn=i.createSelector(e=>e.voiceSettings.keyConfigured),Jn=i.createSelector(e=>e.voiceSettings.vocabulary),ei=i.createSelector(e=>e.voiceSettings.openaiModel),ti=i.createSelector(e=>e.voiceSettings.language),ri=i.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),si=i.createSelector(e=>e.voiceSettings.inputDeviceId),ni=i.createSelector(e=>e.voiceSettings.inputDevices),ii=i.createSelector(e=>e.voiceSettings.busyProvider),ai=i.createSelector(e=>e.voiceSettings.error),oi=i.createSelector(e=>et.select(e)?"unavailable":kr(e.voiceSettings)),q="intent.voice.inputDevice";let j;function Er(){if(j!==void 0)return j;try{const e=localStorage.getItem(q);return typeof e=="string"&&e!==""?e:null}catch{return null}}function ci(e){j=e;try{e===null?localStorage.removeItem(q):localStorage.setItem(q,e)}catch{}}let F=null;function li(e){F=e}function di(){const e=F;return F=null,e}function Mr(){F=null}const yr=300,Rr=300;class wr{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??yr,this.doublePressWindowMs=t.doublePressWindowMs??Rr,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let L=null;function ui(e){L=e}function pi(){const e=L;return L=null,e}function Cr(){L=null}const Pr=12e4,Ir=["audio/webm;codecs=opus","audio/webm"];function fi(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function Or(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Tr(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ir.find(e=>MediaRecorder.isTypeSupported(e))}class Fr{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Pr,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(Or(this.deviceId))}catch(n){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(n),o?"discarded":"error"}if(this.discardRequested){for(const n of t.getTracks())n.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Tr(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=n=>{n.data&&n.data.size>0&&this.chunks.push(n.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=n=>this.handleRecorderError(n),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,n=this.cancelRequested;this.teardown(),!n&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Lr=300;function Dr(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const xr={stopReason:"manual",autoSend:!1};let g=null,S=null,k=0,C=null;const x=new wr({onRecordStart:()=>{C&&Nr(C)},onRecordStop:e=>{ve(C,e)}});function gi(){return g!==null}function hi(){return g}function mi(e){C=e,k+=1,k===1&&x.keyDown()}function bi(e){C=e,k!==0&&(k-=1,k===0&&x.keyUp())}function Nr(e){if(g!==null)return;Cr(),Mr();const t=new Fr({deviceId:Er(),onFinished:r=>{g===t&&(g=null);const s=S??{stopReason:"auto-stop",autoSend:!1},n=S!==null;if(S=null,e.dispatch(O()),n||x.reset(),r.durationMs<Lr){s.autoSend&&e.dispatch(G());return}e.dispatch(Ge({...r,stopReason:s.stopReason,autoSend:s.autoSend}))},onError:r=>{g===t&&(g=null),S=null,e.dispatch(O()),e.showHint(Dr(r)?a.hardwareConsole_ptt_micDenied_message():a.hardwareConsole_ptt_recordingFailed_message())}});g=t,e.dispatch(He()),t.start().then(r=>{if(r!=="recording"&&(g===t&&(g=null),r==="discarded")){const s=S?.autoSend===!0;S=null,e.dispatch(O()),s&&e.dispatch(G())}})}function ve(e,t){const r=g;if(r===null){t.autoSend&&e?.dispatch(G());return}S=t,r.stop()}function Si(){ve(null,xr)}function _i(e){x.reset(),k=0,S=null;const t=g;t!==null&&(g=null,t.cancel(),e.dispatch(O()))}const Br=K("HardwareConsoleVoiceSetupToast"),Wr="hardware-console-voice-setup";let U=null;function Vr(){return U||(U=Fe(()=>Promise.resolve().then(()=>Pt),void 0,import.meta.url).then(e=>e.notify)),U}function Ur(){Ct("/settings?tab=connections#voice").catch(e=>{Br.error("Failed to open voice settings from setup toast",e)})}function Gr(){return{label:a.hardwareConsole_voice_openSettings_label(),onClick:()=>Ur()}}function vi(){Vr().then(e=>{e.error(a.hardwareConsole_voice_noKey_error(),{id:Wr,action:Gr()})})}const Ai=i.createSelector(e=>e.externalEditors.selectedAction),Hr=i.createSelector(e=>e.externalEditors.editors),qr=i.createSelector(e=>{const t=y(Hr.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(c=>[c.id,c])),n=r.flatMap(c=>{const l=s.get(c);return l?[l]:[]}),o=new Set(r);return[...n,...t.filter(({id:c})=>!o.has(c))]}),ki=i.createSelector(e=>e.externalEditors.editorOrder??[]),Ei=i.createSelector(e=>e.externalEditors.loading),Mi=i.createSelector(e=>e.externalEditors.lastFetched),jr=i.createSelector(e=>e.externalEditors.hiddenEditorIds),yi=i.createSelector((e,t)=>{if(!(t?tt.select(e,t):rt.select(e)))return[];const s=jr.select(e);return qr.select(e).filter(n=>n.installed&&!s.includes(n.id))});function Ri(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Kr=0;function zr(e,t){const r=++Kr;return i.dispatch(je(e,t,r)),r}function wi(e,t,r){i.dispatch(qe(e,t,r))}async function Ae(e,t,r,s){const n=crypto.randomUUID(),o=s?.source??"control";try{return(await i.dispatch(Ke({requestId:n,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:ce.select(i.state)},{...s,intent:s?.intent??zr(e,t)}))).status==="success"}finally{i.dispatch(ze(n,o))}}async function Ci(e,t,r,s,n){return Ae(e,t,{kind:"effort",effort:r,previous:s},n)}async function Pi(e,t,r,s,n){return Ae(e,t,{kind:"reconcile",current:r??null,levels:s},n)}const $r=i.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Ii=i.createSelector((e,t)=>$r.select(e,t).some(r=>r.status==="pending")),Oi=i.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],n=st.select(e,t),o=ft.select(e,t),c=e.daemonHealth.stats?.protocolVersion,l=gt(c),p=l?ht(s?.model,null,o):s?.model;return{session:s,providerId:n,levels:o,legacy:l,identity:JSON.stringify([p,n]),connection:ce.select(e),canWrite:!!s&&s.workspaceId===r&&!nt.select(e,r)}});function Zr(e,t,r=!1){return e!=="auggie"||t===!0||r}const Ti=i.createSelector(e=>mt.select(e)?null:$.select(e)),Qr=i.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),m=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),Fi=i.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),Li=i.createSelector((e,t)=>!!m.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===Qr.select(e)),ke=i.createSelector((e,t)=>t?m.select(e,t)?.catalog.providers??[]:it.select(e)),Ee=i.createSelector((e,t)=>{if(!t)return le.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),ee=i.createSelector((e,t)=>{if(!t)return bt.select(e);const r=m.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),Me=i.createSelector((e,t)=>{if(!t)return St.select(e);const r=ee.select(e,t),s=Ee.select(e,t),n=m.select(e,t)?.readiness??{};return ke.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&n[o.id]?.available).map(o=>o.id)}),Di=i.createSelector((e,t)=>{const r=ee.select(e,t),s=t?m.select(e,t)?.readiness??{}:$.select(e);return ke.select(e,t).filter(n=>Zr(n.id,s[n.id]?.available,r[n.id]===!0)).map(n=>n.id)}),xi=i.createSelector((e,t)=>t?Me.select(e,t):_t.select(e)),Ni=i.createSelector((e,t)=>v.select(e,t)),Bi=i.createSelector((e,t)=>t?!!m.select(e,t):vt.select(e)),Wi=i.createSelector((e,t)=>{if(!t)return At.select(e);const r=m.select(e,t)?.settings??[],s=Ee.select(e,t),n=r.find(l=>l.path==="model.providerDefaults")?.value,o=n&&typeof n=="object"?n[s]:void 0;if(typeof o=="string")return o;const c=r.find(l=>l.path==="model.default")?.value;return typeof c=="string"?c:""}),Vi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):kt.select(e)),Ui=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Et.select(e)),Gi=i.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):Mt.select(e)),Hi=i.createSelector((e,t,r)=>{if(!r)return yt.select(e,t);const s=ee.select(e,r),n=m.select(e,r);return Me.select(e,r).filter(o=>o!==t&&(s[o]||n?.catalog.providers.find(c=>c.id===o)?.canBeDisabled===!1)&&Rt(o,n?.readiness[o]?.authenticated))}),qi=i.createSelector((e,t)=>t?m.select(e,t)?.readiness??{}:$.select(e)),Xr={},ji=i.createSelector(e=>e.providerSettings?.profiles?.status??Xr),Ki=i.createSelector(e=>e.directoryPicker.listing),zi=i.createSelector(e=>e.directoryPicker.loading),$i=i.createSelector(e=>e.directoryPicker.error),Zi=i.createSelector(e=>e.directoryPicker.pathError),Qi=i.createSelector(e=>e.directoryPicker.createError),ae={},Yr=i.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Xi=i.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(n=>n.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Yi=i.createSelector(e=>e.mcpSettings.loading),Ji=i.createSelector(e=>e.mcpSettings.error),ea=i.createSelector(e=>e.mcpSettings.mutationError??null),ta=i.createSelector(e=>e.mcpSettings.enabled),Jr=i.createSelector(e=>e.mcpSettings.disabledServers),es=i.createSelector(e=>e.mcpSettings.statusMap),ts=i.createSelector(e=>e.mcpSettings.toolsMap),rs=i.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(n=>[n.id,R(n)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(n=>{const o=s.get(n.serverId);return o&&n.lastError?[[o,n.lastError]]:[]}))}),ss=i.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??ae:ae),ra=i.createSelector((e,t)=>Object.keys(ss.select(e,t))),sa=i.createSelector(e=>{const t=Yr.select(e),r=es.select(e),s=ts.select(e),n=Jr.select(e),o=rs.select(e);return t.map(c=>{const l=R(c)in n,p=s[R(c)]||[];let b=r[R(c)]||"disconnected";return l&&(b="disabled"),{...c,disabled:l,status:b,tools:p,toolCount:p.length,errorMessage:o[R(c)]}})});i.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const na=i.createSelector(e=>e.mcpSettings.lastImportedCount),ia=i.createSelector(e=>e.mcpSettings.advancedSaveStatus),aa=i.createSelector(e=>e.mcpSettings.advancedSaveError),oa=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.secretRequests","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],ns=[{path:"agentFeatures.backgroundHooks",label:()=>a.settings_agentFeatures_backgroundHooks_label(),description:()=>a.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>a.settings_agentFeatures_hostExec_label(),description:()=>a.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.scripts",label:()=>a.settings_agentFeatures_scripts_label(),description:()=>a.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>a.settings_agentFeatures_terminalAccess_label(),description:()=>a.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>a.settings_agentFeatures_browserAutomation_label(),description:()=>a.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>a.settings_agentFeatures_desktopControl_label(),description:()=>a.settings_agentFeatures_desktopControl_description(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>a.settings_agentFeatures_richChatBlocks_label(),description:()=>a.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>a.settings_agentFeatures_structuredQuestions_label(),description:()=>a.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>a.settings_agentFeatures_secretRequests_label(),description:()=>a.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.attentionRequests",label:()=>a.settings_agentFeatures_attentionRequests_label(),description:()=>a.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>a.settings_agentFeatures_stateSnapshot_label(),description:()=>a.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>a.settings_agentFeatures_prMonitor_label(),description:()=>a.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>a.settings_agentFeatures_taskGraph_label(),description:()=>a.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>a.settings_agentFeatures_peerAgents_label(),description:()=>a.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>a.settings_agentFeatures_mcpTools_label(),description:()=>a.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],ca=Object.fromEntries(ns.map(e=>[e.path,e.defaultValue]));export{wi as $,mi as A,bi as B,Pt as C,Ds as D,Mn as E,ns as F,de as G,Ar as H,Zr as I,gi as J,Ri as K,re as L,fi as M,Er as N,gn as O,yn as P,P as Q,A as R,E as S,zr as T,lr as U,un as V,br as W,fn as X,dn as Y,er as Z,Pi as _,ca as a,Cs as a$,Sn as a0,kr as a1,cr as a2,Gn as a3,ci as a4,Ii as a5,$r as a6,Oi as a7,Bs as a8,Hs as a9,nn as aA,Zs as aB,Bn as aC,oi as aD,Tn as aE,Qs as aF,Xs as aG,Ws as aH,Gs as aI,Z as aJ,Ot as aK,Nt as aL,Bt as aM,ue as aN,xt as aO,Tt as aP,It as aQ,Lt as aR,Dt as aS,ws as aT,Is as aU,Os as aV,Fs as aW,Es as aX,ys as aY,Ps as aZ,Rs as a_,ur as aa,xi as ab,Ee as ac,ee as ad,Di as ae,Me as af,ke as ag,Ui as ah,Gi as ai,Vi as aj,Hi as ak,qi as al,Bi as am,Wi as an,Ni as ao,pr as ap,Us as aq,Dn as ar,js as as,Qi as at,$i as au,Ki as av,zi as aw,Zi as ax,ki as ay,Ys as az,oa as b,Zn as b$,Ms as b0,Ts as b1,ks as b2,Ls as b3,tn as b4,jr as b5,Nn as b6,qr as b7,yi as b8,Ei as b9,J as bA,Y as bB,Ln as bC,wn as bD,Ti as bE,Ht as bF,on as bG,cn as bH,sn as bI,an as bJ,$s as bK,rn as bL,v as bM,qs as bN,Wn as bO,xn as bP,gr as bQ,Se as bR,Vs as bS,ii as bT,Qn as bU,si as bV,ni as bW,Yn as bX,ti as bY,ei as bZ,Xn as b_,Js as ba,en as bb,Mi as bc,Pn as bd,ie as be,Cn as bf,be as bg,aa as bh,ia as bi,Jr as bj,ta as bk,Ji as bl,rs as bm,na as bn,Yi as bo,ea as bp,Yr as bq,sa as br,es as bs,ts as bt,Ai as bu,zs as bv,ji as bw,Fn as bx,On as by,In as bz,h as c,$n as c0,ai as c1,zn as c2,Jn as c3,ri as c4,m as c5,Qr as c6,Li as c7,Fi as c8,ra as c9,Xi as ca,li as cb,ui as cc,vi as cd,kn as ce,Q as cf,D as cg,En as ch,Nr as ci,Rn as cj,Si as ck,Hn as cl,Un as cm,qn as cn,Vn as co,Gr as cp,ln as cq,An as d,bn as e,_n as f,vn as g,hn as h,fe as i,mn as j,he as k,Ci as l,_i as m,Mr as n,Cr as o,di as p,pi as q,Ks as r,Gt as s,Ut as t,pn as u,hi as v,jn as w,Kn as x,xs as y,Ns as z};
|