@intent-hq/web 2.361.1 → 2.361.2
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/{iDIfJ3iV.js → -7du9lfn.js} +1 -1
- package/web/app/immutable/chunks/{ByIgBfs_.js → 0_7FQkiC.js} +1 -1
- package/web/app/immutable/chunks/{BAyBEEFm.js → 1EW4b83o.js} +1 -1
- package/web/app/immutable/chunks/{B9t82so5.js → 2wJjyVNk.js} +2 -2
- package/web/app/immutable/chunks/{B_tHbtUI.js → 52-_4pXR.js} +1 -1
- package/web/app/immutable/chunks/{i9Ai-esv.js → 5NiJCy7J.js} +1 -1
- package/web/app/immutable/chunks/{BTpJekrR.js → 5u3dQlae.js} +1 -1
- package/web/app/immutable/chunks/{CEX--Xsn.js → 6d4Jv8Hz.js} +2 -2
- package/web/app/immutable/chunks/{j9e5aB7O.js → 7tcI69cn.js} +1 -1
- package/web/app/immutable/chunks/{BTYFFiiL.js → 8HLudOb-.js} +1 -1
- package/web/app/immutable/chunks/{ye2FbJ5D.js → 96DwTK9j.js} +2 -2
- package/web/app/immutable/chunks/{BIbN5V8o.js → As8lK70V.js} +1 -1
- package/web/app/immutable/chunks/{QNDivBsM.js → AxCVH26S.js} +1 -1
- package/web/app/immutable/chunks/{DxOUk2oJ.js → B07OdpUU.js} +3 -3
- package/web/app/immutable/chunks/{C7Y9ew7Z.js → B0JbhmMb.js} +1 -1
- package/web/app/immutable/chunks/{D6d4xhu_.js → B1Tr5BPZ.js} +1 -1
- package/web/app/immutable/chunks/{CigwWVbR.js → B2ns9OTA.js} +1 -1
- package/web/app/immutable/chunks/{WJw0rC-g.js → B4kCZd9W.js} +1 -1
- package/web/app/immutable/chunks/{BTl8ihCX.js → B5Pg9_MZ.js} +1 -1
- package/web/app/immutable/chunks/{_iJcPN5_.js → B9pYL5w0.js} +1 -1
- package/web/app/immutable/chunks/{q3oLC86w.js → B9tRD7MQ.js} +1 -1
- package/web/app/immutable/chunks/{DU2T1Vdb.js → BAgFsuQz.js} +1 -1
- package/web/app/immutable/chunks/{DMHNxEyN.js → BD9wTbmm.js} +1 -1
- package/web/app/immutable/chunks/{BdcgINI4.js → BG4tBRsm.js} +1 -1
- package/web/app/immutable/chunks/{BzTKzuhn.js → BGOuxFsr.js} +1 -1
- package/web/app/immutable/chunks/{CbvpJoHZ.js → BKHUH54N.js} +1 -1
- package/web/app/immutable/chunks/{Bmmvebpd.js → BKw6wLyE.js} +1 -1
- package/web/app/immutable/chunks/{DKAPPU9s.js → BLFlTVjy.js} +4 -4
- package/web/app/immutable/chunks/{i-66Uv-K.js → BMYcVUUM.js} +1 -1
- package/web/app/immutable/chunks/{8C8OyL-H.js → BOSMtVmb.js} +1 -1
- package/web/app/immutable/chunks/{CVFwlr2Z.js → BPG9IRUj.js} +1 -1
- package/web/app/immutable/chunks/{DHQj_UCz.js → BPRz9VyT.js} +1 -1
- package/web/app/immutable/chunks/{Dxv3G1Mb.js → BSM5O6JV.js} +1 -1
- package/web/app/immutable/chunks/{LbgKUbsl.js → BTR14c-t.js} +3 -3
- package/web/app/immutable/chunks/{C9vs7bl5.js → BWUH3HmG.js} +1 -1
- package/web/app/immutable/chunks/{CIDE3x9D.js → BZp1yALL.js} +1 -1
- package/web/app/immutable/chunks/{NAsYJxQg.js → BbIMIfqX.js} +1 -1
- package/web/app/immutable/chunks/BbV7MtxC.js +1 -0
- package/web/app/immutable/chunks/{wuYAM5lX.js → BeLtysng.js} +1 -1
- package/web/app/immutable/chunks/{DGzlSz-8.js → Bgk8kfr8.js} +1 -1
- package/web/app/immutable/chunks/Bhx5E4sN.js +2 -0
- package/web/app/immutable/chunks/{CD3p1vYG.js → Big1YQpq.js} +1 -1
- package/web/app/immutable/chunks/{DjcKhQp4.js → Bl0Adq86.js} +1 -1
- package/web/app/immutable/chunks/{Dg9xZYld.js → Bl2aLOn5.js} +1 -1
- package/web/app/immutable/chunks/{CzEsFefN.js → BskEvHZa.js} +1 -1
- package/web/app/immutable/chunks/{BShQ2LRb.js → Bt_RDNlI.js} +1 -1
- package/web/app/immutable/chunks/{D478BUHq.js → Bx_nP_MK.js} +1 -1
- package/web/app/immutable/chunks/{BVV3fM7W.js → Bya2sQrR.js} +1 -1
- package/web/app/immutable/chunks/{BqUUWX71.js → Byj6QL5F.js} +1 -1
- package/web/app/immutable/chunks/{BYx2Y144.js → C-Qm3bfA.js} +1 -1
- package/web/app/immutable/chunks/{BrQ0wqQy.js → C1wjuTFV.js} +1 -1
- package/web/app/immutable/chunks/{CU9Jo2EB.js → C3L3GwMq.js} +1 -1
- package/web/app/immutable/chunks/{DzGon3k8.js → C4qqiNcA.js} +1 -1
- package/web/app/immutable/chunks/{C_RGTtXj.js → C5cRG0yV.js} +3 -3
- package/web/app/immutable/chunks/{B1ScYY03.js → C9otdzZM.js} +4 -4
- package/web/app/immutable/chunks/{Ccaz1_yi.js → CGINFMqT.js} +1 -1
- package/web/app/immutable/chunks/{DUCIVWu4.js → CJHViisg.js} +3 -3
- package/web/app/immutable/chunks/{g5Oev8-0.js → CNUg0Cs8.js} +1 -1
- package/web/app/immutable/chunks/{CubYUWh2.js → CO15VKbw.js} +1 -1
- package/web/app/immutable/chunks/{BrYKR-SG.js → CVOsommd.js} +2 -2
- package/web/app/immutable/chunks/{CM4RKAei.js → C_z20mJT.js} +1 -1
- package/web/app/immutable/chunks/{Oa6WXH6c.js → Cb4s3Dt_.js} +3 -3
- package/web/app/immutable/chunks/{Cnly_zgc.js → CgS1Dv_8.js} +1 -1
- package/web/app/immutable/chunks/{Cn2kUD4R.js → Ch9oF0ek.js} +1 -1
- package/web/app/immutable/chunks/{D39Rrj4Y.js → CjorBqRt.js} +1 -1
- package/web/app/immutable/chunks/{C1d-f55y.js → CkVsI2Jc.js} +1 -1
- package/web/app/immutable/chunks/{CD6wiERl.js → CmVyGqNV.js} +2 -2
- package/web/app/immutable/chunks/{ZWDSGAzi.js → CpBPE3-0.js} +1 -1
- package/web/app/immutable/chunks/{DxNx74qV.js → CpHAR9_T.js} +1 -1
- package/web/app/immutable/chunks/{DlZbnYcc.js → CpY-WDD9.js} +1 -1
- package/web/app/immutable/chunks/{m2KtwqZj.js → Cq0xvhw9.js} +3 -3
- package/web/app/immutable/chunks/{BTli9eoV.js → Cq8fk3CH.js} +1 -1
- package/web/app/immutable/chunks/{BSQOiuf7.js → CrLichOk.js} +1 -1
- package/web/app/immutable/chunks/CsqD9xz6.js +2 -0
- package/web/app/immutable/chunks/{CuHcMIuh.js → CssvkQD7.js} +1 -1
- package/web/app/immutable/chunks/{p1enVnf-.js → CuoerPJp.js} +3 -3
- package/web/app/immutable/chunks/{BCKdYbDN.js → CvH6beJr.js} +1 -1
- package/web/app/immutable/chunks/{CtoSWfC3.js → CyQJi5fM.js} +1 -1
- package/web/app/immutable/chunks/{CDfNySzn.js → CytLF-ur.js} +6 -6
- package/web/app/immutable/chunks/{DSEn8hom.js → D00mCTUs.js} +1 -1
- package/web/app/immutable/chunks/{fUWZZKuh.js → D0VMf2Fp.js} +3 -3
- package/web/app/immutable/chunks/{BAL5XTLB.js → D0g6v2_u.js} +1 -1
- package/web/app/immutable/chunks/{IF38I4hJ.js → D1FSU9Gk.js} +1 -1
- package/web/app/immutable/chunks/{DP_4YjFn.js → D1Vat_ZV.js} +1 -1
- package/web/app/immutable/chunks/{C0w-ozGP.js → D3rVaYU0.js} +1 -1
- package/web/app/immutable/chunks/{CNrMRWtA.js → D4LnecGU.js} +2 -2
- package/web/app/immutable/chunks/{CfrI0flQ.js → D5kZvSPC.js} +1 -1
- package/web/app/immutable/chunks/{CGa_N4XN.js → D9H2UCuG.js} +1 -1
- package/web/app/immutable/chunks/{DhFCUcs_.js → DAwOD17b.js} +1 -1
- package/web/app/immutable/chunks/{DW6bFMyN.js → DC3pczce.js} +1 -1
- package/web/app/immutable/chunks/{9JxkPVF4.js → DD4-FHBp.js} +1 -1
- package/web/app/immutable/chunks/{LOqiMc_U.js → DHBQy6St.js} +1 -1
- package/web/app/immutable/chunks/{CGyzoULR.js → DHbwKi-E.js} +2 -2
- package/web/app/immutable/chunks/{CK1KGIDF.js → DQTzZEWU.js} +2 -2
- package/web/app/immutable/chunks/{Bx9jZIih.js → DVlYg0SZ.js} +3 -3
- package/web/app/immutable/chunks/{BPvTHi1E.js → DWWTsFh-.js} +1 -1
- package/web/app/immutable/chunks/{PRiKArA2.js → DXcrfgZH.js} +1 -1
- package/web/app/immutable/chunks/{CwzEnqS-.js → Db7PzaF_.js} +1 -1
- package/web/app/immutable/chunks/{BJ3gWX43.js → DjKDfA1m.js} +2 -2
- package/web/app/immutable/chunks/{jbEf1eyu.js → DkNdI_Wp.js} +1 -1
- package/web/app/immutable/chunks/{CWv2hgO9.js → DkgfeEA0.js} +1 -1
- package/web/app/immutable/chunks/{BpOARSV2.js → DlBKZ9jQ.js} +2 -2
- package/web/app/immutable/chunks/{Mq-KWmnJ.js → Ds8ezw9K.js} +1 -1
- package/web/app/immutable/chunks/{BSEFatJl.js → DsCJG1hb.js} +1 -1
- package/web/app/immutable/chunks/{Dr8wZpId.js → Dtqu7Pxg.js} +1 -1
- package/web/app/immutable/chunks/{LWmvlIUb.js → DuTju9rc.js} +1 -1
- package/web/app/immutable/chunks/{DJ5x8cvc.js → DvCS4TTw.js} +1 -1
- package/web/app/immutable/chunks/{HzX2dyQQ.js → DyIRpoZq.js} +1 -1
- package/web/app/immutable/chunks/{HtczSd2T.js → DzmdzUVi.js} +1 -1
- package/web/app/immutable/chunks/{DB-v9jra.js → MzfVdJbX.js} +1 -1
- package/web/app/immutable/chunks/{CY0JcuWq.js → OiHDtgNp.js} +1 -1
- package/web/app/immutable/chunks/{D_duQWml.js → QWfAA7k-.js} +1 -1
- package/web/app/immutable/chunks/{Bh3GosDM.js → TaZ6zGN1.js} +1 -1
- package/web/app/immutable/chunks/{CTRz9TAp.js → Tqm9-f9l.js} +1 -1
- package/web/app/immutable/chunks/{BffM0X9l.js → Vfi0Dmt8.js} +1 -1
- package/web/app/immutable/chunks/{DPVE_K_W.js → W67SWYQh.js} +1 -1
- package/web/app/immutable/chunks/{D3110at5.js → YhYmjxML.js} +1 -1
- package/web/app/immutable/chunks/{BCReWepB.js → aCDFJfWo.js} +1 -1
- package/web/app/immutable/chunks/{DtIte6Mn.js → aokikQw5.js} +47 -47
- package/web/app/immutable/chunks/{Dg8d6CfG.js → buVzC4lf.js} +1 -1
- package/web/app/immutable/chunks/{DfPFNZRA.js → c1DCm8IK.js} +1 -1
- package/web/app/immutable/chunks/{DnxaSjad.js → cU6Fqv3g.js} +1 -1
- package/web/app/immutable/chunks/{ChdfugfS.js → dGnsWF4N.js} +1 -1
- package/web/app/immutable/chunks/{DYUOfSUt.js → ivBdCvd6.js} +1 -1
- package/web/app/immutable/chunks/{DDJJ0r24.js → kbpbXlKS.js} +1 -1
- package/web/app/immutable/chunks/{Pyx0yui4.js → lZNvj_WH.js} +1 -1
- package/web/app/immutable/chunks/{Dd5fSdFI.js → rUCEwUE_.js} +1 -1
- package/web/app/immutable/chunks/{BM1o8cfq.js → t94_2IkW.js} +1 -1
- package/web/app/immutable/chunks/{DgcVHfLT.js → tSlfPnTD.js} +1 -1
- package/web/app/immutable/chunks/y2YthUTc.js +1 -0
- package/web/app/immutable/chunks/{DL8IL3dP.js → yTlZ1Sih.js} +1 -1
- package/web/app/immutable/entry/{app.0rhGzEA-.js → app.CYYj7JvH.js} +2 -2
- package/web/app/immutable/entry/start.BH_-Ros5.js +1 -0
- package/web/app/immutable/nodes/{0.7iTMX8MP.js → 0.vJoG8nTo.js} +1 -1
- package/web/app/immutable/nodes/{1.BwagR4s9.js → 1.Di6AbyQm.js} +1 -1
- package/web/app/immutable/nodes/{10.DuZeAxuV.js → 10.BkazfxT8.js} +16 -16
- package/web/app/immutable/nodes/{11.D7qyNhVk.js → 11.Ck_7PTgk.js} +4 -4
- package/web/app/immutable/nodes/{15.De8ZpDZ1.js → 15.DWwqZzAg.js} +1 -1
- package/web/app/immutable/nodes/{19.Df09vK0B.js → 19.CjDPuA-n.js} +2 -2
- package/web/app/immutable/nodes/{2.Dlt4LRYB.js → 2.B7bl9OWL.js} +4 -4
- package/web/app/immutable/nodes/{3.PjliZTHk.js → 3.CY1Mye6q.js} +1 -1
- package/web/app/immutable/nodes/{4.OFyddHWG.js → 4.sNrk6dxf.js} +1 -1
- package/web/app/immutable/nodes/{5.C7naJyKP.js → 5.BrOibHKo.js} +1 -1
- package/web/app/immutable/nodes/{6.k4q9sApB.js → 6.BVYLHxv3.js} +1 -1
- package/web/app/immutable/nodes/{7.C4plvmUt.js → 7.BZ0ZLzU_.js} +1 -1
- package/web/app/immutable/nodes/{8.tv1szX_U.js → 8.BNlg4qDc.js} +1 -1
- package/web/app/immutable/nodes/{9.gOkUPoOT.js → 9.C8X38wWW.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/Ct4BiqZH.js +0 -2
- package/web/app/immutable/chunks/D9WrKwE8.js +0 -1
- package/web/app/immutable/chunks/DbaZdUr0.js +0 -1
- package/web/app/immutable/chunks/tm_HKw3E.js +0 -2
- package/web/app/immutable/entry/start.piZarN4f.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as Lt,bo as ee,_ as Xr,bw as zt,bs as ce,bq as ir,b as At,bm as c}from"./AeC4KVgG.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as S,aB as P,bj as Jr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./CJxGDkBm.js";import{i as Q}from"./k2awEenT.js";import{k as Pr}from"./HftJbvyF.js";import{g as Ct}from"./CswzK9Go.js";import{c as Rt}from"./ZcoUa9Jg.js";import{b as $r}from"./NtFyWdpR.js";import{IX as j,nK as kr,vX as Ir,vW as Cr,Lb as Qr,Lc as ea,eB as ta,eC as ra,KD as fr,lW as Gt,C5 as vr,so as pr,o6 as aa,zJ as oa,a8 as gr,Ju as ia,JK as na,nl as sa,iM as la,nM as da,vo as ca,A4 as ua,KC as fa}from"./BkzMrEqG.js";import{g as va}from"./BrMXrCxP.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./Hy_004pB.js";import{bA as ya,bN as Pa,ds as $a}from"./BEyxbMng.js";import{w as _r,d as ka}from"./BGJLgHC7.js";import{f as Ia}from"./CZ-8NDq0.js";import{k as Qt}from"./DbaZdUr0.js";import{f as Ce}from"./DJM6amHV.js";import{h as Ca}from"./jhNNYE0v.js";import"./Dp2nUoTL.js";import{s as at,g as It,f as hr}from"./DrHJ7oPv.js";import{F as et,ab as Sa,at as Fa,aY as Da,b2 as jt,cs as Ta,ct as Ea,bl as Ra,cR as Ma,c8 as Ua}from"./Ci7mS1ie.js";import{S as wr}from"./F1SvNoTt.js";import{c as ja}from"./ChTqQfQN.js";import"./BNODdf6r.js";import{$ as Va}from"./DtIte6Mn.js";import{i as er,b as La,a as za}from"./H2jLkRRS.js";import{C as ar,p as Aa}from"./CkuFMgpI.js";import{M as Wa}from"./LbgKUbsl.js";import{l as tr,m as Sr}from"./DWUO9rBe.js";import"./BSnHR4nh.js";import{E as Na}from"./TF9FVLD5.js";import{a as Ba}from"./BMA5swWG.js";import"./Bw3fY4XA.js";import{M as Mt}from"./TM3R3t4N.js";import{V as Oa}from"./Bf8LaRpQ.js";import{bT as Ha,b7 as qa}from"./C7Y9ew7Z.js";import{g as Ka}from"./CP82XwtW.js";import{G as Xa}from"./DWPd-rzt.js";import{g as Ja,W as Ya}from"./DaHbZjgp.js";import{b as Ga,h as Za}from"./DPfWnZYT.js";import{t as Qa}from"./DXXjnBc_.js";const Fr=j.createSelector((J,w)=>kr(J.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(J,w){if(new.target)return Lt({component:or,...J});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Se=crypto.randomUUID(),we=Fr(Se),ge=new WeakMap;let G=N(null),Xe=N(void 0),L=N(1),B=N(1),se=N(!0),me=N(!1),Fe=N(null),A=N(0);const be=n(()=>ye()?.error??e(Fe)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Se,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Se,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Fe,null),f(se,!0),f(L,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Xr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(G,M)}catch(W){if(I)return;f(Fe,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Xe),b=e(L),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const X=(ge.get(E)??1)-1;X?ge.set(E,X):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const X=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(X.width*X.height)));I.width=Math.ceil(X.width*Z),I.height=Math.ceil(X.height*Z),I.style.width=`${X.width}px`,I.style.height=`${X.height}px`,_e=E.render({canvas:I,viewport:X,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Fe,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:zt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());Na(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Ba(d,{get label(){return e(I)},count:1,class:"p-4"})}},F=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(L)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(L,-1),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=S(M,!0),E=p(M,2);{let ue=n(()=>e(L)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(L),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var X=p(oe,2),Z=S(X,!0),it=p(X,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Xe,ue),()=>e(Xe)),x(nt),k((ue,Ee,Le)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",Le),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(L)),total:tr(e(G).numPages)}),()=>Sr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(L))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(F,2)})}x(Ve),l(J,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((J,w)=>kr(J.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(J,w){if(new.target)return Lt({component:Dr,...J});Wt(w,!0);const ye=()=>ce(Xe,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Se=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Xe=ro(G),L=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Jr(()=>{me=!0,j.dispatch(Qr(G))});function Fe(){if(me||e(L))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(G,i.hostname,i.toString()))}function A(i){if(me)return;const F=i.currentTarget.error?.code;F===2?f(ge,"network"):F!==1&&Fe()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Se()},set downloading(i){Se(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:zt,$on:(i,F)=>At(w,i,F)},De=so(),Ne=T(De);{var Ve=i=>{var F=io(),Te=T(F),d=S(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),X=S(oe,!0);k(Z=>g(X,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),X=S(oe,!0);k(Z=>g(X,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(L)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Se()},children:(oe,X)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(F),k(()=>g(d,ae())),l(i,F)},Be=i=>{var F=no(),Te=S(F,!0);k(d=>{at(F,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",F,A),rt("loadedmetadata",F,d=>{d.currentTarget.videoWidth===0&&Fe()}),l(i,F)};Q(Ne,i=>{e(B)||e(L)?i(Ve):i(Be,-1)})}x(De),l(J,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(J,w){if(new.target)return Lt({component:Vt,...J});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=S(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Fe))),l(t,a)},ot=ja("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Se=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Xe=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},L=n(()=>Xe(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Fe=n(()=>Sr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function F(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Se()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},X=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(L)==="video"?M():e(L)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
1
|
+
import{t as Lt,bo as ee,_ as Xr,bw as zt,bs as ce,bq as ir,b as At,bm as c}from"./AeC4KVgG.js";import{bs as Wt,ca as pe,aD as e,bH as f,a5 as T,bA as x,W as l,bn as Nt,bV as N,c9 as n,aA as te,c6 as Ut,ay as ne,be as Ze,b$ as tt,b_ as k,bO as g,bS as p,bl as S,aB as P,bj as Jr,aw as rt,ai as Yr,c5 as rr,a as yr,a7 as je,aj as gt,cd as Gr,br as Zr}from"./CJxGDkBm.js";import{i as Q}from"./k2awEenT.js";import{k as Pr}from"./HftJbvyF.js";import{g as Ct}from"./CswzK9Go.js";import{c as Rt}from"./ZcoUa9Jg.js";import{b as $r}from"./NtFyWdpR.js";import{IX as j,nK as kr,vX as Ir,vW as Cr,Lb as Qr,Lc as ea,eB as ta,eC as ra,KD as fr,lW as Gt,C5 as vr,so as pr,o6 as aa,zJ as oa,a8 as gr,Ju as ia,JK as na,nl as sa,iM as la,nM as da,vo as ca,A4 as ua,KC as fa}from"./BkzMrEqG.js";import{g as va}from"./BrMXrCxP.js";import{a as pa,h as ga,j as ma,c as _a,d as ha,i as wa,e as ba,f as mr,g as xa,b as Zt}from"./Hy_004pB.js";import{bA as ya,bN as Pa,ds as $a}from"./BEyxbMng.js";import{w as _r,d as ka}from"./BGJLgHC7.js";import{f as Ia}from"./CZ-8NDq0.js";import{m as Qt}from"./BbV7MtxC.js";import{f as Ce}from"./DJM6amHV.js";import{h as Ca}from"./jhNNYE0v.js";import"./Dp2nUoTL.js";import{s as at,g as It,f as hr}from"./DrHJ7oPv.js";import{F as et,ab as Sa,at as Fa,aY as Da,b2 as jt,cs as Ta,ct as Ea,bl as Ra,cR as Ma,c8 as Ua}from"./Ci7mS1ie.js";import{S as wr}from"./F1SvNoTt.js";import{c as ja}from"./ChTqQfQN.js";import"./BNODdf6r.js";import{$ as Va}from"./aokikQw5.js";import{i as er,b as La,a as za}from"./H2jLkRRS.js";import{C as ar,p as Aa}from"./CkuFMgpI.js";import{M as Wa}from"./BTR14c-t.js";import{l as tr,m as Sr}from"./DWUO9rBe.js";import"./BSnHR4nh.js";import{E as Na}from"./TF9FVLD5.js";import{a as Ba}from"./BMA5swWG.js";import"./Bw3fY4XA.js";import{M as Mt}from"./TM3R3t4N.js";import{V as Oa}from"./Bf8LaRpQ.js";import{bT as Ha,b7 as qa}from"./B0JbhmMb.js";import{g as Ka}from"./CP82XwtW.js";import{G as Xa}from"./DWPd-rzt.js";import{g as Ja,W as Ya}from"./DaHbZjgp.js";import{b as Ga,h as Za}from"./DPfWnZYT.js";import{t as Qa}from"./DXXjnBc_.js";const Fr=j.createSelector((J,w)=>kr(J.pdfPreview.previews,w));var eo=P('<div class="flex shrink-0 flex-wrap items-center justify-center gap-2 border-b border-border p-2"><!> <span aria-live="polite"> </span> <!> <!> <span> </span> <!></div> <div class="min-h-0 flex-1 overflow-auto p-4"><canvas class="mx-auto block" role="img"></canvas></div>',1),to=P('<div class="flex h-full min-h-0 flex-col" data-testid="pdf-viewer"><!></div>');function or(J,w){if(new.target)return Lt({component:or,...J});Wt(w,!0);const ye=()=>ce(we,"$preview",ot),[ot,re]=ir();let y=ee(w,"workspaceId",7),ae=ee(w,"filePath",7),Pe=ee(w,"gitRootId",7);const Se=crypto.randomUUID(),we=Fr(Se),ge=new WeakMap;let G=N(null),Xe=N(void 0),L=N(1),B=N(1),se=N(!0),me=N(!1),Fe=N(null),A=N(0);const be=n(()=>ye()?.error??e(Fe)),De=n(()=>e(be)==="missing"?c.file_pdf_missing_error():e(be)==="large"?c.file_pdf_large_error():e(be)==="invalid"?c.file_pdf_invalid_error():e(be)==="password"?c.file_pdf_password_error():c.file_pdf_load_error());pe(()=>{const d=y(),I=ae();e(A);const b=crypto.randomUUID();return j.dispatch(Ir(Se,b,d,I,...Pe()?[{gitRootId:Pe()}]:[])),()=>{j.dispatch(Cr(Se,b))}}),pe(()=>{const d=ye()?.url;let I=!1,b;if(f(G,null),f(Fe,null),f(se,!0),f(L,1),f(B,1),!!d)return(async()=>{try{const{loadPdfDocument:W}=await Xr(async()=>{const{loadPdfDocument:_e}=await import("./cb1JHFKl.js");return{loadPdfDocument:_e}},[],import.meta.url);if(I)return;b=W(d);const M=await b.promise;I||f(G,M)}catch(W){if(I)return;f(Fe,W instanceof Error&&W.name==="PasswordException"?"password":W instanceof Error&&W.name==="InvalidPDFException"?"invalid":"load",!0)}finally{I||f(se,!1)}})(),()=>{I=!0,b?.destroy()}}),pe(()=>{const d=e(G),I=e(Xe),b=e(L),W=e(B);if(!d||!I)return;let M=!1,_e,E;const oe=()=>{if(!E)return;const X=(ge.get(E)??1)-1;X?ge.set(E,X):(ge.delete(E),E.cleanup()),E=void 0};return f(me,!0),(async()=>{try{if(E=await d.getPage(b),ge.set(E,(ge.get(E)??0)+1),M){oe();return}const X=E.getViewport({scale:W}),Z=Math.min(window.devicePixelRatio||1,2,Math.sqrt(16e6/(X.width*X.height)));I.width=Math.ceil(X.width*Z),I.height=Math.ceil(X.height*Z),I.style.width=`${X.width}px`,I.style.height=`${X.height}px`,_e=E.render({canvas:I,viewport:X,transform:[Z,0,0,Z,0,0]}),await _e.promise}catch{M||f(Fe,"invalid")}finally{M||f(me,!1)}})(),()=>{M=!0,_e?.cancel(),_e?_e.promise.then(oe,oe):oe()}});var Ne={get workspaceId(){return y()},set workspaceId(d){y(d),te()},get filePath(){return ae()},set filePath(d){ae(d),te()},get gitRootId(){return Pe()},set gitRootId(d){Pe(d),te()},$set:zt,$on:(d,I)=>At(w,d,I)},Ve=to(),Be=T(Ve);{var o=d=>{{const I=W=>{Ze();var M=tt();k(()=>g(M,e(De))),l(W,M)};let b=n(()=>c.ui_combobox_retry_label());Na(d,{onRetry:()=>Ut(A),get retryLabel(){return e(b)},class:"m-auto",message:I,$$slots:{message:!0}})}},i=d=>{{let I=n(()=>c.file_pdf_loading_label());Ba(d,{get label(){return e(I)},count:1,class:"p-4"})}},F=d=>{var I=eo(),b=ne(I),W=T(b);{let ue=n(()=>e(L)<=1);Ce(W,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(L,-1),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_previous_label()]),l(Ee,fe)},$$slots:{default:!0}})}var M=p(W,2),_e=S(M,!0),E=p(M,2);{let ue=n(()=>e(L)>=e(G).numPages);Ce(E,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>Ut(L),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.file_pdf_next_label()]),l(Ee,fe)},$$slots:{default:!0}})}var oe=p(E,2);{let ue=n(()=>e(B)<=.25);Ce(oe,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.max(.25,e(B)-.25),!0),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomOut_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}var X=p(oe,2),Z=S(X,!0),it=p(X,2);{let ue=n(()=>e(B)>=3);Ce(it,{variant:"ghost",size:"compact",get disabled(){return e(ue)},onclick:()=>f(B,Math.min(3,e(B)+.25),!0),children:(Ee,Le)=>{Ze();var fe=tt();k(ze=>g(fe,ze),[()=>c.editor_fileViewer_zoomIn_tooltip()]),l(Ee,fe)},$$slots:{default:!0}})}x(b);var nt=p(b,2),st=T(nt);let ut;$r(st,ue=>f(Xe,ue),()=>e(Xe)),x(nt),k((ue,Ee,Le)=>{g(_e,ue),g(Z,Ee),at(nt,"aria-busy",e(me)),at(st,"aria-label",Le),ut=It(st,"",ut,{visibility:e(me)?"hidden":"visible"})},[()=>c.file_pdf_page_label({page:tr(e(L)),total:tr(e(G).numPages)}),()=>Sr(e(B),{style:"percent"}),()=>c.file_pdf_canvas_ariaLabel({name:ae(),page:tr(e(L))})]),l(d,I)};Q(Be,d=>{e(be)?d(o):e(se)||ye()?.status==="loading"?d(i,1):e(G)&&d(F,2)})}x(Ve),l(J,Ve);var Te=Nt(Ne);return re(),Te}const ro=j.createSelector((J,w)=>kr(J.videoPreview.previews,w));var ao=P('<p role="status"> </p>'),oo=P('<p role="alert"> </p>'),io=P('<div class="flex flex-col items-center gap-3 p-6 text-center text-sm text-subtle"><p class="break-all"> </p> <!> <!></div>'),no=P('<video controls="" preload="metadata" playsinline="" class="max-w-full max-h-full" data-testid="file-video"> </video>',2),so=P('<div class="min-h-0 flex-1 flex items-center justify-center bg-background"><!></div>');function Dr(J,w){if(new.target)return Lt({component:Dr,...J});Wt(w,!0);const ye=()=>ce(Xe,"$preview",ot),[ot,re]=ir();let y=ee(w,"sourceUrl",7),ae=ee(w,"fileName",7),Pe=ee(w,"allowDownload",7),Se=ee(w,"downloading",7),we=ee(w,"onDownload",7),ge=N(null);const G=crypto.randomUUID(),Xe=ro(G),L=n(()=>ye()?.status==="loading"),B=n(()=>e(ge)??ye()?.error);let se=!1,me=!1;Jr(()=>{me=!0,j.dispatch(Qr(G))});function Fe(){if(me||e(L))return;const i=y().startsWith("workspace-file://")?new URL(y()):null;if(se||!i||!i.pathname.toLowerCase().endsWith(".mp4")){f(ge,"unsupported");return}se=!0,i.searchParams.set("preview","h264"),j.dispatch(ea(G,i.hostname,i.toString()))}function A(i){if(me)return;const F=i.currentTarget.error?.code;F===2?f(ge,"network"):F!==1&&Fe()}var be={get sourceUrl(){return y()},set sourceUrl(i){y(i),te()},get fileName(){return ae()},set fileName(i){ae(i),te()},get allowDownload(){return Pe()},set allowDownload(i){Pe(i),te()},get downloading(){return Se()},set downloading(i){Se(i),te()},get onDownload(){return we()},set onDownload(i){we(i),te()},$set:zt,$on:(i,F)=>At(w,i,F)},De=so(),Ne=T(De);{var Ve=i=>{var F=io(),Te=T(F),d=S(Te,!0),I=p(Te,2);{var b=E=>{var oe=ao(),X=S(oe,!0);k(Z=>g(X,Z),[()=>c.editor_fileViewer_videoPreparing_label()]),l(E,oe)},W=E=>{var oe=oo(),X=S(oe,!0);k(Z=>g(X,Z),[()=>e(B)==="network"?c.editor_fileViewer_videoLoad_error():c.editor_fileViewer_videoUnsupported_label()]),l(E,oe)};Q(I,E=>{e(L)?E(b):E(W,-1)})}var M=p(I,2);{var _e=E=>{Ce(E,{variant:"secondary",size:"sm",get onclick(){return we()},get disabled(){return Se()},children:(oe,X)=>{Ze();var Z=tt();k(it=>g(Z,it),[()=>c.layout_fileTab_downloadFile_label()]),l(oe,Z)},$$slots:{default:!0}})};Q(M,E=>{Pe()&&E(_e)})}x(F),k(()=>g(d,ae())),l(i,F)},Be=i=>{var F=no(),Te=S(F,!0);k(d=>{at(F,"src",ye()?.url??y()),g(Te,d)},[()=>c.editor_fileViewer_videoUnsupported_label()]),rt("error",F,A),rt("loadedmetadata",F,d=>{d.currentTarget.videoWidth===0&&Fe()}),l(i,F)};Q(Ne,i=>{e(B)||e(L)?i(Ve):i(Be,-1)})}x(De),l(J,De);var o=Nt(be);return re(),o}var lo=P('<!> <span class="text-xs text-subtle min-w-[50px] text-center"> </span> <!> <div class="w-px h-5 bg-border mx-1"></div>',1),co=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="w-px h-5 bg-border mx-1"></div> <!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),uo=P('<div class="min-h-0 flex-1 flex flex-col"><div class="flex items-center gap-2 p-2 border-b border-border bg-muted/30"><!> <!> <div class="ml-auto text-xs text-subtle"> </div></div> <div><img draggable="false" class="max-w-full max-h-full object-contain"/></div></div>'),fo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19V6l12-3v13M9 19c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zm12-3c0 1.105-1.343 2-3 2s-3-.895-3-2 1.343-2 3-2 3 .895 3 2zM9 10l12-3"></path></svg></div> <div class="text-sm text-subtle mb-4"> </div> <audio controls="" class="w-full max-w-md"><source/> </audio></div>'),vo=P("<!> ",1),po=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"></path></svg></div> <p class="text-sm text-subtle mb-4"> </p> <!></div>'),go=P('<th class="border border-border px-2 py-1 text-left text-xs font-medium bg-muted"> </th>'),mo=P('<td class="border border-border px-2 py-1 text-xs"> </td>'),_o=P("<tr></tr>"),ho=P('<div class="flex-1 overflow-auto p-4"><table class="w-full border-collapse"><thead><tr></tr></thead><tbody></tbody></table></div>'),wo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),bo=P('<div class="flex-1 flex flex-col items-center justify-center p-8"><div class="text-subtle mb-4"><svg class="w-24 h-24" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path></svg></div> <p class="text-sm text-subtle mb-2"> </p> <p class="text-xs text-subtle"> </p></div>'),xo=P('<div class="h-full flex flex-col"><!></div>');function Vt(J,w){if(new.target)return Lt({component:Vt,...J});Wt(w,!0);const ye=t=>{var a=lo(),u=ne(a);{let O=n(()=>c.editor_fileViewer_zoomOut_tooltip());Ce(u,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:oe,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ta},size:"sm"})},$$slots:{default:!0}})}var m=p(u,2),h=S(m,!0),R=p(m,2);{let O=n(()=>c.editor_fileViewer_zoomIn_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:E,get title(){return e(O)},children:(D,V)=>{et(D,{get icon(){return Ea},size:"sm"})},$$slots:{default:!0}})}Ze(2),k(()=>g(h,e(Fe))),l(t,a)},ot=ja("FileViewer");let re=ee(w,"filePath",7),y=ee(w,"fileContent",7,""),ae=ee(w,"sourceUrl",7),Pe=ee(w,"language",7),Se=ee(w,"isBinary",7),we=ee(w,"allowDownload",7,!0),ge=ee(w,"onDownload",7),G=ee(w,"downloading",7,!1);const Xe=t=>{const a=t.split(".").pop()?.toLowerCase()||"";return["png","jpg","jpeg","gif","webp","bmp","ico","avif"].includes(a)?"image":a==="svg"?"svg":["mp4","webm","ogg","mov","avi"].includes(a)?"video":["mp3","wav","ogg","m4a","flac"].includes(a)?"audio":a==="pdf"?"pdf":["md","markdown"].includes(a)?"markdown":a==="json"?"json":a==="csv"?"csv":["yaml","yml"].includes(a)?"yaml":a==="xml"?"xml":["zip","tar","gz","rar","7z","bz2"].includes(a)?"archive":["exe","dll","so","dylib","wasm"].includes(a)?"binary":"text"},L=n(()=>Xe(re())),B=n(()=>re().split("/").pop()||c.editor_fileViewer_unknown_fallback());let se=N(100),me=N(0);const Fe=n(()=>Sr(e(se)/100,{style:"percent",maximumFractionDigits:0}));let A=N(!1),be=N(0),De=N(0),Ne=N(0),Ve=N(0),Be=N(!1),o=null;function i(){const t=o;o=null,f(Be,!1),t?.viewport.hasPointerCapture(t.pointerId)&&t.viewport.releasePointerCapture(t.pointerId)}function F(t){if(t.button!==0||!t.isPrimary||o)return;const a=t.currentTarget;a.setPointerCapture(t.pointerId),o={pointerId:t.pointerId,x:t.clientX,y:t.clientY,viewport:a},f(Be,!0),t.preventDefault()}function Te(t){if(!(!o||t.pointerId!==o.pointerId)){if((t.buttons&1)===0){i();return}f(Ne,o.viewport.scrollLeft,!0),f(Ve,o.viewport.scrollTop,!0),f(be,e(be)+(t.clientX-o.x)),f(De,e(De)+(t.clientY-o.y)),o.x=t.clientX,o.y=t.clientY}}function d(t){t.pointerId===o?.pointerId&&i()}pe(()=>{re(),ae(),e(se),e(me),f(Ne,0),f(Ve,0)}),pe(()=>(re(),ae(),rr(()=>{i(),f(be,0),f(De,0)}),i));const I=t=>{const a=t.split(".").pop()?.toLowerCase();return a==="jpg"||a==="jpeg"?"image/jpeg":a==="png"?"image/png":a==="gif"?"image/gif":a==="webp"?"image/webp":"application/octet-stream"},b=t=>{const a=t.split(".").pop()?.toLowerCase();if(a==="mp4")return"video/mp4";if(a==="webm")return"video/webm"},W=()=>{if(ae())return ae();if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():Se()?`data:${I(re())};base64,${y()}`:`data:${I(re())};base64,${y()}`;if(y()instanceof ArrayBuffer){const a=new Uint8Array(y()).reduce((m,h)=>m+String.fromCharCode(h),""),u=btoa(a);return`data:${I(re())};base64,${u}`}return""},M=()=>{if(ae())return ae();const t=b(re());if(!t)return"";if(typeof y()=="string")return y().startsWith("data:")||y().startsWith("http")?y():`data:${t};base64,${y()}`;const a=new Uint8Array(y()),u=[],m=32768;for(let h=0;h<a.length;h+=m)u.push(String.fromCharCode(...a.subarray(h,h+m)));return`data:${t};base64,${btoa(u.join(""))}`},_e=()=>{const t=typeof y()=="string"?new TextEncoder().encode(y()):new Uint8Array(y()),a=[],u=32768;for(let m=0;m<t.length;m+=u)a.push(String.fromCharCode(...t.subarray(m,m+u)));return`data:image/svg+xml;base64,${btoa(a.join(""))}`},E=()=>{f(se,Math.min(e(se)+25,500),!0)},oe=()=>{f(se,Math.max(e(se)-25,25),!0)},X=()=>{f(me,(e(me)+90)%360)},Z=()=>{if(!we()||G())return;if(ge()){ge()();return}const t=document.createElement("a");t.href=e(L)==="video"?M():e(L)==="svg"?_e():W(),t.download=e(B),t.click()},it=async()=>{try{const t=W(),a=new Image;a.crossOrigin="anonymous";const u=await new Promise((m,h)=>{a.onload=()=>{const R=document.createElement("canvas");R.width=a.naturalWidth,R.height=a.naturalHeight;const O=R.getContext("2d");if(!O){h(new Error("Failed to get canvas context"));return}O.drawImage(a,0,0),R.toBlob(D=>{D?m(D):h(new Error("Failed to create blob from canvas"))},"image/png",1)},a.onerror=()=>h(new Error("Failed to load image")),a.src=t});await navigator.clipboard.write([new ClipboardItem({"image/png":u})]),f(A,!0),setTimeout(()=>f(A,!1),2e3)}catch(t){ot.error("Failed to copy image:",t)}},nt=t=>{try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}},st=t=>t.split(`
|
|
2
2
|
`).map(u=>u.split(",").map(m=>m.trim()));var ut={get filePath(){return re()},set filePath(t){re(t),te()},get fileContent(){return y()},set fileContent(t=""){y(t),te()},get sourceUrl(){return ae()},set sourceUrl(t){ae(t),te()},get language(){return Pe()},set language(t){Pe(t),te()},get isBinary(){return Se()},set isBinary(t){Se(t),te()},get allowDownload(){return we()},set allowDownload(t=!0){we(t),te()},get onDownload(){return ge()},set onDownload(t){ge(t),te()},get downloading(){return G()},set downloading(t=!1){G(t),te()},$set:zt,$on:(t,a)=>At(w,t,a)},ue=xo();rt("blur",yr,i);var Ee=T(ue);{var Le=t=>{var a=co(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let he=n(()=>c.editor_fileViewer_rotate_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:X,get title(){return e(he)},children:($e,He)=>{et($e,{get icon(){return Sa},size:"sm"})},$$slots:{default:!0}})}var R=p(h,4);{let he=n(()=>c.editor_fileViewer_copyImage_tooltip());Ce(R,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:it,get title(){return e(he)},children:($e,He)=>{var ke=je(),Ft=ne(ke);{var Dt=Ie=>{et(Ie,{get icon(){return Fa},size:"sm",class:"text-green-500"})},Ye=Ie=>{et(Ie,{get icon(){return Da},size:"sm"})};Q(Ft,Ie=>{e(A)?Ie(Dt):Ie(Ye,-1)})}l($e,ke)},$$slots:{default:!0}})}var O=p(R,2);{let he=n(()=>!we()||G()),$e=n(()=>c.editor_fileViewer_download_tooltip());Ce(O,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(he)},get title(){return e($e)},children:(He,ke)=>{et(He,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var D=p(O,2),V=S(D,!0);x(u);var H=p(u,2),xe=S(H);x(a),k(he=>{g(V,e(B)),hr(H,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(H,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(xe,"src",he),at(xe,"alt",e(B)),It(xe,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100}) rotate(${e(me)??""}deg); transition: transform 0.2s;`)},[()=>W()]),gt("pointerdown",H,F),gt("pointermove",H,Te),gt("pointerup",H,d),rt("pointercancel",H,d),rt("lostpointercapture",H,d),l(t,a)},fe=t=>{var a=uo(),u=T(a),m=T(u);ye(m);var h=p(m,2);{let H=n(()=>!we()||G()),xe=n(()=>c.editor_fileViewer_download_tooltip());Ce(h,{size:"icon",variant:"ghost",class:"h-7 w-7",onclick:Z,get disabled(){return e(H)},get title(){return e(xe)},children:(he,$e)=>{et(he,{get icon(){return jt},size:"sm"})},$$slots:{default:!0}})}var R=p(h,2),O=S(R,!0);x(u);var D=p(u,2),V=S(D);x(a),k(H=>{g(O,e(B)),hr(D,1,`relative min-h-0 flex-1 overflow-auto bg-checkered flex items-center justify-center p-4 select-none ${e(Be)?"cursor-grabbing":"cursor-grab"}`,"svelte-1uj35xu"),It(D,`--pan-scroll-x: ${e(Ne)??""}px; --pan-scroll-y: ${e(Ve)??""}px;`),at(V,"src",H),at(V,"alt",e(B)),It(V,`translate: ${e(be)??""}px ${e(De)??""}px; transform: scale(${e(se)/100});`)},[()=>_e()]),gt("pointerdown",D,F),gt("pointermove",D,Te),gt("pointerup",D,d),rt("pointercancel",D,d),rt("lostpointercapture",D,d),l(t,a)},ze=t=>{const a=n(M);var u=je(),m=ne(u);Pr(m,()=>re()+e(a),h=>{Dr(h,{get sourceUrl(){return e(a)},get fileName(){return e(B)},get allowDownload(){return we()},get downloading(){return G()},onDownload:Z})}),l(t,u)},mt=t=>{var a=fo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=T(h),O=p(R);x(h),x(a),k((D,V)=>{g(m,e(B)),at(R,"src",D),g(O,` ${V??""}`)},[()=>W(),()=>c.editor_fileViewer_audioUnsupported_label()]),l(t,a)},Bt=t=>{var a=po(),u=p(T(a),2),m=S(u,!0),h=p(u,2);{let R=n(()=>!we()||G());Ce(h,{size:"sm",variant:"secondary",onclick:Z,get disabled(){return e(R)},children:(O,D)=>{var V=vo(),H=ne(V);et(H,{get icon(){return jt},size:"sm",class:"mr-2"});var xe=p(H);k(he=>g(xe,` ${he??""}`),[()=>c.editor_fileViewer_downloadPdf_label()]),l(O,V)},$$slots:{default:!0}})}x(a),k(R=>g(m,R),[()=>c.editor_fileViewer_pdfUnavailable_label()]),l(t,a)},Ot=t=>{{let a=n(()=>nt(y().toString()));ar(t,{get value(){return e(a)},language:"json",get fileName(){return re()},lineNumbers:!0,readOnly:!0})}},Oe=t=>{const a=n(()=>st(y().toString()));var u=ho(),m=T(u),h=T(m),R=T(h);Ct(R,23,()=>e(a)[0]||[],(D,V)=>`header-${V}-${D}`,(D,V)=>{var H=go(),xe=S(H,!0);k(()=>g(xe,e(V))),l(D,H)}),x(R),x(h);var O=p(h);Ct(O,23,()=>e(a).slice(1),(D,V)=>`row-${V}`,(D,V,H)=>{var xe=_o();Ct(xe,23,()=>e(V),(he,$e)=>`cell-${e(H)}-${$e}`,(he,$e)=>{var He=mo(),ke=S(He,!0);k(()=>g(ke,e($e))),l(he,He)}),x(xe),l(D,xe)}),x(O),x(m),x(u),l(t,u)},Je=t=>{var a=wo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_archive_label()]),l(t,a)},Ht=t=>{var a=bo(),u=p(T(a),2),m=S(u,!0),h=p(u,2),R=S(h,!0);x(a),k(O=>{g(m,e(B)),g(R,O)},[()=>c.editor_fileViewer_binary_label()]),l(t,a)},St=t=>{{let a=n(()=>y().toString());ar(t,{get value(){return e(a)},get language(){return Pe()},get fileName(){return re()},lineNumbers:!0,highlightActiveLine:!0})}};Q(Ee,t=>{e(L)==="image"?t(Le):e(L)==="svg"?t(fe,1):e(L)==="video"?t(ze,2):e(L)==="audio"?t(mt,3):e(L)==="pdf"?t(Bt,4):e(L)==="json"?t(Ot,5):e(L)==="csv"?t(Oe,6):e(L)==="archive"?t(Je,7):e(L)==="binary"?t(Ht,8):t(St,-1)})}return x(ue),l(J,ue),Nt(ut)}Yr(["pointerdown","pointermove","pointerup"]);const yo=/access denied|permission denied|outside (?:the )?workspace/i,Po=/file not found|no such file or directory/i;function $o(J){return yo.test(J)?"access-denied":J===c.files_read_notFound_error()||Po.test(J)?"not-found":"generic"}function ko(J){switch(J){case"access-denied":return c.layout_fileTab_errorAccessDenied_label();case"not-found":return c.layout_fileTab_errorNotFound_label();case"generic":return c.layout_fileTab_errorGeneric_label()}}var Io=P("<!> <!>",1),Co=P("<!> <!> <!>",1),So=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p> </p> <p class="text-xs"> </p></div>'),br=P('<div class="flex h-full items-center justify-center p-4 text-subtle"><p role="alert"> </p></div>'),Fo=P('<div class="flex h-full items-center justify-center text-subtle"><p> </p></div>'),xr=P('<div class="flex items-center justify-center h-full text-subtle"><p> </p></div>'),Do=P('<div class="flex items-center gap-3"><!> <!></div>'),To=P('<div class="flex flex-col h-full"><div class="flex-1 p-4 space-y-2"></div></div>'),Eo=P('<p class="text-xs"> </p>'),Ro=P("<li><!></li>"),Mo=P('<p class="text-xs mt-2"> </p> <ul class="flex flex-col items-center gap-1"></ul>',1),Uo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-2"><p class="text-danger" role="alert"> </p> <p class="text-xs font-mono"> </p> <!> <!></div>'),jo=P('<div class="flex flex-col items-center justify-center h-full text-subtle gap-3 p-4"><p> </p> <p class="text-xs break-all"> </p> <!></div>'),Vo=P('<div class="h-full overflow-auto p-4"><!></div>');function Lo(J,w){if(new.target)return Lt({component:Lo,...J});Wt(w,!0);const ye=()=>ce(Ot,"$workspace",A),ot=()=>ce(_e,"$fileContentStore",A),re=()=>ce(E,"$fileLoadingStore",A),y=()=>ce(oe,"$fileSavingStore",A),ae=()=>ce(X,"$fileErrorStore",A),Pe=()=>ce(Z,"$fileErrorInfoStore",A),Se=()=>ce(it,"$homeView$",A),we=()=>ce(nt,"$fileNotFoundCandidatesStore",A),ge=()=>ce(st,"$isFileBinaryStore",A),G=()=>ce(ut,"$isFileDirtyStore",A),Xe=()=>ce(ue,"$fileLastUpdatedStore",A),L=()=>ce(Ee,"$ftChanges$",A),B=()=>ce(Bt,"$gutterRead$",A),se=()=>ce(Ve,"$lineWrapping",A),me=()=>ce(Be,"$diffIndicators",A),Fe=()=>ce(ze,"$rootMediaPreview",A),[A,be]=ir(),De=r=>{var s=Io(),$=ne(s);{var C=de=>{var Ae=je(),qe=ne(Ae);Rt(qe,()=>Mt,(pt,xt)=>{xt(pt,{get icon(){return Ra},get label(){return e(he)},disabled:!0})}),l(de,Ae)};Q($,de=>{!e(_t)&&!e(b)&&!e(V)&&de(C)})}var le=p($,2);{var Re=de=>{{let Ae=n(()=>!e(Tt)||!e(Ye)),qe=n(()=>!e(b)&&(!e(Tt)||!e(Ye)));Oa(de,{embedded:!0,showFold:!1,showSplit:!1,get showPreview(){return e(Tt)},get previewEnabled(){return e(Ye)},onTogglePreview:()=>f(Ye,!e(Ye)),get showWrap(){return e(Ae)},get wrapEnabled(){return se()},onToggleWrap:()=>j.dispatch(na()),get showDiff(){return e(qe)},get diffEnabled(){return me()},onToggleDiff:()=>j.dispatch(ia())})}};Q(le,de=>{o().filePath&&!e(_t)&&!e(V)&&de(Re)})}l(r,s)},Ne=r=>{var s=je(),$=ne(s);{var C=le=>{var Re=Co(),de=ne(Re);{var Ae=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_goToChanges_tooltip());Rt(dt,()=>Mt,(Pt,$t)=>{$t(Pt,{get icon(){return Ua},get label(){return e(yt)},onclick:zr})})}l(We,Ge)};Q(de,We=>{e(Rr)&&We(Ae)})}var qe=p(de,2);{var pt=We=>{var Ge=je(),dt=ne(Ge);{let yt=n(()=>c.layout_fileTab_downloadFile_label()),Pt=n(()=>!e(wt)||e(lt));Rt(dt,()=>Mt,($t,Xt)=>{Xt($t,{get icon(){return jt},get label(){return e(yt)},onclick:Et,get disabled(){return e(Pt)}})})}l(We,Ge)};Q(qe,We=>{e(Qe)&&We(pt)})}var xt=p(qe,2);{let We=n(()=>c.layout_fileTab_deleteFile_tooltip());Rt(xt,()=>Mt,(Ge,dt)=>{dt(Ge,{get icon(){return Ma},get label(){return e(We)},onclick:Ar,destructive:!0})})}l(le,Re)};Q($,le=>{o().filePath&&!e(_t)&&!e(b)&&le(C)})}l(r,s)},Ve=Ha(),Be=qa();let o=ee(w,"tab",7),i=ee(w,"workspaceId",7),F=ee(w,"isActive",7),Te=ee(w,"isPanelFocused",7);pe(()=>{const r=i();if(!(!F()||!r||e(d)))return j.dispatch(ta(r,"files")),()=>j.dispatch(ra(r,"files"))});const d=n(()=>typeof o().data?.gitRootId=="string"?o().data.gitRootId:void 0),I=n(()=>typeof o().data?.gitRootPath=="string"?o().data.gitRootPath:void 0),b=n(()=>!!e(d)),W=n(()=>o().filePath?Ia(o().filePath,e(d)):o().filePath),M=Gr(e(W));pe(()=>{M.set(e(W))});const _e=pa(i(),M),E=ga(i(),M),oe=ma(i(),M),X=_a(i(),M),Z=ha(i(),M),it=Qa(i()),nt=wa(i(),M),st=ba(i(),M),ut=mr(i(),M),ue=xa(i(),M),Ee=ya(i()),Le=va(),fe=crypto.randomUUID(),ze=Fr(fe),mt=`file-gutter:${crypto.randomUUID()}`,Bt=Pa(i(),mt),Ot=$a(i()),Oe=n(()=>ye()?.worktreePath||ye()?.repositoryPath||ye()?.path||null),Je=n(ot),Ht=Ja();pe(()=>{e(Je)!==null&&e(Je)!==void 0&&Ht?.markContentLoaded()});const St=n(re),t=n(y),a=n(ae),u=n(()=>e(a)?$o(e(a)):"generic"),m=n(()=>e(a)?Ga(Pe()):null);let h=N(0),R=!1;pe(()=>{const r=Se();if(!r||r.unavailable){R=!1;return}e(m)&&!R&&(R=!0,rr(()=>Ut(h)))});const O=5,D=n(()=>(we()??[]).slice(0,O)),V=n(ge),H=n(G),xe=n(Xe),he=n(()=>e(t)?c.ui_saveIndicator_saving_tooltip():e(H)?c.ui_saveIndicator_autoSaving_tooltip():c.ui_saveIndicator_saved_tooltip());let $e=N(null),He=N(Zr([])),ke=N(null),Ft=N(void 0),Dt=N(void 0),Ye=N(!0);pe(()=>{const r=o().data?.line,s=o().data?.jumpTimestamp;!r||s!==void 0&&s===e(Dt)||(f(Dt,s,!0),f(Ft,{line:r},!0),f(Ye,!1))});const Ie=n(()=>e(d)?_r(o().filePath,e(I)):null),_t=n(()=>e(d)?!e(Ie):!!(o().filePath&&(La(o().filePath)||e(Oe)&&za(o().filePath,e(Oe))))),ht=n(()=>o().filePath&&e(Oe)?er(o().filePath)?o().filePath:`${e(Oe)}/${o().filePath}`:null),ft=n(()=>!!o().filePath&&/\.pdf$/i.test(o().filePath)),vt=n(()=>!!o().filePath&&/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(o().filePath)),Qe=n(()=>i()&&/^[A-Za-z0-9._-]+$/.test(i())?_r(o().filePath,e(Oe)):null),Tr=n(()=>!e(d)&&e(Qe)?e(Qe).split("/").slice(0,-1).join("/"):void 0),qt=n(()=>e(ft)||e(vt)?e(Qe):null),nr=n(()=>e(d)&&e(vt)?{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",mp4:"video/mp4",webm:"video/webm"}[o().filePath?.split(".").pop()?.toLowerCase()??""]:void 0);pe(()=>{if(!F()||!e(d)||!e(Ie)||!e(nr))return;const r=crypto.randomUUID();return j.dispatch(Ir(fe,r,i(),e(Ie),{gitRootId:e(d),mimeType:e(nr)})),()=>j.dispatch(Cr(fe,r))});let lt=N(!1);const wt=n(()=>!!e(Qe)&&!e(St)&&(!e(vt)||e(ke)===e(Qe))),sr=n(()=>e(ke)&&i()?`workspace-file://${i()}/${e(ke).split("/").map(encodeURIComponent).join("/")}`:null),Kt=n(()=>o().filePath?da(o().filePath):"plaintext"),Tt=n(()=>e(Kt)==="markdown");pe(()=>{if(!F()||e(ft)||e(d))return;const r=e(qt),s=o().filePath,$=i(),C=o().id;if(f(ke,null),!r||!s||!$)return;let le=!1;const Re=()=>!le&&i()===$&&o().id===C&&o().filePath===s;return(async()=>{let de=!1;try{de=(await Ca("file.stat",{workspaceId:$,path:r}))?.isFile===!0}catch{}if(!Re())return;if(de){f(ke,r,!0);return}if(!/\.(?:png|jpe?g|gif|webp|mp4|webm)$/i.test(r)){f(ke,r,!0);return}const{candidates:Ae,truncated:qe}=await Va($,r);if(Re()){if(!qe&&Ae.length===1){j.dispatch(fr($,s,Ae[0],C));return}f(ke,r,!0)}})(),()=>{le=!0}});function Er(r,s){return!!(r.file===s||r.relativePath===s||r.relativePath&&s.endsWith("/"+r.relativePath)||r.file&&s.endsWith("/"+r.file)||r.relativePath&&r.relativePath.endsWith("/"+s)||r.file&&r.file.endsWith("/"+s))}const bt=n(()=>e(b)||!o().filePath?null:L().find(r=>Er(r,o().filePath))??null),Rr=n(()=>!!e(bt));pe(()=>{if(e(b))return;const r=i(),s=o().filePath,$=e(Oe);return()=>{if(!r||!s)return;const C=Zt.select(j.state,r,s);if(C?.kind!=="editable-text")return;const le=Gt(C.localContent),Re=mr.select(j.state,r,s),de=er(s)?s:$?`${$}/${s}`:null;Re&&de&&j.dispatch(vr(r,s,de,le))}}),pe(()=>{const r=o().filePath,s=e(ht),$=i();if(e(h),!F())return;const C=!e(d)&&!!r&&er(r)&&!e(Oe);r&&$&&!e(_t)&&!e(vt)&&!e(ft)&&!C&&(e(d)&&e(Ie)&&e(W)?j.dispatch(pr($,e(W),s??r,{gitRoot:{id:e(d),relativePath:e(Ie)}})):j.dispatch(pr($,r,s??r)))});function Mr(){return e(Je)??""}function Ur(r){e(b)||e(V)||!o().filePath||!i()||!e(ht)||j.dispatch(fa(i(),o().filePath,Gt(r)))}function jr(){if(e(b)||e(V)||!o().filePath||!e(ht)||e(Je)===null||e(t))return;const r=Zt.select(j.state,i(),o().filePath);r?.kind==="editable-text"&&j.dispatch(vr(i(),o().filePath,e(ht),Gt(r.localContent)))}function Vr(r){const s=o().filePath;!s||!i()||(j.dispatch(ua(i(),s)),j.dispatch(fr(i(),s,r,o().id)))}pe(()=>{const r=o().filePath,s=e(bt);if(!r||!s){f(He,[],!0);return}if(!F())return;const $=i(),C=crypto.randomUUID();return j.dispatch(aa($,mt,C,{kind:"diffs",path:r,staged:s.stage==="staged"})),()=>{j.dispatch(oa($,mt,C))}}),pe(()=>{const r=B(),s=r?.result?.kind==="diffs"?r.result.chunks:[],$=s.find(C=>C.file===o().filePath)??s[0];f(He,$?Aa($.chunks.map(C=>({oldStart:C.oldStart,oldLines:C.oldLines,newStart:C.newStart,newLines:C.newLines,lines:C.lines.map(le=>(le.type===gr.Addition?"+":le.type===gr.Deletion?"-":" ")+le.content)}))):[],!0)});function Lr(r){const s=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),$=Re=>Xa(r,Ka(Re),s);if($("editor.save")){r.preventDefault(),e(H)&&!e(t)&&jr();return}const C=$("editor.undo")?"undo":$("editor.redo")?"redo":$("editor.toggle-task-list")?"toggle-task-list":$("editor.copy")?"copy":$("editor.select-all")?"select-all":null;if(!C||e(b)&&C!=="copy"&&C!=="select-all")return;C!=="toggle-task-list"&&e($e)?.runShortcut(C)&&r.preventDefault()}function zr(r){if(!o().filePath||!e(bt))return;const s=r?.metaKey||r?.ctrlKey||!1,C=r?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;j.dispatch(ca(i(),e(bt),{filePath:o().filePath,changeId:e(bt).id,openInAdjacentPanel:s,sourcePanelId:C}))}async function Et(){const r=e(Qe);if(!(e(b)||!r||!i()||!e(wt)||e(lt))){f(lt,!0);try{const s=await ka(i(),r,e(Oe));!s?.success&&!s?.canceled&&Qt.error(s?.error?.message||c.layout_fileTab_downloadFailed_error())}catch{Qt.error(c.layout_fileTab_downloadFailed_error())}finally{f(lt,!1)}}}function Ar(){const r=e(ht);if(e(b)||!o().filePath||!i()||!r)return;const s=sa(Zt.select(j.state,i(),o().filePath));if(!s){Qt.error(c.ui_reversibleActions_failed_error({message:c.fileExplorer_tree_undoUnavailable_error()}));return}j.dispatch(la(i(),o().filePath,{absolutePath:r,tabId:o().id,snapshot:s}))}pe(()=>{if(!Le||!F())return;const r={isDirty:!e(b)&&e(H),isSaving:!e(b)&&e(t)};rr(()=>{Le.registerActions({display:De,actions:Ne}),Le.registerState(r)})});var Wr={get tab(){return o()},set tab(r){o(r),te()},get workspaceId(){return i()},set workspaceId(r){i(r),te()},get isActive(){return F()},set isActive(r){F(r),te()},get isPanelFocused(){return Te()},set isPanelFocused(r){Te(r),te()},$set:zt,$on:(r,s)=>At(w,r,s)},lr=je();rt("keydown",yr,r=>F()&&Lr(r));var Nr=ne(lr);{var Br=r=>{var s=je(),$=ne(s);Pr($,()=>o().filePath,C=>{var le=je(),Re=ne(le);{var de=_=>{var v=So(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0);x(v),k(Y=>{g(q,Y),g(Me,o().filePath)},[()=>c.layout_fileTab_outsideWorkspace_label()]),l(_,v)},Ae=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(Ie)},get gitRootId(){return e(d)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},qe=_=>{var v=je(),U=ne(v);{var q=Y=>{var K=br(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_errorLoading_label()]),l(Y,K)},z=Y=>{Vt(Y,{get filePath(){return o().filePath},get sourceUrl(){return Fe().url},allowDownload:!1})},Me=Y=>{var K=Fo(),ie=T(K),Ue=S(ie,!0);x(K),k(ve=>g(Ue,ve),[()=>c.layout_fileTab_preparing_label()]),l(Y,K)};Q(U,Y=>{Fe()?.error?Y(q):Fe()?.url?Y(z,1):Y(Me,-1)})}l(_,v)},pt=_=>{var v=je(),U=ne(v);{var q=z=>{or(z,{get workspaceId(){return i()},get filePath(){return e(qt)}})};Q(U,z=>{F()&&z(q)})}l(_,v)},xt=_=>{var v=br(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.file_pdf_load_error()]),l(_,v)},We=_=>{{let v=n(()=>e(ke)??o().filePath),U=n(()=>!e(b)&&e(wt));Vt(_,{get filePath(){return e(v)},get sourceUrl(){return e(sr)},onDownload:Et,get allowDownload(){return e(U)},get downloading(){return e(lt)}})}},Ge=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)},dt=_=>{var v=To(),U=T(v);Ct(U,20,()=>[...Array(20).keys()],q=>q,(q,z)=>{var Me=Do(),Y=T(Me);wr(Y,{class:"h-3 w-8 shrink-0"});var K=p(Y,2);wr(K,{class:"h-3",style:`width: ${30+Math.random()*60}%`}),x(Me),l(q,Me)}),x(U),x(v),l(_,v)},yt=_=>{{let v=n(()=>Za(e(m)));Ya(_,{get view(){return e(v)}})}},Pt=_=>{var v=Uo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),Y=p(z,2);{var K=ve=>{var Ke=Eo(),ct=S(Ke,!0);k(()=>g(ct,e(a))),l(ve,Ke)};Q(Y,ve=>{e(u)==="generic"&&ve(K)})}var ie=p(Y,2);{var Ue=ve=>{var Ke=Mo(),ct=ne(Ke),Jt=S(ct,!0),dr=p(ct,2);Ct(dr,20,()=>e(D),kt=>kt,(kt,cr)=>{var Yt=Ro(),qr=T(Yt);Ce(qr,{variant:"link",size:"compact",class:"h-auto p-0 font-mono text-xs",onclick:()=>Vr(cr),children:(Kr,zo)=>{Ze();var ur=tt();k(()=>g(ur,cr)),l(Kr,ur)},$$slots:{default:!0}}),x(Yt),l(kt,Yt)}),x(dr),k(kt=>g(Jt,kt),[()=>c.layout_fileTab_didYouMean_label()]),l(ve,Ke)};Q(ie,ve=>{e(D).length>0&&ve(Ue)})}x(v),k(ve=>{g(q,ve),g(Me,o().filePath)},[()=>ko(e(u))]),l(_,v)},$t=_=>{var v=jo(),U=T(v),q=S(U,!0),z=p(U,2),Me=S(z,!0),Y=p(z,2);{var K=ie=>{{let Ue=n(()=>!e(wt)||e(lt));Ce(ie,{variant:"secondary",size:"sm",onclick:Et,get disabled(){return e(Ue)},children:(ve,Ke)=>{Ze();var ct=tt();k(Jt=>g(ct,Jt),[()=>c.layout_fileTab_downloadFile_label()]),l(ve,ct)},$$slots:{default:!0}})}};Q(Y,ie=>{!e(b)&&e(Qe)&&ie(K)})}x(v),k(ie=>{g(q,ie),g(Me,o().filePath)},[()=>c.editor_fileViewer_binary_label()]),l(_,v)},Xt=_=>{const v=n(()=>o().filePath?.toLowerCase().endsWith(".svg"));var U=je(),q=ne(U);{var z=K=>{{let ie=n(()=>o().filePath||""),Ue=n(()=>!e(b)&&e(wt));Vt(K,{get filePath(){return e(ie)},get fileContent(){return e(Je)},get language(){return e(Kt)},get isBinary(){return e(V)},onDownload:Et,get allowDownload(){return e(Ue)},get downloading(){return e(lt)}})}},Me=K=>{var ie=Vo(),Ue=T(ie);Wa(Ue,{get content(){return e(Je)},get workspaceId(){return i()},get relativeMediaBase(){return e(Tr)},renderRichFencesAsCode:!0,renderDiagrams:!0}),x(ie),l(K,ie)},Y=K=>{var ie=Mr,Ue=Ur;{let ve=n(()=>me()?e(He):[]);$r(ar(K,{get value(){return ie()},set value(Ke){Ue(Ke)},get language(){return e(Kt)},get readOnly(){return e(b)},get fileName(){return o().filePath},get workspaceId(){return i()},get filePath(){return o().filePath},get lineWrapping(){return se()},get lineChanges(){return e(ve)},get jumpTo(){return e(Ft)},get externalContentVersion(){return e(xe)},get isPanelFocused(){return Te()}}),Ke=>f($e,Ke,!0),()=>e($e))}};Q(q,K=>{e(v)?K(z):e(Tt)&&e(Ye)?K(Me,1):K(Y,-1)})}l(_,U)},Hr=_=>{var v=xr(),U=T(v),q=S(U,!0);x(v),k(z=>g(q,z),[()=>c.layout_fileTab_preparing_label()]),l(_,v)};Q(Re,_=>{e(_t)?_(de):e(d)&&e(ft)&&e(Ie)?_(Ae,1):e(d)&&e(vt)?_(qe,2):e(ft)&&e(qt)?_(pt,3):e(ft)?_(xt,4):e(sr)?_(We,5):e(vt)?_(Ge,6):e(St)?_(dt,7):e(m)?_(yt,8):e(a)?_(Pt,9):e(V)?_($t,10):e(Je)!==null?_(Xt,11):_(Hr,-1)})}l(C,le)}),l(r,s)};Q(Nr,r=>{o().filePath&&r(Br)})}l(J,lr);var Or=Nt(Wr);return be(),Or}export{Lo as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./
|
|
1
|
+
import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./C9otdzZM.js";import{b as Xt,l as Yt}from"./BskEvHZa.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&<[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,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:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|