@intent-hq/web 2.361.0 → 2.361.1
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/assets/{chat-search.CWdkjFsY.css → chat-search.BEJJqsqt.css} +1 -1
- package/web/app/immutable/chunks/{BWmQZ9-W.js → 8C8OyL-H.js} +1 -1
- package/web/app/immutable/chunks/{C2NcLB2u.js → 9JxkPVF4.js} +1 -1
- package/web/app/immutable/chunks/{CTNuszHC.js → B1ScYY03.js} +4 -4
- package/web/app/immutable/chunks/{D7HGt2gg.js → BAL5XTLB.js} +1 -1
- package/web/app/immutable/chunks/{c4wFHOws.js → BAyBEEFm.js} +1 -1
- package/web/app/immutable/chunks/{BYMZ452w.js → BCKdYbDN.js} +1 -1
- package/web/app/immutable/chunks/{Bw3Jc49z.js → BCReWepB.js} +1 -1
- package/web/app/immutable/chunks/{PsyApth6.js → BIbN5V8o.js} +1 -1
- package/web/app/immutable/chunks/{Khf-yjCZ.js → BJ3gWX43.js} +2 -2
- package/web/app/immutable/chunks/{CucLWNXy.js → BM1o8cfq.js} +1 -1
- package/web/app/immutable/chunks/{D7Qg9UsC.js → BPvTHi1E.js} +1 -1
- package/web/app/immutable/chunks/{DFrHql0h.js → BSEFatJl.js} +1 -1
- package/web/app/immutable/chunks/{DqKDx046.js → BSQOiuf7.js} +1 -1
- package/web/app/immutable/chunks/{BqVB3HSC.js → BShQ2LRb.js} +1 -1
- package/web/app/immutable/chunks/{CKxDlPZO.js → BTYFFiiL.js} +1 -1
- package/web/app/immutable/chunks/{D27yNjLf.js → BTl8ihCX.js} +1 -1
- package/web/app/immutable/chunks/{BYAWXKUB.js → BTli9eoV.js} +1 -1
- package/web/app/immutable/chunks/{VFkYp0FY.js → BTpJekrR.js} +1 -1
- package/web/app/immutable/chunks/{Rn1PSvxr.js → BVV3fM7W.js} +1 -1
- package/web/app/immutable/chunks/{D93k--bp.js → BYx2Y144.js} +1 -1
- package/web/app/immutable/chunks/{BN7TE2rx.js → B_tHbtUI.js} +1 -1
- package/web/app/immutable/chunks/{B3a7OI2F.js → BdcgINI4.js} +1 -1
- package/web/app/immutable/chunks/{BEXbHJh4.js → BffM0X9l.js} +1 -1
- package/web/app/immutable/chunks/{DwM4HivY.js → Bh3GosDM.js} +1 -1
- package/web/app/immutable/chunks/{D_rNeuD7.js → Bmmvebpd.js} +1 -1
- package/web/app/immutable/chunks/{BJf3iy0S.js → BpOARSV2.js} +2 -2
- package/web/app/immutable/chunks/{DgLG2932.js → BqUUWX71.js} +1 -1
- package/web/app/immutable/chunks/{Bkvyt2Uf.js → BrQ0wqQy.js} +1 -1
- package/web/app/immutable/chunks/{BzRgELGj.js → BrYKR-SG.js} +2 -2
- package/web/app/immutable/chunks/{D81z2pn-.js → Bx9jZIih.js} +3 -3
- package/web/app/immutable/chunks/{kcZjzSP7.js → ByIgBfs_.js} +1 -1
- package/web/app/immutable/chunks/{BinCXnWY.js → BzTKzuhn.js} +1 -1
- package/web/app/immutable/chunks/{BW5RQ7dH.js → C0w-ozGP.js} +1 -1
- package/web/app/immutable/chunks/{B5XDKjvt.js → C1d-f55y.js} +1 -1
- package/web/app/immutable/chunks/{DDA9SIgp.js → C7Y9ew7Z.js} +1 -1
- package/web/app/immutable/chunks/{t3JsxPaO.js → CD3p1vYG.js} +1 -1
- package/web/app/immutable/chunks/{CTRLupPR.js → CD6wiERl.js} +2 -2
- package/web/app/immutable/chunks/CDfNySzn.js +12 -0
- package/web/app/immutable/chunks/{C9ujJ6il.js → CEX--Xsn.js} +2 -2
- package/web/app/immutable/chunks/{DwC7M61S.js → CGa_N4XN.js} +1 -1
- package/web/app/immutable/chunks/{CpV8u0F6.js → CGyzoULR.js} +2 -2
- package/web/app/immutable/chunks/{CFuZ1Me4.js → CK1KGIDF.js} +2 -2
- package/web/app/immutable/chunks/{BhQ7Nd7i.js → CM4RKAei.js} +1 -1
- package/web/app/immutable/chunks/{B81eIwbi.js → CNrMRWtA.js} +2 -2
- package/web/app/immutable/chunks/{CPuPCqZE.js → CTRz9TAp.js} +1 -1
- package/web/app/immutable/chunks/{YgZ9xfEe.js → CU9Jo2EB.js} +1 -1
- package/web/app/immutable/chunks/{OJCFNlvY.js → CWv2hgO9.js} +1 -1
- package/web/app/immutable/chunks/{EtMoREaX.js → CY0JcuWq.js} +1 -1
- package/web/app/immutable/chunks/{D-RdTqFP.js → C_RGTtXj.js} +3 -3
- package/web/app/immutable/chunks/{Lpw6MOlz.js → CbvpJoHZ.js} +1 -1
- package/web/app/immutable/chunks/{Dads5On7.js → Ccaz1_yi.js} +1 -1
- package/web/app/immutable/chunks/{1c0lZJrV.js → CfrI0flQ.js} +1 -1
- package/web/app/immutable/chunks/{95Q5Q_xW.js → ChdfugfS.js} +1 -1
- package/web/app/immutable/chunks/{COGpUz3t.js → CigwWVbR.js} +1 -1
- package/web/app/immutable/chunks/{B-gNGby7.js → Cn2kUD4R.js} +1 -1
- package/web/app/immutable/chunks/{KnX_02Jn.js → Cnly_zgc.js} +1 -1
- package/web/app/immutable/chunks/{DbgIztcj.js → Ct4BiqZH.js} +2 -2
- package/web/app/immutable/chunks/{CiCc1qZy.js → CtoSWfC3.js} +1 -1
- package/web/app/immutable/chunks/{kV-fkifL.js → CubYUWh2.js} +1 -1
- package/web/app/immutable/chunks/{Dm7totry.js → CwzEnqS-.js} +1 -1
- package/web/app/immutable/chunks/{BsOXr_0z.js → CzEsFefN.js} +1 -1
- package/web/app/immutable/chunks/{CSykTYZD.js → D3110at5.js} +1 -1
- package/web/app/immutable/chunks/{Bep3Jqpc.js → D39Rrj4Y.js} +1 -1
- package/web/app/immutable/chunks/{CSSLtQaO.js → D478BUHq.js} +1 -1
- package/web/app/immutable/chunks/{Dd5jECmn.js → D6d4xhu_.js} +1 -1
- package/web/app/immutable/chunks/{Cmh4buXt.js → DB-v9jra.js} +1 -1
- package/web/app/immutable/chunks/{D5Y-fh7x.js → DDJJ0r24.js} +1 -1
- package/web/app/immutable/chunks/{_2nk2_Hn.js → DGzlSz-8.js} +1 -1
- package/web/app/immutable/chunks/{qWbeHdf9.js → DHQj_UCz.js} +1 -1
- package/web/app/immutable/chunks/{BzFCW_oO.js → DJ5x8cvc.js} +1 -1
- package/web/app/immutable/chunks/{BeTn7XSu.js → DKAPPU9s.js} +4 -4
- package/web/app/immutable/chunks/{BMiSQSg-.js → DL8IL3dP.js} +1 -1
- package/web/app/immutable/chunks/{DZ-8xGs3.js → DMHNxEyN.js} +1 -1
- package/web/app/immutable/chunks/{BM-7iiyp.js → DPVE_K_W.js} +1 -1
- package/web/app/immutable/chunks/{aF9CaLLA.js → DSEn8hom.js} +1 -1
- package/web/app/immutable/chunks/{B2islIT9.js → DU2T1Vdb.js} +1 -1
- package/web/app/immutable/chunks/DUCIVWu4.js +12 -0
- package/web/app/immutable/chunks/{CIeKs3Fz.js → DW6bFMyN.js} +1 -1
- package/web/app/immutable/chunks/{C5ak_0Xq.js → DYUOfSUt.js} +1 -1
- package/web/app/immutable/chunks/{ByVGRZX6.js → D_duQWml.js} +1 -1
- package/web/app/immutable/chunks/{CjLcyZTM.js → DfPFNZRA.js} +1 -1
- package/web/app/immutable/chunks/{BVPML882.js → Dg8d6CfG.js} +1 -1
- package/web/app/immutable/chunks/{Bw8AD9dJ.js → Dg9xZYld.js} +1 -1
- package/web/app/immutable/chunks/{BSxTNz_Y.js → DgcVHfLT.js} +1 -1
- package/web/app/immutable/chunks/{vSqR6YVO.js → DhFCUcs_.js} +1 -1
- package/web/app/immutable/chunks/{j3M2P1q-.js → DjcKhQp4.js} +1 -1
- package/web/app/immutable/chunks/{BfLVjdWH.js → DlZbnYcc.js} +1 -1
- package/web/app/immutable/chunks/{Bwq11IJN.js → DnxaSjad.js} +1 -1
- package/web/app/immutable/chunks/{CL0ULjU-.js → Dr8wZpId.js} +1 -1
- package/web/app/immutable/chunks/{Bs7k0nr9.js → DtIte6Mn.js} +13 -13
- package/web/app/immutable/chunks/{1j8IB6qY.js → DxNx74qV.js} +1 -1
- package/web/app/immutable/chunks/DxOUk2oJ.js +305 -0
- package/web/app/immutable/chunks/{Bv2wmdPv.js → Dxv3G1Mb.js} +1 -1
- package/web/app/immutable/chunks/{CKn-VDhm.js → DzGon3k8.js} +1 -1
- package/web/app/immutable/chunks/{DXJZHh0A.js → HtczSd2T.js} +1 -1
- package/web/app/immutable/chunks/{CK61dfwH.js → HzX2dyQQ.js} +1 -1
- package/web/app/immutable/chunks/{BkNoKwFt.js → IF38I4hJ.js} +1 -1
- package/web/app/immutable/chunks/{Bz8fykGF.js → LOqiMc_U.js} +1 -1
- package/web/app/immutable/chunks/{BkBez7WX.js → LWmvlIUb.js} +1 -1
- package/web/app/immutable/chunks/{VPOqbJP9.js → LbgKUbsl.js} +3 -3
- package/web/app/immutable/chunks/{XwrZ1aRW.js → Mq-KWmnJ.js} +1 -1
- package/web/app/immutable/chunks/{CyPGin7U.js → NAsYJxQg.js} +1 -1
- package/web/app/immutable/chunks/{Cot5yElc.js → Oa6WXH6c.js} +3 -3
- package/web/app/immutable/chunks/{BKkSBqXG.js → PRiKArA2.js} +1 -1
- package/web/app/immutable/chunks/{hvIpWr_e.js → Pyx0yui4.js} +1 -1
- package/web/app/immutable/chunks/{cqV5ArDy.js → QNDivBsM.js} +1 -1
- package/web/app/immutable/chunks/{D-2XEcTW.js → WJw0rC-g.js} +1 -1
- package/web/app/immutable/chunks/{BvyARSUu.js → ZWDSGAzi.js} +1 -1
- package/web/app/immutable/chunks/{f178PQSp.js → _iJcPN5_.js} +1 -1
- package/web/app/immutable/chunks/{D_sZQPLm.js → fUWZZKuh.js} +3 -3
- package/web/app/immutable/chunks/{C27IcubQ.js → g5Oev8-0.js} +1 -1
- package/web/app/immutable/chunks/{D7Vw4JcL.js → i-66Uv-K.js} +1 -1
- package/web/app/immutable/chunks/{cFIrJg-T.js → i9Ai-esv.js} +1 -1
- package/web/app/immutable/chunks/{C-UIC-T7.js → iDIfJ3iV.js} +1 -1
- package/web/app/immutable/chunks/{BUd39PAw.js → j9e5aB7O.js} +1 -1
- package/web/app/immutable/chunks/{DR2khMiR.js → jbEf1eyu.js} +1 -1
- package/web/app/immutable/chunks/{VSdJtUTR.js → m2KtwqZj.js} +3 -3
- package/web/app/immutable/chunks/{MMcMOHPP.js → p1enVnf-.js} +3 -3
- package/web/app/immutable/chunks/{sUAKfW_e.js → q3oLC86w.js} +1 -1
- package/web/app/immutable/chunks/{CZXdxwZ-.js → tm_HKw3E.js} +1 -1
- package/web/app/immutable/chunks/{C1RT5V9K.js → wuYAM5lX.js} +1 -1
- package/web/app/immutable/chunks/{B1Qwlozr.js → ye2FbJ5D.js} +2 -2
- package/web/app/immutable/entry/{app.BcpofzE6.js → app.0rhGzEA-.js} +2 -2
- package/web/app/immutable/entry/start.piZarN4f.js +1 -0
- package/web/app/immutable/nodes/{0.BQUOze-j.js → 0.7iTMX8MP.js} +1 -1
- package/web/app/immutable/nodes/{1.Bp05_YjA.js → 1.BwagR4s9.js} +1 -1
- package/web/app/immutable/nodes/{10.3aTkNQpJ.js → 10.DuZeAxuV.js} +4 -4
- package/web/app/immutable/nodes/{11.BXjLtpXc.js → 11.D7qyNhVk.js} +1 -1
- package/web/app/immutable/nodes/{15.DfBroLQA.js → 15.De8ZpDZ1.js} +1 -1
- package/web/app/immutable/nodes/{19.-ypsiFbk.js → 19.Df09vK0B.js} +2 -2
- package/web/app/immutable/nodes/{2.DULGAXhA.js → 2.Dlt4LRYB.js} +4 -4
- package/web/app/immutable/nodes/{3.CM-CFkEo.js → 3.PjliZTHk.js} +1 -1
- package/web/app/immutable/nodes/{4.DiNldv1M.js → 4.OFyddHWG.js} +1 -1
- package/web/app/immutable/nodes/{5.DDbl8ORw.js → 5.C7naJyKP.js} +1 -1
- package/web/app/immutable/nodes/{6.CGP2STrw.js → 6.k4q9sApB.js} +1 -1
- package/web/app/immutable/nodes/{7.xmorhsK4.js → 7.C4plvmUt.js} +1 -1
- package/web/app/immutable/nodes/{8.D_BxSNz-.js → 8.tv1szX_U.js} +1 -1
- package/web/app/immutable/nodes/{9.BUD_PMUy.js → 9.gOkUPoOT.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/CA6_Ao_-.js +0 -305
- package/web/app/immutable/chunks/DSDcLbxr.js +0 -12
- package/web/app/immutable/chunks/DxuDR3-b.js +0 -12
- package/web/app/immutable/entry/start.BYusRIxF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as xt}from"./
|
|
1
|
+
import{p as xt}from"./DhFCUcs_.js";import{aZ as gt,U as $t,Y as bt,b0 as wt,V as Ct,a_ as vt,b as s,ay as O,aX as Dt,B as kt,r as Tt,q as U,W as Z,O as At,a6 as ot}from"./B1ScYY03.js";import{p as Bt}from"./CfNfee-Y.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Z().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),G={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,G),G.setDomains(t.domains),G.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),R=p.x+h,V=f,_=i.x-h;D+=` C${R},${V} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),R=f,V=p.y+h,_=f,z=i.y-h;D+=` C${R},${V} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Vt=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Vt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,V=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,V,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${V} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(i,f),Q=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Q,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Q+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const Y=x.getBBox();Y.width>0&&($=Y.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,Y=-x/C,ht=$/C,et=M+Y*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Ft={draw:_t},Et=s(()=>{const t=ot(),e=Z();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return`
|
|
2
2
|
.cynefinDomain {
|
|
3
3
|
stroke: none;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CJxGDkBm.js";import{p as De}from"./CswzK9Go.js";import"./DrHJ7oPv.js";import{j as Oe,k as we,c as We,l as ke}from"./DsyH2ZOJ.js";import{s as qe}from"./DDA9SIgp.js";import{i as _e}from"./BWLj3Qxb.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
1
|
+
import"./CJxGDkBm.js";import{p as De}from"./CswzK9Go.js";import"./DrHJ7oPv.js";import{j as Oe,k as we,c as We,l as ke}from"./DsyH2ZOJ.js";import{s as qe}from"./C7Y9ew7Z.js";import{i as _e}from"./BWLj3Qxb.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,aW as o}from"./
|
|
1
|
+
import{b as a,aW as o}from"./B1ScYY03.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
import{bm as y,_ as h}from"./AeC4KVgG.js";import{a as H}from"./BdWqymET.js";import{IX as k,i as A,Hr as M,Gr as C,bl as S,vb as D,v9 as j,vq as B,ns as V}from"./BkzMrEqG.js";import{bK as z}from"./DR2khMiR.js";import{k as W}from"./DbaZdUr0.js";import"./CJxGDkBm.js";import"./DrHJ7oPv.js";import"./Dp2nUoTL.js";import{R as $,F as I,E as N,Q as T}from"./jhNNYE0v.js";import"./ChTqQfQN.js";import"./BNODdf6r.js";import{o as G}from"./Dz2z231n.js";import{i as R}from"./DTWXK3Yd.js";function q(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId}}const o=new H("LinkHandler");async function K(e,t){try{const a=t.event?.target,n=q(a instanceof Element?a:null,t.workspaceId),i=t.openInWorkspace??n.openInWorkspace,r=i?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:c}=n;if(t={...t,openInWorkspace:i,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return o.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return W.error(y.ui_linkHandler_assetUnavailable_error()),!1;const l=$(e),{event:d}=t,u=l&&d&&!I(t)?t.githubLinkDefaultAction??G.select(k.state):void 0,f=!u||u==="open-in-app";if(t.workspaceId===A&&!t.forceExternal&&f){const{showAssistantContent:p}=await h(async()=>{const{showAssistantContent:m}=await import("./CFuZ1Me4.js");return{showAssistantContent:m}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),g=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await p(g,{layoutId:c}))return!0}if(e.startsWith("intent://"))return await X(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await Q(e,{...t,sourcePanelId:r});const s=te(e,t.rawHref);if(s)return await ae(s.path,{...t,sourcePanelId:r},s.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(N(e))return o.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(i&&f||I(t))return t.workspaceId?await P(e,t.workspaceId,{...t,assistantLayoutId:c}):(o.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(l&&d&&u)switch(u){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await P(e,t.workspaceId,{...t,assistantLayoutId:c}):await w(e);case"copy-link":return await z(e),!0;case"start-workspace":return k.dispatch(M({...l,url:e})),k.dispatch(C(!0)),!0;case"show-choices":return await ne(e,l,d,t,c)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await x(e):(o.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return o.error("Failed to handle link",{url:e,error:a}),!1}}async function X(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:c,handleIntentLink:l}=await import("./CTRLupPR.js");return{parseIntentLink:c,handleIntentLink:l}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),i=a(e);if(t.canOpenFile&&i.type==="file"&&!t.canOpenFile())return!1;const r=i.workspaceId?S(i.workspaceId):t.workspaceId;return i.valid&&i.type!=="workspace"&&await _(r,t),L(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??I(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return o.error("Failed to handle intent link",{url:e,error:a}),!1}}async function Q(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return o.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);o.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await _(t.workspaceId,t),L(t);const i={type:"terminal",title:y.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return I(t)?k.dispatch(D(t.workspaceId,i,t.sourcePanelId)):k.dispatch(j(t.workspaceId,i)),!0}return o.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return o.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,O=/^[a-z]:\/(?!\/)/i;function E(e){return e.replace(/\\/g,"/")}function Z(e){try{return E(decodeURIComponent(e))}catch{return null}}function J(e){return e.split("/").some(t=>t==="..")}function ee(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function _(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./BkNoKwFt.js").then(i=>i.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw W.error(y.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:y.ui_linkHandler_unknownError_label()}),n}}function L(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(V(e.workspaceId,e.sourcePanelId))}function te(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=T(a).path;if(!a.startsWith("//")&&(O.test(E(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function ae(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=T(e),i=Z(n.path);if(!i||i.includes("\0"))return!1;let r=i;const{line:c,column:l}=n,{workspaceId:d}=t;if(!d)return o.warn("Cannot open file link without workspaceId",{path:r}),!1;if(J(r))return o.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||O.test(r)){const{selectWorkspaceById:s}=await h(async()=>{const{selectWorkspaceById:b}=await import("./BEyxbMng.js").then(U=>U.dZ);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=s.select(k.state,d),g=p?.worktreePath??p?.path,m=g?E(g):void 0,v=m?.endsWith("/")?m.slice(0,-1):m;if(v&&r.startsWith(`${v}/`))r=r.slice(v.length+1);else if(a)r=r.replace(/^\/+/,"");else{o.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=c===void 0?"":`:${c}${l===void 0?"":`:${l}`}`;return await x(`file://${r}${b}`)}}const u=ee(r);if(!u)return o.warn("Rejected invalid workspace file link",{path:r}),!1;r=u;const f=I(t);return await _(d,t),L(t),k.dispatch(B(d,r,{filePathIsLiteral:!0,line:c,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),o.debug("Opened file link in workspace file viewer",{path:r,workspaceId:d,line:c}),!0}catch(n){return o.error("Failed to open file link",{target:e,error:n}),!1}}async function ne(e,t,a,{workspaceId:n,openInWorkspace:i,sourcePanelId:r},c){try{const{showLinkActionMenu:l}=await h(async()=>{const{showLinkActionMenu:p}=await import("./B3bYRRle.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),d=a.target instanceof HTMLElement?a.target:null;let u=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(u===0&&f===0&&d){const p=d.getBoundingClientRect();u=p.left,f=p.bottom}const s=l({url:e,gitHubRef:t,x:u,y:f,workspaceId:n,anchorElement:d,openInWorkspace:i??!1,sourcePanelId:r,assistantLayoutId:c});return t.kind==="pr"&&re(s,e),o.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(l){return o.warn("Failed to open link action menu, falling back to external browser",{url:e,error:l}),await w(e)}}function re(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./P-joxIX5.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{o.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await _(e,{openInWorkspace:!0}),!0}catch(t){return o.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function P(e,t,a={}){if(t===A){try{const{showAssistantContent:i}=await h(async()=>{const{showAssistantContent:r}=await import("./CFuZ1Me4.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await i(e,{layoutId:a.assistantLayoutId}))return!0}catch(i){o.warn("Assistant panel unavailable, opening in external browser",{url:e,error:i})}return await w(e)}try{await _(t,a)}catch(i){return o.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:i}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await F(e,t,n)}async function F(e,t,a){let n=e,i;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:l}=await import("./CVFwlr2Z.js").then(d=>d.b);return{resolveBrowserLinkForOpen:l}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),c=await r(e);n=c.url,i=c.requestedUrl}catch(r){o.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{L({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:l}=await import("./Do63UfoS.js").then(d=>d.p);return{getPanelLayoutManager:l}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,i),o.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return o.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await R("shell:openExternal",{url:e}),o.debug("Opened URL in external browser",{url:e}),!0}catch(t){return o.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function x(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await R("shell:openExternal",{url:`vscode://file/${t}`}),o.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return o.error("Failed to open file in external editor",{url:e,error:t}),!1}}function oe(e,t={}){let a=null,n=null,i=null;async function r(){if(!n||!i){const u=await h(()=>import("./jhNNYE0v.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=u.showLinkTooltip,i=u.hideLinkTooltip}}function c(u){const s=u.target.closest("a");if(s?.href&&!s.href.startsWith("intent://")&&!s.href.startsWith("devspace://")){if(s===a)return;a=s;const p=t.workspaceId??s.closest("[data-workspace-id]")?.dataset.workspaceId??s.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===s&&n&&n(s,s.href,p)})}else a&&(a=null,i?.())}function l(u){const s=u.target.closest("a");if(s&&s===a){const p=u.relatedTarget;if(p&&s.contains(p))return;a=null,i?.()}}function d(){a&&(a=null,i?.())}return e.addEventListener("mouseover",c),e.addEventListener("mouseout",l),e.addEventListener("click",d),()=>{e.removeEventListener("mouseover",c),e.removeEventListener("mouseout",l),e.removeEventListener("click",d),i?.()}}const ge=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:oe,handleLink:K,openInBrowserPanel:F,openInExternalBrowser:w,openLinkInApp:P,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{P as a,ie as b,oe as c,K as h,ge as l,w as o,q as r};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CK1KGIDF.js","/app/immutable/chunks/AeC4KVgG.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BkzMrEqG.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/Bd1FsnP3.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Dp2nUoTL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DWPd-rzt.js","/app/immutable/chunks/CD7PpB6R.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/jhNNYE0v.js","/app/immutable/chunks/Cwla-sl1.js","/app/immutable/chunks/DrHJ7oPv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DTWXK3Yd.js","/app/immutable/chunks/BV4GrhSx.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CAYSf4zc.js","/app/immutable/chunks/CD6wiERl.js","/app/immutable/chunks/DbaZdUr0.js","/app/immutable/chunks/k2awEenT.js","/app/immutable/chunks/DJM6amHV.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/CswzK9Go.js","/app/immutable/chunks/ZcoUa9Jg.js","/app/immutable/chunks/HftJbvyF.js","/app/immutable/chunks/DWUO9rBe.js","/app/immutable/chunks/BNODdf6r.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/Ci7mS1ie.js","/app/immutable/chunks/DsyH2ZOJ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/BEyxbMng.js","/app/immutable/chunks/Dz2z231n.js","/app/immutable/chunks/DwQfkcIA.js","/app/immutable/chunks/CZ-8NDq0.js","/app/immutable/chunks/yAiwGS7g.js","/app/immutable/chunks/IF38I4hJ.js","/app/immutable/chunks/ye2FbJ5D.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/B3bYRRle.js","/app/immutable/chunks/P-joxIX5.js","/app/immutable/chunks/CVFwlr2Z.js","/app/immutable/chunks/Do63UfoS.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bm as y,_ as h}from"./AeC4KVgG.js";import{a as H}from"./BdWqymET.js";import{IX as k,i as A,Hr as M,Gr as C,bl as S,vb as D,v9 as j,vq as B,ns as V}from"./BkzMrEqG.js";import{bK as z}from"./jbEf1eyu.js";import{k as W}from"./DbaZdUr0.js";import"./CJxGDkBm.js";import"./DrHJ7oPv.js";import"./Dp2nUoTL.js";import{R as $,F as I,E as N,Q as T}from"./jhNNYE0v.js";import"./ChTqQfQN.js";import"./BNODdf6r.js";import{o as G}from"./Dz2z231n.js";import{i as R}from"./DTWXK3Yd.js";function q(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId}}const o=new H("LinkHandler");async function K(e,t){try{const a=t.event?.target,n=q(a instanceof Element?a:null,t.workspaceId),i=t.openInWorkspace??n.openInWorkspace,r=i?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:c}=n;if(t={...t,openInWorkspace:i,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return o.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return W.error(y.ui_linkHandler_assetUnavailable_error()),!1;const l=$(e),{event:d}=t,u=l&&d&&!I(t)?t.githubLinkDefaultAction??G.select(k.state):void 0,f=!u||u==="open-in-app";if(t.workspaceId===A&&!t.forceExternal&&f){const{showAssistantContent:p}=await h(async()=>{const{showAssistantContent:m}=await import("./CK1KGIDF.js");return{showAssistantContent:m}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),g=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await p(g,{layoutId:c}))return!0}if(e.startsWith("intent://"))return await X(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await Q(e,{...t,sourcePanelId:r});const s=te(e,t.rawHref);if(s)return await ae(s.path,{...t,sourcePanelId:r},s.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(N(e))return o.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(i&&f||I(t))return t.workspaceId?await P(e,t.workspaceId,{...t,assistantLayoutId:c}):(o.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(l&&d&&u)switch(u){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await P(e,t.workspaceId,{...t,assistantLayoutId:c}):await w(e);case"copy-link":return await z(e),!0;case"start-workspace":return k.dispatch(M({...l,url:e})),k.dispatch(C(!0)),!0;case"show-choices":return await ne(e,l,d,t,c)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await x(e):(o.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return o.error("Failed to handle link",{url:e,error:a}),!1}}async function X(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:c,handleIntentLink:l}=await import("./CD6wiERl.js");return{parseIntentLink:c,handleIntentLink:l}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),i=a(e);if(t.canOpenFile&&i.type==="file"&&!t.canOpenFile())return!1;const r=i.workspaceId?S(i.workspaceId):t.workspaceId;return i.valid&&i.type!=="workspace"&&await _(r,t),L(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??I(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return o.error("Failed to handle intent link",{url:e,error:a}),!1}}async function Q(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return o.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);o.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await _(t.workspaceId,t),L(t);const i={type:"terminal",title:y.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return I(t)?k.dispatch(D(t.workspaceId,i,t.sourcePanelId)):k.dispatch(j(t.workspaceId,i)),!0}return o.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return o.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,O=/^[a-z]:\/(?!\/)/i;function E(e){return e.replace(/\\/g,"/")}function Z(e){try{return E(decodeURIComponent(e))}catch{return null}}function J(e){return e.split("/").some(t=>t==="..")}function ee(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function _(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./IF38I4hJ.js").then(i=>i.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw W.error(y.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:y.ui_linkHandler_unknownError_label()}),n}}function L(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(V(e.workspaceId,e.sourcePanelId))}function te(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=T(a).path;if(!a.startsWith("//")&&(O.test(E(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function ae(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=T(e),i=Z(n.path);if(!i||i.includes("\0"))return!1;let r=i;const{line:c,column:l}=n,{workspaceId:d}=t;if(!d)return o.warn("Cannot open file link without workspaceId",{path:r}),!1;if(J(r))return o.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||O.test(r)){const{selectWorkspaceById:s}=await h(async()=>{const{selectWorkspaceById:b}=await import("./BEyxbMng.js").then(U=>U.dZ);return{selectWorkspaceById:b}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=s.select(k.state,d),g=p?.worktreePath??p?.path,m=g?E(g):void 0,v=m?.endsWith("/")?m.slice(0,-1):m;if(v&&r.startsWith(`${v}/`))r=r.slice(v.length+1);else if(a)r=r.replace(/^\/+/,"");else{o.debug("Absolute path outside workspace root, opening in external editor",{path:r});const b=c===void 0?"":`:${c}${l===void 0?"":`:${l}`}`;return await x(`file://${r}${b}`)}}const u=ee(r);if(!u)return o.warn("Rejected invalid workspace file link",{path:r}),!1;r=u;const f=I(t);return await _(d,t),L(t),k.dispatch(B(d,r,{filePathIsLiteral:!0,line:c,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),o.debug("Opened file link in workspace file viewer",{path:r,workspaceId:d,line:c}),!0}catch(n){return o.error("Failed to open file link",{target:e,error:n}),!1}}async function ne(e,t,a,{workspaceId:n,openInWorkspace:i,sourcePanelId:r},c){try{const{showLinkActionMenu:l}=await h(async()=>{const{showLinkActionMenu:p}=await import("./B3bYRRle.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),d=a.target instanceof HTMLElement?a.target:null;let u=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(u===0&&f===0&&d){const p=d.getBoundingClientRect();u=p.left,f=p.bottom}const s=l({url:e,gitHubRef:t,x:u,y:f,workspaceId:n,anchorElement:d,openInWorkspace:i??!1,sourcePanelId:r,assistantLayoutId:c});return t.kind==="pr"&&re(s,e),o.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(l){return o.warn("Failed to open link action menu, falling back to external browser",{url:e,error:l}),await w(e)}}function re(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./P-joxIX5.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{o.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await _(e,{openInWorkspace:!0}),!0}catch(t){return o.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function P(e,t,a={}){if(t===A){try{const{showAssistantContent:i}=await h(async()=>{const{showAssistantContent:r}=await import("./CK1KGIDF.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await i(e,{layoutId:a.assistantLayoutId}))return!0}catch(i){o.warn("Assistant panel unavailable, opening in external browser",{url:e,error:i})}return await w(e)}try{await _(t,a)}catch(i){return o.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:i}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await F(e,t,n)}async function F(e,t,a){let n=e,i;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:l}=await import("./CVFwlr2Z.js").then(d=>d.b);return{resolveBrowserLinkForOpen:l}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),c=await r(e);n=c.url,i=c.requestedUrl}catch(r){o.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{L({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:l}=await import("./Do63UfoS.js").then(d=>d.p);return{getPanelLayoutManager:l}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,i),o.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return o.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await R("shell:openExternal",{url:e}),o.debug("Opened URL in external browser",{url:e}),!0}catch(t){return o.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function x(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await R("shell:openExternal",{url:`vscode://file/${t}`}),o.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return o.error("Failed to open file in external editor",{url:e,error:t}),!1}}function oe(e,t={}){let a=null,n=null,i=null;async function r(){if(!n||!i){const u=await h(()=>import("./jhNNYE0v.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=u.showLinkTooltip,i=u.hideLinkTooltip}}function c(u){const s=u.target.closest("a");if(s?.href&&!s.href.startsWith("intent://")&&!s.href.startsWith("devspace://")){if(s===a)return;a=s;const p=t.workspaceId??s.closest("[data-workspace-id]")?.dataset.workspaceId??s.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===s&&n&&n(s,s.href,p)})}else a&&(a=null,i?.())}function l(u){const s=u.target.closest("a");if(s&&s===a){const p=u.relatedTarget;if(p&&s.contains(p))return;a=null,i?.()}}function d(){a&&(a=null,i?.())}return e.addEventListener("mouseover",c),e.addEventListener("mouseout",l),e.addEventListener("click",d),()=>{e.removeEventListener("mouseover",c),e.removeEventListener("mouseout",l),e.removeEventListener("click",d),i?.()}}const ge=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:oe,handleLink:K,openInBrowserPanel:F,openInExternalBrowser:w,openLinkInApp:P,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{P as a,ie as b,oe as c,K as h,ge as l,w as o,q as r};
|